弹窗给选中数据赋值:t
/** * 设置分派员 */ function onDispatchMan(){ var rec=ajaxgrid.getCheckedRecords(); if(rec.length==0){ $.alert("提示信息","至少要选择一条分派人员的记录"); return; } this.showPersonTree(); } /** *分派人选择弹窗 */ function showPersonTree(){ var obj = {} ; obj.label = _dispatchMan.getSelectedLabel() ; obj.value = _dispatchMan.getSelectedValue() ; $.showModalDialog(""+$$pageContextPath +"common/commonDialog/selectPerson.do?
deptId="+orgId+"&ifMulty=false&roleList=17","分派人选择",showPersonTreeCallBack,obj,600,450,0); } function showPersonTreeCallBack(ret,a,b){ debugger; if(ret != null){ var num = ret.indexOf("&"); var r=ret.substring(0, num); setDispatchMan(r); } } function setDispatchMan(r){ var rec=ajaxgrid.getCheckedRecords(); for(var i=0;i<rec.length;i++){ var rowIndex=ajaxgrid.getIndexOfRecord(rec[i]); var record=ajaxgrid.getRecord(rowIndex); record.set("dispatchMan",r); ajaxgrid.setRowDataByRecord(record); } }