From a2afc1d84aa0db8effad87622400fdf83c8ff4d0 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Tue, 13 Jan 2026 09:52:42 +0800 Subject: [PATCH] =?UTF-8?q?pda=E6=96=B0=E6=A0=87=E7=AD=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=BB=98=E8=AE=A4=E8=8E=B7=E5=8F=96=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionReturnPDAIssueList.vue | 27 +++++++++++++++-- .../productionReturnPickingDetail.vue | 29 ++++++++++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/views/modules/production-return/productionReturnPDAIssueList.vue b/src/views/modules/production-return/productionReturnPDAIssueList.vue index d06812e..b039844 100644 --- a/src/views/modules/production-return/productionReturnPDAIssueList.vue +++ b/src/views/modules/production-return/productionReturnPDAIssueList.vue @@ -361,19 +361,19 @@
- +
+ style="width: 100%;" @keyup.enter.native="confirmNewLabel"/>
+ class="form-input" style="width: 100%;" @keyup.enter.native="confirmNewLabel"/>
@@ -601,6 +601,7 @@ export default { height: 0, quantity: 0, } + this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo); this.showNewLabelDialog = true }, @@ -1047,6 +1048,26 @@ export default { this.printData.materialCode2 = 0 this.printData.unit = '' }, + /** + * 从物料编码中解析高度 + * 如果物料编码格式是 70004479-0030,则高度为30 + * 如果物料编码格式是 70004479,则高度为空 + */ + parseHeightFromPartNo(partNo) { + if (!partNo) return ''; + + // 检查是否包含横杠 + const parts = partNo.split('-'); + if (parts.length >= 2) { + // 取横杠后面的数字部分 + const heightStr = parts[1]; + // 转换为数字,去掉前导0 + const height = parseInt(heightStr, 10); + return isNaN(height) ? '' : height; + } + + return ''; + } }, mounted() { diff --git a/src/views/modules/production-return/productionReturnPickingDetail.vue b/src/views/modules/production-return/productionReturnPickingDetail.vue index b8e511c..76466dd 100644 --- a/src/views/modules/production-return/productionReturnPickingDetail.vue +++ b/src/views/modules/production-return/productionReturnPickingDetail.vue @@ -149,7 +149,7 @@
+ clearable/>
@@ -190,19 +190,19 @@
- +
+ class="form-input" style="width: 100%;" @keyup.enter.native="confirmNewLabel"/>
+ class="form-input" style="width: 100%;" @keyup.enter.native="confirmNewLabel"/>
@@ -558,6 +558,7 @@ export default { height: 0, quantity: 0, } + this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo); this.showNewLabelDialog = true }, @@ -882,6 +883,26 @@ export default { this.printData.materialCode2 = 0 this.printData.unit = '' }, + /** + * 从物料编码中解析高度 + * 如果物料编码格式是 70004479-0030,则高度为30 + * 如果物料编码格式是 70004479,则高度为空 + */ + parseHeightFromPartNo(partNo) { + if (!partNo) return ''; + + // 检查是否包含横杠 + const parts = partNo.split('-'); + if (parts.length >= 2) { + // 取横杠后面的数字部分 + const heightStr = parts[1]; + // 转换为数字,去掉前导0 + const height = parseInt(heightStr, 10); + return isNaN(height) ? '' : height; + } + + return ''; + } }, mounted() {