Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r25124 -r25132 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 25124) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 25132) @@ -126,6 +126,24 @@ var barcode = rows[i].data['barcode']; sendOutGoodsStore.remove(rows[i]); + + + var isSameTypeBarcodeCount = top.Ext.getCmp("isSameTypeBarcodeCount").getValue(); + if(isSameTypeBarcodeCount=="1"){ + top.Ext.getCmp('isSameTypeBarcodeCount').setValue(""); + top.Ext.getCmp('isSameTypeBarcode').setValue(""); + } + else if(isSameTypeBarcodeCount!="1"&&isSameTypeBarcodeCount!=""){ + var newStr = parseInt(isSameTypeBarcodeCount)+1; + top.Ext.getCmp('isSameTypeBarcodeCount').setValue(newStr); + top.Ext.getCmp('isSameTypeBarcode').setValue(""); + } + else{ + + } + + + if(goods.tousseType == '聚合包' && sstsConfig.comboTousseSendByWrapperTousse){ adjustComboTousseAppListAoumt(goods, 'sub'); continue; @@ -698,6 +716,58 @@ showResult('请先选择仓库!' , null , sstsConfig.messagePauseTimeOnInvoiceplanPage); return false; } + + + //isSameTypeBarcode.push("asdfa"); + //top.Ext.getCmp('sourceWarehouseName').setValue(name); + //top.Ext.getCmp("scanTextEnd").getValue() + + + var isSameTypeBarcode = top.Ext.getCmp("isSameTypeBarcode").getValue(); + var newArr = []; + //判断初次扫码 + if(isSameTypeBarcode==""||isSameTypeBarcode=="[]"){ + isSameTypeBarcode = barcode; + //newArr.push(barcode); + top.Ext.getCmp('isSameTypeBarcode').setValue(isSameTypeBarcode); + top.Ext.getCmp('isSameTypeBarcodeCount').setValue("1"); + } + else{ + var isBatch = /^[0-9]*$/ ;//数字 + var isDisposable = /^[0-9a-zA-Z]+$/; + isSameTypeBarcode = isSameTypeBarcode; + if(isBatch.test(isSameTypeBarcode)){//若为批次扫码 + if(isBatch.test(barcode)){ + var isSameTypeBarcodeCount = top.Ext.getCmp("isSameTypeBarcodeCount").getValue(); + isSameTypeBarcodeCount = parseInt(isSameTypeBarcodeCount); + isSameTypeBarcodeCount = isSameTypeBarcodeCount+1; + top.Ext.getCmp('isSameTypeBarcodeCount').setValue(isSameTypeBarcodeCount); + } + else{ + showResult('请扫描批次条码!' , null , true); + return false; + //不同类别 + } + } + if(!isBatch.test(isSameTypeBarcode)){//若为一次性条码扫码 isDisposable.test(isSameTypeBarcode) + if(!isBatch.test(barcode)){ + var isSameTypeBarcodeCount = top.Ext.getCmp("isSameTypeBarcodeCount").getValue(); + isSameTypeBarcodeCount = parseInt(isSameTypeBarcodeCount); + isSameTypeBarcodeCount = isSameTypeBarcodeCount+1; + top.Ext.getCmp('isSameTypeBarcodeCount').setValue(isSameTypeBarcodeCount); + } + else{ + showResult('请扫描一次性条码!' , null , true); + return false; + //不同类别 + } + } + else{} + } + + + + if(singleMode){// 判断是否已经扫描过该条码 var goods = getSendOutGoodsByBarcode(barcode); if(goods != null){ @@ -877,7 +947,6 @@ url : WWWROOT + '/disinfectSystem/invoiceAction!loadGoodsByBarcode.do', params : {barcode : barcode,orgUnitCoding : orgUnitCoding,sourceWarehouseId: sourceWarehouseId}, success : function(response, options) { - //console.log("信息:"+JSON.stringify(response)); top.Ext.getCmp("sendOutGoods").getEl().unmask(); var result = Ext.decode(response.responseText); @@ -932,17 +1001,16 @@ var goods = result.data[x]; //yu - //console.log("all:"+response.responseText+";goods.tousseFixedBarcode:"+goods.tousseFixedBarcode+";goods.diposable:"+goods.diposable+";goods.tousseType:"+goods.tousseType+";errMsg:"+goods.errMsg); // 聚合包的处理 if(goods.tousseType == '聚合包'){ processComboTousse(goods,speakBasket); continue; } // 扫描多个包时,固定条码包直接忽略 -// if((result.data.length > 1) && goods.tousseFixedBarcode){// 扫单个包才提示 -// continue; -// } + if((result.data.length > 1) && goods.tousseFixedBarcode){// 扫单个包才提示 + continue; + } var b = isBarcodeRepeat(goods.barcode); if(b && (goods.diposable == '是' || !goods.tousseFixedBarcode || goods.tousseType==EXPENSIVEGOODS_TYPE_NAME)){// 扫描多个时,如果存在已扫描的,直接忽略,跳过 @@ -1012,32 +1080,11 @@ if(!isUndefinedOrNullOrEmpty(goods.showResult)){ showResult(goods.showResult , null , sstsConfig.messagePauseTimeOnInvoiceplanPage); } - // yu 固定条码 - - // if(已扫描物品(左边列表)不包含此物品定义条码) 前面已做判断 - // if(在发货计划内(参考扫描一次性物品批次的处理)) 前面record已做判断 - // 待发数量amount - // if(amount == 0){ 验证发货数量是否大于申请数量 改 注释块已做判断 - - - if(goods.diposable == '是' && goods.tousseType=="一次性物品定义"){ - //根据返回的物品库存storage,判断库存是否足以发货 - if(storage == 0){ - continue; - } - } - // 固定条码 end + var goodsName = goods.name; // 验证是否为申请的物品 -// var b = isInvoiceGoods(goodsName); -// if(!b){ -// if(result.data.length == 1){// 扫单个包才提示 -// showResult('['+getTtsNameByGoods(goods)+']不在发货计划中!'); -// } -// continue; -// } + - if (sstsConfig.biologicalMonitoringEnable && biologicalMonitoringWarning) { //发货时对含植入物的器械包,进行是否紧急发货以及生物监测情况的提示 if (goods.biologicalMonitoringFail) { //生物监测不合格 showResult('[' + goods.name + ']生物监测结果为不合格,不能发货' , null , sstsConfig.messagePauseTimeOnInvoiceplanPage); @@ -1284,6 +1331,7 @@ var invoicePlanFormOpened = false; var g_orgUnitCoding = ''; function addAndEditInvoicePlan(orgUnitCoding,depart,invoicePlanId) { + //发货计划 if(invoicePlanFormOpened){ return; } @@ -1708,8 +1756,19 @@ xtype : 'hidden', name : 'warehouseID', id : 'warehouseID' - },{ + }, + { xtype : 'hidden', + name : 'isSameTypeBarcode', + id : 'isSameTypeBarcode' + }, + { + xtype : 'hidden', + name : 'isSameTypeBarcodeCount', + id : 'isSameTypeBarcodeCount' + }, + { + xtype : 'hidden', name : 'warehouseName', id : 'warehouseName' },{