|
|
|
@ -456,7 +456,14 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<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 { listQcUnqualifiedRecord, getQcUnqualifiedRecord, delQcUnqualifiedRecord, addQcUnqualifiedRecord, updateQcUnqualifiedRecord } from '@/api/qms/qcUnqualifiedRecord';
|
|
|
|
|
import { QcUnqualifiedRecordVO, QcUnqualifiedRecordQuery, QcUnqualifiedRecordForm } from '@/api/qms/qcUnqualifiedRecord/types';
|
|
|
|
@ -469,6 +476,7 @@ const buttonLoading = ref(false);
|
|
|
|
|
const loading = ref(true);
|
|
|
|
|
const showSearch = ref(true);
|
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
|
const inspectionNos = ref<Array<string | number>>([]);
|
|
|
|
|
const single = ref(true);
|
|
|
|
|
const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
@ -618,6 +626,7 @@ const resetQuery = () => {
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
|
const handleSelectionChange = (selection: QcUnqualifiedReviewVO[]) => {
|
|
|
|
|
ids.value = selection.map(item => item.reviewId);
|
|
|
|
|
inspectionNos.value = selection.map(item => item.inspectionNo);
|
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
}
|
|
|
|
@ -808,33 +817,49 @@ onMounted(() => {
|
|
|
|
|
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 = () => {
|
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
|
console.log('点击了流转按钮');
|
|
|
|
|
handleReviewResult(3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 报废按钮操作 */
|
|
|
|
|
const handleScrap = () => {
|
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
|
console.log('点击了报废按钮');
|
|
|
|
|
handleReviewResult(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 让步接收按钮操作 */
|
|
|
|
|
const handleConcession = () => {
|
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
|
console.log('点击了让步接收按钮');
|
|
|
|
|
handleReviewResult(4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 返工按钮操作 */
|
|
|
|
|
const handleRework = () => {
|
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
|
console.log('点击了返工按钮');
|
|
|
|
|
handleReviewResult(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 退货按钮操作 */
|
|
|
|
|
const handleReturn = () => {
|
|
|
|
|
// TODO: 后续完善补充
|
|
|
|
|
console.log('点击了退货按钮');
|
|
|
|
|
handleReviewResult(2);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|