fix:添加黑化工段库存检验
This commit is contained in:
parent
9675c51e49
commit
ee973ca0da
|
@ -184,7 +184,20 @@
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template #default="props">
|
<template #default="props">
|
||||||
<div style="padding-left: 50px">
|
<div style="padding-left: 50px" v-if="props.row.count_notok_json.length>0">
|
||||||
|
<el-descriptions :column="4" v-for="item in props.row.count_notok_json">
|
||||||
|
<el-descriptions-item label="层数">
|
||||||
|
{{item.floor}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="抽检数">
|
||||||
|
{{item.count_sampling}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总数">
|
||||||
|
{{item.count}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div style="padding-left: 50px" v-else>
|
||||||
<el-descriptions :column="4">
|
<el-descriptions :column="4">
|
||||||
<el-descriptions-item label="划伤">{{
|
<el-descriptions-item label="划伤">{{
|
||||||
props.row.count_n_hs
|
props.row.count_n_hs
|
||||||
|
@ -511,8 +524,11 @@ export default {
|
||||||
},
|
},
|
||||||
table_out_check(row) {
|
table_out_check(row) {
|
||||||
this.dialog.check = true;
|
this.dialog.check = true;
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj, row);
|
||||||
|
obj.mgroup_name = this.mlogItem.mgroup_name;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.checkDialog.open(row);
|
this.$refs.checkDialog.open(obj);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChanges"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -51,11 +52,66 @@
|
||||||
v-model="form.count_notok"
|
v-model="form.count_notok"
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
|
@change="countChanges"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider></el-divider>
|
</el-row>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-row v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="不合格统计">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="notok_add"
|
||||||
|
></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<template v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-row style="margin-bottom:10px" v-for="(item, $index) in count_notok_json" :key="item">
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.floor"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="层数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.count_sampling"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="抽检数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.count"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="总数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="notok_del( $index)"
|
||||||
|
></el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<el-row v-else>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="划伤">
|
<el-form-item label="划伤">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -122,7 +178,6 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="麻点">
|
<el-form-item label="麻点">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -179,6 +234,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="前道不良">
|
<el-form-item label="前道不良">
|
||||||
|
@ -225,9 +281,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
@ -289,7 +343,7 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
options: [],
|
options: [],
|
||||||
notokList:[],
|
count_notok_json:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
@ -305,13 +359,14 @@ export default {
|
||||||
open(data) {
|
open(data) {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
this.mgroupName = data.mgroup_name;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
notok_add(){
|
notok_add(){
|
||||||
this.notokList.push({file:'',value:0});
|
this.count_notok_json.push({notok:'qt',count:null,floor:null,count_sampling:null});
|
||||||
},
|
},
|
||||||
notok_del(index){
|
notok_del(index){
|
||||||
this.notokList.splice(index, 1)
|
this.count_notok_json.splice(index, 1)
|
||||||
},
|
},
|
||||||
countChange() {
|
countChange() {
|
||||||
this.form.count_notok =
|
this.form.count_notok =
|
||||||
|
@ -326,6 +381,9 @@ export default {
|
||||||
this.form.count_n_zq +
|
this.form.count_n_zq +
|
||||||
this.form.count_n_qt +
|
this.form.count_n_qt +
|
||||||
this.form.count_n_wm;
|
this.form.count_n_wm;
|
||||||
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
|
},
|
||||||
|
countChanges(){
|
||||||
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
@ -335,7 +393,16 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.mlog = that.mlog;
|
that.form.mlog = that.mlog;
|
||||||
this.form.count_notok =
|
let sum = 0;
|
||||||
|
if(that.mgroupName=='黑化'||that.mgroupName=='退火'){
|
||||||
|
let total = 0;
|
||||||
|
that.count_notok_json.forEach(item => {
|
||||||
|
total+=item.count;
|
||||||
|
});
|
||||||
|
this.form.count_notok = total;
|
||||||
|
this.form.count_notok_json = this.count_notok_json;
|
||||||
|
}else{
|
||||||
|
this.form.count_notok =
|
||||||
this.form.count_n_hs +
|
this.form.count_n_hs +
|
||||||
this.form.count_n_qp +
|
this.form.count_n_qp +
|
||||||
this.form.count_n_swen +
|
this.form.count_n_swen +
|
||||||
|
@ -347,7 +414,8 @@ export default {
|
||||||
this.form.count_n_zq +
|
this.form.count_n_zq +
|
||||||
this.form.count_n_qt +
|
this.form.count_n_qt +
|
||||||
this.form.count_n_wm;
|
this.form.count_n_wm;
|
||||||
let sum = this.form.count_ok + this.form.count_notok;
|
}
|
||||||
|
sum = this.form.count_ok + this.form.count_notok;
|
||||||
if (sum - this.form.count_real == 0) {
|
if (sum - this.form.count_real == 0) {
|
||||||
that.$API.wpm.mlogb.updateOut
|
that.$API.wpm.mlogb.updateOut
|
||||||
.req(that.form.id, that.form)
|
.req(that.form.id, that.form)
|
||||||
|
|
Loading…
Reference in New Issue