diff --git a/src/api/model/inm.js b/src/api/model/inm.js index 9c1aefaf..298b9cf3 100644 --- a/src/api/model/inm.js +++ b/src/api/model/inm.js @@ -88,6 +88,14 @@ export default { data); } }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/inm/mio/${id}/`, + data); + } + }, delete: { name: "删除", req: async function(id){ @@ -131,6 +139,14 @@ export default { data); } }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/inm/mioitem/${id}/`, + data); + } + }, delete: { name: "删除", req: async function(id){ diff --git a/src/views/inm/halfgood_mio.vue b/src/views/inm/halfgood_mio.vue index 13a9497b..81e8b250 100644 --- a/src/views/inm/halfgood_mio.vue +++ b/src/views/inm/halfgood_mio.vue @@ -1,177 +1,268 @@ - - - - 生产入库 - 生产领料 - - - - - - - - - - - - - - - - - - - {{ typeDict[scope.row.type] }} - - - - - {{ stateDict[scope.row.state] }} - - - - - - - - - - - - - - 查看 - - - 提交 - - - 删除 - - - 撤销 - - - - - - - + + + + 生产入库 + 生产领料 + + + + + + + + + + + + + + + + + + + {{ typeDict[scope.row.type] }} + + + + + {{ stateDict[scope.row.state] }} + + + + + + + + + + + + + + 查看 + + + 编辑 + + + 提交 + + + 删除 + + + 撤销 + + + + + + + \ No newline at end of file + diff --git a/src/views/inm/mainso_mio.vue b/src/views/inm/mainso_mio.vue index 46f1254c..251bc779 100644 --- a/src/views/inm/mainso_mio.vue +++ b/src/views/inm/mainso_mio.vue @@ -103,6 +103,14 @@ > 查看 + + 编辑 + { - this.$refs.saveDialog.open("edit", type).setData(row); + this.$refs.saveDialog.open("edit", row.type).setData(row); }); }, //查看 diff --git a/src/views/inm/mio_form.vue b/src/views/inm/mio_form.vue index 62a6d668..2b8d1fc1 100644 --- a/src/views/inm/mio_form.vue +++ b/src/views/inm/mio_form.vue @@ -248,9 +248,7 @@ export default { open(mode = "add", type = "") { this.mode = mode; this.form.type = type; - if (mode == "add") { - this.init(); - } + this.init(); this.visible = true; return this; },