diff --git a/pages/zw/wl-groupplate.vue b/pages/zw/wl-groupplate.vue index bd29585..f5a0170 100644 --- a/pages/zw/wl-groupplate.vue +++ b/pages/zw/wl-groupplate.vue @@ -66,7 +66,7 @@ - + @@ -75,7 +75,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' - import {regionList, groupPlate} from '@/utils/getData4.js' + import {getFormDataList, zwgroupPlate} from '@/utils/getData4.js' export default { components: { NavBar, @@ -101,12 +101,17 @@ } }, created () { - this._regionList() + this._getFormDataList() }, methods: { - async _regionList () { + toJump () { + uni.navigateTo({ + url: '/pages/common/mater-list?title=查询物料' + }) + }, + async _getFormDataList () { try { - let res = await regionList() + let res = await getFormDataList() if (res) { this.options = res.data } else { @@ -125,22 +130,15 @@ this.currentData = {} this.disabled = false }, - async _groupPlate () { + async _zwgroupPlate () { this.disabled = true - if (JSON.stringify(this.currentData) === '{}' || !this.val1) { + if (JSON.stringify(this.currentData) === '{}' || !this.val1 || !this.index) { this.disabled = false return } try { this.currentData.stor_code = this.index - let arr = [ - { - material_id: this.currentData.material_id, - qty: this.currentData.qty, - pcsn: this.currentData.pcsn, - } - ] - let res = await groupPlate(arr, this.val1) + let res = await zwgroupPlate(this.val1, this.currentData.material_id, this.currentData.qty, this.index) uni.showToast({ title: res.message, icon: 'none' diff --git a/utils/getData4.js b/utils/getData4.js index 06481e8..3493062 100644 --- a/utils/getData4.js +++ b/utils/getData4.js @@ -253,7 +253,13 @@ export const updatePointType = (code, type) => request({ }) // 组盘入库 -export const groupPlate = (mid, pcsn, qty, vcode, ecode) => request({ +// 物料组盘(带单据) +export const zwgroupPlate = (vcode, mid, qty, ecode) => request({ url:'api/pda/iosIn/groupPlate', - data: {material_id: mid, pcsn: pcsn, qty: qty, vehicle_code: vcode, ext_code: ecode} + data: {vehicle_code: vcode, material_id: mid, qty: qty, ext_code: ecode} }) +// 获取单据下拉清单 +// export const getFormDataList = (fdcode) => request({ +// url:'api/pda/iosIn/getFormDataList', +// data: {form_data_code: fdcode} +// })