feat: show production and QC verdicts in storage release view dialog.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3388c1efdb
commit
8280e4bc24
1 file changed
+74
-20
+74
-20
@@ -51,10 +51,20 @@
|
||||
<SampleProductionInfoCards :production-info="detail?.productionInfo" />
|
||||
</template>
|
||||
|
||||
<template #review-attachments>
|
||||
<template #qc-review-attachments>
|
||||
<div class="view-section-slot">
|
||||
<ProtocolAttachmentReadonly
|
||||
:files="reviewAttachmentFiles"
|
||||
:files="qcReviewAttachmentFiles"
|
||||
@preview="handleAttachmentPreview"
|
||||
@download="handleAttachmentDownload"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #prod-review-attachments>
|
||||
<div class="view-section-slot">
|
||||
<ProtocolAttachmentReadonly
|
||||
:files="prodReviewAttachmentFiles"
|
||||
@preview="handleAttachmentPreview"
|
||||
@download="handleAttachmentDownload"
|
||||
/>
|
||||
@@ -83,6 +93,8 @@
|
||||
receptionSourceTagType,
|
||||
storageReleaseConclusionLabel,
|
||||
storageReleaseConclusionTagType,
|
||||
storageStatusLabel,
|
||||
storageStatusTagType,
|
||||
protocolStatusDisplayLabel,
|
||||
protocolStatusTagType,
|
||||
donationStatusDisplayLabel,
|
||||
@@ -139,6 +151,16 @@
|
||||
return String(v)
|
||||
}
|
||||
|
||||
function sideConclusionDisplay(code?: string) {
|
||||
const v = code || ''
|
||||
return v ? storageReleaseConclusionLabel(v) : '待审核'
|
||||
}
|
||||
|
||||
function sideConclusionTag(code?: string) {
|
||||
const v = code || ''
|
||||
return v ? storageReleaseConclusionTagType(v) : 'info'
|
||||
}
|
||||
|
||||
function protocolStatusDisplay(proto: Partial<ProtocolInfo>, source: string) {
|
||||
const status = proto.protocolStatus || ''
|
||||
const voidType = String(proto.voidType || '')
|
||||
@@ -196,15 +218,29 @@
|
||||
.filter(Boolean) as Array<Record<string, unknown>>
|
||||
})
|
||||
|
||||
const reviewAttachmentFiles = computed(() => {
|
||||
const urls = detail.value?.review?.reviewAttachments || ''
|
||||
const qcReviewAttachmentFiles = computed(() => {
|
||||
const urls = detail.value?.review?.qcReviewAttachments || ''
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u) => u.trim())
|
||||
.filter(Boolean)
|
||||
.map((fileUrl, i) => ({
|
||||
id: `att_${i}`,
|
||||
id: `att_qc_${i}`,
|
||||
fileUrl,
|
||||
fileName: fileUrl.split('/').pop() || ''
|
||||
}))
|
||||
})
|
||||
|
||||
const prodReviewAttachmentFiles = computed(() => {
|
||||
const urls = detail.value?.review?.prodReviewAttachments || ''
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u) => u.trim())
|
||||
.filter(Boolean)
|
||||
.map((fileUrl, i) => ({
|
||||
id: `att_prod_${i}`,
|
||||
fileUrl,
|
||||
fileName: fileUrl.split('/').pop() || ''
|
||||
}))
|
||||
@@ -219,14 +255,6 @@
|
||||
const source = rev.receptionSource || 'cell_storage'
|
||||
const protocolStatus = protocolStatusDisplay(proto, source)
|
||||
|
||||
const reviewConclusionValue = rev.reviewConclusion || ''
|
||||
const reviewConclusionDisplay = reviewConclusionValue
|
||||
? storageReleaseConclusionLabel(reviewConclusionValue)
|
||||
: '待审核'
|
||||
const reviewConclusionTag = reviewConclusionValue
|
||||
? storageReleaseConclusionTagType(reviewConclusionValue)
|
||||
: 'info'
|
||||
|
||||
const transportFields: ViewSection['fields'] = [
|
||||
{
|
||||
label: '运输方式',
|
||||
@@ -297,17 +325,43 @@
|
||||
fields: []
|
||||
},
|
||||
{
|
||||
title: '放行审核',
|
||||
slot: 'review-attachments',
|
||||
title: '质检放行',
|
||||
slot: 'qc-review-attachments',
|
||||
fields: [
|
||||
{
|
||||
label: '审核结论',
|
||||
value: reviewConclusionDisplay,
|
||||
tagType: reviewConclusionTag
|
||||
value: sideConclusionDisplay(rev.qcReviewConclusion),
|
||||
tagType: sideConclusionTag(rev.qcReviewConclusion)
|
||||
},
|
||||
{ label: '审核人', value: rev.reviewByName || '—' },
|
||||
{ label: '审核时间', value: rev.reviewTime || '—' },
|
||||
{ label: '审核备注', value: rev.reviewRemark || '—', span: true }
|
||||
{ label: '审核人', value: rev.qcReviewByName || '—' },
|
||||
{ label: '审核时间', value: rev.qcReviewTime || '—' },
|
||||
{ label: '审核备注', value: rev.qcReviewRemark || '—', span: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '生产放行',
|
||||
slot: 'prod-review-attachments',
|
||||
fields: [
|
||||
{
|
||||
label: '审核结论',
|
||||
value: sideConclusionDisplay(rev.prodReviewConclusion),
|
||||
tagType: sideConclusionTag(rev.prodReviewConclusion)
|
||||
},
|
||||
{ label: '审核人', value: rev.prodReviewByName || '—' },
|
||||
{ label: '审核时间', value: rev.prodReviewTime || '—' },
|
||||
{ label: '审核备注', value: rev.prodReviewRemark || '—', span: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '入库',
|
||||
fields: [
|
||||
{
|
||||
label: '入库状态',
|
||||
value: storageStatusLabel(rev.storageStatus || 'drk'),
|
||||
tagType: storageStatusTagType(rev.storageStatus || 'drk')
|
||||
},
|
||||
{ label: '入库人', value: rev.storageByName || '—' },
|
||||
{ label: '入库时间', value: rev.storageTime || '—' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user