diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index ae02faea..62fb3959 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -337,16 +337,18 @@ export default { this.cellsList = data.count_json_from; } }, - getRoute() { + getRoute(material) { let that = this; - that.$API.mtm.route.list - .req({ process: that.process, page: 0, routepack__state: 30 }) - .then((res) => { - that.routeOptions = res; - if(res.length==1){ - that.form.route = res[0].id; - } - }); + let obj = { process:that.process,page: 0, routepack__state: 30}; + if(material){ + obj.material_in__in = material; + } + that.$API.mtm.route.list.req(obj).then((res) => { + that.routeOptions = res; + if(res.length==1){ + that.form.route = res[0].id; + } + }); }, getMtask() { let that = this; @@ -418,6 +420,7 @@ export default { }, materialBatchChange(){ let that = this; + that.getRoute(that.selectObj.material); that.form.batch = that.selectObj.batch; that.form.count_use = that.selectObj.count_cando; that.batch_count = that.selectObj.count;