ztree树展示XPD.txt 正在加载数据... //----------加载树idspanExcname//负责人选择对话框function openOrgStaffTree(){var title = '选择员工';loadOrgStaffChargeTree();$('#divOrgStaffChargeTree').show();$('#divOrgStaffCharge
ztree树展示XPD.txt
正在加载数据...
//----------加载树idspanExcname
//负责人选择对话框
function openOrgStaffTree(){
var title = '选择员工';
loadOrgStaffChargeTree();
$('#divOrgStaffChargeTree').show();
$('#divOrgStaffChargeTree').dialog({
iconCls:'icon-tip',
title:title,
top:20,
width: 425,
height: 300,
closed: false,
cache: false,
modal: true,
buttons:[{
text:'确定',
handler:saveTree
},{
text:'取消',
handler:closeTree
}]
});
}
//选择负责人
function saveTree(){
var treeObj = $.fn.zTree.getZTreeObj("orgStaffChargeTree");
if (treeObj){
var nodes=null;
if (userTreeChecked==true){ //复选
nodes = treeObj.getCheckedNodes();
}else{
nodes = treeObj.getSelectedNodes();
}
var node=null;
if (nodes && nodes.length>0){
if (userTreeChecked==true){ //复选
var names="";
var jobNos="";
for (var i=0; i
0) {
var node=nodes[0];
treeObj.selectNode(node);
treeObj.expandNode(node, true, false, false, false);
}
}
}
//---------------------------------------
正在加载部门人员树...
/**
* 初始化部门人员导航树(负责人)
*/
function buildStaff(){
var $dlg=$("#dlgOrg");
$dlg.dialog('center');//设置窗口居中
$dlg.dialog('open');
$("#divMask").show();
//验证当前人员是否有下面的角色
var isex=false;
var query={memCode:memberCode,jobno:jobno};
for(var i=0;i
0){ for(var i=0;i