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 +