diff --git a/src/api/model/mpr.js b/src/api/model/mpr.js index c0a2b30b..f78f0772 100644 --- a/src/api/model/mpr.js +++ b/src/api/model/mpr.js @@ -1,6 +1,38 @@ import config from "@/config" import http from "@/utils/request" export default { + warehouse: { + list: { + name: "库房列表", + req: async function(data){ + return await http.get(`${config.API_URL}/mpr/warehouse/`, data); + } + }, + create: { + name: "创建库房", + req: async function(data){ + return await http.post(`${config.API_URL}/mpr/warehouse/`, data); + } + }, + item: { + name: "获取库房详情", + req: async function(id){ + return await http.get(`${config.API_URL}/mpr/warehouse/${id}/`); + } + }, + update: { + name: "更新库房", + req: async function(id, data){ + return await http.put(`${config.API_URL}/mpr/warehouse/${id}/`, data); + } + }, + delete: { + name: "删除库房", + req: async function(id){ + return await http.delete(`${config.API_URL}/mpr/warehouse/${id}/`); + } + }, + }, requisition: { list: { name: "申购单列表", diff --git a/src/config/route.js b/src/config/route.js index d0f28f8b..6ee83b9d 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -2102,6 +2102,15 @@ const routes = [ perms: ["mpr"], }, children: [ + { + name: "mpr_warehouse", + path: "/mpr/warehouse", + meta: { + title: "库房管理", + perms: ["mpr_warehouse"], + }, + component: "mpr/warehouse", + }, { name: "requisition", path: "/mpr/requisition", diff --git a/src/views/enm_energy/carbon_ly.vue b/src/views/enm_energy/carbon_ly.vue deleted file mode 100644 index dc7f06a0..00000000 --- a/src/views/enm_energy/carbon_ly.vue +++ /dev/null @@ -1,1036 +0,0 @@ - - - - - - - - - - - - - - - - 打印 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 本日生产参数统计图 - - - - 本月生产参数统计图 - - - - 本年生产参数统计图 - - - - - - - - - - - - - - diff --git a/src/views/hrm/empjoin.vue b/src/views/hrm/empjoin.vue index 490d69d4..7973c9de 100644 --- a/src/views/hrm/empjoin.vue +++ b/src/views/hrm/empjoin.vue @@ -9,7 +9,9 @@ {t_id=row.id;mode='show';drawerVisible=true;}"> - + + {{ deptMap[scope.row.dept_need] || '' }} + @@ -25,7 +27,7 @@ diff --git a/src/views/mpr/warehouse_entry.vue b/src/views/mpr/warehouse_entry.vue index 232023a0..2c9ee4f9 100644 --- a/src/views/mpr/warehouse_entry.vue +++ b/src/views/mpr/warehouse_entry.vue @@ -85,7 +85,7 @@ const t_id = ref(null) const warehouseOptions = ref([]) onMounted(async () => { - let res = await API.inm.warehouse.list.req({ page: 0 }) + let res = await API.mpr.warehouse.list.req({ page: 0 }) warehouseOptions.value = res }) diff --git a/src/views/mpr/warehouse_entry_form.vue b/src/views/mpr/warehouse_entry_form.vue index fb8592fc..598095b4 100644 --- a/src/views/mpr/warehouse_entry_form.vue +++ b/src/views/mpr/warehouse_entry_form.vue @@ -192,7 +192,7 @@ export default { } }, async mounted() { - let res = await this.$API.inm.warehouse.list.req({ page: 0 }) + let res = await this.$API.mpr.warehouse.list.req({ page: 0 }) this.warehouseOptions = res if (this.t_id) { this.loadData() diff --git a/src/views/mpr/warehouse_form2.vue b/src/views/mpr/warehouse_form2.vue new file mode 100644 index 00000000..3cc91d4d --- /dev/null +++ b/src/views/mpr/warehouse_form2.vue @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 取消 + + + + + diff --git a/src/views/mpr/warehouse_stock.vue b/src/views/mpr/warehouse_stock.vue index f7d8983b..20d45898 100644 --- a/src/views/mpr/warehouse_stock.vue +++ b/src/views/mpr/warehouse_stock.vue @@ -91,7 +91,7 @@ const dateRange = ref(null) const warehouseOptions = ref([]) onMounted(async () => { - let res = await API.inm.warehouse.list.req({ page: 0 }) + let res = await API.mpr.warehouse.list.req({ page: 0 }) warehouseOptions.value = res }) diff --git a/src/views/pum/supplieraudit_form.vue b/src/views/pum/supplieraudit_form.vue index dd3877b8..6159c73f 100644 --- a/src/views/pum/supplieraudit_form.vue +++ b/src/views/pum/supplieraudit_form.vue @@ -134,17 +134,31 @@ export default { }) }, handleSave() { + // 过滤掉 _ 后缀的对象字段,只发送后端需要的数据 + let data = {}; + for (let key in this.formData) { + if (!key.endsWith('_')) { + data[key] = this.formData[key]; + } + } if (this.localMode == "add") { this.saveLoading = true; - this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{ - this.saveLoading = true; + this.$API.pum.supplieraudit.create.req(data).then(res=>{ + this.saveLoading = false; this.$message.success("提交成功"); this.$emit('success', this.localMode); }).catch(e=>{ this.saveLoading = false; }) } else if (this.localMode == "edit") { - this.$message.error("不支持编辑!") + this.saveLoading = true; + this.$API.pum.supplieraudit.update.req(this.formData.id, data).then(res=>{ + this.saveLoading = false; + this.$message.success("更新成功"); + this.$emit('success', this.localMode); + }).catch(e=>{ + this.saveLoading = false; + }) } }, }