|
|
@@ -0,0 +1,78 @@
|
|
|
+import { section } from './shared.js'
|
|
|
+
|
|
|
+const labels = {
|
|
|
+ protocolNo: '协议编号', donationNo: '捐赠编号', registerDate: '登记日期',
|
|
|
+ donationDate: '捐赠日期', motherName: '母亲姓名', motherPhone: '联系电话',
|
|
|
+ regionName: '采集地区', hospitalName: '采集医院', sampleCode: '样本编码',
|
|
|
+ payMode: '缴费模式', protocolAttachments: '协议附件'
|
|
|
+}
|
|
|
+
|
|
|
+export default {
|
|
|
+ key: 'protocol',
|
|
|
+ resource: 'protocols',
|
|
|
+ actions: { specialist: ['view', 'create', 'edit'], manager: ['view', 'create', 'edit'] },
|
|
|
+ listParams: ({ status } = {}) => ({ source: status || '' }),
|
|
|
+ statusOptions: [
|
|
|
+ { text: '全部来源', value: '' },
|
|
|
+ { text: '细胞存储', value: 'cell_storage' },
|
|
|
+ { text: '科研捐赠', value: 'research_donation' }
|
|
|
+ ],
|
|
|
+ detailSections(detail) {
|
|
|
+ if (Array.isArray(detail?.sections)) return detail.sections
|
|
|
+ const values = [
|
|
|
+ section('protocol', '协议信息', detail?.protocol || detail?.basic || detail, labels),
|
|
|
+ section('collection', '采集信息', detail?.collection, labels),
|
|
|
+ section('customer', '客户信息', detail?.customer, labels),
|
|
|
+ section('samples', '样本信息', { samples: detail?.samples }, labels)
|
|
|
+ ]
|
|
|
+ if (detail?.source === 'cell_storage' || detail?.payment) {
|
|
|
+ values.push(section('payment', '缴费信息', detail?.payment, labels))
|
|
|
+ }
|
|
|
+ values.push(section('attachments', '附件信息', detail?.attachments, labels))
|
|
|
+ return values
|
|
|
+ },
|
|
|
+ formSections: [
|
|
|
+ { key: 'protocol', title: '协议信息', fields: [
|
|
|
+ { key: 'source', label: '业务来源', type: 'tabs', required: true, createOnly: true, options: [
|
|
|
+ { text: '细胞存储', value: 'cell_storage' }, { text: '科研捐赠', value: 'research_donation' }
|
|
|
+ ] },
|
|
|
+ { key: 'protocolNo', label: '协议编号', source: 'cell_storage' },
|
|
|
+ { key: 'donationNo', label: '捐赠编号', source: 'research_donation' },
|
|
|
+ { key: 'registerDate', label: '登记日期', type: 'date', source: 'cell_storage' },
|
|
|
+ { key: 'donationDate', label: '捐赠日期', type: 'date', source: 'research_donation' },
|
|
|
+ { key: 'protocolTotalAmount', label: '协议总金额', type: 'number', source: 'cell_storage' },
|
|
|
+ { key: 'remark', label: '备注', type: 'textarea' }
|
|
|
+ ] },
|
|
|
+ { key: 'collection', title: '采集信息', nested: true, fields: [
|
|
|
+ { key: 'regionId', label: '采集地区', type: 'select', optionKey: 'regions' },
|
|
|
+ { key: 'hospitalId', label: '采集医院', type: 'select', optionKey: 'hospitals' },
|
|
|
+ { key: 'sampleCollectTime', label: '采集时间', type: 'datetime' }
|
|
|
+ ] },
|
|
|
+ { key: 'customer', title: '客户信息', nested: true, fields: [
|
|
|
+ { key: 'motherName', label: '母亲姓名', required: true },
|
|
|
+ { key: 'motherPhone', label: '联系电话', type: 'tel' },
|
|
|
+ { key: 'motherIdCard', label: '证件号码' },
|
|
|
+ { key: 'expectedDeliveryDate', label: '预产期', type: 'date' }
|
|
|
+ ] },
|
|
|
+ { key: 'samples', title: '样本信息', repeat: true, fields: [
|
|
|
+ { key: 'sampleTypeId', label: '样本类型', type: 'select', optionKey: 'sampleTypes' },
|
|
|
+ { key: 'sampleCode', label: '样本编码' },
|
|
|
+ { key: 'storageYears', label: '存储年限', type: 'number', source: 'cell_storage' }
|
|
|
+ ] },
|
|
|
+ { key: 'payment', title: '缴费信息(只读)', nested: true, readOnly: true, editOnly: true, source: 'cell_storage', fields: [
|
|
|
+ { key: 'payMode', label: '缴费模式', readOnly: true },
|
|
|
+ { key: 'contractAmount', label: '合同金额', readOnly: true },
|
|
|
+ { key: 'remark', label: '缴费备注', readOnly: true }
|
|
|
+ ] },
|
|
|
+ { key: 'attachments', title: '附件与确认', nested: true, fields: [
|
|
|
+ { key: 'protocolAttachments', label: '协议附件', type: 'upload', source: 'cell_storage' },
|
|
|
+ { key: 'consentFormUrls', label: '知情同意书', type: 'upload' },
|
|
|
+ { key: 'healthSurveyFormUrls', label: '健康调查表', type: 'upload', source: 'cell_storage' },
|
|
|
+ { key: 'attachmentUrls', label: '其他附件', type: 'upload', source: 'research_donation' },
|
|
|
+ { key: 'infectiousDiseaseReportUrls', label: '传染病报告', type: 'upload', source: 'research_donation' }
|
|
|
+ ] },
|
|
|
+ { key: 'confirm', title: '提交确认', nested: true, uiOnly: true, fields: [
|
|
|
+ { key: 'confirmed', label: '我已核对以上信息', type: 'checkbox', required: true }
|
|
|
+ ] }
|
|
|
+ ]
|
|
|
+}
|