From 12c3ad0b117d904ea8541a62535ad73ceb95e025 Mon Sep 17 00:00:00 2001 From: xiangxy Date: Fri, 13 Oct 2023 13:53:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/modules/taskmanage.vue | 31 +++++++---------- pages/modules/zlmanage.vue | 67 ++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 56 deletions(-) diff --git a/pages/modules/taskmanage.vue b/pages/modules/taskmanage.vue index 9f262ec..60a4bf3 100644 --- a/pages/modules/taskmanage.vue +++ b/pages/modules/taskmanage.vue @@ -63,25 +63,18 @@ methods: { async _tasks () { let res = await tasks(this.keyword, this.startPoint, this.endPoint) - if (res.code === '1') { - res.result.map(el => { - if(el.inst_status === '0') { - this.$set(el, 'inst_status_name', '就绪') - } - if(el.inst_status === '1') { - this.$set(el, 'inst_status_name', '执行中') - } - if(el.inst_status === '2') { - this.$set(el, 'inst_status_name', '完成') - } - }) - this.dataList = [...res.result] - } else { - uni.showToast({ - title: res.desc, - icon: 'none' - }) - } + res.result.map(el => { + if(el.inst_status === '0') { + this.$set(el, 'inst_status_name', '就绪') + } + if(el.inst_status === '1') { + this.$set(el, 'inst_status_name', '执行中') + } + if(el.inst_status === '2') { + this.$set(el, 'inst_status_name', '完成') + } + }) + this.dataList = [...res.result] }, async _taskoperation (type) { try { diff --git a/pages/modules/zlmanage.vue b/pages/modules/zlmanage.vue index 61efd7e..e63e45c 100644 --- a/pages/modules/zlmanage.vue +++ b/pages/modules/zlmanage.vue @@ -70,43 +70,36 @@ methods: { async _insts () { let res = await insts(this.keyword, this.startPoint, this.endPoint) - if (res.code === '1') { - res.result.map(el => { - if(el.inst_status === '0') { - this.$set(el, 'inst_status_name', '就绪') - } - if(el.inst_status === '1') { - this.$set(el, 'inst_status_name', '执行中') - } - if(el.inst_status === '2') { - this.$set(el, 'inst_status_name', '完成') - } - if(el.inst_status === '3') { - this.$set(el, 'inst_status_name', '取消') - } - if(el.inst_status === '4') { - this.$set(el, 'inst_status_name', '异常') - } - if(el.inst_step === '1') { - this.$set(el, 'inst_step_name', '请求取货') - } - if(el.inst_step === '2') { - this.$set(el, 'inst_step_name', '取货完成') - } - if(el.inst_step === '3') { - this.$set(el, 'inst_step_name', '请求放货') - } - if(el.inst_step === '4') { - this.$set(el, 'inst_step_name', '放货完成') - } - }) - this.dataList = [...res.result] - } else { - uni.showToast({ - title: res.desc, - icon: 'none' - }) - } + res.result.map(el => { + if(el.inst_status === '0') { + this.$set(el, 'inst_status_name', '就绪') + } + if(el.inst_status === '1') { + this.$set(el, 'inst_status_name', '执行中') + } + if(el.inst_status === '2') { + this.$set(el, 'inst_status_name', '完成') + } + if(el.inst_status === '3') { + this.$set(el, 'inst_status_name', '取消') + } + if(el.inst_status === '4') { + this.$set(el, 'inst_status_name', '异常') + } + if(el.inst_step === '1') { + this.$set(el, 'inst_step_name', '请求取货') + } + if(el.inst_step === '2') { + this.$set(el, 'inst_step_name', '取货完成') + } + if(el.inst_step === '3') { + this.$set(el, 'inst_step_name', '请求放货') + } + if(el.inst_step === '4') { + this.$set(el, 'inst_step_name', '放货完成') + } + }) + this.dataList = [...res.result] }, async _inst (type) { try {