标签:style blog http io ar color os 使用 sp
用于存储匹配成功的记录行数,连续点击查询按钮跳过这些行
var tempIndex=[];
查询函数
function searchText(dg,t){ //参数:$("#datagrid"),$(”#text“)
dg.datagrid("unselectAll");}
datagrid设置
$("#cargoAgentTable").datagrid({
url: "../webresources/login/sql/getCargoAgentCod",
method: ‘GET‘,
fit:false,
pagination: false,
width:486,
height:448,
singleSelect: false,
checkOnSelect: false,
onClickRow:function(index,row){
$(this).datagrid("unselectAll");
$(this).datagrid("selectRow",index);
},
onCheck:function(index,row){
$(this).datagrid("unselectAll");
$(this).datagrid("selectRow",index);
},
columns: [[{
field: "ck",
checkbox: true
}, {
field: ‘CLIENT_COD‘,
title: ‘货代理编码‘,
sortable: true,
width: 80
}, {
field: ‘USER_CODE‘,
title: ‘代码‘,
sortable: true,
width: 60
}, {
field: ‘CLIENT_NAM‘,
title: ‘货代名称‘,
sortable: true,
width: 180
}, {
field: ‘SHOT_NAM‘,
title: ‘简称‘,
sortable: true,
width: 80
}
]]
});
弹出框设置
$("#businessCargoKindNam_SCFQ").on("dblclick", function() {
tempIndex=[];
$("#businessCargoKindTable").datagrid("uncheckAll");
$("#businessCargoKindDialog").css(‘display‘, ‘block‘).dialog({
title: "货类列表",
closed: false,
width:300,
toolbar:"#businessCargoKindDialogToolbar",
height:450,
resizable: true,
cache: false,
modal: true,
buttons: [{
text: ‘保存‘,
iconCls: ‘icon-save‘,
handler: function() {
var nam = "";
var cod = "";
var rows = $("#businessCargoKindTable").datagrid("getChecked");
$.each(rows, function(i, v) {
nam += v.SYS_NAM + ",";
cod += v.SYS_COD + ",";
});
if (nam) {
nam = nam.substr(0, nam.length - 1);
}
if (cod) {
cod = cod.substr(0, cod.length - 1);
}
$("#businessCargoKindNam_SCFQ").val(nam);
$("#businessCargoKind_SCFQ").val(cod);
$("#businessCargoKindDialog").dialog(‘close‘);
}
}, {
text: ‘取消‘,
iconCls: ‘icon-cancel‘,
handler: function() {
$("#businessCargoKindDialog").dialog(‘close‘);
}
}]
});
});
大概写了写,存稿以后使用。
标签:style blog http io ar color os 使用 sp
原文地址:http://blog.csdn.net/qq38397892/article/details/41800527