Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
d3e700fcae
|
|
@ -201,14 +201,20 @@ 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' },
|
||||
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' },
|
||||
}, parseInt)
|
||||
|
||||
export const certStateEnum = new EnumFactory({
|
||||
10: { text: '正常', type: 'success' },
|
||||
20: { text: '临期', type: 'warning' },
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
<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>
|
||||
|
|
@ -228,10 +229,10 @@
|
|||
<span style="color: red;">请手动录入新批次号,不要用已有批次!</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="24" v-if="defectMismatch">
|
||||
<el-form-item label="清除缺陷">
|
||||
<el-col :md="24" :sm="24" v-if="canClearBatchDefect">
|
||||
<el-form-item label="清除批次缺陷">
|
||||
<el-checkbox v-model="form.clear_defect">
|
||||
源批次缺陷不一致,勾选后合并批次将清除缺陷标记
|
||||
{{ clearBatchDefectHint }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -469,19 +470,30 @@ 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);
|
||||
},
|
||||
// 合批时源批次 state 均为 OK(10) 且 defect 不一致,才显示"清除缺陷"勾选
|
||||
defectMismatch() {
|
||||
canClearBatchDefect() {
|
||||
if (this.mtype !== 30) return false;
|
||||
if (this.new_wm) return false;
|
||||
const items = this.form.handoverb || [];
|
||||
if (items.length < 2) return false;
|
||||
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;
|
||||
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类合并为无缺陷批次";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
defectMismatch(val) {
|
||||
canClearBatchDefect(val) {
|
||||
if (!val) {
|
||||
this.form.clear_defect = false;
|
||||
}
|
||||
|
|
@ -538,7 +550,7 @@ export default {
|
|||
let that = this;
|
||||
var req = {
|
||||
page: 0,
|
||||
state__in:'10,34',
|
||||
state__in: this.mtype === 30 ? '10,20,34' : '10,34',
|
||||
tag:that.tag,
|
||||
mgroupx:that.mgroupId
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</el-select>
|
||||
<el-select
|
||||
v-model="query.state"
|
||||
placeholder="物料状态"
|
||||
placeholder="库存状态"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
style="width: 250px"
|
||||
|
|
@ -46,6 +46,9 @@
|
|||
: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"
|
||||
|
|
@ -70,13 +73,20 @@
|
|||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="100" >
|
||||
<el-table-column label="库存状态" prop="state" width="110" >
|
||||
<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"
|
||||
|
|
@ -141,9 +151,11 @@
|
|||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="不合格标记"
|
||||
label="缺陷项/标记"
|
||||
prop="defect_name"
|
||||
></el-table-column>
|
||||
>
|
||||
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
|
|
@ -344,7 +356,7 @@
|
|||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||
import checkDialog from "./check_form.vue";
|
||||
import showDrawer from "./check_drawer.vue";
|
||||
import scrapDialog from "./handover_form.vue";
|
||||
|
|
@ -386,6 +398,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
wmState,
|
||||
defectGrade,
|
||||
apiObj: null,
|
||||
params: {
|
||||
tag : 'todo',
|
||||
|
|
@ -395,6 +408,7 @@ export default {
|
|||
query: {
|
||||
search: "",
|
||||
state: 10,
|
||||
defect__okcate: null,
|
||||
current_merged:null,
|
||||
},
|
||||
dialog: {
|
||||
|
|
@ -410,9 +424,17 @@ 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: "不合格"},
|
||||
{ value: 30, name: "返工"},
|
||||
{ value: 20, name: "合格B类"},
|
||||
{ value: 30, name: "不合格"},
|
||||
],
|
||||
mergedOptions:[
|
||||
{ value: false, name: "未合批"},
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
></el-switch>
|
||||
<el-select
|
||||
v-model="query.state"
|
||||
placeholder="物料状态"
|
||||
placeholder="库存状态"
|
||||
clearable
|
||||
@change="searchStateChange"
|
||||
@change="handleQuery"
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -31,6 +31,9 @@
|
|||
: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="不合格项"
|
||||
|
|
@ -69,13 +72,20 @@
|
|||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="80" >
|
||||
<el-table-column label="库存状态" prop="state" width="110" >
|
||||
<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"
|
||||
|
|
@ -140,9 +150,11 @@
|
|||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="不合格标记"
|
||||
label="缺陷项/标记"
|
||||
prop="defect_name"
|
||||
></el-table-column>
|
||||
>
|
||||
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
|
|
@ -315,7 +327,7 @@
|
|||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||
import materials from "./../mtm/materials.vue";
|
||||
import checkDialog from "./check_form.vue";
|
||||
import showDrawer from "./check_drawer.vue";
|
||||
|
|
@ -359,6 +371,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
wmState,
|
||||
defectGrade,
|
||||
apiObj: null,
|
||||
params: {
|
||||
tag : 'done',
|
||||
|
|
@ -369,6 +382,7 @@ export default {
|
|||
search: "",
|
||||
defect: "",
|
||||
state: null,
|
||||
defect__okcate: null,
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
@ -384,9 +398,17 @@ 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: "不合格"},
|
||||
{ value: 30, name: "返工"},
|
||||
{ value: 20, name: "合格B类"},
|
||||
{ value: 30, name: "不合格"},
|
||||
],
|
||||
queryWm: {
|
||||
search: "",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
: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>
|
||||
|
|
|
|||
|
|
@ -45,9 +45,10 @@
|
|||
>
|
||||
<el-table-column label="物料" prop="full_name">
|
||||
<template #default="scope">
|
||||
<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 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>{{ 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>
|
||||
|
|
@ -193,10 +194,10 @@
|
|||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="24" v-if="defectMismatch">
|
||||
<el-form-item label="清除缺陷">
|
||||
<el-col :md="24" :sm="24" v-if="canClearBatchDefect">
|
||||
<el-form-item label="清除批次缺陷">
|
||||
<el-checkbox v-model="form.clear_defect">
|
||||
源批次缺陷不一致,勾选后合并批次将清除缺陷标记
|
||||
{{ clearBatchDefectHint }}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -217,9 +218,10 @@
|
|||
>
|
||||
<el-table-column label="物料" prop="full_name">
|
||||
<template #default="scope">
|
||||
<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 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>{{ 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>
|
||||
|
|
@ -479,14 +481,25 @@ export default {
|
|||
that.getTid();
|
||||
},
|
||||
computed: {
|
||||
// 合批时源批次 state 均为 OK(10) 且 defect 不一致,才显示"清除缺陷"勾选
|
||||
defectMismatch() {
|
||||
canClearBatchDefect() {
|
||||
if (this.mtype !== 30) return false;
|
||||
const items = this.form.handoverb || [];
|
||||
if (items.length < 2) return false;
|
||||
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;
|
||||
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类合并为无缺陷批次";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -496,7 +509,7 @@ export default {
|
|||
console.log('batchList',v)
|
||||
}
|
||||
},
|
||||
defectMismatch(val) {
|
||||
canClearBatchDefect(val) {
|
||||
if (!val) {
|
||||
this.form.clear_defect = false;
|
||||
}
|
||||
|
|
@ -661,6 +674,13 @@ 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'){
|
||||
|
|
@ -675,6 +695,8 @@ 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;
|
||||
|
|
@ -704,6 +726,8 @@ 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){
|
||||
|
|
@ -726,7 +750,8 @@ export default {
|
|||
if(!row || !row.batch){
|
||||
return "";
|
||||
}
|
||||
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
|
||||
const details = [row.defect_grade_name, row.defect_name].filter(Boolean);
|
||||
return details.length ? `${row.batch} [${details.join("|")}]` : row.batch;
|
||||
},
|
||||
countChange(){
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
v-model="queryState"
|
||||
placeholder="物料状态"
|
||||
v-model="query.state"
|
||||
placeholder="库存状态"
|
||||
clearable
|
||||
style="width: 250px"
|
||||
@change="searchStateChange"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stateOptions"
|
||||
|
|
@ -25,6 +25,9 @@
|
|||
: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"
|
||||
|
|
@ -49,13 +52,20 @@
|
|||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="100" >
|
||||
<el-table-column label="库存状态" prop="state" width="110" >
|
||||
<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"
|
||||
|
|
@ -96,9 +106,11 @@
|
|||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="不合格标记"
|
||||
label="缺陷项/标记"
|
||||
prop="defect_name"
|
||||
></el-table-column>
|
||||
>
|
||||
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
|
|
@ -220,7 +232,7 @@
|
|||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||
import printDialog from "./../template/printmaterial.vue";
|
||||
import checkDialog from "./check_form.vue";
|
||||
import showDrawer from "./check_drawer.vue";
|
||||
|
|
@ -262,6 +274,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
wmState,
|
||||
defectGrade,
|
||||
apiObj: null,
|
||||
params: {
|
||||
mgroup: "",
|
||||
|
|
@ -271,6 +284,7 @@ export default {
|
|||
query: {
|
||||
search: "",
|
||||
state: null,
|
||||
defect__okcate: null,
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
@ -284,12 +298,18 @@ export default {
|
|||
tableData: [],
|
||||
selection: [],
|
||||
stateOptions:[
|
||||
{ value: 100, name: "完全合格"},
|
||||
{ value: 101, name: "合格B类"},
|
||||
{ value: 20, name: "不合格"},
|
||||
{ value: 30, name: "返工"},
|
||||
{ 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: "不合格"},
|
||||
],
|
||||
queryState: null,
|
||||
codeText2: "",
|
||||
codeText4: "",
|
||||
cate_type:'',
|
||||
|
|
@ -355,25 +375,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
style="width: 130px; margin:0"
|
||||
></el-date-picker>
|
||||
<el-select
|
||||
v-model="queryState"
|
||||
placeholder="物料状态"
|
||||
v-model="query.state"
|
||||
placeholder="库存状态"
|
||||
clearable
|
||||
@change="searchStateChange"
|
||||
@change="handleQuery"
|
||||
style="width: 110px"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -42,6 +42,9 @@
|
|||
: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"
|
||||
|
|
@ -66,13 +69,20 @@
|
|||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="100" >
|
||||
<el-table-column label="库存状态" prop="state" width="110" >
|
||||
<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"
|
||||
|
|
@ -111,9 +121,11 @@
|
|||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="不合格标记"
|
||||
label="缺陷项/标记"
|
||||
prop="defect_name"
|
||||
></el-table-column>
|
||||
>
|
||||
<template #default="scope">{{ scope.row.defect_name || scope.row.notok_sign_name || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
|
|
@ -210,7 +222,7 @@
|
|||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||
import materials from "./../mtm/materials.vue";
|
||||
import printDialog from "./../template/printmaterial.vue";
|
||||
import checkDialog from "./check_form.vue";
|
||||
|
|
@ -254,6 +266,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
wmState,
|
||||
defectGrade,
|
||||
apiObj: null,
|
||||
params: {
|
||||
mgroup: "",
|
||||
|
|
@ -263,6 +276,7 @@ export default {
|
|||
query: {
|
||||
search: "",
|
||||
state: null,
|
||||
defect__okcate: null,
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
@ -275,16 +289,22 @@ export default {
|
|||
tableData: [],
|
||||
selection: [],
|
||||
stateOptions:[
|
||||
{ value: 100, name: "完全合格"},
|
||||
{ value: 101, name: "合格B类"},
|
||||
{ value: 20, name: "不合格"},
|
||||
{ value: 30, name: "返工"},
|
||||
{ value: 10, name: "正常"},
|
||||
{ value: 20, name: "不合格品"},
|
||||
{ value: 30, name: "返修"},
|
||||
{ value: 34, name: "返修完成"},
|
||||
{ value: 40, name: "待检验"},
|
||||
{ value: 50, name: "报废"},
|
||||
],
|
||||
queryWm: {
|
||||
search: "",
|
||||
material: "",
|
||||
},
|
||||
queryState:null,
|
||||
defectGradeOptions: [
|
||||
{ value: 10, name: "合格"},
|
||||
{ value: 20, name: "合格B类"},
|
||||
{ value: 30, name: "不合格"},
|
||||
],
|
||||
route_code:'',
|
||||
cate_type:'',
|
||||
materialType: "wm",
|
||||
|
|
@ -321,25 +341,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -54,9 +54,10 @@
|
|||
<!-- :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: 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 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>{{ 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>
|
||||
|
|
@ -493,7 +494,9 @@ export default {
|
|||
if(!row || !row.batch){
|
||||
return "";
|
||||
}
|
||||
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
|
||||
const details = [row.defect_grade_name, row.defect_name].filter(Boolean);
|
||||
return details.length ? `${row.batch} [${details.join("|")}]` : row.batch;
|
||||
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue