Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r33272 -r33551 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 33272) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 33551) @@ -950,6 +950,7 @@ {hidden :SSTS_RecyclePrint_Menu,text:"科室分组设置",href:WWWROOT+'/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_RecyclePrint_Menu,text:"回收科室分组设置",href:WWWROOT+'/disinfectsystem/basedatamanager/departmentgroup/departmentgroupView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_RecyclePrint_Menu,text:""+reviewViewText2+"科室分组设置",href:encodeURI(WWWROOT+'/disinfectsystem/basedatamanager/departmentgroupOption/departmentgroupOptionView.jsp?type='+departmentGroupOption_REVIEWE),hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_RecyclePrint_Menu,text:"手术器械科室分组设置",href:WWWROOT+'/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_RecyclePrint_Menu,text:"物品科室共用配置",href:WWWROOT+'/disinfectsystem/goodsDepartShareConfig/goodsDepartShareConfigView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_UseRecordConvertConfig_Manager,text:"使用记录转换配置",href:WWWROOT+'/disinfectsystem/basedatamanager/useRecordConvertConfig/useRecordConvertConfigView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_RecyclePrint_Menu,text:"器械包回收备注设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=recycleItem_remark',hrefTarget:linkTarget,leaf:true}, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonView.js =================================================================== diff -u -r29966 -r33551 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonView.js (.../departmentgroupCommonView.js) (revision 29966) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonView.js (.../departmentgroupCommonView.js) (revision 33551) @@ -89,7 +89,9 @@ reader: { root: 'data' }, - extraParams: {} + extraParams: { + groupType: '科室分组设置' + } }, fields: [ { name: 'id' }, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonForm.js =================================================================== diff -u -r30155 -r33551 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonForm.js (.../departmentgroupCommonForm.js) (revision 30155) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/departmentgroupCommonForm.js (.../departmentgroupCommonForm.js) (revision 33551) @@ -31,7 +31,7 @@ mask.show(); Ext4.Ajax.request({ url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!loadOrgUnitGroup.do', - params: { id: id }, + params: { id: id, groupType: '科室分组设置' }, success: function (response, options) { mask.hide(); var result = Ext4.JSON.decode(response.responseText); @@ -67,20 +67,20 @@ if ("yes" == button) { Ext4.Ajax.request({ url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!deleteOrgUnitGroupByIds.do', - params: { ids: ids.join(';') }, + params: { ids: ids.join(';'), groupType: '科室分组设置' }, success: function (response, options) { var result = Ext4.JSON.decode(response.responseText); var success = result.success; if (true != success) { - showResult(result.message); + showResult(result.message); } else { showResult('删除成功!'); listStore.load(); } }, failure: function (response, options) { var result = Ext.decode(response.responseText); - showResult(result.message); + showResult(result.message); } }); } @@ -91,7 +91,7 @@ //保存科室分组 function saveConfig() { formPanel.form.submit({ - url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!saveOrUpdateOrgUnitGroup.do', + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!saveOrUpdateOrgUnitGroup.do?groupType=' + encodeURIComponent('科室分组设置'), method: 'POST', waitMsg: '正在保存数据,请稍候', timeout: 600000, Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.js (revision 33551) @@ -0,0 +1,133 @@ +var listStore; +var departGroupGrid; +//修改手术器械科室分组 +function modify(v, data) { + editConfig(data.id); +} + +//根据科室或者名称过滤 +function search(listStore) { + var searchColumns = ''; + Ext4.getCmp('searchMenu').items.each(function (item) { + if (item.checked) { + searchColumns += item.name + ';'; + } + }); + searchColumns = searchColumns.substring(0, searchColumns.length - 1); + listStore.proxy.extraParams.searchKeyWord = Ext4.getCmp('searchKeyWord').getValue(); + listStore.proxy.extraParams.searchColumns = searchColumns; + listStore.loadPage(1); + listStore.reload(); + Ext4.getCmp('searchKeyWord').setValue(''); +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "名称", dataIndex: 'name', width: 150, renderer: modifyRecord }, + { header: "科室名称", dataIndex: 'orgUnitNames', width: document.body.clientWidth - 200, sortable: false } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(); + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(departGroupGrid); + } + }, '->', { + width: 70, + text: '搜索列', + id: 'searchButton', + menu: { + id: 'searchMenu', + items: [{ + xtype: 'menucheckitem', + name: 'name', + checked: true, + text: '名称' + }, { + xtype: 'menucheckitem', + name: 'departName', + checked: true, + text: '科室名称' + }] + }, + listeners: { + focus: function (thisButton, The, eOpts) { + Ext4.getCmp('searchKeyWord').focus(); + } + } + }, { + xtype: 'textfield', + name: 'searchKeyWord', + id: 'searchKeyWord', + enableKeyEvents: true, + listeners: { + keydown: function (thisTextfield, e, eOpts) { + if (e.keyCode == 13) { + search(listStore); + } + } + } + }, { + text: '搜索', + handler: function (thisButton) { + search(listStore); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!findOrgUnitGroupList.do', + reader: { + root: 'data' + }, + extraParams: { + groupType: '手术器械科室分组设置' + } + }, + fields: [ + { name: 'id' }, + { name: 'name' }, + { name: 'orgUnitNames' } + ] + }); + + listStore.loadPage(1); + + departGroupGrid = new Ext4.grid.GridPanel({ + title: '手术器械科室分组设置', + columns: columns, + frame: false, + autoScroll: false, + store: listStore, + tbar: tbar, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: listStore, // same store GridPanel is using + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + }, + selModel: new Ext4.selection.CheckboxModel() + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [{ + region: 'center', + layout: 'fit', + items: [departGroupGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridView.jsp (revision 33551) @@ -0,0 +1,39 @@ +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<% + request.setAttribute("userName",AcegiHelper.getLoginUser().getUserFullName()); + request.setAttribute("orgunit",AcegiHelper.getLoginUser().getCurrentOrgUnitName()); + request.setAttribute("orgUnitCoding",AcegiHelper.getLoginUser().getOrgUnitCodingFromSupplyRoomConfig()); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + request.setAttribute("today", dateFormat.format(new Date())); +%> + + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +手术器械科室分组设置 + + + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/operationTousse/gridForm.js (revision 33551) @@ -0,0 +1,213 @@ +var configWin; +var formPanel; + +top.Ext4.define('columnTreeGrid', { + extend: 'Ext4.tree.Panel', + xtype: 'tree-grid', + useArrows: true, + rootVisible: true, + multiSelect: true, + columnLines: false, + rowLines: false, + cls: 'no-leaf-icons', + initComponent: function () { + this.superclass.initComponent.call(this); + } +}); + +//关闭手术器械科室分组设置的窗口 +function cancel() { + configWin.close(); +} + +//编辑手术器械科室分组 +function editConfig(id) { + showAddOrEditWindow(id); + if (!Ext4.isEmpty(id)) { + var mask = new Ext4.LoadMask({ + msg: '正在加载,请稍候...', + target: formPanel + }); + mask.show(); + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!loadOrgUnitGroup.do', + params: { id: id, groupType: '手术器械科室分组设置' }, + success: function (response, options) { + mask.hide(); + var result = Ext4.JSON.decode(response.responseText); + if (result.success && result.data) { + top.Ext4.getCmp('id').setValue(result.data.id); + top.Ext4.getCmp('departCodes').setValue(result.data.orgUnitCodes); + top.Ext4.getCmp('departNames').setValue(result.data.orgUnitNames); + top.Ext4.getCmp('name').setValue(result.data.name); + } else { + showResult('系统加载出错,请稍候再试'); + } + }, + failure: function (response, options) { + mask.hide(); + showResult('系统加载出错,请稍候再试'); + } + }); + } +} + +//删除手术器械科室分组 +function deleteConfig(grid) { + var selectedRecords = grid.getSelectionModel().getSelection(); + var selectedCount = grid.getSelectionModel().getCount(); + var ids = []; + if (selectedCount < 1) { + showResult("请选择要删除的行"); + } else { + for (var i = 0, len = selectedRecords.length; i < len; i++) { + ids[i] = selectedRecords[i].data['id']; + } + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!deleteOrgUnitGroupByIds.do', + params: { ids: ids.join(';'), groupType: '手术器械科室分组设置' }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult(result.message); + } else { + showResult('删除成功!'); + listStore.load(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showResult(result.message); + } + }); + } + }); + } +} + +//保存手术器械科室分组 +function saveConfig() { + formPanel.form.submit({ + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!saveOrUpdateOrgUnitGroup.do?groupType=' + encodeURIComponent('手术器械科室分组设置'), + method: 'POST', + waitMsg: '正在保存数据,请稍候', + timeout: 600000, + waitTitle: '提交表单', + success: function (form, action) { + configWin.close(); + listStore.load(); + showResult('保存成功'); + }, + failure: function (form, action) { + if (action.result.msg) { + showResult(action.result.msg); + } else if (action.result.message) { + showResult(action.result.message); + } else { + showResult('保存失败'); + } + } + }); +} + +//弹出手术器械科室分组设置的窗口 +function showAddOrEditWindow(id) { + formPanel = new top.Ext4.form.Panel({ + id: 'configForm', + frame: true, + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px;', + width: 800, + fieldDefaults: { + labelAlign: 'right', + labelWidth: 70 + }, + items: [{ + xtype: 'hidden', + id: 'departCodes', + name: 'departCodes' + }, { + xtype: 'hidden', + id: 'id', + name: 'id', + value: id + }, { + layout: 'column', + 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%' + }] + }, { + columnWidth: .2, + layout: 'form', + border: 0, + items: [{ + xtype: 'button', + text: '选择科室', + listeners: { + click: function () { + var departNames = top.Ext4.getCmp('departNames').getValue(); + var codes = top.Ext4.getCmp("departCodes").getValue(); + openSelectReceiverOrganization(departNames, codes); + } + } + }] + }] + }] + , + buttons: [{ + id: 'saveBtn', + text: '保存', + handler: function () { + if (formPanel.getForm().isValid()) { + saveConfig(); + } else { + showResult('请填写表单!'); + return false; + } + } + }, { + text: '取消', + handler: cancel + }] + }); + + configWin = new top.Ext4.window.Window({ + id: 'configWin', + layout: 'border', + title: '手术器械科室分组设置', + width: 700, + height: 400, + border: false, + plain: true, + modal: true, + items: [{ + region: 'center', + width: 400, + layout: 'fit', + items: [formPanel] + }] + }); + + configWin.show(); +} +