From 76e85974b0dca13caee98123dfa22c4fe354100d Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Wed, 11 Dec 2024 16:17:52 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86=E9=87=87=E8=B4=AD=E6=95=B0?=
=?UTF-8?q?=E9=87=8F=E5=92=8C=E9=87=87=E8=B4=AD=E5=8D=95=E4=BD=8D=EF=BC=8C?=
=?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/detail.js | 3 +++
src/common/label.js | 2 +-
src/mycomponents/qty/recommendHandleQty.vue | 8 ++++++++
src/mycomponents/scan/winComScan.vue | 1 +
src/pages/purchaseReceipt/job/receiptDetail.vue | 11 +++++++----
5 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/common/detail.js b/src/common/detail.js
index a4a580f9..74928801 100644
--- a/src/common/detail.js
+++ b/src/common/detail.js
@@ -112,6 +112,9 @@ export function createItemInfo(detail) {
itemName: detail.itemName,
packQty: Number(detail.packQty) || undefined,
packUnit: detail.packUnit,
+ supplierQty: Number(detail.supplierQty) || undefined,
+ supplierUom: detail.supplierUom?detail.supplierUom:'',
+ convertRate: detail.convertRate?detail.convertRate:'',
qty: Number(detail.qty),
handleQty: 0,
uom: detail.uom,
diff --git a/src/common/label.js b/src/common/label.js
index c54fcc2a..20c55f55 100644
--- a/src/common/label.js
+++ b/src/common/label.js
@@ -194,7 +194,7 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
labelResult.label.header = item;
} else if (type == 'V') {
labelResult.label.version = item;
- } else {
+ }else {
let barcode = labelItem.label.subList.find(code => code.prefixChar.toUpperCase() ==
type
.toUpperCase());
diff --git a/src/mycomponents/qty/recommendHandleQty.vue b/src/mycomponents/qty/recommendHandleQty.vue
index 20ac670d..d3cb856e 100644
--- a/src/mycomponents/qty/recommendHandleQty.vue
+++ b/src/mycomponents/qty/recommendHandleQty.vue
@@ -10,6 +10,14 @@
{{Number(dataContent.qty)}}
+
+ |
+
+ {{Number(dataContent.supplierQty) || 0}}
+
+
+
+
diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue
index 5f2e2c31..f9f109c8 100644
--- a/src/mycomponents/scan/winComScan.vue
+++ b/src/mycomponents/scan/winComScan.vue
@@ -190,6 +190,7 @@
if (scanResult.success) {
that.clear();
// that.getfocus();//不能自动获取焦点
+ console.log(88,scanResult)
that.$emit("getResult", scanResult);
} else {
that.clear();
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 08d9d5fe..d2ce20cb 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -282,6 +282,7 @@
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.detailSource = getTreeDataSource(that.subList)
+ console.log(333,that.detailSource)
that.isCheckLocation = getSwitchInfoByCode(that.isCheckLocation)
if (that.isCheckLocation) {
that.toLocationCode = ""
@@ -528,6 +529,9 @@
// 当前批次剩余可以扫进的数量大于当前扫描的标签数量的时候直接插入当前的批次
if(handleQtySub >= parseFloat(qty)){
pack.handleQty = Number(qty);
+ pack.convertRate = result.label.convertRate
+ pack.supplierQty = parseFloat(calc.div(parseFloat(pack.handleQty),parseFloat(pack.convertRate)).toFixed(5))
+ pack.supplierUom = result.label.purchaseUom
batchDetailList[i].packList.push(pack)
batchDetailList[i].scaned = true
const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
@@ -546,6 +550,9 @@
// 不是最后一行取当前批次剩余可以扫进的数量
pack.handleQty = handleQtySub;
}
+ pack.convertRate = result.label.convertRate
+ pack.supplierQty = parseFloat(calc.div(parseFloat(pack.handleQty),parseFloat(pack.convertRate)).toFixed(5))
+ pack.supplierUom = result.label.purchaseUom
batchDetailList[i].packList.push(pack)
batchDetailList[i].scaned = true
qty = calc.sub(parseFloat(qty),parseFloat(handleQtySub))
@@ -557,11 +564,7 @@
calcTreeHandleQty(this.detailSource);
}
}
-
-
}
- console.log(8777,this.detailSource)
-
setTimeout(()=>{
this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
item.resizeCollapse()