Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.jsp (revision 34649) @@ -0,0 +1,64 @@ +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ include file="/common/taglibs.jsp"%> + + +<% + SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd"); + request.setAttribute("newDate", 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/assestManagement/diposableGoods/diposableGoodsView.js =================================================================== diff -u -r34525 -r34649 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 34525) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 34649) @@ -12,6 +12,20 @@ externalCodeName = externalCodeConfig.text; } +var unitName = ''; +function print_container(barcode, name, unitName) { + var obj = { + barcode: barcode, + name: name, + unitName: unitName, + defaultPrintFun: function () { + defaultPrint(barcode, name, unitName); + }, + dataSourceName: name, + styleName: '默认' + } + printObjWithdefaultPrintFun(obj); +}; /** * 同步物品 */ @@ -80,10 +94,16 @@ fields : [ 'value'], data : [[STR_YES],[STR_NO]] }); + + var consumptiveMaterialUseData = [['清洗耗材']] + + if(sstsConfig.enableSterilizerConsumptiveMaterialConsumptionFunction){ + consumptiveMaterialUseData.push(['灭菌耗材']); + } //耗材用途 var consumptiveMaterialUseStore = new Ext.data.SimpleStore( { fields : [ 'value'], - data : [['清洗耗材']] + data : consumptiveMaterialUseData }); var consumptiveMaterialTypesStore = new top.Ext.data.Store({ @@ -754,7 +774,20 @@ triggerAction : 'all', name : "consumptiveMaterialUse", id : "consumptiveMaterialUse", - anchor : '95%' + anchor : '95%', + listeners:{ + select:function(combo, record, index){ + if(record.data.value == '灭菌耗材'){ + top.Ext.getCmp('consumptiveMaterialTypeBox').hide(); + top.Ext.getCmp('consumptiveMaterialVolumeBox').hide(); + top.Ext.getCmp('volumeUnitBox').hide(); + }else { + top.Ext.getCmp('consumptiveMaterialTypeBox').show(); + top.Ext.getCmp('consumptiveMaterialVolumeBox').show(); + top.Ext.getCmp('volumeUnitBox').show(); + } + } + } }] },{ columnWidth : 1, @@ -1014,32 +1047,177 @@ showResult("请选择要打印的批次!"); return false; } - var goodsName = top.Ext.getCmp('name').getValue(); - - for ( var i = 0, len = records.length; i < len; i++) { - if(items == null){ - items = records[i].data.id; - }else { - items += ',' + records[i].data.id; + if(sstsConfig.enableSterilizerConsumptiveMaterialConsumptionFunction){ + DWREngine.setAsync(false); + SupplyRoomConfigTableManager.getStartTimeObject(function (supplyRoomConfig) { + unitName = supplyRoomConfig.unitName; + }) + DWREngine.setAsync(true); + var formPanel = new top.Ext.FormPanel({ + id: 'formPanel', + frame: true, + labelAlign: 'right', + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px', + labelWidth: 80, + autoHeight: true, + autoScroll: true, + items: [{ + layout : 'column', + items:[{ + layout : 'form', + labelWidth:93, + labelAlign:'left', + columnWidth: 1, + items : [{ + xtype : 'textfield', + columnWidth: 1, + disable:true, + fieldLabel:'监测包类型', + cls : 'fieldReadOnlyNoRemove', + width:0 + }] + },{ + layout : 'form', + labelWidth:100, + labelAlign:'right', + columnWidth: .5, + items : [{ + id : 'monitorTousseType_1', + name : 'monitorTousseType_1', + columnWidth: .5, + fieldLabel : '化学监测包', + xtype : 'checkbox', + inputValue : '化学监测包', + labelSeparator:'' + }] + },{ + layout : 'form', + labelWidth:100, + labelAlign:'right', + columnWidth: .5, + items : [{ + id : 'monitorTousseType_2', + name : 'monitorTousseType_2', + columnWidth: .5, + fieldLabel : '生物监测包', + xtype : 'checkbox', + inputValue : '生物监测包', + labelSeparator:'' + }] + },{ + layout : 'form', + labelWidth:80, + labelAlign:'left', + columnWidth: 1, + items : [{ + xtype : 'textfield', + columnWidth: 1, + disable:true, + fieldLabel:'打印份数', + cls : 'fieldReadOnlyNoRemove', + width:0 + }] + },{ + layout : 'form', + labelWidth:35, + labelAlign:'left', + columnWidth: 1, + items : [{ + xtype : 'numberfield', + columnWidth: 1, + labelSeparator:'', + id:'printAmount', + width:180, + value:1, + name:'printAmount', + allowDecimals : false, + allowNegative : false + }] + }] + }], + buttons: [{ + id: 'continueBtn', + text: '确认', + handler: function () { + var monitorTousseType_1 = top.Ext.getCmp('monitorTousseType_1').getValue(); + var monitorTousseType_2 = top.Ext.getCmp('monitorTousseType_2').getValue(); + if(!monitorTousseType_1 && !monitorTousseType_2){ + showMultipleResult('请选择监测包类型'); + return + } + + var printAmount = top.Ext.getCmp('printAmount').getValue(); + if(printAmount == 0){ + showMultipleResult('打印份数不能小于1'); + return; + }else if(printAmount > 500){ + showMultipleResult('打印份数不能超过500'); + return; + } + if (isNaN(printAmount) == false) { + for(var i=0;i - + + + + + Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.jsp (revision 34649) @@ -0,0 +1,31 @@ +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +灭菌目的关联耗材管理 + + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/ext/fontSize15/styles/common.css =================================================================== diff -u -r34608 -r34649 --- ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 34608) +++ ssts-web/src/main/webapp/ext/fontSize15/styles/common.css (.../common.css) (revision 34649) @@ -463,4 +463,13 @@ #formSumPanel-body .x4-panel-body-default { background: none !important; border: 0 !important; +} + +/* GYEY-768:灭菌目的关联耗材管理*/ +#sterilizationPurposeForm-body{ + width: 423px; + height: 95px !important; + overflow: auto; + background: none; + border: 0; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.js (revision 34649) @@ -0,0 +1,537 @@ +var treeStore; + +function reloadGird(pageNowReal) { + var beginDateTime = Ext4.getCmp('beginDateTime').getRawValue(); + var endDateTime = Ext4.getCmp('endDateTime').getRawValue(); + var sterilizationUser = Ext4.getCmp('sterilizationUser').getValue(); + var disposableGoodsId = Ext4.getCmp('disposableGoodsId').getValue(); + var sterilizationType = Ext4.getCmp('sterilizationType').getValue(); + var sterilizerId = Ext4.getCmp('sterilizerId').getValue(); + var sterilizationPurpose = Ext4.getCmp('sterilizationPurpose').getValue(); + var pageSize = Ext4.getCmp('pageSize').getValue(); + treeStore.proxy.extraParams = { + beginDateTime: beginDateTime, + endDateTime: endDateTime, + sterilizationUser: sterilizationUser || '', + disposableGoodsId: disposableGoodsId || '', + sterilizationType: sterilizationType || '', + sterilizationPurpose: sterilizationPurpose || '', + sterilizerId: sterilizerId, + pageNow: pageNowReal, + pageSize: pageSize + }; + Ext4.getCmp('pageNow').setValue(pageNowReal); + treeStore.reload(); +} + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + Ext4.BLANK_IMAGE_URL = WWWROOT + '/ext/resources/images/default/s.gif'; + //耗材名称 + var disposableGoodsStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsData.do', + reader: { + type: 'json', + root: 'data' + } + }, + autoLoad: true, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'showName', mapping: 'showName' }, + { name: 'displayName', mapping: 'displayName' }, + { name: 'consumptiveMaterialVolume', mapping: 'consumptiveMaterialVolume' }, + { name: 'consumptiveMaterialUnit', mapping: 'consumptiveMaterialUnit' }, + { name: 'unitForDisplay', mapping: 'unitForDisplay' } + ] + }); + //操作员 + var userJsonStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + //灭菌程序 + var sterilizerTypeStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', + reader: { + type: 'array' + } + }, + fields: ['id', 'name'], + autoLoad: true + }); + //灭菌炉 + var sterilizerJsonStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/sterilizerAction!loadAllSterilizerList.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ], + autoLoad: true + }); + //灭菌目的 + var sterilizationPurposeJsonStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/sterilisationAction!getSterilizationPurposeList.do', + reader: { + type: 'array' + } + }, + fields: ['name'], + autoLoad: true + }); + var width = Ext4.getBody().dom.clientWidth; + var form = new Ext4.form.Panel({ + region: 'north', + frame: true, + border: 0, + title: '灭菌耗材消耗记录', + bodyPadding: '5 5 0', + autoScroll: true, + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right', + labelWidth: 80 + }, + width: width, + items: [{ + height: 60, + width: '100%', + layout: 'column', + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'datefield', + border: 0, + labelWidth: 100, + fieldLabel: '灭菌开始时间', + id: 'beginDateTime', + name: 'beginDateTime', + format: 'Y-m-d', + allowBlank: false, + editable: false, + anchor: '95%', + value: isIE() ? beginDateTime : new Date(beginDateTime) + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'datefield', + border: 0, + labelAlign: 'center', + fieldLabel: '至', + labelSeparator: '', + id: 'endDateTime', + name: 'endDateTime', + format: 'Y-m-d', + allowBlank: false, + editable: false, + anchor: '95%', + value: isIE() ? beginDateTime : new Date(beginDateTime) + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '耗材名称', + id: 'disposableGoodsId', + name: 'disposableGoodsId', + minChars: 0, + valueField: 'id', + displayField: 'showName', + store: disposableGoodsStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + id: 'sterilizationUser', + name: 'sterilizationUser', + queryParam: 'spell', + fieldLabel: '灭菌员', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: userJsonStore, + pageSize: 50, + forceSelection: true, + lazyInit: true, + anchor: '95%', + listWidth: 300, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '灭菌程序', + id: 'sterilizationType', + name: 'sterilizationType', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: sterilizerTypeStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '灭菌炉', + id: 'sterilizerId', + name: 'sterilizerId', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: sterilizerJsonStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .25, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'combo', + fieldLabel: '灭菌目的', + id: 'sterilizationPurpose', + name: 'sterilizationPurpose', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: sterilizationPurposeJsonStore, + forceSelection: true, + lazyInit: false, + editable: false, + triggerAction: 'all', + typeAhead: false, + allowBlank: true + }] + }] + }], + buttons: [{ + text: '查询', + handler: function () { + reloadGird(1); + } + }, { + text: '重置', + handler: function () { + Ext4.getCmp('beginDateTime').setRawValue(beginDateTime); + Ext4.getCmp('endDateTime').setRawValue(beginDateTime); + Ext4.getCmp('disposableGoodsId').setValue(''); + Ext4.getCmp('sterilizationUser').setValue(''); + Ext4.getCmp('sterilizationType').setValue(''); + Ext4.getCmp('sterilizerId').setValue(''); + Ext4.getCmp('sterilizationPurpose').setValue(''); + } + }] + }); + + Ext4.define('columnTreeGrid', { + extend: 'Ext4.tree.Panel', + xtype: 'tree-grid', + useArrows: true, + rootVisible: false, + multiSelect: false, + columnLines: true, + rowLines: true, + cls: 'no-leaf-icons', + initComponent: function () { + Ext4.apply(this, { + columns: [{ + header: '', + width: 60, + sortable: true, + xtype: 'treecolumn' + }, { + header: '灭菌开始时间', + width: 150, + dataIndex: 'sterilizationStartDate' + }, { + header: '灭菌员', + width: 80, + dataIndex: 'sterilizationUser' + }, { + header: '灭菌炉', + width: 100, + dataIndex: 'sterilizerName' + }, { + header: '灭菌程序', + width: 100, + dataIndex: 'sterilizationType' + }, { + header: '灭菌目的', + width: 100, + dataIndex: 'sterilizationPurpose' + }, { + header: '耗材名称', + width: 200, + dataIndex: 'disposableGoodsName' + }, { + header: '耗材批次', + width: 80, + dataIndex: 'disposableGoodsBatchNumber' + }, { + header: '消耗数量', + width: 80, + dataIndex: 'useAmount' + }, { + header: '库存剩余', + width: 80, + dataIndex: 'stockAmount' + }, { + header: '记录创建时间', + width: 150, + dataIndex: 'createDateTime' + }, { + header: '备注', + width: 300, + dataIndex: 'remark' + }] + }); + this.superclass.initComponent.call(this); + } + }); + + Ext4.define('cModel', { + extend: 'Ext4.data.Model', + fields: [ + { name: 'sterilizationStartDate' }, + { name: 'sterilizationUser' }, + { name: 'sterilizerName' }, + { name: 'sterilizationType' }, + { name: 'sterilizationPurpose' }, + { name: 'disposableGoodsName' }, + { name: 'disposableGoodsBatchNumber' }, + { name: 'useAmount' }, + { name: 'stockAmount' }, + { name: 'createDateTime' }, + { name: 'pageNow' }, + { name: 'rowCount' }, + { name: 'remark' } + ] + }); + + treeStore = new Ext4.data.TreeStore({ + model: cModel, + proxy: { + type: 'ajax', + actionMethods: { + read: 'POST' + }, + url: WWWROOT + '/disinfectSystem/baseData/steriConsumeMaterialUseRecordController/loadSteriConsumeMaterialUseRecord.mhtml' + }, + folderSort: true, + listeners: { + beforeload: function (thiz) { + var beginDateTime = Ext4.getCmp('beginDateTime').getRawValue(); + var endDateTime = Ext4.getCmp('endDateTime').getRawValue(); + var pageNow = Ext4.getCmp('pageNow').getValue(); + var pageSize = Ext4.getCmp('pageSize').getValue(); + treeStore.proxy.extraParams.beginDateTime = beginDateTime; + treeStore.proxy.extraParams.endDateTime = endDateTime; + treeStore.proxy.extraParams.pageNow = pageNow; + treeStore.proxy.extraParams.pageSize = pageSize; + }, + load: function (_this, node, records, successful, eOpts) { + var temp = records[0]; + if (temp) { + var pageSize = Ext4.getCmp('pageSize').getValue(); + var pageNow = temp.data.pageNow; + var rowCount = temp.data.rowCount; + var fristIndex = ((pageNow - 1) * pageSize) + 1; + var endIndex = (pageNow * pageSize > rowCount) ? rowCount : pageNow * pageSize; + var pageCount = Math.ceil(rowCount / pageSize); + + Ext4.getCmp('pageNow').setValue(pageNow); + Ext4.getCmp('pagCountInfo').setText(',共 ' + pageCount + ' 页'); + Ext4.getCmp('pagingInfo').setText('显示 ' + fristIndex + ' - ' + endIndex + ',共 ' + rowCount + ' 条'); + Ext4.getCmp('pageCountReal').setValue(pageCount); + } else { + Ext4.getCmp('pagCountInfo').setText(''); + Ext4.getCmp('pagingInfo').setText('没数据'); + } + } + } + }); + + suppliesGrid = Ext4.create('columnTreeGrid', { + id: 'suppliesGrid', + flex: 1, + border: false, + title: SSTS_ConsumptiveMaterialSterilizationSupplies ? '灭菌耗材消耗记录' : '', + viewConfig: { loadMask: { msg: '正在加载,请稍候...' } }, + store: treeStore, + bbar: [{ + xtype: 'button', + text: '', + tooltip: "第一页", + cls: 'pageFirst', + handler: function () { + Ext4.getCmp('pageNow').setValue(1); + reloadGird(1); + } + }, { + xtype: 'button', + text: '', + tooltip: "上一页", + cls: 'pagePrev', + handler: function () { + var pageNow = Ext4.getCmp('pageNow').getValue(); + pageNow = parseInt(pageNow); + if (pageNow - 1 <= 0) { + return; + } + pageNow = pageNow - 1; + Ext4.getCmp('pageNow').setValue(pageNow); + reloadGird(pageNow); + } + }, { + xtype: 'label', + text: '第 ', + style: 'margin:0 5px' + }, { + xtype: 'numberfield', + hideTrigger: true, + id: 'pageNow', + value: 1, + minValue: 1, + width: 30, + enableKeyEvents: true, + listeners: { + keypress: function (that, e, eOpts) { + if (e.getKey() == 13) { + var pageCountReal = Ext4.getCmp('pageCountReal').getValue(); + var pageNow = 1; + if (that.value > pageCountReal) { + pageNow = pageCountReal; + } else { + pageNow = that.value; + } + Ext4.getCmp('pageNow').setValue(pageNow); + reloadGird(pageNow); + } + } + } + }, { + xtype: 'label', + text: ' 页', + style: 'margin:0 5px' + }, { + xtype: 'label', + id: 'pagCountInfo' + }, { + xtype: 'button', + text: '', + cls: 'pageNext', + tooltip: "下一页", + handler: function () { + var pageNow = Ext4.getCmp('pageNow').getValue(); + var pageCountReal = Ext4.getCmp('pageCountReal').getValue(); + pageNow = parseInt(pageNow); + if (pageNow + 1 > pageCountReal) { + return; + } + pageNow = pageNow + 1; + Ext4.getCmp('pageNow').setValue(pageNow); + reloadGird(pageNow); + } + }, { + xtype: 'button', + text: '', + tooltip: "最后页", + cls: 'pageLast', + handler: function () { + var pageCountReal = Ext4.getCmp('pageCountReal').getValue(); + Ext4.getCmp('pageNow').setValue(pageCountReal); + reloadGird(pageCountReal); + } + }, '->', { + xtype: 'label', + id: 'pagingInfo' + }, { + xtype: 'hiddenfield', + id: 'pageCountReal', + value: 1 + }, { + xtype: 'hiddenfield', + id: 'pageSize', + value: 20 + }] + }); + + var items = []; + if (SSTS_ConsumptiveMaterialSterilizationSupplies) { + items = [{ + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: [suppliesGrid] + }] + } else { + items = [form, { + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: [suppliesGrid] + }] + } + + new Ext4.container.Viewport({ + layout: 'border', + items: items + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.js (revision 34649) @@ -0,0 +1,72 @@ +var listStore; +var listGrid; + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + var columns = [ + { header: "sterilizationPurposeId", dataIndex: 'sterilizationPurposeId', hidden: true }, + { header: "disposableGoodsIds", dataIndex: 'disposableGoodsIds', hidden: true }, + { header: "灭菌目的", dataIndex: 'sterilizationPurposeName', width: 300 }, + { header: "耗材名称", dataIndex: 'disposableGoodsNames', width: document.body.clientWidth - 330, sortable: false } + ]; + var tbar = [{ + text: '管理耗材', + hidden: SSTS_ConsumptiveMaterialSterilizationPurpose, + handler: function () { + var selectedRecords = listGrid.getSelectionModel().getSelection(); + var selectedCount = listGrid.getSelectionModel().getCount(); + if (selectedCount !== 1) { + showResult("请选择一条数据"); + return; + } + showSuppliesWindow(selectedRecords[0]); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/sterilizationPurposeDisposableGoodsController/loadSterilizationPurposeDisposableGoods.mhtml', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'sterilizationPurposeId' }, + { name: 'disposableGoodsIds' }, + { name: 'sterilizationPurposeName' }, + { name: 'disposableGoodsNames' } + ] + }); + + listStore.loadPage(1); + + listGrid = 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: [listGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menu.jsp =================================================================== diff -u -r34079 -r34649 --- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 34079) +++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 34649) @@ -1293,7 +1293,7 @@ * 《设备耗材消耗管理》菜单 */ var SSTS_ConsumptiveMaterial = true; - + if (!notInWhiteList(sstsConfig, 'enableRinserConsumptiveMaterialConsumptionFunction')) { SSTS_ConsumptiveMaterial = false; } @@ -1329,6 +1329,20 @@ SSTS_ConsumptiveMaterialAddRecord = false; +/** + * 《灭菌目的关联耗材管理》菜单 + */ + var SSTS_ConsumptiveMaterialSterilizationPurpose = true; + + SSTS_ConsumptiveMaterialSterilizationPurpose = false; + +/** + * 《灭菌耗材消耗记录》菜单 + */ + var SSTS_ConsumptiveMaterialSterilizationSupplies = true; + + SSTS_ConsumptiveMaterialSterilizationSupplies = false; + /** * 《科室运作监控》菜单 Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r34609 -r34649 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34609) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34649) @@ -635,7 +635,9 @@ children:[ {hidden : SSTS_ConsumptiveMaterialType,text:"清洗耗材种类管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.jsp',hrefTarget:linkTarget,leaf:true}, {hidden : SSTS_ConsumptiveMaterialContainer,text:"清洗耗材容器管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : SSTS_ConsumptiveMaterialSterilizationPurpose,text:"灭菌目的关联耗材管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/view.jsp',hrefTarget:linkTarget,leaf:true}, {hidden : SSTS_ConsumptiveMaterialUseRecord,text:"清洗耗材消耗记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : SSTS_ConsumptiveMaterialSterilizationSupplies,text:"灭菌耗材消耗记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationSupplies/view.jsp',hrefTarget:linkTarget,leaf:true}, {hidden : SSTS_ConsumptiveMaterialAddRecord,text:"清洗耗材补充记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialAddRecord/view.jsp',hrefTarget:linkTarget,leaf:true} ] },{ Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.jsp =================================================================== diff -u -r32861 -r34649 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.jsp (.../diposableGoodsView.jsp) (revision 32861) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.jsp (.../diposableGoodsView.jsp) (revision 34649) @@ -10,6 +10,7 @@ <%@ include file="/common/includeExtJsAndCss.jsp"%> <%@ include file="/common/include_Ext425JsAndCss.jsp"%> +<%@include file="/disinfectsystem/print/print.jsp"%> + Index: ssts-web/src/main/webapp/ext/fontSize12/styles/common.css =================================================================== diff -u -r34608 -r34649 --- ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 34608) +++ ssts-web/src/main/webapp/ext/fontSize12/styles/common.css (.../common.css) (revision 34649) @@ -559,4 +559,13 @@ #formSumPanel-body .x4-panel-body-default { background: none !important; border: 0 !important; +} + +/* GYEY-768:灭菌目的关联耗材管理*/ +#sterilizationPurposeForm-body{ + width: 423px; + height: 95px !important; + overflow: auto; + background: none; + border: 0; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/form.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/form.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialSterilizationPurpose/form.js (revision 34649) @@ -0,0 +1,187 @@ +var configWin; +var departWin; +var formPanel; + +function cancel() { + configWin.close(); +} + +//保存 +function saveConfig() { + var sterilizationPurposeId = top.Ext4.getCmp('sterilizationPurposeId').getValue(); + var disposableGoodsIds = top.Ext4.getCmp('disposableGoodsIds').getValue(); + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/sterilizationPurposeDisposableGoodsController/saveSterilizationPurposeDisposableGoods.mhtml', + params: { + sterilizationPurposeId: sterilizationPurposeId, + disposableGoodsIds: disposableGoodsIds + }, + success: function (response, options) { + var result = Ext4.decode(response.responseText); + if (result.success) { + showResult('保存成功'); + configWin.close(); + listStore.loadPage(1); + } + }, + failure: function (response, options) { + showResult('保存失败!'); + } + }); +} + +//显示院区设置的窗口 +function showSuppliesWindow(obj) { + var disposableGoodGrid; + var disposableGoodColumns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "名称", dataIndex: 'name', width: 280 } + ]; + var disposableGoodStore = new top.Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/diposableGoodsAction!loadSterilizerComsumptiveMaterialUseDisposableGoods.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id' }, + { name: 'name' } + ], + listeners: { + load: function (store, records) { + for (var i = 0; i < records.length; i++) { + if (obj.data.disposableGoodsIds.indexOf(records[i].data.id) >= 0) { + disposableGoodGrid.getSelectionModel().select(i, true); + } + } + } + } + }); + + disposableGoodStore.loadPage(1); + + disposableGoodGrid = new top.Ext4.grid.GridPanel({ + columns: disposableGoodColumns, + id: 'FormGrid', + frame: false, + autoScroll: false, + store: disposableGoodStore, + hideHeaders: true, + width: 328, + height: 94, + style: 'left: 75px;top: -3px;height: 94px;', + viewConfig: { + forceFit: true + }, + selModel: new top.Ext4.selection.CheckboxModel(), + listeners: { + itemclick: function (thiz, record, item, index, e, eOpts) { + setTimeout(function () { + var selectedRecords = disposableGoodGrid.getSelectionModel().getSelection(); + var idsArr = []; + var nameArr = []; + for (var i = 0; i < selectedRecords.length; i++) { + idsArr.push(selectedRecords[i].data.id); + nameArr.push(selectedRecords[i].data.name); + } + if (idsArr.length > 0) { + top.Ext4.getCmp('disposableGoodsIds').setValue(idsArr.join(';')); + top.Ext4.getCmp('disposableGoodsName').setValue(nameArr.join(',')); + } else { + top.Ext4.getCmp('disposableGoodsIds').setValue(''); + top.Ext4.getCmp('disposableGoodsName').setValue(''); + } + }, 100); + } + } + }); + + formPanel = top.Ext4.create('top.Ext4.form.Panel', { + layout: 'vbox', + frame: true, + border: 0, + labelSeparator: ': ', + bodyPadding: '5 5 0', + autoScroll: true, + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right', + labelWidth: 70 + }, + items: [{ + height: 150, + width: '100%', + layout: 'column', + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + layout: 'form', + columnWidth: .9, + bodyStyle: { background: '#EBF5EC', border: 0 }, + items: [{ + xtype: 'hidden', + id: 'sterilizationPurposeId', + name: 'sterilizationPurposeId', + value: obj.data.sterilizationPurposeId + }, { + xtype: 'hidden', + id: 'disposableGoodsIds', + name: 'disposableGoodsIds', + value: obj.data.disposableGoodsIds + }, { + xtype: 'displayfield', + border: 0, + fieldLabel: '灭菌目的', + allowBlank: false, + anchor: '95%', + name: "sterilizationPurposeName", + id: "sterilizationPurposeName", + value: obj.data.sterilizationPurposeName || '' + }, { + xtype: 'textfield', + border: 0, + fieldLabel: '灭菌耗材', + allowBlank: true, + readOnly: true, + anchor: '95%', + name: "disposableGoodsName", + id: "disposableGoodsName", + value: obj.data.disposableGoodsNames + }, { + anchor: '95%', + id: 'sterilizationPurposeForm', + items: [disposableGoodGrid] + }] + }] + }], + buttons: [{ + id: 'save', + name: 'save', + text: '保存', + handler: function () { + saveConfig(); + } + }, { + text: '取消', + handler: function () { + configWin.close(); + } + }] + }); + + configWin = top.Ext4.create('top.Ext4.window.Window', { + layout: 'fit', + title: '关联耗材', + width: 500, + height: 230, + resizable: false, + modal: true, + border: false, + plain: true, + items: formPanel + }); + + configWin.show(); +} + Index: ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js =================================================================== diff -u -r34556 -r34649 --- ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 34556) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 34649) @@ -319,6 +319,8 @@ enableExportFilesOfTrainingModule:true, //回收界面是否显示选择模板的下拉框 isOpenLoadTemplateByUnitInRecyclingModule:true, + //启用灭菌炉耗材消耗管理功能 + enableSterilizerConsumptiveMaterialConsumptionFunction:true, //发货计划背景颜色设定 backgroudColorConfigOfInvoiceGoodsList : { unsterilizedColor : { "className" : "my_row_white" , "color" : "#ffffff"},//未灭菌的颜色