Index: ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.js =================================================================== diff -u -r40393 -r40428 --- ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.js (.../reviewView.js) (revision 40393) +++ ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.js (.../reviewView.js) (revision 40428) @@ -1719,7 +1719,7 @@ */ var departmentGroupOptionStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!loadDepartmentGroupOptiopnDataByType.do?type='+encodeURI(departmentGroupOption_REVIEWE), + url : WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!loadDepartmentGroupOptiopnDataByType.do?type='+encodeURI(departmentGroupOption_REVIEWE)+'&handlerDepartCode='+currentOrgUnitCoding, method : 'POST' }), reader : new Ext.data.JsonReader({ Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionForm.js =================================================================== diff -u -r30145 -r40428 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionForm.js (.../departmentgroupOptionForm.js) (revision 30145) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionForm.js (.../departmentgroupOptionForm.js) (revision 40428) @@ -5,198 +5,255 @@ configWin.close(); } -function editConfig(id){ +function editConfig(id) { showWindow(id); - if(!Ext4.isEmpty(id)){ + if (!Ext4.isEmpty(id)) { var mask = new Ext4.LoadMask({ - msg : '正在加载,请稍候...', - target : formPanel + msg: '正在加载,请稍候...', + target: formPanel }); mask.show(); - + Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!loadConfigData.do', - params : {id : id}, - success : function(response,options){ + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!loadConfigData.do', + params: { id: id }, + success: function (response, options) { mask.hide(); var result = Ext4.JSON.decode(response.responseText); - if(result.success && result.data){ - top.Ext4.ComponentQuery.query("#configForm #id")[0].setValue(result.data.id); - top.Ext4.ComponentQuery.query("#configForm #name")[0].setValue(result.data.name); - top.Ext4.ComponentQuery.query("#configForm #departCodes")[0].setValue(result.data.departCodes); - top.Ext4.ComponentQuery.query("#configForm #departNames")[0].setValue(result.data.departNames); - }else{ + if (result.success && result.data) { + top.Ext4.getCmp('id').setValue(result.data.id); + top.Ext4.getCmp('name').setValue(result.data.name); + top.Ext4.getCmp('departCodes').setValue(result.data.departCodes); + top.Ext4.getCmp('departNames').setValue(result.data.departNames); + if (reviewDepartmentGroup) { + top.Ext4.getCmp('handlerDepartCode').setValue(result.data.handlerDepartCode); + top.Ext4.getCmp('handlerDepartId').setValue(result.data.handlerDepartId); + top.Ext4.getCmp('handlerDepartName').setValue(result.data.handlerDepartName); + } + } else { showResult('系统加载出错,请稍候再试'); } }, - failure : function(response, options) { + failure: function (response, options) { mask.hide(); showResult('系统加载出错,请稍候再试'); } }); } } -function deleteConfig(grid){ +function deleteConfig(grid) { var selectedRecords = grid.getSelectionModel().getSelections(); var selectedCount = grid.getSelectionModel().getCount(); var ids = ""; - if(selectedCount < 1){ + if (selectedCount < 1) { showResult("请选择要删除的行"); - }else{ - for ( var i = 0, len = selectedRecords.length; i < len; i++) { + } else { + for (var i = 0, len = selectedRecords.length; i < len; i++) { if (ids == "") { ids = selectedRecords[i].data['id']; } else { ids = ids + ';' + selectedRecords[i].data['id']; } } - Ext4.MessageBox.confirm("请确认","确定要删除选中的信息吗?", - function(button, text) { - if ("yes" == button){ - Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!deleteDepartmentGroupOptiopn.do', - params : {ids : ids}, - success : function(response, options) { - var result = Ext4.JSON.decode(response.responseText); - var success = result.success; - if (true != success) { - showResult("删除失败"); - return; - } else { - showResult('删除成功!'); - grid.dwrReload(); - } - }, - failure : function(response, options) { - showResult("删除失败"); - } - }); + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!deleteDepartmentGroupOptiopn.do', + params: { ids: ids }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult("删除失败"); + return; + } else { + showResult('删除成功!'); + grid.dwrReload(); + } + }, + failure: function (response, options) { + showResult("删除失败"); } }); + } + }); } } -function saveConfig(){ +function saveConfig() { formPanel.form.submit({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!saveDepartmentGroupOption.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - timeout : 600000, - waitTitle : '提交表单', - success : function(form, action) { + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupOptionAction!saveDepartmentGroupOption.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + timeout: 600000, + waitTitle: '提交表单', + success: function (form, action) { configWin.close(); showResult('保存成功'); grid.dwrReload(); }, - failure : function(form, action) { + failure: function (form, action) { showResult('failure = ' + action.failureType); } }); } -function showWindow(id){ - - formPanel = new top.Ext4.form.Panel({ - id : 'configForm', - frame : true, - labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 5px;', - width : 800, +function showWindow(id) { + var departInfoStore = new top.Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSupplyRoomOrgUnitList.do', + reader: { + type: 'json', + root: 'data' + } + }, + fields: ["orgUnitCoding", "orgUnitName", "id"] + }); + + formPanel = new top.Ext4.form.Panel({ + id: 'configForm', + frame: true, + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px;', + width: 800, + buttonAlign: 'center', fieldDefaults: { - labelAlign: 'left', - labelWidth: 200 - }, - items : [{ - xtype : 'hidden', - id:'departCodes', - name:'departCodes' - },{ - xtype : 'hidden', - id:'id', - name:'id' - },{ - xtype : 'hidden', - id:'type', - name:'type', + labelAlign: 'right', + labelWidth: 80 + }, + items: [{ + xtype: 'hidden', + id: 'departCodes', + name: 'departCodes' + }, { + xtype: 'hidden', + id: 'id', + name: 'id' + }, { + xtype: 'hidden', + id: 'type', + name: 'type', value: departmentGroupType - },{ - xtype:"fieldset", - title :'基础信息', - height:500, - items:[{ - layout : 'column', - labelWidth : 170, - items : [{ - columnWidth : .8, - layout : 'form', - items : [{ - xtype : 'textfield', - fieldLabel : '名称', - id : 'name', - name : 'name', - allowBlank : false, - anchor : '98%' - },{ - xtype : 'textarea', - fieldLabel : '科室', - id : 'departNames', - name : 'departNames', - height : 230, - allowBlank : false, - readOnly:true, - anchor : '98%' + }, { + xtype: "fieldset", + title: '基础信息', + height: 320, + items: [{ + layout: 'column', + border: 0, + items: [{ + columnWidth: .8, + layout: 'form', + border: 0, + items: [{ + xtype: 'textfield', + fieldLabel: '名称', + id: 'name', + name: 'name', + allowBlank: false, + anchor: '95%' }] - },{ - columnWidth : .2, - layout : 'form', - items : [{ - xtype : 'button', - text : '选择科室', - listeners:{ - click : function(){ + }, { + columnWidth: .2, + layout: 'form', + border: 0, + style: 'margin-left:10px', + items: [{ + xtype: 'button', + text: '选择科室', + listeners: { + click: function () { var departName = top.Ext4.getCmp('departNames').getValue(); var codes = top.Ext4.getCmp("departCodes").getValue();; - openSelectReceiverOrganization(departName,codes); - } + openSelectReceiverOrganization(departName, codes); + } } }] + }, { + columnWidth: .8, + layout: 'form', + border: 0, + hidden:!reviewDepartmentGroup, + items: [{ + xtype: 'hidden', + id: 'handlerDepartId', + name: 'handlerDepartId' + }, { + xtype: 'hidden', + id: 'handlerDepartCode', + name: 'handlerDepartCode' + }, { + xtype: 'combo', + fieldLabel: '处理科室', + id: 'handlerDepartName', + name: 'handlerDepartName', + width: 120, + valueField: 'orgUnitName', + displayField: 'orgUnitName', + store: departInfoStore, + forceSelection: true, + editable: false, + triggerAction: 'all', + allowBlank: true, + anchor: '95%', + listeners: { + select: function (combo, record, index) { + top.Ext4.getCmp('handlerDepartCode').setValue(record[0].data.orgUnitCoding); + top.Ext4.getCmp('handlerDepartId').setValue(record[0].data.id); + } + } + }] + }, { + columnWidth: .8, + layout: 'form', + border: 0, + items: [{ + xtype: 'textarea', + fieldLabel: '科室', + id: 'departNames', + name: 'departNames', + height: 230, + allowBlank: false, + readOnly: true, + anchor: '95%' + }] }] }] - }] - , - buttons : [{ - id : 'saveBtn', - text : '保存', - hidden:false, - handler : function(){ - if(formPanel.getForm().isValid()){ + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + hidden: false, + handler: function () { + if (formPanel.getForm().isValid()) { saveConfig(); - }else{ + } else { showResult('请填写表单!'); return false; } } }, { - text : '取消', - id : 'saveAndNewBtn', - handler : cancel + text: '取消', + id: 'saveAndNewBtn', + handler: cancel }] }); - configWin = new top.Ext4.window.Window({ - id : 'satisfactionSurveyApplicationWin', - layout : 'border', - title : departmentGroupType2+"设置", - width : 800, - height : 500, - border : false, - plain : true, - modal :true, - items : [{ - region:'center', - width : 400, - layout :'fit', - items:[formPanel] - }] + configWin = new top.Ext4.window.Window({ + id: 'satisfactionSurveyApplicationWin', + layout: 'border', + title: departmentGroupType2 + "设置", + width: 800, + height: 400, + border: false, + plain: true, + modal: true, + items: [{ + region: 'center', + width: 400, + layout: 'fit', + items: [formPanel] + }] }); configWin.show(); } Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionView.js =================================================================== diff -u -r28064 -r40428 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionView.js (.../departmentgroupOptionView.js) (revision 28064) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionView.js (.../departmentgroupOptionView.js) (revision 40428) @@ -1,72 +1,80 @@ var grid; -function modify(v,data){ +//FSEYEQ-17:数据隔离 +var reviewDepartmentGroup = false; +if (sstsConfig.supplyRoomDataIsolationModule && sstsConfig.supplyRoomDataIsolationModule.indexOf('reviewDepartmentGroup') >= 0) { + reviewDepartmentGroup = true; +} + +function modify(v, data) { editConfig(data.id); } -Ext.onReady(function() { +Ext.onReady(function () { Ext.QuickTips.init(); - + var columns = [ - {header : "id",dataIndex : 'id',hidden :true}, - {header : "名称",dataIndex : 'name',width : 150, renderer : modifyRecord}, - {id : 'departNames',header : "科室名称",sortable: false, dataIndex : 'departNames',sortable:false} - ]; - + { header: "id", dataIndex: 'id', hidden: true }, + { header: "名称", dataIndex: 'name', width: 150, renderer: modifyRecord }, + { header: "处理科室", dataIndex: 'handlerDepartName', sortable: false, hidden: !reviewDepartmentGroup }, + { id: 'departNames', header: "科室名称", dataIndex: 'departNames', sortable: false } + ]; + var filters = new Ext.grid.GridFilters({ - filters : [ - {type:'string',dataIndex:'name'} + filters: [ + { type: 'string', dataIndex: 'name' } ] }); var readerDetail = [ - {name : 'id'}, - {name : 'name'}, - {name : 'departNames'}, - {name : 'departCodes'} + { name: 'id' }, + { name: 'name' }, + { name: 'handlerDepartName' }, + { name: 'departNames' }, + { name: 'departCodes' } ]; - + var tbar = [{ - text : '添加', - hidden : SSTS_printApplication_manager, - iconCls : 'btn_ext_application_add', - handler : function() { + text: '添加', + hidden: SSTS_printApplication_manager, + iconCls: 'btn_ext_application_add', + handler: function () { showWindow(); } }, '-', { - text : '删除', - hidden : SSTS_printApplication_manager, - iconCls : 'btn_ext_application_del', - handler : function() { + text: '删除', + hidden: SSTS_printApplication_manager, + iconCls: 'btn_ext_application_del', + handler: function () { deleteConfig(grid); } }]; var dwrCallParams = null; - Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() {}; - grid = new Ext.ux.ForgonPageGrid( { - tbar : tbar, - pageSize : 20, - defaultSortField : 'name', - defaultSortDirection : 'ASC', - title : departmentGroupType2 + "设置", - isCheckboxSelectionModel : true, - rememberSelected : false, - isShowSearchField : true, - columns : columns, - plugins : filters, - autoExpandColumn : 'departNames', - renderTo : 'gridDiv', - frame : false + Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () { }; + grid = new Ext.ux.ForgonPageGrid({ + tbar: tbar, + pageSize: 20, + defaultSortField: 'name', + defaultSortDirection: 'ASC', + title: departmentGroupType2 + "设置", + isCheckboxSelectionModel: true, + rememberSelected: false, + isShowSearchField: true, + columns: columns, + plugins: filters, + autoExpandColumn: 'departNames', + renderTo: 'gridDiv', + frame: false }, readerDetail, - DepartmentGroupOptionTableManager.findGroupOptionTableList, + DepartmentGroupOptionTableManager.findGroupOptionTableList, dwrCallParams // 这个参数只是占位作用 ); var viewport = new Ext.Viewport({ - layout : 'border', - items : [{ - region : 'center', - margins : '0 0 0 0', - layout : 'fit', - items : grid + layout: 'border', + items: [{ + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: grid }] }); }); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.jsp =================================================================== diff -u -r40393 -r40428 --- ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.jsp (.../reviewView.jsp) (revision 40393) +++ ssts-web/src/main/webapp/disinfectsystem/packing/reviewView.jsp (.../reviewView.jsp) (revision 40428) @@ -66,6 +66,7 @@ +