From 021abd8283fcfa6915622051e5042c4518aac8d4 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Wed, 19 Aug 2026 11:45:27 +0800 Subject: [PATCH] feat: split storage release list by review role and dual conclusions. Co-authored-by: Cursor --- .../storage-release-review/index.vue | 130 +++++++++++------- 1 file changed, 83 insertions(+), 47 deletions(-) diff --git a/web-admin/src/views/quality-inspection/storage-release-review/index.vue b/web-admin/src/views/quality-inspection/storage-release-review/index.vue index d5865a76..a3c2b26b 100644 --- a/web-admin/src/views/quality-inspection/storage-release-review/index.vue +++ b/web-admin/src/views/quality-inspection/storage-release-review/index.vue @@ -49,9 +49,24 @@ /> - + + + + + + {{ selectedRows.length }} 项 批量审核 - + 批量入库 @@ -235,19 +256,37 @@ + + + @@ -265,20 +304,6 @@ - - 查看 - + 审核 - - 样本入库 - @@ -322,6 +340,7 @@ v-model="reviewDialogVisible" :review-ids="reviewDialogIds" :review-items="reviewDialogItems" + :review-side="reviewRole === 'overview' ? 'qc' : reviewRole" @submitted="onReviewSubmitted" /> @@ -337,7 +356,6 @@ import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue' import { fetchStorageReleaseReviewList, - storeSample, batchStoreSample, type StorageReleaseReview } from '@/api/storage-release-review' @@ -359,6 +377,18 @@ defineOptions({ name: 'QualityInspectionStorageReleaseReview' }) + const props = defineProps<{ + reviewRole?: 'overview' | 'production' | 'qc' + }>() + + const reviewRole = computed<'overview' | 'production' | 'qc'>(() => { + const r = props.reviewRole + if (r === 'production' || r === 'qc' || r === 'overview') return r + return 'overview' + }) + + const canWrite = computed(() => reviewRole.value !== 'overview') + type ReviewTab = 'pending' | 'reviewed' const STATUS_TABS = [ @@ -403,7 +433,8 @@ const searchForm = reactive({ receptionSource: '', - reviewConclusion: '', + prodReviewConclusion: '', + qcReviewConclusion: '', storageStatus: '', keyword: '', showAllPending: false @@ -422,7 +453,12 @@ const canBatchStore = computed( () => selectedRows.value.length > 0 && - selectedRows.value.every((r) => r.reviewConclusion === 'tg' && r.storageStatus === 'drk') + selectedRows.value.every( + (r) => + r.prodReviewConclusion === 'tg' && + r.qcReviewConclusion === 'tg' && + r.storageStatus === 'drk' + ) ) async function loadData() { @@ -434,7 +470,9 @@ page: pagination.page, pageSize: pagination.pageSize, receptionSource: searchForm.receptionSource || undefined, - reviewConclusion: searchForm.reviewConclusion || undefined, + reviewSide: reviewRole.value, + prodReviewConclusion: searchForm.prodReviewConclusion || undefined, + qcReviewConclusion: searchForm.qcReviewConclusion || undefined, storageStatus: searchForm.storageStatus || undefined, keyword: searchForm.keyword || undefined, reviewPhase: activeTab.value, @@ -465,7 +503,8 @@ function handleReset() { searchForm.receptionSource = '' - searchForm.reviewConclusion = '' + searchForm.prodReviewConclusion = '' + searchForm.qcReviewConclusion = '' searchForm.storageStatus = '' searchForm.keyword = '' searchForm.showAllPending = false @@ -517,17 +556,6 @@ loadData() } - async function handleStore(row: StorageReleaseReview) { - await ElMessageBox.confirm(`确认将样本「${row.sampleCode || ''}」执行入库操作?`, '入库确认', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }) - await storeSample(String(row.id)) - ElMessage.success('入库成功') - loadData() - } - async function handleBatchStore() { if (!selectedRows.value.length) return await ElMessageBox.confirm( @@ -557,9 +585,17 @@ { debounce: 300, deep: true } ) + watch(reviewRole, () => { + pagination.page = 1 + selectedRows.value = [] + loadData() + }) + onMounted(() => { loadData() }) + + onActivated(() => loadData())