Files
zkxw/web-admin/src/views/quality-inspection/qc-work-order/view-dialogs/InboundResearchDonationViewDialog.vue
T
2026-06-16 15:17:32 +08:00

99 lines
2.4 KiB
Vue

<!-- 捐赠入库质检工单 — 查看详情 -->
<!-- eslint-disable vue/no-v-model-argument -->
<template>
<QcWorkOrderSystemViewDialog
v-model:visible="dialogVisible"
title="捐赠入库质检工单详情"
width="1120px"
:grid-columns="4"
compact
:loading="loading"
:icon="Document"
:meta="detail?.workOrderNo || ''"
:sections="sections"
modal-class="qc-work-order-view-dialog-mask"
:detail="detail"
:view-tasks="viewTasks"
>
<template #reception-extra>
<div class="view-reception-attachments">
<div class="view-kv view-kv-span-2">
<dt>接收附件</dt>
<dd>
<ProtocolAttachmentReadonly
:files="viewReceptionAttachmentFiles"
@preview="handleReceptionAttachmentPreview"
@download="handleReceptionAttachmentDownload"
/>
</dd>
</div>
</div>
</template>
</QcWorkOrderSystemViewDialog>
</template>
<script setup lang="ts">
import { computed, watch } from 'vue'
import { Document } from '@element-plus/icons-vue'
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
import QcWorkOrderSystemViewDialog from './QcWorkOrderSystemViewDialog.vue'
import { useInboundQcViewDialog } from '../composables/useInboundQcViewDialog'
import { buildInboundResearchDonationViewSections } from '../composables/inbound-view-sections'
defineOptions({ name: 'InboundResearchDonationViewDialog' })
const props = defineProps<{
visible: boolean
workOrderId: string
}>()
const emit = defineEmits<{
(e: 'update:visible', v: boolean): void
}>()
const dialogVisible = computed({
get: () => props.visible,
set: (v) => emit('update:visible', v)
})
const {
loading,
detail,
sections,
viewTasks,
viewReceptionAttachmentFiles,
handleReceptionAttachmentPreview,
handleReceptionAttachmentDownload,
load
} = useInboundQcViewDialog(buildInboundResearchDonationViewSections)
watch(
() => [props.visible, props.workOrderId] as const,
([v, id]) => {
if (v && id) load(id)
}
)
</script>
<style scoped lang="scss">
.view-reception-attachments {
width: 100%;
}
.view-kv {
dt {
margin: 0 0 6px;
font-size: 11px;
color: var(--mint-text-muted, #334155);
}
dd {
margin: 0;
}
&.view-kv-span-2 {
grid-column: 1 / -1;
}
}
</style>