Index: ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js =================================================================== diff -u -r27770 -r27830 --- ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js (.../orgUnitExtView.js) (revision 27770) +++ ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js (.../orgUnitExtView.js) (revision 27830) @@ -42,7 +42,9 @@ var jsonObj = Ext.decode(response.responseText); if(jsonObj!=null && jsonObj.length!=0){ if(jsonObj.success){ - alert(isDisabled + '成功!'); + alert(isDisabled + '成功!'); + $Id("parm_s_status").value = 1; + root.reload(); grid.dwrReload(); }else{ alert(isDisabled + '失败!'); @@ -101,12 +103,10 @@ return; }else { var loop = setInterval(function() { - console.log(destinationOrgUnitKeyIdArray.hidden) if(destinationOrgUnitKeyIdArray.hidden) { clearInterval(loop); var returnValue = destinationOrgUnitKeyIdArray.returnValue || []; - console.log(returnValue) if(returnValue.length > 0){ var destinationOrgUnitKeyId = returnValue[0]; if(sourceOrgUnitKeyId==destinationOrgUnitKeyId){ @@ -259,15 +259,17 @@ var treePanel = viewport.findById('west-panel'); treePanel.expandPath(path); - //树没有打开所有之前打开的节点,只打开了最近的一个。 + //树没有打开所有之前打开的节点,只打开了最近的一个。 + $Id("parm_s_status").value = 1; grid.dwrReload(); } function reloadGrid(parentId){ if(typeof(parentId) == "undefined" || typeof(parentId) == "object" || null == parentId || parentId == "" ){ parentId = 0; } - $Id("parm_s_parentId").value = parentId; + $Id("parm_s_parentId").value = parentId; + $Id("parm_s_status").value = 1; grid.dwrReload(); } @@ -278,19 +280,23 @@ var path = '/0'; //组织机构Store var orgJsonStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/systemmanage/getOrgNameBySpellingAndWB!getOrgNameBySpellingAndWB.do', - method : 'POST' - }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'name',mapping : 'name'} - ] - ) + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/systemmanage/getOrgNameBySpellingAndWB!getOrgNameBySpellingAndWB.do', + method : 'POST' + }), + baseParams :{ + showDisableOrgUnit : false + }, + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'name',mapping : 'name'} + ] + ) }); Ext.onReady(function(){ Ext.QuickTips.init(); + $Id("parm_s_status").value = 1; //********* 1、Tree *********** root = new Ext.tree.AsyncTreeNode({ @@ -300,12 +306,12 @@ listeners :{click: reloadGrid} }); - var myLoader = new Ext.tree.TreeLoader({dataUrl:WWWROOT + '/systemmanage/orgUnitTreeLoad.do'}); + var myLoader = new Ext.tree.TreeLoader({dataUrl:WWWROOT + '/systemmanage/orgUnitTreeLoad.do?showDisableOrgUnit=false'}); myLoader.on("beforeload", function(treeLoader, node){ - treeLoader.baseParams.parentId = node.id; + treeLoader.baseParams.parentId = node.id; treeLoader.baseParams.showDisableOrgUnit = true; - var nodePath = node.getPath(); + var nodePath = node.getPath(); if(nodePath != '/0'){ path = nodePath; } @@ -320,17 +326,9 @@ return "" + v + ""; } - function disableOrEnable(v, p, record) { - if (record.data.status === 0) { - return ""; - } else { - return ""; - } - } - function moveUpDown(v, p, record){ var html = ''; - html += '向上移动     '; + html += '向上移动'; html += ''; html += '向下移动'; return html; @@ -346,8 +344,7 @@ {header: "五笔码", width: 120, dataIndex: 'wbCode', sortable: false, menuDisabled: true}, {header: "数据来源", width: 100, dataIndex: 'source', sortable: false, menuDisabled: true}, //(陈家儒改) {header: "一次性物品价格浮动系数", width: 150, dataIndex: 'disposablePriceFluctuation', sortable: false, menuDisabled: true}, - {id : 'order',header: "排序操作", width: 150, dataIndex: 'id', renderer : moveUpDown, sortable: false, menuDisabled: true}, - {header: "是否已停用", width: 150, dataIndex: 'status', sortable: false, menuDisabled: true, renderer : disableOrEnable} + {id : 'order',header: "排序操作", width: 150, dataIndex: 'id', renderer : moveUpDown, sortable: false, menuDisabled: true} ]; @@ -362,8 +359,7 @@ {name: 'wbCode'}, {name: 'source'}, {name: 'disposablePriceFluctuation'}, - {name: 'subLeadName'}, - {name: 'status'} + {name: 'subLeadName'} ]; var filters = new Ext.grid.GridFilters({ @@ -438,28 +434,14 @@ MsgTip.msg('提示','未选择打印的内容!',true,3); } } - }, '-', { - text : '启用', - hidden : sstsConfig.SSTS_QualityMonitoring_Config, - iconCls : 'btn_ext_application_add', - handler : function() { - disableOrEnableDefinition("启用",grid); - } - }, '-', { + }, '-', { text : '停用', hidden : sstsConfig.SSTS_QualityMonitoring_Config, iconCls : 'btn_ext_application_add', handler : function() { disableOrEnableDefinition("停用",grid); } - }/*, '-', { - text:'删除没用的科室', - iconCls:'btn_remove', - hidden :false, - handler:function (){ - OrgUnitTableManager.deleteUnApplicationDepart(); - } - }*/]; + }]; var dwrCallParams = null; @@ -481,10 +463,11 @@ }, readerDetail, OrgUnitTableManager.findOrgUnitTableList, - dwrCallParams //这个参数只是占位作用 + dwrCallParams //这个参数只是占位作用 ); - var store = grid.getStore(); + var store = grid.getStore(); + store.on("beforeload", function(thiz, options) { Ext.getBody().mask("正在加载中,请稍候..."); });