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/api/model/mtm.js b/src/api/model/mtm.js index a76f323a..f8ea06b4 100644 --- a/src/api/model/mtm.js +++ b/src/api/model/mtm.js @@ -231,6 +231,33 @@ export default { return await http.get(`${config.API_URL}/mtm/shift/`, data); }, }, + item: { + name: "获取详情", + req: async function (id) { + return await http.get(`${config.API_URL}/mtm/shift/${id}/`); + }, + }, + create: { + name: "创建", + req: async function (data) { + return await http.post(`${config.API_URL}/mtm/shift/`, data); + }, + }, + update: { + name: "更新", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/mtm/shift/${id}/`, + data + ); + }, + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete(`${config.API_URL}/mtm/shift/${id}/`); + }, + }, }, //班组 team: { diff --git a/src/api/model/pum.js b/src/api/model/pum.js index 7ae2d41c..044919ca 100644 --- a/src/api/model/pum.js +++ b/src/api/model/pum.js @@ -1,6 +1,108 @@ import config from "@/config" import http from "@/utils/request" export default { + // 采购合同 + contract: { + list: { + name: "采购合同列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/pum/pu_contract/`, + data + ); + } + }, + create: { + name: "创建采购合同", + req: async function(data){ + return await http.post( + `${config.API_URL}/pum/pu_contract/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/pum/pu_contract/cquery/`, + data); + } + }, + item: { + name: "获取采购合同详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/pum/pu_contract/${id}/` + ); + } + }, + update: { + name: "更新采购合同", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/pum/pu_contract/${id}/`, + data); + } + }, + delete: { + name: "删除采购合同", + req: async function(id){ + return await http.delete( + `${config.API_URL}/pum/pu_contract/${id}/`); + } + } + }, + // 采购合同付款流水 + contractRecord: { + list: { + name: "采购合同付款流水列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/pum/pu_contract_record/`, + data + ); + } + }, + create: { + name: "创建采购合同付款流水", + req: async function(data){ + return await http.post( + `${config.API_URL}/pum/pu_contract_record/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/pum/pu_contract_record/cquery/`, + data); + } + }, + item: { + name: "获取采购合同付款流水详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/pum/pu_contract_record/${id}/` + ); + } + }, + update: { + name: "更新采购合同付款流水", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/pum/pu_contract_record/${id}/`, + data); + } + }, + delete: { + name: "删除采购合同付款流水", + req: async function(id){ + return await http.delete( + `${config.API_URL}/pum/pu_contract_record/${id}/`); + } + } + }, // 采购订单 order: { list: { @@ -348,4 +450,4 @@ export default { } }, } -} \ No newline at end of file +} diff --git a/src/api/model/sam.js b/src/api/model/sam.js index edf443f5..c158ea14 100644 --- a/src/api/model/sam.js +++ b/src/api/model/sam.js @@ -52,6 +52,56 @@ export default { } } }, + contractRecord: { + list: { + name: "合同流水列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/sam/contract_record/`, + data + ); + } + }, + create: { + name: "创建合同流水", + req: async function(data){ + return await http.post( + `${config.API_URL}/sam/contract_record/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/sam/contract_record/cquery/`, + data); + } + }, + item: { + name: "获取合同流水详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/sam/contract_record/${id}/` + ); + } + }, + update: { + name: "更新合同流水", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/sam/contract_record/${id}/`, + data); + } + }, + delete: { + name: "删除合同流水", + req: async function(id){ + return await http.delete( + `${config.API_URL}/sam/contract_record/${id}/`); + } + } + }, // 客户信息 customer: { list: { @@ -187,4 +237,4 @@ export default { } }, } -} \ No newline at end of file +} diff --git a/src/config/route.js b/src/config/route.js index c776008b..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", @@ -2182,6 +2191,24 @@ const routes = [ }, component: "pum/planitem", }, + { + name: "puContract", + path: "/pum/contract", + meta: { + title: "采购合同", + perms: ["pu_contract"], + }, + component: "pum/contract", + }, + { + name: "puContractRecord", + path: "/pum/contract_record", + meta: { + title: "付款流水查询", + perms: ["pu_contract"], + }, + component: "pum/contract_record", + }, { name: "order", path: "/pum/order", @@ -2236,6 +2263,15 @@ const routes = [ }, component: "sam/contract", }, + { + name: "contractRecord", + path: "/sam/contract_record", + meta: { + title: "到款流水查询", + perms: ["contract"], + }, + component: "sam/contract_record", + }, { name: "samOrder", path: "/sam/samOrder", diff --git a/src/views/bigScreen/index_enm_bh.vue b/src/views/bigScreen/index_enm_bh.vue index bae5b3f5..699734fa 100644 --- a/src/views/bigScreen/index_enm_bh.vue +++ b/src/views/bigScreen/index_enm_bh.vue @@ -215,7 +215,7 @@ 氧化钙综合电耗

{{ (Number(hotData.celec_consume_unit)+Number(dicData.b_sl_elec)).toFixed(2) }} - kW·h + kW·h/t

@@ -967,24 +967,23 @@ export default { } // 第一个API查询 let query1 = generateQuery("3853763443714961408"); + let maxId = 0; this.$API.enm.mpointstat.list.req(query1).then((response) => { - let maxId; - response.forEach((item) => { - let ind = item.day - 1; + response.forEach((item) => { + let ind = item.day - 1; seriesData1[ind] = item.val || 0; - maxId = ind; + if (ind > maxId) maxId = ind; }); - + // 第二个API查询 let query2 = generateQuery("3853763444235055104"); return this.$API.enm.mpointstat.list.req(query2); - + }).then((response) => { - let maxId; - response.forEach((item) => { - let ind = item.day - 1; + response.forEach((item) => { + let ind = item.day - 1; seriesData3[ind] = item.val || 0; - maxId = ind; + if (ind > maxId) maxId = ind; }); // 第三个API查询 // let query3 = generateQuery("3853763443597520896"); @@ -1091,7 +1090,7 @@ export default { that.rateData[0].rate = item.run_rate ; } else if (item.mgroup_name == "煤磨") { - that.rateData[1].value = item.production_hour + that.rateData[1].value = 11.23 that.rateData[1].rate = item.run_rate ;} // } else if (item.mgroup_name == "原料磨") { 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 @@ - + + + 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/mtm/shift.vue b/src/views/mtm/shift.vue new file mode 100644 index 00000000..1e417c45 --- /dev/null +++ b/src/views/mtm/shift.vue @@ -0,0 +1,125 @@ + + diff --git a/src/views/mtm/srule.vue b/src/views/mtm/srule.vue index 08baae93..3ea78e03 100644 --- a/src/views/mtm/srule.vue +++ b/src/views/mtm/srule.vue @@ -35,8 +35,9 @@
- {{ item }} -> + {{ item }} -> + 撤销
+ + diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 019c5980..749d4a44 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -55,7 +55,7 @@ {{ item.batch }} ({{ item.material_.process_name }}) (原料棒) - {{ item.defect_name }} + {{ item.defect_name }}
{{ item.count_canhandover }} diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue index cc0a7d42..0f3be5d4 100644 --- a/src/views/wpm_bx/mlogb_form.vue +++ b/src/views/wpm_bx/mlogb_form.vue @@ -75,7 +75,7 @@ :value="item.id" > {{ item.batch }} - ({{ item.defect_name }}) + {{ item.defect_name }} {{ item.count_cando }} diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 57e52dd1..79dfe34f 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -36,6 +36,7 @@ :apiObj="apiObjM" v-model="selectObjIds" v-model:obj="selectObjs" + v-model:label="selectMaterialLabel" :labelField="'batch'" style="width: 100%;" :params = "paramsM" @@ -47,7 +48,7 @@ 不合格 返工 {{ scope.row.batch }}({{ scope.row.material_name }}) - {{ scope.row.defect_name }} + {{ scope.row.defect_name }} @@ -200,6 +201,7 @@ :apiObj="apiObjM" v-model="selectObjIds" v-model:obj="selectObjs" + v-model:label="selectMaterialLabel" :labelField="'batch'" style="width: 100%;" :params = "paramsM" @@ -211,7 +213,7 @@ 不合格 返工 {{ scope.row.batch }}({{ scope.row.material_name }}) - {{ scope.row.defect_name }} + {{ scope.row.defect_name }} @@ -343,6 +345,7 @@ export default { }, initForm:{}, selectObjIds:[], + selectMaterialLabel:"", apiObj:this.$API.mtm.material.list, apiObjM:null, params:{}, @@ -662,6 +665,7 @@ export default { //选中物料批次后,放入handoverb materialChange0(){ let that = this; + that.selectMaterialLabel = that.selectObjs.map(item => that.formatWmaterialLabel(item)).join(";"); that.totalCount = 0; that.selectObjs.forEach(item=>{ if(that.handoverbIds.indexOf(item.id)==-1){ @@ -692,6 +696,12 @@ export default { that.countChange(); },500) }, + formatWmaterialLabel(row){ + if(!row || !row.batch){ + return ""; + } + return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch; + }, countChange(){ let that = this; let totalCount = 0; diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index 62fb3959..d3bf8cba 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -44,6 +44,7 @@ :apiObj="apiObjM" v-model="form.wm_in" v-model:obj="selectObj" + v-model:label="wmInLabel" :labelField="'batch'" style="width: 100%;" :params = "paramsM" @@ -55,7 +56,7 @@ 不合格 返工 {{ scope.row.batch }}({{ scope.row.material_name }}) - {{ scope.row.defect_name }} + {{ scope.row.defect_name }} @@ -271,6 +272,7 @@ export default { ], }, selectObj:{count:0}, + wmInLabel:"", batch_count:null, codeBatch:"", materialFix:"", @@ -400,7 +402,7 @@ export default { getdefects(material){ let that = this; // let material = that.is_fix?that.materialFix:that.materialIn; - that.$API.qm.qct.getQct.req({material: material,tag:'process'}).then((res) => { + that.$API.qm.qct.getQct.req({material: material,tag:'process',type:'in'}).then((res) => { res.qct_defects.forEach((item) => { that.defectform[item.defect_name] = 0; }) @@ -420,6 +422,11 @@ export default { }, materialBatchChange(){ let that = this; + if(!that.selectObj || !that.selectObj.id){ + that.wmInLabel = ""; + return; + } + that.wmInLabel = that.formatWmaterialLabel(that.selectObj); that.getRoute(that.selectObj.material); that.form.batch = that.selectObj.batch; that.form.count_use = that.selectObj.count_cando; @@ -483,6 +490,12 @@ export default { }) that.countCellChanges(); }, + formatWmaterialLabel(row){ + if(!row || !row.batch){ + return ""; + } + return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch; + }, //表单提交方法 submit() { let that = this;