From 0af6c1e3c9ea097f219de5d2a54101f15b1692e5 Mon Sep 17 00:00:00 2001 From: xiangxy Date: Thu, 5 Feb 2026 14:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E6=A1=B6=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/hdyy/scgl/lt-weight.vue | 8 +- pages/hdyy/zpgl/mater-zudai.1.vue | 513 +++++++++++++++++++++++++++++ pages/hdyy/zpgl/mater-zudai.vue | 34 +- pages/hdyy/zpgl/mater-zutong.1.vue | 395 ++++++++++++++++++++++ pages/hdyy/zpgl/mater-zutong.vue | 24 +- pages/home/home.vue | 4 +- pages/login/setup.vue | 54 ++- utils/getData3.js | 16 + 8 files changed, 1012 insertions(+), 36 deletions(-) create mode 100644 pages/hdyy/zpgl/mater-zudai.1.vue create mode 100644 pages/hdyy/zpgl/mater-zutong.1.vue diff --git a/pages/hdyy/scgl/lt-weight.vue b/pages/hdyy/scgl/lt-weight.vue index a6c37ca..32ca2ab 100644 --- a/pages/hdyy/scgl/lt-weight.vue +++ b/pages/hdyy/scgl/lt-weight.vue @@ -76,8 +76,8 @@ - - + + @@ -145,7 +145,7 @@ }, async _manualInbound () { this.disabled = true - if (!this.pkId || !this.val2 || !this.val1 || !this.num || !this.weight) { + if (!this.pkId || !this.val2 || !this.val1 || !this.weight) { this.disabled = false return } @@ -165,7 +165,7 @@ }, async _manualOutbound () { this.disabled = true - if (!this.pkId || !this.val2 || !this.val1 || !this.num || !this.weight) { + if (!this.pkId || !this.val2 || !this.val1 || !this.weight) { this.disabled = false return } diff --git a/pages/hdyy/zpgl/mater-zudai.1.vue b/pages/hdyy/zpgl/mater-zudai.1.vue new file mode 100644 index 0000000..70c65d3 --- /dev/null +++ b/pages/hdyy/zpgl/mater-zudai.1.vue @@ -0,0 +1,513 @@ + + + + diff --git a/pages/hdyy/zpgl/mater-zudai.vue b/pages/hdyy/zpgl/mater-zudai.vue index 2a9377e..70c65d3 100644 --- a/pages/hdyy/zpgl/mater-zudai.vue +++ b/pages/hdyy/zpgl/mater-zudai.vue @@ -52,7 +52,7 @@ 供应商编码 - + @@ -103,8 +103,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import {getDate} from '@/utils/utils.js' - const currentDate = getDate({format: true}) - import {queryRecordNo, byBagCodeInfo, confirmBagAssembly} from '@/utils/getData3.js' + import {queryRecordNo, byBagCodeInfo, confirmBagAssembly, printBag} from '@/utils/getData3.js' export default { components: { NavBar, @@ -115,7 +114,6 @@ title: '', val1: '', recordNo: '', - date: currentDate, materialData: {}, num: '', unit: 'KG', @@ -202,21 +200,32 @@ // // console.log('error') // } // }, - labelPrint () { + async labelPrint () { this.disabled1 = true if (!this.val1 || JSON.stringify(this.materialData) === '{}') { this.disabled1 = false return } let row = Object.assign({}, this.materialData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bag_code: this.val1}) - const class_code = row.class_code - if (class_code === 'YL001' || class_code === 'FL001' || class_code === 'NBC001') { - // 原料、辅料、内包材 - this.printOne(row) - } else { - this.printTwo(row) + try { + let res = await printBag(row, this.$store.getters.printUrl) + if (res) { + // uni.showToast({ + // title: res.message, + // icon: 'none' + // }) + const class_code = row.class_code + if (class_code === 'YL001' || class_code === 'FL001' || class_code === 'NBC001') { + // 原料、辅料、内包材 + this.printOne(row) + } else { + this.printTwo(row) + } + } + this.disabled1 = false + } catch (e) { + this.disabled1 = false } - // this.toPrint(row) }, printOne (row) { let iparr = this.$store.getters.printUrl.split(":") @@ -386,6 +395,7 @@ title: '操作成功', icon: 'none' }) + this.toEmpty() this.disabled1 = false } } diff --git a/pages/hdyy/zpgl/mater-zutong.1.vue b/pages/hdyy/zpgl/mater-zutong.1.vue new file mode 100644 index 0000000..05565a8 --- /dev/null +++ b/pages/hdyy/zpgl/mater-zutong.1.vue @@ -0,0 +1,395 @@ + + + + diff --git a/pages/hdyy/zpgl/mater-zutong.vue b/pages/hdyy/zpgl/mater-zutong.vue index 84d96d0..05565a8 100644 --- a/pages/hdyy/zpgl/mater-zutong.vue +++ b/pages/hdyy/zpgl/mater-zutong.vue @@ -87,8 +87,7 @@ import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' import {getDate} from '@/utils/utils.js' - const currentDate = getDate({format: true}) - import {queryRecordNoBucked, confirmBucketAssembly} from '@/utils/getData3.js' + import {queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js' export default { components: { NavBar, @@ -100,7 +99,6 @@ title: '', val1: '', recordNo: '', - date: currentDate, materialData: {}, weight: '', num: null, @@ -163,7 +161,6 @@ icon: 'none' }) } - this.toEmpty() this.disabled = false } catch (e) { this.disabled = false @@ -179,14 +176,26 @@ // // console.log('error') // } // }, - labelPrint () { + async labelPrint () { this.disabled1 = true if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') { this.disabled1 = false return } - let data = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bucket_code: this.val1, bucket_weight: this.weight}) - this.toPrint(data) + let row = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, create_time: this.date, qty: this.num, bucket_code: this.val1, bucket_weight: this.weight}) + try { + let res = await printBucked(row, this.$store.getters.printUrl) + if (res) { + // uni.showToast({ + // title: res.message, + // icon: 'none' + // }) + this.toPrint(row) + } + this.disabled1 = false + } catch (e) { + this.disabled1 = false + } }, toPrint (row) { let iparr = this.$store.getters.printUrl.split(":") @@ -268,6 +277,7 @@ title: '操作成功', icon: 'none' }) + this.toEmpty() this.disabled1 = false } } diff --git a/pages/home/home.vue b/pages/home/home.vue index 01b7445..24dd56d 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -138,8 +138,8 @@ }, methods: { async _authority () { - let res = await authority() - // let res = await allAuthority() + // let res = await authority() + let res = await allAuthority() if (res.code === '1') { this.menuList = [...res.result.rf_menu1.sonTree] } else { diff --git a/pages/login/setup.vue b/pages/login/setup.vue index 6a0773d..38219c1 100644 --- a/pages/login/setup.vue +++ b/pages/login/setup.vue @@ -4,12 +4,20 @@ - 服务器地址 + 服务器 - - 打印地址 + + + + 打印机 + + + +