Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r31316 -r31440 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 31316) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 31440) @@ -1368,22 +1368,55 @@ text : '保存', hidden:(isWashAgain ? true : false), handler : function(){ - this.disable(); - var success = save(); - if(!success){ - this.enable(); + var root = top.Ext.getCmp('basketTreePanel').getRootNode(); + var that = this; + if(materialStore.getCount() == 0 && root.childNodes.length == 0){ + top.Ext.MessageBox.confirm("请确认", "没有添加清洗的物品,继续清洗吗?",function (button, text) { + if ("yes" == button) { + that.disable(); + var success = save(); + if(!success){ + that.enable(); + } + } else { + return false; + } + }); + }else { + that.disable(); + var success = save(); + if(!success){ + that.enable(); + } } } },{ id:'washAgainBtn', text : '重新清洗', hidden:(isWashAgain ? false : true), handler : function(){ - this.disable(); - top.Ext.getCmp("id").setValue(""); - var success = save(); - if(!success){ - this.enable(); + var root = top.Ext.getCmp('basketTreePanel').getRootNode(); + var that = this; + if(materialStore.getCount() == 0 && root.childNodes.length == 0){ + top.Ext.MessageBox.confirm("请确认", "没有添加清洗的物品,继续清洗吗?",function (button, text) { + if ("yes" == button) { + that.disable(); + top.Ext.getCmp("id").setValue(""); + var success = save(); + if(!success){ + that.enable(); + } + } else { + return false; + } + }); + }else { + that.disable(); + top.Ext.getCmp("id").setValue(""); + var success = save(); + if(!success){ + that.enable(); + } } } }, { @@ -1638,13 +1671,6 @@ return false; } - var root = top.Ext.getCmp('basketTreePanel').getRootNode(); - - if(materialStore.getCount() == 0 && root.childNodes.length == 0){ - showResult('不能添加空的清洗记录!'); - setHiddenFieldsAllowBlank(false); - return false; - } // 校验责任人 if(!personInChargeAllowBlank){ if(isAnyBasketPersonInChargeBlank()){