From b65b83dc20d3fc171b6943af0dcfbde0882c7784 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 19 Oct 2023 14:08:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95/=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/inm.js | 6 +- src/api/model/pum.js | 4 +- src/config/route.js | 18 +- src/views/inm/fifo.vue | 241 ------------------------- src/views/inm/materialbatch.vue | 39 ++-- src/views/inm/mio.vue | 213 ++++++++++++++++++++++ src/views/inm/warehouse.vue | 75 +++----- src/views/pm/mtask2.vue | 8 +- src/views/pum/order.vue | 296 ++++++++++++++----------------- src/views/pum/orderitem.vue | 95 ++++------ src/views/pum/orderitemplan.vue | 103 ++++------- src/views/pum/plan.vue | 232 +++++++++++------------- src/views/pum/planitem.vue | 305 ++++++++++++++------------------ src/views/pum/planitem_form.vue | 203 ++++++++++----------- 14 files changed, 794 insertions(+), 1044 deletions(-) delete mode 100644 src/views/inm/fifo.vue create mode 100644 src/views/inm/mio.vue diff --git a/src/api/model/inm.js b/src/api/model/inm.js index 7d17c3ae..1fb177d5 100644 --- a/src/api/model/inm.js +++ b/src/api/model/inm.js @@ -89,10 +89,10 @@ export default { }, submit: { name: "提交", - req: async function(data){ + req: async function(id){ return await http.post( - `${config.API_URL}/inm/mio//${id}/submit/`, - data); + `${config.API_URL}/inm/mio/${id}/submit/`, + ); } }, }, diff --git a/src/api/model/pum.js b/src/api/model/pum.js index 36ccd70c..145ae69e 100644 --- a/src/api/model/pum.js +++ b/src/api/model/pum.js @@ -53,10 +53,10 @@ export default { }, submit:{ name: "提交采购订单", - req: async function(data){ + req: async function(id){ return await http.post( `${config.API_URL}/pum/pu_order/${id}/submit/`, - data); + ); } }, }, diff --git a/src/config/route.js b/src/config/route.js index 0f7df788..5ef3e6c7 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -832,25 +832,15 @@ const routes = [ "component": "inm/materialbatch" }, { - "name": "fifo", - "path": "/inm/fifo", + "name": "mio", + "path": "/inm/mio", "meta": { "title": "出入库记录", "icon": "el-icon-cellphone", "perms": ["inm"] }, - "component": "inm/fifo" - }, - { - "name": "material", - "path": "/inm/material", - "meta": { - "title": "物料产品", - "icon": "el-icon-cellphone", - "perms": ["inm"] - }, - "component": "ungrouped/material" - }, + "component": "inm/mio" + } ] }, diff --git a/src/views/inm/fifo.vue b/src/views/inm/fifo.vue deleted file mode 100644 index 45e06cb6..00000000 --- a/src/views/inm/fifo.vue +++ /dev/null @@ -1,241 +0,0 @@ - - \ No newline at end of file diff --git a/src/views/inm/materialbatch.vue b/src/views/inm/materialbatch.vue index 93f23351..bdb211eb 100644 --- a/src/views/inm/materialbatch.vue +++ b/src/views/inm/materialbatch.vue @@ -2,35 +2,20 @@
- - + +
- - - + + + - + - + - + @@ -45,16 +30,16 @@ export default { return { apiObj: this.$API.inm.warehouse.batch, query: { - page:1, - page_size:20 + page: 1, + page_size: 20 }, selection: [], }; }, methods: { handleQuery() { - this.$refs.table.queryData(this.query) - }, + this.$refs.table.queryData(this.query) + }, resetQuery() { this.query = {}; }, diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue new file mode 100644 index 00000000..dbcf406e --- /dev/null +++ b/src/views/inm/mio.vue @@ -0,0 +1,213 @@ + + \ No newline at end of file diff --git a/src/views/inm/warehouse.vue b/src/views/inm/warehouse.vue index 9f0aedd8..52638451 100644 --- a/src/views/inm/warehouse.vue +++ b/src/views/inm/warehouse.vue @@ -2,58 +2,31 @@
- - + +
- - + + - + - - - - - + @@ -61,14 +34,10 @@
- + - \ No newline at end of file + + //本地更新数据 + handleSaveSuccess(data, mode) { + if (mode == "add") { + this.$refs.table.refresh(); + } else if (mode == "edit") { + this.$refs.table.refresh(); + } + }, + handleQuery() { + this.$refs.table.queryData(this.query) + }, + resetQuery() { + this.query = {}; + }, + }, +}; + \ No newline at end of file diff --git a/src/views/pum/orderitem.vue b/src/views/pum/orderitem.vue index a27efc4f..8781510f 100644 --- a/src/views/pum/orderitem.vue +++ b/src/views/pum/orderitem.vue @@ -2,20 +2,12 @@
- - + +
- 关联采购订单 + 计划明细变更采购明细
@@ -38,14 +30,8 @@ - - + + - + diff --git a/src/views/pum/plan.vue b/src/views/pum/plan.vue index 7677bd6d..81378bc0 100644 --- a/src/views/pum/plan.vue +++ b/src/views/pum/plan.vue @@ -2,172 +2,140 @@
- - + +
- - + +
- + \ No newline at end of file + //编辑 + table_edit(row) { + this.dialog.save = true; + this.$nextTick(() => { + this.$refs.saveDialog.open("edit").setData(row); + }); + }, + //查看 + table_submit(row) { + console.log(row.id) + this.$API.pum.plan.submit.req(row.id).then((res) => { + this.$refs.table.refresh(); + debugger; + this.$message.success("提交成功"); + }); + }, + //删除 + table_del(row) { + this.$confirm(`确定删除该计划吗?`, "提示", { + type: "warning", + }).then(() => { + this.$API.pum.plan.delete.req(row.id).then((res) => { + this.$message.success("删除成功"); + this.$refs.table.refresh(); + return res; + }).catch((err) => { + return err; + }); + }).catch(() => { }); + }, + //本地更新数据 + handleSaveSuccess(data, mode) { + if (mode == "add") { + this.$refs.table.refresh(); + } else if (mode == "edit") { + this.$refs.table.refresh(); + } + }, + handleQuery() { + this.$refs.table.queryData(this.query) + }, + resetQuery() { + this.query = {}; + }, + }, +}; + \ No newline at end of file diff --git a/src/views/pum/planitem.vue b/src/views/pum/planitem.vue index 3f91f6ba..b2b3e5b9 100644 --- a/src/views/pum/planitem.vue +++ b/src/views/pum/planitem.vue @@ -1,177 +1,140 @@ \ No newline at end of file + + //本地更新数据 + handleSaveSuccess(data, mode) { + if (mode == "add") { + this.$refs.table.refresh(); + } else if (mode == "edit") { + this.$refs.table.refresh(); + } + }, + handleQuery() { + this.$refs.table.queryData(this.query) + }, + resetQuery() { + this.query = {}; + }, + }, +}; + \ No newline at end of file diff --git a/src/views/pum/planitem_form.vue b/src/views/pum/planitem_form.vue index 2424f5dc..acba5591 100644 --- a/src/views/pum/planitem_form.vue +++ b/src/views/pum/planitem_form.vue @@ -1,57 +1,40 @@ \ No newline at end of file