From 5d65e3e03b0bc5386e8b76bfce15756124ca4131 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 22 Aug 2024 19:26:58 +0800 Subject: [PATCH 01/34] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=B8=AD=E5=8F=AF=E4=BB=A5=E4=B8=8D=E4=BF=AE=E6=94=B9=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/array.js | 14 ++++++++++++ .../record/recordComDetailCard.vue | 15 ++++++++++--- src/mycomponents/scan/winComScanFg.vue | 17 +++++++------- src/mycomponents/scan/winScanFgLabel.vue | 7 ------ src/pages/deliver/coms/comScanDeliverPack.vue | 2 +- src/pages/deliver/job/deliverDetail.vue | 5 ++++- .../coms/comInventoryDetailCard.vue | 22 +++++++++---------- .../inventoryMove/coms/comMoveRecordCard.vue | 8 ++++++- .../inventoryMove/job/inventoryMoveDetail.vue | 2 +- src/pages/issue/coms/comIssueDetailCard.vue | 3 ++- src/pages/issue/job/issueDetail.vue | 6 ++++- .../package/coms/comOverPackJobDetailCard.vue | 2 +- .../package/job/overPackageJobDetail.vue | 4 +++- .../job/productionReceiptDetail.vue | 10 +++++++-- .../repleinsh/coms/comRepleishDetailCard.vue | 9 +++++--- src/pages/stockUp/coms/comScanStockUpPack.vue | 2 +- .../stockUp/coms/comStockUpDetailCard.vue | 9 +++++--- src/pages/stockUp/job/stockUpJobDetail.vue | 8 +++++-- 18 files changed, 96 insertions(+), 49 deletions(-) diff --git a/src/common/array.js b/src/common/array.js index 91363cf2..b4c8c38d 100644 --- a/src/common/array.js +++ b/src/common/array.js @@ -110,6 +110,20 @@ export function getPurchaseReceiptOption(allowModifyQty, allowModifyLocation) { return option; } + +export function getRecordOption(allowModifyQty, allowModifyLocation) { + var option = [] + option.push(...getDetailOption()) + if (allowModifyQty) { + option.push(...getEditOption()) + } + if (allowModifyLocation) { + option.push(...getLocationOption()) + } + option.push(...getRemoveOption()) + return option; +} + //详情 export function getDetailOption() { let option_detail = [{ diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue index ec58ae03..4c04244e 100644 --- a/src/mycomponents/record/recordComDetailCard.vue +++ b/src/mycomponents/record/recordComDetailCard.vue @@ -30,7 +30,7 @@ - + @@ -52,7 +52,8 @@ getDetailOption, getDetailEditRemoveOption, getClearOption, - getEditLocationRemoveOption + getEditLocationRemoveOption, + getRecordOption } from '@/common/array.js'; export default { components: { @@ -111,6 +112,14 @@ type: Boolean, default: false }, + allowModifyQty: { + type: Boolean, + default: false + }, + allowModifyLocation: { + type: Boolean, + default: false + } }, watch: { @@ -148,7 +157,7 @@ mounted() { this.detailOptions = getDetailOption(); - this.scanOptions = getDetailEditRemoveOption(); + this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation); this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption(); }, diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index 92a94549..e0f91a60 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -6,10 +6,8 @@ + style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue" + @focus="handleFocus" @input="handelScanMsg" :cursor="cursorIndex"> @@ -125,6 +123,7 @@ this.placeholderValue = '请扫描' + this.placeholder; }, methods: { + handleFocus() {}, setItemCodeSimulate(itemCode, scanMsg) { this.itemCode = itemCode; this.scanMsg = scanMsg; @@ -140,8 +139,8 @@ this.scanMsg = val }, clearScanValue() { - this.cursorIndex=0, - this.scanMsg = '' + this.cursorIndex = 0, + this.scanMsg = '' this.getfocus(); }, clickScanMsg() { @@ -181,18 +180,18 @@ var partNumber = result.partNumber; //客户物料号 var lengthMat = result.lengthMat; var lengthBc = result.lengthBc; - + //因为Q5的客户物料进行了加密,没有解析规格,在生产条码配置中的Type配置成Q5 if (result.type == 'P') { let scanPartNumber = content.substr(0, lengthMat); //扫描的客户物料号 // let productDate = content.substr(lengthMat, 8); // let batch = content.substr(lengthMat + 8, 3); let order = content.substr(-8); - if(content.length!=lengthBc){ + if (content.length != lengthBc) { that.clear(); throw new Error("解析错误:扫描标签长度与配置条码的长度不一致") } - + if (scanPartNumber != partNumber) { that.clear(); throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + diff --git a/src/mycomponents/scan/winScanFgLabel.vue b/src/mycomponents/scan/winScanFgLabel.vue index 8d953201..8e3d1893 100644 --- a/src/mycomponents/scan/winScanFgLabel.vue +++ b/src/mycomponents/scan/winScanFgLabel.vue @@ -21,8 +21,6 @@ - - @@ -54,11 +52,6 @@ }, methods: { - //模拟扫描功能 - simulateScan(item){ - this.$refs.comscansimulate.setItemCodeSimulate(item.itemCode,item.copyContent) - this.$refs.comscansimulate.clickScanMsg(); - }, openScanPopup(itemCode) { this.$refs.popup.open('bottom') setTimeout(res => { diff --git a/src/pages/deliver/coms/comScanDeliverPack.vue b/src/pages/deliver/coms/comScanDeliverPack.vue index 27c5ce1c..c635ba8b 100644 --- a/src/pages/deliver/coms/comScanDeliverPack.vue +++ b/src/pages/deliver/coms/comScanDeliverPack.vue @@ -296,7 +296,7 @@ }, selectBalanceItem(balance) { - this.afterGetBalance(this.label, balance, this.packageInfo); + this.afterGetBalance(balance, balance, this.packageInfo); }, diff --git a/src/pages/deliver/job/deliverDetail.vue b/src/pages/deliver/job/deliverDetail.vue index 836f8529..85ce1e01 100644 --- a/src/pages/deliver/job/deliverDetail.vue +++ b/src/pages/deliver/job/deliverDetail.vue @@ -29,7 +29,10 @@ - + diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue index d06d84d0..fce0dcf3 100644 --- a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue +++ b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue @@ -10,16 +10,16 @@ - + - - + + @@ -31,7 +31,7 @@ import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" - + import { getDetailOption, getPurchaseReceiptOption @@ -52,7 +52,7 @@ title: "推荐详情", showItem: {}, editItem: { - + }, detailOptions: [], scanOptions: [] @@ -69,8 +69,8 @@ }, allowEditQty: { type: Boolean, - default: true - } + default: false + }, }, watch: { // dataContent: { @@ -84,7 +84,7 @@ this.detailOptions = getDetailOption(); } if (this.scanOptions.length == 0) { - this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam + this.scanOptions = getPurchaseReceiptOption("TRUE", this.settingParam .allowModifyLocation) } }, @@ -135,7 +135,7 @@ }, //扫描源库位 getLocation(location, code) { - this.locatonItem.toLocationCode =code; + this.locatonItem.toLocationCode = code; this.$emit('updateData') }, } @@ -143,4 +143,4 @@ + \ No newline at end of file diff --git a/src/pages/inventoryMove/coms/comMoveRecordCard.vue b/src/pages/inventoryMove/coms/comMoveRecordCard.vue index 7e9c2113..8c0449b2 100644 --- a/src/pages/inventoryMove/coms/comMoveRecordCard.vue +++ b/src/pages/inventoryMove/coms/comMoveRecordCard.vue @@ -26,7 +26,9 @@ + :allowEditStatus="allowEditStatus" + :allowEditQty="allowEditQty" + > @@ -82,6 +84,10 @@ type: Boolean, default: false }, + allowEditQty: { + type: Boolean, + default: false + }, }, watch: { diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index dad77e16..0aa3edde 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -12,7 +12,7 @@ - diff --git a/src/pages/issue/coms/comIssueDetailCard.vue b/src/pages/issue/coms/comIssueDetailCard.vue index 1826af97..6f7443b6 100644 --- a/src/pages/issue/coms/comIssueDetailCard.vue +++ b/src/pages/issue/coms/comIssueDetailCard.vue @@ -1,5 +1,6 @@