Files
zkxw/web-admin/src/views/project-management/assignment-columns.ts
T
zlwu 6e682f8d18 fix(project): identify storage and donation assignments by sample codes
Replace order number columns with batched sample codes and support sample keyword searches without duplicating parent records. Preserve tenant and soft-delete boundaries, existing assignment writes and preview identifiers.

Related to issue #13. Independent static review completed; tests authored but not run under user self-test arrangement.
2026-11-04 14:27:57 +08:00

57 lines
2.4 KiB
TypeScript

import type { AssignmentBizType, AssignmentRecord } from '@/api/project-management'
interface AssignmentColumn {
prop: keyof AssignmentRecord
label: string
minWidth: number
}
export const assignmentTabs: { key: AssignmentBizType; title: string }[] = [
{ key: 'cell_storage', title: '细胞存储' },
{ key: 'research_donation', title: '科研捐赠' },
{ key: 'pilot_service', title: '中试服务' },
{ key: 'basic_experiment', title: '基础实验' }
]
const collectionColumns: AssignmentColumn[] = [
{ prop: 'motherName', label: '母亲姓名', minWidth: 120 },
{ prop: 'motherPhone', label: '母亲电话', minWidth: 150 },
{ prop: 'hospitalName', label: '采集医院', minWidth: 180 },
{ prop: 'salesUserName', label: '市场专员', minWidth: 120 }
]
export const assignmentColumns: Record<AssignmentBizType, AssignmentColumn[]> = {
cell_storage: [
{ prop: 'sampleCodes', label: '样本编码', minWidth: 180 },
...collectionColumns,
{ prop: 'collectionDate', label: '采集日期', minWidth: 140 }
],
research_donation: [
{ prop: 'sampleCodes', label: '样本编码', minWidth: 180 },
...collectionColumns,
{ prop: 'donationDate', label: '捐赠日期', minWidth: 140 }
],
pilot_service: [
{ prop: 'bizNo', label: '申请单号', minWidth: 180 },
{ prop: 'applicationName', label: '申请名称', minWidth: 180 },
{ prop: 'channelName', label: '渠道名称', minWidth: 160 },
{ prop: 'serviceOrderName', label: '服务订单名称', minWidth: 180 },
{ prop: 'patientName', label: '患者姓名', minWidth: 120 },
{ prop: 'patientPhone', label: '患者电话', minWidth: 150 }
],
basic_experiment: [
{ prop: 'bizNo', label: '申请单号', minWidth: 180 },
{ prop: 'projectTitle', label: '课题名称', minWidth: 200 },
{ prop: 'customerName', label: '客户名称', minWidth: 180 },
{ prop: 'customerContact', label: '客户联系人', minWidth: 140 },
{ prop: 'customerPhone', label: '联系电话', minWidth: 150 }
]
}
export const assignmentKeywordHints: Record<AssignmentBizType, string> = {
cell_storage: '样本编码 / 母亲姓名、电话 / 医院 / 市场专员',
research_donation: '样本编码 / 母亲姓名、电话 / 医院 / 市场专员',
pilot_service: '申请单号、名称 / 渠道 / 服务订单 / 患者姓名、电话',
basic_experiment: '申请单号 / 课题 / 客户名称、联系人、电话'
}