var slxx = new Object();
slxx.loadSearchModule = function(p) {
var $div = $("#" + p.id);
if ($div.length > 0) {
$div.load('slxxSearchModule.htm', {
from : p.from,
callBackFunName : p.callBackFunName,
'slxxSearchGrid' : $("#slxxSearchGrid").val()
}, function() {
});
}
};
/**
* 加载上料信息查询模块
*/
slxx.loadSearchModule({
id : 'slxxSearchModule',
from : 'slxx',
callBackFunName : 'searchSlxxCallBack'
});
/**
* 搜索条件回调函数
*
* @param {搜索条件对象}
* data
* @param {分隔符}
* fgf
*/
function searchSlxxCallBack(data, fgf) {
huimv.searchGrid("slxxGrid", {
url : 'getSlxxList.htm',
params : [{
name : 'param',
value : data
}, {
name : 'fgf',
value : fgf
}]
}, '上料信息搜索结果');
}
/**
* 加载上料信息列表数据
*/
function loadSlxxGrid(slxxSearchGrid) {
var daxx_lqda_slxx_czwh_view = $("#daxx_lqda_slxx_czwh_view").val();
jQuery("#slxxGrid").flexigrid({
url : 'getSlxxList.htm',
dataType : 'json',
method : 'post',
params : [{
name : 'slxxSearchGrid',
value : $('#slxxSearchGrid').val()
},{
name : 'from',
value : $("#from").val()
}],
title : '上料信息浏览',
usepager : true,
useRp : true,
rp : 10,
singleSelect : true,
hidehead : false,
showInputPage : true,
showSelectRp : false,
showTableToggleBtn : false,
width : '790',
height : '335',
resizable : false,
cache : false,// 清除缓存
colModel : [{
display : '行号',
name : 'hh',
width : 25,
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 : 70,
sortable : false,
align : 'center'
}, {
display : '采食区一(Kg)',
name : 'csq1sll',
width : 80,
sortable : false,
align : 'center',
process : function(col, record, postion, pid) {
jQuery(col).addClass('s');
var csq1csl = record.csq1csl;
var str = '';
if (csq1csl == 0) {
str = '0';
jQuery(col).html(str);
}
}
}, {
display : '采食区一最近上料时间',
name : 'csq1zjslsj',
width : 130,
sortable : false,
align : 'center'
}, {
display : '采食区二(Kg)',
name : 'csq2sll',
width : 90,
sortable : false,
align : 'center',
process : function(col, record, postion, pid) {
jQuery(col).addClass('s');
var csq2csl = record.csq2csl;
var str = '';
if (csq2csl == 0) {
str = '0';
jQuery(col).html(str);
}
}
}, {
display : '采食区二最近上料时间',
name : 'csq2zjslsj',
width : 130,
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_slxx_czwh_view == "true") {
str += '查看';
}
jQuery(col).html(str);
}
}]
});
}
loadSlxxGrid($('#slxxSearchGrid'));
/**
* 查看上料维护日志
* @param lqid
*/
function viewSlwhList(lqid) {
huimv.loadPage("lqdaRight", "loadSlwhList.htm", {
"lqid" : lqid
});
}