From c538711e415f9bc4128ed92a49644bfef7d0b45d Mon Sep 17 00:00:00 2001 From: xiangxy Date: Wed, 14 Jan 2026 14:30:15 +0800 Subject: [PATCH] change --- pages/hdyy/scgl/point-quhuo.vue | 79 ++++-------------- pages/hdyy/scgl/yjg-chuliao.vue | 1 + pages/hdyy/tygn/agv-manage.vue | 2 +- pages/hdyy/zpgl/mater-zudai.vue | 135 ++++++++++++++++++++++--------- pages/hdyy/zpgl/mater-zutong.vue | 119 ++++++++++++++++++--------- utils/getData3.js | 19 +++++ 6 files changed, 213 insertions(+), 142 deletions(-) diff --git a/pages/hdyy/scgl/point-quhuo.vue b/pages/hdyy/scgl/point-quhuo.vue index 0578e0d..d04d531 100644 --- a/pages/hdyy/scgl/point-quhuo.vue +++ b/pages/hdyy/scgl/point-quhuo.vue @@ -11,7 +11,16 @@ + + + + + 袋码 + + + @@ -91,6 +100,7 @@ return { title: '', val1: '', + bagCode: '', num: null, dataList: [], // dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}], @@ -102,65 +112,9 @@ }, methods: { toScanAdd () { - uni.scanCode({ - success: (res) => { - // console.log('扫码成功:', res.result); - if (res.result.includes(';')) { - const parts = res.result.split(';') - if (parts.length !== 5) { - uni.showToast({ - title: '二维码格式不正确,请扫描符合格式的二维码', - icon: 'none' - }) - return - } - let currObj = { - mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9), - container_code: parts[0], - material_code: parts[1], - material_name: parts[2], - qty: parts[3], - measure_unit_id: parts[4], - } - // 检查是否已存在相同卷号 - const exists = this.dataList.some(item => item.container_code === currObj.container_code) - if (exists) { - uni.showToast({ - title: '已存在', - icon: 'none' - }) - return - } - this.dataList.push(currObj) - } else { - let currObj = { - mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9), - container_code: res.result, - material_code: '', - material_name: '', - qty: '', - measure_unit_id: '' - } - // 检查是否已存在相同卷号 - const exists = this.dataList.some(item => item.container_code === currObj.container_code) - if (exists) { - uni.showToast({ - title: '已存在', - icon: 'none' - }) - return - } - this.dataList.push(currObj) - } - }, - fail: (err) => { - console.log('扫码失败:', err) - // uni.showToast({ - // title: err + '扫码失败', - // icon: 'none' - // }) - } - }) + if (this.bagCode) { + this._getPalletAssemblyOK(this.bagCode) + } }, toDel () { if (!this.pkId) { @@ -192,11 +146,6 @@ // }) } }, - handleChange (e) { - if (e) { - this._getPalletAssemblyOK() - } - }, async _getPalletAssemblyOK () { try { let res = await getPalletAssemblyOK(this.val1) diff --git a/pages/hdyy/scgl/yjg-chuliao.vue b/pages/hdyy/scgl/yjg-chuliao.vue index 12aca7b..0bac12b 100644 --- a/pages/hdyy/scgl/yjg-chuliao.vue +++ b/pages/hdyy/scgl/yjg-chuliao.vue @@ -114,6 +114,7 @@ workshop_code:"1" } ], + options: [], index: '', val1: '', val2: '', diff --git a/pages/hdyy/tygn/agv-manage.vue b/pages/hdyy/tygn/agv-manage.vue index 9e39e49..b7b93fa 100644 --- a/pages/hdyy/tygn/agv-manage.vue +++ b/pages/hdyy/tygn/agv-manage.vue @@ -1,7 +1,7 @@