From 5868f8fab9476f05428616188435980d4785977c Mon Sep 17 00:00:00 2001 From: litao Date: Mon, 22 Dec 2025 09:48:01 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/les/bindMaterial.vue | 18 +++++++++---- pages/les/callMaterial.vue | 15 ++++++----- pages/les/deliveryMaterial.vue | 48 +++++++++++++++++++++------------- pages/les/returnPallet.vue | 12 +++++---- pages/work/indexList.json | 8 +++--- 5 files changed, 63 insertions(+), 38 deletions(-) diff --git a/pages/les/bindMaterial.vue b/pages/les/bindMaterial.vue index 975aba4..9163454 100644 --- a/pages/les/bindMaterial.vue +++ b/pages/les/bindMaterial.vue @@ -25,7 +25,10 @@ import { bind, unBind } from "@/api/les/lesMaterialBind.js"; export default { data() { return { - formData: {}, + formData: { + locationCode: null, + batchNo: null, + }, /** 校验规则 */ rules: { locationCode: { @@ -75,6 +78,7 @@ export default { bind(_this.formData).then(res => { _this.$modal.closeLoading(); _this.$modal.msgSuccess("绑定成功!"); + _this.reset(); setTimeout(() => { this.$tab.switchTab("/pages/work/index"); }, 500); @@ -102,7 +106,8 @@ export default { _this.$modal.loading('解绑中') unBind(_this.formData.locationCode).then(res => { _this.$modal.closeLoading(); - _this.$modal.msgSuccess("解绑成功!") + _this.$modal.msgSuccess("解绑成功!"); + _this.reset(); setTimeout(() => { this.$tab.switchTab("/pages/work/index"); }, 500); @@ -118,9 +123,12 @@ export default { }) }, - // reset() { - // this.formData = {}; - // } + reset() { + this.formData = { + locationCode: null, + batchNo: null, + }; + } } } \ No newline at end of file diff --git a/pages/les/callMaterial.vue b/pages/les/callMaterial.vue index 5887a92..a21bca9 100644 --- a/pages/les/callMaterial.vue +++ b/pages/les/callMaterial.vue @@ -24,6 +24,8 @@ export default { data() { return { formData: { + srcLocationCode: null, + destLocationCode: null, taskType: LesDeliveryTaskType.PRODUCTION }, /** 校验规则 */ @@ -46,7 +48,8 @@ export default { methods: { searchSrcLocation() { const _this = this; - if (_this.formData.destLocationCode == '') { + if (!_this.formData.destLocationCode) { + _this.formData.srcLocationCode = null; return; } findPreparation(_this.formData.destLocationCode).then(res => { @@ -76,6 +79,7 @@ export default { addDeliveryTask(_this.formData).then(res => { _this.$modal.closeLoading(); _this.$modal.msgSuccess("提交成功!"); + _this.reset(); setTimeout(() => { _this.$tab.switchTab("/pages/work/index"); }, 500); @@ -86,11 +90,10 @@ export default { }) }, - // reset() { - // const _this = this; - // this.formData.srcLocationCode = ''; - // this.formData.destLocationCode = ''; - // } + reset() { + this.formData.srcLocationCode = null; + this.formData.destLocationCode = null; + } } } \ No newline at end of file diff --git a/pages/les/deliveryMaterial.vue b/pages/les/deliveryMaterial.vue index a1fe6e0..8be3fab 100644 --- a/pages/les/deliveryMaterial.vue +++ b/pages/les/deliveryMaterial.vue @@ -5,12 +5,12 @@ - + - - + + - + @@ -30,11 +30,22 @@ import RobotType from "@/utils/enums/RobotType"; import { delivery, cancel } from "@/api/les/lesMaterialDelivery.js" export default { onLoad(option) { - this.formData = JSON.parse(option.formData); + const form = JSON.parse(option.formData); + this.formData.taskTyp = form.taskType; + this.formData.id = form.id; + this.formData.srcLocationCode = form.srcLocationCode; + this.destLocationCode = form.destLocationCode; }, data() { return { - formData: {}, + formData: { + id: null, + srcLocationCode: null, + taskTyp: null, + robotType: null, + ctnrTyp: null, + }, + destLocationCode: null, RobotData: [ { value: RobotType.LATENT_MOBILE_ROBOT, text: "潜伏车" }, { value: RobotType.LATENT_FORKLIFT_AGV, text: "潜伏叉车" }, @@ -47,12 +58,6 @@ export default { errorMessage: '请输入发货点位', }, ] }, - destLocationCode: { - rules: [{ - required: true, - errorMessage: '请输入目的货位', - }, ] - }, RobotType: { rules: [{ required: true, @@ -66,14 +71,14 @@ export default { handleDelivery() { const _this = this; this.$refs.form.validate().then(res => { - if (_this.formData.srcLocationCode && _this.formData.destLocationCode) { + if (_this.formData.srcLocationCode && this.formData.robotType) { _this.$modal.loading('提交中') delivery(_this.formData).then(res => { _this.$modal.closeLoading(); _this.$modal.msgSuccess("提交成功!"); _this.reset(); setTimeout(() => { - this.$tab.switchTab("/pages/les/chooseTask"); + this.$tab.switchTab("/pages/work/index"); }, 500); }) } else { @@ -97,7 +102,7 @@ export default { _this.$modal.msgSuccess("取消成功!"); _this.reset(); setTimeout(() => { - this.$tab.switchTab("/pages/les/chooseTask"); + this.$tab.switchTab("/pages/work/index"); }, 500); }) } else if (res.cancel) { @@ -107,9 +112,16 @@ export default { }); }) }, - // reset() { - // this.formData = {}; - // } + reset() { + this.formData = { + id: null, + srcLocationCode: null, + taskTyp: null, + robotType: null, + ctnrTyp: null, + }; + this.destLocationCode = null; + } } } \ No newline at end of file diff --git a/pages/les/returnPallet.vue b/pages/les/returnPallet.vue index 0423c0b..50c8483 100644 --- a/pages/les/returnPallet.vue +++ b/pages/les/returnPallet.vue @@ -25,6 +25,8 @@ export default { data() { return { formData: { + srcLocationCode: null, + destLocationCode: null, taskType: LesDeliveryTaskType.PALLET_RECYCLING }, /** 校验规则 */ @@ -69,6 +71,7 @@ export default { addDeliveryTask(_this.formData).then(res => { _this.$modal.closeLoading(); _this.$modal.msgSuccess("提交成功!"); + _this.reset(); setTimeout(() => { this.$tab.switchTab("/pages/work/index"); }, 500); @@ -78,11 +81,10 @@ export default { } }) }, - // reset() { - // const _this = this; - // this.formData.srcLocationCode = ''; - // this.formData.destLocationCode = ''; - // } + reset() { + this.formData.srcLocationCode = null; + this.formData.destLocationCode = null; + } } } \ No newline at end of file diff --git a/pages/work/indexList.json b/pages/work/indexList.json index 7add1c0..9031878 100644 --- a/pages/work/indexList.json +++ b/pages/work/indexList.json @@ -967,7 +967,7 @@ "data": [{ "path": "/pages/les/returnPallet", "permission": "les:deliveryTask:list", - "icon": "icon-luchangfenxibaogao", + "icon": "checkmarkempty", "color": "linear-gradient(#FEBD5F, #FEAD37)", "style": { "navigationBarTitleText": "托盘返空" @@ -975,7 +975,7 @@ }, { "path": "/pages/les/bindMaterial", "permission": "les:basic:location:list", - "icon": "icon-jianyanjilu", + "icon": "icon-lingliaodan", "color": "linear-gradient(#FEBD5F, #FEAD37)", "style": { "navigationBarTitleText": "备料绑定" @@ -983,7 +983,7 @@ }, { "path": "/pages/les/callMaterial", "permission": "les:deliveryTask:list", - "icon": "icon-a-ziyuan13500", + "icon": "checkmarkempty", "color": "linear-gradient(#FEBD5F, #FEAD37)", "style": { "navigationBarTitleText": "生产呼料" @@ -991,7 +991,7 @@ }, { "path": "/pages/les/chooseTask", "permission": "les:deliveryRecord:list", - "icon": "icon-yonghujiluchaxun", + "icon": "icon--tuichu", "color": "linear-gradient(#FEBD5F, #FEAD37)", "style": { "navigationBarTitleText": "生产配送"