From d7c2318ebb9438af97ecb5aa2c22ab04f0e62c18 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Wed, 4 Dec 2024 17:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 14 +- src/pages/back/backCode.vue | 34 ++- src/pages/new-purchase/accept/conclusion.vue | 14 +- src/pages/new-purchase/bind/coding-bind.vue | 94 +++++---- src/pages/new-purchase/bind/coding-scan.vue | 170 +++++++++++++++ src/pages/new-purchase/bind/details.vue | 39 ++-- src/pages/picking/outbound/code-outScan.vue | 206 +++++++++++++++++++ src/pages/picking/outbound/code-outbound.vue | 115 ++++++----- src/pages/picking/outbound/details.vue | 64 +++--- src/pages/picking/outbound/num-outbound.vue | 153 ++++++-------- src/pages/work/index.vue | 4 + 11 files changed, 654 insertions(+), 253 deletions(-) create mode 100644 src/pages/new-purchase/bind/coding-scan.vue create mode 100644 src/pages/picking/outbound/code-outScan.vue diff --git a/src/pages.json b/src/pages.json index 4d1859c..a616d65 100644 --- a/src/pages.json +++ b/src/pages.json @@ -55,7 +55,13 @@ { "path": "pages/new-purchase/bind/coding-bind", "style": { - "navigationBarTitleText": "编码绑定" + "navigationBarTitleText": "新购绑定" + } + },//编码扫码 + { + "path": "pages/new-purchase/bind/coding-scan", + "style": { + "navigationBarTitleText": "新购绑定" } }, // 入库 @@ -124,6 +130,12 @@ "style": { "navigationBarTitleText": "编码出库" } + },// 3. 编码出库 + { + "path": "pages/picking/outbound/code-outScan", + "style": { + "navigationBarTitleText": "编码出库" + } }, // 4. 数量出库 { diff --git a/src/pages/back/backCode.vue b/src/pages/back/backCode.vue index 24585ab..6a88951 100644 --- a/src/pages/back/backCode.vue +++ b/src/pages/back/backCode.vue @@ -20,27 +20,27 @@ -
+
接收方式: - 编码识别 + 编码识别 - 编码识别 + 编码识别 - 二维码识别 + 二维码识别
-
-
扫码识别
+
+ @@ -138,7 +138,25 @@ const getMaInfo = () => { console.log(error) }) } - +// 扫码识别按钮 +const scanStart = () => { + console.log('编码识别--') + // 只允许通过相机扫码 + uni.scanCode({ + onlyFromCamera: true, + scanType: ['qrCode', 'pdf417'], + success: (res) => { + console.log('扫码结果:' + res.result); + maCode.value = res.result + }, + fail: (err) => { + // uni.showToast({ + // title: '取消', + // icon: 'none' + // }); + } + }); +} //提交 const submitCode = () => { console.log(taskInfo.value) diff --git a/src/pages/new-purchase/accept/conclusion.vue b/src/pages/new-purchase/accept/conclusion.vue index 6adacf9..7ad8eda 100644 --- a/src/pages/new-purchase/accept/conclusion.vue +++ b/src/pages/new-purchase/accept/conclusion.vue @@ -3,18 +3,18 @@
- {{ formData.maTypeName }} + {{ formData.maTypeName }} - {{ formData.typeName }} + {{ formData.typeName }} - {{ formData.purchaseNum }} + {{ formData.purchaseNum }} - + @@ -193,6 +193,12 @@ onLoad((options)=>{ border-radius: 6px; box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1); } +.form-view{ + width: 100%; + height: 100%; + display: flex; + align-items: center; +} .upload { width: 80px; height: 80px; diff --git a/src/pages/new-purchase/bind/coding-bind.vue b/src/pages/new-purchase/bind/coding-bind.vue index b3bcf8c..060a494 100644 --- a/src/pages/new-purchase/bind/coding-bind.vue +++ b/src/pages/new-purchase/bind/coding-bind.vue @@ -1,33 +1,25 @@ + + + + diff --git a/src/pages/new-purchase/bind/details.vue b/src/pages/new-purchase/bind/details.vue index a33c750..5de98b4 100644 --- a/src/pages/new-purchase/bind/details.vue +++ b/src/pages/new-purchase/bind/details.vue @@ -16,44 +16,49 @@ +
+ 新购绑定 + 已完成 + 未完成 +
- {{ index + 1 }} + 物资名称: {{ item.maTypeName }} - {{ index + 1 }} + 规格型号: {{ item.typeName }} - {{ index + 1 }} + 物资数量: {{ item.purchaseNum }} - {{ index + 1 }} + 已绑数量: {{ item.bindNum }} - {{ index + 1 }} + 待绑数量: {{ item.checkNum - item.bindNum }} - {{ index + 1 }} + 管理模式: - {{ index + 1 }} + 状态: import { ref, onUnmounted } from 'vue' import { getPurchaseBindDetailsAPI } from '@/services/new-purchase/bind.js' -import { onLoad } from '@dcloudio/uni-app' +import { onLoad,onShow } from '@dcloudio/uni-app' const detailsList = ref([]) const query = defineProps() // 获取上级页面传递的路由参数 @@ -181,28 +186,18 @@ const onClick = (e, item) => { } // 2. 二维码绑定 if (index === 1) { + uni.navigateTo({ url: `/pages/new-purchase/bind/coding-scan?queryParams=${JSON.stringify(leaseApplyInfo.value)}` }) } // 3. 驳回 if (index === 2) { } } -// 页面加载完毕 -onLoad(() => { +// 页面加载完毕 +onShow(() => { getOutboundDetailsData() - - // 监听出库完成事件 刷新列表 - uni.$on('onUpdate', () => { - // console.log('监听事件') - // 刷新列表 - getOutboundDetailsData() - }) -}) - -// 页面销毁时移除事件监听 -onUnmounted(() => { - uni.$off('onUpdate') // 移除事件监听 }) + diff --git a/src/pages/picking/outbound/code-outbound.vue b/src/pages/picking/outbound/code-outbound.vue index 4818c95..67d45b6 100644 --- a/src/pages/picking/outbound/code-outbound.vue +++ b/src/pages/picking/outbound/code-outbound.vue @@ -2,31 +2,24 @@ - - 领料单位: - - {{ queryParams.leaseUnit }} - - - - 领料工程: - - {{ queryParams.leaseProject }} - - - - 当前出库物资: - {{ queryParams.maTypeName }} - - - - 待出库数量: - - {{ maxNum }} - - - + + + {{ queryParams.leaseUnit }} + + + {{ queryParams.leaseProject }} + + + {{ queryParams.maTypeName }} + + + {{ queryParams.typeName }} + + + {{ maxNum }} + + + @@ -69,11 +62,11 @@ - + - 物资类型: - + 物资类型: + {{ item.materialName }} @@ -92,26 +85,26 @@ - 规格型号: - + 规格型号: + {{ item.materialModel }} - 设备编码: - + 设备编码: + {{ item.maCode }} - 设备状态: - + 设备状态: + {{ item.statusName }} - 设备数量: - + 设备数量: + 1 @@ -127,14 +120,17 @@