Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js =================================================================== diff -u -r34048 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (.../view.js) (revision 34048) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.js (.../view.js) (revision 34071) @@ -1,8 +1,36 @@ var listStore; var listGrid; +var rinserGridStore; +var typeGridStore; Ext4.onReady(function () { Ext4.QuickTips.init(); + rinserGridStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/rinserAction!getRinserNoBindContainer.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + typeGridStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do', + reader: { + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); var columns = [ { header: "id", dataIndex: 'id', hidden: true }, { header: "容器名称", dataIndex: 'name', width: 150 }, Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r34066 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34066) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34071) @@ -740,6 +740,7 @@ if (result.success) { var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; top.Ext.getCmp('totalAmount').setValue(consumptiveMaterialVolumes); + top.Ext.getCmp('consumptiveMaterialContainerId').setValue(result.consumptiveMaterialContainerId) if(consumptiveMaterialVolumes !== ''){ top.Ext.getCmp('hiddenBox1').show(); }else { @@ -1272,8 +1273,8 @@ top.Ext.getCmp('cleanParameter').setValue(result); } }); - var totalAmount = top.Ext.getCmp('totalAmount').getValue() || ''; - if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction && totalAmount !== ''){ + var consumptiveMaterialContainerId = top.Ext.getCmp('consumptiveMaterialContainerId').getValue() || ''; + if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction && consumptiveMaterialContainerId !== ''){ getCleanMethodConsumptionVolume(record.data.id); } } @@ -1324,6 +1325,10 @@ layout: 'form', id:'hiddenBox1', items: [{ + xtype:'hidden', + id:'consumptiveMaterialContainerId', + name:'consumptiveMaterialContainerId' + },{ xtype: 'textfield', fieldLabel: "设备耗材余量", name: "totalAmount", @@ -1519,7 +1524,8 @@ if ("yes" == button) { if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ var totalAmount = top.Ext.getCmp('totalAmount').getValue(); - if(totalAmount == ''){ + var consumptiveMaterialContainerId = top.Ext.getCmp('consumptiveMaterialContainerId').getValue(); + if(consumptiveMaterialContainerId !== '' && totalAmount == ''){ top.Ext.MessageBox.confirm("请确认", "当前设备绑定的清洗耗材容器没有配置清洗耗材,是否继续操作?", function (button, text) { if ("yes" == button) { that.disable(); @@ -2030,7 +2036,8 @@ if (validate) { if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ var totalAmount = top.Ext.getCmp('totalAmount').getValue() || ''; - if(totalAmount == ''){ + var consumptiveMaterialContainerId = top.Ext.getCmp('consumptiveMaterialContainerId').getValue(); + if(consumptiveMaterialContainerId == '' && totalAmount == ''){ showResult('该设备没有绑定清洗耗材容器'); } } Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js =================================================================== diff -u -r34037 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 34037) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/diposableGoods/diposableGoodsView.js (.../diposableGoodsView.js) (revision 34071) @@ -1498,18 +1498,16 @@ top.Ext.getCmp("orginalApplicationSpecification").setValue(disposableGoods.applicationSpecification); top.Ext.getCmp("orginalTransferScale").setValue(disposableGoods.transferScale); top.Ext.getCmp("orginalMiddlePackageUnit").setValue(disposableGoods.middlePackageUnit); - if((disposableGoods.consumptiveMaterialUse || '') !== ''){ + if(disposableGoods.consumptiveMaterialType && disposableGoods.consumptiveMaterialType !== ''){ top.Ext.getCmp("isConsumptiveMaterial").setValue('是'); top.Ext.getCmp("consumptiveMaterialUse").setValue(disposableGoods.consumptiveMaterialUse); top.Ext.getCmp("consumptiveMaterialUseBox").show(); - if(disposableGoods.consumptiveMaterialType && disposableGoods.consumptiveMaterialType !== ''){ - var id = disposableGoods.consumptiveMaterialType.id; - var name = disposableGoods.consumptiveMaterialType.name; - var unit = disposableGoods.consumptiveMaterialType.unit; - top.Ext.getCmp("consumptiveMaterialTypeId").setValue(id); - top.Ext.getCmp("consumptiveMaterialType").setValue(name); - top.Ext.getCmp("volumeUnit").setValue(unit); - } + var id = disposableGoods.consumptiveMaterialType.id; + var name = disposableGoods.consumptiveMaterialType.name; + var unit = disposableGoods.consumptiveMaterialType.unit; + top.Ext.getCmp("consumptiveMaterialTypeId").setValue(id); + top.Ext.getCmp("consumptiveMaterialType").setValue(name); + top.Ext.getCmp("volumeUnit").setValue(unit); }else { if(top.Ext.getCmp('isConsumptiveMaterial')){ top.Ext.getCmp("isConsumptiveMaterial").setValue('否'); Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js =================================================================== diff -u -r34040 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 34040) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/cleanmethod/cleanMethodForm.js (.../cleanMethodForm.js) (revision 34071) @@ -304,30 +304,28 @@ if (result.stauts == 1) { var cleanMethodConsumptionVolumes = []; if (sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction) { - var msg = ''; if (listStore.getCount() == 0) { showResult('该清洗程序没有配置耗材!'); - top.Ext.getCmp('saveBtn').enable(); - top.Ext.getCmp('saveAndPrint').enable(); - return; - } - for (var i = 0; i < listStore.getCount(); i++) { - var item = listStore.getAt(i); - if (item.data.volume == '') { - msg = '请填写消耗容量!'; - continue + }else { + var msg = ''; + for (var i = 0; i < listStore.getCount(); i++) { + var item = listStore.getAt(i); + if (item.data.volume == '') { + msg = '请填写消耗容量!'; + continue + } + cleanMethodConsumptionVolumes.push({ + consumptiveMaterialTypeId: item.data.consumptiveMaterialTypeId, + volume: item.data.volume + }) } - cleanMethodConsumptionVolumes.push({ - consumptiveMaterialTypeId: item.data.consumptiveMaterialTypeId, - volume: item.data.volume - }) + if (msg !== '') { + showResult(msg); + top.Ext.getCmp('saveBtn').enable(); + top.Ext.getCmp('saveAndPrint').enable(); + return; + } } - if (msg !== '') { - showResult(msg); - top.Ext.getCmp('saveBtn').enable(); - top.Ext.getCmp('saveAndPrint').enable(); - return; - } } formObj.form.submit({ url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!saveCleanMethod.do', Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js =================================================================== diff -u -r34064 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (.../view.js) (revision 34064) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.js (.../view.js) (revision 34071) @@ -254,11 +254,11 @@ width: 80, dataIndex: 'useAmount' }, { - header: '消耗剩余容量', + header: '耗材余量', width: 120, dataIndex: 'consumptiveMaterialVolumn' }, { - header: '容量单位', + header: '单位', width: 80, dataIndex: 'consumptiveMaterialTypeUnit' }, { Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r34037 -r34071 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34037) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 34071) @@ -634,7 +634,7 @@ children:[ {hidden : false,text:"清洗耗材种类管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialType/view.jsp',hrefTarget:linkTarget,leaf:true}, {hidden : false,text:"清洗耗材容器管理",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/view.jsp',hrefTarget:linkTarget,leaf:true}, - {hidden : false,text:"清洗耗材使用记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp',hrefTarget:linkTarget,leaf:true}, + {hidden : false,text:"清洗耗材消耗记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialUseRecord/view.jsp',hrefTarget:linkTarget,leaf:true}, {hidden : false,text:"清洗耗材补充记录",href:WWWROOT+'/disinfectsystem/consumptiveMaterial/consumptiveMaterialAddRecord/view.jsp',hrefTarget:linkTarget,leaf:true} ] },{ Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js =================================================================== diff -u -r34066 -r34071 --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (.../form.js) (revision 34066) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (.../form.js) (revision 34071) @@ -118,7 +118,7 @@ var count = rightGridStore.getCount(); for (var i = 0; i < count; i++) { var item = rightGridStore.getAt(i); - if (item && item.data.id == id) { + if (item && item.data.consumptiveMaterialTypeId == id) { rightGridStore.remove(item); } } @@ -511,7 +511,13 @@ text: '绑定', iconCls: 'btn_ext_application_add', handler: function () { - showBindRinserWindow(); + rinserGridStore.load(function(result){ + if(result.length > 0){ + showBindRinserWindow(); + }else { + showResult('目前无可绑定的清洗机!'); + } + }); } }] }); @@ -520,20 +526,6 @@ //显示绑定清洗机的窗口 function showBindRinserWindow() { - var rinserGridStore = new Ext4.data.Store({ - proxy: { - type: 'ajax', - url: WWWROOT + '/disinfectSystem/baseData/rinserAction!getRinserNoBindContainer.do', - reader: { - root: 'data' - } - }, - fields: [ - { name: 'id', mapping: 'id' }, - { name: 'name', mapping: 'name' } - ] - }); - rinserGridStore.load(); var rinserGrid = new top.Ext4.grid.Panel({ id: 'rinserGrid', store: rinserGridStore, @@ -634,9 +626,8 @@ menuDisabled: true, width: 100, renderer: function (v, p, record) { - var id = record.data.id; var consumptiveMaterialTypeId = record.data.consumptiveMaterialTypeId; - return ""; + return ""; } }], height: 380, @@ -648,7 +639,13 @@ text: '绑定', iconCls: 'btn_ext_application_add', handler: function () { - showBindTypeWindow(); + typeGridStore.load(function(result){ + if(result.length > 0){ + showBindTypeWindow(); + }else { + showResult('目前无可绑定的清洗耗材种类,请先添加!'); + } + }); } }] }); @@ -657,20 +654,6 @@ //显示绑定清洗耗材种类的窗口 function showBindTypeWindow() { - var typeGridStore = new Ext4.data.Store({ - proxy: { - type: 'ajax', - url: WWWROOT + '/disinfectSystem/consumptiveMaterialTypeAction!loadConsumptiveMaterialTypes.do', - reader: { - root: 'data' - } - }, - fields: [ - { name: 'id', mapping: 'id' }, - { name: 'name', mapping: 'name' } - ] - }); - typeGridStore.load(); var typeGrid = new top.Ext4.grid.Panel({ id: 'typeGrid', store: typeGridStore,