diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index 5b5fe2d3..2976ea12 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -256,6 +256,12 @@ } }, + + getTodayDate() { + var today = new Date(); // 创建Date对象 + var dateString =today.getTime(); // 拼接成日期字符串 + return dateString; + }, setDataBatch(result){ try { console.log(222,result) @@ -281,6 +287,10 @@ r.fromLocationCode == result.fromLocationCode&& r.isRecommend==true }) + if(!itemDetail1){ + itemDetail1 = {...result.package,masterId:this.jobContent.id} + } + console.log(itemDetail1) if (itemDetail == undefined) { // this.showErrorMessage("批次【" + batch + "】" + "不在列表中") var newAdd = { @@ -291,13 +301,14 @@ handleQty:Number(result.label.qty), qty:detail.qty, toLocationCode:this.toLocationCode ? this.toLocationCode : this.jobToLocationCode, - // inventoryStatus:inventoryStatus, - // toInventoryStatus:inventoryStatus, + inventoryStatus:'OK', + toInventoryStatus:'OK', packQty:Number(result.package.packQty), packUnit:result.package.packUnit, balance:{}, isRecommend:false, - isNewAdd:"newAdd" + isNewAdd:"newAdd", + arriveDate:itemDetail1.arriveDate||this.getTodayDate() } // newAdd.balance.balanceQty = Number(result.balance.qty); newAdd.balance.packQty = Number(result.package.packQty) @@ -313,9 +324,10 @@ itemDetail.handleQty = Number(result.label.qty); itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail .toLocationCode; - itemDetail.packQty = Number(result.package.packQty) + itemDetail.packQty = Number(result.package.SpackQty) itemDetail.packUnit = result.package.packUnit itemDetail.labelQty = Number(result.label.qty); + itemDetail.expireDate=result.package.expireDate, itemDetail.balance={} itemDetail.balance.packQty = Number(result.package.packQty)