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 @@