From 3342dc1e57f57c011c4e050c280e33bb6480a974 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Tue, 29 Jul 2025 18:02:24 +0800 Subject: [PATCH] gai --- pages/manage/dwgx.vue | 46 +++++++++++++++++-------------------------- pages/manage/sgyk.vue | 27 +++++++++++-------------- pages/manage/zygl.vue | 30 ++++++++++------------------ utils/getData.js | 12 +++++------ utils/request.js | 10 +++++----- 5 files changed, 50 insertions(+), 75 deletions(-) diff --git a/pages/manage/dwgx.vue b/pages/manage/dwgx.vue index 8afccdf..e2b1f2a 100644 --- a/pages/manage/dwgx.vue +++ b/pages/manage/dwgx.vue @@ -30,7 +30,7 @@ 序号 物料编码 物料名称 - 批次 + 载具号 数量 单位 @@ -40,7 +40,7 @@ {{i+1}} {{e.material_code}} {{e.material_name}} - {{e.pcsn}} + {{e.storagevehicle_code}} {{e.qty}} {{e.unit_code}} @@ -51,8 +51,8 @@ - - + + @@ -98,50 +98,40 @@ }, async _schPointBinding () { this.disabled = true - if (!this.val1 || !this.val2) { + if (!this.val1 || !this.val2 || !this.dataList.length) { this.disabled = false return } try { - let res = await schPointBinding(this.val1, this.val2) + let res = await schPointBinding(this.val1, this.val2, this.dataList) if (res.status === '200') { - uni.showToast({ - title: res.message, - icon: 'none' - }) this.toEmpty() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false + uni.showToast({ + title: res.message, + icon: 'none' + }) } catch (e) { this.disabled = false } }, async _schPointDissect () { this.disabled = true - if (!this.val1 || !this.val2) { + if (!this.val1 || !this.val2 || !this.dataList.length) { this.disabled = false return } try { - let res = await schPointDissect(this.val1, this.val2) + let res = await schPointDissect(this.val1, this.val2, this.dataList) if (res.status === '200') { - uni.showToast({ - title: res.message, - icon: 'none' - }) this.toEmpty() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false + uni.showToast({ + title: res.message, + icon: 'none' + }) } catch (e) { this.disabled = false } diff --git a/pages/manage/sgyk.vue b/pages/manage/sgyk.vue index 00e09e7..bce4873 100644 --- a/pages/manage/sgyk.vue +++ b/pages/manage/sgyk.vue @@ -36,9 +36,9 @@ 序号 - 载具号 物料编码 物料名称 + 载具号 数量 单位 @@ -46,9 +46,9 @@ {{i+1}} - {{e.storagevehicle_code}} {{e.material_code}} {{e.material_name}} + {{e.storagevehicle_code}} {{e.qty}} {{e.unit_code}} @@ -59,7 +59,7 @@ - + @@ -107,25 +107,20 @@ }, async _movestorMove () { this.disabled = true - if (!this.val1 || !this.val2 || !this.val3) { + if (!this.val3 || !this.dataList.length) { this.disabled = false return } try { - let res = await movestorMove(this.val1, this.val2, this.val3) + let res = await movestorMove(this.val1, this.val2, this.val3, this.dataList) if (res.status === '200') { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this._movestorQuerydtl() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false + this.toEmpty() } + this.disabled = false + uni.showToast({ + title: res.message, + icon: 'none' + }) } catch (e) { this.disabled = false } diff --git a/pages/manage/zygl.vue b/pages/manage/zygl.vue index af95625..02b27bf 100644 --- a/pages/manage/zygl.vue +++ b/pages/manage/zygl.vue @@ -101,18 +101,13 @@ try { let res = await schTaskAgainTask(this.pkId) if (res.status === '200') { - uni.showToast({ - title: res.message, - icon: 'none' - }) this._schTaskQueryTask() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false + uni.showToast({ + title: res.message, + icon: 'none' + }) } catch (e) { this.disabled = false } @@ -126,18 +121,13 @@ try { let res = await forceConfirm(this.pkId) if (res.status === '200') { - uni.showToast({ - title: res.message, - icon: 'none' - }) this._schTaskQueryTask() - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - this.disabled = false } + this.disabled = false + uni.showToast({ + title: res.message, + icon: 'none' + }) } catch (e) { this.disabled = false } diff --git a/utils/getData.js b/utils/getData.js index dbfc5f7..55814bf 100644 --- a/utils/getData.js +++ b/utils/getData.js @@ -75,9 +75,9 @@ export const movestorQuerydtl = (code, vcode) => request({ url:'api/pda/movestor/querydtl', data: {struct_code: code, vehicle_code: vcode} }) -export const movestorMove = (code, vcode, mcode) => request({ +export const movestorMove = (code, vcode, mcode, data) => request({ url:'api/pda/movestor/move', - data: {struct_code: code, vehicle_code: vcode, move_struct_code: mcode} + data: {struct_code: code, vehicle_code: vcode, move_struct_code: mcode, data: data} }) // 作业管理 @@ -99,11 +99,11 @@ export const schPointGetPoint = (code, vcode) => request({ url:'/api/pda/schPoint/getPoint', data: {struct_code: code, vehicle_code: vcode} }) -export const schPointBinding = (code, vcode) => request({ +export const schPointBinding = (code, vcode, data) => request({ url:'api/pda/schPoint/binding', - data: {struct_code: code, vehicle_code: vcode} + data: {struct_code: code, vehicle_code: vcode, data: data} }) -export const schPointDissect = (code, vcode) => request({ +export const schPointDissect = (code, vcode, data) => request({ url:'/api/pda/schPoint/dissect', - data: {struct_code: code, vehicle_code: vcode} + data: {struct_code: code, vehicle_code: vcode, data: data} }) \ No newline at end of file diff --git a/utils/request.js b/utils/request.js index f56c5ba..6c4a772 100644 --- a/utils/request.js +++ b/utils/request.js @@ -59,13 +59,13 @@ const request = (params) => { reject('request:fail') } else if (res[1] && res[1].statusCode === 400) { uni.showModal({ - content: res[1].data.message, + content: res[1].errMsg, showCancel: false }) - reject(res[1].data.message) + reject(res[1].errMsg) } else if (res[1] && res[1].statusCode === 401) { uni.showModal({ - content: res[1].data.message, + content: res[1].errMsg, showCancel: false }) store.dispatch('delUserInfo', '') @@ -114,10 +114,10 @@ const request = (params) => { // } }else { uni.showModal({ - content: res[1].data.message, + content: res[1].errMsg, showCancel: false }) - reject(res[1].data.message) + reject(res[1].errMsg) } }) .catch(err => { // 错误