From 14a079ae0bbf194e4609d020e1cfc8c0bc775c20 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 25 Sep 2024 14:11:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A5=E5=BF=97=E4=B8=AD=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E7=94=9F=E4=BA=A7=E6=95=B0=E5=92=8C=E9=A2=86=E6=96=99?= =?UTF-8?q?=E6=95=B0=E4=BB=A5=E5=8F=8A=E5=8A=A0=E5=B7=A5=E5=89=8D=E4=B8=8D?= =?UTF-8?q?=E8=89=AF=E7=9A=84=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/f_mlogs_form.vue | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/views/wpm_gx/f_mlogs_form.vue b/src/views/wpm_gx/f_mlogs_form.vue index 00fad594..75319b36 100644 --- a/src/views/wpm_gx/f_mlogs_form.vue +++ b/src/views/wpm_gx/f_mlogs_form.vue @@ -106,6 +106,7 @@ placeholder="交接物料" clearable class="width100" + @change="changeMaterial" > @@ -143,6 +146,7 @@ :min="0" class="width100" controls-position="right" + @change = "countUseChange" /> @@ -153,8 +157,9 @@ :min="0" class="width100" controls-position="right" - @change="countChanges" + disabled /> + @@ -392,6 +397,7 @@ export default { work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},], route: [{required: true,message: "请选择工艺路线",trigger: "blur",},] }, + materialCount:1, material_in:'', material_out:'', shiftOtions:[], @@ -465,6 +471,16 @@ export default { that.materialOptions = res; }); }, + changeMaterial(val){ + let that = this; + that.materialOptions.forEach(item=>{ + if(item.id == val){ + that.materialCount = item.count; + that.form.count_use = item.count; + that.form.count_real = item.count-that.form.count_pn_jgqbl; + } + }) + }, //显示 open(mode = "add") { this.mode = mode; @@ -476,6 +492,11 @@ export default { console.log("data", data); Object.assign(this.form, data); }, + countUseChange(){ + let that = this; + that.form.count_real = that.form.count_use - that.form.count_pn_jgqbl; + that.form.count_ok = that.form.count_real - that.form.count_notok; + }, countChange() { this.form.count_notok = this.form.count_n_hs +