diff --git a/hb_client/src/api/pm.js b/hb_client/src/api/pm.js index 4f3365d..7386fec 100644 --- a/hb_client/src/api/pm.js +++ b/hb_client/src/api/pm.js @@ -15,4 +15,19 @@ export function createProductionplan(data) { 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 + }) +} 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..2f2fa4d 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -159,7 +159,7 @@ - + diff --git a/hb_client/src/views/pm/resources.vue b/hb_client/src/views/pm/resources.vue index 21af9ad..ce4beb9 100644 --- a/hb_client/src/views/pm/resources.vue +++ b/hb_client/src/views/pm/resources.vue @@ -7,60 +7,60 @@ 合同订单列表
+ 计算物料 + @selection-change="handleSelectionChange"> + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + - + + + + + + + - - - - - - - - - - - - - + - - + + - - - - - - - - - + - + @@ -154,59 +121,30 @@ + - - + + - - + + - - + + - - - - - - - - - - - + + - - - - - - - - - +