diff --git a/hb_client/src/api/pm.js b/hb_client/src/api/pm.js index 4f3365d..6fb9dc8 100644 --- a/hb_client/src/api/pm.js +++ b/hb_client/src/api/pm.js @@ -3,16 +3,55 @@ import request from '@/utils/request' //生产排程 export function getProductionplanList(query) { return request({ - url: 'pm/productionplan/', + url: 'pm/production_plan/', method: 'get', params: query }) } export function createProductionplan(data) { return request({ - url: 'pm/productionplan/', + url: 'pm/production_plan/', method: 'post', data }) } - +//计算物料配置 +export function createresource(data) { + return request({ + url: '/pm/resource/cal/', + method: 'post', + data + }) +} +//产品对应的设备 +export function createequip(data) { + return request({ + url: '/pm/resource/cal_equip/', + method: 'post', + data + }) +} +//生成子计划 +export function createsubplan(id, data) { + return request({ + url: `/pm/production_plan/${id}/gen_subplan/`, + method: 'post', + data + }) +} +//子计划列表 +export function getsubproductionplanList(query) { + return request({ + url: '/pm/subproduction_plan/', + method: 'get', + params: query + }) +} +//子计划编辑开始结束时间 +export function updatesubproductionplan(id, data) { + return request({ + url: `/pm/subproduction_plan/${id}/`, + method: 'put', + data + }) +} diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index c021e2c..001d272 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -143,7 +143,15 @@ export const asyncRoutes = [ path: 'plan', name: 'plan', component: () => import('@/views/pm/plan'), - meta: { title: '生产计划管理', icon: 'example', perms: ['pm_plan'] } + meta: { title: '生产计划管理', icon: 'example', perms: ['index_manage'] } + } + , + { + path: 'work/:id', + name: 'work', + component: () => import('@/views/pm/work'), + meta: { title: '生产子计划', perms: ['vendor_manage'] }, + hidden: true }, { path: 'resources', diff --git a/hb_client/src/views/mtm/material.vue b/hb_client/src/views/mtm/material.vue index 3f5cc05..7ad836a 100644 --- a/hb_client/src/views/mtm/material.vue +++ b/hb_client/src/views/mtm/material.vue @@ -144,14 +144,7 @@ - - - + diff --git a/hb_client/src/views/mtm/productprocess.vue b/hb_client/src/views/mtm/productprocess.vue index 29734fe..71f5e65 100644 --- a/hb_client/src/views/mtm/productprocess.vue +++ b/hb_client/src/views/mtm/productprocess.vue @@ -80,13 +80,17 @@ border fit stripe + highlight-current-row @current-change="handlespChange" > - + - + + + + @@ -128,6 +132,17 @@ + + + + + + + - - - - + + - + - + + + @@ -305,15 +320,9 @@ > - - - - + + - + + +
@@ -507,11 +522,12 @@ import { getMaterialList,getMaterial,getInputmaterialList,createInputmaterial,updateInputmaterial ,deleteInputmaterial,getOutputmaterialList,createOutputmaterial,updateOutputmaterial,deleteOutputmaterial, getUsedstepList,createUsedstep,deleteUsedstep,getStepList,gettechdocList,createtechdoc,updatetechdoc,deletetechdoc -,getsubproducationList,createsubproducation,updatesubproducation,deletesubproducation } from "@/api/mtm"; +,getsubproducationList,createsubproducation,updatesubproducation,deletesubproducation,getProcessList } from "@/api/mtm"; import { quillEditor } from 'vue-quill-editor' import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' + import { upUrl, upHeaders } from "@/api/file"; import checkPermission from "@/utils/permission"; import { genTree } from "@/utils"; @@ -529,7 +545,7 @@ const defaulttechdoc = { }; const defaultsubproducation = { - + }; export default { @@ -541,6 +557,7 @@ export default { subproducationData:"", inputtableData:"", editorOption: {} , + processOptions:[], techdoc: defaulttechdoc, subproducation:defaultsubproducation, inputmaterial: defaultinputmaterial, @@ -625,7 +642,12 @@ export default { this.listLoading = false; }); }, - + //工序清单 + getProcessList() { + getProcessList().then((res) => { + this.processOptions = genTree(res.data.results); + }); + }, //获取产品,工艺 getMaterial(){ getMaterial(this.product).then((response) => { @@ -639,11 +661,14 @@ export default { handleCurrentChange(row){ this.product=row.id; this.getMaterial(); + this.getProcessList(); this.getsubproducationList(); + }, //点击产品分解弹出输入、输出物料,子工序,技术文件 handlespChange(row){ this.subproduction = row.id; + this.processes = row.process; this.getmaterialList();//物料列表 this.getInputmaterialLists();//输入物料 @@ -911,7 +936,7 @@ export default { }, getstepList() { - + this.listQuerystep.process=this.processes; getStepList(this.listQuerystep).then((response) => { if (response.data) { this.stepoptions = genTree(response.data); @@ -1071,3 +1096,4 @@ export default { }, }; + diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue index 98a559d..a8f2c6e 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -51,7 +51,12 @@ - + + + @@ -61,13 +66,14 @@ width="100px" > @@ -118,6 +124,8 @@ + + @@ -159,7 +167,7 @@ - + @@ -190,7 +198,7 @@ \ No newline at end of file diff --git a/hb_client/src/views/sam/order.vue b/hb_client/src/views/sam/order.vue index 79e731b..175621e 100644 --- a/hb_client/src/views/sam/order.vue +++ b/hb_client/src/views/sam/order.vue @@ -74,7 +74,7 @@