From 8e69c8d31b69d9403585373e620ba5b10b847929 Mon Sep 17 00:00:00 2001 From: zwq Date: Mon, 18 Jul 2022 14:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/order-auto-add.vue | 4 +++ src/views/order/current-order.vue | 34 ++++++++++++++-------- src/views/order/current-task.vue | 44 ++++++++++++++--------------- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/src/views/common/order-auto-add.vue b/src/views/common/order-auto-add.vue index 694907c..93c016d 100644 --- a/src/views/common/order-auto-add.vue +++ b/src/views/common/order-auto-add.vue @@ -134,7 +134,11 @@ export default { }, init (row, idx) { this.visible = true + this.row = null + this.editIndex = null this.formLoading = false + this.dataForm.targetQuantity = null + this.dataForm.targetWeight = null this.$nextTick(() => { this.$refs['dataForm'].resetFields() if (row) { diff --git a/src/views/order/current-order.vue b/src/views/order/current-order.vue index 4e2c356..807f3a2 100644 --- a/src/views/order/current-order.vue +++ b/src/views/order/current-order.vue @@ -24,21 +24,10 @@ label="序号" width="50"> - - - - - @@ -69,10 +58,29 @@ prop="quantity" label="物料数量"> + + + + + + + + + { if (data && data.code === 0) { this.dataList = data.data.records + this.dataList.forEach(item => { + item.targetQuantity = item.quantity - item.finishQuantity - item.waitQuantity + item.targetWeight = item.weight - item.finishWeight - item.waitWeight + }) this.totalPage = data.data.total } else { this.dataList = [] diff --git a/src/views/order/current-task.vue b/src/views/order/current-task.vue index 9535e20..7b762ba 100644 --- a/src/views/order/current-task.vue +++ b/src/views/order/current-task.vue @@ -71,7 +71,7 @@ }} - + @@ -184,20 +184,20 @@ export default { activated () { this.getDataList() this.timer = setInterval(this.getDataList, 180000) - this.$http({ - url: this.$http.adornUrl('/craftInfo/page'), - method: 'post', - data: this.$http.adornData({ - current: 1, - size: 999 - }) - }).then(({ data }) => { - if (data && data.code === 0) { - this.processList = data.data.records - } else { - this.processList.splice(0, this.processList.length) - } - }) + // this.$http({ + // url: this.$http.adornUrl('/craftInfo/page'), + // method: 'post', + // data: this.$http.adornData({ + // current: 1, + // size: 999 + // }) + // }).then(({ data }) => { + // if (data && data.code === 0) { + // this.processList = data.data.records + // } else { + // this.processList.splice(0, this.processList.length) + // } + // }) }, methods: { // 获取数据列表 @@ -214,13 +214,13 @@ export default { }).then(({ data }) => { if (data && data.code === 0) { const resData = data.data.records - resData.forEach(item => { - if (item.craftCodeId) { - this.processList.find(item1 => { - if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode } - }) - } - }) + // resData.forEach(item => { + // if (item.craftCodeId) { + // this.processList.find(item1 => { + // if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode } + // }) + // } + // }) this.dataList = resData this.totalPage = data.data.total } else {