|
@@ -4,11 +4,10 @@
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
- :datasource="poList.filter((item) => item.disposalStatus != 2)"
|
|
|
|
|
|
|
+ :datasource="poList.filter((item) => item.disposalStatus != 2)"
|
|
|
:selection.sync="selection"
|
|
:selection.sync="selection"
|
|
|
:needPage="false"
|
|
:needPage="false"
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
-
|
|
|
|
|
>
|
|
>
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:toolbar v-if="showBtn">
|
|
<template v-slot:toolbar v-if="showBtn">
|
|
@@ -36,6 +35,71 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
|
</template>
|
|
</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>
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
@@ -316,7 +380,10 @@
|
|
|
import {
|
|
import {
|
|
|
queryQualitySamplContent,
|
|
queryQualitySamplContent,
|
|
|
queryQualityInventory,
|
|
queryQualityInventory,
|
|
|
- getById
|
|
|
|
|
|
|
+ getById,
|
|
|
|
|
+ getBadnameList,
|
|
|
|
|
+ getBadtypeList,
|
|
|
|
|
+ getReasontypeList
|
|
|
} from '@/api/bpm/components/qualityReportApproval/qualityReportApproval';
|
|
} from '@/api/bpm/components/qualityReportApproval/qualityReportApproval';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -454,7 +521,10 @@
|
|
|
retainedSampleQuantity: 0,
|
|
retainedSampleQuantity: 0,
|
|
|
retainedSampleUnqualified: 0,
|
|
retainedSampleUnqualified: 0,
|
|
|
lossNumber: 0,
|
|
lossNumber: 0,
|
|
|
- lossNumberUnqualified: 0
|
|
|
|
|
|
|
+ lossNumberUnqualified: 0,
|
|
|
|
|
+ badTypeList: [],
|
|
|
|
|
+ badNameList: [],
|
|
|
|
|
+ reasonTypeList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -598,22 +668,26 @@
|
|
|
{
|
|
{
|
|
|
prop: 'badTypeName',
|
|
prop: 'badTypeName',
|
|
|
label: '不良类型',
|
|
label: '不良类型',
|
|
|
|
|
+ slot: 'badTypeName',
|
|
|
width: '180',
|
|
width: '180',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'badNameName',
|
|
prop: 'badNameName',
|
|
|
|
|
+ slot: 'badNameName',
|
|
|
label: '不良名称',
|
|
label: '不良名称',
|
|
|
width: '180',
|
|
width: '180',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
|
|
+ slot: 'reasonTypeName',
|
|
|
prop: 'reasonTypeName',
|
|
prop: 'reasonTypeName',
|
|
|
label: '原因类型',
|
|
label: '原因类型',
|
|
|
width: '180',
|
|
width: '180',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
|
|
+ slot: 'unqualifiedReason',
|
|
|
prop: 'unqualifiedReason',
|
|
prop: 'unqualifiedReason',
|
|
|
label: '原因',
|
|
label: '原因',
|
|
|
width: '180',
|
|
width: '180',
|
|
@@ -656,8 +730,36 @@
|
|
|
return { 0: '待处置', 1: '处置中', 2: '处置完成' };
|
|
return { 0: '待处置', 1: '处置中', 2: '处置完成' };
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getBadTypeList();
|
|
|
|
|
+ this.getBadNameList();
|
|
|
|
|
+ this.getReasonTypeList();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
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) {
|
|
async init(row) {
|
|
|
this.qualityType = row.qualityType;
|
|
this.qualityType = row.qualityType;
|
|
|
this.id = row.id;
|
|
this.id = row.id;
|
|
@@ -856,14 +958,19 @@
|
|
|
const processedList = this.sampleList.filter(
|
|
const processedList = this.sampleList.filter(
|
|
|
(item) => item.disposeType == 6 || item.disposeType == 7
|
|
(item) => item.disposeType == 6 || item.disposeType == 7
|
|
|
);
|
|
);
|
|
|
- console.log(processedList.filter((item) => item.disposeType == 6),'qwewqe')
|
|
|
|
|
- console.log(processedList.filter((item) => item.disposeType == 7),'123123')
|
|
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ processedList.filter((item) => item.disposeType == 6),
|
|
|
|
|
+ 'qwewqe'
|
|
|
|
|
+ );
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ processedList.filter((item) => item.disposeType == 7),
|
|
|
|
|
+ '123123'
|
|
|
|
|
+ );
|
|
|
processedList.forEach((sampleItem) => {
|
|
processedList.forEach((sampleItem) => {
|
|
|
if (sampleItem.disposeType == 6) {
|
|
if (sampleItem.disposeType == 6) {
|
|
|
sampleItem.qualityResults == 2
|
|
sampleItem.qualityResults == 2
|
|
|
? (this.retainedSampleUnqualified += sampleItem.measureQuantity)
|
|
? (this.retainedSampleUnqualified += sampleItem.measureQuantity)
|
|
|
- : (this.retainedSampleQuantity +=
|
|
|
|
|
- sampleItem.measureQuantity);
|
|
|
|
|
|
|
+ : (this.retainedSampleQuantity += sampleItem.measureQuantity);
|
|
|
} else {
|
|
} else {
|
|
|
sampleItem.qualityResults == 2
|
|
sampleItem.qualityResults == 2
|
|
|
? (this.lossNumberUnqualified += sampleItem.measureQuantity)
|
|
? (this.lossNumberUnqualified += sampleItem.measureQuantity)
|