fix:日志中实际生产数和领料数以及加工前不良的计算
This commit is contained in:
parent
84581bc32c
commit
14a079ae0b
|
|
@ -106,6 +106,7 @@
|
||||||
placeholder="交接物料"
|
placeholder="交接物料"
|
||||||
clearable
|
clearable
|
||||||
class="width100"
|
class="width100"
|
||||||
|
@change="changeMaterial"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materialOptions"
|
v-for="item in materialOptions"
|
||||||
|
|
@ -131,8 +132,10 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_use"
|
v-model="form.count_use"
|
||||||
:min="1"
|
:min="1"
|
||||||
|
:max="materialCount"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
class="width100"
|
class="width100"
|
||||||
|
@change = "countUseChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -143,6 +146,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width100"
|
class="width100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change = "countUseChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -153,8 +157,9 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width100"
|
class="width100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@change="countChanges"
|
disabled
|
||||||
/>
|
/>
|
||||||
|
<!-- countChanges -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -392,6 +397,7 @@ export default {
|
||||||
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||||
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
||||||
},
|
},
|
||||||
|
materialCount:1,
|
||||||
material_in:'',
|
material_in:'',
|
||||||
material_out:'',
|
material_out:'',
|
||||||
shiftOtions:[],
|
shiftOtions:[],
|
||||||
|
|
@ -465,6 +471,16 @@ export default {
|
||||||
that.materialOptions = res;
|
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") {
|
open(mode = "add") {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
|
@ -476,6 +492,11 @@ export default {
|
||||||
console.log("data", data);
|
console.log("data", data);
|
||||||
Object.assign(this.form, 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() {
|
countChange() {
|
||||||
this.form.count_notok =
|
this.form.count_notok =
|
||||||
this.form.count_n_hs +
|
this.form.count_n_hs +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue