提交
This commit is contained in:
1 parent
f1f5d24eff
commit
3c7a47981a
138 files changed
+18654
-12092
No files matched your search
@@ -86,6 +86,8 @@
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { fetchLogin } from '@/api/auth'
|
||||
import { resetRouteInitState } from '@/router/guards/beforeEach'
|
||||
import { resolveSafeRedirectTarget } from '@/utils/router'
|
||||
import { ElNotification, type FormInstance, type FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { User, Lock } from '@element-plus/icons-vue'
|
||||
@@ -143,9 +145,10 @@
|
||||
message: `欢迎回来,${userInfo.realName || userInfo.username}!`
|
||||
})
|
||||
|
||||
// 获取 redirect 参数,如果存在则跳转到指定页面,否则跳转到首页
|
||||
const redirect = route.query.redirect as string
|
||||
router.push(redirect || '/')
|
||||
// 避免 redirect 指回登录页(如登出时误写入 /auth/login)
|
||||
resetRouteInitState()
|
||||
const target = resolveSafeRedirectTarget(route.query.redirect)
|
||||
await router.push(target)
|
||||
} catch (error: any) {
|
||||
ElMessage.error(error?.message || '登录失败,请稍后重试')
|
||||
} finally {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="panel-top">
|
||||
<h2>体检记录</h2>
|
||||
</div>
|
||||
<CheckupManagementTab />
|
||||
<CheckupManagementTab :biz-type="bizType" />
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
defineOptions({ name: 'CheckupManagement' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const isPilotRedirect = computed(() => route.name === 'PilotCheckupManagement')
|
||||
|
||||
@@ -0,0 +1,701 @@
|
||||
<!-- 缴退费财务确认 · 退费 Tab(临床应用) -->
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<template>
|
||||
<div class="refund-confirm-tab">
|
||||
<el-tabs
|
||||
v-model="activeTab"
|
||||
class="work-order-type-tabs"
|
||||
@tab-change="handleStatusTabChange"
|
||||
>
|
||||
<el-tab-pane label="待确认" name="pending" />
|
||||
<el-tab-pane label="已确认" name="confirmed" />
|
||||
</el-tabs>
|
||||
|
||||
<div class="refund-confirm-body">
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="searchForm.keyword"
|
||||
placeholder="申请单号/患者姓名"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">支持按申请单号、患者姓名模糊检索。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch">
|
||||
<el-icon><Search /></el-icon>搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap refund-confirm-table-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
@row-dblclick="handleRowDblClick"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="applicationNo"
|
||||
label="申请单号"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
label="患者姓名"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.patientName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="channelName"
|
||||
label="渠道名称"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.channelName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cellTypeSpec"
|
||||
label="细胞类型/规格"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.cellTypeSpec || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="infusionTime"
|
||||
label="输注时间"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.infusionTime || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="paymentAmount"
|
||||
label="缴费金额(元)"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="amount-text">{{ formatAmount(row.paymentAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="refundAmount"
|
||||
label="退费金额(元)"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="amount-text">{{ formatAmount(row.refundAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payStatus"
|
||||
label="状态"
|
||||
min-width="110"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default>
|
||||
<el-tag :type="activeTab === 'pending' ? 'warning' : 'success'" size="small">
|
||||
{{ activeTab === 'pending' ? '退费确认中' : '已退费' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'confirmed'"
|
||||
prop="updateTime"
|
||||
label="确认时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'confirmed'"
|
||||
prop="refundFinanceRemark"
|
||||
label="财务备注"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">{{ row.refundFinanceRemark || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'pending'"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="140"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="activeTab === 'pending'"
|
||||
class="btn-op-item primary"
|
||||
@click="openConfirm(row)"
|
||||
>
|
||||
<el-icon><Check /></el-icon>确认退费
|
||||
</el-button>
|
||||
<el-button v-else class="btn-op-item" @click="openViewConfirm(row)">
|
||||
<el-icon><View /></el-icon>查看确认信息
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
:current-page="pagination.page"
|
||||
:page-size="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:page-sizes="[10, 20, 50]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
|
||||
@current-change="(val) => ((pagination.page = val), loadData())"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认退费弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="确认退费"
|
||||
width="900px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<ClinicalPaymentSubmitReadonly
|
||||
:detail="confirmRow"
|
||||
mode="refund"
|
||||
title="退费申请信息(请核对)"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认</h4>
|
||||
<el-form
|
||||
ref="confirmFormRef"
|
||||
:model="confirmForm"
|
||||
label-position="top"
|
||||
class="biz-dialog-form"
|
||||
>
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="财务确认退费备注" class="form-col-span-2">
|
||||
<el-input
|
||||
v-model="confirmForm.financeRemark"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="选填"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" class="form-col-span-2">
|
||||
<div class="attachment-upload">
|
||||
<div class="attachment-list">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:multiple="true"
|
||||
accept="image/*,video/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.zip,.rar"
|
||||
@change="handleConfirmAttachmentChange"
|
||||
>
|
||||
<div class="upload-card">
|
||||
<el-icon :size="22" color="#10b981"><Plus /></el-icon>
|
||||
<span class="upload-card-text">上传附件</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div
|
||||
v-for="(file, fIdx) in confirmForm.attachments"
|
||||
:key="file.id || fIdx"
|
||||
class="attachment-item"
|
||||
:class="{ 'is-uploading': file._uploading }"
|
||||
>
|
||||
<div class="attachment-preview">
|
||||
<template v-if="file.fileUrl && isImageUrl(file.fileUrl)">
|
||||
<img :src="fullFileUrl(file.fileUrl)" :alt="file.fileName" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="attachment-preview__icon attachment-preview__icon--doc">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="attachment-footer">
|
||||
<span class="attachment-name" :title="file.fileName">{{
|
||||
file.fileName
|
||||
}}</span>
|
||||
<el-icon
|
||||
class="action-btn"
|
||||
title="删除"
|
||||
@click="removeConfirmAttachment(fIdx)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form-tip">支持图片、文档等,多个附件将一并提交。</p>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="dialogVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
@click="submitConfirm"
|
||||
>
|
||||
<el-icon><Check /></el-icon>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看确认信息弹窗 -->
|
||||
<el-dialog
|
||||
v-model="viewDialogVisible"
|
||||
title="确认退费信息"
|
||||
width="900px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
>
|
||||
<ClinicalPaymentSubmitReadonly
|
||||
:detail="viewRow"
|
||||
mode="refund"
|
||||
title="退费申请信息"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认信息</h4>
|
||||
<el-form label-position="top" class="biz-dialog-form view-confirm-form">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="确认时间" class="form-col-span-2">
|
||||
<span class="view-field-text">{{
|
||||
viewRow?.refundFinanceConfirmTime || viewRow?.updateTime || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务备注" class="form-col-span-2">
|
||||
<span class="view-field-text view-field-text--multiline">{{
|
||||
viewRow?.refundFinanceRemark || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务确认附件" class="form-col-span-2">
|
||||
<ProtocolAttachmentReadonly
|
||||
:files="viewAttachmentFiles"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="viewDialogVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
Close,
|
||||
Check,
|
||||
RefreshLeft,
|
||||
Search,
|
||||
View,
|
||||
Plus,
|
||||
Document,
|
||||
Delete
|
||||
} from '@element-plus/icons-vue'
|
||||
import {
|
||||
confirmClinicalRefund,
|
||||
fetchClinicalRefundPending,
|
||||
fetchClinicalRefundConfirmed
|
||||
} from '@/api/business'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import ClinicalPaymentSubmitReadonly from '@/components/business/clinical-payment-submit-readonly/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
|
||||
defineOptions({ name: 'ClinicalRefundConfirmTab' })
|
||||
|
||||
const activeTab = ref('pending')
|
||||
const searchForm = reactive({ keyword: '' })
|
||||
const tableData = ref<Record<string, unknown>[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const viewDialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
const currentDetailId = ref<string | null>(null)
|
||||
const confirmRow = ref<Record<string, unknown> | null>(null)
|
||||
const viewRow = ref<Record<string, unknown> | null>(null)
|
||||
|
||||
const confirmFormRef = ref()
|
||||
const confirmForm = reactive({
|
||||
financeRemark: '',
|
||||
attachments: [] as Array<{
|
||||
id: string
|
||||
fileName: string
|
||||
fileUrl: string
|
||||
_uploading?: boolean
|
||||
}>
|
||||
})
|
||||
|
||||
const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
function formatAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
return '¥' + formatMoneyDisplay(v)
|
||||
}
|
||||
|
||||
function fullFileUrl(url: string) {
|
||||
if (!url) return ''
|
||||
if (/^https?:\/\//i.test(url)) return url
|
||||
return minioBaseUrl ? `${minioBaseUrl}/${url.replace(/^\//, '')}` : url
|
||||
}
|
||||
|
||||
function isImageUrl(url: string) {
|
||||
return /\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(url)
|
||||
}
|
||||
|
||||
const viewAttachmentFiles = computed(() => {
|
||||
const row = viewRow.value
|
||||
if (!row) return []
|
||||
const urls = String(row.refundFinanceConfirmAttachments || '')
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u, i) => {
|
||||
const url = u.trim()
|
||||
if (!url) return null
|
||||
const name = url.includes('/') ? url.split('/').pop() || `附件${i + 1}` : url
|
||||
return { id: `url_${i}`, fileUrl: url, fileName: name }
|
||||
})
|
||||
.filter(Boolean) as Array<Record<string, unknown>>
|
||||
})
|
||||
|
||||
function handleDownloadFile(file: Record<string, unknown>) {
|
||||
const url = String(file.fileUrl || '')
|
||||
if (!url) return
|
||||
window.open(fullFileUrl(url), '_blank')
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const params = {
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined
|
||||
}
|
||||
const res =
|
||||
activeTab.value === 'pending'
|
||||
? await fetchClinicalRefundPending(params)
|
||||
: await fetchClinicalRefundConfirmed(params)
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleStatusTabChange() {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleReset() {
|
||||
searchForm.keyword = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function openConfirm(row: Record<string, unknown>) {
|
||||
currentDetailId.value = String(row.id)
|
||||
confirmRow.value = row
|
||||
confirmForm.financeRemark = ''
|
||||
confirmForm.attachments = []
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
function openViewConfirm(row: Record<string, unknown>) {
|
||||
viewRow.value = row
|
||||
viewDialogVisible.value = true
|
||||
}
|
||||
|
||||
function handleRowDblClick(row: Record<string, unknown>) {
|
||||
if (activeTab.value !== 'pending') openViewConfirm(row)
|
||||
}
|
||||
|
||||
async function handleConfirmAttachmentChange(uploadFile: { raw?: File }) {
|
||||
const file = uploadFile.raw
|
||||
if (!file) return
|
||||
const tempId = `temp_${Date.now()}`
|
||||
confirmForm.attachments.push({
|
||||
id: tempId,
|
||||
fileName: file.name,
|
||||
fileUrl: '',
|
||||
_uploading: true
|
||||
})
|
||||
const idx = confirmForm.attachments.length - 1
|
||||
try {
|
||||
const fd = new FormData()
|
||||
fd.append('folder', 'clinical-finance-refund')
|
||||
fd.append('file', file)
|
||||
const res = await fetchUploadAttachment(fd)
|
||||
confirmForm.attachments[idx] = {
|
||||
id: res.id || tempId,
|
||||
fileName: file.name || res.fileName,
|
||||
fileUrl: res.fileUrl,
|
||||
_uploading: false
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('文件上传失败')
|
||||
confirmForm.attachments.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
|
||||
function removeConfirmAttachment(index: number) {
|
||||
confirmForm.attachments.splice(index, 1)
|
||||
}
|
||||
|
||||
function confirmAttachmentsToUrls() {
|
||||
return confirmForm.attachments
|
||||
.filter((f) => f.fileUrl && !f._uploading)
|
||||
.map((f) => f.fileUrl)
|
||||
.join(',')
|
||||
}
|
||||
|
||||
async function submitConfirm() {
|
||||
if (!currentDetailId.value) return
|
||||
if (confirmForm.attachments.some((f) => f._uploading)) {
|
||||
ElMessage.warning('附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
submitLoading.value = true
|
||||
try {
|
||||
await confirmClinicalRefund(currentDetailId.value, {
|
||||
refundFinanceConfirmAttachments: confirmAttachmentsToUrls() || undefined,
|
||||
refundFinanceRemark: confirmForm.financeRemark.trim() || undefined
|
||||
})
|
||||
dialogVisible.value = false
|
||||
loadData()
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
watchDebounced(
|
||||
[searchForm],
|
||||
() => {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
{ debounce: 300, deep: true }
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.work-order-type-tabs {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item__label) {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
padding: 0 0 4px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.refund-confirm-table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.form-section-divider {
|
||||
height: 1px;
|
||||
margin: 20px 0;
|
||||
background: var(--mint-border, #e2e8f0);
|
||||
}
|
||||
|
||||
.detail-section-title {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text, #334155);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.attachment-upload {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.attachment-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
width: 120px;
|
||||
height: 96px;
|
||||
border: 1px dashed #a7f3d0;
|
||||
border-radius: 8px;
|
||||
background: #f0fdf4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
border-color: #10b981;
|
||||
background: #ecfdf5;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-card-text {
|
||||
font-size: 12px;
|
||||
color: #10b981;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.attachment-item {
|
||||
width: 120px;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
&.is-uploading {
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
height: 96px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f8fafc;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview__icon--doc {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.attachment-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.attachment-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
|
||||
&:hover {
|
||||
color: #ef4444;
|
||||
}
|
||||
}
|
||||
|
||||
.view-confirm-form :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.view-field-text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: var(--mint-text, #334155);
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
|
||||
&--multiline {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,28 +1,49 @@
|
||||
<!-- 缴费确认(财务)- 临床应用 -->
|
||||
<!-- 缴退费财务确认 - 临床应用:缴费确认 + 退费确认 -->
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div class="region-tabs region-tab-strip">
|
||||
<div class="tab-button-group region-tab-group">
|
||||
<el-button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="region-tab-btn"
|
||||
:type="activeTab === tab.key ? 'primary' : 'default'"
|
||||
@click="switchTab(tab.key)"
|
||||
>
|
||||
<span class="region-tab-inner">
|
||||
<span class="region-tab-name">{{ tab.label }}</span>
|
||||
</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>缴费确认列表</h2>
|
||||
<div class="panel-entity-switch" role="tablist" aria-label="视图类型">
|
||||
<button
|
||||
type="button"
|
||||
class="entity-switch-card"
|
||||
:class="{ 'is-active': mainTab === 'payment' }"
|
||||
role="tab"
|
||||
:aria-selected="mainTab === 'payment'"
|
||||
@click="mainTab = 'payment'"
|
||||
>
|
||||
<span class="entity-switch-card__icon"><el-icon><Wallet /></el-icon></span>
|
||||
<span class="entity-switch-card__main">
|
||||
<span class="entity-switch-card__title">缴费确认</span>
|
||||
<span class="entity-switch-card__desc">缴费记录确认与附件审核</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="entity-switch-card"
|
||||
:class="{ 'is-active': mainTab === 'refund' }"
|
||||
role="tab"
|
||||
:aria-selected="mainTab === 'refund'"
|
||||
@click="mainTab = 'refund'"
|
||||
>
|
||||
<span class="entity-switch-card__icon"><el-icon><Refresh /></el-icon></span>
|
||||
<span class="entity-switch-card__main">
|
||||
<span class="entity-switch-card__title">退费确认</span>
|
||||
<span class="entity-switch-card__desc">退费记录确认与附件审核</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-show="mainTab === 'payment'" class="panel-entity-body">
|
||||
<el-tabs
|
||||
v-model="activeTab"
|
||||
class="work-order-type-tabs"
|
||||
@tab-change="handleStatusTabChange"
|
||||
>
|
||||
<el-tab-pane label="待确认" name="pending" />
|
||||
<el-tab-pane label="已确认" name="confirmed" />
|
||||
</el-tabs>
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
@@ -49,7 +70,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<div class="list-body list-wrap payment-confirm-table-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
:data="tableData"
|
||||
@@ -122,19 +143,27 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payStatus"
|
||||
label="缴费状态"
|
||||
min-width="120"
|
||||
label="状态"
|
||||
min-width="110"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default>
|
||||
<el-tag :type="activeTab === 'jfqrz' ? 'warning' : 'success'" size="small">
|
||||
{{ activeTab === 'jfqrz' ? '缴费确认中' : '已缴费' }}
|
||||
<el-tag :type="activeTab === 'pending' ? 'warning' : 'success'" size="small">
|
||||
{{ activeTab === 'pending' ? '缴费确认中' : '已缴费' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'yjf'"
|
||||
v-if="activeTab === 'confirmed'"
|
||||
prop="updateTime"
|
||||
label="确认时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'confirmed'"
|
||||
prop="financeRemark"
|
||||
label="财务备注"
|
||||
min-width="120"
|
||||
@@ -145,9 +174,9 @@
|
||||
<template #default="{ row }">{{ row.financeRemark || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'yjf'"
|
||||
prop="updateTime"
|
||||
label="确认时间"
|
||||
v-if="activeTab === 'pending'"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
@@ -161,7 +190,7 @@
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="activeTab === 'jfqrz'"
|
||||
v-if="activeTab === 'pending'"
|
||||
class="btn-op-item primary"
|
||||
@click="openConfirm(row)"
|
||||
>
|
||||
@@ -190,12 +219,20 @@
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="确认收款"
|
||||
width="640px"
|
||||
class="dialog-form-layout"
|
||||
width="900px"
|
||||
class="dialog-form-layout payment-confirm-dialog"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<ClinicalPaymentSubmitReadonly
|
||||
:detail="confirmRow"
|
||||
mode="receipt"
|
||||
title="缴费明细(请核对)"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认</h4>
|
||||
<el-form
|
||||
ref="confirmFormRef"
|
||||
:model="confirmForm"
|
||||
@@ -283,24 +320,25 @@
|
||||
<el-dialog
|
||||
v-model="viewDialogVisible"
|
||||
title="确认收款信息"
|
||||
width="640px"
|
||||
class="dialog-form-layout"
|
||||
width="900px"
|
||||
class="dialog-form-layout payment-confirm-dialog"
|
||||
align-center
|
||||
destroy-on-close
|
||||
>
|
||||
<ClinicalPaymentSubmitReadonly
|
||||
:detail="viewRow"
|
||||
mode="receipt"
|
||||
title="缴费明细"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认信息</h4>
|
||||
<el-form label-position="top" class="biz-dialog-form view-confirm-form">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="申请单号" class="form-col-span-2">
|
||||
<span class="view-field-text">{{ viewRow?.applicationNo || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="患者姓名">
|
||||
<span class="view-field-text">{{ viewRow?.patientName || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费金额(元)">
|
||||
<span class="view-field-text">{{ formatAmount(viewRow?.paymentAmount) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认时间" class="form-col-span-2">
|
||||
<span class="view-field-text">{{ viewRow?.updateTime || '-' }}</span>
|
||||
<span class="view-field-text">{{
|
||||
viewRow?.financeConfirmTime || viewRow?.updateTime || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务备注" class="form-col-span-2">
|
||||
<span class="view-field-text view-field-text--multiline">{{
|
||||
@@ -308,40 +346,10 @@
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务确认附件" class="form-col-span-2">
|
||||
<div v-if="viewAttachmentFiles.length" class="attachment-list">
|
||||
<div
|
||||
v-for="(file, fIdx) in viewAttachmentFiles"
|
||||
:key="fIdx"
|
||||
class="attachment-item"
|
||||
>
|
||||
<div class="attachment-preview">
|
||||
<template v-if="isImageUrl(String(file.fileUrl || ''))">
|
||||
<img
|
||||
:src="fullFileUrl(String(file.fileUrl || ''))"
|
||||
:alt="String(file.fileName || '')"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="attachment-preview__icon attachment-preview__icon--doc">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="attachment-footer">
|
||||
<span class="attachment-name" :title="String(file.fileName || '')">{{
|
||||
file.fileName
|
||||
}}</span>
|
||||
<el-icon
|
||||
class="action-btn"
|
||||
title="下载"
|
||||
@click="handleDownloadFile(file)"
|
||||
>
|
||||
<Download />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else class="view-field-text">—</span>
|
||||
<ProtocolAttachmentReadonly
|
||||
:files="viewAttachmentFiles"
|
||||
@download="handleDownloadFile"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -352,6 +360,9 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<RefundConfirmTab v-if="mainTab === 'refund'" />
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
@@ -368,10 +379,13 @@
|
||||
Plus,
|
||||
Document,
|
||||
Delete,
|
||||
Download
|
||||
Wallet,
|
||||
Refresh
|
||||
} from '@element-plus/icons-vue'
|
||||
import RefundConfirmTab from './RefundConfirmTab.vue'
|
||||
import ClinicalPaymentSubmitReadonly from '@/components/business/clinical-payment-submit-readonly/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import {
|
||||
fetchClinicalPayments,
|
||||
confirmClinicalReceipt,
|
||||
fetchClinicalReceiptPending,
|
||||
fetchClinicalReceiptConfirmed
|
||||
@@ -381,12 +395,10 @@
|
||||
|
||||
defineOptions({ name: 'ClinicalPaymentConfirm' })
|
||||
|
||||
const tabs = [
|
||||
{ key: 'jfqrz', label: '待确认' },
|
||||
{ key: 'yjf', label: '已确认' }
|
||||
]
|
||||
const route = useRoute()
|
||||
const mainTab = ref<'payment' | 'refund'>('payment')
|
||||
|
||||
const activeTab = ref('jfqrz')
|
||||
const activeTab = ref('pending')
|
||||
const searchForm = reactive({ keyword: '' })
|
||||
const tableData = ref<Record<string, unknown>[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -396,6 +408,7 @@
|
||||
const viewDialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
const currentDetailId = ref<string | null>(null)
|
||||
const confirmRow = ref<Record<string, unknown> | null>(null)
|
||||
const viewRow = ref<Record<string, unknown> | null>(null)
|
||||
|
||||
const confirmFormRef = ref()
|
||||
@@ -458,7 +471,7 @@
|
||||
keyword: searchForm.keyword || undefined
|
||||
}
|
||||
const res =
|
||||
activeTab.value === 'jfqrz'
|
||||
activeTab.value === 'pending'
|
||||
? await fetchClinicalReceiptPending(params)
|
||||
: await fetchClinicalReceiptConfirmed(params)
|
||||
tableData.value = res.list || []
|
||||
@@ -468,9 +481,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function switchTab(key: string) {
|
||||
if (activeTab.value === key) return
|
||||
activeTab.value = key
|
||||
function handleStatusTabChange() {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
@@ -488,6 +499,7 @@
|
||||
|
||||
function openConfirm(row: Record<string, unknown>) {
|
||||
currentDetailId.value = String(row.id)
|
||||
confirmRow.value = row
|
||||
confirmForm.financeRemark = ''
|
||||
confirmForm.attachments = []
|
||||
dialogVisible.value = true
|
||||
@@ -499,7 +511,7 @@
|
||||
}
|
||||
|
||||
function handleRowDblClick(row: Record<string, unknown>) {
|
||||
if (activeTab.value !== 'jfqrz') openViewConfirm(row)
|
||||
if (activeTab.value !== 'pending') openViewConfirm(row)
|
||||
}
|
||||
|
||||
async function handleConfirmAttachmentChange(uploadFile: { raw?: File }) {
|
||||
@@ -570,37 +582,108 @@
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
const tab = String(route.query.tab || '')
|
||||
if (tab === 'refund') {
|
||||
mainTab.value = 'refund'
|
||||
} else {
|
||||
loadData()
|
||||
}
|
||||
})
|
||||
|
||||
watch(mainTab, (tab) => {
|
||||
if (tab === 'payment') {
|
||||
loadData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.region-tabs {
|
||||
margin-bottom: 16px;
|
||||
.panel-entity-switch {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
padding: 16px 16px 12px;
|
||||
}
|
||||
|
||||
.region-tab-btn {
|
||||
position: relative;
|
||||
min-width: 108px;
|
||||
padding: 0 12px;
|
||||
.entity-switch-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-width: 220px;
|
||||
max-width: 280px;
|
||||
flex: 1;
|
||||
padding: 14px 18px;
|
||||
border: 1px solid var(--mint-border, #d9e8e2);
|
||||
border-radius: 10px;
|
||||
background: var(--surface, #fff);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition:
|
||||
border-color 0.2s ease,
|
||||
background-color 0.2s ease,
|
||||
box-shadow 0.2s ease;
|
||||
|
||||
:deep(.el-icon) {
|
||||
display: none;
|
||||
&:hover:not(.is-active) {
|
||||
border-color: #a7f3d0;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
border-color: var(--primary, #10b981);
|
||||
background: var(--primary-bg, #ecfdf5);
|
||||
box-shadow: 0 0 0 1px rgb(16 185 129 / 12%);
|
||||
}
|
||||
}
|
||||
|
||||
.region-tab-btn.el-button > :deep(span) {
|
||||
position: static !important;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.region-tab-inner {
|
||||
display: inline-flex;
|
||||
.entity-switch-card__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 8px;
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
font-size: 20px;
|
||||
|
||||
.entity-switch-card.is-active & {
|
||||
background: #fff;
|
||||
color: var(--primary-dark, #059669);
|
||||
}
|
||||
}
|
||||
|
||||
.entity-switch-card__main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.entity-switch-card__title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text, #1e293b);
|
||||
line-height: 1.4;
|
||||
|
||||
.entity-switch-card.is-active & {
|
||||
color: var(--primary-dark, #059669);
|
||||
}
|
||||
}
|
||||
|
||||
.entity-switch-card__desc {
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.panel-entity-body {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.work-order-type-tabs {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item) {
|
||||
@@ -616,6 +699,16 @@
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.payment-confirm-table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.payment-confirm-dialog {
|
||||
:deep(.el-dialog__body) {
|
||||
padding-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-upload {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -723,4 +816,18 @@
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.form-section-divider {
|
||||
height: 1px;
|
||||
margin: 20px 0;
|
||||
background: var(--mint-border, #e2e8f0);
|
||||
}
|
||||
|
||||
.detail-section-title {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text, #334155);
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
@@ -1,707 +1,18 @@
|
||||
<!-- 缴费信息(临床应用) -->
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<!-- 旧「缴费信息」菜单入口:重定向至临床申请单 · 缴费信息 Tab -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div class="region-tabs region-tab-strip">
|
||||
<div class="tab-button-group region-tab-group">
|
||||
<el-button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="region-tab-btn"
|
||||
:type="activeTab === tab.key ? 'primary' : 'default'"
|
||||
@click="switchTab(tab.key)"
|
||||
>
|
||||
<span class="region-tab-inner">
|
||||
<span class="region-tab-name">{{ tab.label }}</span>
|
||||
</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>缴费信息列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="searchForm.keyword"
|
||||
placeholder="申请单号"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费状态">
|
||||
<el-select v-model="searchForm.payStatus" placeholder="全部" clearable>
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="待缴费" value="dfj" />
|
||||
<el-option label="缴费确认中" value="jfqrz" />
|
||||
<el-option label="已缴费" value="yjf" />
|
||||
<el-option label="退费确认中" value="tfqrz" />
|
||||
<el-option label="已退费" value="ytf" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">支持按申请单号模糊检索。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch">
|
||||
<el-icon><Search /></el-icon>搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row">
|
||||
<div class="list-toolbar-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
<el-button
|
||||
v-if="activeTab === 'dfj'"
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:disabled="!selectedRows.length"
|
||||
@click="handleBatchSubmitReceipt"
|
||||
>
|
||||
<el-icon><Check /></el-icon>批量缴费确认
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="activeTab === 'yjf'"
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:disabled="!selectedRows.length"
|
||||
@click="handleBatchRefund"
|
||||
>
|
||||
<el-icon><RefreshLeft /></el-icon>批量退费确认
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="applicationNo"
|
||||
label="申请单号"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
label="患者姓名"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.patientName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="channelName"
|
||||
label="渠道名称"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.channelName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cellTypeSpec"
|
||||
label="细胞类型/规格"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.cellTypeSpec || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="infusionTime"
|
||||
label="输注时间"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.infusionTime || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="paymentAmount"
|
||||
label="缴费金额(元)"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="amount-text">{{ formatAmount(row.paymentAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payStatus"
|
||||
label="缴费状态"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="payStatusTagType(String(row.payStatus || ''))" size="small">
|
||||
{{ payStatusLabel(String(row.payStatus || '')) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="260"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="activeTab === 'dfj'"
|
||||
class="btn-op-item primary"
|
||||
@click="handleSubmitReceipt(row)"
|
||||
>
|
||||
<el-icon><Check /></el-icon>缴费确认
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="activeTab === 'yjf'"
|
||||
class="btn-op-item primary"
|
||||
@click="openRefundDialog(row)"
|
||||
>
|
||||
<el-icon><RefreshLeft /></el-icon>退费确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
:current-page="pagination.page"
|
||||
:page-size="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:page-sizes="[10, 20, 50]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
|
||||
@current-change="(val) => ((pagination.page = val), loadData())"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
v-model="refundDialogVisible"
|
||||
title="退费确认"
|
||||
width="640px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="refundFormRef"
|
||||
:model="refundForm"
|
||||
:rules="refundFormRules"
|
||||
label-position="top"
|
||||
class="biz-dialog-form"
|
||||
>
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="退费金额(元)" prop="refundAmount" class="form-col-span-2">
|
||||
<el-input-number
|
||||
v-model="refundForm.refundAmount"
|
||||
:min="0.01"
|
||||
:step="100"
|
||||
:precision="2"
|
||||
controls-position="right"
|
||||
placeholder="请输入退费金额"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费备注" prop="refundRemark" class="form-col-span-2">
|
||||
<el-input
|
||||
v-model="refundForm.refundRemark"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="选填"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费附件" class="form-col-span-2">
|
||||
<div class="attachment-upload">
|
||||
<div class="attachment-list">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:multiple="true"
|
||||
accept="image/*,video/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.zip,.rar"
|
||||
@change="handleRefundAttachmentChange"
|
||||
>
|
||||
<div class="upload-card">
|
||||
<el-icon :size="22" color="#10b981"><Plus /></el-icon>
|
||||
<span class="upload-card-text">上传附件</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div
|
||||
v-for="(file, fIdx) in refundForm.attachments"
|
||||
:key="file.id || fIdx"
|
||||
class="attachment-item"
|
||||
:class="{ 'is-uploading': file._uploading }"
|
||||
>
|
||||
<div class="attachment-preview">
|
||||
<template v-if="file.fileUrl && isImageUrl(file.fileUrl)">
|
||||
<img :src="fullFileUrl(file.fileUrl)" :alt="file.fileName" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="attachment-preview__icon attachment-preview__icon--doc">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="attachment-footer">
|
||||
<span class="attachment-name" :title="file.fileName">{{
|
||||
file.fileName
|
||||
}}</span>
|
||||
<el-icon
|
||||
class="action-btn"
|
||||
title="删除"
|
||||
@click="removeRefundAttachment(fIdx)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form-tip">支持图片、文档等,多个附件将一并提交。</p>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="refundDialogVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:loading="refundSubmitLoading"
|
||||
@click="submitRefund"
|
||||
>
|
||||
<el-icon><Check /></el-icon>
|
||||
确认提交
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</div>
|
||||
<div />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus'
|
||||
import {
|
||||
RefreshLeft,
|
||||
Search,
|
||||
Plus,
|
||||
Document,
|
||||
Delete,
|
||||
Close,
|
||||
Check
|
||||
} from '@element-plus/icons-vue'
|
||||
import {
|
||||
fetchClinicalPayments,
|
||||
submitClinicalReceipt,
|
||||
batchSubmitClinicalReceipt,
|
||||
submitClinicalRefund,
|
||||
batchSubmitClinicalRefund
|
||||
} from '@/api/business'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { payStatusLabel, payStatusTagType } from '@/utils/status-tag-registry'
|
||||
|
||||
defineOptions({ name: 'ClinicalPaymentInfo' })
|
||||
|
||||
const tabs = [
|
||||
{ key: 'dfj', label: '待缴费' },
|
||||
{ key: 'yjf', label: '已缴费' }
|
||||
]
|
||||
|
||||
const activeTab = ref('dfj')
|
||||
const searchForm = reactive({ keyword: '', payStatus: '' })
|
||||
const tableData = ref<Record<string, unknown>[]>([])
|
||||
const selectedRows = ref<Record<string, unknown>[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
|
||||
const refundDialogVisible = ref(false)
|
||||
const refundSubmitLoading = ref(false)
|
||||
const refundTargetIds = ref<string[]>([])
|
||||
const refundFormRef = ref<FormInstance>()
|
||||
const refundForm = reactive({
|
||||
refundAmount: null as number | null,
|
||||
refundRemark: '',
|
||||
attachments: [] as Array<{
|
||||
id: string
|
||||
fileName: string
|
||||
fileUrl: string
|
||||
_uploading?: boolean
|
||||
}>
|
||||
})
|
||||
const refundFormRules: FormRules = {
|
||||
refundAmount: [{ required: true, message: '请填写退费金额', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
function formatAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
return '¥' + formatMoneyDisplay(v)
|
||||
}
|
||||
|
||||
function fullFileUrl(url: string) {
|
||||
if (!url) return ''
|
||||
if (/^https?:\/\//i.test(url)) return url
|
||||
return minioBaseUrl ? `${minioBaseUrl}/${url.replace(/^\//, '')}` : url
|
||||
}
|
||||
|
||||
function isImageUrl(url: string) {
|
||||
return /\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(url)
|
||||
}
|
||||
|
||||
function handleSelectionChange(rows: Record<string, unknown>[]) {
|
||||
selectedRows.value = rows
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await fetchClinicalPayments({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
payStatus: activeTab.value,
|
||||
keyword: searchForm.keyword || undefined
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function switchTab(key: string) {
|
||||
if (activeTab.value === key) return
|
||||
activeTab.value = key
|
||||
selectedRows.value = []
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
async function handleSubmitReceipt(row: Record<string, unknown>) {
|
||||
const id = String(row.id || '')
|
||||
if (!id) return
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
'确认对该缴费明细进行缴费确认?提交后状态变为「缴费确认中」。',
|
||||
'缴费确认',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
await submitClinicalReceipt(id)
|
||||
loadData()
|
||||
} catch {
|
||||
/* cancel */
|
||||
}
|
||||
}
|
||||
|
||||
async function handleBatchSubmitReceipt() {
|
||||
if (!selectedRows.value.length) return
|
||||
const ids = selectedRows.value.map((r) => String(r.id || '')).filter(Boolean)
|
||||
if (!ids.length) return
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确认将选中的 ${ids.length} 条待缴费明细批量缴费确认?`,
|
||||
'批量缴费确认',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
await batchSubmitClinicalReceipt(ids)
|
||||
selectedRows.value = []
|
||||
loadData()
|
||||
} catch {
|
||||
/* cancel */
|
||||
}
|
||||
}
|
||||
|
||||
function resetRefundForm(defaultAmount?: number) {
|
||||
refundForm.refundAmount = defaultAmount ?? null
|
||||
refundForm.refundRemark = ''
|
||||
refundForm.attachments = []
|
||||
refundFormRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
function openRefundDialog(row?: Record<string, unknown>, batchIds?: string[]) {
|
||||
const ids = batchIds?.length ? batchIds : row?.id ? [String(row.id)] : []
|
||||
if (!ids.length) return
|
||||
refundTargetIds.value = ids
|
||||
const defaultAmount =
|
||||
!batchIds?.length && row?.paymentAmount != null ? Number(row.paymentAmount) : undefined
|
||||
resetRefundForm(
|
||||
defaultAmount != null && !Number.isNaN(defaultAmount) ? defaultAmount : undefined
|
||||
)
|
||||
refundDialogVisible.value = true
|
||||
}
|
||||
|
||||
function handleBatchRefund() {
|
||||
if (!selectedRows.value.length) return
|
||||
const ids = selectedRows.value.map((r) => String(r.id || '')).filter(Boolean)
|
||||
if (!ids.length) return
|
||||
openRefundDialog(undefined, ids)
|
||||
}
|
||||
|
||||
function refundAttachmentsToUrls() {
|
||||
return refundForm.attachments
|
||||
.filter((f) => f.fileUrl && !f._uploading)
|
||||
.map((f) => f.fileUrl)
|
||||
.join(',')
|
||||
}
|
||||
|
||||
async function handleRefundAttachmentChange(uploadFile: { raw?: File }) {
|
||||
const file = uploadFile.raw
|
||||
if (!file) return
|
||||
const tempId = `temp_${Date.now()}`
|
||||
refundForm.attachments.push({
|
||||
id: tempId,
|
||||
fileName: file.name,
|
||||
fileUrl: '',
|
||||
_uploading: true
|
||||
})
|
||||
const idx = refundForm.attachments.length - 1
|
||||
try {
|
||||
const fd = new FormData()
|
||||
fd.append('folder', 'clinical-payment-refund')
|
||||
fd.append('file', file)
|
||||
const res = await fetchUploadAttachment(fd)
|
||||
refundForm.attachments[idx] = {
|
||||
id: res.id || tempId,
|
||||
fileName: file.name || res.fileName,
|
||||
fileUrl: res.fileUrl,
|
||||
_uploading: false
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('文件上传失败')
|
||||
refundForm.attachments.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
|
||||
function removeRefundAttachment(index: number) {
|
||||
refundForm.attachments.splice(index, 1)
|
||||
}
|
||||
|
||||
async function submitRefund() {
|
||||
if (!refundTargetIds.value.length) return
|
||||
const valid = await refundFormRef.value?.validate().catch(() => false)
|
||||
if (!valid) return
|
||||
if (refundForm.attachments.some((f) => f._uploading)) {
|
||||
ElMessage.warning('附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
const payload = {
|
||||
refundAmount: Number(refundForm.refundAmount),
|
||||
refundRemark: refundForm.refundRemark?.trim() || undefined,
|
||||
refundAttachments: refundAttachmentsToUrls() || undefined
|
||||
}
|
||||
refundSubmitLoading.value = true
|
||||
try {
|
||||
if (refundTargetIds.value.length === 1) {
|
||||
await submitClinicalRefund(refundTargetIds.value[0], payload)
|
||||
} else {
|
||||
await batchSubmitClinicalRefund(refundTargetIds.value, payload)
|
||||
}
|
||||
refundDialogVisible.value = false
|
||||
selectedRows.value = []
|
||||
loadData()
|
||||
} finally {
|
||||
refundSubmitLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleReset() {
|
||||
searchForm.keyword = ''
|
||||
searchForm.payStatus = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
watchDebounced(
|
||||
[searchForm],
|
||||
() => {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
{ debounce: 300, deep: true }
|
||||
)
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
router.replace({
|
||||
name: 'ClinicalApplicationList',
|
||||
query: { ...route.query, tab: 'payment' }
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.region-tabs {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.region-tab-btn {
|
||||
position: relative;
|
||||
min-width: 108px;
|
||||
padding: 0 12px;
|
||||
|
||||
:deep(.el-icon) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.region-tab-btn.el-button > :deep(span) {
|
||||
position: static !important;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.region-tab-inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item__label) {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
padding: 0 0 4px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.attachment-upload {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.attachment-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
width: 120px;
|
||||
height: 96px;
|
||||
border: 1px dashed #a7f3d0;
|
||||
border-radius: 8px;
|
||||
background: #f0fdf4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
border-color: #10b981;
|
||||
background: #ecfdf5;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-card-text {
|
||||
font-size: 12px;
|
||||
color: #10b981;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.attachment-item {
|
||||
width: 120px;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
&.is-uploading {
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
height: 96px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f8fafc;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview__icon--doc {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.attachment-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.attachment-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
|
||||
&:hover {
|
||||
color: #ef4444;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,804 +1,18 @@
|
||||
<!-- 退费确认(财务)- 临床应用 -->
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<!-- 退费确认已融入「缴退费财务确认」页内 Tab,本路由仅做重定向 -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div class="region-tabs region-tab-strip">
|
||||
<div class="tab-button-group region-tab-group">
|
||||
<el-button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="region-tab-btn"
|
||||
:type="activeTab === tab.key ? 'primary' : 'default'"
|
||||
@click="switchTab(tab.key)"
|
||||
>
|
||||
<span class="region-tab-inner">
|
||||
<span class="region-tab-name">{{ tab.label }}</span>
|
||||
</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2>退费确认列表</h2>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" label-position="top" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
<el-form-item label="关键词">
|
||||
<el-input
|
||||
v-model="searchForm.keyword"
|
||||
placeholder="申请单号/患者姓名"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="filter-actions-row">
|
||||
<span class="filter-hint">支持按申请单号、患者姓名模糊检索。</span>
|
||||
<div class="filter-actions-end">
|
||||
<el-button class="btn-ghost" @click="handleReset">
|
||||
<el-icon><RefreshLeft /></el-icon>重置
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleSearch">
|
||||
<el-icon><Search /></el-icon>搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<el-table
|
||||
class="list-table"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
@row-dblclick="handleRowDblClick"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="(index) => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="applicationNo"
|
||||
label="申请单号"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="patientName"
|
||||
label="患者姓名"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.patientName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="channelName"
|
||||
label="渠道名称"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.channelName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cellTypeSpec"
|
||||
label="细胞类型/规格"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.cellTypeSpec || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="infusionTime"
|
||||
label="输注时间"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ row.infusionTime || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="paymentAmount"
|
||||
label="缴费金额(元)"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="amount-text">{{ formatAmount(row.paymentAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="refundAmount"
|
||||
label="退费金额(元)"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="amount-text">{{ formatAmount(row.refundAmount) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payStatus"
|
||||
label="缴费状态"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default>
|
||||
<el-tag :type="activeTab === 'tfqrz' ? 'warning' : 'danger'" size="small">
|
||||
{{ activeTab === 'tfqrz' ? '退费确认中' : '已退费' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'tfqrz'"
|
||||
prop="refundRemark"
|
||||
label="退费备注"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">{{ row.refundRemark || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'ytf'"
|
||||
prop="refundFinanceRemark"
|
||||
label="财务备注"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">{{ row.refundFinanceRemark || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'ytf'"
|
||||
prop="updateTime"
|
||||
label="确认时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="140"
|
||||
fixed="right"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="activeTab === 'tfqrz'"
|
||||
class="btn-op-item primary"
|
||||
@click="openConfirm(row)"
|
||||
>
|
||||
<el-icon><Check /></el-icon>确认退费
|
||||
</el-button>
|
||||
<el-button v-else class="btn-op-item" @click="openViewConfirm(row)">
|
||||
<el-icon><View /></el-icon>查看确认信息
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination list-pager-bar">
|
||||
<el-pagination
|
||||
:current-page="pagination.page"
|
||||
:page-size="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:page-sizes="[10, 20, 50]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="(val) => ((pagination.page = 1), (pagination.pageSize = val), loadData())"
|
||||
@current-change="(val) => ((pagination.page = val), loadData())"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 确认退费弹窗 -->
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="确认退费"
|
||||
width="640px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="refund-apply-section">
|
||||
<h4 class="detail-section-title">退费申请信息</h4>
|
||||
<el-form label-position="top" class="biz-dialog-form view-confirm-form">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="申请单号">
|
||||
<span class="view-field-text">{{ confirmRow?.applicationNo || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="患者姓名">
|
||||
<span class="view-field-text">{{ confirmRow?.patientName || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费金额(元)">
|
||||
<span class="view-field-text">{{ formatAmount(confirmRow?.paymentAmount) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费金额(元)">
|
||||
<span class="view-field-text">{{ formatAmount(confirmRow?.refundAmount) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费备注" class="form-col-span-2">
|
||||
<span class="view-field-text view-field-text--multiline">{{
|
||||
confirmRow?.refundRemark || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认</h4>
|
||||
<el-form
|
||||
ref="confirmFormRef"
|
||||
:model="confirmForm"
|
||||
label-position="top"
|
||||
class="biz-dialog-form"
|
||||
>
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="财务确认退费备注" class="form-col-span-2">
|
||||
<el-input
|
||||
v-model="confirmForm.financeRemark"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="选填"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" class="form-col-span-2">
|
||||
<div class="attachment-upload">
|
||||
<div class="attachment-list">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:multiple="true"
|
||||
accept="image/*,video/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.zip,.rar"
|
||||
@change="handleConfirmAttachmentChange"
|
||||
>
|
||||
<div class="upload-card">
|
||||
<el-icon :size="22" color="#10b981"><Plus /></el-icon>
|
||||
<span class="upload-card-text">上传附件</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div
|
||||
v-for="(file, fIdx) in confirmForm.attachments"
|
||||
:key="file.id || fIdx"
|
||||
class="attachment-item"
|
||||
:class="{ 'is-uploading': file._uploading }"
|
||||
>
|
||||
<div class="attachment-preview">
|
||||
<template v-if="file.fileUrl && isImageUrl(file.fileUrl)">
|
||||
<img :src="fullFileUrl(file.fileUrl)" :alt="file.fileName" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="attachment-preview__icon attachment-preview__icon--doc">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="attachment-footer">
|
||||
<span class="attachment-name" :title="file.fileName">{{
|
||||
file.fileName
|
||||
}}</span>
|
||||
<el-icon
|
||||
class="action-btn"
|
||||
title="删除"
|
||||
@click="removeConfirmAttachment(fIdx)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form-tip">支持图片、文档等,多个附件将一并提交。</p>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="dialogVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
@click="submitConfirm"
|
||||
>
|
||||
<el-icon><Check /></el-icon>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看确认信息弹窗 -->
|
||||
<el-dialog
|
||||
v-model="viewDialogVisible"
|
||||
title="确认退费信息"
|
||||
width="640px"
|
||||
class="dialog-form-layout"
|
||||
align-center
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="refund-apply-section">
|
||||
<h4 class="detail-section-title">退费申请信息</h4>
|
||||
<el-form label-position="top" class="biz-dialog-form view-confirm-form">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="申请单号">
|
||||
<span class="view-field-text">{{ viewRow?.applicationNo || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="患者姓名">
|
||||
<span class="view-field-text">{{ viewRow?.patientName || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费金额(元)">
|
||||
<span class="view-field-text">{{ formatAmount(viewRow?.paymentAmount) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费金额(元)">
|
||||
<span class="view-field-text">{{ formatAmount(viewRow?.refundAmount) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退费备注" class="form-col-span-2">
|
||||
<span class="view-field-text view-field-text--multiline">{{
|
||||
viewRow?.refundRemark || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="form-section-divider" />
|
||||
<h4 class="detail-section-title">财务确认信息</h4>
|
||||
<el-form label-position="top" class="biz-dialog-form view-confirm-form">
|
||||
<div class="form-grid-2">
|
||||
<el-form-item label="确认时间" class="form-col-span-2">
|
||||
<span class="view-field-text">{{ viewRow?.updateTime || '-' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务备注" class="form-col-span-2">
|
||||
<span class="view-field-text view-field-text--multiline">{{
|
||||
viewRow?.refundFinanceRemark || '—'
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="财务确认附件" class="form-col-span-2">
|
||||
<div v-if="viewAttachmentFiles.length" class="attachment-list">
|
||||
<div
|
||||
v-for="(file, fIdx) in viewAttachmentFiles"
|
||||
:key="fIdx"
|
||||
class="attachment-item"
|
||||
>
|
||||
<div class="attachment-preview">
|
||||
<template v-if="isImageUrl(String(file.fileUrl || ''))">
|
||||
<img
|
||||
:src="fullFileUrl(String(file.fileUrl || ''))"
|
||||
:alt="String(file.fileName || '')"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="attachment-preview__icon attachment-preview__icon--doc">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="attachment-footer">
|
||||
<span class="attachment-name" :title="String(file.fileName || '')">{{
|
||||
file.fileName
|
||||
}}</span>
|
||||
<el-icon
|
||||
class="action-btn"
|
||||
title="下载"
|
||||
@click="handleDownloadFile(file)"
|
||||
>
|
||||
<Download />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else class="view-field-text">—</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="viewDialogVisible = false">
|
||||
<el-icon><Close /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</div>
|
||||
<div />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
Close,
|
||||
Check,
|
||||
RefreshLeft,
|
||||
Search,
|
||||
View,
|
||||
Plus,
|
||||
Document,
|
||||
Delete,
|
||||
Download
|
||||
} from '@element-plus/icons-vue'
|
||||
import {
|
||||
confirmClinicalRefund,
|
||||
fetchClinicalRefundPending,
|
||||
fetchClinicalRefundConfirmed
|
||||
} from '@/api/business'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
defineOptions({ name: 'ClinicalRefundConfirmRedirect' })
|
||||
|
||||
defineOptions({ name: 'ClinicalRefundConfirm' })
|
||||
|
||||
const tabs = [
|
||||
{ key: 'tfqrz', label: '待确认' },
|
||||
{ key: 'ytf', label: '已确认' }
|
||||
]
|
||||
|
||||
const activeTab = ref('tfqrz')
|
||||
const searchForm = reactive({ keyword: '' })
|
||||
const tableData = ref<Record<string, unknown>[]>([])
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const viewDialogVisible = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
const currentDetailId = ref<string | null>(null)
|
||||
const confirmRow = ref<Record<string, unknown> | null>(null)
|
||||
const viewRow = ref<Record<string, unknown> | null>(null)
|
||||
|
||||
const confirmFormRef = ref()
|
||||
const confirmForm = reactive({
|
||||
financeRemark: '',
|
||||
attachments: [] as Array<{
|
||||
id: string
|
||||
fileName: string
|
||||
fileUrl: string
|
||||
_uploading?: boolean
|
||||
}>
|
||||
})
|
||||
|
||||
const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
function formatAmount(v: unknown): string {
|
||||
if (v == null || v === '') return '-'
|
||||
return '¥' + formatMoneyDisplay(v)
|
||||
}
|
||||
|
||||
function fullFileUrl(url: string) {
|
||||
if (!url) return ''
|
||||
if (/^https?:\/\//i.test(url)) return url
|
||||
return minioBaseUrl ? `${minioBaseUrl}/${url.replace(/^\//, '')}` : url
|
||||
}
|
||||
|
||||
function isImageUrl(url: string) {
|
||||
return /\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(url)
|
||||
}
|
||||
|
||||
const viewAttachmentFiles = computed(() => {
|
||||
const row = viewRow.value
|
||||
if (!row) return []
|
||||
const urls = String(row.refundFinanceConfirmAttachments || '')
|
||||
if (!urls.trim()) return []
|
||||
return urls
|
||||
.split(',')
|
||||
.map((u, i) => {
|
||||
const url = u.trim()
|
||||
if (!url) return null
|
||||
const name = url.includes('/') ? url.split('/').pop() || `附件${i + 1}` : url
|
||||
return { id: `url_${i}`, fileUrl: url, fileName: name }
|
||||
})
|
||||
.filter(Boolean) as Array<Record<string, unknown>>
|
||||
})
|
||||
|
||||
function handleDownloadFile(file: Record<string, unknown>) {
|
||||
const url = String(file.fileUrl || '')
|
||||
if (!url) return
|
||||
window.open(fullFileUrl(url), '_blank')
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
try {
|
||||
const params = {
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined
|
||||
}
|
||||
const res =
|
||||
activeTab.value === 'tfqrz'
|
||||
? await fetchClinicalRefundPending(params)
|
||||
: await fetchClinicalRefundConfirmed(params)
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function switchTab(key: string) {
|
||||
if (activeTab.value === key) return
|
||||
activeTab.value = key
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleReset() {
|
||||
searchForm.keyword = ''
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
function openConfirm(row: Record<string, unknown>) {
|
||||
currentDetailId.value = String(row.id)
|
||||
confirmRow.value = row
|
||||
confirmForm.financeRemark = ''
|
||||
confirmForm.attachments = []
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
function openViewConfirm(row: Record<string, unknown>) {
|
||||
viewRow.value = row
|
||||
viewDialogVisible.value = true
|
||||
}
|
||||
|
||||
function handleRowDblClick(row: Record<string, unknown>) {
|
||||
if (activeTab.value !== 'tfqrz') openViewConfirm(row)
|
||||
}
|
||||
|
||||
async function handleConfirmAttachmentChange(uploadFile: { raw?: File }) {
|
||||
const file = uploadFile.raw
|
||||
if (!file) return
|
||||
const tempId = `temp_${Date.now()}`
|
||||
confirmForm.attachments.push({
|
||||
id: tempId,
|
||||
fileName: file.name,
|
||||
fileUrl: '',
|
||||
_uploading: true
|
||||
})
|
||||
const idx = confirmForm.attachments.length - 1
|
||||
try {
|
||||
const fd = new FormData()
|
||||
fd.append('folder', 'clinical-finance-refund')
|
||||
fd.append('file', file)
|
||||
const res = await fetchUploadAttachment(fd)
|
||||
confirmForm.attachments[idx] = {
|
||||
id: res.id || tempId,
|
||||
fileName: file.name || res.fileName,
|
||||
fileUrl: res.fileUrl,
|
||||
_uploading: false
|
||||
}
|
||||
} catch {
|
||||
ElMessage.error('文件上传失败')
|
||||
confirmForm.attachments.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
|
||||
function removeConfirmAttachment(index: number) {
|
||||
confirmForm.attachments.splice(index, 1)
|
||||
}
|
||||
|
||||
function confirmAttachmentsToUrls() {
|
||||
return confirmForm.attachments
|
||||
.filter((f) => f.fileUrl && !f._uploading)
|
||||
.map((f) => f.fileUrl)
|
||||
.join(',')
|
||||
}
|
||||
|
||||
async function submitConfirm() {
|
||||
if (!currentDetailId.value) return
|
||||
if (confirmForm.attachments.some((f) => f._uploading)) {
|
||||
ElMessage.warning('附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
submitLoading.value = true
|
||||
try {
|
||||
await confirmClinicalRefund(currentDetailId.value, {
|
||||
refundFinanceConfirmAttachments: confirmAttachmentsToUrls() || undefined,
|
||||
refundFinanceRemark: confirmForm.financeRemark.trim() || undefined
|
||||
})
|
||||
dialogVisible.value = false
|
||||
loadData()
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
watchDebounced(
|
||||
[searchForm],
|
||||
() => {
|
||||
pagination.page = 1
|
||||
loadData()
|
||||
},
|
||||
{ debounce: 300, deep: true }
|
||||
)
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
router.replace({
|
||||
name: 'ClinicalPaymentConfirm',
|
||||
query: { ...route.query, tab: 'refund' }
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.region-tabs {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.region-tab-btn {
|
||||
position: relative;
|
||||
min-width: 108px;
|
||||
padding: 0 12px;
|
||||
|
||||
:deep(.el-icon) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.region-tab-btn.el-button > :deep(span) {
|
||||
position: static !important;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.region-tab-inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-form :deep(.el-form-item__label) {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
padding: 0 0 4px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.form-section-divider {
|
||||
height: 1px;
|
||||
margin: 20px 0;
|
||||
background: var(--mint-border, #e2e8f0);
|
||||
}
|
||||
|
||||
.detail-section-title {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text, #334155);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.attachment-upload {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.attachment-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
width: 120px;
|
||||
height: 96px;
|
||||
border: 1px dashed #a7f3d0;
|
||||
border-radius: 8px;
|
||||
background: #f0fdf4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
border-color: #10b981;
|
||||
background: #ecfdf5;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-card-text {
|
||||
font-size: 12px;
|
||||
color: #10b981;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.attachment-item {
|
||||
width: 120px;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
&.is-uploading {
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview {
|
||||
height: 96px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f8fafc;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment-preview__icon--doc {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.attachment-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.attachment-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
|
||||
&:hover {
|
||||
color: #ef4444;
|
||||
}
|
||||
}
|
||||
|
||||
.view-confirm-form :deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.view-field-text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: var(--mint-text, #334155);
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
|
||||
&--multiline {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -141,6 +141,18 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #payment-info>
|
||||
<div class="view-section-slot payment-info-view">
|
||||
<ClinicalSchedulePaymentDetailView
|
||||
v-if="detail?.payment"
|
||||
:payment="detail.payment"
|
||||
@preview="handleAttachmentPreview"
|
||||
@download="handleAttachmentDownload"
|
||||
/>
|
||||
<el-empty v-else description="暂无缴费记录" :image-size="48" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #review-attachments>
|
||||
<div class="view-section-slot">
|
||||
<ProtocolAttachmentReadonly
|
||||
@@ -188,6 +200,7 @@
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import ClinicalSchedulePaymentDetailView from '@/components/business/clinical-schedule-payment-detail/index.vue'
|
||||
import { fetchInfusionScheduleMgmtDetail } from '@/api/admin'
|
||||
import {
|
||||
applicationStatusLabel,
|
||||
@@ -251,6 +264,12 @@
|
||||
|
||||
const products = computed(() => detail.value?.products || [])
|
||||
|
||||
const isClinicalApplication = computed(
|
||||
() =>
|
||||
detail.value?.application?.bizType === 'clinical_application' ||
|
||||
detail.value?.bizType === 'clinical_application'
|
||||
)
|
||||
|
||||
const outboundMaterial = computed(() => detail.value?.outboundMaterial || null)
|
||||
const outboundMaterialCells = computed(() => outboundMaterial.value?.cells || [])
|
||||
const outboundMaterialQcRows = computed(() => outboundMaterial.value?.qcMaterials || [])
|
||||
@@ -473,6 +492,15 @@
|
||||
fields: [],
|
||||
slot: 'products'
|
||||
},
|
||||
...(isClinicalApplication.value
|
||||
? [
|
||||
{
|
||||
title: '缴费明细',
|
||||
fields: [],
|
||||
slot: 'payment-info'
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
title: '出库生产工单 + 任务',
|
||||
slot: 'production-info',
|
||||
@@ -626,6 +654,10 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.payment-info-view {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view-inner-table-wrap.list-body.list-wrap {
|
||||
margin-top: 4px;
|
||||
border: 1px solid var(--mint-border, #e2e8f0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- 输注计划管理(临床独立页 / 中试重定向) -->
|
||||
<template>
|
||||
<div v-if="isPilotRedirect" />
|
||||
<div v-if="isPilotRedirect || isClinicalRedirect" />
|
||||
<div v-else class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
@@ -21,12 +21,21 @@
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const isPilotRedirect = computed(() => route.name === 'PilotInfusionSchedule')
|
||||
const isClinicalRedirect = computed(() => route.name === 'ClinicalInfusionSchedule')
|
||||
|
||||
onMounted(() => {
|
||||
if (!isPilotRedirect.value) return
|
||||
router.replace({
|
||||
name: 'PilotApplication',
|
||||
query: { ...route.query, tab: 'infusion' }
|
||||
})
|
||||
if (isPilotRedirect.value) {
|
||||
router.replace({
|
||||
name: 'PilotApplication',
|
||||
query: { ...route.query, tab: 'infusion' }
|
||||
})
|
||||
return
|
||||
}
|
||||
if (isClinicalRedirect.value) {
|
||||
router.replace({
|
||||
name: 'ClinicalApplicationList',
|
||||
query: { ...route.query, tab: 'infusion' }
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -253,6 +253,15 @@
|
||||
|
||||
defineOptions({ name: 'PilotServiceOutboundReleaseReview' })
|
||||
|
||||
const props = defineProps<{
|
||||
/** 路由传入:仅列出对应业务线的申请单关联输注计划 */
|
||||
bizType?: string
|
||||
}>()
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
const effectiveBizType = computed(
|
||||
() => props.bizType || (isClinical.value ? 'clinical_application' : 'pilot_service')
|
||||
)
|
||||
|
||||
const reviewConclusionOptions = [
|
||||
{ value: 'tg', label: '通过' },
|
||||
{ value: 'btg', label: '不通过' }
|
||||
@@ -280,7 +289,8 @@
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
reviewConclusion: searchForm.reviewConclusion || undefined,
|
||||
keyword: searchForm.keyword || undefined
|
||||
keyword: searchForm.keyword || undefined,
|
||||
bizType: effectiveBizType.value
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
pagination.total = res.total ?? 0
|
||||
|
||||
@@ -37,7 +37,10 @@
|
||||
<div class="section-title">
|
||||
<div class="section-title-left"><h3>申请单信息</h3></div>
|
||||
</div>
|
||||
<div class="form-grid form-grid--col4">
|
||||
<div
|
||||
class="form-grid form-grid--col4"
|
||||
:class="{ 'clinical-application-info-grid': isClinical }"
|
||||
>
|
||||
<el-form-item label="申请单名称" prop="applicationName">
|
||||
<el-input v-model="formData.applicationName" placeholder="请输入申请单名称" />
|
||||
</el-form-item>
|
||||
@@ -59,6 +62,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isClinical"
|
||||
label="备注"
|
||||
class="clinical-application-remark"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入备注"
|
||||
:rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!isClinical"
|
||||
label="服务订单"
|
||||
@@ -92,7 +107,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" class="form-col-full">
|
||||
<el-form-item v-if="!isClinical" label="备注" class="form-col-full">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
@@ -173,7 +188,12 @@
|
||||
<el-form-item label="紧急联系人电话" prop="emergencyPhone">
|
||||
<el-input v-model="patientForm.emergencyPhone" placeholder="请输入紧急联系人电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否需要体检" prop="needCheckup" class="patient-checkup-field">
|
||||
<el-form-item
|
||||
v-if="!isClinical"
|
||||
label="是否需要体检"
|
||||
prop="needCheckup"
|
||||
class="patient-checkup-field"
|
||||
>
|
||||
<el-switch
|
||||
v-model="patientForm.needCheckup"
|
||||
:active-value="1"
|
||||
@@ -266,7 +286,7 @@
|
||||
请先在「申请单信息」中选择渠道与服务订单,系统将按订单类型加载协议与可选细胞产品。
|
||||
</p>
|
||||
<p v-if="isClinical" class="section-title-hint">
|
||||
请先在「申请单信息」中选择渠道,系统将加载可选细胞产品。
|
||||
请先选择渠道并添加输注计划;细胞项目从「细胞价格体系」加载(与渠道协议无关)。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -479,7 +499,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="cellTypeName" label="细胞类型" min-width="100" />
|
||||
<el-table-column prop="specText" label="规格" min-width="100" />
|
||||
<el-table-column label="协议单价(元)" min-width="130" align="right">
|
||||
<el-table-column
|
||||
:label="isClinical ? '参考单价(元)' : '协议单价(元)'"
|
||||
min-width="130"
|
||||
align="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span class="cell-product-price-text">
|
||||
¥{{ formatOrderBalance(row.agreementPrice) }}
|
||||
@@ -799,6 +823,7 @@
|
||||
fetchPilotPatient,
|
||||
fetchChannelAgreements,
|
||||
fetchChannelAgreementPrices,
|
||||
fetchCellProductPriceList,
|
||||
fetchDictDataOptions,
|
||||
fetchCustomerList,
|
||||
fetchCreateCustomer
|
||||
@@ -935,15 +960,20 @@
|
||||
const onChannelChange = async (channelId: string) => {
|
||||
formData.channelServiceOrderId = ''
|
||||
serviceOrderOptions.value = []
|
||||
resetInfusionOrderContext()
|
||||
if (!channelId) return
|
||||
|
||||
if (isClinical.value) {
|
||||
// 临床模式:直接加载渠道协议,无需服务订单
|
||||
await loadAgreements(channelId)
|
||||
// 临床:价格池与渠道无关;切换渠道时勿清空 agreementPriceOptions(否则「添加细胞产品」会失效)
|
||||
clearScheduleCellProducts()
|
||||
if (!channelId) return
|
||||
if (!agreementPriceOptions.value.length) {
|
||||
await loadClinicalCellProductPrices()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
resetInfusionOrderContext()
|
||||
if (!channelId) return
|
||||
|
||||
serviceOrderLoading.value = true
|
||||
try {
|
||||
serviceOrderOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
@@ -1089,7 +1119,6 @@
|
||||
|
||||
const canAddCellProduct = computed(() => {
|
||||
if (isClinical.value) {
|
||||
// 临床模式:需要渠道和协议价格
|
||||
return !!formData.channelId && agreementPriceOptions.value.length > 0
|
||||
}
|
||||
return !!selectedServiceOrder.value && agreementPriceOptions.value.length > 0
|
||||
@@ -1662,6 +1691,41 @@
|
||||
}))
|
||||
}
|
||||
|
||||
const normalizeCellProductPriceRows = (rows: any[]) => {
|
||||
return (Array.isArray(rows) ? rows : []).map((p) => ({
|
||||
priceId: p.id,
|
||||
projectCode: p.projectCode || '',
|
||||
projectName: p.projectName || '',
|
||||
cellTypeCode: p.cellTypeCode || '',
|
||||
cellTypeName: p.cellTypeName || '',
|
||||
specText: p.specText || '',
|
||||
unitPrice: p.unitPrice ?? 0,
|
||||
source: 'cell_price' as const
|
||||
}))
|
||||
}
|
||||
|
||||
/** 临床申请单:从细胞价格体系(biz_cell_product_price)加载可选项目 */
|
||||
const loadClinicalCellProductPrices = async () => {
|
||||
agreementPriceLoading.value = true
|
||||
try {
|
||||
const rows = await fetchAllPagedRecords(async (page, pageSize) => {
|
||||
const data: any = await fetchCellProductPriceList({ page, pageSize })
|
||||
return {
|
||||
list: data?.list ?? [],
|
||||
total: data?.total ?? 0
|
||||
}
|
||||
})
|
||||
agreementPriceOptions.value = normalizeCellProductPriceRows(rows)
|
||||
if (!agreementPriceOptions.value.length) {
|
||||
ElMessage.warning('细胞价格体系暂无数据,请先在「细胞产品基础信息」中维护价格')
|
||||
}
|
||||
} catch {
|
||||
agreementPriceOptions.value = []
|
||||
} finally {
|
||||
agreementPriceLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 疗程数变化 → 自动增减输注计划 + 自动计算输注时间
|
||||
const computeScheduleTime = (index: number): string => {
|
||||
if (!infusionPlan.infusionStartDate || !infusionPlan.courseInterval) return ''
|
||||
@@ -1860,6 +1924,9 @@
|
||||
loadChannels()
|
||||
loadInfusionMethodOptions()
|
||||
remoteSearchCustomers('')
|
||||
if (isClinical.value) {
|
||||
loadClinicalCellProductPrices()
|
||||
}
|
||||
if (isEdit.value && props.editId) {
|
||||
loadEditData(props.editId)
|
||||
}
|
||||
@@ -2002,10 +2069,12 @@
|
||||
}))
|
||||
}))
|
||||
}
|
||||
if (formData.channelId) {
|
||||
if (formData.channelId && !isClinical.value) {
|
||||
await loadAgreements(formData.channelId)
|
||||
}
|
||||
if (!isClinical.value && formData.channelServiceOrderId) {
|
||||
if (isClinical.value) {
|
||||
await loadClinicalCellProductPrices()
|
||||
} else if (formData.channelServiceOrderId) {
|
||||
await onServiceOrderChange(formData.channelServiceOrderId, { preserveCellProducts: true })
|
||||
} else if (infusionPlan.channelAgreementId) {
|
||||
await onAgreementChange(infusionPlan.channelAgreementId)
|
||||
@@ -2031,7 +2100,10 @@
|
||||
try {
|
||||
const payload: Record<string, any> = {
|
||||
applicationName: formData.applicationName || undefined,
|
||||
channelServiceOrderId: formData.channelServiceOrderId || undefined,
|
||||
channelId: formData.channelId || undefined,
|
||||
channelServiceOrderId: isClinical.value
|
||||
? undefined
|
||||
: formData.channelServiceOrderId || undefined,
|
||||
remark: formData.remark || undefined,
|
||||
bizType: props.bizType || undefined,
|
||||
patient: {
|
||||
@@ -2049,7 +2121,7 @@
|
||||
.map((f) => f.fileUrl)
|
||||
.filter(Boolean)
|
||||
.join(',') || undefined,
|
||||
needCheckup: patientForm.needCheckup
|
||||
needCheckup: isClinical.value ? 0 : patientForm.needCheckup
|
||||
},
|
||||
infusionPlan: {
|
||||
id: infusionPlan.id || undefined,
|
||||
@@ -2154,6 +2226,10 @@
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.clinical-application-remark {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -558,15 +558,26 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<el-empty v-else description="暂无细胞产品" :image-size="32" />
|
||||
<div
|
||||
v-if="isYfkOrder && schedule.cellProducts?.length"
|
||||
class="schedule-amount-summary"
|
||||
>
|
||||
本次输注计划金额:
|
||||
<span class="schedule-amount-summary__value">
|
||||
¥{{ formatOrderBalance(calcScheduleAmount(schedule)) }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="isYfkOrder && schedule.cellProducts?.length"
|
||||
class="schedule-amount-summary"
|
||||
>
|
||||
本次输注计划金额:
|
||||
<span class="schedule-amount-summary__value">
|
||||
¥{{ formatOrderBalance(calcScheduleAmount(schedule)) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isClinicalApplication" class="schedule-payment-block">
|
||||
<div class="section-subtitle">缴费明细</div>
|
||||
<ClinicalSchedulePaymentDetailView
|
||||
v-if="schedule.payment"
|
||||
:payment="schedule.payment"
|
||||
@preview="openPreview"
|
||||
@download="downloadFile"
|
||||
/>
|
||||
<el-empty v-else description="暂无缴费记录" :image-size="32" />
|
||||
</div>
|
||||
|
||||
<InfusionScheduleOutboundChainView
|
||||
@@ -773,6 +784,7 @@
|
||||
} from '@/components/business/system-view-dialog/index.vue'
|
||||
import ServiceOrderTxnTable from '@/views/pilot-service/channel-service-order/ServiceOrderTxnTable.vue'
|
||||
import InfusionScheduleOutboundChainView from '@/components/business/infusion-schedule-outbound-chain-view/index.vue'
|
||||
import ClinicalSchedulePaymentDetailView from '@/components/business/clinical-schedule-payment-detail/index.vue'
|
||||
import {
|
||||
fetchPilotApplicationDetail,
|
||||
fetchPilotPatient,
|
||||
@@ -874,6 +886,9 @@
|
||||
|
||||
const isYfkOrder = computed(() => serviceOrderDetail.value?.orderType === 'yfk')
|
||||
const isGmcpOrder = computed(() => serviceOrderDetail.value?.orderType === 'gmcp')
|
||||
const isClinicalApplication = computed(
|
||||
() => applicationDetail.value?.bizType === 'clinical_application'
|
||||
)
|
||||
|
||||
const settlementModeLabel = computed(() => {
|
||||
const t = serviceOrderDetail.value?.orderType
|
||||
@@ -1582,6 +1597,12 @@
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.schedule-payment-block {
|
||||
margin-top: 16px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px dashed #e2e8f0;
|
||||
}
|
||||
|
||||
.checkup-block-gap {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
@@ -296,6 +296,9 @@
|
||||
|
||||
defineOptions({ name: 'CheckupManagementTab' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
|
||||
// ── 搜索 ─────────────────────────────
|
||||
const searchForm = reactive({
|
||||
keyword: '',
|
||||
@@ -339,7 +342,9 @@
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
checkupStatus: searchForm.checkupStatus || undefined,
|
||||
checkupInstitutionId: searchForm.checkupInstitutionId || undefined
|
||||
checkupInstitutionId: searchForm.checkupInstitutionId || undefined,
|
||||
bizType:
|
||||
props.bizType || (isClinical.value ? 'clinical_application' : 'pilot_service')
|
||||
})
|
||||
tableData.value = res?.list ?? []
|
||||
pagination.total = res?.pagination?.total ?? 0
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -453,7 +453,8 @@
|
||||
keyword: searchForm.keyword || undefined,
|
||||
infusionStatus: searchForm.infusionStatus || undefined,
|
||||
qcStatus: searchForm.qcStatus || undefined,
|
||||
bizType: props.bizType || undefined
|
||||
bizType:
|
||||
props.bizType || (isClinical.value ? 'clinical_application' : 'pilot_service')
|
||||
}
|
||||
if (searchForm.infusionTimeRange?.length === 2) {
|
||||
params.infusionTimeStart = searchForm.infusionTimeRange[0]
|
||||
|
||||
@@ -374,7 +374,8 @@
|
||||
if (searchForm.keyword) params.keyword = searchForm.keyword
|
||||
if (searchForm.channelId) params.channelId = searchForm.channelId
|
||||
if (searchForm.applicationStatus) params.applicationStatus = searchForm.applicationStatus
|
||||
if (props.bizType) params.bizType = props.bizType
|
||||
params.bizType =
|
||||
props.bizType || (isClinical.value ? 'clinical_application' : 'pilot_service')
|
||||
|
||||
const res: any = await fetchPilotApplicationList(params)
|
||||
tableData.value = res?.list ?? res?.records ?? []
|
||||
|
||||
@@ -1,12 +1,56 @@
|
||||
<!-- 中试服务申请单(申请单 / 体检 / 输注计划) -->
|
||||
<!-- 中试服务申请单(申请单 / 体检 / 输注计划);临床申请单(申请单 / 输注计划 / 缴费信息) -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<template v-if="isClinical">
|
||||
<div class="panel-top">
|
||||
<h2 class="title-bar-heading">临床申请单</h2>
|
||||
<div class="panel-entity-switch" role="tablist" aria-label="视图类型">
|
||||
<button
|
||||
type="button"
|
||||
class="entity-switch-card"
|
||||
:class="{ 'is-active': activeTab === 'application' }"
|
||||
role="tab"
|
||||
:aria-selected="activeTab === 'application'"
|
||||
@click="activeTab = 'application'"
|
||||
>
|
||||
<span class="entity-switch-card__icon"><el-icon><Document /></el-icon></span>
|
||||
<span class="entity-switch-card__main">
|
||||
<span class="entity-switch-card__title">临床申请单</span>
|
||||
<span class="entity-switch-card__desc">申请单录入、审核与跟踪</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="entity-switch-card"
|
||||
:class="{ 'is-active': activeTab === 'infusion' }"
|
||||
role="tab"
|
||||
:aria-selected="activeTab === 'infusion'"
|
||||
@click="activeTab = 'infusion'"
|
||||
>
|
||||
<span class="entity-switch-card__icon"><el-icon><Operation /></el-icon></span>
|
||||
<span class="entity-switch-card__main">
|
||||
<span class="entity-switch-card__title">输注计划管理</span>
|
||||
<span class="entity-switch-card__desc">输注计划安排与执行</span>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="entity-switch-card"
|
||||
:class="{ 'is-active': activeTab === 'payment' }"
|
||||
role="tab"
|
||||
:aria-selected="activeTab === 'payment'"
|
||||
@click="activeTab = 'payment'"
|
||||
>
|
||||
<span class="entity-switch-card__icon"><el-icon><Wallet /></el-icon></span>
|
||||
<span class="entity-switch-card__main">
|
||||
<span class="entity-switch-card__title">缴费信息</span>
|
||||
<span class="entity-switch-card__desc">缴费提交与状态跟踪</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<PilotApplicationTab :biz-type="bizType" />
|
||||
|
||||
<PilotApplicationTab v-if="activeTab === 'application'" :biz-type="effectiveBizType" />
|
||||
<InfusionScheduleTab v-else-if="activeTab === 'infusion'" :biz-type="effectiveBizType" />
|
||||
<ClinicalPaymentTab v-else-if="activeTab === 'payment'" />
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
@@ -55,36 +99,49 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<PilotApplicationTab v-if="activeTab === 'application'" />
|
||||
<CheckupManagementTab v-else-if="activeTab === 'checkup'" />
|
||||
<InfusionScheduleTab v-else-if="activeTab === 'infusion'" />
|
||||
<PilotApplicationTab v-if="activeTab === 'application'" :biz-type="effectiveBizType" />
|
||||
<CheckupManagementTab v-else-if="activeTab === 'checkup'" :biz-type="effectiveBizType" />
|
||||
<InfusionScheduleTab v-else-if="activeTab === 'infusion'" :biz-type="effectiveBizType" />
|
||||
</template>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Document, Calendar, Operation } from '@element-plus/icons-vue'
|
||||
import { Document, Calendar, Operation, Wallet } from '@element-plus/icons-vue'
|
||||
import PilotApplicationTab from './PilotApplicationTab.vue'
|
||||
import CheckupManagementTab from './CheckupManagementTab.vue'
|
||||
import InfusionScheduleTab from './InfusionScheduleTab.vue'
|
||||
import ClinicalPaymentTab from './ClinicalPaymentTab.vue'
|
||||
|
||||
defineOptions({ name: 'PilotApplicationManagement' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
/** 中试菜单固定 pilot_service;临床由路由传入 clinical_application */
|
||||
const effectiveBizType = computed(
|
||||
() => props.bizType || (isClinical.value ? 'clinical_application' : 'pilot_service')
|
||||
)
|
||||
|
||||
const VALID_TABS = ['application', 'checkup', 'infusion'] as const
|
||||
type EntityTabKey = (typeof VALID_TABS)[number]
|
||||
const PILOT_TABS = ['application', 'checkup', 'infusion'] as const
|
||||
const CLINICAL_TABS = ['application', 'infusion', 'payment'] as const
|
||||
type PilotTabKey = (typeof PILOT_TABS)[number]
|
||||
type ClinicalTabKey = (typeof CLINICAL_TABS)[number]
|
||||
type EntityTabKey = PilotTabKey | ClinicalTabKey
|
||||
|
||||
const route = useRoute()
|
||||
const activeTab = ref<EntityTabKey>('application')
|
||||
|
||||
onMounted(() => {
|
||||
if (isClinical.value) return
|
||||
const tab = String(route.query.tab || '')
|
||||
if (VALID_TABS.includes(tab as EntityTabKey)) {
|
||||
activeTab.value = tab as EntityTabKey
|
||||
if (isClinical.value) {
|
||||
if (CLINICAL_TABS.includes(tab as ClinicalTabKey)) {
|
||||
activeTab.value = tab as ClinicalTabKey
|
||||
}
|
||||
return
|
||||
}
|
||||
if (PILOT_TABS.includes(tab as PilotTabKey)) {
|
||||
activeTab.value = tab as PilotTabKey
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user