var csjlcs = new Object(); csjlcs.loadSearchModule = function(p) { var $div = $("#" + p.id); if ($div.length > 0) { $div.load('csszSearchModule.htm', { from : p.from, callBackFunName : p.callBackFunName }, function() { }); } }; /** * 加载参数设置查询模块 */ csjlcs.loadSearchModule({ id : 'csjlcsSearchModule', from : 'csjlcs', callBackFunName : 'searchCsjlcsCallBack' }); /** * 搜索条件回调函数 * * @param {搜索条件对象} * data * @param {分隔符} * fgf */ function searchCsjlcsCallBack(data, fgf) { huimv.searchGrid("csjlcsGrid", { url : 'getCsjlcsList.htm', params : [{ name : 'param', value : data }, { name : 'fgf', value : fgf }] }, '采食计量参数设置搜索结果'); } /** * 加载采食计量参数设置列表数据 */ function loadCsjlcsGrid(csjlcsSearchGrid) { jQuery("#csjlcsGrid").flexigrid({ url : 'getCsjlcsList.htm', dataType : 'json', method : 'post', params : [{ name : 'csjlcsSearchGrid', value : $('#csjlcsSearchGrid').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', resizable : false, height : '335', cache : false,// 清除缓存 colModel : [{ display : '行号', name : 'hh', width : 25, sortable : false, align : 'center', process : function(col, record, d) { jQuery(col).html(d + 1); } }, { display : '机器编号', name : 'jqid', width : 100, sortable : true, align : 'center', process : function(col, record, postion, pid) { jQuery(col).addClass('s'); jQuery(col).html('' + record.jqid + ''); } }, { display : '牧场名称', name : 'mcmc', width : 140, sortable : false, align : 'center' }, { display : '猪舍名称', name : 'zsmc', width : 100, sortable : false, align : 'center' }, { display : '下发标志', name : '', width : 100, sortable : true, align : 'center', process : function(col, record, postion, pid) { if (record.xfbz == 1) { jQuery(col).html("下发中"); } else { jQuery(col).html("未下发"); } } }] }); } loadCsjlcsGrid($('#csjlcsSearchGrid')); /** * 加载参数设置查看页面 * @param id */ function viewCsjlcs(id) { huimv.loadPage('yjsbRight', 'viewCsjlcs.htm', { "id" : id }); }