Compare commits

..

No commits in common. "62d34e5ad7047c6c1e9d8dcfb3418b361c1e3edf" and "f8d3524c6779ef0e51c025c76a55a5bed5051e3c" have entirely different histories.

12 changed files with 112 additions and 205 deletions

View File

@ -201,18 +201,12 @@ export const schedulePeriodEnum = new EnumFactory({
})
export const wmState = new EnumFactory({
10: { text: '正常', type: 'success' },
20: { text: '不合格品', type: 'warning' },
30: { text: '返修', type: 'warning' },
34: { text: '返修完成', type: 'warning' },
40: { text: '待检验', type: 'primary' },
50: { text: '报废', type: 'danger' },
}, parseInt)
export const defectGrade = new EnumFactory({
10: { text: '合格', type: 'success' },
20: { text: '合格B类', type: 'warning' },
30: { text: '不合格', type: 'danger' },
20: { text: '不合格', type: 'warning' },
30: { text: '返工', type: 'warning' },
34: { text: '返工完成', type: 'warning' },
40: { text: '检验', type: 'primary' },
50: { text: '报废', type: 'danger' },
}, parseInt)
export const certStateEnum = new EnumFactory({

View File

@ -103,7 +103,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="生产日志默认将合格B类计入合格品">
<el-form-item label="合格B类默认记合格">
<el-switch
v-model="form.clear_defect"
></el-switch>

View File

@ -55,7 +55,6 @@
<span>{{ item.batch }}</span>
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
<span v-else>(原料棒)</span>
<el-tag v-if="item.defect_grade != null" :type="item.defect_grade === 30 ? 'danger' : item.defect_grade === 20 ? 'warning' : 'success'" size="small" style="margin-left: 8px;">{{ item.defect_grade_name }}</el-tag>
<el-tag v-if="item.defect!==null" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ item.defect_name }}</el-tag>
<div style="float: right">
<span>{{ item.count_canhandover }}</span>
@ -229,10 +228,10 @@
<span style="color: red;">请手动录入新批次号不要用已有批次</span>
</el-form-item>
</el-col>
<el-col :md="24" :sm="24" v-if="canClearBatchDefect">
<el-form-item label="清除批次缺陷">
<el-col :md="24" :sm="24" v-if="defectMismatch">
<el-form-item label="清除缺陷">
<el-checkbox v-model="form.clear_defect">
{{ clearBatchDefectHint }}
源批次缺陷不一致勾选后合并批次将清除缺陷标记
</el-checkbox>
</el-form-item>
</el-col>
@ -470,30 +469,19 @@ export default {
if (!this.form.handoverb || this.form.handoverb.length === 0) return 0;
return this.form.handoverb.reduce((sum, item) => sum + Number(item.count || 0), 0);
},
canClearBatchDefect() {
// state OK(10) defect ""
defectMismatch() {
if (this.mtype !== 30) return false;
if (this.new_wm) return false;
const items = this.form.handoverb || [];
if (items.length < 2) return false;
const states = new Set(items.map(i => Number(i.state)));
if (states.size !== 1) return false;
const tracking = Number(items[0].tracking);
if (tracking === 20) return true;
return items.every(i =>
Number(i.state) === 10 &&
i.defect != null &&
Number(i.defect_okcate) === 20
);
},
clearBatchDefectHint() {
const items = this.form.handoverb || [];
return Number(items[0] && items[0].tracking) === 20
? "仅清除合批后批次的缺陷归类,单件缺陷记录保持不变"
: "将合格B类合并为无缺陷批次";
if (!items.every(i => Number(i.state) === 10)) return false;
const defectIds = new Set(items.map(i => i.defect == null ? null : i.defect));
return defectIds.size > 1;
}
},
watch: {
canClearBatchDefect(val) {
defectMismatch(val) {
if (!val) {
this.form.clear_defect = false;
}
@ -550,7 +538,7 @@ export default {
let that = this;
var req = {
page: 0,
state__in: this.mtype === 30 ? '10,20,34' : '10,34',
state__in:'10,34',
tag:that.tag,
mgroupx:that.mgroupId
};

View File

@ -34,7 +34,7 @@
</el-select>
<el-select
v-model="query.state"
placeholder="库存状态"
placeholder="物料状态"
clearable
@change="handleQuery"
style="width: 250px"
@ -46,9 +46,6 @@
:value="item.value"
/>
</el-select>
<el-select v-model="query.defect__okcate" placeholder="缺陷等级" clearable style="width: 130px" @change="handleQuery">
<el-option v-for="item in defectGradeOptions" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-input
style="margin-right: 5px"
v-model="query.search"
@ -73,20 +70,13 @@
@selection-change="selectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" >
<el-table-column label="状态" prop="state" width="100" >
<template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type">
{{wmState[scope.row.state]?.text}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="缺陷等级" prop="defect_grade" width="105">
<template #default="scope">
<el-tag v-if="scope.row.defect_grade != null" :type="defectGrade[scope.row.defect_grade]?.type">{{ defectGrade[scope.row.defect_grade]?.text }}</el-tag>
<span v-else-if="scope.row.notok_sign">未分级</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
label="物料名称"
prop="material_name"
@ -151,11 +141,9 @@
min-width="80"
></el-table-column>
<el-table-column
label="缺陷项/标记"
label="不合格标记"
prop="defect_name"
>
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
</el-table-column>
></el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -356,7 +344,7 @@
</el-container>
</template>
<script>
import { defectGrade, wmState } from "@/utils/enum.js";
import { wmState } from "@/utils/enum.js";
import checkDialog from "./check_form.vue";
import showDrawer from "./check_drawer.vue";
import scrapDialog from "./handover_form.vue";
@ -398,7 +386,6 @@ export default {
data() {
return {
wmState,
defectGrade,
apiObj: null,
params: {
tag : 'todo',
@ -408,7 +395,6 @@ export default {
query: {
search: "",
state: 10,
defect__okcate: null,
current_merged:null,
},
dialog: {
@ -424,17 +410,9 @@ export default {
tableData: [],
selection: [],
stateOptions:[
{ value: 10, name: "正常"},
{ value: 20, name: "不合格品"},
{ value: 30, name: "返修"},
{ value: 34, name: "返修完成"},
{ value: 40, name: "待检验"},
{ value: 50, name: "报废"},
],
defectGradeOptions: [
{ value: 10, name: "合格"},
{ value: 20, name: "合格B类"},
{ value: 30, name: "不合格"},
{ value: 20, name: "不合格"},
{ value: 30, name: "返工"},
],
mergedOptions:[
{ value: false, name: "未合批"},

View File

@ -19,9 +19,9 @@
></el-switch>
<el-select
v-model="query.state"
placeholder="库存状态"
placeholder="物料状态"
clearable
@change="handleQuery"
@change="searchStateChange"
style="width: 100px"
>
<el-option
@ -31,9 +31,6 @@
:value="item.value"
/>
</el-select>
<el-select v-model="query.defect__okcate" placeholder="缺陷等级" clearable style="width: 130px" @change="handleQuery">
<el-option v-for="item in defectGradeOptions" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-select
v-model="query.defect"
placeholder="不合格项"
@ -72,20 +69,13 @@
@selection-change="selectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" >
<el-table-column label="状态" prop="state" width="80" >
<template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type">
{{wmState[scope.row.state]?.text}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="缺陷等级" prop="defect_grade" width="105">
<template #default="scope">
<el-tag v-if="scope.row.defect_grade != null" :type="defectGrade[scope.row.defect_grade]?.type">{{ defectGrade[scope.row.defect_grade]?.text }}</el-tag>
<span v-else-if="scope.row.notok_sign">未分级</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
label="物料名称"
prop="material_name"
@ -150,11 +140,9 @@
min-width="80"
></el-table-column>
<el-table-column
label="缺陷项/标记"
label="不合格标记"
prop="defect_name"
>
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
</el-table-column>
></el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -327,7 +315,7 @@
</el-container>
</template>
<script>
import { defectGrade, wmState } from "@/utils/enum.js";
import { wmState } from "@/utils/enum.js";
import materials from "./../mtm/materials.vue";
import checkDialog from "./check_form.vue";
import showDrawer from "./check_drawer.vue";
@ -371,7 +359,6 @@ export default {
data() {
return {
wmState,
defectGrade,
apiObj: null,
params: {
tag : 'done',
@ -382,7 +369,6 @@ export default {
search: "",
defect: "",
state: null,
defect__okcate: null,
},
dialog: {
save: false,
@ -398,17 +384,9 @@ export default {
selection: [],
defectOptions: [],
stateOptions:[
{ value: 10, name: "正常"},
{ value: 20, name: "不合格品"},
{ value: 30, name: "返修"},
{ value: 34, name: "返修完成"},
{ value: 40, name: "待检验"},
{ value: 50, name: "报废"},
],
defectGradeOptions: [
{ value: 10, name: "合格"},
{ value: 20, name: "合格B类"},
{ value: 30, name: "不合格"},
{ value: 20, name: "不合格"},
{ value: 30, name: "返工"},
],
queryWm: {
search: "",

View File

@ -60,7 +60,7 @@
</el-descriptions>
<div style="padding: 5px 10px;display: flex;justify-content: end;align-items: center;">
<div v-if="mlogItem.submit_time == null && hasOkBDefect" style="margin-right: 16px;display:flex;align-items:center;">
<span style="margin-right: 6px;">将合格B类计入合格品</span>
<span style="margin-right: 6px;">合格B类记为合格</span>
<el-switch v-model="mlogItem.clear_defect"></el-switch>
</div>
<el-button

View File

@ -77,7 +77,6 @@
:value="item.id"
>
<span>{{ item.batch }}</span>
<el-tag v-if="item.defect_grade != null" :type="item.defect_grade === 30 ? 'danger' : item.defect_grade === 20 ? 'warning' : 'success'" size="small" style="margin-left: 8px;">{{ item.defect_grade_name }}</el-tag>
<el-tag v-if="item.defect_name&&item.defect_name!==null" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ item.defect_name }}</el-tag>
<span style="float: right;">{{ item.count_cando }}</span>
</el-option>

View File

@ -45,10 +45,9 @@
>
<el-table-column label="物料" prop="full_name">
<template #default="scope">
<span v-if="scope.row.state==20" style="color: #e6a23c;border: 1px solid #e6a23c;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
<el-tag v-if="scope.row.defect_grade != null" :type="scope.row.defect_grade === 30 ? 'danger' : scope.row.defect_grade === 20 ? 'warning' : 'success'" size="small" style="margin-left: 8px;">{{ scope.row.defect_grade_name }}</el-tag>
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
</template>
</el-table-column>
@ -194,10 +193,10 @@
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
</el-form-item>
</el-col>
<el-col :md="24" :sm="24" v-if="canClearBatchDefect">
<el-form-item label="清除批次缺陷">
<el-col :md="24" :sm="24" v-if="defectMismatch">
<el-form-item label="清除缺陷">
<el-checkbox v-model="form.clear_defect">
{{ clearBatchDefectHint }}
源批次缺陷不一致勾选后合并批次将清除缺陷标记
</el-checkbox>
</el-form-item>
</el-col>
@ -218,10 +217,9 @@
>
<el-table-column label="物料" prop="full_name">
<template #default="scope">
<span v-if="scope.row.state==20" style="color: #e6a23c;border: 1px solid #e6a23c;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
<el-tag v-if="scope.row.defect_grade != null" :type="scope.row.defect_grade === 30 ? 'danger' : scope.row.defect_grade === 20 ? 'warning' : 'success'" size="small" style="margin-left: 8px;">{{ scope.row.defect_grade_name }}</el-tag>
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
</template>
</el-table-column>
@ -481,25 +479,14 @@ export default {
that.getTid();
},
computed: {
canClearBatchDefect() {
// state OK(10) defect ""
defectMismatch() {
if (this.mtype !== 30) return false;
const items = this.form.handoverb || [];
if (items.length < 2) return false;
const states = new Set(items.map(i => Number(i.state)));
if (states.size !== 1) return false;
const tracking = Number(items[0].tracking);
if (tracking === 20) return true;
return items.every(i =>
Number(i.state) === 10 &&
i.defect != null &&
Number(i.defect_okcate) === 20
);
},
clearBatchDefectHint() {
const items = this.form.handoverb || [];
return Number(items[0] && items[0].tracking) === 20
? "仅清除合批后批次的缺陷归类,单件缺陷记录保持不变"
: "将合格B类合并为无缺陷批次";
if (!items.every(i => Number(i.state) === 10)) return false;
const defectIds = new Set(items.map(i => i.defect == null ? null : i.defect));
return defectIds.size > 1;
}
},
watch: {
@ -509,7 +496,7 @@ export default {
console.log('batchList',v)
}
},
canClearBatchDefect(val) {
defectMismatch(val) {
if (!val) {
this.form.clear_defect = false;
}
@ -674,13 +661,6 @@ export default {
this.mode = mode;
this.mtype = mtype;
this.form.clear_defect = false;
if (mtype === 30) {
this.paramsM = {
...this.paramsM,
state__in: '10,20,34'
};
delete this.paramsM.state;
}
if(data!==''&&data!==null&&data!==undefined){
console.log(typeof(data)=='string')
if(typeof(data)=='string'){
@ -695,8 +675,6 @@ export default {
obj.label = item.label;
obj.batch = item.batch;
obj.defect = item.defect;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.tracking || (item.material_ && item.material_.tracking);
obj.material = item.material;
obj.count_cando = item.count_canhandover;
obj.count = item.count_canhandover;
@ -726,8 +704,6 @@ export default {
obj.count = item.count_canhandover;
obj.defect = item.defect;
obj.defect_name = item.defect_name;
obj.defect_okcate = item.defect_okcate;
obj.tracking = item.material_ && item.material_.tracking;
obj.count_cando = item.count_canhandover;
obj.material = item.material;
if(that.type==50){
@ -750,8 +726,7 @@ export default {
if(!row || !row.batch){
return "";
}
const details = [row.defect_grade_name, row.defect_name].filter(Boolean);
return details.length ? `${row.batch} [${details.join("")}]` : row.batch;
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
},
countChange(){
let that = this;

View File

@ -12,11 +12,11 @@
</div>
<div class="right-panel">
<el-select
v-model="query.state"
placeholder="库存状态"
v-model="queryState"
placeholder="物料状态"
clearable
style="width: 250px"
@change="handleQuery"
@change="searchStateChange"
>
<el-option
v-for="item in stateOptions"
@ -25,9 +25,6 @@
:value="item.value"
/>
</el-select>
<el-select v-model="query.defect__okcate" placeholder="缺陷等级" clearable style="width: 130px" @change="handleQuery">
<el-option v-for="item in defectGradeOptions" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-input
style="margin-right: 5px"
v-model="query.search"
@ -52,20 +49,13 @@
@selection-change="selectionChange"
>
<el-table-column type="selection"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" >
<el-table-column label="状态" prop="state" width="100" >
<template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type">
{{wmState[scope.row.state]?.text}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="缺陷等级" prop="defect_grade" width="105">
<template #default="scope">
<el-tag v-if="scope.row.defect_grade != null" :type="defectGrade[scope.row.defect_grade]?.type">{{ defectGrade[scope.row.defect_grade]?.text }}</el-tag>
<span v-else-if="scope.row.notok_sign">未分级</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
label="物料名称"
prop="material_name"
@ -106,11 +96,9 @@
min-width="80"
></el-table-column>
<el-table-column
label="缺陷项/标记"
label="不合格标记"
prop="defect_name"
>
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
</el-table-column>
></el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -232,7 +220,7 @@
</el-container>
</template>
<script>
import { defectGrade, wmState } from "@/utils/enum.js";
import { wmState } from "@/utils/enum.js";
import printDialog from "./../template/printmaterial.vue";
import checkDialog from "./check_form.vue";
import showDrawer from "./check_drawer.vue";
@ -274,7 +262,6 @@ export default {
data() {
return {
wmState,
defectGrade,
apiObj: null,
params: {
mgroup: "",
@ -284,7 +271,6 @@ export default {
query: {
search: "",
state: null,
defect__okcate: null,
},
dialog: {
save: false,
@ -298,18 +284,12 @@ export default {
tableData: [],
selection: [],
stateOptions:[
{ value: 10, name: "正常"},
{ value: 20, name: "不合格品"},
{ value: 30, name: "返修"},
{ value: 34, name: "返修完成"},
{ value: 40, name: "待检验"},
{ value: 50, name: "报废"},
],
defectGradeOptions: [
{ value: 10, name: "合格"},
{ value: 20, name: "合格B类"},
{ value: 30, name: "不合格"},
{ value: 100, name: "完全合格"},
{ value: 101, name: "合格B类"},
{ value: 20, name: "不合格"},
{ value: 30, name: "返工"},
],
queryState: null,
codeText2: "",
codeText4: "",
cate_type:'',
@ -375,6 +355,25 @@ export default {
this.$refs.scrapDialog.open("add",handoverb,30);
});
},
searchStateChange(){
let that = this;
that.query.state = null;
that.query.defect__isnull = null;
if(that.queryState==100){
that.query.state = 10;
that.query.defect__isnull = true;
}else if(that.queryState==101){
that.query.state = 10;
that.query.defect__isnull = false;
}else if(that.queryState==20){
that.query.state = 20;
that.query.defect__isnull = null;
}else if(that.queryState==30){
that.query.state = 30;
that.query.defect__isnull = null;
}
that.handleQuery();
},
//
tomio(type) {
let that = this;

View File

@ -29,10 +29,10 @@
style="width: 130px; margin:0"
></el-date-picker>
<el-select
v-model="query.state"
placeholder="库存状态"
v-model="queryState"
placeholder="物料状态"
clearable
@change="handleQuery"
@change="searchStateChange"
style="width: 110px"
>
<el-option
@ -42,9 +42,6 @@
:value="item.value"
/>
</el-select>
<el-select v-model="query.defect__okcate" placeholder="缺陷等级" clearable style="width: 130px" @change="handleQuery">
<el-option v-for="item in defectGradeOptions" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-input
style="margin-right: 5px;width: 200px"
v-model="query.search"
@ -69,20 +66,13 @@
@selection-change="selectionChange"
>
<el-table-column type="selection"></el-table-column>
<el-table-column label="库存状态" prop="state" width="110" >
<el-table-column label="状态" prop="state" width="100" >
<template #default="scope">
<el-tag :type="wmState[scope.row.state]?.type">
{{wmState[scope.row.state]?.text}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="缺陷等级" prop="defect_grade" width="105">
<template #default="scope">
<el-tag v-if="scope.row.defect_grade != null" :type="defectGrade[scope.row.defect_grade]?.type">{{ defectGrade[scope.row.defect_grade]?.text }}</el-tag>
<span v-else-if="scope.row.notok_sign">未分级</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column
label="物料名称"
prop="material_name"
@ -121,11 +111,9 @@
min-width="80"
></el-table-column>
<el-table-column
label="缺陷项/标记"
label="不合格标记"
prop="defect_name"
>
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
</el-table-column>
></el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -222,7 +210,7 @@
</el-container>
</template>
<script>
import { defectGrade, wmState } from "@/utils/enum.js";
import { wmState } from "@/utils/enum.js";
import materials from "./../mtm/materials.vue";
import printDialog from "./../template/printmaterial.vue";
import checkDialog from "./check_form.vue";
@ -266,7 +254,6 @@ export default {
data() {
return {
wmState,
defectGrade,
apiObj: null,
params: {
mgroup: "",
@ -276,7 +263,6 @@ export default {
query: {
search: "",
state: null,
defect__okcate: null,
},
dialog: {
save: false,
@ -289,22 +275,16 @@ export default {
tableData: [],
selection: [],
stateOptions:[
{ value: 10, name: "正常"},
{ value: 20, name: "不合格品"},
{ value: 30, name: "返修"},
{ value: 34, name: "返修完成"},
{ value: 40, name: "待检验"},
{ value: 50, name: "报废"},
{ value: 100, name: "完全合格"},
{ value: 101, name: "合格B类"},
{ value: 20, name: "不合格"},
{ value: 30, name: "返工"},
],
queryWm: {
search: "",
material: "",
},
defectGradeOptions: [
{ value: 10, name: "合格"},
{ value: 20, name: "合格B类"},
{ value: 30, name: "不合格"},
],
queryState:null,
route_code:'',
cate_type:'',
materialType: "wm",
@ -341,6 +321,25 @@ export default {
this.$refs.table_wm.queryData(this.queryWm);
this.materialsVisible = false;
},
searchStateChange(){
let that = this;
that.query.state = null;
that.query.defect__isnull = null;
if(that.queryState==100){
that.query.state = 10;
that.query.defect__isnull = true;
}else if(that.queryState==101){
that.query.state = 10;
that.query.defect__isnull = false;
}else if(that.queryState==20){
that.query.state = 20;
that.query.defect__isnull = null;
}else if(that.queryState==30){
that.query.state = 30;
that.query.defect__isnull = null;
}
that.handleQuery();
},
tomio(type) {
let that = this;
that.cate_type=type;

View File

@ -64,7 +64,7 @@
<div style="padding: 5px 10px;display: flex;justify-content: end;align-items: center;">
<!-- hasOkBDefect -->
<div v-if="mlogItem.submit_time == null" style="margin-right: 16px;display:flex;align-items:center;">
<span style="margin-right: 6px;">将合格B类计入合格品</span>
<span style="margin-right: 6px;">合格B类记为合格</span>
<el-switch v-model="mlogItem.clear_defect"></el-switch>
</div>
<el-button

View File

@ -54,10 +54,9 @@
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
<el-table-column label="物料" prop="full_name">
<template #default="scope">
<span v-if="scope.row.state==20" style="color: #e6a23c;border: 1px solid #e6a23c;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;"></span>
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
<el-tag v-if="scope.row.defect_grade != null" :type="scope.row.defect_grade === 30 ? 'danger' : scope.row.defect_grade === 20 ? 'warning' : 'success'" size="small" style="margin-left: 8px;">{{ scope.row.defect_grade_name }}</el-tag>
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
</template>
</el-table-column>
@ -494,9 +493,7 @@ export default {
if(!row || !row.batch){
return "";
}
const details = [row.defect_grade_name, row.defect_name].filter(Boolean);
return details.length ? `${row.batch} [${details.join("")}]` : row.batch;
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
},
//
submit() {