Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV4platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV4platform
Commits
53b0e594
Commit
53b0e594
authored
Aug 08, 2018
by
周添尉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
08765610
63009933
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
12 deletions
+34
-12
unitTab.js
WebContent/jwapp/pages/unit/js/unitTab.js
+2
-2
unitDetail.jsp
WebContent/jwapp/pages/unit/unitDetail.jsp
+14
-0
dzzd.xls
WebContent/uploadFile/apps/compare/dzzd.xls
+0
-0
PushDataUtils.java
src_jwapp/com/jw/app/pushData/util/PushDataUtils.java
+1
-0
actAction.java
src_jwapp/com/jw/app/unit/action/actAction.java
+10
-9
actAction.java
src_jwapp/com/jw/app/user/action/actAction.java
+7
-1
No files found.
WebContent/jwapp/pages/unit/js/unitTab.js
View file @
53b0e594
/** * 序号:1 * 功能:定义分页(EasyUI) * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:无需更改 **/
var
ls_width
=
$
(
window
).
width
();
var
ls_height
=
$
(
window
).
height
();
$
(
window
).
resize
(
function
(){
ls_width
=
$
(
window
).
width
();
ls_height
=
$
(
window
).
height
();
});
var
local_page
=
1
;
var
rows
=
20
;
var
listPageSize
=
[
10
,
20
,
50
,
100
,
500
,
1000
];
var
queryData
=
eval
(
"({'page':'"
+
local_page
+
"','rows':'"
+
rows
+
"'})"
);
var
tab_n
=
0
;
//重置分页参数 function resetQueryData(){ queryData = ""; queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})"); } //定义用户当前全局参数 var ls_node=null;//当前选中的Node queryData.FIELD_UNIT_ID_IS_PARENT='A'; var ls_row_index = 0;//当前操作记录序号 var ls_choice_ope = 1;//当前选组织窗口返回值的作用 1:用于批量人员移动 2:用于人员排序 3:用于人员选取 //定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 ) var ls_module_id='2'; //定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务) var ls_ywlx = 'YBYW'; /****/ /** * 序号:2 * 功能:构建下拉框内容 * 参数: * 说明:方便新增、修改页面里的下拉选项加载数据 * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载单位下拉 var v_unitquery = {}; var v_unit_tree = jwAppUnitModel.jwAppsUnitDataAction.listMyUnitTree(v_unitquery); //加载是否实体下拉框 var v_entity_data = [{CODE_ID:'0',CODE_NAME:'虚拟实体'},{CODE_ID:'1',CODE_NAME:'真实实体'}]; //加载区域类型下拉框 var v_area_data = [{CODE_ID:'1',CODE_NAME:'区域'},{CODE_ID:'2',CODE_NAME:'单位'},{CODE_ID:'3',CODE_NAME:'部门或处室'}]; //加载单位类别下拉框 var v_gjdwquery = {}; v_gjdwquery.FIELD_tableName = "DM_GJDW_HYFL"; var v_gjdw_data = standardModel.dataAction.listAllCache(v_gjdwquery); /****/ /** * 序号:3 * 功能:构建主页面列表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //定义grid列表 var ls_title="单位信息"; var is_column = [ [ {field : 'NAME',title : '单位名称',width : 100,align : 'left', formatter: function(value,row,index){ return "<a style=\"text-decoration: none\" href=\"javascript:void(0);\" onclick=\"editRow('" + index + "')\">"+row.NAME+"</a>"; } }, {field : 'UNIT_ID',title : '单位编码',width : 100,align : 'left'}, {field : 'TYPE_NAME',title : '单位类型',width : 100,align : 'left'}, {field : 'PARENT_NAME',title : '所属机构',width : 100,align : 'left'}, {field : 'DEVCODING',title : '组织后缀',width : 100,align : 'left'}, {field : 'AREA_TYPE',title : '区域类型',width : 100,align : 'center', formatter : function(value) { return getCodeName(v_area_data, value); } }, {field : 'IS_ENTITY',title : '是否实体',width : 60,align : 'center', formatter : function(value) { return getCodeName(v_entity_data, value); } }, {field : 'OFFICE_PHONE',title : '单位电话',width : 100,align : 'center'}, {field : 'ORDER_ID',title : '排序',width : 60,align : 'center'}, {field : 'USER_COUNT',title : '单位人数',width : 70,align : 'center'}, {field : 'CHILDREN_COUNT',title : '下级单位',width : 70,align : 'center'}, {field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'} ] ]; //列表加载完成回调 function dataOnLoadSuccess(){ //拖拽插件启用 $("#list").datagrid('enableDnd'); } //拖拽某行到指定位置后触发 function dataOnDrop(targetRow, sourceRow, point){ v_query = {}; v_query.FIELD_IS_ORDER = sourceRow.ORDER_ID+"_up_"+targetRow.ORDER_ID; console.log(v_query.FIELD_IS_ORDER); var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitSetOrder(v_query); $.messager.alert('提示', v_result.VALUE); reloadTree(); return v_result; } //设置颜色和每行高度 function rowstyler(index,row){ return 'height:30px;'; } //展示列表 datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/jwAppsUnitData_listMy",queryData,is_column,70,80); /****/ /** * 序号:4 * 功能:设置操作列浮动菜单 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //操用列显示更多(一般情况下无需更改) function formatMenu(value, data,index) { var returnData=""; return returnData + "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>" + "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>"; } //上浮横向菜单集里的具体菜单项(需更改) function getOptionMenu(data,index){ var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" + index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">删除</a> | <span class=\"icon-ext-04_36\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"moveRow('" + index + "','true','2')\">定位</a> | <span class=\"icon-ext-11_20\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"moveRow('" + index + "','true','1')\">人员转移</a> | <span class=\"icon-ext-38_38\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"tbSet('" + index + "')\">推送绑定</a>"; return returnData; } //返回菜单集的菜单个数(需更改) function getOptionMenuCount(){ var is_menu_count = 5; return is_menu_count; } /****/ /** * 序号:5 * 功能:新增弹出 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载增加子页面 function addRow(){ var is_row={OPETYPE:'insert'}; openEditRow("jwAppsUnitView_unitDetail",is_row,"新增",true,0.95,0.95,0,0); } //加载增加子页面成功后的回调 function addUrlOnloadCallback(is_row){ $('#PARENT_ID').combotree('loadData', [v_unit_tree.rows[0]]); $('#AREA_TYPE').combobox({ data : v_area_data, valueField : 'CODE_ID', textField : 'CODE_NAME', editable:false, panelHeight:'auto' }); $('#TYPE').combobox({ data : v_gjdw_data.rowSet, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 200, editable:false }); $('#IS_ENTITY').combobox({ data : v_entity_data, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 'auto', editable:false }); $('#PARENT_ID').combotree('setValue', ls_node.UUID); $('#AREA_TYPE').combobox('setValue', '2'); $('#IS_ENTITY').combobox('setValue', '1'); $('#TYPE').combobox('setValue', '999'); var maxorder = jwAppUnitModel.jwAppsUnitDataAction.listMaxOrder(null).maxorder; if(maxorder == null || maxorder == ""){ maxorder = 0; }else{ maxorder = maxorder + 1; } $('#ORDER_ID').numberbox('setValue', maxorder); $('#OLD_ORDER_ID').val(maxorder); } //保存 function insertData(is_entity){ var is_old_order_id = is_entity.FIELD_OLD_ORDER_ID; var is_new_order_id = is_entity.FIELD_ORDER_ID; is_entity.FIELD_IS_ORDER = is_old_order_id+"_up_"+is_new_order_id; var v_result = jwAppUnitModel.jwAppsUnitActAction.insertUnit(is_entity); if(v_result.NAME == '-10'){ $.messager.confirm('提示', v_result.VALUE, function(r) { if (r) { is_entity.FIELD_FLAG = '1'; v_result = jwAppUnitModel.jwAppsUnitActAction.insertUnit(is_entity); reloadTree(); $.messager.alert('提示', v_result.VALUE); closeBox("detail"); } }); }else{ reloadTree(); return v_result; } } /****/ /** * 序号:6 * 功能:修改弹出 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载修改子页面 function editRow(index){ ls_row_index = index; var is_row = {}; $('#list').datagrid('selectRow',index); is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); is_row[0].OPETYPE = 'update'; openEditRow("jwAppsUnitView_unitDetail",is_row[0],"编辑",true,0.95,0.95,0,0); } //加载修改子页面成功后的回调 function updateUrlOnloadCallback(is_row){ $('#list').datagrid('clearSelections'); $('#PARENT_ID').combotree('loadData', [v_unit_tree.rows[0]]); $('#AREA_TYPE').combobox({ data : v_area_data, valueField : 'CODE_ID', textField : 'CODE_NAME', editable:false, panelHeight:'auto' }); $('#TYPE').combobox({ data : v_gjdw_data.rowSet, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 200, editable:false }); $('#IS_ENTITY').combobox({ data : v_entity_data, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 'auto', editable:false }); } //保存 function updateData(is_entity){ var is_old_order_id = is_entity.FIELD_OLD_ORDER_ID; var is_new_order_id = is_entity.FIELD_ORDER_ID; is_entity.FIELD_IS_ORDER = is_old_order_id+"_up_"+is_new_order_id; v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnit(is_entity); reloadTree(); return v_result; } /****/ /** * 序号:7 * 功能:单个删除 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function deleteRow(index){ $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var code = is_row[0].UUID; if(is_row[0].UUID == 'A'){ $.messager.alert('提示',"无法删除!",'info'); return; }else if(is_row[0].CHILDREN_COUNT > 0){ $.messager.alert('提示',"存在下属单位,无法删除!",'info'); return; }else if(is_row[0].USER_COUNT > 0){ $.messager.alert('提示',"有人员尚未转移,无法删除!",'info'); return; } $.messager.confirm('提示', '确定删除?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteUnit(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /****/ /** * 序号:8 * 功能:批量删除 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function deleteBatchRow(){ var code=""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; if(is_row[i].UUID == 'A'){ $.messager.alert('提示',"无法删除!",'info'); return; }else if(is_row[i].CHILDREN_COUNT > 0){ $.messager.alert('提示',"存在下属单位,无法删除!",'info'); return; }else if(is_row[i].USER_COUNT > 0){ $.messager.alert('提示',"有人员尚未转移,无法删除!",'info'); return; } } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需删除的行!",'info'); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } $.messager.confirm('提示', '确定删除?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteUnit(v_query); //jwAppUnitModel.jwAppsUnitActAction.deleteLdapUnit(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //LDAP全量同步 function addLdap(){ $.messager.confirm('提示', '确定同步?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.insertOrUpdateLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //ldap整体清除 function deleteLdap(){ $.messager.confirm('提示', '确定清除?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //ldap批量同步 function addRowLdap() { var code=""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需同步的行!",'info'); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } $.messager.confirm('提示', '确定同步?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.addRowLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /****/ /** * 序号:9 * 功能:刷新 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function refreshRow(){ reloadTree(); $("#unittab_searchForm")[0].reset(); } /****/ /** * 序号:10 * 功能:查询 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function searchRow(){ var v_query = $("#unittab_searchForm").getFormVal(); v_query.FIELD_UNIT_ID_IS_PARENT ='A'; $('#list').datagrid('load',v_query); } /****/ /** * 序号:11 * 功能:加载单位树列表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //setInitTree(节点显示字段,节点显示主题,节点字段UUID,父节点字段) var setting = setInitTree("NAME","NAME","UUID","PARENT_ID"); //加载树时的默认点击 function defautClick(zTree,treeNode){ if(ls_node == null){ ls_node = treeNode; zTree.selectNode(ls_node); }else{ zTree.selectNode(ls_node); modifyNode(ls_node); } } //点击左边节点,datagrid过滤 function modifyNode(treeNode){ ls_node = treeNode; queryData.FIELD_UNIT_ID_IS_PARENT =treeNode.UUID; queryData.FIELD_TREE_CLICK = 'Y'; $('#list').datagrid('reload',queryData); } //修改要移动的节点的parentid function updateParentId(node, targetNode){ var v_query = {}; v_query.FIELD_UUID = node.UUID; v_query.FIELD_NEW_PARENT = targetNode.UUID; jwAppUnitModel.jwAppsUnitActAction.updateParentId(v_query); } //loadTree(后台数据路径,显示的层ID) loadTreeImage("jwAppsUnitData_listMyAll","unittab_unit_tree","UUID","A"); function reloadTree(){ loadTreeImage("jwAppsUnitData_listMyAll","unittab_unit_tree","UUID","A"); } /****/ /** * 序号:12 * 功能:组织机构同步 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function tbSet(index){ $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var code = is_row[0].UUID; openViewRow("jwAppsUnitView_unitAur?uuid="+code+"&type=2",is_row[0],"数据同步到相关应用设定",true,0.65,0.95,0,0); } /****/ /** * 序号:13 * 功能:部门人员选取 * 参数:jwAppsUnitView_unitChoice?singleSelect=true&ope=1,批量移动人员到单选到的单位; * jwAppsUnitView_unitChoice?singleSelect=true&ope=2,单选单位后排序定位; * jwAppsUnitView_unitChoice?singleSelect=true&ope=3,单选单位后赋给一个提交域或变量; * jwAppsUnitView_unitChoice?singleSelect=false&ope=3,多选单位后赋给一个提交域或变量; * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function moveRow(index,singleSelect,ope){//列表上操作 ls_choice_ope = ope; var is_title = ""; if(ope=="2"){ is_title = "单位排序定位"; }else{ is_title = "新单位选择"; } $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope; if(ope=="2"){ var order_id = is_row[0].ORDER_ID; modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope+"&order_id="+order_id; } openViewIframRow("unitTabChoice",modifyUrl,is_row[0],is_title,true,0.95,0.95,0,0); } function choiceUnit(uuid,singleSelect,ope){//编辑框上操作 if(uuid==""){ uuid="add"; } var v_query={}; v_query.FIELD_UUID = uuid; var row = jwAppUnitModel.jwAppsUnitDataAction.listAll(v_query); var is_row = null; if(row.total>0){ is_row = row.rowSet; }else{ is_row = [{ORDER_ID:uuid}]; } ls_choice_ope = ope; var is_title = ""; if(ope=="2"){ is_title = "单位排序定位"; }else{ is_title = "新单位选择"; } var modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope; if(ope=="2"){ var order_id = is_row[0].ORDER_ID; modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope+"&order_id="+order_id; } openViewIframRow("unitTabChoice",modifyUrl,is_row[0],is_title,true,0.95,0.95,0,0); } function closeCallback(is_entity){ var ret_uuids = $('#return_text').text(); var code = is_entity.UUID; var is_order = ""; if(ret_uuids.indexOf('||')>-1){ is_order = ret_uuids.substring(ret_uuids.indexOf('||')+2); ret_uuids = ret_uuids.substring(0,ret_uuids.indexOf('||')); } if(ls_choice_ope=="1"){ if(ret_uuids.length>0){ var v_entity = {}; v_entity.FIELD_OLD_UNIT_ID = code; v_entity.FIELD_NEW_UNIT_ID = ret_uuids; jwAppUserModel.jwAppsUserActAction.BatchMoveInUser(v_entity); reloadTree(); } }else if(ls_choice_ope=="2"){ if(is_order!=""){ if(is_order.indexOf("add")>-1){ var is_o = is_order.substring(is_order.lastIndexOf("_")+1); $('#ORDER_ID').numberbox('setValue', is_o); }else{ var v_query = {}; v_query.FIELD_IS_ORDER = is_order; var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitSetOrder(v_query); $("#ORDER_ID").numberbox("setValue",v_result.RETURNUUID);//编辑打开时用到 $("#OLD_ORDER_ID").val(v_result.RETURNUUID);//编辑打开时用到 $.messager.alert('提示',v_result.VALUE); reloadTree(); } } }else if(ls_choice_ope=="3"){ $("#PARENT_ID").combotree("setValue",ret_uuids); } } /****/ /** * 序号:14 * 功能:初始化所有单位排序号 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function updateUnitInitOrderRow(){ $.messager.confirm('提示', '确定初始化所有排序号?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitInitOrder(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /** * 序号:17 * 功能:人员批量推送 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function unitPush(){ var code = ""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需推送的行!"); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } var is_row_code = {}; is_row_code.CODE=code; openEditPush("jwAppsUnitView_push",is_row_code,"数据推送",true,0.65,0.65,160,0); } //加载修改子页面成功后的回调 function pushUrlOnloadCallback(is_row){ $('#notrlist').datagrid({ // title:"应用选择列表", iconCls:$.getJwWindowPic(), url:'jwAppsPushDataData_listPushAppAll', queryParams : {FIELD_EMDEPART:"A",FIELD_ISPUSH:"1"},//查询参数 rownumbers : true,//显示索引号 singleSelect : false,//是否多选 fitColumns : false,//是否撑满 autoRowHeight : 30,//设定高度 // pagination : true,//分页显示 // pageSize : rows,//显示行数 // pageList : listPageSize,//条数选择 striped : true, //是否隔行显示 remoteSort : false,//是否从服务器排序 frozenColumns : [[ { field : 'ck', checkbox : true } ]], columns : [[ {field:'CODE',title:'编号',hidden:'true'}, {field:'EMNAME',title:'选择应用',width:450,align:'center'} ]] }); } function addToPush(is_entity){ var v_query = {}; var row = $("#notrlist").datagrid('getSelections'); if(row == null || row == ""){ $.messager.alert('提示',"请选择需同步数据的应用!"); return; } var code=""; for(var i=0; i<row.length; i++){ code = code + row[i].CODE+","; } if(code.length>0){ code = code.substring(0,code.length - 1); } v_query.FIELD_CODE = is_entity.CODE; v_query.FIELD_CLIENT_CODE = code; var ret = jwAppUnitModel.jwAppsUnitActAction.pushUnitO(v_query); return ret; } /** * 序号:18 * 功能:下载组织模板 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function downloadjw(uuid){ var uploadnew = 'Unit.xls'; var uploadpath = '/uploadFile/apps/Unit'; var uploadold = '组织导入模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_download'); } /** * 序号:18 * 功能:下载组织名称对照表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function downloadjwid(uuid){ var uploadnew = 'UnitId.xls'; var uploadpath = '/uploadFile/apps/UnitId'; var uploadold = '组织对照模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_downloadDz'); } /** * 序号:10 * 功能:上传 * 参数:填写限制上传类型,上传地址 * 说明:openUpload_image(uuid),打开图片上传; * openUpload_doc(uuid),打开常用公文上传; * openUpload_imagedoc(uuid),打开常图片+用公文上传; * 如有特殊限制时用以下这段: * var up_type = "gif,jpg,jpeg,bmp,png";//限制上传类型 * var up_act = "reportact_upload";//上传地址 * openUpload_page1(up_type,up_act,uuid); * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //打开上传页面 function uploadjw(uuid){ if(uuid == '' || uuid == null || uuid == 'undefined'){ $.messager.alert('提示',"主记录关键字不能为空!",'info'); return; } openUpload_doc(uuid); } //上传成功后的回调,主要返回三个参数: //fname上传时的真实文件名如:文件.txt, //fpath上传后的真实文件名如:c:\temp\145597044184082388.txt //uuid主要用于记录跟文件绑定用 function uploadCallback(fname,fpath,uuid){ // var fileOld = fname; // var filePath = fpath.substring(0,fpath.lastIndexOf("/")+1); // var filenew = fpath.substring(fpath.lastIndexOf("/")+1); // $("#UPLOADNEW").textbox('setValue',filenew); // $("#UPLOADPATH").val(filePath); // $("#UPLOADOLD").val(fileOld); // $.messager.alert('提示',"上传成功,请及时保存!",'info'); var v_img_entity={'FILED_FILE_NAME':fname,'FILED_FILE_PATH':fpath}; var v_result = jwAppUnitModel.jwAppsUnitActAction.ImpUnit(v_img_entity); $.messager.alert('提示',v_result.VALUE); $('#list').datagrid('reload'); // $.sendPost ('jwAppsMappingAct_ImpUser', v_img_entity, function(v_result){ // $.messager.progress('close'); // $.messager.alert('提示',v_result.VALUE); // $('#list').datagrid('reload'); // }, function(data){ // alert("失败"); // }, "json"); } //字典库下载 function downloadzd(uuid){ var uploadnew = '对照字典.xls'; var uploadpath = '/uploadFile/apps/compare'; var uploadold = '部门人员字典库模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_download'); } /** * 序号:12 * 功能:更新缓存 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **//* function updateCacheRow(){ var v_query = {}; queryData.FIELD_tableName = 'UUID'; v_query.FIELD_CODE = queryData.FIELD_tableName; var v_result = standardModel.actAction.updateCacheTable(v_query); $.messager.alert('提示',v_result.VALUE); $('#list').datagrid('reload'); }*/
/** * 序号:1 * 功能:定义分页(EasyUI) * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:无需更改 **/
var
ls_width
=
$
(
window
).
width
();
var
ls_height
=
$
(
window
).
height
();
$
(
window
).
resize
(
function
(){
ls_width
=
$
(
window
).
width
();
ls_height
=
$
(
window
).
height
();
});
var
local_page
=
1
;
var
rows
=
20
;
var
listPageSize
=
[
10
,
20
,
50
,
100
,
500
,
1000
];
var
queryData
=
eval
(
"({'page':'"
+
local_page
+
"','rows':'"
+
rows
+
"'})"
);
var
tab_n
=
0
;
//重置分页参数 function resetQueryData(){ queryData = ""; queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})"); } //定义用户当前全局参数 var ls_node=null;//当前选中的Node queryData.FIELD_UNIT_ID_IS_PARENT='A'; var ls_row_index = 0;//当前操作记录序号 var ls_choice_ope = 1;//当前选组织窗口返回值的作用 1:用于批量人员移动 2:用于人员排序 3:用于人员选取 //定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 ) var ls_module_id='2'; //定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务) var ls_ywlx = 'YBYW'; /****/ /** * 序号:2 * 功能:构建下拉框内容 * 参数: * 说明:方便新增、修改页面里的下拉选项加载数据 * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载单位下拉 var v_unitquery = {}; var v_unit_tree = jwAppUnitModel.jwAppsUnitDataAction.listMyUnitTree(v_unitquery); //加载是否实体下拉框 var v_entity_data = [{CODE_ID:'0',CODE_NAME:'虚拟实体'},{CODE_ID:'1',CODE_NAME:'真实实体'}]; //加载区域类型下拉框 var v_area_data = [{CODE_ID:'1',CODE_NAME:'区域'},{CODE_ID:'2',CODE_NAME:'单位'},{CODE_ID:'3',CODE_NAME:'部门或处室'}]; //加载单位类别下拉框 var v_gjdwquery = {}; v_gjdwquery.FIELD_tableName = "DM_GJDW_HYFL"; var v_gjdw_data = standardModel.dataAction.listAllCache(v_gjdwquery); /****/ /** * 序号:3 * 功能:构建主页面列表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //定义grid列表 var ls_title="单位信息"; var is_column = [ [ {field : 'NAME',title : '单位名称',width : 100,align : 'left', formatter: function(value,row,index){ return "<a style=\"text-decoration: none\" href=\"javascript:void(0);\" onclick=\"editRow('" + index + "')\">"+row.NAME+"</a>"; } }, {field : 'UNIT_ID',title : '单位编码',width : 100,align : 'left'}, {field : 'TYPE_NAME',title : '单位类型',width : 100,align : 'left'}, {field : 'PARENT_NAME',title : '所属机构',width : 100,align : 'left'}, {field : 'DEVCODING',title : '组织后缀',width : 100,align : 'left'}, {field : 'AREA_TYPE',title : '区域类型',width : 100,align : 'center', formatter : function(value) { return getCodeName(v_area_data, value); } }, {field : 'IS_ENTITY',title : '是否实体',width : 60,align : 'center', formatter : function(value) { return getCodeName(v_entity_data, value); } }, {field : 'OFFICE_PHONE',title : '单位电话',width : 100,align : 'center'}, {field : 'ORDER_ID',title : '排序',width : 60,align : 'center'}, {field : 'USER_COUNT',title : '单位人数',width : 70,align : 'center'}, {field : 'CHILDREN_COUNT',title : '下级单位',width : 70,align : 'center'}, {field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'} ] ]; //列表加载完成回调 function dataOnLoadSuccess(){ //拖拽插件启用 $("#list").datagrid('enableDnd'); } //拖拽某行到指定位置后触发 function dataOnDrop(targetRow, sourceRow, point){ v_query = {}; v_query.FIELD_IS_ORDER = sourceRow.ORDER_ID+"_up_"+targetRow.ORDER_ID; console.log(v_query.FIELD_IS_ORDER); var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitSetOrder(v_query); $.messager.alert('提示', v_result.VALUE); reloadTree(); return v_result; } //设置颜色和每行高度 function rowstyler(index,row){ return 'height:30px;'; } //展示列表 datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/jwAppsUnitData_listMy",queryData,is_column,70,80); /****/ /** * 序号:4 * 功能:设置操作列浮动菜单 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //操用列显示更多(一般情况下无需更改) function formatMenu(value, data,index) { var returnData=""; return returnData + "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>" + "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>"; } //上浮横向菜单集里的具体菜单项(需更改) function getOptionMenu(data,index){ var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('" + index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">删除</a> | <span class=\"icon-ext-04_36\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"moveRow('" + index + "','true','2')\">定位</a> | <span class=\"icon-ext-11_20\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"moveRow('" + index + "','true','1')\">人员转移</a> | <span class=\"icon-ext-38_38\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"tbSet('" + index + "')\">推送绑定</a>"; return returnData; } //返回菜单集的菜单个数(需更改) function getOptionMenuCount(){ var is_menu_count = 5; return is_menu_count; } /****/ /** * 序号:5 * 功能:新增弹出 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载增加子页面 function addRow(){ var is_row={OPETYPE:'insert'}; openEditRow("jwAppsUnitView_unitDetail",is_row,"新增",true,0.95,0.95,0,0); } //加载增加子页面成功后的回调 function addUrlOnloadCallback(is_row){ $('#PARENT_ID').combotree('loadData', [v_unit_tree.rows[0]]); $('#AREA_TYPE').combobox({ data : v_area_data, valueField : 'CODE_ID', textField : 'CODE_NAME', editable:false, panelHeight:'auto' }); $('#TYPE').combobox({ data : v_gjdw_data.rowSet, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 200, editable:false }); $('#IS_ENTITY').combobox({ data : v_entity_data, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 'auto', editable:false }); $('#PARENT_ID').combotree('setValue', ls_node.UUID); $('#AREA_TYPE').combobox('setValue', '2'); $('#IS_ENTITY').combobox('setValue', '1'); $('#TYPE').combobox('setValue', '999'); var maxorder = jwAppUnitModel.jwAppsUnitDataAction.listMaxOrder(null).maxorder; if(maxorder == null || maxorder == ""){ maxorder = 0; }else{ maxorder = maxorder + 1; } $('#ORDER_ID').numberbox('setValue', maxorder); $('#OLD_ORDER_ID').val(maxorder); } //保存 function insertData(is_entity){ var is_old_order_id = is_entity.FIELD_OLD_ORDER_ID; var is_new_order_id = is_entity.FIELD_ORDER_ID; is_entity.FIELD_IS_ORDER = is_old_order_id+"_up_"+is_new_order_id; var v_result = jwAppUnitModel.jwAppsUnitActAction.insertUnit(is_entity); if(v_result.NAME == '-10'){ $.messager.confirm('提示', v_result.VALUE, function(r) { if (r) { is_entity.FIELD_FLAG = '1'; v_result = jwAppUnitModel.jwAppsUnitActAction.insertUnit(is_entity); reloadTree(); $.messager.alert('提示', v_result.VALUE); closeBox("detail"); } }); }else{ reloadTree(); return v_result; } } /****/ /** * 序号:6 * 功能:修改弹出 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //加载修改子页面 function editRow(index){ ls_row_index = index; var is_row = {}; $('#list').datagrid('selectRow',index); is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); is_row[0].OPETYPE = 'update'; openEditRow("jwAppsUnitView_unitDetail",is_row[0],"编辑",true,0.95,0.95,0,0); } //加载修改子页面成功后的回调 function updateUrlOnloadCallback(is_row){ $('#list').datagrid('clearSelections'); $('#PARENT_ID').combotree('loadData', [v_unit_tree.rows[0]]); $('#AREA_TYPE').combobox({ data : v_area_data, valueField : 'CODE_ID', textField : 'CODE_NAME', editable:false, panelHeight:'auto' }); $('#TYPE').combobox({ data : v_gjdw_data.rowSet, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 200, editable:false }); $('#IS_ENTITY').combobox({ data : v_entity_data, valueField : 'CODE_ID', textField : 'CODE_NAME', panelHeight : 'auto', editable:false }); } //保存 function updateData(is_entity){ var is_old_order_id = is_entity.FIELD_OLD_ORDER_ID; var is_new_order_id = is_entity.FIELD_ORDER_ID; is_entity.FIELD_IS_ORDER = is_old_order_id+"_up_"+is_new_order_id; v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnit(is_entity); reloadTree(); return v_result; } /****/ /** * 序号:7 * 功能:单个删除 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function deleteRow(index){ $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var code = is_row[0].UUID; if(is_row[0].UUID == 'A'){ $.messager.alert('提示',"无法删除!",'info'); return; }else if(is_row[0].CHILDREN_COUNT > 0){ $.messager.alert('提示',"存在下属单位,无法删除!",'info'); return; }else if(is_row[0].USER_COUNT > 0){ $.messager.alert('提示',"有人员尚未转移,无法删除!",'info'); return; } $.messager.confirm('提示', '确定删除?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteUnit(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /****/ /** * 序号:8 * 功能:批量删除 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function deleteBatchRow(){ var code=""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; if(is_row[i].UUID == 'A'){ $.messager.alert('提示',"无法删除!",'info'); return; }else if(is_row[i].CHILDREN_COUNT > 0){ $.messager.alert('提示',"存在下属单位,无法删除!",'info'); return; }else if(is_row[i].USER_COUNT > 0){ $.messager.alert('提示',"有人员尚未转移,无法删除!",'info'); return; } } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需删除的行!",'info'); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } $.messager.confirm('提示', '确定删除?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteUnit(v_query); //jwAppUnitModel.jwAppsUnitActAction.deleteLdapUnit(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //LDAP全量同步 function addLdap(){ $.messager.confirm('提示', '确定同步?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.insertOrUpdateLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //ldap整体清除 function deleteLdap(){ $.messager.confirm('提示', '确定清除?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.deleteLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } //ldap批量同步 function addRowLdap() { var code=""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需同步的行!",'info'); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } $.messager.confirm('提示', '确定同步?', function(r) { if (r) { var v_query = {}; v_query.FIELD_CODE = code; var v_result = jwAppUnitModel.jwAppsUnitActAction.addRowLdap(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /****/ /** * 序号:9 * 功能:刷新 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function refreshRow(){ reloadTree(); $("#unittab_searchForm")[0].reset(); } /****/ /** * 序号:10 * 功能:查询 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function searchRow(){ var v_query = $("#unittab_searchForm").getFormVal(); v_query.FIELD_UNIT_ID_IS_PARENT ='A'; $('#list').datagrid('load',v_query); } /****/ /** * 序号:11 * 功能:加载单位树列表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //setInitTree(节点显示字段,节点显示主题,节点字段UUID,父节点字段) var setting = setInitTree("NAME","NAME","UUID","PARENT_ID"); //加载树时的默认点击 function defautClick(zTree,treeNode){ if(ls_node == null){ ls_node = treeNode; zTree.selectNode(ls_node); }else{ zTree.selectNode(ls_node); modifyNode(ls_node); } } //点击左边节点,datagrid过滤 function modifyNode(treeNode){ ls_node = treeNode; queryData.FIELD_UNIT_ID_IS_PARENT =treeNode.UUID; queryData.FIELD_TREE_CLICK = 'Y'; $('#list').datagrid('reload',queryData); } //修改要移动的节点的parentid function updateParentId(node, targetNode){ var v_query = {}; v_query.FIELD_UUID = node.UUID; v_query.FIELD_NEW_PARENT = targetNode.UUID; jwAppUnitModel.jwAppsUnitActAction.updateParentId(v_query); } //loadTree(后台数据路径,显示的层ID) loadTreeImage("jwAppsUnitData_listMyAll","unittab_unit_tree","UUID","A"); function reloadTree(){ loadTreeImage("jwAppsUnitData_listMyAll","unittab_unit_tree","UUID","A"); } /****/ /** * 序号:12 * 功能:组织机构同步 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function tbSet(index){ $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var code = is_row[0].UUID; openViewRow("jwAppsUnitView_unitAur?uuid="+code+"&type=2",is_row[0],"数据同步到相关应用设定",true,0.65,0.95,0,0); } /****/ /** * 序号:13 * 功能:部门人员选取 * 参数:jwAppsUnitView_unitChoice?singleSelect=true&ope=1,批量移动人员到单选到的单位; * jwAppsUnitView_unitChoice?singleSelect=true&ope=2,单选单位后排序定位; * jwAppsUnitView_unitChoice?singleSelect=true&ope=3,单选单位后赋给一个提交域或变量; * jwAppsUnitView_unitChoice?singleSelect=false&ope=3,多选单位后赋给一个提交域或变量; * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function moveRow(index,singleSelect,ope){//列表上操作 ls_choice_ope = ope; var is_title = ""; if(ope=="2"){ is_title = "单位排序定位"; }else{ is_title = "新单位选择"; } $('#list').datagrid('selectRow',index); var is_row = $('#list').datagrid('getSelections'); $('#list').datagrid('clearSelections'); var modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope; if(ope=="2"){ var order_id = is_row[0].ORDER_ID; modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope+"&order_id="+order_id; } openViewIframRow("unitTabChoice",modifyUrl,is_row[0],is_title,true,0.95,0.95,0,0); } function choiceUnit(uuid,singleSelect,ope){//编辑框上操作 if(uuid==""){ uuid="add"; } var v_query={}; v_query.FIELD_UUID = uuid; var row = jwAppUnitModel.jwAppsUnitDataAction.listAll(v_query); var is_row = null; if(row.total>0){ is_row = row.rowSet; }else{ is_row = [{ORDER_ID:uuid}]; } ls_choice_ope = ope; var is_title = ""; if(ope=="2"){ is_title = "单位排序定位"; }else{ is_title = "新单位选择"; } var modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope; if(ope=="2"){ var order_id = is_row[0].ORDER_ID; modifyUrl = gaowj.WEB_APP_NAME+"/jwAppsUnitView_unitChoice?singleSelect="+singleSelect+"&ope="+ope+"&order_id="+order_id; } openViewIframRow("unitTabChoice",modifyUrl,is_row[0],is_title,true,0.95,0.95,0,0); } function closeCallback(is_entity){ var ret_uuids = $('#return_text').text(); var code = is_entity.UUID; var is_order = ""; if(ret_uuids.indexOf('||')>-1){ is_order = ret_uuids.substring(ret_uuids.indexOf('||')+2); ret_uuids = ret_uuids.substring(0,ret_uuids.indexOf('||')); } if(ls_choice_ope=="1"){ if(ret_uuids.length>0){ var v_entity = {}; v_entity.FIELD_OLD_UNIT_ID = code; v_entity.FIELD_NEW_UNIT_ID = ret_uuids; jwAppUserModel.jwAppsUserActAction.BatchMoveInUser(v_entity); reloadTree(); } }else if(ls_choice_ope=="2"){ if(is_order!=""){ if(is_order.indexOf("add")>-1){ var is_o = is_order.substring(is_order.lastIndexOf("_")+1); $('#ORDER_ID').numberbox('setValue', is_o); }else{ var v_query = {}; v_query.FIELD_IS_ORDER = is_order; var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitSetOrder(v_query); $("#ORDER_ID").numberbox("setValue",v_result.RETURNUUID);//编辑打开时用到 $("#OLD_ORDER_ID").val(v_result.RETURNUUID);//编辑打开时用到 $.messager.alert('提示',v_result.VALUE); reloadTree(); } } }else if(ls_choice_ope=="3"){ $("#PARENT_ID").combotree("setValue",ret_uuids); } } /****/ /** * 序号:14 * 功能:初始化所有单位排序号 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function updateUnitInitOrderRow(){ $.messager.confirm('提示', '确定初始化所有排序号?', function(r) { if (r) { var v_query = {}; var v_result = jwAppUnitModel.jwAppsUnitActAction.updateUnitInitOrder(v_query); $.messager.alert('提示',v_result.VALUE); reloadTree(); } }); } /** * 序号:17 * 功能:人员批量推送 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function unitPush(){ var code = ""; var is_row = $('#list').datagrid('getSelections'); for(var i=0; i<is_row.length; i++){ code = code + is_row[i].UUID+","; } if(is_row == null || is_row == ""){ $.messager.alert('提示',"请选择需推送的行!"); return; } if(code.length>0){ code = code.substring(0,code.length - 1); } var is_row_code = {}; is_row_code.CODE=code; openEditPush("jwAppsUnitView_push",is_row_code,"数据推送",true,0.65,0.65,160,0); } //加载修改子页面成功后的回调 function pushUrlOnloadCallback(is_row){ $('#notrlist').datagrid({ // title:"应用选择列表", iconCls:$.getJwWindowPic(), url:'jwAppsPushDataData_listPushAppAll', queryParams : {FIELD_EMDEPART:"A",FIELD_ISPUSH:"1"},//查询参数 rownumbers : true,//显示索引号 singleSelect : false,//是否多选 fitColumns : false,//是否撑满 autoRowHeight : 30,//设定高度 // pagination : true,//分页显示 // pageSize : rows,//显示行数 // pageList : listPageSize,//条数选择 striped : true, //是否隔行显示 remoteSort : false,//是否从服务器排序 frozenColumns : [[ { field : 'ck', checkbox : true } ]], columns : [[ {field:'CODE',title:'编号',hidden:'true'}, {field:'EMNAME',title:'选择应用',width:450,align:'center'} ]] }); } function addToPush(is_entity){ var v_query = {}; var row = $("#notrlist").datagrid('getSelections'); if(row == null || row == ""){ $.messager.alert('提示',"请选择需同步数据的应用!"); return; } var code=""; for(var i=0; i<row.length; i++){ code = code + row[i].CODE+","; } if(code.length>0){ code = code.substring(0,code.length - 1); } v_query.FIELD_CODE = is_entity.CODE; v_query.FIELD_CLIENT_CODE = code; var ret = jwAppUnitModel.jwAppsUnitActAction.pushUnitO(v_query); return ret; } /** * 序号:18 * 功能:下载组织模板 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function downloadjw(uuid){ var uploadnew = 'Unit.xls'; var uploadpath = '/uploadFile/apps/Unit'; var uploadold = '组织导入模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_download'); } /** * 序号:18 * 功能:下载组织名称对照表 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ function downloadjwid(uuid){ var uploadnew = 'UnitId.xls'; var uploadpath = '/uploadFile/apps/UnitId'; var uploadold = '组织对照模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_downloadDz'); } /** * 序号:10 * 功能:上传 * 参数:填写限制上传类型,上传地址 * 说明:openUpload_image(uuid),打开图片上传; * openUpload_doc(uuid),打开常用公文上传; * openUpload_imagedoc(uuid),打开常图片+用公文上传; * 如有特殊限制时用以下这段: * var up_type = "gif,jpg,jpeg,bmp,png";//限制上传类型 * var up_act = "reportact_upload";//上传地址 * openUpload_page1(up_type,up_act,uuid); * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **/ //打开上传页面 function uploadjw(uuid){ if(uuid == '' || uuid == null || uuid == 'undefined'){ $.messager.alert('提示',"主记录关键字不能为空!",'info'); return; } openUpload_doc(uuid); } //上传成功后的回调,主要返回三个参数: //fname上传时的真实文件名如:文件.txt, //fpath上传后的真实文件名如:c:\temp\145597044184082388.txt //uuid主要用于记录跟文件绑定用 function uploadCallback(fname,fpath,uuid){ // var fileOld = fname; // var filePath = fpath.substring(0,fpath.lastIndexOf("/")+1); // var filenew = fpath.substring(fpath.lastIndexOf("/")+1); // $("#UPLOADNEW").textbox('setValue',filenew); // $("#UPLOADPATH").val(filePath); // $("#UPLOADOLD").val(fileOld); // $.messager.alert('提示',"上传成功,请及时保存!",'info'); var v_img_entity={'FILED_FILE_NAME':fname,'FILED_FILE_PATH':fpath}; var v_result = jwAppUnitModel.jwAppsUnitActAction.ImpUnit(v_img_entity); $.messager.alert('提示',v_result.VALUE); $('#list').datagrid('reload'); // $.sendPost ('jwAppsMappingAct_ImpUser', v_img_entity, function(v_result){ // $.messager.progress('close'); // $.messager.alert('提示',v_result.VALUE); // $('#list').datagrid('reload'); // }, function(data){ // alert("失败"); // }, "json"); } //字典库下载 function downloadzd(uuid){ var uploadnew = 'dzzd.xls'; var uploadpath = '/uploadFile/apps/compare'; var uploadold = '部门人员字典库模板.xls'; if(uploadpath == null || uploadpath == ""){ $.messager.alert('提示',"没有文件可以下载!",'info'); return; } fileDownloadURL(uploadnew,uploadpath,uploadold,uuid,'jwAppsUnitAct_download'); } /** * 序号:12 * 功能:更新缓存 * 参数: * 说明: * 作者:高伟杰 * 时间:2016-01-22 * 单位:宁波金网 * 备注:需更改 **//* function updateCacheRow(){ var v_query = {}; queryData.FIELD_tableName = 'UUID'; v_query.FIELD_CODE = queryData.FIELD_tableName; var v_result = standardModel.actAction.updateCacheTable(v_query); $.messager.alert('提示',v_result.VALUE); $('#list').datagrid('reload'); }*/
\ No newline at end of file
\ No newline at end of file
...
...
WebContent/jwapp/pages/unit/unitDetail.jsp
View file @
53b0e594
...
@@ -19,6 +19,20 @@
...
@@ -19,6 +19,20 @@
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td style="width: 10%" class="tableStyleLable">
<span>英文名称:</span>
</td>
<td style="width: 40%">
<input class="easyui-textbox" id="NAME_EN" name="FIELD_NAME_EN" data-options="required:true" style="width:98%" value="${is_row.NAME_EN}"/>
</td>
<td style="width: 10%" class="tableStyleLable">
<span>英文简称:</span>
</td>
<td style="width: 40%">
<input class="easyui-textbox" id="NAME_ABBR" name="FIELD_NAME_ABBR" data-options="required:true" style="width:98%" value="${is_row.NAME_ABBR}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<td class="tableStyleLable">
<span>上级单位:</span>
<span>上级单位:</span>
</td>
</td>
...
...
WebContent/uploadFile/apps/compare/
对照字典
.xls
→
WebContent/uploadFile/apps/compare/
dzzd
.xls
View file @
53b0e594
File moved
src_jwapp/com/jw/app/pushData/util/PushDataUtils.java
View file @
53b0e594
...
@@ -85,6 +85,7 @@ public class PushDataUtils {
...
@@ -85,6 +85,7 @@ public class PushDataUtils {
dataMap
.
put
(
"DELETE_FLAG"
,
data
.
get
(
"DELETE_FLAG"
));
dataMap
.
put
(
"DELETE_FLAG"
,
data
.
get
(
"DELETE_FLAG"
));
dataMap
.
put
(
"PARENT_UNITID"
,
data
.
get
(
"PARENT_UNITID"
));
dataMap
.
put
(
"PARENT_UNITID"
,
data
.
get
(
"PARENT_UNITID"
));
dataMap
.
put
(
"UNIT_PATH"
,
data
.
get
(
"UNIT_PATH"
));
dataMap
.
put
(
"UNIT_PATH"
,
data
.
get
(
"UNIT_PATH"
));
dataMap
.
put
(
"NAME_EN"
,
data
.
get
(
"NAME_EN"
));
dataMap
.
put
(
"NAME_ABBR"
,
data
.
get
(
"NAME_ABBR"
));
// List<Map<String,Object>> listData = new ArrayList<Map<String,Object>>();
// List<Map<String,Object>> listData = new ArrayList<Map<String,Object>>();
// listData.add(dataMap);
// listData.add(dataMap);
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
...
src_jwapp/com/jw/app/unit/action/actAction.java
View file @
53b0e594
...
@@ -832,6 +832,7 @@ public class actAction extends BasicAction {
...
@@ -832,6 +832,7 @@ public class actAction extends BasicAction {
th.start();*/
th.start();*/
PushDataUtils
pd
=
new
PushDataUtils
();
PushDataUtils
pd
=
new
PushDataUtils
();
String
jsondata
=
pd
.
getPushUnitData
(
data
);
String
jsondata
=
pd
.
getPushUnitData
(
data
);
System
.
out
.
println
(
"-------data"
+
jsondata
);
//推送加密字段判断
//推送加密字段判断
if
(
url
.
get
(
"PUSH_ENCRYPT"
)
==
null
||
url
.
get
(
"PUSH_ENCRYPT"
).
toString
().
equals
(
"0"
)){
if
(
url
.
get
(
"PUSH_ENCRYPT"
)
==
null
||
url
.
get
(
"PUSH_ENCRYPT"
).
toString
().
equals
(
"0"
)){
//不加密
//不加密
...
@@ -857,12 +858,18 @@ public class actAction extends BasicAction {
...
@@ -857,12 +858,18 @@ public class actAction extends BasicAction {
(
String
)
url
.
get
(
"PUSH_PASS"
),
jsondata
,
(
String
)
url
.
get
(
"PUSH_PASS"
),
jsondata
,
(
String
)
url
.
get
(
"PUSH_UNIT_URL"
),
(
String
)
url
.
get
(
"PUSH_UNIT_URL"
),
(
String
)
url
.
get
(
"PUSH_ENCODE"
));
(
String
)
url
.
get
(
"PUSH_ENCODE"
));
System
.
out
.
println
(
"输出: 推送的url:"
+
url
.
get
(
"PUSH_URL"
));
System
.
out
.
println
(
"输出: 推送的url:"
+
url
.
get
(
"PUSH_U
NIT_U
RL"
));
Map
<
String
,
Object
>
m
=
null
;
Map
<
String
,
Object
>
m
=
null
;
int
is_name
=
0
;
if
(
ret
!=
null
&&
ret
.
trim
().
length
()
>
0
)
{
if
(
ret
!=
null
&&
ret
.
trim
().
length
()
>
0
)
{
m
=
jsonFormatMap
.
getMap
(
ret
);
m
=
jsonFormatMap
.
getMap
(
ret
);
if
(
m
.
get
(
"NAME"
)
instanceof
Integer
){
is_name
=
(
Integer
)
m
.
get
(
"NAME"
);
}
else
{
is_name
=
Integer
.
valueOf
((
String
)
m
.
get
(
"NAME"
));
}
}
if
(
m
!=
null
&&
m
.
get
(
"NAME"
)
!=
null
&&
Integer
.
parseInt
((
String
)
m
.
get
(
"NAME"
))
>
0
)
{
}
if
(
m
!=
null
&&
m
.
get
(
"NAME"
)
!=
null
&&
is_name
>
0
)
{
System
.
out
.
println
(
"用户["
+
url
.
get
(
"EMNAME"
)
+
"]推送成功!"
);
System
.
out
.
println
(
"用户["
+
url
.
get
(
"EMNAME"
)
+
"]推送成功!"
);
// 将成功记录插入表
// 将成功记录插入表
Map
<
String
,
Object
>
pushData
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
pushData
=
new
HashMap
<
String
,
Object
>();
...
@@ -1327,13 +1334,6 @@ public class actAction extends BasicAction {
...
@@ -1327,13 +1334,6 @@ public class actAction extends BasicAction {
String
uploadold
=
request
.
getParameter
(
"uploadold"
);
String
uploadold
=
request
.
getParameter
(
"uploadold"
);
if
(
new
File
(
uploadpath
+
File
.
separator
+
uploadnew
).
exists
()==
false
){
if
(
new
File
(
uploadpath
+
File
.
separator
+
uploadnew
).
exists
()==
false
){
uploadpath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
uploadpath
);
uploadpath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
uploadpath
);
try
{
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold
=
new
String
((
uploadold
).
getBytes
(
"gbk"
),
"iso8859-1"
);
}
catch
(
UnsupportedEncodingException
e1
)
{
// TODO Auto-generated catch block
e1
.
printStackTrace
();
}
//查对照数据
//查对照数据
UnitBusiness
business
=
BusinessManager
.
getBusiness
(
UnitBusiness
.
class
);
UnitBusiness
business
=
BusinessManager
.
getBusiness
(
UnitBusiness
.
class
);
List
<
Map
<
String
,
Object
>>
list
=
business
.
list_unit_ldap_deletekey
();
List
<
Map
<
String
,
Object
>>
list
=
business
.
list_unit_ldap_deletekey
();
...
@@ -1393,6 +1393,7 @@ public class actAction extends BasicAction {
...
@@ -1393,6 +1393,7 @@ public class actAction extends BasicAction {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
//设置response
//设置response
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment; filename=\""
+
uploadold
+
"\""
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment; filename=\""
+
uploadold
+
"\""
);
...
...
src_jwapp/com/jw/app/user/action/actAction.java
View file @
53b0e594
...
@@ -1303,10 +1303,16 @@ public class actAction extends BasicAction {
...
@@ -1303,10 +1303,16 @@ public class actAction extends BasicAction {
(
String
)
url
.
get
(
"PUSH_ENCODE"
));
(
String
)
url
.
get
(
"PUSH_ENCODE"
));
System
.
out
.
println
(
"输出: 推送的url:"
+
url
.
get
(
"PUSH_URL"
));
System
.
out
.
println
(
"输出: 推送的url:"
+
url
.
get
(
"PUSH_URL"
));
Map
<
String
,
Object
>
m
=
null
;
Map
<
String
,
Object
>
m
=
null
;
int
is_name
=
0
;
if
(
ret
!=
null
&&
ret
.
trim
().
length
()
>
0
)
{
if
(
ret
!=
null
&&
ret
.
trim
().
length
()
>
0
)
{
m
=
jsonFormatMap
.
getMap
(
ret
);
m
=
jsonFormatMap
.
getMap
(
ret
);
if
(
m
.
get
(
"NAME"
)
instanceof
Integer
){
is_name
=
(
Integer
)
m
.
get
(
"NAME"
);
}
else
{
is_name
=
Integer
.
valueOf
((
String
)
m
.
get
(
"NAME"
));
}
}
}
if
(
m
!=
null
&&
m
.
get
(
"NAME"
)
!=
null
&&
Integer
.
parseInt
((
String
)
m
.
get
(
"NAME"
))
>
0
)
{
if
(
m
!=
null
&&
m
.
get
(
"NAME"
)
!=
null
&&
is_name
>
0
)
{
System
.
out
.
println
(
"用户["
+
url
.
get
(
"EMNAME"
)
+
"]推送成功!"
);
System
.
out
.
println
(
"用户["
+
url
.
get
(
"EMNAME"
)
+
"]推送成功!"
);
// 将成功记录插入表
// 将成功记录插入表
Map
<
String
,
Object
>
pushData
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
pushData
=
new
HashMap
<
String
,
Object
>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment