提交
This commit is contained in:
1 parent
8ff159c251
commit
c1832f9d03
60 files changed
+13400
-10821
No files matched your search
+9
-391
@@ -59,121 +59,10 @@
|
||||
</template>
|
||||
|
||||
<template #outbound-material>
|
||||
<div class="view-section-slot outbound-material-view">
|
||||
<div v-if="!hasOutboundMaterial" class="outbound-material-empty">暂无出库物料准备记录</div>
|
||||
<template v-else>
|
||||
<div v-if="outboundMaterialCells.length" class="outbound-material-block">
|
||||
<h4 class="outbound-material-subtitle">出库细胞</h4>
|
||||
<el-table :data="outboundMaterialCells" class="list-table inner-table" stripe size="small">
|
||||
<el-table-column type="index" label="序号" min-width="56" align="center" />
|
||||
<el-table-column prop="productCode" label="产品编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="productName" label="产品名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="productTypeName" label="类型" min-width="90" />
|
||||
<el-table-column prop="specName" label="规格" min-width="90" />
|
||||
<el-table-column prop="storageSlotName" label="储物格" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column label="状态" min-width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag
|
||||
v-if="row.productStatus"
|
||||
:type="cellProductStatusTagType(row.productStatus) as any"
|
||||
size="small"
|
||||
>
|
||||
{{ cellProductStatusLabel(row.productStatus) }}
|
||||
</el-tag>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-if="outboundMaterialQcRows.length" class="outbound-material-block">
|
||||
<h4 class="outbound-material-subtitle">使用的物料</h4>
|
||||
<el-table :data="outboundMaterialQcRows" class="list-table inner-table" stripe size="small">
|
||||
<el-table-column type="index" label="序号" min-width="56" align="center" />
|
||||
<el-table-column prop="materialName" label="物料名称" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="specModel" label="规格型号" min-width="110" />
|
||||
<el-table-column label="计划用量" min-width="100" align="center">
|
||||
<template #default="{ row }">{{ row.qty ?? '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" min-width="72" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-if="outboundPaperRows.length" class="outbound-material-block">
|
||||
<h4 class="outbound-material-subtitle">其他纸质材料</h4>
|
||||
<el-table :data="outboundPaperRows" class="list-table inner-table" stripe size="small">
|
||||
<el-table-column type="index" label="序号" min-width="56" align="center" />
|
||||
<el-table-column prop="paperName" label="名称" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="份数" min-width="80" align="center">
|
||||
<template #default="{ row }">{{ row.copies ?? '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" min-width="320">
|
||||
<template #default="{ row }">
|
||||
<div v-if="parsePaperAttachments(row.attachmentUrl).length" class="paper-att-cards">
|
||||
<div
|
||||
v-for="(att, attIdx) in parsePaperAttachments(row.attachmentUrl)"
|
||||
:key="attIdx"
|
||||
class="paper-att-card"
|
||||
:class="{
|
||||
'paper-att-card--image': isImageFile(att),
|
||||
'paper-att-card--video': isVideoFile(att)
|
||||
}"
|
||||
:title="att.fileName"
|
||||
>
|
||||
<div
|
||||
class="paper-att-card__preview"
|
||||
:class="{
|
||||
'is-clickable': isImageFile(att) || isVideoFile(att)
|
||||
}"
|
||||
@click="
|
||||
(isImageFile(att) || isVideoFile(att)) &&
|
||||
handlePreviewPaperAttachment(att)
|
||||
"
|
||||
>
|
||||
<img
|
||||
v-if="isImageFile(att)"
|
||||
:src="attachmentFullUrl(att.attachmentUrl)"
|
||||
:alt="att.fileName || '附件'"
|
||||
/>
|
||||
<template v-else-if="isVideoFile(att)">
|
||||
<div class="paper-att-card__type-icon paper-att-card__type-icon--video">
|
||||
<el-icon><VideoPlay /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon class="paper-att-card__type-icon paper-att-card__type-icon--doc">
|
||||
<Document />
|
||||
</el-icon>
|
||||
<span class="paper-att-card__name">{{ att.fileName || '附件' }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<div class="paper-att-card__actions">
|
||||
<el-icon
|
||||
v-if="isImageFile(att) || isVideoFile(att)"
|
||||
class="paper-att-card__action"
|
||||
title="预览"
|
||||
@click.stop="handlePreviewPaperAttachment(att)"
|
||||
>
|
||||
<View />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="paper-att-card__action"
|
||||
title="下载"
|
||||
@click.stop="handleDownloadPaperAttachment(att)"
|
||||
>
|
||||
<Download />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<p v-if="outboundMaterialRemark" class="outbound-material-remark">
|
||||
备注:{{ outboundMaterialRemark }}
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
<OutboundMaterialReadonlyPanel
|
||||
:material="detail?.outboundMaterial"
|
||||
:biz-type="scheduleBizType"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #payment-info>
|
||||
@@ -208,40 +97,16 @@
|
||||
</div>
|
||||
</template>
|
||||
</SystemViewDialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="previewVisible"
|
||||
title="文件预览"
|
||||
width="800px"
|
||||
align-center
|
||||
destroy-on-close
|
||||
append-to-body
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div v-if="previewType === 'image'" class="preview-container">
|
||||
<img
|
||||
:src="previewUrl"
|
||||
alt="预览"
|
||||
style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="preview-container">
|
||||
<video
|
||||
:src="previewUrl"
|
||||
controls
|
||||
style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { Document, Download, View, VideoPlay } from '@element-plus/icons-vue'
|
||||
import { Document } from '@element-plus/icons-vue'
|
||||
import SystemViewDialog, {
|
||||
type ViewSection,
|
||||
type TagType
|
||||
} from '@/components/business/system-view-dialog/index.vue'
|
||||
import OutboundMaterialReadonlyPanel from '@/components/business/outbound-material-readonly-panel/index.vue'
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
@@ -261,14 +126,13 @@
|
||||
qcStatusLabel,
|
||||
qcStatusTagType,
|
||||
infusionMethodLabel,
|
||||
cellProductStatusLabel,
|
||||
cellProductStatusTagType,
|
||||
sexLabel
|
||||
} from '@/utils/status-tag-registry'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { maskIdCard } from '@/utils/mask-sensitive'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { getPilotBizConfig } from '@/config/pilot-biz-type'
|
||||
import { resolveOutboundViewVariant } from '@/utils/outbound-qc-pilot-view-sections'
|
||||
|
||||
defineOptions({ name: 'ScheduleViewDialog' })
|
||||
|
||||
@@ -285,16 +149,6 @@
|
||||
|
||||
const loading = ref(false)
|
||||
const detail = ref<Record<string, any> | null>(null)
|
||||
const previewVisible = ref(false)
|
||||
const previewUrl = ref('')
|
||||
const previewType = ref<'image' | 'video'>('image')
|
||||
|
||||
type PaperAttachmentView = {
|
||||
fileName: string
|
||||
attachmentUrl: string
|
||||
fileUrl: string
|
||||
fileType?: string
|
||||
}
|
||||
|
||||
const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
@@ -329,37 +183,8 @@
|
||||
detail.value?.bizType === 'basic_experiment'
|
||||
)
|
||||
|
||||
const outboundMaterial = computed(() => detail.value?.outboundMaterial || null)
|
||||
const outboundMaterialCells = computed(() => outboundMaterial.value?.cells || [])
|
||||
const outboundMaterialQcRows = computed(() => outboundMaterial.value?.qcMaterials || [])
|
||||
const outboundMaterialRemark = computed(() => outboundMaterial.value?.remark || '')
|
||||
const outboundPaperRows = computed(() => {
|
||||
const materials = outboundMaterial.value?.paperMaterials || []
|
||||
if (materials.length) {
|
||||
return materials.map((p: Record<string, any>) => ({
|
||||
paperName: p.paperName || '',
|
||||
copies: p.copies,
|
||||
attachmentUrl: p.attachmentUrl || ''
|
||||
}))
|
||||
}
|
||||
const urls = outboundMaterial.value?.paperAttachments || ''
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u: string) => u.trim())
|
||||
.filter(Boolean)
|
||||
.map((attachmentUrl: string) => ({
|
||||
paperName: paperAttachmentName(attachmentUrl),
|
||||
copies: 1,
|
||||
attachmentUrl
|
||||
}))
|
||||
})
|
||||
const hasOutboundMaterial = computed(
|
||||
() =>
|
||||
outboundMaterialCells.value.length > 0 ||
|
||||
outboundMaterialQcRows.value.length > 0 ||
|
||||
outboundPaperRows.value.length > 0 ||
|
||||
!!outboundMaterialRemark.value.trim()
|
||||
const scheduleBizType = computed(() =>
|
||||
resolveOutboundViewVariant(detail.value?.application?.bizType || detail.value?.bizType)
|
||||
)
|
||||
|
||||
const reviewAttachmentFiles = computed(() => {
|
||||
@@ -678,65 +503,6 @@
|
||||
]
|
||||
})
|
||||
|
||||
function paperAttachmentName(url: string) {
|
||||
return url.split('/').pop() || '附件'
|
||||
}
|
||||
|
||||
function splitUrls(str: string): string[] {
|
||||
if (!str?.trim()) return []
|
||||
return str
|
||||
.split(',')
|
||||
.map((u) => u.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
|
||||
function parsePaperAttachments(urlStr: string): PaperAttachmentView[] {
|
||||
return splitUrls(urlStr).map((url) => ({
|
||||
fileName: paperAttachmentName(url),
|
||||
attachmentUrl: url,
|
||||
fileUrl: url
|
||||
}))
|
||||
}
|
||||
|
||||
function isImageFile(file: PaperAttachmentView) {
|
||||
const url = (file.fileUrl || file.attachmentUrl || '').toLowerCase()
|
||||
const name = (file.fileName || '').toLowerCase()
|
||||
return (
|
||||
/\.(jpg|jpeg|png|gif|bmp|webp|svg)(\?|$)/.test(url) ||
|
||||
/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/.test(name) ||
|
||||
(file.fileType || '').startsWith('image/')
|
||||
)
|
||||
}
|
||||
|
||||
function isVideoFile(file: PaperAttachmentView) {
|
||||
const url = (file.fileUrl || file.attachmentUrl || '').toLowerCase()
|
||||
const name = (file.fileName || '').toLowerCase()
|
||||
return (
|
||||
/\.(mp4|webm|ogg|mov|avi)(\?|$)/.test(url) ||
|
||||
/\.(mp4|webm|ogg|mov|avi)$/.test(name) ||
|
||||
(file.fileType || '').startsWith('video/')
|
||||
)
|
||||
}
|
||||
|
||||
function handlePreviewPaperAttachment(att: PaperAttachmentView) {
|
||||
if (!att.attachmentUrl) return
|
||||
previewUrl.value = attachmentFullUrl(att.attachmentUrl)
|
||||
previewType.value = isVideoFile(att) ? 'video' : 'image'
|
||||
previewVisible.value = true
|
||||
}
|
||||
|
||||
function handleDownloadPaperAttachment(att: PaperAttachmentView) {
|
||||
if (!att.attachmentUrl) return
|
||||
downloadAttachmentFile(
|
||||
{
|
||||
fileName: att.fileName,
|
||||
fileUrl: att.attachmentUrl,
|
||||
fileType: att.fileType || ''
|
||||
},
|
||||
{ fullFileUrl: attachmentFullUrl }
|
||||
)
|
||||
}
|
||||
|
||||
function attachmentFullUrl(url: string) {
|
||||
const u = String(url || '').trim()
|
||||
if (!u) return ''
|
||||
@@ -832,152 +598,4 @@
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.outbound-material-view {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.outbound-material-empty {
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
}
|
||||
|
||||
.outbound-material-block {
|
||||
margin-bottom: 16px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.outbound-material-subtitle {
|
||||
margin: 0 0 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
}
|
||||
|
||||
.outbound-material-remark {
|
||||
margin: 12px 0 0;
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
}
|
||||
|
||||
.paper-att-cards {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.paper-att-card {
|
||||
width: 100px;
|
||||
height: 72px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
background: #f8fafc;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.paper-att-card__preview {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px 4px;
|
||||
overflow: hidden;
|
||||
|
||||
&.is-clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.paper-att-card--image,
|
||||
.paper-att-card--video {
|
||||
.paper-att-card__preview {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.paper-att-card__type-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&--doc {
|
||||
color: #0284c7;
|
||||
}
|
||||
|
||||
&--video {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
background: #ede9fe;
|
||||
color: #7c3aed;
|
||||
font-size: 20px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.paper-att-card__name {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
color: #334155;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.paper-att-card__actions {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.paper-att-card:hover .paper-att-card__actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.paper-att-card__action {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #047857;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
+23
-5
@@ -42,10 +42,22 @@
|
||||
<el-tag v-else type="info" size="small">待审核</el-tag>
|
||||
</div>
|
||||
<dl class="outbound-release-review-card__meta">
|
||||
<div class="outbound-release-review-card__meta-item">
|
||||
<dt>患者姓名</dt>
|
||||
<dd>{{ row.patientName || '—' }}</dd>
|
||||
</div>
|
||||
<template v-if="showPatient">
|
||||
<div class="outbound-release-review-card__meta-item">
|
||||
<dt>患者姓名</dt>
|
||||
<dd>{{ row.patientName || '—' }}</dd>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="outbound-release-review-card__meta-item">
|
||||
<dt>课题名称</dt>
|
||||
<dd>{{ row.projectTitle || '—' }}</dd>
|
||||
</div>
|
||||
<div class="outbound-release-review-card__meta-item">
|
||||
<dt>客户名称</dt>
|
||||
<dd>{{ row.customerName || '—' }}</dd>
|
||||
</div>
|
||||
</template>
|
||||
<div class="outbound-release-review-card__meta-item">
|
||||
<dt>{{ pickupTimeLabel }}</dt>
|
||||
<dd>{{ row.infusionTime || '—' }}</dd>
|
||||
@@ -97,7 +109,7 @@
|
||||
:type="productStatusTagType(product.productStatus) as any"
|
||||
size="small"
|
||||
>
|
||||
{{ productStatusLabel(product.productStatus) }}
|
||||
{{ productStatusLabel(product.productStatus, bizType) }}
|
||||
</el-tag>
|
||||
<span v-else>—</span>
|
||||
</dd>
|
||||
@@ -175,8 +187,14 @@
|
||||
total: number
|
||||
selectedIds: string[]
|
||||
pickupTimeLabel: string
|
||||
/** 中试/临床展示患者;基础实验展示课题与客户 */
|
||||
showPatient?: boolean
|
||||
bizType?: string
|
||||
}>()
|
||||
|
||||
const showPatient = computed(() => props.showPatient !== false)
|
||||
const bizType = computed(() => props.bizType || '')
|
||||
|
||||
const emit = defineEmits<{
|
||||
view: [row: OutboundReleaseReview]
|
||||
material: [row: OutboundReleaseReview]
|
||||
|
||||
+101
-21
@@ -47,7 +47,10 @@
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="review-context-grid">
|
||||
<dl
|
||||
class="review-context-grid"
|
||||
:class="{ 'review-context-grid--cols3': reviewBizType === 'basic_experiment' }"
|
||||
>
|
||||
<div
|
||||
v-for="item in reviewContextItems"
|
||||
:key="item.label"
|
||||
@@ -216,6 +219,7 @@
|
||||
fetchOutboundReleaseReviewDetail,
|
||||
submitOutboundReleaseReview,
|
||||
batchReviewOutboundRelease,
|
||||
type OutboundReleaseReview,
|
||||
type OutboundReleaseReviewDetail
|
||||
} from '@/api/outbound-release-review'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
@@ -241,6 +245,8 @@
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
scheduleIds: string[]
|
||||
/** 列表行数据,单条审核时用于弹窗打开瞬间展示上下文 */
|
||||
contextRow?: OutboundReleaseReview | null
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -282,23 +288,76 @@
|
||||
qcStatusTagType(singleDetail.value?.infusionSchedule?.qcStatus || '')
|
||||
)
|
||||
|
||||
function normalizeDisplayValue(v?: string | null) {
|
||||
const s = String(v ?? '').trim()
|
||||
if (!s || s === '-' || s === '—') return ''
|
||||
return s
|
||||
}
|
||||
|
||||
function uniqueJoined(values: Array<string | undefined | null>) {
|
||||
const items = [...new Set(values.map((v) => String(v || '').trim()).filter(Boolean))]
|
||||
const items = [...new Set(values.map((v) => normalizeDisplayValue(v)).filter(Boolean))]
|
||||
return items.length ? items.join('、') : '—'
|
||||
}
|
||||
|
||||
function resolveReviewCellType(detail: OutboundReleaseReviewDetail | null) {
|
||||
if (!detail) return '—'
|
||||
const planType = detail.infusionPlan?.cellType?.trim()
|
||||
const fromProducts = uniqueJoined((detail.products || []).map((p) => p.cellTypeName))
|
||||
if (fromProducts !== '—') return fromProducts
|
||||
|
||||
const scheduleType = normalizeDisplayValue(detail.infusionSchedule?.cellType)
|
||||
if (scheduleType) return scheduleType
|
||||
|
||||
const planType = normalizeDisplayValue(detail.infusionPlan?.cellType)
|
||||
if (planType) return planType
|
||||
return uniqueJoined((detail.products || []).map((p) => p.cellTypeName))
|
||||
|
||||
return '—'
|
||||
}
|
||||
|
||||
function resolveReviewSpecText(detail: OutboundReleaseReviewDetail | null) {
|
||||
if (!detail) return '—'
|
||||
const planSpec = detail.infusionPlan?.specText?.trim()
|
||||
const fromProducts = uniqueJoined((detail.products || []).map((p) => p.specText))
|
||||
if (fromProducts !== '—') return fromProducts
|
||||
|
||||
const scheduleSpec = normalizeDisplayValue(detail.infusionSchedule?.specText)
|
||||
if (scheduleSpec) return scheduleSpec
|
||||
|
||||
const planSpec = normalizeDisplayValue(detail.infusionPlan?.specText)
|
||||
if (planSpec) return planSpec
|
||||
return uniqueJoined((detail.products || []).map((p) => p.specText))
|
||||
|
||||
return '—'
|
||||
}
|
||||
|
||||
function buildDetailFromListRow(row: OutboundReleaseReview): OutboundReleaseReviewDetail {
|
||||
return {
|
||||
application: {
|
||||
applicationNo: row.applicationNo,
|
||||
bizType: row.bizType,
|
||||
bizTypeLabel: row.bizTypeLabel,
|
||||
projectTitle: row.projectTitle,
|
||||
customerName: row.customerName
|
||||
},
|
||||
patient: {
|
||||
patientName: row.patientName
|
||||
},
|
||||
infusionSchedule: {
|
||||
scheduleStatus: row.scheduleStatus,
|
||||
qcStatus: row.qcStatus,
|
||||
infusionTime: row.infusionTime,
|
||||
cellType: row.cellType,
|
||||
specText: row.specText
|
||||
},
|
||||
products: row.products
|
||||
}
|
||||
}
|
||||
|
||||
function resolveReviewQuantity(detail: OutboundReleaseReviewDetail | null) {
|
||||
if (!detail) return '—'
|
||||
const products = detail.products || []
|
||||
if (!products.length) return '—'
|
||||
if (products.length === 1 && products[0].quantity != null) {
|
||||
return String(products[0].quantity)
|
||||
}
|
||||
return uniqueJoined(products.map((p) => (p.quantity != null ? String(p.quantity) : '')))
|
||||
}
|
||||
|
||||
const reviewContextItems = computed(() => {
|
||||
@@ -306,23 +365,28 @@
|
||||
if (!d) return [] as Array<{ label: string; value: string; span?: boolean }>
|
||||
const pickupLabel = reviewBizConfig.value.pickupTimeLabel
|
||||
const isBasicExperiment = reviewBizType.value === 'basic_experiment'
|
||||
|
||||
if (isBasicExperiment) {
|
||||
return [
|
||||
{ label: '课题名称', value: d.application?.projectTitle || '—' },
|
||||
{ label: '客户名称', value: d.application?.customerName || '—' },
|
||||
{ label: '细胞类型', value: resolveReviewCellType(d) },
|
||||
{ label: '规格', value: resolveReviewSpecText(d) },
|
||||
{ label: '细胞数量', value: resolveReviewQuantity(d) },
|
||||
{ label: pickupLabel, value: d.infusionSchedule?.infusionTime || '—' }
|
||||
]
|
||||
}
|
||||
|
||||
const items: Array<{ label: string; value: string; span?: boolean }> = [
|
||||
{ label: '患者姓名', value: d.patient?.patientName || '—' },
|
||||
{ label: '细胞类型', value: resolveReviewCellType(d) },
|
||||
{ label: '规格', value: resolveReviewSpecText(d) },
|
||||
{ label: pickupLabel, value: d.infusionSchedule?.infusionTime || '—' }
|
||||
]
|
||||
if (!isBasicExperiment) {
|
||||
items.push(
|
||||
{ label: '输注地点', value: d.infusionSchedule?.infusionLocation || '—' },
|
||||
{ label: '渠道名称', value: d.application?.channelName || '—' }
|
||||
)
|
||||
} else {
|
||||
items.push(
|
||||
{ label: '课题名称', value: d.application?.projectTitle || '—', span: true },
|
||||
{ label: '客户名称', value: d.application?.customerName || '—' }
|
||||
)
|
||||
}
|
||||
items.push(
|
||||
{ label: '输注地点', value: d.infusionSchedule?.infusionLocation || '—' },
|
||||
{ label: '渠道名称', value: d.application?.channelName || '—' }
|
||||
)
|
||||
return items
|
||||
})
|
||||
|
||||
@@ -423,18 +487,23 @@
|
||||
}
|
||||
|
||||
watch(
|
||||
() => [props.modelValue, props.scheduleIds] as const,
|
||||
async ([vis, ids]) => {
|
||||
() => [props.modelValue, props.scheduleIds, props.contextRow] as const,
|
||||
async ([vis, ids, contextRow]) => {
|
||||
if (!vis || !ids.length) {
|
||||
singleDetail.value = null
|
||||
return
|
||||
}
|
||||
if (ids.length === 1) {
|
||||
if (contextRow) {
|
||||
singleDetail.value = buildDetailFromListRow(contextRow)
|
||||
}
|
||||
try {
|
||||
singleDetail.value = await fetchOutboundReleaseReviewDetail(ids[0])
|
||||
} catch {
|
||||
singleDetail.value = null
|
||||
singleDetail.value = contextRow ? buildDetailFromListRow(contextRow) : null
|
||||
}
|
||||
} else {
|
||||
singleDetail.value = null
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -560,6 +629,10 @@
|
||||
gap: 12px 20px;
|
||||
margin: 0;
|
||||
padding: 14px 16px 16px;
|
||||
|
||||
&--cols3 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.review-context-kv {
|
||||
@@ -588,8 +661,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.review-context-grid--cols3 {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.review-context-grid {
|
||||
.review-context-grid,
|
||||
.review-context-grid--cols3 {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-399
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<template #product-table>
|
||||
<OutboundQcProductTable :products="viewProducts" />
|
||||
<OutboundQcProductTable :products="viewProducts" :biz-type="effectiveBizType" />
|
||||
</template>
|
||||
|
||||
<template #production-info>
|
||||
@@ -48,196 +48,19 @@
|
||||
</template>
|
||||
|
||||
<template #outbound-material>
|
||||
<div class="outbound-material-view">
|
||||
<p v-if="!hasOutboundMaterial" class="view-empty-hint">暂无出库物料准备记录</p>
|
||||
<template v-else>
|
||||
<div v-if="outboundMaterialCells.length" class="outbound-material-block">
|
||||
<div class="section-subtitle">出库细胞</div>
|
||||
<div class="view-subtable-wrap">
|
||||
<el-table
|
||||
:data="outboundMaterialCells"
|
||||
stripe
|
||||
class="list-table view-subtable"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="productCode"
|
||||
label="产品编码"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="productName"
|
||||
label="产品名称"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="productTypeName" label="类型" min-width="90" />
|
||||
<el-table-column prop="specName" label="规格" min-width="90" />
|
||||
<el-table-column
|
||||
prop="storageSlotName"
|
||||
label="储物格"
|
||||
min-width="130"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" min-width="90" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag
|
||||
v-if="row.productStatus"
|
||||
:type="cellProductStatusTagType(row.productStatus) as any"
|
||||
size="small"
|
||||
>
|
||||
{{ cellProductStatusLabel(row.productStatus) }}
|
||||
</el-tag>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="outboundMaterialQcRows.length" class="outbound-material-block">
|
||||
<div class="section-subtitle">使用的物料</div>
|
||||
<div class="view-subtable-wrap">
|
||||
<el-table
|
||||
:data="outboundMaterialQcRows"
|
||||
stripe
|
||||
class="list-table view-subtable"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="materialName"
|
||||
label="物料名称"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="specModel" label="规格型号" min-width="110" />
|
||||
<el-table-column label="计划用量" min-width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">{{ row.qty ?? '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="unit"
|
||||
label="单位"
|
||||
min-width="72"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="outboundPaperRows.length" class="outbound-material-block">
|
||||
<div class="section-subtitle">其他纸质材料</div>
|
||||
<div class="view-subtable-wrap">
|
||||
<el-table
|
||||
:data="outboundPaperRows"
|
||||
stripe
|
||||
class="list-table view-subtable"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="paperName"
|
||||
label="名称"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="份数" min-width="80" align="center" header-align="center">
|
||||
<template #default="{ row }">{{ row.copies ?? '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" min-width="320">
|
||||
<template #default="{ row }">
|
||||
<div v-if="parsePaperAttachments(row.attachmentUrl).length" class="paper-att-cards">
|
||||
<div
|
||||
v-for="(att, attIdx) in parsePaperAttachments(row.attachmentUrl)"
|
||||
:key="attIdx"
|
||||
class="paper-att-card"
|
||||
>
|
||||
<el-icon class="paper-att-card__icon"><Document /></el-icon>
|
||||
<span class="paper-att-card__name" :title="att.fileName">{{
|
||||
att.fileName || '附件'
|
||||
}}</span>
|
||||
<div class="paper-att-card__actions">
|
||||
<el-icon
|
||||
v-if="isImageFile(att)"
|
||||
class="paper-att-card__action"
|
||||
title="预览"
|
||||
@click="handlePreviewPaperAttachment(att)"
|
||||
>
|
||||
<View />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="paper-att-card__action"
|
||||
title="下载"
|
||||
@click="handleDownloadPaperAttachment(att)"
|
||||
>
|
||||
<Download />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="outboundMaterialRemark" class="outbound-material-remark">
|
||||
备注:{{ outboundMaterialRemark }}
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
<OutboundMaterialReadonlyPanel
|
||||
:material="detail?.outboundMaterial"
|
||||
:biz-type="effectiveBizType"
|
||||
/>
|
||||
</template>
|
||||
</SystemViewDialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="previewVisible"
|
||||
title="文件预览"
|
||||
width="800px"
|
||||
align-center
|
||||
destroy-on-close
|
||||
append-to-body
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div v-if="previewType === 'image'" class="preview-container">
|
||||
<img
|
||||
:src="previewUrl"
|
||||
alt="预览"
|
||||
style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="preview-container">
|
||||
<video
|
||||
:src="previewUrl"
|
||||
controls
|
||||
style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CircleCheck, Document, Download, View } from '@element-plus/icons-vue'
|
||||
import { CircleCheck } from '@element-plus/icons-vue'
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import type { ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import OutboundMaterialReadonlyPanel from '@/components/business/outbound-material-readonly-panel/index.vue'
|
||||
import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import OutboundQcDiagnosisAttachments from '@/views/quality-inspection/qc-work-order/view-dialogs/OutboundQcDiagnosisAttachments.vue'
|
||||
@@ -249,9 +72,7 @@
|
||||
} from '@/api/outbound-release-review'
|
||||
import {
|
||||
storageReleaseConclusionLabel,
|
||||
storageReleaseConclusionTagType,
|
||||
cellProductStatusLabel,
|
||||
cellProductStatusTagType
|
||||
storageReleaseConclusionTagType
|
||||
} from '@/utils/status-tag-registry'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import {
|
||||
@@ -278,16 +99,9 @@
|
||||
|
||||
const loading = ref(false)
|
||||
const detail = ref<OutboundReleaseReviewDetail | null>(null)
|
||||
const previewVisible = ref(false)
|
||||
const previewUrl = ref('')
|
||||
const previewType = ref<'image' | 'video'>('image')
|
||||
|
||||
type PaperAttachmentView = {
|
||||
fileName: string
|
||||
attachmentUrl: string
|
||||
fileUrl: string
|
||||
fileType?: string
|
||||
}
|
||||
const effectiveBizType = computed(() =>
|
||||
resolveOutboundViewVariant(detail.value?.application?.bizType || props.bizType)
|
||||
)
|
||||
|
||||
const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
@@ -349,98 +163,6 @@
|
||||
}))
|
||||
})
|
||||
|
||||
const outboundMaterial = computed(() => detail.value?.outboundMaterial || null)
|
||||
const outboundMaterialCells = computed(() => outboundMaterial.value?.cells || [])
|
||||
const outboundMaterialQcRows = computed(() => outboundMaterial.value?.qcMaterials || [])
|
||||
const outboundMaterialRemark = computed(() => outboundMaterial.value?.remark || '')
|
||||
const outboundPaperRows = computed(() => {
|
||||
const materials = outboundMaterial.value?.paperMaterials || []
|
||||
if (materials.length) {
|
||||
return materials.map((p) => ({
|
||||
paperName: p.paperName || '',
|
||||
copies: p.copies,
|
||||
attachmentUrl: p.attachmentUrl || ''
|
||||
}))
|
||||
}
|
||||
const urls = outboundMaterial.value?.paperAttachments || ''
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u) => u.trim())
|
||||
.filter(Boolean)
|
||||
.map((attachmentUrl) => ({
|
||||
paperName: paperAttachmentName(attachmentUrl),
|
||||
copies: 1,
|
||||
attachmentUrl
|
||||
}))
|
||||
})
|
||||
const hasOutboundMaterial = computed(
|
||||
() =>
|
||||
outboundMaterialCells.value.length > 0 ||
|
||||
outboundMaterialQcRows.value.length > 0 ||
|
||||
outboundPaperRows.value.length > 0 ||
|
||||
!!outboundMaterialRemark.value.trim()
|
||||
)
|
||||
|
||||
function paperAttachmentName(url: string) {
|
||||
return url.split('/').pop() || '附件'
|
||||
}
|
||||
|
||||
function splitUrls(str: string): string[] {
|
||||
if (!str?.trim()) return []
|
||||
return str
|
||||
.split(',')
|
||||
.map((u) => u.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
|
||||
function parsePaperAttachments(urlStr: string): PaperAttachmentView[] {
|
||||
return splitUrls(urlStr).map((url) => ({
|
||||
fileName: paperAttachmentName(url),
|
||||
attachmentUrl: url,
|
||||
fileUrl: url
|
||||
}))
|
||||
}
|
||||
|
||||
function isImageFile(file: PaperAttachmentView) {
|
||||
const url = (file.fileUrl || file.attachmentUrl || '').toLowerCase()
|
||||
const name = (file.fileName || '').toLowerCase()
|
||||
return (
|
||||
/\.(jpg|jpeg|png|gif|bmp|webp|svg)(\?|$)/.test(url) ||
|
||||
/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/.test(name) ||
|
||||
(file.fileType || '').startsWith('image/')
|
||||
)
|
||||
}
|
||||
|
||||
function isVideoFile(file: PaperAttachmentView) {
|
||||
const url = (file.fileUrl || file.attachmentUrl || '').toLowerCase()
|
||||
const name = (file.fileName || '').toLowerCase()
|
||||
return (
|
||||
/\.(mp4|webm|ogg|mov|avi)(\?|$)/.test(url) ||
|
||||
/\.(mp4|webm|ogg|mov|avi)$/.test(name) ||
|
||||
(file.fileType || '').startsWith('video/')
|
||||
)
|
||||
}
|
||||
|
||||
function handlePreviewPaperAttachment(att: PaperAttachmentView) {
|
||||
if (!att.attachmentUrl) return
|
||||
previewUrl.value = attachmentFullUrl(att.attachmentUrl)
|
||||
previewType.value = isVideoFile(att) ? 'video' : 'image'
|
||||
previewVisible.value = true
|
||||
}
|
||||
|
||||
function handleDownloadPaperAttachment(att: PaperAttachmentView) {
|
||||
if (!att.attachmentUrl) return
|
||||
downloadAttachmentFile(
|
||||
{
|
||||
fileName: att.fileName,
|
||||
fileUrl: att.attachmentUrl,
|
||||
fileType: att.fileType || ''
|
||||
},
|
||||
{ fullFileUrl: attachmentFullUrl }
|
||||
)
|
||||
}
|
||||
|
||||
/** 兼容旧版嵌套 pilotContext;新版详情已与 OutboundReleaseReviewDetail 展平一致 */
|
||||
function resolvePilotDetail(d: OutboundReleaseReviewDetail) {
|
||||
const nested = (d as { pilotContext?: OutboundReleaseReviewDetail }).pilotContext
|
||||
@@ -531,114 +253,4 @@
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.outbound-material-view {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.outbound-material-block {
|
||||
margin-bottom: 16px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.section-subtitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0 10px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #334155;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
background: #047857;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.outbound-material-remark {
|
||||
margin: 12px 0 0;
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
}
|
||||
|
||||
.paper-att-cards {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.paper-att-card {
|
||||
width: 100px;
|
||||
height: 72px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
background: #f8fafc;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px 4px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.paper-att-card__icon {
|
||||
color: #0284c7;
|
||||
font-size: 18px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.paper-att-card__name {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
color: #334155;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.paper-att-card__actions {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.paper-att-card:hover .paper-att-card__actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.paper-att-card__action {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #047857;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-form :model="searchForm" class="filter-form" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input v-model="searchForm.keyword" placeholder="申请单号/患者姓名" clearable />
|
||||
<el-input v-model="searchForm.keyword" :placeholder="keywordPlaceholder" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核结论">
|
||||
<el-select
|
||||
@@ -42,9 +42,7 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint"
|
||||
>支持按申请单号、患者姓名搜索。</span
|
||||
>
|
||||
<span class="filter-hint">{{ filterHint }}</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
@@ -82,6 +80,8 @@
|
||||
:total="pagination.total"
|
||||
:selected-ids="selectedIds"
|
||||
:pickup-time-label="pickupTimeLabel"
|
||||
:show-patient="bizConfig.showPatient"
|
||||
:biz-type="effectiveBizType"
|
||||
@toggle-select="handleToggleSelect"
|
||||
@card-dblclick="handleView"
|
||||
@view="handleView"
|
||||
@@ -100,6 +100,7 @@
|
||||
<OutboundReleaseReviewDialog
|
||||
v-model="reviewDialogVisible"
|
||||
:schedule-ids="reviewDialogIds"
|
||||
:context-row="reviewContextRow"
|
||||
@submitted="onReviewSubmitted"
|
||||
/>
|
||||
|
||||
@@ -137,6 +138,15 @@
|
||||
const effectiveBizType = computed(() => resolvePilotBizType(props.bizType))
|
||||
const bizConfig = computed(() => getPilotBizConfig(effectiveBizType.value))
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const isBasicExperiment = computed(() => effectiveBizType.value === 'basic_experiment')
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名'
|
||||
)
|
||||
const filterHint = computed(() =>
|
||||
isBasicExperiment.value
|
||||
? '支持按申请单号、课题名称、客户名称搜索。'
|
||||
: '支持按申请单号、患者姓名搜索。'
|
||||
)
|
||||
|
||||
const reviewConclusionOptions = [
|
||||
{ value: 'tg', label: '通过' },
|
||||
@@ -216,6 +226,7 @@
|
||||
|
||||
const reviewDialogVisible = ref(false)
|
||||
const reviewDialogIds = ref<string[]>([])
|
||||
const reviewContextRow = ref<OutboundReleaseReview | null>(null)
|
||||
|
||||
function openReviewDialog(row?: OutboundReleaseReview) {
|
||||
const rows = row ? [row] : selectedRows.value
|
||||
@@ -224,6 +235,7 @@
|
||||
return
|
||||
}
|
||||
reviewDialogIds.value = rows.map((r) => String(r.scheduleId || r.id))
|
||||
reviewContextRow.value = rows.length === 1 ? rows[0] : null
|
||||
reviewDialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<div class="product-lines-head">
|
||||
<span class="product-lines-title">入库明细</span>
|
||||
<span class="form-label-tip"
|
||||
>请先选代次,编码自动生成「产品编码-代次-01、-02…」;同代次多份序号递增</span
|
||||
>请先选代次,编码按「产品编码-代次-序号」生成;序号延续库中同前缀最大号</span
|
||||
>
|
||||
</div>
|
||||
<el-table
|
||||
@@ -220,7 +220,7 @@
|
||||
placeholder="代次"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="syncLineCodesFromBase"
|
||||
@change="applyProductCodeToLines"
|
||||
>
|
||||
<el-option v-for="p in passageOptions" :key="p" :label="p" :value="p" />
|
||||
</el-select>
|
||||
@@ -316,6 +316,7 @@
|
||||
import { Close, Check } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { fetchCellProductTypeList, fetchCellProductSpecList } from '@/api/admin'
|
||||
import { fetchMaxPassageProductSeq } from '@/api/cell-product'
|
||||
import {
|
||||
remoteSearchStorageSlotSelectOptions,
|
||||
ensureStorageSlotsInOptions,
|
||||
@@ -473,6 +474,7 @@
|
||||
const formRef = ref()
|
||||
const submitLoading = ref(false)
|
||||
const productLines = ref<ProductLine[]>([createEmptyProductLine()])
|
||||
let lineCodeSyncToken = 0
|
||||
|
||||
const formData = reactive({
|
||||
cellProductId: '',
|
||||
@@ -564,13 +566,13 @@
|
||||
])
|
||||
await nextTick()
|
||||
formRef.value?.clearValidate?.()
|
||||
applyProductCodeToLines()
|
||||
await applyProductCodeToLines()
|
||||
}
|
||||
|
||||
/** 按入库份数同步明细行,并按「编码-代次-序号」重算产品编码 */
|
||||
function applyProductCodeToLines() {
|
||||
async function applyProductCodeToLines() {
|
||||
syncProductLines()
|
||||
syncLineCodesFromBase()
|
||||
await syncLineCodesFromBase()
|
||||
}
|
||||
|
||||
function onDialogOpened() {
|
||||
@@ -589,8 +591,24 @@
|
||||
return Math.min(n, 50)
|
||||
}
|
||||
|
||||
function syncLineCodesFromBase() {
|
||||
async function syncLineCodesFromBase() {
|
||||
const token = ++lineCodeSyncToken
|
||||
const base = formData.productCode.trim()
|
||||
const passages = [
|
||||
...new Set(
|
||||
productLines.value.map((line) => (line.passage || '').trim()).filter(Boolean)
|
||||
)
|
||||
]
|
||||
let maxSeqByPassage: Record<string, number> = {}
|
||||
if (base && passages.length) {
|
||||
try {
|
||||
const res = await fetchMaxPassageProductSeq(base, passages)
|
||||
if (token !== lineCodeSyncToken) return
|
||||
maxSeqByPassage = res?.maxSeqByPassage || {}
|
||||
} catch {
|
||||
if (token !== lineCodeSyncToken) return
|
||||
}
|
||||
}
|
||||
const passageCounters = new Map<string, number>()
|
||||
productLines.value.forEach((line) => {
|
||||
const passage = (line.passage || '').trim()
|
||||
@@ -598,8 +616,9 @@
|
||||
line.productCode = ''
|
||||
return
|
||||
}
|
||||
const seq = (passageCounters.get(passage) || 0) + 1
|
||||
passageCounters.set(passage, seq)
|
||||
const localOffset = (passageCounters.get(passage) || 0) + 1
|
||||
passageCounters.set(passage, localOffset)
|
||||
const seq = (maxSeqByPassage[passage] ?? 0) + localOffset
|
||||
line.productCode = `${base}-${passage}-${String(seq).padStart(2, '0')}`
|
||||
})
|
||||
}
|
||||
@@ -623,13 +642,13 @@
|
||||
|
||||
function onCreateCountChange() {
|
||||
if (!isEdit.value) {
|
||||
applyProductCodeToLines()
|
||||
void applyProductCodeToLines()
|
||||
}
|
||||
}
|
||||
|
||||
function onBaseProductCodeInput() {
|
||||
if (!isEdit.value) {
|
||||
applyProductCodeToLines()
|
||||
void applyProductCodeToLines()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,7 +656,7 @@
|
||||
() => formData.quantity,
|
||||
() => {
|
||||
if (!isEdit.value && props.modelValue) {
|
||||
applyProductCodeToLines()
|
||||
void applyProductCodeToLines()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
+66
-6
@@ -24,14 +24,21 @@
|
||||
/>
|
||||
</template>
|
||||
<template #product-table>
|
||||
<div v-if="detail?.products?.length" class="view-subtable-wrap">
|
||||
<el-table :data="detail?.products || []" stripe class="list-table view-subtable">
|
||||
<el-table-column type="index" label="序号" min-width="60" align="center" />
|
||||
<div v-if="detail?.products?.length" class="list-body list-wrap view-inner-table-wrap">
|
||||
<el-table :data="detail?.products || []" stripe class="list-table inner-table" max-height="320">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="projectCode"
|
||||
label="项目编码"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -39,6 +46,7 @@
|
||||
label="项目名称"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -46,6 +54,7 @@
|
||||
label="细胞类型"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -53,13 +62,20 @@
|
||||
label="规格"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="quantity" label="数量" min-width="70" align="center" />
|
||||
<el-table-column label="产品状态" min-width="100" align="center">
|
||||
<el-table-column
|
||||
prop="quantity"
|
||||
label="数量"
|
||||
min-width="70"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="产品状态" min-width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="productStatusTag(row.productStatus || '')" size="small">
|
||||
{{ productStatusLabel(row.productStatus || '') }}
|
||||
{{ productStatusLabel(row.productStatus || '', productBizType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -93,6 +109,7 @@
|
||||
import type { ProductionWorkOrderDetail } from '@/api/production-work-order'
|
||||
import type { ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import { productStatusLabel, productStatusTagType } from '@/utils/status-tag-registry'
|
||||
import { resolveOutboundViewVariant } from '@/utils/outbound-qc-pilot-view-sections'
|
||||
import type { TagType } from '@/utils/status-tag-registry'
|
||||
|
||||
defineOptions({ name: 'ProductionWorkOrderViewDialogFrame' })
|
||||
@@ -121,6 +138,12 @@
|
||||
set: (v) => emit('update:visible', v)
|
||||
})
|
||||
|
||||
const productBizType = computed(() =>
|
||||
resolveOutboundViewVariant(
|
||||
props.detail?.bizType || props.detail?.application?.bizType || ''
|
||||
)
|
||||
)
|
||||
|
||||
function productStatusTag(status: string): TagType {
|
||||
return productStatusTagType(status) as TagType
|
||||
}
|
||||
@@ -133,3 +156,40 @@
|
||||
emit('download', file)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-inner-table-wrap.list-body.list-wrap {
|
||||
margin-top: 0;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: var(--mint-radius, 10px);
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
:deep(.el-table) {
|
||||
--el-table-header-bg-color: var(--mint-table-head, #f8fafc);
|
||||
--el-table-border-color: var(--mint-border, #e2e8f0);
|
||||
--el-table-row-hover-bg-color: var(--mint-row-hover, #f0fdf4);
|
||||
--el-table-text-color: var(--mint-text, #0f172a);
|
||||
--el-table-header-text-color: var(--mint-text-muted, #64748b);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
:deep(.el-table th.el-table__cell) {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
:deep(.el-table td.el-table__cell) {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text, #0f172a);
|
||||
}
|
||||
}
|
||||
|
||||
.view-empty-hint {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
}
|
||||
</style>
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
:view-tasks="viewTasks"
|
||||
>
|
||||
<template #product-table>
|
||||
<OutboundQcProductTable :products="detail?.products" />
|
||||
<OutboundQcProductTable :products="detail?.products" biz-type="basic_experiment" />
|
||||
</template>
|
||||
</QcWorkOrderSystemViewDialog>
|
||||
</template>
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
<OutboundQcDiagnosisAttachments :files="diagnosisAttachmentFiles" />
|
||||
</template>
|
||||
<template #product-table>
|
||||
<OutboundQcProductTable :products="detail?.products" />
|
||||
<OutboundQcProductTable :products="detail?.products" biz-type="clinical_application" />
|
||||
</template>
|
||||
</QcWorkOrderSystemViewDialog>
|
||||
</template>
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
<OutboundQcDiagnosisAttachments :files="diagnosisAttachmentFiles" />
|
||||
</template>
|
||||
<template #product-table>
|
||||
<OutboundQcProductTable :products="detail?.products" />
|
||||
<OutboundQcProductTable :products="detail?.products" biz-type="pilot_service" />
|
||||
</template>
|
||||
</QcWorkOrderSystemViewDialog>
|
||||
</template>
|
||||
|
||||
+51
-9
@@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<div v-if="products?.length" class="view-subtable-wrap">
|
||||
<el-table :data="products" stripe class="list-table view-subtable">
|
||||
<el-table-column type="index" label="序号" min-width="60" align="center" />
|
||||
<div v-if="products?.length" class="list-body list-wrap view-inner-table-wrap">
|
||||
<el-table :data="products" stripe class="list-table inner-table" max-height="320">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="projectCode"
|
||||
label="项目编码"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -14,6 +21,7 @@
|
||||
label="项目名称"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -21,6 +29,7 @@
|
||||
label="细胞类型"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -28,13 +37,20 @@
|
||||
label="规格"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="quantity" label="数量" min-width="70" align="center" />
|
||||
<el-table-column label="产品状态" min-width="100" align="center">
|
||||
<el-table-column
|
||||
prop="quantity"
|
||||
label="数量"
|
||||
min-width="70"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column label="产品状态" min-width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="productStatusTagType(row.productStatus || '') as any" size="small">
|
||||
{{ productStatusLabel(row.productStatus || '') }}
|
||||
{{ productStatusLabel(row.productStatus || '', bizType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -51,13 +67,39 @@
|
||||
|
||||
defineProps<{
|
||||
products?: OutboundQcDetail['products']
|
||||
/** 基础实验时产品状态 dtz 展示为「待交付」 */
|
||||
bizType?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-subtable-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
.view-inner-table-wrap.list-body.list-wrap {
|
||||
margin-top: 0;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: var(--mint-radius, 10px);
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
:deep(.el-table) {
|
||||
--el-table-header-bg-color: var(--mint-table-head, #f8fafc);
|
||||
--el-table-border-color: var(--mint-border, #e2e8f0);
|
||||
--el-table-row-hover-bg-color: var(--mint-row-hover, #f0fdf4);
|
||||
--el-table-text-color: var(--mint-text, #0f172a);
|
||||
--el-table-header-text-color: var(--mint-text-muted, #64748b);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
:deep(.el-table th.el-table__cell) {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
:deep(.el-table td.el-table__cell) {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text, #0f172a);
|
||||
}
|
||||
}
|
||||
|
||||
.view-empty-hint {
|
||||
|
||||
Reference in new issue
Block a user