Index: ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js =================================================================== diff -u -r19714 -r19871 --- ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 19714) +++ ssts-web/src/main/webapp/buttjoint/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 19871) @@ -87,26 +87,16 @@ }, success : function(response, options) { var result = response.responseText; - if (result != "" && result != "{}") { + if (result) { var goodsInfo = Ext4.decode(result); - - if(!goodsInfo.success || goodsInfo.success != true){ - showResult(goodsInfo.error); + if(goodsInfo.success != true){ + showResult(goodsInfo.message); return; } if(goodsInfo.tousseType != '一次性物品'){ - //检测该器械包有没有被召回 - if('msg' in goodsInfo){ - showResult(goodsInfo.msg); - return; - } var validTime = goodsInfo.validUntil; var currentTime = Ext4.util.Format.date(new Date(), 'Y-m-d'); - if(goodsInfo.status == '已退货'){ - showResult('该器械包已退货,不能被使用!'); - return; - } // 未签收的器械包不能登记使用记录 if(goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord == false){ showResult('该器械包未签收,不能被使用!'); Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interfereUseRecordForm.js =================================================================== diff -u -r19362 -r19871 --- ssts-web/src/main/webapp/disinfectsystem/interfere/interfereUseRecordForm.js (.../interfereUseRecordForm.js) (revision 19362) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interfereUseRecordForm.js (.../interfereUseRecordForm.js) (revision 19871) @@ -126,26 +126,16 @@ }, success: function (response, options) { var result = response.responseText; - if (result != "" && result != "{}") { + if (result) { var goodsInfo = Ext.util.JSON.decode(result); - - if (!goodsInfo.success || goodsInfo.success != true) { - showResult(goodsInfo.error); - return; - } + if(goodsInfo.success != true){ + showResult(goodsInfo.message); + return; + } if (goodsInfo.tousseType != '一次性物品') { - //检测该器械包有没有被召回 - if ('msg' in goodsInfo) { - showResult(goodsInfo.msg); - return; - } var validTime = goodsInfo.validUntil; var currentTime = Ext.util.Format.date(new Date(), 'Y-m-d'); - if (goodsInfo.status == '已退货') { - showResult('该器械包已退货,不能被使用!'); - return; - } // 未签收的器械包不能登记使用记录 if (goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord == false) { showResult('该器械包未签收,不能被使用!'); @@ -154,13 +144,7 @@ if ((goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord != false) || goodsInfo.status == hadSigned) { if (!compareDate(currentTime, validTime)) { showResult('该器械包已过期!'); - } /*else if(goodsInfo.locationForDisplay != top.Ext.getCmp('depart').getValue()){ - if(top.Ext.getCmp('depart').getValue() == ''){ - showResult('该器械包不属于本科室!'); - }else{ - showResult('该器械包不属于'+top.Ext.getCmp('depart').getValue()+'!'); - } - }*/ else { + } else { function addTousse() { var record = new addTousseInstance({ id: goodsInfo.id, Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js =================================================================== diff -u -r19714 -r19871 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 19714) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordForm.js (.../useRecordForm.js) (revision 19871) @@ -141,26 +141,16 @@ }, success : function(response, options) { var result = response.responseText; - if (result != "" && result != "{}") { + if (result) { var goodsInfo = Ext.util.JSON.decode(result); - - if(!goodsInfo.success || goodsInfo.success != true){ - showResult(goodsInfo.error); + if(goodsInfo.success != true){ + showResult(goodsInfo.message); return; } if(goodsInfo.tousseType != '一次性物品'){ - //检测该器械包有没有被召回 - if('msg' in goodsInfo){ - showResult(goodsInfo.msg); - return; - } var validTime = goodsInfo.validUntil; var currentTime = Ext.util.Format.date(new Date(), 'Y-m-d'); - if(goodsInfo.status == '已退货'){ - showResult('该器械包已退货,不能被使用!'); - return; - } // 未签收的器械包不能登记使用记录 if(goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord == false){ showResult('该器械包未签收,不能被使用!'); @@ -169,13 +159,7 @@ if ((goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord != false)|| goodsInfo.status == hadSigned) { if (!compareDate(currentTime, validTime)) { showResult('该器械包已过期!'); - } /*else if(goodsInfo.locationForDisplay != top.Ext.getCmp('depart').getValue()){ - if(top.Ext.getCmp('depart').getValue() == ''){ - showResult('该器械包不属于本科室!'); - }else{ - showResult('该器械包不属于'+top.Ext.getCmp('depart').getValue()+'!'); - } - }*/else { + } else { function addTousse(){ var record = new addTousseInstance({ id : goodsInfo.id,