ajax.init().success(function(code, msg, data) {//异步加载下拉框中需要的值 var status = 0; var is_set = 0; if (data.length && data.length > 0) { if (data[0].status == '1') { status = 1; } for(var i=0;i<data.length;i++){ if(data[i].set_status == '1'){ is_set = 1; }else{ is_set = 0; } } } $('#conditions').combobox({ valueField: 'branch_id',//下拉框绑定对应value textField: 'branch_expdesc',//text值 data: data,//被加载列表的数据 editable:false,//是否可以编辑 onLoadSuccess : function(){ //远程加载完数据选中第一项,不写在这里可能导致有时不显示选中项 $('#conditions').combobox('select',$('#conditions').combobox('getData')[0].branch_id); }, onSelect: function(newValue) {//兼听选中事件 ajax.init().success(function(code, msg, data) { if (data && data.total != undefined && data.total > 0) { $('#connodeinfodatagrid').datagrid('loadData', data.rows); } else { $('#connodeinfodatagrid').datagrid('loadData', []); } }).post(BASEPATH + "/act/actExProcessBranch/queryActBussSubSetByPage.htm", { processKey: $("#processKey").val(), branchId: newValue.branch_id }); }, });
}).post(BASEPATH + "/act/actExProcessBranch/querySubSet.htm");
oa项目中审批流程管理,分条件下拉框要求选中第一项,并加载数据。combobox
最新推荐文章于 2022-08-29 09:57:44 发布