| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- /**
- * 加载栏期档案维护列表数据
- */
- function loadLqwhGrid(lqbh) {
- var daxx_lqda_lqxx_czwh_update = $("#daxx_lqda_lqxx_czwh_update").val();
- var daxx_lqda_lqxx_czwh_delete = $("#daxx_lqda_lqxx_czwh_delete").val();
- jQuery("#lqwhGrid").flexigrid({
- url : 'getLqwhList.htm',
- dataType : 'json',
- method : 'post',
- params : [{
- name : 'lqid',
- value : $('#lqid').val()
- }],
- title : '<b>栏期档案维护浏览</b>',
- usepager : true,
- useRp : true,
- rp : 10,
- singleSelect : true,
- hidehead : false,
- showInputPage : true,
- showSelectRp : false,
- showTableToggleBtn : false,
- width : '790',
- height : '310',
- resizable : false,
- cache : false, // 清除缓存
- colModel : [{
- display : '行号',
- name : 'hh',
- width : 20,
- sortable : false,
- align : 'center',
- process : function(col, record, d) {
- jQuery(col).html(d + 1);
- }
- }, {
- display : '猪舍名称',
- name : 'zsmc',
- width : 80,
- sortable : false,
- align : 'center'
- }, {
- display : '栏期名称',
- name : 'lqmc',
- width : 60,
- sortable : false,
- align : 'center'
- }, {
- display : '发生时间',
- name : 'fssj',
- width : 120,
- sortable : true,
- align : 'center'
- }, {
- display : '在栏数',
- name : 'zls',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '入栏数',
- name : 'rls',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '入栏平均体重(Kg)',
- name : 'rlpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '出栏数',
- name : 'cls',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '出栏平均体重(Kg)',
- name : 'clpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '售出数',
- name : 'scs',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '售出平均体重(Kg)',
- name : 'scpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '隔离数',
- name : 'gls',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '隔离平均体重(Kg)',
- name : 'glpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '死亡数',
- name : 'sws',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '死亡平均体重(Kg)',
- name : 'swpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '淘汰数',
- name : 'tts',
- width : 35,
- sortable : false,
- align : 'center'
- }, {
- display : '淘汰平均体重(Kg)',
- name : 'ttpjtz',
- width : 90,
- sortable : false,
- align : 'center'
- }, {
- display : '操作',
- name : 'cz',
- width : 50,
- sortable : false,
- align : 'center'
- }, {
- display : '修改时间',
- name : 'xgsj',
- width : 120,
- sortable : false,
- align : 'center'
- }, {
- display : '操作维护',
- name : '',
- width : 85,
- sortable : false,
- align : 'center',
- process : function(col, record, postion, pid) {
- jQuery(col).addClass('s');
- var str = '';
- if (daxx_lqda_lqxx_czwh_delete == "true") {
- str += '<a onclick="disableLqwh(\'' + record.id +'\',\'' + record.lqid + '\');">删除</a> ';
- }
- if (daxx_lqda_lqxx_czwh_update == "true") {
- str += '<a onclick="editLqwh(\'' + record.id + '\');">修改</a>';
- }
- jQuery(col).html(str);
- }
- }]
- });
- }
- loadLqwhGrid($('#lqid'));
- /**
- * 导出栏期维护
- * @param lqid
- */
- function exportLqwhExcel(lqid) {
- if (confirm('是否确认导出为Excel?')) {
- var url = 'getLqwhList.htm';
- window.open(
- url + '?exportExcel=exportExcel&lqid=' +lqid,
- 'newwindow',
- 'height=630, width=800, top=50, left=250, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no');
- }
- }
- /**
- * 修改栏期维护
- * @param id
- */
- function editLqwh(id) {
- huimv.loadPage("lqdaRight", "editLqwh.htm", {
- "id" : id,
- "from": "view"
- });
- }
- /**
- * 删除栏期维护
- */
- function disableLqwh(id,lqid) {
- Dialogs.alert("确定作废当前栏期维护日志?", {
- title : '提示信息',
- width : 250,
- height : 80,
- top : 150,
- button : {
- ok : ['确定',function(){
- this.close();
- huimv.showProcessModel('处理数据中');
-
- jQuery.ajax({
- url : 'disableLqwh.htm',
- dataType : 'json',
- type : 'post',
- cache : false,
- data : {"id" : id},
- success : function(data) {
- huimv.hideProcessModel();
- if (data.returnCode > 0) {
- viewLqwhList(lqid);
- } else {
- Dialogs.alert("传入参数有误!", {
- width : 300,
- height : 50
- });
- }
- },
- error : function(data) {
- huimv.showError(data.responseText);
- }
- });
- }],
- cancel : ['取消',function(){
- this.close();
- }]
- }
- });
- }
|