feat(pilot): 临床科研申请单新增业务类型字段

在申请单信息中增加 researchCategory(生物新技术临床科研/临床课题联合申报/生物制药研发),贯通 SQL、后端校验与 Web 表单/列表/详情;用户确认免除 Figma。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-11-20 15:51:19 +08:00
1 parent ef3e015ff9
commit 6b1bf8a1d2
11 files changed
+157 -1

No files matched your search

@@ -0,0 +1,18 @@
/** 临床科研申请单 · 业务子类型(researchCategory) */
export const CLINICAL_RESEARCH_CATEGORY_OPTIONS = [
{ value: 'bio_tech_clinical', label: '生物新技术临床科研' },
{ value: 'joint_topic_declare', label: '临床课题联合申报' },
{ value: 'bio_pharma_rd', label: '生物制药研发' }
] as const
export type ClinicalResearchCategory =
(typeof CLINICAL_RESEARCH_CATEGORY_OPTIONS)[number]['value']
const LABEL_MAP = Object.fromEntries(
CLINICAL_RESEARCH_CATEGORY_OPTIONS.map((o) => [o.value, o.label])
) as Record<string, string>
export function clinicalResearchCategoryLabel(code?: string | null): string {
if (!code) return ''
return LABEL_MAP[code] || code
}
@@ -71,6 +71,21 @@
/>
</el-form-item>
<template v-if="isBasicExperiment">
<el-form-item label="业务类型" prop="researchCategory">
<el-select
v-model="formData.researchCategory"
class="w-full"
clearable
placeholder="请选择业务类型"
>
<el-option
v-for="opt in clinicalResearchCategoryOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</el-select>
</el-form-item>
<el-form-item label="课题名称" prop="projectTitle">
<el-input v-model="formData.projectTitle" placeholder="请输入课题名称" />
</el-form-item>
@@ -1284,9 +1299,12 @@
} from '@/utils/status-tag-registry'
import { formatMoneyDisplay } from '@/utils/money-format'
import { getPilotBizConfig } from '@/config/pilot-biz-type'
import { CLINICAL_RESEARCH_CATEGORY_OPTIONS } from '@/constants/clinical-research-category'
defineOptions({ name: 'ApplicationFormDialog' })
const clinicalResearchCategoryOptions = CLINICAL_RESEARCH_CATEGORY_OPTIONS
const props = defineProps<{
modelValue: boolean
editId: string | null
@@ -1342,7 +1360,8 @@
projectTitle: '',
customerName: '',
customerContact: '',
customerPhone: ''
customerPhone: '',
researchCategory: ''
})
type SaleProductLine = {
@@ -1371,6 +1390,7 @@
channelServiceOrderId: [
{ required: true, message: '请选择服务订单', trigger: 'change' }
],
researchCategory: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
projectTitle: [{ required: true, message: '请填写课题名称', trigger: 'blur' }],
customerName: [{ required: true, message: '请填写客户名称', trigger: 'blur' }],
customerContact: [{ required: true, message: '请填写客户联系人', trigger: 'blur' }],
@@ -2798,6 +2818,7 @@
formData.customerName = ''
formData.customerContact = ''
formData.customerPhone = ''
formData.researchCategory = ''
saleProductLines.value = []
saleLineSeq = 0
patientForm.customerId = ''
@@ -2850,6 +2871,7 @@
formData.customerName = detail.customerName || ''
formData.customerContact = detail.customerContact || ''
formData.customerPhone = detail.customerPhone || ''
formData.researchCategory = detail.researchCategory || ''
if (detail.consentAttachmentFiles?.length) {
consentFileList.value = mapAttachmentFilesFromDetail(detail.consentAttachmentFiles)
@@ -3062,6 +3084,7 @@
}
if (isBasicExperiment.value) {
payload.researchCategory = formData.researchCategory || undefined
payload.projectTitle = formData.projectTitle || undefined
payload.customerName = formData.customerName || undefined
payload.customerContact = formData.customerContact || undefined
@@ -121,6 +121,12 @@
<div class="data-label">申请单名称</div>
<div class="data-value">{{ dash(applicationDetail.applicationName) }}</div>
</div>
<div class="data-item">
<div class="data-label">业务类型</div>
<div class="data-value">
{{ dash(clinicalResearchCategoryLabel(applicationDetail.researchCategory)) }}
</div>
</div>
<div class="data-item">
<div class="data-label">课题名称</div>
<div class="data-value">{{ dash(applicationDetail.projectTitle) }}</div>
@@ -888,6 +894,7 @@
import { downloadAttachmentFile } from '@/utils/download-attachment'
import { formatMoneyDisplay } from '@/utils/money-format'
import { getPilotBizConfig } from '@/config/pilot-biz-type'
import { clinicalResearchCategoryLabel } from '@/constants/clinical-research-category'
import {
applicationStatusLabel,
applicationStatusTagType,
@@ -139,6 +139,17 @@
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="isBasicExperiment"
prop="researchCategory"
label="业务类型"
min-width="160"
show-overflow-tooltip
>
<template #default="{ row }">
{{ clinicalResearchCategoryLabel(row.researchCategory) || '—' }}
</template>
</el-table-column>
<el-table-column
v-if="isBasicExperiment"
prop="projectTitle"
@@ -330,6 +341,7 @@
import { applicationStatusLabel, applicationStatusTagType } from '@/utils/status-tag-registry'
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
import { clinicalResearchCategoryLabel } from '@/constants/clinical-research-category'
defineOptions({ name: 'PilotApplicationTab' })