|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
-
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:columns="columns"
|
|
|
@@ -36,6 +35,71 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template v-slot:badTypeName="{ row, $index }">
|
|
|
+ <el-select
|
|
|
+ v-model="row.badTypeId"
|
|
|
+ placeholder="请选择不良类型"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ remote
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in badTypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ @click="row.badTypeName = item.name"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:badNameName="{ row, $index }">
|
|
|
+ <el-select
|
|
|
+ v-model="row.badNameId"
|
|
|
+ placeholder="请选择不良名称"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ remote
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in badNameList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ @click="row.badNameName = item.name"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template v-slot:reasonTypeName="{ row, $index }">
|
|
|
+ <el-select
|
|
|
+ v-model="row.reasonTypeId"
|
|
|
+ placeholder="请选择原因类型"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ remote
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in reasonTypeList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ @click="row.reasonTypeName = item.name"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template v-slot:unqualifiedReason="{ row, $index }">
|
|
|
+ <el-input v-model="row.unqualifiedReason"></el-input>
|
|
|
+ </template>
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
|
|
|
@@ -325,6 +389,9 @@
|
|
|
queryQualitySamplContent,
|
|
|
queryQualityInventory
|
|
|
} from '@/api/inspectionWork';
|
|
|
+ import { getList as getBadNameList } from '@/api/unacceptedProduct/unqualifiedName';
|
|
|
+ import { getList as getBadTypeList } from '@/api/unacceptedProduct/unqualifiedType';
|
|
|
+ import { getList as getReasonTypeList } from '@/api/unacceptedProduct/reasonType';
|
|
|
export default {
|
|
|
components: {
|
|
|
Edit
|
|
|
@@ -455,7 +522,10 @@
|
|
|
retainedSampleQuantity: 0,
|
|
|
retainedSampleUnqualified: 0,
|
|
|
lossNumber: 0,
|
|
|
- lossNumberUnqualified: 0
|
|
|
+ lossNumberUnqualified: 0,
|
|
|
+ badTypeList: [],
|
|
|
+ badNameList: [],
|
|
|
+ reasonTypeList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -599,22 +669,26 @@
|
|
|
{
|
|
|
prop: 'badTypeName',
|
|
|
label: '不良类型',
|
|
|
+ slot: 'badTypeName',
|
|
|
width: '180',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
prop: 'badNameName',
|
|
|
+ slot: 'badNameName',
|
|
|
label: '不良名称',
|
|
|
width: '180',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
+ slot: 'reasonTypeName',
|
|
|
prop: 'reasonTypeName',
|
|
|
label: '原因类型',
|
|
|
width: '180',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
+ slot: 'unqualifiedReason',
|
|
|
prop: 'unqualifiedReason',
|
|
|
label: '原因',
|
|
|
width: '180',
|
|
|
@@ -657,12 +731,40 @@
|
|
|
return { 0: '待处置', 1: '处置中', 2: '处置完成' };
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.getBadTypeList();
|
|
|
+ this.getBadNameList();
|
|
|
+ this.getReasonTypeList();
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
+ // 查询不良类型
|
|
|
+ async getBadTypeList() {
|
|
|
+ const res = await getBadTypeList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999
|
|
|
+ });
|
|
|
+ this.badTypeList = res.list;
|
|
|
+ },
|
|
|
+ // 查询不良名称
|
|
|
+ async getBadNameList() {
|
|
|
+ const res = await getBadNameList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999
|
|
|
+ });
|
|
|
+ this.badNameList = res.list;
|
|
|
+ },
|
|
|
+ // 查询原因类型
|
|
|
+ async getReasonTypeList() {
|
|
|
+ const res = await getReasonTypeList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999
|
|
|
+ });
|
|
|
+ this.reasonTypeList = res.list;
|
|
|
+ },
|
|
|
async init(row) {
|
|
|
this.qualityType = row.qualityType;
|
|
|
this.id = row.id;
|
|
|
- console.log(row, 'row');
|
|
|
this.workOrderCode = row.workOrderCode;
|
|
|
this.qualityWorkerId = row.qualityWorkerId;
|
|
|
this.qualityResults = row.qualityResults;
|