From 0d8bd350fa6b332fca393ee8a58a1fd93b9743fd Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 27 Mar 2023 17:01:11 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B7=B7=E6=96=99=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=87=8C=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=85=8D?= =?UTF-8?q?=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/pms/blenderBatch/config.js | 11 +- .../components/ListViewWithHead.vue | 21 ++- .../blenderOrder/components/edit-dialog.vue | 131 +++++++++++++----- src/views/modules/pms/blenderOrder/config.js | 24 +++- src/views/modules/pms/blenderOrder/index.vue | 14 -- 5 files changed, 137 insertions(+), 64 deletions(-) diff --git a/src/views/modules/pms/blenderBatch/config.js b/src/views/modules/pms/blenderBatch/config.js index 6866f5a..4d664c2 100644 --- a/src/views/modules/pms/blenderBatch/config.js +++ b/src/views/modules/pms/blenderBatch/config.js @@ -32,9 +32,14 @@ export default function () { width: 90, subcomponent: TableOperaionComponent, options: [ - { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, - { name: 'delete', icon: 'delete', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, - ] // 只有 injectRow.task 为手动时,才允许编辑 + // 只有 injectRow.task 为手动时,才允许编辑 + // { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, + // { name: 'delete', icon: 'delete', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }, + + // 只有 injectRow.status 为 waiting 时,才允许编辑 + { name:"edit", label: "编辑", icon: "edit-outline", enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } }, + { name: 'delete', icon: 'delete', emitFull: true, promptField: 'batchNo', enable: injectRow => { return 'status' in injectRow && injectRow.status === 'Waiting' } }, + ] }, ]; diff --git a/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue b/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue index 415e561..a2e3079 100644 --- a/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue +++ b/src/views/modules/pms/blenderOrder/components/ListViewWithHead.vue @@ -31,7 +31,8 @@ :dialog-visible.sync="dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" - /> + /> + @@ -81,6 +82,7 @@ export default { dataList: [], tableLoading: false, refreshLayoutKey: null, + dialogBomCode: "", }; }, inject: ["urls"], @@ -138,7 +140,7 @@ export default { } else this.dataList = res.data.list; this.totalPage = res.data.total; - } + } } else { this.$message({ message: `${res.code}: ${res.msg}`, @@ -209,13 +211,13 @@ export default { this.openDialog(data, true); break; } - case 'view-batch': { + case "view-batch": { this.$router.push({ name: toRouter, - query: { - id: data // 混料订单id - } - }) + query: { + id: data, // 混料订单id + }, + }); break; } case "detach": { @@ -302,6 +304,11 @@ export default { openDialog(row_data) { this.dialogVisible = true; + // if ("bomCode" in row_data) { + // const { bomCode } = row_data; + // this.dialogBomCode = bomCode; + // } + this.$nextTick(() => { this.$refs["edit-dialog"].init(row_data); }); diff --git a/src/views/modules/pms/blenderOrder/components/edit-dialog.vue b/src/views/modules/pms/blenderOrder/components/edit-dialog.vue index dcc6b00..d79edf6 100644 --- a/src/views/modules/pms/blenderOrder/components/edit-dialog.vue +++ b/src/views/modules/pms/blenderOrder/components/edit-dialog.vue @@ -85,7 +85,6 @@