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 @@ + + + + + + 新增出/入库 + + + + + + + + + + + + + + {{ stateDict[scope.row.state] }} + + + + + {{ typeDict[scope.row.type] }} + + + + + + + + + + + + + 查看 + + + + 提交 + + + + 删除 + + + + + + + + + + + + + + + 准入 + 禁入 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + 取消 + + + + \ 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 @@ - - + + - - + + - + - - - - - {{ scope.row.description }} + - + 编辑 - + 删除 @@ -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 @@ - - + + {{ scope.row.material_.name }} @@ -61,19 +47,11 @@ - + 编辑 - + 删除 @@ -81,20 +59,10 @@ - - + + - + 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 @@ - - + + - - + + - {{stateOption[scope.row.state]}} + {{ stateOption[scope.row.state] }} - 详情 + 详情 - 编辑 + 编辑 - 提交 + 提交 - 删除 + 删除 - + \ 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 @@ - - - - - - - - - - - - - - - {{ orderObj.name }} - - - {{ orderObj.number }} - - - {{ orderObj.state }} - - - - - - - - - - {{ scope.row.material_.name }} - - - - - - - - - - - - - - - - - - 编辑 - - - - 删除 - - - - - - - + + + + + {{ orderObj.name }} + {{ orderObj.number }} + {{ orderObj.state }} + + + + + + + + + + + + + + {{ scope.row.material_.name }} + + + + + + + + + + + + + + + + + + 编辑 + + + + 删除 + + + + + + + + \ 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 @@ - + - + + - - + + - + - + + + + + + - + @@ -65,82 +48,90 @@ \ No newline at end of file