Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.js =================================================================== diff -u -r25215 -r35611 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.js (.../departmentgroupView.js) (revision 25215) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.js (.../departmentgroupView.js) (revision 35611) @@ -6,12 +6,19 @@ Ext.onReady(function() { Ext.QuickTips.init(); + + var showColumn = false; + if (sstsConfig.enableNotifiOfPrepareRecycleFunction && sstsConfig.limitOneOperationRoomCanOnlyRegistOneUnAuditedUseRecord) { + showColumn = true; + } var columns = [ - {header : "id",dataIndex : 'id',hidden :true}, - {header : "名称",dataIndex : 'name',width : 150, renderer : modifyRecord}, - {id : 'departNames',header : "科室名称",dataIndex : 'departNames',sortable:false} - ]; + {header : "id",dataIndex : 'id',hidden :true}, + {header : "名称",dataIndex : 'name',width : 150, renderer : modifyRecord}, + {header : "pda回收通知人",dataIndex : 'warningUserNames',width : 150,hidden:!showColumn}, + {header : "提醒方式",dataIndex : 'warningWays',width : 230,hidden:!showColumn}, + {id : 'departNames',header : "科室名称",dataIndex : 'departNames',sortable:false} + ]; var filters = new Ext.grid.GridFilters({ filters : [ @@ -23,6 +30,8 @@ {name : 'name'}, {name : 'departNames'}, {name : 'departCodes'}, + {name : 'warningUserNames'}, + {name : 'warningWays'}, {name : 'orderNum'} ]; Index: ssts-web/src/main/webapp/disinfectsystem/common/selectUserExt4.js =================================================================== diff -u -r34731 -r35611 --- ssts-web/src/main/webapp/disinfectsystem/common/selectUserExt4.js (.../selectUserExt4.js) (revision 34731) +++ ssts-web/src/main/webapp/disinfectsystem/common/selectUserExt4.js (.../selectUserExt4.js) (revision 35611) @@ -81,13 +81,26 @@ top.Ext4.getCmp(userIdBox).setValue(userIdString); } + if (top.Ext.getCmp(userNameBox) && top.Ext.getCmp(userIdBox)) { + top.Ext.getCmp(userNameBox).setValue(userNameString); + top.Ext.getCmp(userIdBox).setValue(userIdString); + } + userWin.close(); } //打开选择用户的窗口 -function openSelectReceiverOrganization(userNameBox, userIdBox) { - var userNames = top.Ext4.getCmp(userNameBox).getValue(); - var userIds = top.Ext4.getCmp(userIdBox).getValue(); +function openSelectUserWindow(userNameBox, userIdBox) { + var userNames; + var userIds; + if (top.Ext4.getCmp(userNameBox) && top.Ext4.getCmp(userIdBox)) { + userNames = top.Ext4.getCmp(userNameBox).getValue(); + userIds = top.Ext4.getCmp(userIdBox).getValue(); + } + if (top.Ext.getCmp(userNameBox) && top.Ext.getCmp(userIdBox)) { + userNames = top.Ext.getCmp(userNameBox).getValue(); + userIds = top.Ext.getCmp(userIdBox).getValue(); + } var userJsonStore = new top.Ext4.data.Store({ pageSize: 100, @@ -187,7 +200,7 @@ }, { id: 'deleteItem', header: '操作', - width: 40, + width: 60, menuDisabled: true, dataIndex: 'button', renderer: function (v, p, record, index) { Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupForm.js =================================================================== diff -u -r30145 -r35611 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupForm.js (.../departmentgroupForm.js) (revision 30145) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupForm.js (.../departmentgroupForm.js) (revision 35611) @@ -4,213 +4,348 @@ function cancel() { configWin.close(); } - -function editConfig(id){ +function editConfig(id) { showWindow(id); - if(!Ext4.isEmpty(id)){ - var mask = new Ext4.LoadMask({ - msg : '正在加载,请稍候...', - target : formPanel - }); - mask.show(); - - Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!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); - top.Ext4.ComponentQuery.query("#configForm #prepareRecycleType")[0].setValue(result.data.prepareRecycleType); - }else{ + if (!Ext.isEmpty(id)) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!loadConfigData.do', + params: { id: id }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success && result.data) { + top.Ext.getCmp('id').setValue(result.data.id); + top.Ext.getCmp('name').setValue(result.data.name); + top.Ext.getCmp('departCodes').setValue(result.data.departCodes); + top.Ext.getCmp('departNames').setValue(result.data.departNames); + top.Ext.getCmp('prepareRecycleType').setValue(result.data.prepareRecycleType); + if (sstsConfig.enableNotifiOfPrepareRecycleFunction && sstsConfig.limitOneOperationRoomCanOnlyRegistOneUnAuditedUseRecord) { + if (result.data.prepareRecycleType == '预回收') { + top.Ext.getCmp('warningUserNamesBox').show(); + top.Ext.getCmp('warningWaysBox').show(); + top.Ext.getCmp('selectUserBox').show(); + top.Ext.getCmp('warningUserIds').setValue(result.data.warningUserIds); + top.Ext.getCmp('warningUserNames').setValue(result.data.warningUserNames); + if (result.data.warningWays !== '') { + if (result.data.warningWays.indexOf('文字提醒') >= 0) { + top.Ext.getCmp('warningWays_1').setValue(true); + } + if (result.data.warningWays.indexOf('语音提醒') >= 0) { + top.Ext.getCmp('warningWays_2').setValue(true); + } + if (result.data.warningWays.indexOf('弹窗提醒') >= 0) { + top.Ext.getCmp('warningWays_3').setValue(true); + } + } + } + } + } else { showResult('系统加载出错,请稍候再试'); } }, - failure : function(response, options) { - mask.hide(); + failure: function (response, options) { 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/departmentGroupAction!deleteDepartmentGroup.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) { + Ext.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", + function (button, text) { + if ("yes" == button) { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!deleteDepartmentGroup.do', + params: { ids: ids }, + success: function (response, options) { + var result = Ext.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() { + var warningWays = ''; + var warningWays_1 = top.Ext.getCmp('warningWays_1').getValue(); + var warningWays_2 = top.Ext.getCmp('warningWays_2').getValue(); + var warningWays_3 = top.Ext.getCmp('warningWays_3').getValue(); + var warningUserNames = top.Ext.getCmp('warningUserNames').getValue(); + + warningWays += (warningWays_1 ? top.Ext.getCmp('warningWays_1').inputValue + ';' : ''); + warningWays += (warningWays_2 ? top.Ext.getCmp('warningWays_2').inputValue + ';' : ''); + warningWays += (warningWays_3 ? top.Ext.getCmp('warningWays_3').inputValue + ';' : ''); + + if (warningWays !== '') { + warningWays = warningWays.substring(0, warningWays.length - 1); + } + + if(warningUserNames !== '' && warningWays == ''){ + showResult('请至少选择一种提醒方式!');return + } + + top.Ext.getCmp('warningWays').setValue(warningWays); + formPanel.form.submit({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!saveDepartmentGroup.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - timeout : 600000, - waitTitle : '提交表单', - success : function(form, action) { + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!saveDepartmentGroup.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){ - - var prepareRecycleTypeStore = new Ext4.data.Store( { - fields : [{name:'value'},{name:'text'}], - data : [{value:'',text:'空白'}, {value:'预回收',text:'预回收'},{value:'器械交接',text:'器械交接'}] +function showWindow(id) { + + var prepareRecycleTypeStore = new top.Ext.data.SimpleStore({ + fields: ['value', 'text'], + data: [['', '空白'], ['预回收', '预回收'], ['器械交接', '器械交接']] }); - - formPanel = new top.Ext4.form.Panel({ - id : 'configForm', - frame : true, - labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 5px;', - width : 800, - fieldDefaults: { - labelAlign: 'left', - labelWidth: 200 - }, - items : [{ - xtype : 'hidden', - id:'departCodes', - name:'departCodes' - },{ - xtype : 'hidden', - id:'id', - name:'id' - },{ - 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:'combobox', - id:'prepareRecycleType', + + formPanel = new top.Ext.FormPanel({ + id: 'configForm', + frame: true, + labelAlign: 'right', + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px', + autoWidth: true, + autoHeight: true, + autoScroll: true, + items: [{ + xtype: 'hidden', + id: 'departCodes', + name: 'departCodes' + }, { + xtype: 'hidden', + id: 'id', + name: 'id' + }, { + xtype: 'hidden', + id: 'warningUserIds', + name: 'warningUserIds' + }, { + xtype: 'hidden', + id: 'warningWays', + name: 'warningWays' + }, { + xtype: "fieldset", + title: '基础信息', + height: 400, + items: [{ + layout: 'column', + labelWidth: 120, + items: [{ + columnWidth: .8, + layout: 'form', + items: [{ + xtype: 'textfield', + fieldLabel: '名称', + id: 'name', + name: 'name', + allowBlank: false, + anchor: '98%' + }, { + xtype: 'combo', + fieldLabel: '预回收属性', + id: 'prepareRecycleType', name: 'prepareRecycleType', - store:prepareRecycleTypeStore, - fieldLabel: '预回收属性', - valueField : 'value', - displayField : 'text', - forceSelection : false, - editable:false, - allowBlank:true, - triggerAction : 'all' - },{ - xtype : 'textarea', - fieldLabel : '科室', - id : 'departNames', - name : 'departNames', - height : 230, - allowBlank : false, - readOnly:true, - anchor : '98%' + valueField: 'value', + displayField: 'text', + store: prepareRecycleTypeStore, + forceSelection: true, + mode: 'local', + editable: false, + triggerAction: 'all', + width: 180, + anchor: '98%', + listeners: { + select: function (combo, record, index) { + if (sstsConfig.enableNotifiOfPrepareRecycleFunction && sstsConfig.limitOneOperationRoomCanOnlyRegistOneUnAuditedUseRecord) { + if (record.data.value == '预回收') { + top.Ext.getCmp('warningUserNamesBox').show(); + top.Ext.getCmp('warningWaysBox').show(); + top.Ext.getCmp('selectUserBox').show(); + } else { + top.Ext.getCmp('warningUserNamesBox').hide(); + top.Ext.getCmp('warningWaysBox').hide(); + top.Ext.getCmp('selectUserBox').hide(); + } + } + } + } + }, { + id: 'warningUserNamesBox', + name: 'warningUserNamesBox', + layout: 'column', + items: [{ + columnWidth: 1, + layout: 'form', + items: [{ + xtype: 'textfield', + fieldLabel: 'pda回收通知人', + id: 'warningUserNames', + name: 'warningUserNames', + allowBlank: true, + readOnly: true, + anchor: '98%' + }] + }], + listeners: { + render: function () { + setTimeout(function () { + top.Ext.getCmp('warningUserNamesBox').hide(); + }, 100); + } + } + }, { + id: 'warningWaysBox', + anchor: '98%', + layout: 'column', + hidden: true, + items: [{ + columnWidth: .4, + layout: 'form', + items: [{ + id: 'warningWays_1', + name: 'warningWays_1', + fieldLabel: '提醒方式', + boxLabel: '文字提醒', + xtype: 'checkbox', + inputValue: '文字提醒' + }] + }, { + columnWidth: .2, + layout: 'form', + labelWidth: 10, + items: [{ + id: 'warningWays_2', + name: 'warningWays_2', + labelSeparator: '', + xtype: 'checkbox', + boxLabel: '语音提醒', + inputValue: '语音提醒' + }] + }, { + columnWidth: .4, + layout: 'form', + labelWidth: 10, + items: [{ + id: 'warningWays_3', + name: 'warningWays_3', + labelSeparator: '', + xtype: 'checkbox', + boxLabel: '弹窗提醒(仅回收界面)', + inputValue: '弹窗提醒(仅回收界面)' + }] + }] + }, { + xtype: 'textarea', + fieldLabel: '科室', + id: 'departNames', + name: 'departNames', + height: 230, + allowBlank: false, + readOnly: true, + anchor: '98%' }] - },{ - columnWidth : .2, - layout : 'form', - items : [{ - xtype : 'button', - text : '选择科室', - listeners:{ - click : function(){ - var departName = top.Ext4.getCmp('departNames').getValue(); - var codes = top.Ext4.getCmp("departCodes").getValue();; - openSelectReceiverOrganization(departName,codes); - } + }, { + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'button', + text: '选择科室', + listeners: { + click: function () { + var departNames = top.Ext.getCmp('departNames').getValue(); + var departCodes = top.Ext.getCmp("departCodes").getValue(); + openSelectReceiverOrganization(departNames, departCodes); + } } }] + }, { + columnWidth: .2, + layout: 'form', + id: 'selectUserBox', + hidden: true, + items: [{ + xtype: 'button', + text: '选择通知人', + listeners: { + click: function () { + openSelectUserWindow('warningUserNames', 'warningUserIds'); + } + } + }] }] }] - }] - , - buttons : [{ - id : 'saveBtn', - text : '保存', - hidden:SSTS_printApplication_manager, - handler : function(){ - if(formPanel.getForm().isValid()){ + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + hidden: SSTS_printApplication_manager, + 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 : '回收科室分组设置', - width : 800, - height : 500, - border : false, - plain : true, - modal :true, - items : [{ - region:'center', - width : 400, - layout :'fit', - items:[formPanel] - }] + + configWin = new top.Ext.Window({ + id: 'satisfactionSurveyApplicationWin', + layout: 'border', + title: '回收科室分组设置', + width: 800, + height: 500, + 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/tousseExclusiveDoctor/tousseExclusiveDoctorForm.js =================================================================== diff -u -r34725 -r35611 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousseExclusiveDoctor/tousseExclusiveDoctorForm.js (.../tousseExclusiveDoctorForm.js) (revision 34725) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousseExclusiveDoctor/tousseExclusiveDoctorForm.js (.../tousseExclusiveDoctorForm.js) (revision 35611) @@ -173,7 +173,7 @@ text: '选择用户', listeners: { click: function () { - openSelectReceiverOrganization('doctorNames', 'doctorIds'); + openSelectUserWindow('doctorNames', 'doctorIds'); } } }] Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.jsp =================================================================== diff -u -r30145 -r35611 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.jsp (.../departmentgroupView.jsp) (revision 30145) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.jsp (.../departmentgroupView.jsp) (revision 35611) @@ -18,12 +18,14 @@