Index: ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js =================================================================== diff -u -r34058 -r34061 --- ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (.../form.js) (revision 34058) +++ ssts-web/src/main/webapp/disinfectsystem/consumptiveMaterial/consumptiveMaterialContainer/form.js (.../form.js) (revision 34061) @@ -425,6 +425,10 @@ showResult('数量不能为空或0!'); return; } + if (amount < 0) { + showResult('数量不能小于0'); + return; + } var item = { warehouseId: warehouseId, warehouseName: warehouseName, Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r34060 -r34061 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34060) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 34061) @@ -727,8 +727,66 @@ } +function loadRinserBindConsumptiveMaterialContainer(value){ + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadRinserBindConsumptiveMaterialContainer.do', + params: { + rinserName: value + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; + top.Ext.getCmp('totalAmount').setValue(consumptiveMaterialVolumes); + if(consumptiveMaterialVolumes !== ''){ + top.Ext.getCmp('hiddenBox1').show(); + }else { + top.Ext.getCmp('hiddenBox1').hide(); + } + }else { + top.Ext.getCmp('hiddenBox1').hide(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showResult("系统加载失败,请稍候再试"); + } + }) +} + +function getCleanMethodConsumptionVolume(id){ + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!getCleanMethodConsumptionVolume.do', + params: { + id: id + }, + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; + if(consumptiveMaterialVolumes !== ''){ + top.Ext.getCmp('consumptiveMaterialVolumes').setValue(consumptiveMaterialVolumes); + top.Ext.getCmp('hiddenBox2').show(); + }else { + top.Ext.getCmp('hiddenBox2').hide(); + } + }else { + top.Ext.getCmp('hiddenBox2').hide(); + } + }, + failure: function (response, options) { + var result = Ext.decode(response.responseText); + showResult("系统加载失败,请稍候再试"); + } + }) +} + +var oldRinserName = ''; +var oldDisinfectProgram = ''; var washBasketTreePanelTitle = '清洗篮筐'; function addAndEditWashAndDisinfectRecord(id, isWashAgain) { + oldRinserName = ''; + oldDisinfectProgram = ''; personInChargeAllowBlank = getBoolValueFromJs('sstsConfig.washAndDisinfectRecordPersonInChargeAllowBlank', true); this.id = id; materialStore.removeAll(); @@ -1154,30 +1212,7 @@ }); DWREngine.setAsync(true); if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ - Ext.Ajax.request({ - url: WWWROOT + '/disinfectSystem/consumptiveMaterialContainerAction!loadRinserBindConsumptiveMaterialContainer.do', - params: { - rinserName: value - }, - success: function (response, options) { - var result = Ext.decode(response.responseText); - if (result.success) { - var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; - top.Ext.getCmp('totalAmount').setValue(consumptiveMaterialVolumes); - if(consumptiveMaterialVolumes !== ''){ - top.Ext.getCmp('hiddenBox1').show(); - }else { - top.Ext.getCmp('hiddenBox1').hide(); - } - }else { - top.Ext.getCmp('hiddenBox1').hide(); - } - }, - failure: function (response, options) { - var result = Ext.decode(response.responseText); - showResult("系统加载失败,请稍候再试"); - } - }) + loadRinserBindConsumptiveMaterialContainer(value); } // } } @@ -1238,30 +1273,7 @@ } }); if(sstsConfig.enableRinserConsumptiveMaterialConsumptionFunction){ - Ext.Ajax.request({ - url: WWWROOT + '/disinfectSystem/baseData/cleanMethodAction!getCleanMethodConsumptionVolume.do', - params: { - id: record.data.id - }, - success: function (response, options) { - var result = Ext.decode(response.responseText); - if (result.success) { - var consumptiveMaterialVolumes = result.consumptiveMaterialVolumes || ''; - if(consumptiveMaterialVolumes !== ''){ - top.Ext.getCmp('consumptiveMaterialVolumes').setValue(consumptiveMaterialVolumes); - top.Ext.getCmp('hiddenBox2').show(); - }else { - top.Ext.getCmp('hiddenBox2').hide(); - } - }else { - top.Ext.getCmp('hiddenBox2').hide(); - } - }, - failure: function (response, options) { - var result = Ext.decode(response.responseText); - showResult("系统加载失败,请稍候再试"); - } - }) + getCleanMethodConsumptionVolume(record.data.id); } } }, @@ -1694,6 +1706,8 @@ } }); top.Ext.getCmp('washLoadResult').setValue("1"); + oldRinserName = action.result.data.disinfectIdentification || ''; + oldDisinfectProgram = action.result.data.disinfectProgram || ''; }, failure: function (form, action) { top.Ext.getCmp('washLoadResult').setValue("-1"); @@ -1978,13 +1992,12 @@ if (sstsConfig.enableValidationOfDisinfectProgram && !isStopSave) { validateDisinfectProgram = '是'; } - - + Ext.getCmp('washSaveSubmitResult').setValue("0"); top.Ext.getCmp("disinfectProgram").setValue(disinfectProgram); formObj.form.submit({ url: WWWROOT + '/disinfectSystem/washAndDisinfect/washAndDisinfectRecordAction!saveWashAndDisinfectRecord.do', - params: { conCurrent: conCurrent, orgWashStartTime: orgWashStartTime, orgWashEndTime: orgWashEndTime, washPersonInCharge: washPersonInCharge, washPersonInChargeCode: washPersonInChargeCode, validateDisinfectProgram: validateDisinfectProgram }, + params: { conCurrent: conCurrent, orgWashStartTime: orgWashStartTime, orgWashEndTime: orgWashEndTime, washPersonInCharge: washPersonInCharge, washPersonInChargeCode: washPersonInChargeCode, validateDisinfectProgram: validateDisinfectProgram, oldrinserName: oldrinserName, oldDisinfectProgram: oldDisinfectProgram }, method: 'POST', waitMsg: '正在保存数据,请稍候', waitTitle: '提交表单',