fix:bx日志详情及过程检验
This commit is contained in:
parent
ac7f5d7471
commit
20328ab6ae
|
@ -182,46 +182,12 @@
|
||||||
<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" v-if="props.row.count_notok_json.length>0">
|
|
||||||
<el-descriptions :column="4" v-for="item in props.row.count_notok_json" :key="item">
|
|
||||||
<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>
|
<div style="padding-left: 50px">
|
||||||
<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}}
|
||||||
}}</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="气泡">{{
|
|
||||||
props.row.count_n_qp
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="水纹">{{
|
|
||||||
props.row.count_n_swen
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="崩边">{{
|
|
||||||
props.row.count_n_bb
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="小崩边">{{
|
|
||||||
props.row.count_n_xbb
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="雾面">{{
|
|
||||||
props.row.count_n_wm
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="麻点">{{
|
|
||||||
props.row.count_n_md
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="线痕">{{
|
|
||||||
props.row.count_n_xh
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -301,6 +267,7 @@
|
||||||
<check-dialog
|
<check-dialog
|
||||||
v-if="dialog.check"
|
v-if="dialog.check"
|
||||||
ref="checkDialog"
|
ref="checkDialog"
|
||||||
|
:material="materialOut"
|
||||||
@success="handleCheckSuccess"
|
@success="handleCheckSuccess"
|
||||||
@closed="dialog.check = false"
|
@closed="dialog.check = false"
|
||||||
>
|
>
|
||||||
|
@ -405,6 +372,7 @@ export default {
|
||||||
},
|
},
|
||||||
wmId:'',
|
wmId:'',
|
||||||
wmtype:'',
|
wmtype:'',
|
||||||
|
materialOut:'',
|
||||||
batchContains:'',
|
batchContains:'',
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
};
|
};
|
||||||
|
@ -512,6 +480,7 @@ export default {
|
||||||
},
|
},
|
||||||
table_out_check(row) {
|
table_out_check(row) {
|
||||||
this.dialog.check = true;
|
this.dialog.check = true;
|
||||||
|
this.materialOut = row.material_out;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
Object.assign(obj, row);
|
Object.assign(obj, row);
|
||||||
obj.mgroup_name = this.mlogItem.mgroup_name;
|
obj.mgroup_name = this.mlogItem.mgroup_name;
|
||||||
|
|
|
@ -59,225 +59,76 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-row v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :md="12" :sm="24" v-for="item in qct_testitems" :key="item.id">
|
||||||
<el-form-item label="不合格统计">
|
<el-form-item :label="item.testitem_name">
|
||||||
<el-button
|
<el-input-number
|
||||||
type="primary"
|
v-if="item.testitem_field_type=='input-number'"
|
||||||
icon="el-icon-plus"
|
v-model="form[item.testitem_name]"
|
||||||
@click="notok_add"
|
:min="0"
|
||||||
></el-button>
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
<el-input-number
|
||||||
|
v-if="item.testitem_field_type=='input-int'"
|
||||||
|
v-model="form[item.testitem_name]"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
<el-input
|
||||||
|
v-if="item.testitem_field_type=='input-text'"
|
||||||
|
v-model="form[item.testitem_name]"
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='select-text'"
|
||||||
|
v-model="form[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item0 in item.testitem_choices"
|
||||||
|
:key="item0"
|
||||||
|
:label="item0"
|
||||||
|
:value="item0"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='selects-text'"
|
||||||
|
v-model="form[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.testitem_choices"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id">
|
||||||
<template v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
<el-form-item :label="item.defect_name">
|
||||||
<el-row style="margin-bottom:10px" v-for="(item, $index) in count_notok_json" :key="item">
|
<span v-if="form['defect-'+item.defect_name]">是</span>
|
||||||
<el-col :span="7">
|
<span v-else>否</span>
|
||||||
<el-input-number
|
<span v-if="item.note!==null&&item.note!==''" style="font-size: 12px; color: #a9a7a7;">({{ item.note }})</span>
|
||||||
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-form-item label="划伤">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_hs"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="气泡">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_qp"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="水纹">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_swen"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="崩边">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_bb"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="雾面">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_wm"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="小崩边">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_xbb"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="麻点">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_md"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="线痕">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_xh"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="破损">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_ps"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="棕圈">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_zq"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="其他">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.count_n_qt"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-row>
|
|
||||||
<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>
|
|
||||||
<el-row style="margin-bottom:10px" v-for="(item, $index) in notokList" :key="item">
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-select v-model="item.file"
|
|
||||||
style="width:90%"
|
|
||||||
placeholder="请选择不合格项">
|
|
||||||
<el-option
|
|
||||||
v-for="notok in notokOptions"
|
|
||||||
:key="notok.value"
|
|
||||||
:label="notok.name"
|
|
||||||
:value="notok.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-input-number
|
|
||||||
style="width:90%"
|
|
||||||
v-model="item.value"
|
|
||||||
:min="0"
|
|
||||||
class="width-100"
|
|
||||||
controls-position="right"
|
|
||||||
@change="countChange"
|
|
||||||
/>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="notok_del( $index)"
|
|
||||||
></el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
|
@ -291,6 +142,12 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
|
props: {
|
||||||
|
material: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -343,6 +200,8 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
options: [],
|
options: [],
|
||||||
|
qct_defects:[],
|
||||||
|
qct_testitems:[],
|
||||||
count_notok_json:[],
|
count_notok_json:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -354,6 +213,8 @@ export default {
|
||||||
if (this.form.batch != null) {
|
if (this.form.batch != null) {
|
||||||
this.batchDisabled = true;
|
this.batchDisabled = true;
|
||||||
}
|
}
|
||||||
|
console.log(this.material);
|
||||||
|
this.getQctDetail();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(data) {
|
open(data) {
|
||||||
|
@ -362,6 +223,53 @@ export default {
|
||||||
this.mgroupName = data.mgroup_name;
|
this.mgroupName = data.mgroup_name;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
|
//根据物料关联的检测表获取检测项和不合格项
|
||||||
|
getQctDetail(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.qct.list.req({ qctmat__material: that.material,page:0 }).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.qctId = res[0].id;
|
||||||
|
that.$API.qm.qct.item.req(that.qctId).then((res0) => {
|
||||||
|
//这里可以得到testitem和defectitem
|
||||||
|
that.qct_defects = [];
|
||||||
|
that.qct_testitems = [];
|
||||||
|
if(res0.qct_defects.length>0){
|
||||||
|
res0.qct_defects.forEach((item1) => {
|
||||||
|
let obj = Object.assign({}, item1);
|
||||||
|
obj.value = '';
|
||||||
|
that.qct_defects.push(obj);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.qct_defects = [];
|
||||||
|
}
|
||||||
|
if(res0.qct_testitems.length>0){
|
||||||
|
res0.qct_testitems.forEach((item2) => {
|
||||||
|
let obj2 = Object.assign({}, item2);
|
||||||
|
obj2.value = '';
|
||||||
|
if(obj2.testitem_field_type=='select-text'||obj2.testitem_field_type=='selects-text'){
|
||||||
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
|
let arr = JSON.parse(str);
|
||||||
|
obj2.testitem_choices = arr;
|
||||||
|
}
|
||||||
|
that.qct_testitems.push(obj2);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.qct_testitems = [];
|
||||||
|
}
|
||||||
|
that.defectCountSun();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
defectCountSun(){
|
||||||
|
let that = this;
|
||||||
|
that.qct_defects.forEach(item => {
|
||||||
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
|
str = str.replace(/\${(.*?)}/g, 'this.form.\$1')
|
||||||
|
let judge = eval(str);
|
||||||
|
that.form['defect-'+item.defect_name] = judge;
|
||||||
|
});
|
||||||
|
},
|
||||||
notok_add(){
|
notok_add(){
|
||||||
this.count_notok_json.push({notok:'qt',count:null,floor:null,count_sampling:null});
|
this.count_notok_json.push({notok:'qt',count:null,floor:null,count_sampling:null});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue