Index: ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js =================================================================== diff -u -r29893 -r29974 --- ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 29893) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 29974) @@ -170,6 +170,7 @@ // 外部代理灭菌装配时是否必须入篮筐 mustScanBasketForForeignProxy:false, // 科室申领申请单排序规则 - orderRuleOfDepartApplicationView:[{committedStatus:"ASC"},{applicationTime:"desc"}] - + orderRuleOfDepartApplicationView:[{committedStatus:"ASC"},{applicationTime:"desc"}], + //启用多院区功能 + enableMultipleBranchesOfHospital:true } \ No newline at end of file Index: ssts-web/src/main/webapp/common/includeExtJs4_2.jsp =================================================================== diff -u -r29513 -r29974 --- ssts-web/src/main/webapp/common/includeExtJs4_2.jsp (.../includeExtJs4_2.jsp) (revision 29513) +++ ssts-web/src/main/webapp/common/includeExtJs4_2.jsp (.../includeExtJs4_2.jsp) (revision 29974) @@ -1,5 +1,4 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" %> - @@ -14,4 +13,10 @@ //覆盖extJs4的占位图片路径 Ext4.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif'; Ext4.define(null, { override: 'Ext4.data.Store', constructor: function() { this.callParent(arguments); if (this.autoLoad) { this.loading = true; } } }); - \ No newline at end of file + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.js (revision 29974) @@ -0,0 +1,148 @@ +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: 'serialNumber', width: 100 }, + { header: "院区名称", dataIndex: 'name', width: 150, renderer: modifyRecord }, + { header: "科室分组", dataIndex: 'orgUnitGroup', width: document.body.clientWidth - 300, sortable: false } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(); + } + }, '-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + handler: function () { + var selectedRecords = departGroupGrid.getSelectionModel().getSelection(); + var selectedCount = departGroupGrid.getSelectionModel().getCount(); + if (selectedCount < 1) { + showResult("请选择要修改的数据"); + } else if (selectedCount > 1) { + showResult("只能修改一条数据"); + } else { + var id = selectedRecords[0].data['id']; + editConfig(id); + } + } + }, '-', { + 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: 'orgUnitGroup', + 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/brancheOfHospitalAction!findBrancheOfHospitalList.do', + reader: { + root: 'data' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'serialNumber' }, + { name: 'name' }, + { name: 'orgUnitGroup' } + ] + }); + + 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/branchesOfHospital/branchesOfHospitalForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalForm.js (revision 29974) @@ -0,0 +1,214 @@ +var configWin; +var departWin; +var formPanel; + +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/brancheOfHospitalAction!loadBrancheOfHospital.do', + params: { id: id }, + 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('serialNumber').setValue(result.data.serialNumber); + top.Ext4.getCmp('name').setValue(result.data.name); + top.Ext4.getCmp('orgUnitGroupId').setValue(result.data.orgUnitGroupId); + } 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/brancheOfHospitalAction!deleteBrancheOfHospitalByIds.do', + params: { ids: ids.join(';') }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult("删除失败"); + return; + } else { + showResult('删除成功!'); + listStore.load(); + } + }, + failure: function (response, options) { + showResult("删除失败"); + } + }); + } + }); + } +} + +//保存院区设置 +function saveConfig() { + formPanel.form.submit({ + url: WWWROOT + '/disinfectSystem/brancheOfHospitalAction!saveOrUpdateBrancheOfHospital.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + timeout: 600000, + waitTitle: '提交表单', + success: function (form, action) { + configWin.close(); + listStore.load(); + showResult('保存成功'); + }, + failure: function (form, action) { + showResult('failure = ' + action.failureType); + } + }); +} + +//显示院区设置的窗口 +function showAddOrEditWindow(id) { + var orgUnitGroupStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/orgUnitGroupAction!findOrgUnitGroupList.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }) + orgUnitGroupStore.load(); + 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: 'id', + name: 'id', + value: id + }, { + layout: 'column', + items: [{ + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'numberfield', + fieldLabel: '序号', + minValue: 0, + allowDecimals: false, + id: 'serialNumber', + name: 'serialNumber', + allowBlank: false, + anchor: '95%' + }] + }, { + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'textfield', + fieldLabel: '院区名称', + id: 'name', + name: 'name', + allowBlank: false, + anchor: '95%' + }] + }, { + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'combo', + fieldLabel: "科室分组", + valueField: 'id', + displayField: 'name', + store: orgUnitGroupStore, + allowBlank: false, + editable: false, + triggerAction: 'all', + queryParam: 'spell', + name: "orgUnitGroupId", + id: "orgUnitGroupId", + anchor: '95%' + }] + }] + }] + , + 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: 500, + height: 300, + 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/branchesOfHospital/branchesOfHospitalView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.jsp (revision 29974) @@ -0,0 +1,26 @@ +<%@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/common/common.css =================================================================== diff -u -r27618 -r29974 --- ssts-web/src/main/webapp/common/common.css (.../common.css) (revision 27618) +++ ssts-web/src/main/webapp/common/common.css (.../common.css) (revision 29974) @@ -190,4 +190,7 @@ } #packingviewVideoGrid .x-grid3-scroller{ height:240px; +} +.x4-panel-body-default { + background: none !important; } \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r29963 -r29974 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 29963) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 29974) @@ -968,6 +968,7 @@ {hidden :SSTS_ResponsibilityPart_manager,text:"责任环节",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=responsibilityPart',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_DefectiveMessageRegisterType_manager,text:"缺陷信息登记类型分组",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=defectiveMessageRegisterType',hrefTarget:linkTarget,leaf:true}, {hidden :(!sstsConfig.hasOwnProperty('hideStaffArchive')) || sstsConfig.hideStaffArchive,text:"职称设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=positionalTitle',hrefTarget:linkTarget,leaf:true}, + {hidden :!sstsConfig.enableMultipleBranchesOfHospital,text:"院区设置",href:WWWROOT+'/disinfectsystem/basedatamanager/branchesOfHospital/branchesOfHospitalView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_chargeRecordManage_MENU,text:"收费项目设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=chargeItem&optionName=收费项目设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室处理器械包配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdHandleToussesView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室服务临床科室配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdServiceDeptsView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},