diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index cab5a509..b9ee7fe2 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -135,6 +135,7 @@ export default { }, ], }, + codeBatch:"", options: [], materialOptions: [], visible: false, @@ -143,8 +144,19 @@ export default { }; }, mounted() { + let that = this; + if(that.codeText!==''){ + let id = data.split('#')[1]; + this.$API.cm.labelmat.item.req(id).then((res) => { + that.codeBatch = res.batch; + this.getMaterial(); + }).catch((err) => { + that.getMaterial(); + }) + }else{ + that.getMaterial(); + } this.getMtask(); - this.getMaterial(); }, methods: { open() { @@ -174,9 +186,7 @@ export default { }).then((res) => { that.materialOptions = res; res.forEach(item => { - console.log('item',item); - console.log('codeText',that.codeText); - if(item.batch==that.codeText){ + if(item.batch==that.codeBatch){ that.form.wm_in = item.id; that.form.count_use = item.count_cando; }