From 584377da423728a67c69e83c121887c3346a1dd9 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 4 Sep 2024 14:05:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D=202024/6/2?= =?UTF-8?q?7=2017:03:11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hybrid/html/point.html | 6 +- src/mycomponents/job/jobComMainDetailCard.vue | 2 +- src/mycomponents/qty/compareQty.vue | 165 +++++++++--------- src/mycomponents/scan/winComScanFg.vue | 57 +++--- src/pages/index/index.vue | 16 +- src/pages/point/index.vue | 13 +- src/pages/productReceipt/coms/comFgCard.vue | 4 +- .../job/fgProductReceiptDetail.vue | 75 ++++---- 8 files changed, 191 insertions(+), 147 deletions(-) diff --git a/src/hybrid/html/point.html b/src/hybrid/html/point.html index f71a94e1..6dd90cab 100644 --- a/src/hybrid/html/point.html +++ b/src/hybrid/html/point.html @@ -29,7 +29,10 @@ .left-item { display: flex; } - + .bold-font{ + font-weight: bold; + font-size: 28rpx; + } .label { border-bottom: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1; @@ -63,6 +66,7 @@ border-top: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1; } + .image img { width: 172px; diff --git a/src/mycomponents/job/jobComMainDetailCard.vue b/src/mycomponents/job/jobComMainDetailCard.vue index 973c528a..3c2f8a4c 100644 --- a/src/mycomponents/job/jobComMainDetailCard.vue +++ b/src/mycomponents/job/jobComMainDetailCard.vue @@ -7,7 +7,7 @@
- +
发货类型 diff --git a/src/mycomponents/qty/compareQty.vue b/src/mycomponents/qty/compareQty.vue index c71d21c4..c4c32c50 100644 --- a/src/mycomponents/qty/compareQty.vue +++ b/src/mycomponents/qty/compareQty.vue @@ -1,92 +1,91 @@ - \ No newline at end of file + diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index 0eeea2ed..179a8621 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -169,33 +169,48 @@ const handelScanMsg = () => { .then((res) => { try { if (res.data.list.length == 0) { - throw new Error(`没有查找到物料号【${itemCode.value}】对应的mes物料号`) + throw new Error(`没有查找到物料号【${itemCode.value}】对应的生产条码配置`) } - const result = res.data.list[0] - const { partNumber } = result + const result = res.data.list[0] // Mes条码标签解析规格 + const { partNumber } = result // 客户物料号 const { lengthMat } = result const { lengthBc } = result + // 因为Q5的客户物料进行了加密,没有解析规格,在生产条码配置中的Type配置成Q5 + if (result.Type == 'P') { + const scanPartNumber = content.substr(0, lengthMat) // 扫描的客户物料号 + // const productDate = content.substr(lengthMat, 8) + // const batch = content.substr(lengthMat + 8, 3) + const order = content.substr(-8) + if (scanPartNumber != partNumber) { + clear() + throw new Error(`解析错误:扫描的客户物料号【${scanPartNumber}】与生成条码配置表中的客户物料号【${partNumber}】不一致`) + } - let itemCode = content.substr(0, lengthMat) - const productDate = content.substr(lengthMat, 8) - const batch = content.substr(lengthMat + 8, 3) - const order = content.substr(-8) - if (itemCode != partNumber) { + const scanResult = { + itemCode: scanPartNumber, + // productDate, + // batch, + order, + qty: 1, + content, + success: true + } clear() - throw new Error(`解析错误:扫描物料号【${itemCode}】与查询物料号【${partNumber}】不一致`) - } - - const scanResult = { - itemCode, - productDate, - batch, - order, - qty: 1, - content, - success: true + emit('getResult', scanResult) + } else { + // 不进行解析,直接按照扫描的标签进行赋值 + const scanResult = { + itemCode: itemCode.value, + // productDate: new Date(), + // batch: new Date(), + order: 0, + qty: 1, + content, + success: true + } + clear() + emit('getResult', scanResult) } - clear() - emit('getResult', scanResult) } catch (error) { comMessageRef.value.showErrorMessage(error.message, (res) => { if (res) { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 99725a91..92b4aa38 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -132,8 +132,20 @@ onHide(() => { }) onShow(() => { if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) { - uni.reLaunch({ - url: '../login/index' + uni.showModal({ + title: '未登录', + content: '您未登录 , 需要登录后才能继续', // 如果需要强制登录,不显示取消按钮 + showCancel: !forcedLogin.value, + success: (res) => { + if (res.confirm) { + // 如果需要强制登录,使用reLanch方式 + if (forcedLogin.value) { + uni.reLaunch({ + url: '../login/index' + }) + } + } + } }) } else { timerRefresh() diff --git a/src/pages/point/index.vue b/src/pages/point/index.vue index 80ac1f2b..0f7858d5 100644 --- a/src/pages/point/index.vue +++ b/src/pages/point/index.vue @@ -5,7 +5,7 @@ 物品代码 - {{ item.itemCode }} + {{ item.itemCode }} 物品名称 @@ -29,7 +29,7 @@ 数量 - {{item.qty}} + {{item.qty}} @@ -118,7 +118,7 @@
物品代码
-
${item.itemCode}
+
${item.itemCode}
物品名称
@@ -142,7 +142,7 @@
数量
-
${item.qty}
+
${item.qty}
@@ -258,7 +258,10 @@ .left-item { display: flex; } - + .bold-font{ + font-weight: bold; + font-size: 28rpx; + } .label { border-bottom: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1; diff --git a/src/pages/productReceipt/coms/comFgCard.vue b/src/pages/productReceipt/coms/comFgCard.vue index 0d21a833..16f92ac3 100644 --- a/src/pages/productReceipt/coms/comFgCard.vue +++ b/src/pages/productReceipt/coms/comFgCard.vue @@ -7,10 +7,10 @@ 零件号 {{ detail.itemCode }} - +