Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r14774 -r14933 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 14774) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 14933) @@ -479,10 +479,12 @@ if(exceedAmountNames.hasOwnProperty(goods.name)){ continue; } - var record = findRecordByNameAndValueFromStore(recyclingapplicationStore,"name",goods.name); +// var record = findRecordByNameAndValueFromStore(recyclingapplicationStore,"name",goods.name); + var record = findRecordByGoodsVOFromRecyclingApplication(goods); + // 如果未找到,继续找下一个 if (record == undefined){ - showResult('['+goods.name+']不在发货计划中!'); + showResult('['+goods.tousseType+']'+'['+goods.name+']不在发货计划中!'); continue; } //申请数量 @@ -551,6 +553,31 @@ return false; } +//function getTypeName(diposable){ +// if(diposable == '是'){ +// return '一次性物品'; +// } +//} +// +function findRecordByGoodsVOFromRecyclingApplication(vo) { + for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) { + var record = recyclingapplicationStore.getAt(i); + var name = record.get('name'); + var diposable = record.get('diposable'); + if(name == vo.name && diposable != vo.diposable){ + var msg = '待发物品['+name+']为一次性物品,请扫描批次条码!'; + if(diposable != '是'){ + msg = '待发物品['+name+']为器械包,请扫描器械包条码!'; + } + showResult(msg); + return null; + } + if(name == vo.name && diposable == vo.diposable){ + return record; + } + } + return null; +} //刷新库存 function refreshStorage(warehouseId){ // if(lastLoadWarehouseId != null && lastLoadWarehouseId == warehouseId){ Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoiceGoodsVo.java =================================================================== diff -u -r13855 -r14933 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoiceGoodsVo.java (.../InvoiceGoodsVo.java) (revision 13855) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoiceGoodsVo.java (.../InvoiceGoodsVo.java) (revision 14933) @@ -3,6 +3,8 @@ */ package com.forgon.disinfectsystem.entity.invoicemanager; +import com.forgon.tools.Constants; + /** * @author WangYi * 2013-8-20 下午3:05:52 @@ -19,7 +21,7 @@ private Integer count; - private String diposable; + private String diposable = Constants.STR_NO; private String price;