From 82d01ee240b0b9c8dbaedd98e140ac499263104f Mon Sep 17 00:00:00 2001 From: xiangxy Date: Mon, 20 Oct 2025 14:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=BB=84=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/zw/wl-groupplate.vue | 64 +++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/pages/zw/wl-groupplate.vue b/pages/zw/wl-groupplate.vue index 4b289b5..9c6de3d 100644 --- a/pages/zw/wl-groupplate.vue +++ b/pages/zw/wl-groupplate.vue @@ -4,14 +4,6 @@ - - - 日期 - - - - - 源单编码 @@ -27,9 +19,18 @@ + + + 点位编码 + + + + + 物料信息 @@ -72,17 +73,20 @@ - 供应商 + 供应商 - + + + - + @@ -91,7 +95,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' - import {getFormDataList, getFormMaterial, supplierdroplist, zwgroupPlate} from '@/utils/getData4.js' + import {getPointCodeByVehicleCode, getFormDataList, getFormMaterial, supplierdroplist, zwgroupPlate} from '@/utils/getData4.js' export default { components: { NavBar, @@ -100,14 +104,14 @@ }, data() { return { - singleDate: '', title: '', val1: '', + val2: '', currentData: {}, options: [], index: '', options2: [], - index2: '', + // index2: '', disabled: false }; }, @@ -119,16 +123,12 @@ this._supplierdroplist() }, methods: { - onSingleDateChange(e) { - this.singleDate = e - this._getFormDataList() - }, toJump () { this._getFormMaterial() }, async _getFormDataList () { try { - let res = await getFormDataList(this.singleDate) + let res = await getFormDataList() if (res) { this.options = res.data } else { @@ -168,26 +168,40 @@ this._getFormMaterial() } }, - selectChange2 (e) { - this.index2 = e + // selectChange2 (e) { + // this.index2 = e + // }, + handleChange (e) { + if (e) { + this._getPointCodeByVehicleCode() + } + }, + async _getPointCodeByVehicleCode () { + try { + let res = await getPointCodeByVehicleCode(this.val1) + if (res) { + this.val2 = res.data.point_code + } + } catch (e) { + } }, clearUp () { this.val1 = '' this.index = '' - this.index2 = '' + // this.index2 = '' this.currentData = {} this.disabled = false }, async _zwgroupPlate () { this.disabled = true - if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.index || !this.index2) { + if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.index) { this.disabled = false return } try { this.currentData.stor_code = this.index - let selobj = this.options2.find(item => item.value === this.index2) - let res = await zwgroupPlate(this.val1, this.currentData.material_id, this.currentData.qty, this.index, this.index2, selobj.text) + let selobj = this.options2.find(item => item.value === this.currentData.supp_code) + let res = await zwgroupPlate(this.val1, this.currentData.material_id, this.currentData.qty, this.index, this.currentData.supp_code, selobj.text) uni.showToast({ title: res.message, icon: 'none'