diff --git a/src/api/model/mpr.js b/src/api/model/mpr.js new file mode 100644 index 00000000..c0a2b30b --- /dev/null +++ b/src/api/model/mpr.js @@ -0,0 +1,114 @@ +import config from "@/config" +import http from "@/utils/request" +export default { + requisition: { + list: { + name: "申购单列表", + req: async function(data){ + return await http.get(`${config.API_URL}/mpr/requisition/`, data); + } + }, + create: { + name: "创建申购单", + req: async function(data){ + return await http.post(`${config.API_URL}/mpr/requisition/`, data); + } + }, + item: { + name: "获取申购单详情", + req: async function(id){ + return await http.get(`${config.API_URL}/mpr/requisition/${id}/`); + } + }, + update: { + name: "更新申购单", + req: async function(id, data){ + return await http.put(`${config.API_URL}/mpr/requisition/${id}/`, data); + } + }, + delete: { + name: "删除申购单", + req: async function(id){ + return await http.delete(`${config.API_URL}/mpr/requisition/${id}/`); + } + }, + }, + warehouseStock: { + list: { + name: "物料库存列表", + req: async function(data){ + return await http.get(`${config.API_URL}/mpr/warehouse_stock/`, data); + } + }, + item: { + name: "获取库存详情", + req: async function(id){ + return await http.get(`${config.API_URL}/mpr/warehouse_stock/${id}/`); + } + }, + }, + materialRequisition: { + list: { + name: "领用单列表", + req: async function(data){ + return await http.get(`${config.API_URL}/mpr/material_requisition/`, data); + } + }, + create: { + name: "创建领用单", + req: async function(data){ + return await http.post(`${config.API_URL}/mpr/material_requisition/`, data); + } + }, + item: { + name: "获取领用单详情", + req: async function(id){ + return await http.get(`${config.API_URL}/mpr/material_requisition/${id}/`); + } + }, + update: { + name: "更新领用单", + req: async function(id, data){ + return await http.put(`${config.API_URL}/mpr/material_requisition/${id}/`, data); + } + }, + delete: { + name: "删除领用单", + req: async function(id){ + return await http.delete(`${config.API_URL}/mpr/material_requisition/${id}/`); + } + }, + }, + warehouseEntry: { + list: { + name: "入库单列表", + req: async function(data){ + return await http.get(`${config.API_URL}/mpr/warehouse_entry/`, data); + } + }, + create: { + name: "创建入库单", + req: async function(data){ + return await http.post(`${config.API_URL}/mpr/warehouse_entry/`, data); + } + }, + item: { + name: "获取入库单详情", + req: async function(id){ + return await http.get(`${config.API_URL}/mpr/warehouse_entry/${id}/`); + } + }, + update: { + name: "更新入库单", + req: async function(id, data){ + return await http.put(`${config.API_URL}/mpr/warehouse_entry/${id}/`, data); + } + }, + delete: { + name: "删除入库单", + req: async function(id){ + return await http.delete(`${config.API_URL}/mpr/warehouse_entry/${id}/`); + } + }, + } +} diff --git a/src/config/route.js b/src/config/route.js index ca8d1255..c776008b 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -2091,6 +2091,55 @@ const routes = [ }, ], }, + //物资申购 mpr + { + name: "mpr", + path: "/mpr", + meta: { + title: "物资管理", + icon: "el-icon-document", + type: "menu", + perms: ["mpr"], + }, + children: [ + { + name: "requisition", + path: "/mpr/requisition", + meta: { + title: "申购单管理", + perms: ["requisition"], + }, + component: "mpr/requisition", + }, + { + name: "warehouse_entry", + path: "/mpr/warehouse_entry", + meta: { + title: "入库单管理", + perms: ["warehouse_entry"], + }, + component: "mpr/warehouse_entry", + }, + { + name: "warehouse_stock", + path: "/mpr/warehouse_stock", + meta: { + title: "物料库存", + perms: ["warehouse_stock"], + }, + component: "mpr/warehouse_stock", + }, + { + name: "material_requisition", + path: "/mpr/material_requisition", + meta: { + title: "领用记录", + perms: ["material_requisition"], + }, + component: "mpr/material_requisition", + }, + ], + }, //采购 pum { name: "pum", diff --git a/src/views/mpr/material_requisition.vue b/src/views/mpr/material_requisition.vue new file mode 100644 index 00000000..4f39e661 --- /dev/null +++ b/src/views/mpr/material_requisition.vue @@ -0,0 +1,128 @@ + + + diff --git a/src/views/mpr/material_requisition_form.vue b/src/views/mpr/material_requisition_form.vue new file mode 100644 index 00000000..fdedf79f --- /dev/null +++ b/src/views/mpr/material_requisition_form.vue @@ -0,0 +1,397 @@ + + + diff --git a/src/views/mpr/requisition.vue b/src/views/mpr/requisition.vue new file mode 100644 index 00000000..fecb6112 --- /dev/null +++ b/src/views/mpr/requisition.vue @@ -0,0 +1,123 @@ + + + diff --git a/src/views/mpr/requisition_form.vue b/src/views/mpr/requisition_form.vue new file mode 100644 index 00000000..17b59d3a --- /dev/null +++ b/src/views/mpr/requisition_form.vue @@ -0,0 +1,279 @@ + + + diff --git a/src/views/mpr/warehouse_entry.vue b/src/views/mpr/warehouse_entry.vue new file mode 100644 index 00000000..232023a0 --- /dev/null +++ b/src/views/mpr/warehouse_entry.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/mpr/warehouse_entry_form.vue b/src/views/mpr/warehouse_entry_form.vue new file mode 100644 index 00000000..fb8592fc --- /dev/null +++ b/src/views/mpr/warehouse_entry_form.vue @@ -0,0 +1,304 @@ + + + diff --git a/src/views/mpr/warehouse_stock.vue b/src/views/mpr/warehouse_stock.vue new file mode 100644 index 00000000..f7d8983b --- /dev/null +++ b/src/views/mpr/warehouse_stock.vue @@ -0,0 +1,112 @@ + + +