123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- 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
- }]
- }, '<b>采食计量参数设置搜索结果</b>');
- }
- /**
- * 加载采食计量参数设置列表数据
- */
- 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 : '<b>采食计量参数设置浏览</b>',
- 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('<a onclick="viewCsjlcs(' + record.id + ');">' + record.jqid + '</a>');
- }
- }, {
- 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
- });
- }
|