From b2fe47e3fb61966fb8aebd689dc53726e8cd7482 Mon Sep 17 00:00:00 2001 From: xiangxy Date: Thu, 11 Dec 2025 17:10:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E6=94=B9=E4=B8=8B=E6=8B=89+?= =?UTF-8?q?=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/General/warehouse-box.vue | 125 ++++++++++++++++++++++++++++++-- utils/getData2.js | 5 ++ 2 files changed, 123 insertions(+), 7 deletions(-) diff --git a/pages/General/warehouse-box.vue b/pages/General/warehouse-box.vue index 430650a..db773bf 100644 --- a/pages/General/warehouse-box.vue +++ b/pages/General/warehouse-box.vue @@ -50,8 +50,29 @@ 批次 - - + + + + + + + + + + + @@ -115,7 +136,7 @@ import {getDate} from '@/utils/utils.js' const currentDate = getDate({format: true}) // import {queryGroupQuality, queryNowVehicle} from '@/utils/mork2.js' - import {queryGroupQuality, queryNowVehicle, confirmBox, printDelete} from '@/utils/getData2.js' + import {queryGroupQuality, queryNowVehicle, confirmBox, printDelete, queryPcsn} from '@/utils/getData2.js' export default { components: { NavBar, @@ -132,11 +153,18 @@ boxType: null, materialData: {}, suppData: {}, - pcsn: null, qty: null, num: 0, disabled: false, - disabled1: false + disabled1: false, + pcsn: '', + selectedIndex: 0, + pcOptions: [] + // pcOptions: [ + // 'TB-001', + // 'TB-002', + // 'TB-003' + // ], }; }, computed: { @@ -150,6 +178,7 @@ onLoad (options) { this.title = options.title this._queryGroupQuality() + this._queryPcsn() }, onShow () { if (this.$store.getters.publicObj !== '') { @@ -162,6 +191,14 @@ } }, methods: { + onInput(e) { + // console.log('输入内容:', e.detail.value) + }, + onPickerChange(e) { + const index = e.detail.value + this.selectedIndex = index + this.pcsn = this.pcOptions[index] + }, handleChange (e) { if (e) { this._queryNowVehicle(e) @@ -170,6 +207,19 @@ handleDel () { this.boxType = '' }, + /** 批次下拉框*/ + async _queryPcsn () { + try { + let res = await queryPcsn() + if (res) { + this.pcOptions = res.data.map(item => item.value); + } else { + this.pcOptions = [] + } + } catch (e) { + this.pcOptions = [] + } + }, async _queryNowVehicle (e) { try { let res = await queryNowVehicle(e) @@ -228,7 +278,9 @@ icon: 'none' }) } - this.toEmpty() + this.vehicleCode = '' + this.qty = '' + this._queryPcsn() this.disabled = false } catch (e) { this.disabled = false @@ -306,4 +358,63 @@ } } } - \ No newline at end of file + + diff --git a/utils/getData2.js b/utils/getData2.js index fcfe10d..3f26687 100644 --- a/utils/getData2.js +++ b/utils/getData2.js @@ -86,6 +86,11 @@ export const confirmBox = (scode, id, mcode, mname, spcode, spname, pcsn, time, bake_num: num } }) +// 批次下拉框 +export const queryPcsn = () => request({ + url:'api/pdaInGroupBox/queryPcsn', + data: {} +}) // 确认组箱(组箱配送) export const deliveryBox = (code, id, bcode, info, qty, rows) => request({ url:'api/pdaInGroupBox/deliveryBox',