From 921506bd78c870e288d7c07ab9456b9c3d124fee Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 22 Feb 2023 14:14:32 +0800 Subject: [PATCH] update bom --- src/components/DialogWithMenu.vue | 4 +-- src/views/modules/pms/bom/config.js | 42 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue index 0e85167..e2138bc 100644 --- a/src/components/DialogWithMenu.vue +++ b/src/components/DialogWithMenu.vue @@ -759,7 +759,7 @@ export default { switch (type) { case "delete": { // 确认是否删除 - return this.$confirm(`是否删除条目: ${data}`, "提示", { + return this.$confirm(`是否删除条目: ${data.name ?? data.material ? data.material : data.id}`, "提示", { confirmButtonText: "确认", cancelButtonText: "我再想想", type: "warning", @@ -769,7 +769,7 @@ export default { this.$http({ url: this.urls.subase, method: "DELETE", - data: [`${data}`], + data: [`${data.id}`], }).then(({ data: res }) => { if (res.code === 0) { this.$message.success({ diff --git a/src/views/modules/pms/bom/config.js b/src/views/modules/pms/bom/config.js index 58be7ae..df18559 100644 --- a/src/views/modules/pms/bom/config.js +++ b/src/views/modules/pms/bom/config.js @@ -171,27 +171,27 @@ export default function () { rules: { required: true, message: "必填项不能为空", trigger: "blur" }, elparams: { placeholder: "请选择物料", filterable: true }, options: [], - // fetchData: () => this.$http.get('/pms/material/page', { params: { limit: 999, page: 1 } }) - fetchData: () => new Promise((resolve) => { - setTimeout(() => { - resolve({ - data: { - code: 0, - data: { - total: 0, - list: - [ - { id: 10001, name: 'mock物料1' }, - { id: 10002, name: 'mock物料2' }, - { id: 10003, name: 'mock物料3' }, - { id: 10004, name: 'mock物料4' }, - { id: 10005, name: 'mock物料5' }, - ] - } - } - }) - }, 800) - }) + fetchData: () => this.$http.get('/pms/material/page', { params: { limit: 999, page: 1 } }) + // fetchData: () => new Promise((resolve) => { + // setTimeout(() => { + // resolve({ + // data: { + // code: 0, + // data: { + // total: 0, + // list: + // [ + // { id: 10001, name: 'mock物料1' }, + // { id: 10002, name: 'mock物料2' }, + // { id: 10003, name: 'mock物料3' }, + // { id: 10004, name: 'mock物料4' }, + // { id: 10005, name: 'mock物料5' }, + // ] + // } + // } + // }) + // }, 800) + // }) }, { input: true,