Index: ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementView.jsp =================================================================== diff -u -r35988 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementView.jsp (.../instrumentRepairManagementView.jsp) (revision 35988) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementView.jsp (.../instrumentRepairManagementView.jsp) (revision 40839) @@ -34,6 +34,9 @@ + + + Index: ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js =================================================================== diff -u -r35455 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js (.../instrumentInstanceView.js) (revision 35455) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.js (.../instrumentInstanceView.js) (revision 40839) @@ -283,6 +283,9 @@ listStore.proxy.extraParams.udi = params.udi; listStore.proxy.extraParams.instrumentBarcode = params.instrumentBarcode; listStore.proxy.extraParams.pageSize = pageSize; + listStore.proxy.extraParams.idCardInstanceBarcode = params.idCardInstanceBarcode; + listStore.proxy.extraParams.tousseName = params.tousseName; + listStore.proxy.extraParams.repairStatus = params.repairStatus; if (Ext4.getCmp('pageNowForList')) { listStore.proxy.extraParams.pageNum = Ext4.getCmp('pageNowForList').getValue(); } else { @@ -316,18 +319,18 @@ }, 1000); var height = Ext4.getBody().dom.clientHeight; - if(!height || height == 0){ + if (!height || height == 0) { height = document.documentElement.clientHeight; } - + instrumentGrid = new Ext4.grid.GridPanel({ title: '器械实例列表', columns: columns, frame: false, autoScroll: false, store: listStore, tbar: tbar, - height: height - 85, + height: height - 105, bbar: [{ xtype: 'button', text: '', @@ -431,15 +434,33 @@ return instrumentGrid; } +var sessionRecord = null; //加载查询条件 function searchForm() { + var tousseDefinitionStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getTousseAndDiposableGoodsData.do?type=' + encodeURI('器械包和外来器械包'), + reader: { + root: 'data', + totalProperty: 'totalCount' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'spelling', mapping: 'spelling' }, + { name: 'name', mapping: 'name' }, + { name: 'displayName', mapping: 'displayName' }, + { name: 'amount', mapping: 'amount' } + ] + }); var form = new Ext4.form.Panel({ region: 'north', buttonAlign: 'center', border: 0, frame: true, bodyStyle: 'padding:0px auto;margin:0px', - height: 80, + height: 100, id: 'searchForm', fieldDefaults: { labelAlign: 'right', @@ -450,7 +471,7 @@ autoHeight: true, items: [{ layout: 'form', - columnWidth: .2, + columnWidth: .25, items: [{ xtype: 'textfield', border: 0, @@ -462,7 +483,7 @@ }] }, { layout: 'form', - columnWidth: .3, + columnWidth: .25, items: [{ xtype: 'textfield', border: 0, @@ -472,6 +493,150 @@ name: 'instrumentBarcode', anchor: '100%' }] + }, { + layout: 'form', + columnWidth: .25, + height: 27, + items: [{ + xtype: 'combo', + fieldLabel: '所属器械包', + id: 'tousseName', + name: 'tousseName', + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: tousseDefinitionStore, + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: false, + anchor: '100%' + }] + }, { + layout: 'form', + columnWidth: .25, + items: [{ + xtype: 'textfield', + border: 0, + fieldLabel: '标识牌条码', + allowBlank: true, + id: 'idCardInstanceBarcode', + name: 'idCardInstanceBarcode', + anchor: '100%' + }] + }, { + layout: 'form', + columnWidth: .25, + items: [{ + xtype: 'combo', + fieldLabel: '器械维修状态', + valueField: 'name', + displayField: 'value', + id: 'repairStatus', + name: 'repairStatus', + mode: 'local', + triggerAction: 'all', + forceSelection: true, + editable: false, + multiSelect: true, + store: new Ext4.data.Store({ + fields: [{ name: 'value' }, { name: 'name' }, { name: 'checked' }], + data: [{ + name: '全部', + value: '全部', + checked: false + }, { + name: '待使用', + value: '待使用', + checked: false + }, { + name: '使用中', + value: '使用中', + checked: false + }, { + name: '待维修', + value: '待维修', + checked: false + }, { + name: '维修中', + value: '维修中', + checked: false + }, { + name: '报废', + value: '报废', + checked: false + }] + }), + listConfig: { + getInnerTpl: function () { + return ''; + } + }, + listeners: { + beforeselect: function (combo, record, index, eOpts) { + record.set('checked', true); + sessionRecord = record; + }, + beforedeselect: function (combo, record) { + record.set('checked', false); + sessionRecord = record; + }, + blur: function () { + var repairStatus = Ext4.getCmp('repairStatus').getRawValue(); + if (repairStatus.indexOf('全部') >= 0) { + Ext4.getCmp('repairStatus').setRawValue('全部'); + } + }, + change: function (combo, records, index, eOpts) { + var values = []; + if (sessionRecord.data.value == '全部') { + if (sessionRecord.data.checked) { + var store = combo.getStore(); + store.each(function (record) { + values.push(record.data.value) + }); + combo.setValue(values) + } else { + combo.setValue([]) + } + } else { + if (sessionRecord.data.checked) { + var store = combo.getStore(); + var count = store.getCount(); + if (count == records.length + 1) { + store.each(function (record) { + values.push(record.data.value) + }); + combo.setValue(values) + } + } else { + var store = combo.getStore(); + var count = store.getCount(); + if (records.length == 1 && records[0] == '全部') { + combo.setValue([]) + } else if (count == records.length + 1) { + store.each(function (record) { + if (record.data.value !== '全部' && record.data.value !== sessionRecord.data.value) { + values.push(record.data.value) + } + }); + combo.setValue(values) + } + } + } + setTimeout(function () { + if (values.indexOf('全部') >= 0) { + combo.setRawValue('全部'); + } + }, 200) + } + }, + anchor: '100%' + }] }] }], buttons: [{ @@ -482,6 +647,13 @@ handler: function () { var udi = Ext4.getCmp('udi').getValue(); var instrumentBarcode = Ext4.getCmp('instrumentBarcode').getValue(); + var repairStatus = Ext4.getCmp('repairStatus').getRawValue(); + var idCardInstanceBarcode = Ext4.getCmp('idCardInstanceBarcode').getRawValue(); + var tousseName = Ext4.getCmp('tousseName').getRawValue(); + + params.idCardInstanceBarcode = idCardInstanceBarcode; + params.tousseName = tousseName; + params.repairStatus = repairStatus; params.udi = udi; params.instrumentBarcode = instrumentBarcode; listStore.loadPage(1); @@ -500,6 +672,7 @@ } }] }); + return form; } @@ -526,7 +699,7 @@ items: [{ layout: 'anchor', items: [{ - height: 80, + height: 100, items: [form] }, { anchor: '100% -80', Index: ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.jsp =================================================================== diff -u -r34698 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.jsp (.../instrumentInstanceView.jsp) (revision 34698) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceView.jsp (.../instrumentInstanceView.jsp) (revision 40839) @@ -44,6 +44,22 @@ .pageFirst,.pagePrev,.pageNext,.pageLast { width: 20px; } + .x-combo-checker { + background-position: 50% -2px; + margin-left: 1px; + background-color: transparent; + background-image:url(${ctx}/ext-4.1.0/ux/css/images/unchecked.gif); + background-position: -1px -1px; + background-repeat: no-repeat; + height: 14px; + width: 14px; + display: inline-block; + } + + /*ext多选下拉框样式,已选*/ + .x4-boundlist-selected .x-combo-checker { + background-image:url(${ctx}/ext-4.1.0/ux/css/images/checked.gif); + } - - + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceForm.js =================================================================== diff -u -r34714 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceForm.js (.../instrumentInstanceForm.js) (revision 34714) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentInstanceManager/instrumentInstanceForm.js (.../instrumentInstanceForm.js) (revision 40839) @@ -230,9 +230,10 @@ } //加载器械实例使用记录 +var useRecordStore; function useRecordStoreFun(instrumentInstanceId) { var pageSize = 20; - var useRecordStore = top.Ext4.create('Ext.data.Store', { + useRecordStore = top.Ext4.create('Ext.data.Store', { pageSize: pageSize, proxy: { type: 'ajax', @@ -265,8 +266,6 @@ useRecordStore.loadPage(1); var tbar = [{ - text: '病人使用记录' - }, '->', { xtype: 'textfield', name: 'spell', id: 'spell', @@ -336,6 +335,189 @@ return gridPanel; } +var repairRecordStore; +//BJDXZLYY-70:加载器械实例维修记录 +function repairRecordStoreFun(instrumentInstanceId) { + var pageSize = 20; + repairRecordStore = top.Ext4.create('Ext.data.Store', { + pageSize: pageSize, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/instrumentInstanceController/loadInstrumentRepairRecord.mhtml', + reader: { + root: 'data.list', + totalProperty: 'data.count' + } + }, + fields: [ + { name: 'firstTousseDefinitionName' }, + { name: 'repairStatus' }, + { name: 'registrantName' }, + { name: 'id' }, + { name: 'returnHandoverDateTime' }, + { name: 'registerDateTime' } + ], + listeners: { + beforeload: function (store, options) { + repairRecordStore.proxy.extraParams.instrumentInstanceId = instrumentInstanceId; + if (top.Ext4.getCmp('spell2')) { + var spell = top.Ext4.getCmp('spell2').getValue(); + repairRecordStore.proxy.extraParams.spell = spell; + } + } + } + }); + + var tbar = [{ + xtype: 'textfield', + name: 'spell', + id: 'spell2', + enableKeyEvents: true, + listeners: { + keydown: function (thisTextfield, e, eOpts) { + if (e.keyCode == 13) { + repairRecordStore.loadPage(1); + } + } + } + }, { + text: '搜索', + handler: function (thisButton) { + repairRecordStore.loadPage(1); + } + }]; + + var gridPanel = new top.Ext4.grid.GridPanel({ + columns: [{ + header: '登记时间', + dataIndex: 'registerDateTime', + width: 150, + menuDisabled: true + }, { + header: "所属器械包", + dataIndex: 'firstTousseDefinitionName', + width: 300, + menuDisabled: true + }, { + header: "维修状态", + dataIndex: 'repairStatus', + width: 100, + menuDisabled: true + }, { + header: "登记人", + dataIndex: 'registrantName', + width: 100, + menuDisabled: true + }, { + header: "回科时间", + dataIndex: 'returnHandoverDateTime', + width: 150, + menuDisabled: true + }], + frame: false, + autoScroll: false, + height: 320, + tbar: tbar, + store: repairRecordStore, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: repairRecordStore, + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + } + }); + + return gridPanel; +} + +var maintainRecordStore; +//BJDXZLYY-70:加载器械实例保养记录 +function maintainRecordStoreFun(instrumentInstanceId) { + var pageSize = 20; + maintainRecordStore = top.Ext4.create('Ext.data.Store', { + pageSize: pageSize, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/instrumentInstanceController/loadInstrumentTousseMaintain.mhtml', + reader: { + root: 'data.list', + totalProperty: 'data.count' + } + }, + fields: [ + { name: 'maintainTime' }, + { name: 'maintainUser' }, + { name: 'tousseName' } + ], + listeners: { + beforeload: function (store, options) { + maintainRecordStore.proxy.extraParams.instrumentInstanceId = instrumentInstanceId; + if (top.Ext4.getCmp('spell3')) { + var spell = top.Ext4.getCmp('spell3').getValue(); + maintainRecordStore.proxy.extraParams.spell = spell; + } + } + } + }); + + var tbar = [{ + xtype: 'textfield', + name: 'spell', + id: 'spell3', + enableKeyEvents: true, + listeners: { + keydown: function (thisTextfield, e, eOpts) { + if (e.keyCode == 13) { + maintainRecordStore.loadPage(1); + } + } + } + }, { + text: '搜索', + handler: function (thisButton) { + maintainRecordStore.loadPage(1); + } + }]; + + var gridPanel = new top.Ext4.grid.GridPanel({ + columns: [{ + header: '保养时间', + dataIndex: 'maintainTime', + width: 150, + menuDisabled: true + }, { + header: "所属器械包", + dataIndex: 'tousseName', + width: 300, + menuDisabled: true + }, { + header: "保养人", + dataIndex: 'maintainUser', + width: 100, + menuDisabled: true + }], + frame: false, + autoScroll: false, + height: 320, + tbar: tbar, + store: maintainRecordStore, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: maintainRecordStore, + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + } + }); + + return gridPanel; +} + //加载基础数据和数据汇总信息 function loadInstrumentInstanceDetail(id) { Ext.Ajax.request({ @@ -398,6 +580,43 @@ var gridPanel = useRecordStoreFun(id); + var tabItems = [{ + title: '病人使用记录', + items: [gridPanel] + }] + + if (sstsConfig.enableInstrumentRepairManagement) { + var repairPanel = repairRecordStoreFun(id); + tabItems.push({ + title: '维修记录', + items: [repairPanel] + }) + } + + if (!sstsConfig.disableTousseMaintain) { + var maintainPanel = maintainRecordStoreFun(id); + tabItems.push({ + title: '保养记录', + items: [maintainPanel] + }) + } + + var tabs = top.Ext4.widget('tabpanel', { + activeTab: 0, + items: tabItems, + listeners: { + beforetabchange: function (tabs, newTab, oldTab) { + if (newTab.title == '病人使用记录') { + useRecordStore.loadPage(1); + } else if (newTab.title == '维修记录') { + repairRecordStore.loadPage(1); + } else if (newTab.title == '保养记录') { + maintainRecordStore.loadPage(1); + } + } + }, + }); + configWin = new top.Ext4.window.Window({ id: 'configWin', layout: 'anchor', @@ -418,7 +637,7 @@ items: [formSumPanel] }, { height: 320, - items: [gridPanel] + items: [tabs] }], buttons: [{ id: 'saveBtn', Index: ssts-web/src/main/webapp/disinfectsystem/toussemanager/toussemaintain/tousseMaintainForm.js =================================================================== diff -u -r35411 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/toussemanager/toussemaintain/tousseMaintainForm.js (.../tousseMaintainForm.js) (revision 35411) +++ ssts-web/src/main/webapp/disinfectsystem/toussemanager/toussemaintain/tousseMaintainForm.js (.../tousseMaintainForm.js) (revision 40839) @@ -1,267 +1,337 @@ var id; var formObj; var deviceInterfaceWin; +//BJDXZLYY-70:扫描器械 +function loadInstrumentInstanceByBarcode(instrumentBarcode) { + var tousseDefinitionId = top.Ext.getCmp('tousseDefinitionId').getValue(); + if (tousseDefinitionId == '') { + showResult('请先扫描器械包!') + return + } + var params = { + instrumentBarcode: instrumentBarcode, + tousseDefinitionId: tousseDefinitionId + } + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/instrumentInstanceController/loadInstrumentInstanceByBarcode.mhtml', + params: params, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + if (result.data && result.data.instrumentBarcode) { + var instrumentBarcode = result.data.instrumentBarcode; + var materialDefinitionName = result.data.materialDefinitionName; + top.Ext.getCmp('instrumentName').setRawValue(materialDefinitionName); + top.Ext.getCmp('instrumentBarcode').setValue(instrumentBarcode); + } else { + showResult('该所属器械包的器械不存在'); + } + } else { + showResult(result.message); + } + } + }); +} function addAndEditTousseMainTain(id) { this.id = id; - formObj = new top.Ext.FormPanel( { - id : 'tousseMaintainForm', - frame : true, - labelAlign:'right', - labelSeparator : ':', - bodyStyle : 'padding:5px 5px 0px 5px', - labelWidth : 100, - autoHeight : true, - autoScroll : true, - items : [ { - xtype : 'hidden', - name : 'id', - id : 'id' - },{ - xtype : 'hidden', - name : 'operator', - id : 'operator' - },{ - xtype : 'hidden', - name : 'operationTime', - id : 'operationTime' - },{ - layout : 'column', - items : [ { - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "扫描条码", - allowBlank : true, - blankText : '请输入!', - name : "inputText", - id : "inputText", - anchor : '97.5%', - listeners : { - specialkey : function(field, ee) { + formObj = new top.Ext.FormPanel({ + id: 'tousseMaintainForm', + frame: true, + labelAlign: 'right', + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px', + labelWidth: 100, + autoHeight: true, + autoScroll: true, + items: [{ + xtype: 'hidden', + name: 'id', + id: 'id' + }, { + xtype: 'hidden', + name: 'operator', + id: 'operator' + }, { + xtype: 'hidden', + name: 'operationTime', + id: 'operationTime' + }, { + layout: 'column', + items: [{ + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: "扫描条码", + allowBlank: true, + blankText: '请输入!', + name: "inputText", + id: "inputText", + anchor: '97.5%', + listeners: { + specialkey: function (field, ee) { if (ee.getKey() == Ext.EventObject.ENTER) { var barcode = top.Ext.getCmp('inputText').getValue(); - if(barcode!=null && barcode != ""){ - BarcodeTableManager.getBarcodeTypeByBarcode(barcode,function(jsonStr){ + if (barcode != null && barcode != "") { + BarcodeTableManager.getBarcodeTypeByBarcode(barcode, function (jsonStr) { var result = Ext.util.JSON.decode(jsonStr); - if(result !=null && result !=""){ - if(result.returnType == 'user'){ + if (result != null && result != "") { + if (result.returnType == 'user') { loadUserByBarcode(barcode); - }else if(result.returnType == 'tousseInstance'){ + } else if (result.returnType == 'tousseInstance') { loadMaintainMsgByIdcardID(barcode); } - else{ - showResult('找不到该条码所对应的信息!' , null , sstsConfig.messagePauseTimeOnPackingPage); + else { + showResult('找不到该条码所对应的信息!', null, sstsConfig.messagePauseTimeOnPackingPage); } - }else{ - showResult('找不到该条码所对应的信息!' , null , sstsConfig.messagePauseTimeOnPackingPage); + } else { + showResult('找不到该条码所对应的信息!', null, sstsConfig.messagePauseTimeOnPackingPage); } top.Ext.getCmp('inputText').setValue(''); }); - }else{ - showResult('请扫描条码!' , null , sstsConfig.messagePauseTimeOnPackingPage); + } else { + showResult('请扫描条码!', null, sstsConfig.messagePauseTimeOnPackingPage); } } } } }] - },{ - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "操作类型", - name : "optType", - id : "optType", - allowBlank : false, + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: "操作类型", + name: "optType", + id: "optType", + allowBlank: false, readOnly: true, -// disabled:true, - anchor : '97.5%' + // disabled:true, + anchor: '97.5%' }] - },{ - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "器械包名称", - name : "tousseName", - id : "tousseName", - allowBlank : false, + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'hidden', + id: 'tousseDefinitionId', + name: 'tousseDefinitionId' + }, { + xtype: 'textfield', + fieldLabel: "器械包名称", + name: "tousseName", + id: "tousseName", + allowBlank: false, readOnly: true, -// disabled:true, - anchor : '97.5%' + // disabled:true, + anchor: '97.5%' }] - },{ - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "标识牌", - name : "idCardInstanceIDBarcode", - id : "idCardInstanceIDBarcode", - allowBlank : false, + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: "标识牌", + name: "idCardInstanceIDBarcode", + id: "idCardInstanceIDBarcode", + allowBlank: false, readOnly: true, -// disabled:true, - anchor : '97.5%' + // disabled:true, + anchor: '97.5%' }] - },{ - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "保养人", - name : "maintainUser", - id : "maintainUser", - allowBlank : false, + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + hidden:!sstsConfig.enableInstrumentLifeCycleTraceabilityManagement, + items: [{ + xtype: 'textfield', + fieldLabel: '器械条码', + id: 'scanMaterialBarcode', + name: 'scanMaterialBarcode', + anchor: '95%', + listeners: { + specialkey: function (thiz, e) { + if (e.getKey() == 13) { + if (thiz.getValue() !== '') { + loadInstrumentInstanceByBarcode(thiz.getValue()); + thiz.setValue(''); + } + } + } + } + }] + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + hidden:!sstsConfig.enableInstrumentLifeCycleTraceabilityManagement, + items: [{ + xtype: 'hidden', + id: 'instrumentBarcode', + name: 'instrumentBarcode' + }, { + xtype: 'textfield', + fieldLabel: '器械名称', + id: 'instrumentName', + name: 'instrumentName', + allowBlank: !sstsConfig.enableInstrumentLifeCycleTraceabilityManagement, readOnly: true, -// disabled:true, - anchor : '95%' + anchor: '95%' }] }, { - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - cls:'edit-5char-labelwidth', - items : [ { - xtype : 'datefieldWithMin', - fieldLabel : "保养时间", - name : "maintainTime", - id : "maintainTime", - blankText : '请输入保养时间!', - format : 'Y-m-d H:i', - allowBlank : false, - anchor : '97.5%' + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: "保养人", + name: "maintainUser", + id: "maintainUser", + allowBlank: false, + readOnly: true, + anchor: '95%' }] }, { - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [ { - xtype : 'textfield', - fieldLabel : "已使用次数", - name : "beenUseCount", - id : "beenUseCount", - allowBlank : false, + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + cls: 'edit-5char-labelwidth', + items: [{ + xtype: 'datefieldWithMin', + fieldLabel: "保养时间", + name: "maintainTime", + id: "maintainTime", + blankText: '请输入保养时间!', + format: 'Y-m-d H:i', + allowBlank: false, + anchor: '97.5%' + }] + }, { + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: "已使用次数", + name: "beenUseCount", + id: "beenUseCount", + allowBlank: false, readOnly: true, -// disabled:true, - anchor : '95%' - } ] + // disabled:true, + anchor: '95%' + }] }, { - layout : 'form', - columnWidth : 0.5, - labelWidth : 70, - items : [{ - xtype : 'textfield', - fieldLabel : '备注', - id : 'remark', - name : 'remark', - allowBlank : true, - anchor : '95%' + layout: 'form', + columnWidth: 0.5, + labelWidth: 70, + items: [{ + xtype: 'textfield', + fieldLabel: '备注', + id: 'remark', + name: 'remark', + allowBlank: true, + anchor: '95%' }] }] - } ], - buttons : [ { - id : 'saveBtn', - text : '保存', - handler : save + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + handler: save }, { - text : '取消', - id : 'cancel', - handler : cancel - } ] + text: '取消', + id: 'cancel', + handler: cancel + }] }); - tousseMaintainWin = new top.Ext.Window( { - id : 'tousseMaintainWin', - layout : 'fit', - title : '器械包保养信息', - width : 600, - border : false, - modal : true, - autoHeight : true, - plain : true, - items : [ formObj ] + tousseMaintainWin = new top.Ext.Window({ + id: 'tousseMaintainWin', + layout: 'fit', + title: '器械包保养信息', + width: 600, + border: false, + modal: true, + autoHeight: true, + plain: true, + items: [formObj] }); tousseMaintainWin.show(); } -function loadData(optType) -{ +function loadData(optType) { formObj.form - .load( { - url : WWWROOT + '/disinfectSystem/tousseMaintainAction!loadTousseMaintain.do', - method : 'GET', - waitMsg : '正在加载数据,请稍候', - success : function(form, action) { - if(optType != undefined && optType != '') - { - top.Ext.getCmp('optType').setValue(optType); + .load({ + url: WWWROOT + '/disinfectSystem/tousseMaintainAction!loadTousseMaintain.do', + method: 'GET', + waitMsg: '正在加载数据,请稍候', + success: function (form, action) { + if (optType != undefined && optType != '') { + top.Ext.getCmp('optType').setValue(optType); + } + }, + failure: function (form, action) { + }, + params: { + id: id } - }, - failure : function(form, action) { - }, - params : { - id : id - } - }); + }); } -function loadDataByIdCardInstanceID(idCardInstanceID,optType) -{ +function loadDataByIdCardInstanceID(idCardInstanceID, optType) { formObj.form - .load( { - url : WWWROOT + '/disinfectSystem/tousseMaintainAction!initTousseMaintainByIdCardInstanceId.do', - method : 'GET', - waitMsg : '正在加载数据,请稍候', - success : function(form, action) { - if(optType != undefined && optType != '') - { - top.Ext.getCmp('optType').setValue(optType); + .load({ + url: WWWROOT + '/disinfectSystem/tousseMaintainAction!initTousseMaintainByIdCardInstanceId.do', + method: 'GET', + waitMsg: '正在加载数据,请稍候', + success: function (form, action) { + if (optType != undefined && optType != '') { + top.Ext.getCmp('optType').setValue(optType); + } + }, + failure: function (form, action) { + }, + params: { + idCardInstanceID: idCardInstanceID } - }, - failure : function(form, action) { - }, - params : { - idCardInstanceID : idCardInstanceID - } - }); + }); } -function validateAndSubmit(){ +function validateAndSubmit() { Ext.Ajax.request({ - url : WWWROOT + '/disinfectSystem/tousseMaintainAction!validate.do', - params : {name:top.Ext.getCmp('tousseName').getValue()}, - success : function(response, options) { + url: WWWROOT + '/disinfectSystem/tousseMaintainAction!validate.do', + params: { name: top.Ext.getCmp('tousseName').getValue() }, + success: function (response, options) { var result = Ext.decode(response.responseText); - if(result.stauts==1){ - formObj.form.submit( { - url : WWWROOT + '/disinfectSystem/tousseMaintainAction!saveTousseMaintain.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - waitTitle : '提交表单', - success : function(form, action) { + if (result.stauts == 1) { + formObj.form.submit({ + url: WWWROOT + '/disinfectSystem/tousseMaintainAction!saveTousseMaintain.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + waitTitle: '提交表单', + success: function (form, action) { tousseMaintainWin.close(); - showResult('保存成功' , null , sstsConfig.messagePauseTimeOnPackingPage); - if("undefined" != typeof(grid)){ + showResult('保存成功', null, sstsConfig.messagePauseTimeOnPackingPage); + if ("undefined" != typeof (grid)) { grid.dwrReload(); } }, - failure : function(form, action) { - showResult('failure = ' + action.result.message,'error'); + failure: function (form, action) { + showResult('failure = ' + action.result.message, 'error'); top.Ext.getCmp('saveBtn').enable(); } }); - }else{ - showResult(result.message , null , sstsConfig.messagePauseTimeOnPackingPage); + } else { + showResult(result.message, null, sstsConfig.messagePauseTimeOnPackingPage); top.Ext.getCmp('saveBtn').enable(); } }, - failure : function(response, options) { + failure: function (response, options) { var result = Ext.decode(response.responseText); showResult(result.cause); } @@ -271,7 +341,7 @@ function save() { this.disable(); if (!formObj.form.isValid()) { - showResult("请正确填写表单各值" , null , sstsConfig.messagePauseTimeOnPackingPage); + showResult("请正确填写表单各值", null, sstsConfig.messagePauseTimeOnPackingPage); this.enable(); return false; } @@ -283,53 +353,53 @@ } //根据条码获取用户 -function loadUserByBarcode(barcode){ +function loadUserByBarcode(barcode) { top.Ext.getCmp('inputText').setValue(''); var setComBoVal = ''; var cleanMinutes = 0; - if(isUndefinedOrNullOrEmpty(barcode)){ - showResult('条码不能为空!' , null , sstsConfig.messagePauseTimeOnPackingPage); + if (isUndefinedOrNullOrEmpty(barcode)) { + showResult('条码不能为空!', null, sstsConfig.messagePauseTimeOnPackingPage); } - UserTableManager.getUserByBarcode(barcode,function(responseText){ - if(!isUndefinedOrNullOrEmpty(responseText)){ - var result = top.Ext.decode(responseText); - if(!result.success){ - showResult(result.message || "输入的条码有误!" , null , sstsConfig.messagePauseTimeOnPackingPage); - return; - } - top.Ext.getCmp('maintainUser').setValue(result.fullName); - }else{ - showResult('找不到该条码所对应的人员信息' , null , sstsConfig.messagePauseTimeOnPackingPage); - } - }); + UserTableManager.getUserByBarcode(barcode, function (responseText) { + if (!isUndefinedOrNullOrEmpty(responseText)) { + var result = top.Ext.decode(responseText); + if (!result.success) { + showResult(result.message || "输入的条码有误!", null, sstsConfig.messagePauseTimeOnPackingPage); + return; + } + top.Ext.getCmp('maintainUser').setValue(result.fullName); + } else { + showResult('找不到该条码所对应的人员信息', null, sstsConfig.messagePauseTimeOnPackingPage); + } + }); } //根据条码获取标识牌信息 -function loadMaintainMsgByIdcardID(barcode){ +function loadMaintainMsgByIdcardID(barcode) { top.Ext.getCmp('inputText').setValue(''); var setComBoVal = ''; var cleanMinutes = 0; - if(barcode == undefined || barcode == ''){ - showResult('条码不能为空!' , null , sstsConfig.messagePauseTimeOnPackingPage); + if (barcode == undefined || barcode == '') { + showResult('条码不能为空!', null, sstsConfig.messagePauseTimeOnPackingPage); } var optType = top.Ext.getCmp('optType').getValue(); - if(optType == '到期添加') - { - showResult("到期添加不能扫描标识牌!" , null , sstsConfig.messagePauseTimeOnPackingPage); - return; + if (optType == '到期添加') { + showResult("到期添加不能扫描标识牌!", null, sstsConfig.messagePauseTimeOnPackingPage); + return; } - TousseMaintainTableManager.getMaintainMsgByIdcardID(barcode,function(responseText){ - if(!isUndefinedOrNullOrEmpty(responseText)){ - var result = top.Ext.decode(responseText); - if(!result.success){ - showResult("输入的条码有误!" , null , sstsConfig.messagePauseTimeOnPackingPage); - return; - } - top.Ext.getCmp('tousseName').setValue(result.tousseName); - top.Ext.getCmp('beenUseCount').setValue(result.useAmount); - top.Ext.getCmp('idCardInstanceIDBarcode').setValue(result.idCardBarcode); - }else{ - showResult('找不到该条码所对应的信息' , null , sstsConfig.messagePauseTimeOnPackingPage); - } - }); + TousseMaintainTableManager.getMaintainMsgByIdcardID(barcode, function (responseText) { + if (!isUndefinedOrNullOrEmpty(responseText)) { + var result = top.Ext.decode(responseText); + if (!result.success) { + showResult("输入的条码有误!", null, sstsConfig.messagePauseTimeOnPackingPage); + return; + } + top.Ext.getCmp('tousseName').setValue(result.tousseName); + top.Ext.getCmp('tousseDefinitionId').setValue(result.tousseDefinitionId); + top.Ext.getCmp('beenUseCount').setValue(result.useAmount); + top.Ext.getCmp('idCardInstanceIDBarcode').setValue(result.idCardBarcode); + } else { + showResult('找不到该条码所对应的信息', null, sstsConfig.messagePauseTimeOnPackingPage); + } + }); } Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js =================================================================== diff -u -r40689 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js (.../materialDefinitionForm.js) (revision 40689) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/materialDefinition/materialDefinitionForm.js (.../materialDefinitionForm.js) (revision 40839) @@ -664,7 +664,7 @@ anchor : '100%' }] },{ - columnWidth : .5, + columnWidth : .33, layout : 'form', items:[{ xtype:'hidden', @@ -691,7 +691,31 @@ } }] },{ - columnWidth : .25, + columnWidth : .33, + layout : 'form', + hidden:!sstsConfig.enableInstrumentLifeCycleTraceabilityManagement, + items:[{ + xtype : 'combo', + fieldLabel : '是否管理生命周期', + id : 'manageLifecycle', + name : 'manageLifecycle', + width : 130, + valueField : 'value', + displayField : 'value', + store : new Ext.data.SimpleStore({ + fields : [ 'value' ], + data : [ ['是'], ['否']] + }), + value:'是', + editable:false, + forceSelection : true, + allowBlank: false, + mode : 'local', + triggerAction : 'all', + anchor : '100%' + }] + },{ + columnWidth : .33, layout : 'form', items:[{ xtype : 'combo', Index: ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementForm.js =================================================================== diff -u -r35988 -r40839 --- ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementForm.js (.../instrumentRepairManagementForm.js) (revision 35988) +++ ssts-web/src/main/webapp/disinfectsystem/instrumentRepairManagement/instrumentRepairManagementForm.js (.../instrumentRepairManagementForm.js) (revision 40839) @@ -26,15 +26,152 @@ win.close(); } +//扫描标识牌条码 +function loadIdCardByBarcode(barcode, index) { + PackingTableManager.getIDCardInfo(barcode, function (resultJsonStr) { + var tousseInfo = JSON.parse(resultJsonStr); + if (tousseInfo.success) { + var tousseDefinitionID = tousseInfo.idCard.tousseDefinition.id; + var name = tousseInfo.idCard.tousseDefinition.name; + if (index == undefined) { + var oldName = top.Ext4.getCmp('hiddenTousseDefinitionName').getValue(); + if (oldName !== '' && oldName !== name) { + top.Ext4.MessageBox.confirm("请确认", "当前标识牌条码和所选的器械包不匹配,是否变更器械包名称?", function (button, text) { + if ("yes" == button) { + top.Ext4.getCmp('tousseDefinitionID').setValue(tousseDefinitionID); + top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(name); + top.Ext4.getCmp('tousseDefinitionName').setRawValue(name + '(' + barcode + ')'); + top.Ext4.getCmp('idCardInstanceBarcode').setValue(barcode); + top.Ext4.getCmp('materialDefinitionID').setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); + top.Ext4.getCmp('materialDefinitionName').setValue(''); + top.Ext4.getCmp('instrumentBarcode').setValue(''); + } + }); + } else { + top.Ext4.getCmp('tousseDefinitionID').setValue(tousseDefinitionID); + top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(name); + top.Ext4.getCmp('tousseDefinitionName').setRawValue(name + '(' + barcode + ')'); + top.Ext4.getCmp('idCardInstanceBarcode').setValue(barcode); + top.Ext4.getCmp('materialDefinitionID').setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); + top.Ext4.getCmp('materialDefinitionName').setValue(''); + top.Ext4.getCmp('instrumentBarcode').setValue(''); + } + } else { + var oldName = top.Ext4.getCmp('hiddenTousseDefinitionName_' + index).getValue(); + if (oldName !== '' && oldName !== name) { + top.Ext4.MessageBox.confirm("请确认", "当前标识牌条码和所选的器械包不匹配,是否变更器械包名称?", function (button, text) { + if ("yes" == button) { + top.Ext4.getCmp('tousseDefinitionID_' + index).setValue(tousseDefinitionID); + top.Ext4.getCmp('hiddenTousseDefinitionName_' + index).setValue(name); + top.Ext4.getCmp('tousseDefinitionName_' + index).setRawValue(name + '(' + barcode + ')'); + top.Ext4.getCmp('idCardInstanceBarcode_' + index).setValue(barcode); + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(''); + top.Ext4.getCmp('materialDefinitionName_' + index).setValue(''); + top.Ext4.getCmp('instrumentBarcode_' + index).setValue(''); + } + }); + } else { + top.Ext4.getCmp('tousseDefinitionID_' + index).setValue(tousseDefinitionID); + top.Ext4.getCmp('hiddenTousseDefinitionName_' + index).setValue(name); + top.Ext4.getCmp('tousseDefinitionName_' + index).setRawValue(name + '(' + barcode + ')'); + top.Ext4.getCmp('idCardInstanceBarcode_' + index).setValue(barcode); + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(''); + top.Ext4.getCmp('materialDefinitionName_' + index).setValue(''); + top.Ext4.getCmp('instrumentBarcode_' + index).setValue(''); + } + } + } + else { + showResult(tousseInfo.message); + } + }); +} + +function loadInstrumentInstanceByBarcode(instrumentBarcode, index) { + var tousseDefinitionId = ''; + if (index == undefined) { + tousseDefinitionId = top.Ext4.getCmp('tousseDefinitionID').getValue(); + } else { + tousseDefinitionId = top.Ext4.getCmp('tousseDefinitionID_' + index).getValue(); + } + if (tousseDefinitionId == '') { + showResult('请先扫描标识牌!') + return + } + var params = { + instrumentBarcode: instrumentBarcode, + tousseDefinitionId: tousseDefinitionId + } + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/instrumentInstanceController/loadInstrumentInstanceByBarcode.mhtml', + params: params, + success: function (response, options) { + var result = top.Ext4.JSON.decode(response.responseText); + if (result.success) { + if (result.data && result.data.instrumentBarcode) { + var instrumentBarcode = result.data.instrumentBarcode; + var materialDefinitionName = result.data.materialDefinitionName; + var materialDefinitionId = result.data.materialDefinitionId; + if (index == undefined) { + var oldName = top.Ext4.getCmp('hiddenMaterialDefinitionName').getValue(); + if (oldName !== '' && oldName !== materialDefinitionName) { + top.Ext4.MessageBox.confirm("请确认", "当前器械条码和所选的器械不匹配,是否变更器械名称?", function (button, text) { + if ("yes" == button) { + top.Ext4.getCmp('materialDefinitionID').setValue(materialDefinitionId); + top.Ext4.getCmp('materialDefinitionName').setRawValue(materialDefinitionName + '(' + instrumentBarcode + ')'); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(materialDefinitionName); + top.Ext4.getCmp('instrumentBarcode').setValue(instrumentBarcode); + } + }); + } else { + top.Ext4.getCmp('materialDefinitionID').setValue(materialDefinitionId); + top.Ext4.getCmp('materialDefinitionName').setRawValue(materialDefinitionName + '(' + instrumentBarcode + ')'); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(materialDefinitionName); + top.Ext4.getCmp('instrumentBarcode').setValue(instrumentBarcode); + } + } else { + var oldName = top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).getValue(); + if (oldName !== '' && oldName !== materialDefinitionName) { + top.Ext4.MessageBox.confirm("请确认", "当前器械条码和所选的器械不匹配,是否变更器械名称?", function (button, text) { + if ("yes" == button) { + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(materialDefinitionId); + top.Ext4.getCmp('materialDefinitionName_' + index).setRawValue(materialDefinitionName + '(' + instrumentBarcode + ')'); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(materialDefinitionName); + top.Ext4.getCmp('instrumentBarcode_' + index).setValue(instrumentBarcode); + } + }); + } else { + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(materialDefinitionId); + top.Ext4.getCmp('materialDefinitionName_' + index).setRawValue(materialDefinitionName + '(' + instrumentBarcode + ')'); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(materialDefinitionName); + top.Ext4.getCmp('instrumentBarcode_' + index).setValue(instrumentBarcode); + } + } + } else { + showResult('该所属器械包的器械不存在'); + } + } else { + showResult(result.message); + } + } + }); +} + //保存器械维修记录 function saveForm() { var registrantName = top.Ext4.getCmp('registrantName').getRawValue(); var registerDateTime = top.Ext4.getCmp('registerDateTime').getRawValue(); var repairStatus = top.Ext4.getCmp('repairStatus').getValue(); - var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName').getRawValue(); + var materialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName').getRawValue(); var materialDefinitionID = top.Ext4.getCmp('materialDefinitionID').getValue(); - var tousseDefinitionName = top.Ext4.getCmp('tousseDefinitionName').getRawValue(); + var tousseDefinitionName = top.Ext4.getCmp('hiddenTousseDefinitionName').getRawValue(); var tousseDefinitionID = top.Ext4.getCmp('tousseDefinitionID').getValue(); + var idCardInstanceBarcode = top.Ext4.getCmp('idCardInstanceBarcode').getValue(); + var instrumentBarcode = top.Ext4.getCmp('instrumentBarcode').getValue(); var amount = top.Ext4.getCmp('amount').getValue(); var roomNumber = top.Ext4.getCmp('roomNumber').getValue(); var washHandNurseName = top.Ext4.getCmp('washHandNurseName').getRawValue(); @@ -66,30 +203,57 @@ } } } + if (idCardInstanceBarcode == '') { + showResult('请扫描标识牌条码!') + return + } + if (instrumentBarcode == '') { + showResult('请扫描器械条码!') + return + } var tousseMaterialInfo = [{ amount: amount, materialDefinitionID: materialDefinitionID, tousseDefinitionID: tousseDefinitionID, tousseDefinitionName: tousseDefinitionName, - materialDefinitionName: materialDefinitionName + materialDefinitionName: materialDefinitionName, + idCardInstanceBarcode: idCardInstanceBarcode, + instrumentBarcode: instrumentBarcode }] if (tousseArray.length > 0) { + var msg = ''; for (var i = 0; i < tousseArray.length; i++) { var j = tousseArray[i]; - var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName_' + j).getRawValue(); + var materialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName_' + j).getRawValue(); var materialDefinitionID = top.Ext4.getCmp('materialDefinitionID_' + j).getValue(); - var tousseDefinitionName = top.Ext4.getCmp('tousseDefinitionName_' + j).getRawValue(); + var tousseDefinitionName = top.Ext4.getCmp('hiddenTousseDefinitionName_' + j).getRawValue(); var tousseDefinitionID = top.Ext4.getCmp('tousseDefinitionID_' + j).getValue(); + var idCardInstanceBarcode = top.Ext4.getCmp('idCardInstanceBarcode_' + j).getValue(); + var instrumentBarcode = top.Ext4.getCmp('instrumentBarcode_' + j).getValue(); + if (idCardInstanceBarcode == '') { + msg = '请扫描标识牌条码!'; + break; + } + if (instrumentBarcode == '') { + msg = '请扫描器械条码!'; + break; + } var amount = top.Ext4.getCmp('amount_' + j).getValue(); tousseMaterialInfo.push({ amount: amount, materialDefinitionID: materialDefinitionID, tousseDefinitionID: tousseDefinitionID, tousseDefinitionName: tousseDefinitionName, - materialDefinitionName: materialDefinitionName + materialDefinitionName: materialDefinitionName, + idCardInstanceBarcode: idCardInstanceBarcode, + instrumentBarcode: instrumentBarcode }) } + if (msg !== '') { + showResult(msg) + return + } } var params = { id: id, @@ -209,19 +373,25 @@ for (var i = 0; i < item.instrumentRepairGoodsList.length; i++) { var list = item.instrumentRepairGoodsList[i]; if (i == 0) { - top.Ext4.getCmp('materialDefinitionName').setValue(list.materialDefinitionName); + top.Ext4.getCmp('materialDefinitionName').setValue(list.materialDefinitionName + '(' + list.instrumentBarcode + ')'); top.Ext4.getCmp('materialDefinitionID').setValue(list.materialDefinitionID); - top.Ext4.getCmp('tousseDefinitionName').setRawValue(list.tousseDefinitionName); + top.Ext4.getCmp('tousseDefinitionName').setRawValue(list.tousseDefinitionName + '(' + list.idCardInstanceBarcode + ')'); top.Ext4.getCmp('tousseDefinitionID').setValue(list.tousseDefinitionID); + top.Ext4.getCmp('idCardInstanceBarcode').setValue(list.idCardInstanceBarcode); + top.Ext4.getCmp('instrumentBarcode').setValue(list.instrumentBarcode); top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(list.tousseDefinitionName); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(list.materialDefinitionName); top.Ext4.getCmp('amount').setValue(list.amount); } else { addTousseItems(i); - top.Ext4.getCmp('materialDefinitionName_' + i).setValue(list.materialDefinitionName); + top.Ext4.getCmp('materialDefinitionName_' + i).setValue(list.materialDefinitionName + '(' + list.instrumentBarcode + ')'); top.Ext4.getCmp('materialDefinitionID_' + i).setValue(list.materialDefinitionID); - top.Ext4.getCmp('tousseDefinitionName_' + i).setRawValue(list.tousseDefinitionName); + top.Ext4.getCmp('tousseDefinitionName_' + i).setRawValue(list.tousseDefinitionName + '(' + list.idCardInstanceBarcode + ')'); top.Ext4.getCmp('tousseDefinitionID_' + i).setValue(list.tousseDefinitionID); + top.Ext4.getCmp('idCardInstanceBarcode_' + i).setValue(list.idCardInstanceBarcode); + top.Ext4.getCmp('instrumentBarcode_' + i).setValue(list.instrumentBarcode); top.Ext4.getCmp('hiddenTousseDefinitionName_' + i).setValue(list.tousseDefinitionName); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + i).setValue(list.materialDefinitionName); top.Ext4.getCmp('amount_' + i).setValue(list.amount); tousseArray.push(i); } @@ -326,11 +496,10 @@ //添加器械包块 function addTousseItems(index) { - var item = [, { + var item = [{ columnWidth: 0.29, layout: 'form', border: 0, - id: 'itemBox4_' + index, style: 'margin-bottom:10px', items: [{ xtype: 'hidden', @@ -341,6 +510,14 @@ id: 'hiddenTousseDefinitionName_' + index, name: 'hiddenTousseDefinitionName_' + index }, { + xtype: 'hidden', + id: 'idCardInstanceBarcode_' + index, + name: 'idCardInstanceBarcode_' + index + }, { + xtype: 'hidden', + id: 'instrumentBarcode_' + index, + name: 'instrumentBarcode_' + index + }, { xtype: 'combo', fieldLabel: '所属器械包', id: 'tousseDefinitionName_' + index, @@ -354,6 +531,7 @@ forceSelection: false, triggerAction: 'all', hideTrigger: true, + disabled: true, typeAhead: false, allowBlank: false, anchor: '95%', @@ -378,103 +556,151 @@ } }] }, { - columnWidth: 0.01, - layout: 'form', - border: 0, - id: 'itemBox2_' + index, - items: [{ - xtype: 'displayfield', - fieldLabel: '' - }] - }, { - columnWidth: 0.03, - layout: 'form', - border: 0, - id: 'itemBox3_' + index, - items: [{ - xtype: 'button', - tooltip: '删除', - iconCls: 'btn_ext_application_del', - style: 'margin-top:2px', - handler: function () { - delTousseItems(index); + columnWidth: 0.01, + layout: 'form', + border: 0, + items: [{ + xtype: 'displayfield', + fieldLabel: '' + }] + }, { + columnWidth: 0.03, + layout: 'form', + border: 0, + items: [{ + xtype: 'button', + tooltip: '删除', + iconCls: 'btn_ext_application_del', + style: 'margin-top:2px', + handler: function () { + delTousseItems(index); + } + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + hidden: sstsConfig.disableIdCard, + items: [{ + xtype: 'textfield', + id: 'scanIdCardBarcode_' + index, + fieldLabel: "标识牌条码", + componentCls: 'formItemMgn', + anchor: '95%', + enableKeyEvents: true, + listeners: { + keypress: function (thiz, e, eOpts) { + if (e.getKey() == 13) { + if (thiz.getValue() !== '') { + loadIdCardByBarcode(thiz.getValue(), index); + thiz.setValue(''); + } + } } - }] - }, { - columnWidth: 0.33, - layout: 'form', - border: 0, - style: 'margin-bottom:10px', - id: 'itemBox1_' + index, - items: [{ - xtype: 'hidden', - id: 'materialDefinitionID_' + index, - name: 'materialDefinitionID_' + index - }, { - xtype: 'hidden', - id: 'hiddenMaterialDefinitionName_' + index, - name: 'hiddenMaterialDefinitionName_' + index - }, { - xtype: 'combo', - fieldLabel: '器械名称', - id: 'materialDefinitionName_' + index, - name: 'materialDefinitionName_' + index, - queryParam: 'spell', - minChars: 0, - valueField: 'name', - displayField: 'name', - store: getMaterialDefinition(index), - lazyInit: true, - triggerAction: 'all', - hideTrigger: true, - typeAhead: false, - allowBlank: false, - anchor: '60%', - listeners: { - select: function (combo, record, zIndex) { - top.Ext4.getCmp('materialDefinitionID_' + index).setValue(record[0].data.id); - top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(record[0].data.name); - }, - blur: function (field) { - var hiddenMaterialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).getValue(); - var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName_' + index).getRawValue(); - if (materialDefinitionName !== hiddenMaterialDefinitionName) { - top.Ext4.getCmp('materialDefinitionID_' + index).setValue(''); - top.Ext4.getCmp('materialDefinitionName_' + index).setValue(''); - top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(''); + } + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'numberfield', + allowDecimals: false, + minValue: 1, + name: 'amount_' + index, + id: 'amount_' + index, + fieldLabel: "数量", + allowBlank: false, + blankText: '数量不能为空', + anchor: '95%', + disabled: true, + value: 1 + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'textfield', + fieldLabel: '器械条码', + id: 'scanMaterialBarcode_' + index, + name: 'scanMaterialBarcode_' + index, + anchor: '95%', + listeners: { + specialkey: function (thiz, e) { + if (e.getKey() == 13) { + if (thiz.getValue() !== '') { + loadInstrumentInstanceByBarcode(thiz.getValue(), index); + thiz.setValue(''); } } } - }] + } + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'hidden', + id: 'materialDefinitionID_' + index, + name: 'materialDefinitionID_' + index }, { - columnWidth: 0.33, - layout: 'form', - border: 0, - id: 'itemBox5_' + index, - style: 'margin-bottom:10px', - items: [{ - xtype: 'numberfield', - allowDecimals: false, - minValue: 1, - name: 'amount_' + index, - id: 'amount_' + index, - fieldLabel: "数量", - allowBlank: false, - blankText: '数量不能为空', - anchor: '95%', - value: 1 - }] + xtype: 'hidden', + id: 'hiddenMaterialDefinitionName_' + index, + name: 'hiddenMaterialDefinitionName_' + index + }, { + xtype: 'combo', + fieldLabel: '器械名称', + id: 'materialDefinitionName_' + index, + name: 'materialDefinitionName_' + index, + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: getMaterialDefinition(index), + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + disabled: true, + allowBlank: false, + anchor: '60%', + listeners: { + select: function (combo, record, zIndex) { + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(record[0].data.id); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(record[0].data.name); + }, + blur: function (field) { + var hiddenMaterialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).getValue(); + var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName_' + index).getRawValue(); + if (materialDefinitionName !== hiddenMaterialDefinitionName) { + top.Ext4.getCmp('materialDefinitionID_' + index).setValue(''); + top.Ext4.getCmp('materialDefinitionName_' + index).setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName_' + index).setValue(''); + } + } + } }] - top.Ext4.getCmp('tousseItem').add(item); + }] + var items = [{ + columnWidth: 1, + layout: 'column', + border: 0, + id: 'tousseItem_' + index, + items: item + }] + + top.Ext4.getCmp('tousseItem').add(items); } //删除器械包块 function delTousseItems(index) { - top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('itemBox1_' + index)); - top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('itemBox2_' + index)); - top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('itemBox3_' + index)); - top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('itemBox4_' + index)); - top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('itemBox5_' + index)); + top.Ext4.getCmp('tousseItem').remove(top.Ext4.getCmp('tousseItem_' + index)); var resultArr = []; for (var i = 0; i < tousseArray.length; i++) { if (tousseArray[i] !== index) { @@ -648,145 +874,209 @@ } }] }, { - columnWidth: 0.29, - layout: 'form', + columnWidth: 1, + layout: 'column', border: 0, - style: 'margin-bottom:10px', items: [{ - xtype: 'hidden', - id: 'tousseDefinitionID', - name: 'tousseDefinitionID' + columnWidth: 0.29, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'hidden', + id: 'tousseDefinitionID', + name: 'tousseDefinitionID' + }, { + xtype: 'hidden', + id: 'hiddenTousseDefinitionName', + name: 'hiddenTousseDefinitionName' + }, { + xtype: 'hidden', + id: 'idCardInstanceBarcode', + name: 'idCardInstanceBarcode' + }, { + xtype: 'hidden', + id: 'instrumentBarcode', + name: 'instrumentBarcode' + }, { + xtype: 'combo', + fieldLabel: '所属器械包', + id: 'tousseDefinitionName', + name: 'tousseDefinitionName', + queryParam: 'spell', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: tousseDefinitionStore, + lazyInit: true, + disabled: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: false, + anchor: '95%', + listeners: { + select: function (combo, record, index) { + top.Ext4.getCmp('tousseDefinitionID').setValue(record[0].data.id); + top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(record[0].data.name); + top.Ext4.getCmp('materialDefinitionID').setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); + top.Ext4.getCmp('materialDefinitionName').setValue(''); + top.Ext4.getCmp('materialDefinitionName').getStore().reload(); + }, + blur: function (field) { + var hiddenTousseDefinitionName = top.Ext4.getCmp('hiddenTousseDefinitionName').getValue(); + var tousseDefinitionName = top.Ext4.getCmp('tousseDefinitionName').getRawValue(); + if (tousseDefinitionName !== hiddenTousseDefinitionName) { + top.Ext4.getCmp('tousseDefinitionID').setValue(''); + top.Ext4.getCmp('tousseDefinitionName').setValue(''); + top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(''); + top.Ext4.getCmp('idCardInstanceBarcode').setValue(''); + top.Ext4.getCmp('instrumentBarcode').setValue(''); + } + } + } + }] }, { - xtype: 'hidden', - id: 'hiddenTousseDefinitionName', - name: 'hiddenTousseDefinitionName' + columnWidth: 0.01, + layout: 'form', + border: 0, + items: [{ + xtype: 'displayfield', + fieldLabel: '' + }] }, { - xtype: 'combo', - fieldLabel: '所属器械包', - id: 'tousseDefinitionName', - name: 'tousseDefinitionName', - queryParam: 'spell', - minChars: 0, - valueField: 'id', - displayField: 'name', - store: tousseDefinitionStore, - lazyInit: true, - triggerAction: 'all', - hideTrigger: true, - typeAhead: false, - allowBlank: false, - anchor: '95%', - listeners: { - select: function (combo, record, index) { - top.Ext4.getCmp('tousseDefinitionID').setValue(record[0].data.id); - top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(record[0].data.name); - top.Ext4.getCmp('materialDefinitionID').setValue(''); - top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); - top.Ext4.getCmp('materialDefinitionName').setValue(''); - top.Ext4.getCmp('materialDefinitionName').getStore().reload(); - }, - blur: function (field) { - var hiddenTousseDefinitionName = top.Ext4.getCmp('hiddenTousseDefinitionName').getValue(); - var tousseDefinitionName = top.Ext4.getCmp('tousseDefinitionName').getRawValue(); - if (tousseDefinitionName !== hiddenTousseDefinitionName) { - top.Ext4.getCmp('tousseDefinitionID').setValue(''); - top.Ext4.getCmp('tousseDefinitionName').setValue(''); - top.Ext4.getCmp('hiddenTousseDefinitionName').setValue(''); + columnWidth: 0.03, + layout: 'form', + border: 0, + items: [{ + xtype: 'button', + tooltip: '添加', + iconCls: 'btn_ext_add', + style: 'margin-top:2px', + handler: function () { + tousseCount++; + tousseArray.push(tousseCount); + addTousseItems(tousseCount); + } + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + hidden: sstsConfig.disableIdCard, + items: [{ + xtype: 'textfield', + id: 'scanIdCardBarcode', + fieldLabel: "标识牌条码", + componentCls: 'formItemMgn', + anchor: '95%', + enableKeyEvents: true, + listeners: { + keypress: function (thiz, e, eOpts) { + if (e.getKey() == 13) { + if (thiz.getValue() !== '') { + loadIdCardByBarcode(thiz.getValue()); + thiz.setValue(''); + } + } } } - } - }] - }, { - columnWidth: 0.01, - layout: 'form', - border: 0, - items: [{ - xtype: 'displayfield', - fieldLabel: '' - }] - }, { - columnWidth: 0.03, - layout: 'form', - border: 0, - items: [{ - xtype: 'button', - tooltip: '添加', - iconCls: 'btn_ext_add', - style: 'margin-top:2px', - handler: function () { - tousseCount++; - tousseArray.push(tousseCount); - addTousseItems(tousseCount); - } - }] - }, { - columnWidth: 0.33, - layout: 'form', - border: 0, - style: 'margin-bottom:10px', - items: [{ - xtype: 'hidden', - id: 'materialDefinitionID', - name: 'materialDefinitionID' + }] }, { - xtype: 'hidden', - id: 'hiddenMaterialDefinitionName', - name: 'hiddenMaterialDefinitionName' + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'numberfield', + allowDecimals: false, + minValue: 1, + name: 'amount', + id: 'amount', + fieldLabel: "数量", + allowBlank: false, + disabled: true, + blankText: '数量不能为空', + anchor: '95%', + value: 1 + }] }, { - xtype: 'combo', - fieldLabel: '器械名称', - id: 'materialDefinitionName', - name: 'materialDefinitionName', - queryParam: 'spell', - minChars: 0, - valueField: 'name', - displayField: 'name', - store: getMaterialDefinition(), - lazyInit: true, - triggerAction: 'all', - hideTrigger: true, - typeAhead: false, - allowBlank: false, - anchor: '60%', - listeners: { - select: function (combo, record, index) { - top.Ext4.getCmp('materialDefinitionID').setValue(record[0].data.id); - top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(record[0].data.name); - }, - blur: function (field) { - var hiddenMaterialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName').getValue(); - var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName').getRawValue(); - if (materialDefinitionName !== hiddenMaterialDefinitionName) { - top.Ext4.getCmp('materialDefinitionID').setValue(''); - top.Ext4.getCmp('materialDefinitionName').setValue(''); - top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'textfield', + fieldLabel: '器械条码', + id: 'scanMaterialBarcode', + name: 'scanMaterialBarcode', + anchor: '95%', + listeners: { + specialkey: function (thiz, e) { + if (e.getKey() == 13) { + if (thiz.getValue() !== '') { + loadInstrumentInstanceByBarcode(thiz.getValue()); + thiz.setValue(''); + } + } } } - } + }] + }, { + columnWidth: 0.33, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'hidden', + id: 'materialDefinitionID', + name: 'materialDefinitionID' + }, { + xtype: 'hidden', + id: 'hiddenMaterialDefinitionName', + name: 'hiddenMaterialDefinitionName' + }, { + xtype: 'combo', + fieldLabel: '器械名称', + id: 'materialDefinitionName', + name: 'materialDefinitionName', + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: getMaterialDefinition(), + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + disabled: true, + typeAhead: false, + allowBlank: false, + anchor: '60%', + listeners: { + select: function (combo, record, index) { + top.Ext4.getCmp('materialDefinitionID').setValue(record[0].data.id); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(record[0].data.name); + }, + blur: function (field) { + var hiddenMaterialDefinitionName = top.Ext4.getCmp('hiddenMaterialDefinitionName').getValue(); + var materialDefinitionName = top.Ext4.getCmp('materialDefinitionName').getRawValue(); + if (materialDefinitionName !== hiddenMaterialDefinitionName) { + top.Ext4.getCmp('materialDefinitionID').setValue(''); + top.Ext4.getCmp('materialDefinitionName').setValue(''); + top.Ext4.getCmp('hiddenMaterialDefinitionName').setValue(''); + top.Ext4.getCmp('instrumentBarcode').setValue(''); + } + } + } + }] }] }, { - columnWidth: 0.33, - layout: 'form', - border: 0, - style: 'margin-bottom:10px', - items: [{ - xtype: 'numberfield', - allowDecimals: false, - minValue: 1, - name: 'amount', - id: 'amount', - fieldLabel: "数量", - allowBlank: false, - blankText: '数量不能为空', - anchor: '95%', - value: 1 - }] - }, { columnWidth: 1, layout: 'column', border: 0, - id: 'tousseItem', - style: 'margin-bottom:10px' + id: 'tousseItem' }, { columnWidth: 0.33, layout: 'form', Index: ssts-web/src/main/webapp/homepage/portalPage.js =================================================================== diff -u -r40823 -r40839 --- ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 40823) +++ ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 40839) @@ -1177,6 +1177,151 @@ return flag; } +//BJDXZLYY-70:菜单是否在配置里 +function desktopShortcutIconsConfigFun(itemId) { + var arr = [ + 'cardinalNumManage', + 'sterilizerDelivery', + 'deviceMaintenance', + 'deviceMaintenanceCustom', + 'foreignProxySterilizationManage', + 'foreignTousseApplication', + 'customform', + 'tousseGoodsStockView', + 'operationReservationView', + 'idCardInstance', + 'tousseReturnDisinfect', + 'returnGoodsRecordView', + 'instrumentInstanceView' + ] + + //高值耗材的几个图标不显示 + var expensiveArr = [ + 'expensiveGoodsApplication', + 'expensiveGodownEntryPurchase', + 'expensiveGodownEntryPrepareIn', + 'expensiveInvoicePlan', + 'expensiveInvoice', + 'expensiveBill', + 'expensiveStockTake', + 'myUnFinishedTask', + 'myFinishedTask', + 'expensiveGoodsInstanceView', + 'expensiveEnterpriseView' + ] + + if (expensiveArr.indexOf(itemId) >= 0) { + return true + } + + if (!sstsConfig.portal_showComboToussePackingIcon && itemId == 'comboToussePacking') { + return true; + } + + if (!sstsConfig.toussePicturesShow && itemId == 'toussePictures') { + return true; + } + + if (!sstsConfig.enableInstrumentRepairManagement && itemId == 'instrumentRepair') { + return true; + } + + //如果没有启手术仪器管理功能,则桌面图标不显示 + if (!sstsConfig.enableSurgicalInstrumentsManagement && itemId == 'instrumentGoods') { + return true; + } + + //如果没有库位管理功能,则桌面图标不显示 + if (!sstsConfig.enableWarehousePositionModule && (itemId == 'storageLocationManager' || itemId == 'storageLocationLook' || itemId == 'tousseAccess')) { + return true; + } + + //如果当前图标是物品签收2,配置的是1或者未配置,隐藏图标 + if ((sstsConfig.signModuleVersion == 1 || !sstsConfig.signModuleVersion) && itemId == 'goodsReceiptVersion2') { + return true; + } + + //如果当前图标是物品签收1,配置的是2,隐藏图标 + if ((sstsConfig.signModuleVersion == 2) && itemId == 'goodsReceipt') { + return true; + } + + if (sstsConfig.desktopShortcutIconsConfig) { + var arr = sstsConfig.desktopShortcutIconsConfig || []; + + //基数管理图标 + if (arr.indexOf('基数管理') == -1 && itemId == 'cardinalNumManage') { + return true; + } + //灭菌员发货图标 + if (arr.indexOf('灭菌员发货') == -1 && itemId == 'sterilizerDelivery') { + return true; + } + //设备维护信息图标 + if (arr.indexOf('设备维护信息') >= 0) { + //设备维护(之前的非自定义配置的版本) + if (itemId == 'deviceMaintenance' && sstsConfig.isDeviceMaintenanceCus) { + return true; + } + + //设备维护(自定义配置版本) + if (itemId == 'deviceMaintenanceCustom' && !sstsConfig.isDeviceMaintenanceCus) { + return true; + } + } else if (arr.indexOf('设备维护信息') == -1 && (itemId == 'deviceMaintenance' || itemId == 'deviceMaintenanceCustom')) { + return true; + } + + //外部代理灭菌图标 + if (arr.indexOf('外部代理灭菌') == -1 && itemId == 'foreignProxySterilizationManage') { + return true; + } + + //如果不是使用版本2或者3并且不启用外来器械桌面图标显示,则隐藏申请外来器械图标 + if (arr.indexOf('外来器械申请') == -1 && itemId == 'foreignTousseApplication') { + return true; + } + + //自定义表单图标 + if (arr.indexOf('自定义表单') == -1 && itemId == 'customform') { + return true; + } + + //器械包库存图标 + if (arr.indexOf('器械包库存') == -1 && itemId == 'tousseGoodsStockView') { + return true; + } + + //手术预约管理图标 + if (arr.indexOf('手术预约管理') == -1 && itemId == 'operationReservationView') { + return true; + } + + if ((!sstsConfig.enableInstrumentRepairManagement || arr.indexOf('器械维修') == -1) && itemId == 'instrumentRepair') { + return true; + } + + if ((sstsConfig.disableIdCard || arr.indexOf('标识牌信息') == -1) && itemId == 'idCardInstance') { + return true; + } + if ((arr.indexOf('器械包返消') == -1) && itemId == 'tousseReturnDisinfect') { + return true; + } + //GZFDZL-163:退货记录管理图标 + if (arr.indexOf('退货记录管理') == -1 && itemId == 'returnGoodsRecordView') { + return true; + } + //GZFDZL-163:退货记录管理图标 + if (arr.indexOf('器械生命周期管理') == -1 && itemId == 'instrumentInstanceView') { + return true; + } + } else { + if (arr.indexOf(itemId) >= 0) { + return true + } + } +} + /** * 解析portalPage.xml配置的某个人桌面功能图标. * @param portalPage @@ -1197,19 +1342,7 @@ if (notInWhiteList2(itemId)) { return returnContent; } - //高值耗材的几个图标不显示 - if (itemId == 'expensiveGoodsApplication' || itemId == 'expensiveGodownEntryPurchase' || itemId == 'expensiveGodownEntryPrepareIn' - || itemId == 'expensiveInvoicePlan' || itemId == 'expensiveInvoice' || itemId == 'expensiveBill' - || itemId == 'expensiveStockTake' || itemId == 'myUnFinishedTask' || itemId == 'myFinishedTask' || itemId == 'expensiveGoodsInstanceView' || itemId == 'expensiveEnterpriseView') { - return returnContent; - } - if (!sstsConfig.portal_showComboToussePackingIcon && itemId == 'comboToussePacking') { - return returnContent; - } - //如果没有启手术仪器管理功能,则桌面图标不显示 - if (!sstsConfig.enableSurgicalInstrumentsManagement && itemId == 'instrumentGoods') { - return returnContent; - } else if (sstsConfig.enableSurgicalInstrumentsManagement && itemId == 'instrumentGoods') { + if (sstsConfig.enableSurgicalInstrumentsManagement && itemId == 'instrumentGoods') { //GDSRMYY-575:手术仪器管理自定义名称 var title = item['title']; if (sstsConfig.aliasNameOfSurgicalInstrumentsManagement) { @@ -1230,88 +1363,12 @@ return returnContent; } - if (!sstsConfig.toussePicturesShow && itemId == 'toussePictures') { + if (desktopShortcutIconsConfigFun(itemId)) { return returnContent; } - if (sstsConfig.desktopShortcutIconsConfig) { - var arr = sstsConfig.desktopShortcutIconsConfig || []; - - //基数管理图标 - if (arr.indexOf('基数管理') == -1 && itemId == 'cardinalNumManage') { - return returnContent; - } - //灭菌员发货图标 - if (arr.indexOf('灭菌员发货') == -1 && itemId == 'sterilizerDelivery') { - return returnContent; - } - //设备维护信息图标 - if (arr.indexOf('设备维护信息') >= 0) { - //设备维护(之前的非自定义配置的版本) - if (itemId == 'deviceMaintenance' && sstsConfig.isDeviceMaintenanceCus) { - return returnContent; - } - - //设备维护(自定义配置版本) - if (itemId == 'deviceMaintenanceCustom' && !sstsConfig.isDeviceMaintenanceCus) { - return returnContent; - } - } else if (arr.indexOf('设备维护信息') == -1 && (itemId == 'deviceMaintenance' || itemId == 'deviceMaintenanceCustom')) { - return returnContent; - } - - //外部代理灭菌图标 - if (arr.indexOf('外部代理灭菌') == -1 && itemId == 'foreignProxySterilizationManage') { - return returnContent; - } - - //如果不是使用版本2或者3并且不启用外来器械桌面图标显示,则隐藏申请外来器械图标 - if (arr.indexOf('外来器械申请') == -1 && itemId == 'foreignTousseApplication') { - return returnContent; - } - - //自定义表单图标 - if (arr.indexOf('自定义表单') == -1 && itemId == 'customform') { - return returnContent; - } - - //器械包库存图标 - if (arr.indexOf('器械包库存') == -1 && itemId == 'tousseGoodsStockView') { - return returnContent; - } - - //手术预约管理图标 - if (arr.indexOf('手术预约管理') == -1 && itemId == 'operationReservationView') { - return returnContent; - } - - if ((!sstsConfig.enableInstrumentRepairManagement || arr.indexOf('器械维修') == -1) && itemId == 'instrumentRepair') { - return returnContent; - } - - if ((sstsConfig.disableIdCard || arr.indexOf('标识牌信息') == -1) && itemId == 'idCardInstance') { - return returnContent; - } - if ((arr.indexOf('器械包返消') == -1) && itemId == 'tousseReturnDisinfect') { - return returnContent; - } - //GZFDZL-163:退货记录管理图标 - if (arr.indexOf('退货记录管理') == -1 && itemId == 'returnGoodsRecordView') { - return returnContent; - } - } else { - if (itemId == 'cardinalNumManage' || itemId == 'sterilizerDelivery' || itemId == 'deviceMaintenance' || itemId == 'deviceMaintenanceCustom' || itemId == 'foreignProxySterilizationManage' || itemId == 'foreignTousseApplication' || itemId == 'customform' || itemId == 'tousseGoodsStockView' || itemId == 'operationReservationView' || itemId == 'idCardInstance' || itemId == 'tousseReturnDisinfect' || itemId == 'returnGoodsRecordView') { - return returnContent; - } - if (!sstsConfig.enableInstrumentRepairManagement && itemId == 'instrumentRepair') { - return returnContent; - } - } - - //如果没有开启库位管理功能,则桌面图标不显示 - if (!sstsConfig.enableWarehousePositionModule && (itemId == 'storageLocationManager' || itemId == 'storageLocationLook' || itemId == 'tousseAccess')) { - return returnContent; - } else if (sstsConfig.enableWarehousePositionModule && (itemId == 'storageLocationManager' || itemId == 'storageLocationLook' || itemId == 'tousseAccess')) { + //开启库位管理功能 + if (sstsConfig.enableWarehousePositionModule && (itemId == 'storageLocationManager' || itemId == 'storageLocationLook' || itemId == 'tousseAccess')) { if (quickJumpGroupStorageArr.length == 1) { var itemLinkUrl; var title; @@ -1356,16 +1413,6 @@ } } - //如果当前图标是物品签收2,配置的是1或者未配置,隐藏图标 - if (itemId == 'goodsReceiptVersion2' && (sstsConfig.signModuleVersion == 1 || !sstsConfig.signModuleVersion)) { - return returnContent; - } - - //如果当前图标是物品签收1,配置的是2,隐藏图标 - if (itemId == 'goodsReceipt' && (sstsConfig.signModuleVersion == 2)) { - return returnContent; - } - //发货计划 if (itemId == 'invoicePlan' && sstsConfig.enableBorrowInvoicePlanSeperateSend) { returnContent += '
  • ';