diff --git a/src/views/wpm_gx/f_mlogs_form.vue b/src/views/wpm_gx/f_mlogs_form.vue index ee41493f..8c0fd849 100644 --- a/src/views/wpm_gx/f_mlogs_form.vue +++ b/src/views/wpm_gx/f_mlogs_form.vue @@ -40,25 +40,20 @@ - - - - {{ item.batch }}({{ item.material_name }}) - {{ item.count }} - - - + + + + @@ -407,6 +402,9 @@ export default { show: "查看日志", }, //表单数据 + apiObj:this.$API.wpm.wmaterial.list, + params:{}, + materialrow:{}, form: Object.assign({}, defaultForm), //验证规则 rules: { @@ -638,20 +636,19 @@ export default { params.state = 10;//合格 params.material = that.material_in!==''?that.material_in:''; } - console.log('that.material_in:',that.material_in); - that.$API.wpm.wmaterial.list.req(params).then((res) => { - that.materialOptions = res; - if(that.codeText!==''){ - res.forEach(item=>{ - if(item.batch == that.codeBatch){ - that.form.wm_in = item.id; - that.form.batch = item.batch; - that.materialCount = that.form.count_use = that.form.count_ok = item.count_cando; - that.form.count_real = item.count-that.form.count_pn_jgqbl; - } - }) - } - }); + that.params = params; + }, + materialChange(){ + let that = this; + that.qct_defects.forEach((item) => { + that.defectform[item.defect_name] = 0; + that.defectinform[item.defect_name] = 0; + }) + that.materialFix = that.materialrow.material; + that.form.batch = that.materialrow.batch; + that.materialCount = that.form.count_use = that.form.count_real = that.form.count_ok = Number(that.materialrow.count); + that.form.count_real = Number(that.materialrow.count)-that.form.count_pn_jgqbl; + that.getdefects(that.route,that.material_in,that.material_out); }, changeMaterial(val){ let that = this;