diff --git a/src/common/record.js b/src/common/record.js index 10c6e606..de6c44e7 100644 --- a/src/common/record.js +++ b/src/common/record.js @@ -48,7 +48,23 @@ export function createDetailInfo(balance, pack) { return detail; } +export function createDetailInfoForLabel(balance, pack,label) { + balance.scaned = true; + // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus; + // data.inventoryStatus = data.inventoryStatus; + let detail = deepCopyData(balance); + detail.balanceQty = new Decimal(detail.qty).toNumber() + detail.qty = new Decimal(detail.qty).toNumber(); + detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0 + detail.packUnit = pack.packUnit + console.log(988,label.qty) + detail.handleQty = new Decimal(label.qty).toNumber(); + detail.package = pack; + detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的 + detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的 + return detail; +} export function createDetailByPackInfo(pack) { diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue index 6c1f9269..8e583b13 100644 --- a/src/mycomponents/package/packageCard.vue +++ b/src/mycomponents/package/packageCard.vue @@ -6,7 +6,7 @@ - + diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index f442f672..9f34d28d 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -155,11 +155,9 @@ // title: '解析中...', // mask: true // }) - console.log(222) let that = this; // if(index==-1){ // that.sc - console.log(that.scanMsg.includes('\n')) if (that.scanMsg.includes('\n')) { // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; setTimeout(() => { diff --git a/src/pages/issue/record/directIssueByBatch.vue b/src/pages/issue/record/directIssueByBatch.vue index 2c8a1ab0..3f0919e7 100644 --- a/src/pages/issue/record/directIssueByBatch.vue +++ b/src/pages/issue/record/directIssueByBatch.vue @@ -81,6 +81,7 @@ createItemInfo, createDetailInfo, calcHandleQty, + createDetailInfoForLabel } from '@/common/record.js'; import { @@ -251,7 +252,7 @@ }) if (item == undefined) { var itemp = createItemInfo(balance, pack); - let newDetail = createDetailInfo(balance, pack); // + let newDetail = createDetailInfoForLabel(balance, pack,label); itemp.subList.push(newDetail); this.detailSource.push(itemp) } else { @@ -263,7 +264,7 @@ } }) if (detail == undefined) { - let newDetail = createDetailInfo(balance, pack); + let newDetail = createDetailInfoForLabel(balance, pack,label); item.subList.push(newDetail); } else { detail.handleQty =calc.add(detail.handleQty, result.label.qty) diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index a96f9c75..8c8a8dd0 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -467,6 +467,7 @@ } } } else if (result.label.labelType == "PurchaseLabel") { + debugger var packingNumber = result.package.number; var parentpackingNumber = result.package.parentNumber; var batch = result.label.batch; @@ -492,7 +493,7 @@ } else { let isScan = false if(packingNumber){ - isScan = this.packingNumberList.some(item=>item == packingNumber) + isScan = this.packList.some(item=>item == packingNumber) }else{ isScan = false } @@ -502,7 +503,8 @@ pack.handleQty = calc.add(pack.handleQty,result.label.qty) } else { - this.packingNumberList.push(packingNumber) + this.packList.push(packingNumber) + pack.packList.push(packingNumber) pack.scaned = true pack.scanDate = new Date(); pack.handleQty = Number(result.label.qty);