Separate material state and defect grade UI
This commit is contained in:
parent
eef6594f3c
commit
62d34e5ad7
|
|
@ -201,14 +201,20 @@ export const schedulePeriodEnum = new EnumFactory({
|
||||||
})
|
})
|
||||||
|
|
||||||
export const wmState = new EnumFactory({
|
export const wmState = new EnumFactory({
|
||||||
10: { text: '合格', type: 'success' },
|
10: { text: '正常', type: 'success' },
|
||||||
20: { text: '不合格', type: 'warning' },
|
20: { text: '不合格品', type: 'warning' },
|
||||||
30: { text: '返工', type: 'warning' },
|
30: { text: '返修', type: 'warning' },
|
||||||
34: { text: '返工完成', type: 'warning' },
|
34: { text: '返修完成', type: 'warning' },
|
||||||
40: { text: '检验', type: 'primary' },
|
40: { text: '待检验', type: 'primary' },
|
||||||
50: { text: '报废', type: 'danger' },
|
50: { text: '报废', type: 'danger' },
|
||||||
}, parseInt)
|
}, 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({
|
export const certStateEnum = new EnumFactory({
|
||||||
10: { text: '正常', type: 'success' },
|
10: { text: '正常', type: 'success' },
|
||||||
20: { text: '临期', type: 'warning' },
|
20: { text: '临期', type: 'warning' },
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@
|
||||||
<span>{{ item.batch }}</span>
|
<span>{{ item.batch }}</span>
|
||||||
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
||||||
<span v-else>(原料棒)</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>
|
<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">
|
<div style="float: right">
|
||||||
<span>{{ item.count_canhandover }}</span>
|
<span>{{ item.count_canhandover }}</span>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.state"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="库存状态"
|
||||||
clearable
|
clearable
|
||||||
@change="handleQuery"
|
@change="handleQuery"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
|
|
@ -46,6 +46,9 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</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
|
<el-input
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
|
|
@ -70,13 +73,20 @@
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50"></el-table-column>
|
<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">
|
<template #default="scope">
|
||||||
<el-tag :type="wmState[scope.row.state]?.type">
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
{{wmState[scope.row.state]?.text}}
|
{{wmState[scope.row.state]?.text}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
|
|
@ -141,9 +151,11 @@
|
||||||
min-width="80"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="不合格标记"
|
label="缺陷项/标记"
|
||||||
prop="defect_name"
|
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
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
|
|
@ -344,7 +356,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { wmState } from "@/utils/enum.js";
|
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||||
import checkDialog from "./check_form.vue";
|
import checkDialog from "./check_form.vue";
|
||||||
import showDrawer from "./check_drawer.vue";
|
import showDrawer from "./check_drawer.vue";
|
||||||
import scrapDialog from "./handover_form.vue";
|
import scrapDialog from "./handover_form.vue";
|
||||||
|
|
@ -386,6 +398,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
defectGrade,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {
|
params: {
|
||||||
tag : 'todo',
|
tag : 'todo',
|
||||||
|
|
@ -395,6 +408,7 @@ export default {
|
||||||
query: {
|
query: {
|
||||||
search: "",
|
search: "",
|
||||||
state: 10,
|
state: 10,
|
||||||
|
defect__okcate: null,
|
||||||
current_merged:null,
|
current_merged:null,
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
|
|
@ -410,9 +424,17 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
|
{ value: 10, name: "正常"},
|
||||||
|
{ value: 20, name: "不合格品"},
|
||||||
|
{ value: 30, name: "返修"},
|
||||||
|
{ value: 34, name: "返修完成"},
|
||||||
|
{ value: 40, name: "待检验"},
|
||||||
|
{ value: 50, name: "报废"},
|
||||||
|
],
|
||||||
|
defectGradeOptions: [
|
||||||
{ value: 10, name: "合格"},
|
{ value: 10, name: "合格"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 20, name: "合格B类"},
|
||||||
{ value: 30, name: "返工"},
|
{ value: 30, name: "不合格"},
|
||||||
],
|
],
|
||||||
mergedOptions:[
|
mergedOptions:[
|
||||||
{ value: false, name: "未合批"},
|
{ value: false, name: "未合批"},
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.state"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="库存状态"
|
||||||
clearable
|
clearable
|
||||||
@change="searchStateChange"
|
@change="handleQuery"
|
||||||
style="width: 100px"
|
style="width: 100px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -31,6 +31,9 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</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
|
<el-select
|
||||||
v-model="query.defect"
|
v-model="query.defect"
|
||||||
placeholder="不合格项"
|
placeholder="不合格项"
|
||||||
|
|
@ -69,13 +72,20 @@
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50"></el-table-column>
|
<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">
|
<template #default="scope">
|
||||||
<el-tag :type="wmState[scope.row.state]?.type">
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
{{wmState[scope.row.state]?.text}}
|
{{wmState[scope.row.state]?.text}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
|
|
@ -140,9 +150,11 @@
|
||||||
min-width="80"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="不合格标记"
|
label="缺陷项/标记"
|
||||||
prop="defect_name"
|
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
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
|
|
@ -315,7 +327,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { wmState } from "@/utils/enum.js";
|
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||||
import materials from "./../mtm/materials.vue";
|
import materials from "./../mtm/materials.vue";
|
||||||
import checkDialog from "./check_form.vue";
|
import checkDialog from "./check_form.vue";
|
||||||
import showDrawer from "./check_drawer.vue";
|
import showDrawer from "./check_drawer.vue";
|
||||||
|
|
@ -359,6 +371,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
defectGrade,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {
|
params: {
|
||||||
tag : 'done',
|
tag : 'done',
|
||||||
|
|
@ -369,6 +382,7 @@ export default {
|
||||||
search: "",
|
search: "",
|
||||||
defect: "",
|
defect: "",
|
||||||
state: null,
|
state: null,
|
||||||
|
defect__okcate: null,
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
|
@ -384,9 +398,17 @@ export default {
|
||||||
selection: [],
|
selection: [],
|
||||||
defectOptions: [],
|
defectOptions: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
|
{ value: 10, name: "正常"},
|
||||||
|
{ value: 20, name: "不合格品"},
|
||||||
|
{ value: 30, name: "返修"},
|
||||||
|
{ value: 34, name: "返修完成"},
|
||||||
|
{ value: 40, name: "待检验"},
|
||||||
|
{ value: 50, name: "报废"},
|
||||||
|
],
|
||||||
|
defectGradeOptions: [
|
||||||
{ value: 10, name: "合格"},
|
{ value: 10, name: "合格"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 20, name: "合格B类"},
|
||||||
{ value: 30, name: "返工"},
|
{ value: 30, name: "不合格"},
|
||||||
],
|
],
|
||||||
queryWm: {
|
queryWm: {
|
||||||
search: "",
|
search: "",
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span>{{ item.batch }}</span>
|
<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>
|
<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>
|
<span style="float: right;">{{ item.count_cando }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,10 @@
|
||||||
>
|
>
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
<template #default="scope">
|
<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==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==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返修</span>
|
||||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</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>
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -217,9 +218,10 @@
|
||||||
>
|
>
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
<template #default="scope">
|
<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==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==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返修</span>
|
||||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</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>
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -748,7 +750,8 @@ export default {
|
||||||
if(!row || !row.batch){
|
if(!row || !row.batch){
|
||||||
return "";
|
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(){
|
countChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryState"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="库存状态"
|
||||||
clearable
|
clearable
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
@change="searchStateChange"
|
@change="handleQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in stateOptions"
|
||||||
|
|
@ -25,6 +25,9 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</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
|
<el-input
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
|
|
@ -49,13 +52,20 @@
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection"></el-table-column>
|
<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">
|
<template #default="scope">
|
||||||
<el-tag :type="wmState[scope.row.state]?.type">
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
{{wmState[scope.row.state]?.text}}
|
{{wmState[scope.row.state]?.text}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
|
|
@ -96,9 +106,11 @@
|
||||||
min-width="80"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="不合格标记"
|
label="缺陷项/标记"
|
||||||
prop="defect_name"
|
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
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
|
|
@ -220,7 +232,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { wmState } from "@/utils/enum.js";
|
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||||
import printDialog from "./../template/printmaterial.vue";
|
import printDialog from "./../template/printmaterial.vue";
|
||||||
import checkDialog from "./check_form.vue";
|
import checkDialog from "./check_form.vue";
|
||||||
import showDrawer from "./check_drawer.vue";
|
import showDrawer from "./check_drawer.vue";
|
||||||
|
|
@ -262,6 +274,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
defectGrade,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {
|
params: {
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
|
|
@ -271,6 +284,7 @@ export default {
|
||||||
query: {
|
query: {
|
||||||
search: "",
|
search: "",
|
||||||
state: null,
|
state: null,
|
||||||
|
defect__okcate: null,
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
|
@ -284,12 +298,18 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
{ value: 100, name: "完全合格"},
|
{ value: 10, name: "正常"},
|
||||||
{ value: 101, name: "合格B类"},
|
{ value: 20, name: "不合格品"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 30, 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: "",
|
codeText2: "",
|
||||||
codeText4: "",
|
codeText4: "",
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
|
|
@ -355,25 +375,6 @@ export default {
|
||||||
this.$refs.scrapDialog.open("add",handoverb,30);
|
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) {
|
tomio(type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@
|
||||||
style="width: 130px; margin:0"
|
style="width: 130px; margin:0"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryState"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="库存状态"
|
||||||
clearable
|
clearable
|
||||||
@change="searchStateChange"
|
@change="handleQuery"
|
||||||
style="width: 110px"
|
style="width: 110px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -42,6 +42,9 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</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
|
<el-input
|
||||||
style="margin-right: 5px;width: 200px"
|
style="margin-right: 5px;width: 200px"
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
|
|
@ -66,13 +69,20 @@
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection"></el-table-column>
|
<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">
|
<template #default="scope">
|
||||||
<el-tag :type="wmState[scope.row.state]?.type">
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
{{wmState[scope.row.state]?.text}}
|
{{wmState[scope.row.state]?.text}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
|
|
@ -111,9 +121,11 @@
|
||||||
min-width="80"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="不合格标记"
|
label="缺陷项/标记"
|
||||||
prop="defect_name"
|
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
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
|
|
@ -210,7 +222,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { wmState } from "@/utils/enum.js";
|
import { defectGrade, wmState } from "@/utils/enum.js";
|
||||||
import materials from "./../mtm/materials.vue";
|
import materials from "./../mtm/materials.vue";
|
||||||
import printDialog from "./../template/printmaterial.vue";
|
import printDialog from "./../template/printmaterial.vue";
|
||||||
import checkDialog from "./check_form.vue";
|
import checkDialog from "./check_form.vue";
|
||||||
|
|
@ -254,6 +266,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
defectGrade,
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {
|
params: {
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
|
|
@ -263,6 +276,7 @@ export default {
|
||||||
query: {
|
query: {
|
||||||
search: "",
|
search: "",
|
||||||
state: null,
|
state: null,
|
||||||
|
defect__okcate: null,
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
|
@ -275,16 +289,22 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
stateOptions:[
|
stateOptions:[
|
||||||
{ value: 100, name: "完全合格"},
|
{ value: 10, name: "正常"},
|
||||||
{ value: 101, name: "合格B类"},
|
{ value: 20, name: "不合格品"},
|
||||||
{ value: 20, name: "不合格"},
|
{ value: 30, name: "返修"},
|
||||||
{ value: 30, name: "返工"},
|
{ value: 34, name: "返修完成"},
|
||||||
|
{ value: 40, name: "待检验"},
|
||||||
|
{ value: 50, name: "报废"},
|
||||||
],
|
],
|
||||||
queryWm: {
|
queryWm: {
|
||||||
search: "",
|
search: "",
|
||||||
material: "",
|
material: "",
|
||||||
},
|
},
|
||||||
queryState:null,
|
defectGradeOptions: [
|
||||||
|
{ value: 10, name: "合格"},
|
||||||
|
{ value: 20, name: "合格B类"},
|
||||||
|
{ value: 30, name: "不合格"},
|
||||||
|
],
|
||||||
route_code:'',
|
route_code:'',
|
||||||
cate_type:'',
|
cate_type:'',
|
||||||
materialType: "wm",
|
materialType: "wm",
|
||||||
|
|
@ -321,25 +341,6 @@ export default {
|
||||||
this.$refs.table_wm.queryData(this.queryWm);
|
this.$refs.table_wm.queryData(this.queryWm);
|
||||||
this.materialsVisible = false;
|
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) {
|
tomio(type) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.cate_type=type;
|
that.cate_type=type;
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,10 @@
|
||||||
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
<template #default="scope">
|
<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==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==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返修</span>
|
||||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</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>
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -493,7 +494,9 @@ export default {
|
||||||
if(!row || !row.batch){
|
if(!row || !row.batch){
|
||||||
return "";
|
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() {
|
submit() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue