From f189938e6e33403a427bb64a54a69d178256fad4 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Nov 2024 10:15:05 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/detail.js | 3 + src/common/label.js | 18 +- src/mycomponents/package/packageCard.vue | 19 +- src/mycomponents/package/packageList.vue | 32 +- src/mycomponents/qty/recommendQty.vue | 4 +- src/mycomponents/scan/winComScan.vue | 9 +- src/mycomponents/scan/winScanPack.vue | 8 +- src/pages/issue/job/issueDetail.vue | 3 +- .../coms/comReceiptDetailCardBacth.vue | 14 +- .../purchaseReceipt/job/receiptDetail.vue | 349 +++++++----------- 10 files changed, 196 insertions(+), 263 deletions(-) diff --git a/src/common/detail.js b/src/common/detail.js index 89721e7a..3171ca38 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -141,6 +141,7 @@ export function createRecordInfo(detail, balance) { //计算实际数量 export function calcHandleQty(detailSource) { + console.log(999,detailSource) for (let item of detailSource) { item.handleQty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber(); @@ -190,6 +191,8 @@ export function calcTreeHandleQty(detailSource) { detail.handleQty = calc.add(detail.handleQty, pack.handleQty); } } + }else{ + detail.handleQty = new Decimal(0).toNumber(); } if(detail.handleQty){ item.handleQty = calc.add(item.handleQty, detail.handleQty); diff --git a/src/common/label.js b/src/common/label.js index 4615e948..82bec5b7 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -14,7 +14,7 @@ import { getManagementPrecisions } from '@/common/balance.js'; -export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { +export function getLabelInfo(scanMsg, headerType, callBack,locationCode,isHavePackNumber) { if (scanMsg.length == 0) { return null } @@ -42,17 +42,17 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { let type = header.substring(header.length - 1, header.length); if (type == 'Q') //qrcode { - getQRCodeInfo(header, version, scanMsg, callBack,locationCode); + getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber); } // else if (type == 'B') //barcode // { // getBarCodeInfo(header, version, items[2], callBack); // } else { //直接输入文本 - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); } } else { - getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); + getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber); // let labelResult = { // label: { // labelType: "", @@ -67,7 +67,7 @@ export function getLabelInfo(scanMsg, headerType, callBack,locationCode) { } } -export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { +export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) { //获取包装信息 let labelItem = labelDic.find(r => r.header == header && r.version == version); if (labelItem == undefined) { @@ -92,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { }; labelDic.push(newItem); - getLabelItems(newItem, scanMsg, callBack,locationCode); + getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber); } }).catch(err => { labelResult.success = false; @@ -100,7 +100,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { callBack(err); }) } else { - getLabelItems(labelItem, scanMsg, callBack,locationCode); + getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber); } } @@ -117,7 +117,9 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { const managementList = res.list; managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING' if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ - packingNumber = '' + if(!isHavePackNumber){ + packingNumber = '' + } } } }) diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue index 8e583b13..6e30e527 100644 --- a/src/mycomponents/package/packageCard.vue +++ b/src/mycomponents/package/packageCard.vue @@ -6,7 +6,8 @@ - + + @@ -19,12 +20,12 @@ + :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" :isShowStatus="isShowStatus" :isShowRecommendQty='isShowRecommendQty'> - + @@ -90,7 +91,15 @@ type: String, default: '库位' }, - + // 采购订单单独显示的包装号 + isShowPackingNumberProps:{ + type:Boolean, + default:false + }, + isShowRecommendQty: { + type: Boolean, + default: true + } }, watch: { // 模拟扫描功能 diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index 9d39d966..a4458dd7 100644 --- a/src/mycomponents/package/packageList.vue +++ b/src/mycomponents/package/packageList.vue @@ -1,13 +1,13 @@