|
|
@ -134,7 +134,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="质检单号" align="center" prop="inspectionNo" v-if="columns[3].visible"/>
|
|
|
|
<el-table-column label="质检单号" align="center" prop="inspectionNo" v-if="columns[3].visible"/>
|
|
|
|
<el-table-column label="检测类型" align="center" prop="inspectionType" v-if="columns[4].visible"/>
|
|
|
|
<el-table-column label="检测类型" align="center" prop="typeName" v-if="columns[4].visible"/>
|
|
|
|
<el-table-column label="生产日期" align="center" prop="productionDate" width="180" v-if="columns[5].visible">
|
|
|
|
<el-table-column label="生产日期" align="center" prop="productionDate" width="180" v-if="columns[5].visible">
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
@ -251,7 +251,7 @@
|
|
|
|
v-for="dict in review_result"
|
|
|
|
v-for="dict in review_result"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
|
:label="dict.label"
|
|
|
|
:label="dict.label"
|
|
|
|
:value="parseInt(dict.value)"
|
|
|
|
:value="dict.value"
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -382,14 +382,14 @@
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="检测方法" prop="inspectionMethod">
|
|
|
|
<el-form-item label="检测方法" prop="inspectionMethod">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.inspectionMethod" placeholder="请选择检测方法">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.inspectionMethod" placeholder="请选择检测方法">
|
|
|
|
<el-option v-for="dict in qc_methond" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
<el-option v-for="dict in qc_methond" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="检测方式" prop="detectType">
|
|
|
|
<el-form-item label="检测方式" prop="detectType">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.detectType" placeholder="请选择检测方式">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.detectType" placeholder="请选择检测方式">
|
|
|
|
<el-option v-for="dict in detect_type" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
<el-option v-for="dict in detect_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -398,7 +398,7 @@
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="检测结果" prop="detectResult">
|
|
|
|
<el-form-item label="检测结果" prop="detectResult">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.detectResult" placeholder="请选择检测结果">
|
|
|
|
<el-select v-model="qcUnqualifiedRecordForm.detectResult" placeholder="请选择检测结果">
|
|
|
|
<el-option v-for="dict in qc_result" :key="dict.value" :label="dict.label" :value="parseInt(dict.value)"></el-option>
|
|
|
|
<el-option v-for="dict in qc_result" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -456,7 +456,14 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup name="QcUnqualifiedReview" lang="ts">
|
|
|
|
<script setup name="QcUnqualifiedReview" lang="ts">
|
|
|
|
import { listQcUnqualifiedReview, getQcUnqualifiedReview, delQcUnqualifiedReview, addQcUnqualifiedReview, updateQcUnqualifiedReview } from '@/api/qms/qcUnqualifiedReview';
|
|
|
|
import {
|
|
|
|
|
|
|
|
listQcUnqualifiedReview,
|
|
|
|
|
|
|
|
getQcUnqualifiedReview,
|
|
|
|
|
|
|
|
delQcUnqualifiedReview,
|
|
|
|
|
|
|
|
addQcUnqualifiedReview,
|
|
|
|
|
|
|
|
updateQcUnqualifiedReview,
|
|
|
|
|
|
|
|
handleUnqualified
|
|
|
|
|
|
|
|
} from '@/api/qms/qcUnqualifiedReview';
|
|
|
|
import { QcUnqualifiedReviewVO, QcUnqualifiedReviewQuery, QcUnqualifiedReviewForm } from '@/api/qms/qcUnqualifiedReview/types';
|
|
|
|
import { QcUnqualifiedReviewVO, QcUnqualifiedReviewQuery, QcUnqualifiedReviewForm } from '@/api/qms/qcUnqualifiedReview/types';
|
|
|
|
import { listQcUnqualifiedRecord, getQcUnqualifiedRecord, delQcUnqualifiedRecord, addQcUnqualifiedRecord, updateQcUnqualifiedRecord } from '@/api/qms/qcUnqualifiedRecord';
|
|
|
|
import { listQcUnqualifiedRecord, getQcUnqualifiedRecord, delQcUnqualifiedRecord, addQcUnqualifiedRecord, updateQcUnqualifiedRecord } from '@/api/qms/qcUnqualifiedRecord';
|
|
|
|
import { QcUnqualifiedRecordVO, QcUnqualifiedRecordQuery, QcUnqualifiedRecordForm } from '@/api/qms/qcUnqualifiedRecord/types';
|
|
|
|
import { QcUnqualifiedRecordVO, QcUnqualifiedRecordQuery, QcUnqualifiedRecordForm } from '@/api/qms/qcUnqualifiedRecord/types';
|
|
|
@ -469,6 +476,7 @@ const buttonLoading = ref(false);
|
|
|
|
const loading = ref(true);
|
|
|
|
const loading = ref(true);
|
|
|
|
const showSearch = ref(true);
|
|
|
|
const showSearch = ref(true);
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
|
|
|
|
const inspectionNos = ref<Array<string | number>>([]);
|
|
|
|
const single = ref(true);
|
|
|
|
const single = ref(true);
|
|
|
|
const multiple = ref(true);
|
|
|
|
const multiple = ref(true);
|
|
|
|
const total = ref(0);
|
|
|
|
const total = ref(0);
|
|
|
@ -483,17 +491,17 @@ const dialog = reactive<DialogOption>({
|
|
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
// 列显隐信息
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
{ key: 0, label: `序号`, visible: true },
|
|
|
|
{ key: 0, label: `序号`, visible: false },
|
|
|
|
{ key: 1, label: `不合格检测单号`, visible: true },
|
|
|
|
{ key: 1, label: `不合格检测单号`, visible: true },
|
|
|
|
{ key: 2, label: `评审结果`, visible: true },
|
|
|
|
{ key: 2, label: `评审结果`, visible: true },
|
|
|
|
{ key: 3, label: `质检单号`, visible: true },
|
|
|
|
{ key: 3, label: `质检单号`, visible: true },
|
|
|
|
{ key: 4, label: `检测类型`, visible: true },
|
|
|
|
{ key: 4, label: `检测类型`, visible: true },
|
|
|
|
{ key: 5, label: `生产日期`, visible: true },
|
|
|
|
{ key: 5, label: `生产日期`, visible: false },
|
|
|
|
{ key: 6, label: `派工单号`, visible: true },
|
|
|
|
{ key: 6, label: `派工单号`, visible: true },
|
|
|
|
{ key: 7, label: `工序名称`, visible: true },
|
|
|
|
{ key: 7, label: `工序名称`, visible: true },
|
|
|
|
{ key: 8, label: `物料名称`, visible: true },
|
|
|
|
{ key: 8, label: `物料名称`, visible: true },
|
|
|
|
{ key: 9, label: `物料编码`, visible: true },
|
|
|
|
{ key: 9, label: `物料编码`, visible: true },
|
|
|
|
{ key: 10, label: `物料规格`, visible: true },
|
|
|
|
{ key: 10, label: `物料规格`, visible: false },
|
|
|
|
{ key: 11, label: `供应商名称`, visible: true },
|
|
|
|
{ key: 11, label: `供应商名称`, visible: true },
|
|
|
|
{ key: 12, label: `供应商编码`, visible: true },
|
|
|
|
{ key: 12, label: `供应商编码`, visible: true },
|
|
|
|
{ key: 13, label: `质检数量`, visible: true },
|
|
|
|
{ key: 13, label: `质检数量`, visible: true },
|
|
|
@ -618,6 +626,7 @@ const resetQuery = () => {
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
const handleSelectionChange = (selection: QcUnqualifiedReviewVO[]) => {
|
|
|
|
const handleSelectionChange = (selection: QcUnqualifiedReviewVO[]) => {
|
|
|
|
ids.value = selection.map(item => item.reviewId);
|
|
|
|
ids.value = selection.map(item => item.reviewId);
|
|
|
|
|
|
|
|
inspectionNos.value = selection.map(item => item.inspectionNo);
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -674,7 +683,7 @@ const handleExport = () => {
|
|
|
|
|
|
|
|
|
|
|
|
/***** 子表 */
|
|
|
|
/***** 子表 */
|
|
|
|
const selectedReviewId = ref<string | number>('');
|
|
|
|
const selectedReviewId = ref<string | number>('');
|
|
|
|
const selectedUnqualifiedReviewNo = ref<string>('');
|
|
|
|
const selectedUnqualifiedReviewNo = ref();
|
|
|
|
const qcUnqualifiedRecordList = ref<QcUnqualifiedRecordVO[]>([]);
|
|
|
|
const qcUnqualifiedRecordList = ref<QcUnqualifiedRecordVO[]>([]);
|
|
|
|
const qcUnqualifiedRecordLoading = ref(false);
|
|
|
|
const qcUnqualifiedRecordLoading = ref(false);
|
|
|
|
const qcUnqualifiedRecordTotal = ref(0);
|
|
|
|
const qcUnqualifiedRecordTotal = ref(0);
|
|
|
@ -808,33 +817,49 @@ onMounted(() => {
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getDispositionType = (reviewResult?: number) => {
|
|
|
|
|
|
|
|
switch(reviewResult) {
|
|
|
|
|
|
|
|
case 0: return '报废';
|
|
|
|
|
|
|
|
case 1: return '返工';
|
|
|
|
|
|
|
|
case 2: return '退货';
|
|
|
|
|
|
|
|
case 3: return '流转';
|
|
|
|
|
|
|
|
case 4: return '让步接收';
|
|
|
|
|
|
|
|
default: return '未知处置类型';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleReviewResult = async (reviewResult?: number) => {
|
|
|
|
|
|
|
|
const _reviewIds = ids.value;
|
|
|
|
|
|
|
|
const _inspectionNos = inspectionNos.value;
|
|
|
|
|
|
|
|
const dispositionType = getDispositionType(reviewResult);
|
|
|
|
|
|
|
|
await proxy?.$modal.confirm('是否确认' + dispositionType + '不合格品待评审编号为"' + _inspectionNos + '"的数据项?').finally(() => loading.value = false);
|
|
|
|
|
|
|
|
await handleUnqualified(reviewResult, _reviewIds);
|
|
|
|
|
|
|
|
proxy?.$modal.msgSuccess(dispositionType + '成功');
|
|
|
|
|
|
|
|
await getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 流转按钮操作 */
|
|
|
|
/** 流转按钮操作 */
|
|
|
|
const handleFlow = () => {
|
|
|
|
const handleFlow = () => {
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
handleReviewResult(3);
|
|
|
|
console.log('点击了流转按钮');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 报废按钮操作 */
|
|
|
|
/** 报废按钮操作 */
|
|
|
|
const handleScrap = () => {
|
|
|
|
const handleScrap = () => {
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
handleReviewResult(0);
|
|
|
|
console.log('点击了报废按钮');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 让步接收按钮操作 */
|
|
|
|
/** 让步接收按钮操作 */
|
|
|
|
const handleConcession = () => {
|
|
|
|
const handleConcession = () => {
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
handleReviewResult(4);
|
|
|
|
console.log('点击了让步接收按钮');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 返工按钮操作 */
|
|
|
|
/** 返工按钮操作 */
|
|
|
|
const handleRework = () => {
|
|
|
|
const handleRework = () => {
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
handleReviewResult(1);
|
|
|
|
console.log('点击了返工按钮');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 退货按钮操作 */
|
|
|
|
/** 退货按钮操作 */
|
|
|
|
const handleReturn = () => {
|
|
|
|
const handleReturn = () => {
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
handleReviewResult(2);
|
|
|
|
console.log('点击了退货按钮');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|