feat(market): 新增委托加工业务并复用临床科研流程
独立 biz_type=contract_processing,申请/缴费/出库与临床科研共用逻辑; 业务子类型支持胎盘冻干粉/脂肪外泌体/NK/MSC/其他自定义,并补充菜单与生产质检 Tab。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
964384108a
commit
9b5e68f4ae
58 files changed
+717
-116
No files matched your search
@@ -5,12 +5,14 @@ export type BizType =
|
||||
| 'research_donation'
|
||||
| 'pilot_service'
|
||||
| 'basic_experiment'
|
||||
| 'contract_processing'
|
||||
export const bizLabels: Record<BizType, string> = {
|
||||
presign: '预签约',
|
||||
cell_storage: '细胞存储',
|
||||
research_donation: '科研捐赠',
|
||||
pilot_service: '中试服务',
|
||||
basic_experiment: '临床科研'
|
||||
basic_experiment: '临床科研',
|
||||
contract_processing: '委托加工'
|
||||
}
|
||||
export type ProjectOption = {
|
||||
id: string
|
||||
|
||||
@@ -284,6 +284,7 @@
|
||||
protocolStatusTagType
|
||||
} from '@/utils/protocol-payment-labels'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -393,7 +394,7 @@
|
||||
)
|
||||
|
||||
const isBasicExperiment = computed(
|
||||
() => String(props.detail?.bizType || '') === 'basic_experiment'
|
||||
() => isResearchLikeBiz(props.bizType || detail?.bizType)
|
||||
)
|
||||
|
||||
const pickupTimeLabel = computed(() =>
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { payStatusLabel, payStatusTagType } from '@/utils/status-tag-registry'
|
||||
import { getPilotBizConfig } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -143,7 +144,7 @@
|
||||
}
|
||||
|
||||
const isBasicExperiment = computed(
|
||||
() => String(props.detail?.bizType || '') === 'basic_experiment'
|
||||
() => isResearchLikeBiz(props.bizType || detail?.bizType)
|
||||
)
|
||||
|
||||
const pickupTimeLabel = computed(() =>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export type PilotBizType = 'pilot_service' | 'clinical_application' | 'basic_experiment'
|
||||
export type PilotBizType =
|
||||
| 'pilot_service'
|
||||
| 'clinical_application'
|
||||
| 'basic_experiment'
|
||||
| 'contract_processing'
|
||||
|
||||
export interface PilotBizTypeConfig {
|
||||
label: string
|
||||
@@ -20,6 +24,26 @@ export interface PilotBizTypeConfig {
|
||||
statusLabel: string
|
||||
}
|
||||
|
||||
const RESEARCH_LIKE_CONFIG: PilotBizTypeConfig = {
|
||||
label: '临床科研',
|
||||
applicationNoPrefix: 'JCSY',
|
||||
showChannel: true,
|
||||
showPatient: false,
|
||||
showConsent: false,
|
||||
showOtherAttachments: false,
|
||||
showStandardAttachments: true,
|
||||
showCheckup: false,
|
||||
showInfusionConfirm: false,
|
||||
showDelivery: true,
|
||||
showPayment: true,
|
||||
planLabel: '交付计划',
|
||||
scheduleLabel: '交付计划',
|
||||
pickupTimeLabel: '交付时间',
|
||||
locationLabel: '交付地点',
|
||||
methodLabel: '交付方式',
|
||||
statusLabel: '交付状态'
|
||||
}
|
||||
|
||||
export const PILOT_BIZ_TYPE_CONFIG: Record<PilotBizType, PilotBizTypeConfig> = {
|
||||
pilot_service: {
|
||||
label: '中试服务',
|
||||
@@ -60,23 +84,14 @@ export const PILOT_BIZ_TYPE_CONFIG: Record<PilotBizType, PilotBizTypeConfig> = {
|
||||
statusLabel: '输注状态'
|
||||
},
|
||||
basic_experiment: {
|
||||
...RESEARCH_LIKE_CONFIG,
|
||||
label: '临床科研',
|
||||
applicationNoPrefix: 'JCSY',
|
||||
showChannel: true,
|
||||
showPatient: false,
|
||||
showConsent: false,
|
||||
showOtherAttachments: false,
|
||||
showStandardAttachments: true,
|
||||
showCheckup: false,
|
||||
showInfusionConfirm: false,
|
||||
showDelivery: true,
|
||||
showPayment: true,
|
||||
planLabel: '交付计划',
|
||||
scheduleLabel: '交付计划',
|
||||
pickupTimeLabel: '交付时间',
|
||||
locationLabel: '交付地点',
|
||||
methodLabel: '交付方式',
|
||||
statusLabel: '交付状态'
|
||||
applicationNoPrefix: 'JCSY'
|
||||
},
|
||||
contract_processing: {
|
||||
...RESEARCH_LIKE_CONFIG,
|
||||
label: '委托加工',
|
||||
applicationNoPrefix: 'WTJG'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +101,11 @@ export function getPilotBizConfig(bizType?: string): PilotBizTypeConfig {
|
||||
}
|
||||
|
||||
export function resolvePilotBizType(bizType?: string): PilotBizType {
|
||||
if (bizType === 'clinical_application' || bizType === 'basic_experiment') {
|
||||
if (
|
||||
bizType === 'clinical_application' ||
|
||||
bizType === 'basic_experiment' ||
|
||||
bizType === 'contract_processing'
|
||||
) {
|
||||
return bizType
|
||||
}
|
||||
return 'pilot_service'
|
||||
|
||||
@@ -8,11 +8,42 @@ export const CLINICAL_RESEARCH_CATEGORY_OPTIONS = [
|
||||
export type ClinicalResearchCategory =
|
||||
(typeof CLINICAL_RESEARCH_CATEGORY_OPTIONS)[number]['value']
|
||||
|
||||
/** 委托加工 · 产品业务类型 */
|
||||
export const CONTRACT_PROCESSING_CATEGORY_OPTIONS = [
|
||||
{ value: 'placenta_freeze_dried', label: '胎盘冻干粉' },
|
||||
{ value: 'adipose_exosome', label: '脂肪外泌体' },
|
||||
{ value: 'nk', label: 'NK' },
|
||||
{ value: 'msc', label: 'MSC' }
|
||||
] as const
|
||||
|
||||
export type ContractProcessingCategory =
|
||||
(typeof CONTRACT_PROCESSING_CATEGORY_OPTIONS)[number]['value']
|
||||
|
||||
/** 前端「其他」占位,提交时改为自定义文本 */
|
||||
export const RESEARCH_CATEGORY_OTHER_VALUE = '__other__'
|
||||
|
||||
const LABEL_MAP = Object.fromEntries(
|
||||
CLINICAL_RESEARCH_CATEGORY_OPTIONS.map((o) => [o.value, o.label])
|
||||
[
|
||||
...CLINICAL_RESEARCH_CATEGORY_OPTIONS,
|
||||
...CONTRACT_PROCESSING_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
|
||||
}
|
||||
|
||||
export function researchCategoryOptionsForBiz(bizType?: string | null) {
|
||||
if (bizType === 'contract_processing') {
|
||||
return [
|
||||
...CONTRACT_PROCESSING_CATEGORY_OPTIONS,
|
||||
{ value: RESEARCH_CATEGORY_OTHER_VALUE, label: '其他' }
|
||||
]
|
||||
}
|
||||
return [...CLINICAL_RESEARCH_CATEGORY_OPTIONS]
|
||||
}
|
||||
|
||||
export function isFixedContractProcessingCategory(code?: string | null): boolean {
|
||||
return CONTRACT_PROCESSING_CATEGORY_OPTIONS.some((o) => o.value === code)
|
||||
}
|
||||
@@ -605,6 +605,58 @@ export const sqxpAdminRoutes: AppRouteRecord[] = [
|
||||
]
|
||||
},
|
||||
|
||||
// ── 委托加工(复用临床科研页面,bizType=contract_processing)──────────
|
||||
{
|
||||
id: 'CPG00000000000000000000000000001',
|
||||
name: 'ContractProcessing',
|
||||
path: 'contract-processing',
|
||||
component: '',
|
||||
meta: {
|
||||
title: '委托加工',
|
||||
icon: 'ri:tools-line',
|
||||
keepAlive: false,
|
||||
roles: ['admin']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
id: 'CPG00000000000000000000000000002',
|
||||
name: 'ContractProcessingApplication',
|
||||
path: 'application',
|
||||
component: '/pilot-service/pilot-application/index',
|
||||
meta: {
|
||||
title: '委托加工申请单',
|
||||
keepAlive: true,
|
||||
menuCode: 'contract-processing:application:list'
|
||||
},
|
||||
props: { bizType: 'contract_processing' }
|
||||
},
|
||||
{
|
||||
id: 'CPG00000000000000000000000000003',
|
||||
name: 'ContractProcessingPaymentConfirm',
|
||||
path: 'payment-confirm',
|
||||
component: '/pilot-service/clinical-payment-confirm/index',
|
||||
meta: {
|
||||
title: '缴退费财务确认',
|
||||
keepAlive: true,
|
||||
menuCode: 'contract-processing:payment-confirm:list'
|
||||
},
|
||||
props: { bizType: 'contract_processing' }
|
||||
},
|
||||
{
|
||||
id: 'CPG00000000000000000000000000004',
|
||||
name: 'ContractProcessingOutboundRelease',
|
||||
path: 'outbound-release-review',
|
||||
component: '/pilot-service/outbound-release-review/index',
|
||||
meta: {
|
||||
title: '出库放行审核',
|
||||
keepAlive: true,
|
||||
menuCode: 'contract-processing:outbound-release-review:list'
|
||||
},
|
||||
props: { bizType: 'contract_processing' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// ── 器械销售(市场侧栏末位;占位页待完善)────────────────────────────
|
||||
{
|
||||
id: 'DEV00000000000000000000000000001',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { OutboundQcDetail } from '@/api/qc-work-order'
|
||||
import type { ViewField, ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import { maskIdCard } from '@/utils/mask-sensitive'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
import {
|
||||
applicationStatusLabel,
|
||||
applicationStatusTagType,
|
||||
@@ -18,6 +19,7 @@ export type OutboundViewContextVariant =
|
||||
| 'pilot_service'
|
||||
| 'clinical_application'
|
||||
| 'basic_experiment'
|
||||
| 'contract_processing'
|
||||
|
||||
const SECTION_TITLES: Record<
|
||||
OutboundViewContextVariant,
|
||||
@@ -34,6 +36,10 @@ const SECTION_TITLES: Record<
|
||||
basic_experiment: {
|
||||
application: '临床科研申请信息',
|
||||
schedule: '交付计划信息'
|
||||
},
|
||||
contract_processing: {
|
||||
application: '委托加工申请信息',
|
||||
schedule: '交付计划信息'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +62,7 @@ function buildDefaultApplicationFields(
|
||||
app: NonNullable<OutboundQcDetail['application']>,
|
||||
variant: OutboundViewContextVariant
|
||||
) {
|
||||
if (variant === 'basic_experiment') {
|
||||
if (isResearchLikeBiz(variant)) {
|
||||
return buildBasicExperimentApplicationFields(app)
|
||||
}
|
||||
return [
|
||||
@@ -82,6 +88,7 @@ export function buildOutboundPilotContextSections(
|
||||
const schedule = detail.infusionSchedule
|
||||
const products = detail.products || []
|
||||
const titles = SECTION_TITLES[variant]
|
||||
const researchLike = isResearchLikeBiz(variant)
|
||||
const result: ViewSection[] = []
|
||||
|
||||
if (app) {
|
||||
@@ -91,7 +98,7 @@ export function buildOutboundPilotContextSections(
|
||||
})
|
||||
}
|
||||
|
||||
if (patient && variant !== 'basic_experiment') {
|
||||
if (patient && !researchLike) {
|
||||
result.push({
|
||||
title: '患者信息',
|
||||
fields: [
|
||||
@@ -113,7 +120,7 @@ export function buildOutboundPilotContextSections(
|
||||
})
|
||||
}
|
||||
|
||||
if (plan && variant !== 'basic_experiment') {
|
||||
if (plan && !researchLike) {
|
||||
result.push({
|
||||
title: '输注方案信息',
|
||||
fields: [
|
||||
@@ -128,12 +135,12 @@ export function buildOutboundPilotContextSections(
|
||||
}
|
||||
|
||||
if (schedule) {
|
||||
const pickupLabel = variant === 'basic_experiment' ? '交付时间' : '输注时间'
|
||||
const pickupLabel = researchLike ? '交付时间' : '输注时间'
|
||||
const scheduleFields: ViewField[] = [
|
||||
{ label: pickupLabel, value: schedule.infusionTime || '—' }
|
||||
]
|
||||
|
||||
if (variant === 'basic_experiment') {
|
||||
if (researchLike) {
|
||||
scheduleFields.push({
|
||||
label: '售卖金额',
|
||||
value:
|
||||
@@ -154,7 +161,7 @@ export function buildOutboundPilotContextSections(
|
||||
tagType: scheduleStatusTagType(schedule.scheduleStatus || '') as ViewField['tagType']
|
||||
})
|
||||
|
||||
if (variant !== 'basic_experiment') {
|
||||
if (!researchLike) {
|
||||
scheduleFields.push({
|
||||
label: '输注状态',
|
||||
value: infusionStatusLabel(schedule.infusionStatus || ''),
|
||||
@@ -186,9 +193,9 @@ export function buildOutboundPilotContextSections(
|
||||
}
|
||||
|
||||
export function resolveOutboundViewVariant(bizType?: string | null): OutboundViewContextVariant {
|
||||
if (bizType === 'clinical_application' || bizType === 'basic_experiment') {
|
||||
return bizType
|
||||
}
|
||||
if (bizType === 'clinical_application') return 'clinical_application'
|
||||
if (bizType === 'contract_processing') return 'contract_processing'
|
||||
if (bizType === 'basic_experiment') return 'basic_experiment'
|
||||
return 'pilot_service'
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function keywordMatchesWorkOrder(
|
||||
const fields =
|
||||
tabKey === 'temporary'
|
||||
? [row.remark]
|
||||
: tabKey === 'outbound_basic_experiment'
|
||||
: tabKey === 'outbound_basic_experiment' || tabKey === 'outbound_contract_processing'
|
||||
? [
|
||||
row.workOrderNo,
|
||||
row.applicationNo,
|
||||
|
||||
@@ -251,6 +251,19 @@ const CARD_META_BY_TAB: Record<ProductionWorkOrderTabKey, ProductionWorkOrderCar
|
||||
allowEditRemark: true,
|
||||
allowDelete: false
|
||||
},
|
||||
outbound_contract_processing: {
|
||||
tabKey: 'outbound_contract_processing',
|
||||
showCategoryTag: false,
|
||||
showProtocolFeeSummary: false,
|
||||
showOutboundFeeSummary: true,
|
||||
showCellProducts: true,
|
||||
metaFields: outboundBasicExperimentFields,
|
||||
allowDispatchQc: true,
|
||||
allowSampleReception: false,
|
||||
allowDispatchComplete: true,
|
||||
allowEditRemark: true,
|
||||
allowDelete: false
|
||||
},
|
||||
outbound_clinical_application: {
|
||||
tabKey: 'outbound_clinical_application',
|
||||
showCategoryTag: false,
|
||||
|
||||
@@ -26,6 +26,7 @@ const CATEGORY_LABELS: Record<ProductionWorkOrderCategoryKey, string> = {
|
||||
inbound_research_donation: '科研捐赠',
|
||||
outbound_pilot_service: '中试服务',
|
||||
outbound_basic_experiment: '临床科研',
|
||||
outbound_contract_processing: '委托加工',
|
||||
temporary: '临时'
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ const CATEGORY_TAG_TYPES: Record<ProductionWorkOrderCategoryKey, TagType> = {
|
||||
inbound_research_donation: 'primary',
|
||||
outbound_pilot_service: 'info',
|
||||
outbound_basic_experiment: 'info',
|
||||
outbound_contract_processing: 'info',
|
||||
temporary: 'warning'
|
||||
}
|
||||
|
||||
|
||||
@@ -23,10 +23,17 @@ describe('production work order tabs — hide pilot service', () => {
|
||||
const pilot = { workOrderType: 'outbound', bizType: 'pilot_service' }
|
||||
const defaultPilot = { workOrderType: 'outbound' }
|
||||
const basic = { workOrderType: 'outbound', bizType: 'basic_experiment' }
|
||||
const contract = { workOrderType: 'outbound', bizType: 'contract_processing' }
|
||||
assert.equal(isPilotServiceOutboundWorkOrder(pilot), true)
|
||||
assert.equal(isPilotServiceOutboundWorkOrder(defaultPilot), true)
|
||||
assert.equal(workOrderMatchesTab(pilot as any, 'all'), false)
|
||||
assert.equal(workOrderMatchesTab(defaultPilot as any, 'all'), false)
|
||||
assert.equal(workOrderMatchesTab(basic as any, 'all'), true)
|
||||
assert.equal(workOrderMatchesTab(contract as any, 'all'), true)
|
||||
assert.equal(workOrderMatchesTab(contract as any, 'outbound_contract_processing'), true)
|
||||
})
|
||||
|
||||
it('visible tabs include contract processing', () => {
|
||||
assert.ok(PRODUCTION_WORK_ORDER_VISIBLE_TABS.some((t) => t.key === 'outbound_contract_processing'))
|
||||
})
|
||||
})
|
||||
@@ -6,6 +6,7 @@ export type ProductionWorkOrderTabKey =
|
||||
| 'inbound_research_donation'
|
||||
| 'outbound_pilot_service'
|
||||
| 'outbound_basic_experiment'
|
||||
| 'outbound_contract_processing'
|
||||
| 'outbound_clinical_application'
|
||||
| 'temporary'
|
||||
|
||||
@@ -17,7 +18,7 @@ export type ProductionWorkOrderTabConfig = {
|
||||
group: ProductionWorkOrderTabGroup
|
||||
workOrderType: 'inbound' | 'outbound' | 'temporary'
|
||||
receptionSource?: 'cell_storage' | 'research_donation'
|
||||
bizType?: 'pilot_service' | 'basic_experiment' | 'clinical_application'
|
||||
bizType?: 'pilot_service' | 'basic_experiment' | 'contract_processing' | 'clinical_application'
|
||||
listLayout: 'inbound-grouped' | 'standalone'
|
||||
/** 侧栏 Tab 不展示(保留 key 供路由/数据解析) */
|
||||
hidden?: boolean
|
||||
@@ -65,6 +66,14 @@ export const PRODUCTION_WORK_ORDER_TABS: ProductionWorkOrderTabConfig[] = [
|
||||
bizType: 'basic_experiment',
|
||||
listLayout: 'standalone'
|
||||
},
|
||||
{
|
||||
key: 'outbound_contract_processing',
|
||||
label: '委托加工生产',
|
||||
group: 'outbound',
|
||||
workOrderType: 'outbound',
|
||||
bizType: 'contract_processing',
|
||||
listLayout: 'standalone'
|
||||
},
|
||||
{
|
||||
key: 'outbound_clinical_application',
|
||||
label: '临床应用生产',
|
||||
@@ -129,6 +138,7 @@ export function resolveTabKeyFromWorkOrder(row: {
|
||||
if (wt === 'outbound') {
|
||||
const bt = row.bizType || 'pilot_service'
|
||||
if (bt === 'basic_experiment') return 'outbound_basic_experiment'
|
||||
if (bt === 'contract_processing') return 'outbound_contract_processing'
|
||||
if (bt === 'clinical_application') return 'outbound_clinical_application'
|
||||
return 'outbound_pilot_service'
|
||||
}
|
||||
@@ -140,7 +150,7 @@ export function resolveTabKeyFromWorkOrder(row: {
|
||||
export function keywordPlaceholderForTab(tab: ProductionWorkOrderTabConfig): string {
|
||||
if (tab.key === 'all') return '工单号 / 样本编码 / 申请单号 / 产品名称等'
|
||||
if (tab.key === 'temporary') return '备注'
|
||||
if (tab.key === 'outbound_basic_experiment') {
|
||||
if (tab.key === 'outbound_basic_experiment' || tab.key === 'outbound_contract_processing') {
|
||||
return '工单号/申请单号/课题名称/客户'
|
||||
}
|
||||
if (tab.group === 'outbound') return '工单号/申请单号/申请单名称/患者'
|
||||
|
||||
@@ -75,7 +75,7 @@ function keywordMatchesWorkOrder(
|
||||
const fields =
|
||||
tabKey === 'temporary'
|
||||
? [row.workOrderNo, row.productionWorkOrderNo]
|
||||
: tabKey === 'outbound_basic_experiment'
|
||||
: tabKey === 'outbound_basic_experiment' || tabKey === 'outbound_contract_processing'
|
||||
? [
|
||||
row.workOrderNo,
|
||||
row.applicationNo,
|
||||
|
||||
@@ -356,6 +356,20 @@ const CARD_META_BY_TAB: Record<QcWorkOrderTabKey, QcWorkOrderCardMetaConfig> = {
|
||||
allowEditRemark: true,
|
||||
allowDelete: false
|
||||
},
|
||||
outbound_contract_processing: {
|
||||
tabKey: 'outbound_contract_processing',
|
||||
listLayout: 'outbound-grouped',
|
||||
showCategoryTag: false,
|
||||
showTriggerTag: true,
|
||||
showProtocolFeeSummary: false,
|
||||
showOutboundFeeSummary: true,
|
||||
showCellProducts: true,
|
||||
metaFields: outboundGroupedFields,
|
||||
buildGroupContextParts: buildOutboundBasicExperimentGroupContext,
|
||||
allowEditTemporary: false,
|
||||
allowEditRemark: true,
|
||||
allowDelete: false
|
||||
},
|
||||
outbound_clinical_application: {
|
||||
tabKey: 'outbound_clinical_application',
|
||||
listLayout: 'standalone',
|
||||
|
||||
@@ -25,6 +25,7 @@ const CATEGORY_LABELS: Record<QcWorkOrderCategoryKey, string> = {
|
||||
inbound_research_donation: '科研捐赠',
|
||||
outbound_pilot_service: '中试服务',
|
||||
outbound_basic_experiment: '临床科研',
|
||||
outbound_contract_processing: '委托加工',
|
||||
temporary: '临时'
|
||||
}
|
||||
|
||||
@@ -33,6 +34,7 @@ const CATEGORY_TAG_TYPES: Record<QcWorkOrderCategoryKey, TagType> = {
|
||||
inbound_research_donation: 'primary',
|
||||
outbound_pilot_service: 'info',
|
||||
outbound_basic_experiment: 'info',
|
||||
outbound_contract_processing: 'info',
|
||||
temporary: 'warning'
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,17 @@ describe('qc work order tabs — hide pilot service', () => {
|
||||
const pilot = { workOrderType: 'outbound', bizType: 'pilot_service' }
|
||||
const defaultPilot = { workOrderType: 'outbound' }
|
||||
const basic = { workOrderType: 'outbound', bizType: 'basic_experiment' }
|
||||
const contract = { workOrderType: 'outbound', bizType: 'contract_processing' }
|
||||
assert.equal(isPilotServiceOutboundWorkOrder(pilot), true)
|
||||
assert.equal(isPilotServiceOutboundWorkOrder(defaultPilot), true)
|
||||
assert.equal(workOrderMatchesTab(pilot as any, 'all'), false)
|
||||
assert.equal(workOrderMatchesTab(defaultPilot as any, 'all'), false)
|
||||
assert.equal(workOrderMatchesTab(basic as any, 'all'), true)
|
||||
assert.equal(workOrderMatchesTab(contract as any, 'all'), true)
|
||||
assert.equal(workOrderMatchesTab(contract as any, 'outbound_contract_processing'), true)
|
||||
})
|
||||
|
||||
it('visible tabs include contract processing', () => {
|
||||
assert.ok(QC_WORK_ORDER_VISIBLE_TABS.some((t) => t.key === 'outbound_contract_processing'))
|
||||
})
|
||||
})
|
||||
@@ -6,6 +6,7 @@ export type QcWorkOrderTabKey =
|
||||
| 'inbound_research_donation'
|
||||
| 'outbound_pilot_service'
|
||||
| 'outbound_basic_experiment'
|
||||
| 'outbound_contract_processing'
|
||||
| 'outbound_clinical_application'
|
||||
| 'temporary'
|
||||
|
||||
@@ -17,7 +18,7 @@ export type QcWorkOrderTabConfig = {
|
||||
group: QcWorkOrderTabGroup
|
||||
workOrderType?: 'inbound' | 'outbound' | 'temporary'
|
||||
receptionSource?: 'cell_storage' | 'research_donation'
|
||||
bizType?: 'pilot_service' | 'basic_experiment' | 'clinical_application'
|
||||
bizType?: 'pilot_service' | 'basic_experiment' | 'contract_processing' | 'clinical_application'
|
||||
listLayout: 'inbound-grouped' | 'outbound-grouped' | 'standalone'
|
||||
/** 侧栏 Tab 不展示(保留 key 供路由/数据解析) */
|
||||
hidden?: boolean
|
||||
@@ -65,6 +66,14 @@ export const QC_WORK_ORDER_TABS: QcWorkOrderTabConfig[] = [
|
||||
bizType: 'basic_experiment',
|
||||
listLayout: 'outbound-grouped'
|
||||
},
|
||||
{
|
||||
key: 'outbound_contract_processing',
|
||||
label: '委托加工质检',
|
||||
group: 'outbound',
|
||||
workOrderType: 'outbound',
|
||||
bizType: 'contract_processing',
|
||||
listLayout: 'outbound-grouped'
|
||||
},
|
||||
{
|
||||
key: 'outbound_clinical_application',
|
||||
label: '临床应用质检',
|
||||
@@ -127,6 +136,7 @@ export function resolveTabKeyFromWorkOrder(row: {
|
||||
if (wt === 'outbound') {
|
||||
const bt = row.bizType || 'pilot_service'
|
||||
if (bt === 'basic_experiment') return 'outbound_basic_experiment'
|
||||
if (bt === 'contract_processing') return 'outbound_contract_processing'
|
||||
if (bt === 'clinical_application') return 'outbound_clinical_application'
|
||||
return 'outbound_pilot_service'
|
||||
}
|
||||
@@ -142,7 +152,7 @@ export function tabUsesInfusionTimeFilter(tab: QcWorkOrderTabConfig): boolean {
|
||||
export function keywordPlaceholderForTab(tab: QcWorkOrderTabConfig): string {
|
||||
if (tab.key === 'all') return '工单号 / 样本编码 / 母亲姓名 / 申请单号 / 产品名称等'
|
||||
if (tab.key === 'temporary') return '工单号 / 外部编号'
|
||||
if (tab.key === 'outbound_basic_experiment') {
|
||||
if (tab.key === 'outbound_basic_experiment' || tab.key === 'outbound_contract_processing') {
|
||||
return '工单号/申请单号/课题名称/客户'
|
||||
}
|
||||
if (tab.group === 'outbound') return '工单号/申请单号/申请单名称/患者'
|
||||
@@ -157,7 +167,9 @@ export function keywordPlaceholderForTab(tab: QcWorkOrderTabConfig): string {
|
||||
|
||||
export function filterTimeLabelForTab(tab: QcWorkOrderTabConfig): string {
|
||||
if (tab.key === 'all') return '创建时间'
|
||||
if (tab.key === 'outbound_basic_experiment') return '交付时间'
|
||||
if (tab.key === 'outbound_basic_experiment' || tab.key === 'outbound_contract_processing') {
|
||||
return '交付时间'
|
||||
}
|
||||
if (tab.group === 'outbound') return '输注时间'
|
||||
return '创建时间'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/** 临床科研 / 委托加工:共用申请、交付、缴费、出库流程 */
|
||||
export const RESEARCH_LIKE_BIZ_TYPES = ['basic_experiment', 'contract_processing'] as const
|
||||
|
||||
export type ResearchLikeBizType = (typeof RESEARCH_LIKE_BIZ_TYPES)[number]
|
||||
|
||||
export function isResearchLikeBiz(bizType?: string | null): boolean {
|
||||
return RESEARCH_LIKE_BIZ_TYPES.includes((bizType || '') as ResearchLikeBizType)
|
||||
}
|
||||
|
||||
export function isContractProcessing(bizType?: string | null): boolean {
|
||||
return (bizType || '') === 'contract_processing'
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import { resolveVoidTypeLabel } from '@/utils/void-type-dict'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
// ── 类型定义 ──────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -228,7 +229,8 @@ export const receptionSource: StatusRegistry = {
|
||||
outbound: { label: '出库', tagType: 'primary' },
|
||||
pilot_service: { label: '中试服务', tagType: 'primary' },
|
||||
clinical_application: { label: '临床应用', tagType: 'warning' },
|
||||
basic_experiment: { label: '临床科研', tagType: 'primary' }
|
||||
basic_experiment: { label: '临床科研', tagType: 'primary' },
|
||||
contract_processing: { label: '委托加工', tagType: 'primary' }
|
||||
}
|
||||
export const receptionSourceLabel = createLabelGetter(receptionSource)
|
||||
export const receptionSourceTagType = createTagTypeGetter(receptionSource)
|
||||
@@ -761,7 +763,8 @@ export function bizTypeLabel(type: string): string {
|
||||
const map: Record<string, string> = {
|
||||
pilot_service: '中试服务',
|
||||
clinical_application: '临床应用',
|
||||
basic_experiment: '临床科研'
|
||||
basic_experiment: '临床科研',
|
||||
contract_processing: '委托加工'
|
||||
}
|
||||
return map[type] || type || '-'
|
||||
}
|
||||
@@ -769,14 +772,15 @@ export function bizTypeTagType(type: string): string {
|
||||
const map: Record<string, string> = {
|
||||
pilot_service: 'primary',
|
||||
clinical_application: 'warning',
|
||||
basic_experiment: 'primary'
|
||||
basic_experiment: 'primary',
|
||||
contract_processing: 'primary'
|
||||
}
|
||||
return map[type] || 'info'
|
||||
}
|
||||
|
||||
// ========== 中试服务 - 产品状态 ==========
|
||||
export function productStatusLabel(status: string, bizType?: string): string {
|
||||
const isBasicExperiment = bizType === 'basic_experiment'
|
||||
const isBasicExperiment = isResearchLikeBiz(bizType)
|
||||
const map: Record<string, string> = {
|
||||
dtz: isBasicExperiment ? '待交付' : '待输注',
|
||||
yrqr: '已用户确认',
|
||||
|
||||
@@ -594,6 +594,7 @@
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ClinicalRefundConfirmTab' })
|
||||
|
||||
@@ -602,7 +603,7 @@
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const isBasicExperiment = computed(
|
||||
() => resolvePilotBizType(props.bizType) === 'basic_experiment'
|
||||
() => isResearchLikeBiz(props.bizType)
|
||||
)
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const keywordPlaceholder = computed(() =>
|
||||
|
||||
@@ -636,13 +636,14 @@
|
||||
import { useAttachmentDropZone } from '@/composables/useAttachmentDropZone'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ClinicalPaymentConfirm' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const effectiveBizType = computed(() => resolvePilotBizType(props.bizType))
|
||||
const isBasicExperiment = computed(() => effectiveBizType.value === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(effectiveBizType.value))
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const route = useRoute()
|
||||
const mainTab = ref<'payment' | 'refund'>('payment')
|
||||
|
||||
+2
-1
@@ -247,6 +247,7 @@
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
type AttachmentItem = {
|
||||
id: string
|
||||
@@ -269,7 +270,7 @@
|
||||
() => getPilotBizConfig(resolvePilotBizType(props.bizType)).pickupTimeLabel
|
||||
)
|
||||
const isBasicExperiment = computed(
|
||||
() => resolvePilotBizType(props.bizType) === 'basic_experiment'
|
||||
() => isResearchLikeBiz(props.bizType)
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
+2
-1
@@ -480,6 +480,7 @@
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
import { getPilotBizConfig } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
@@ -529,7 +530,7 @@
|
||||
const optionsLoadIssue = ref('')
|
||||
|
||||
const bizConfig = computed(() => getPilotBizConfig(scheduleContext.bizType))
|
||||
const isBasicExperiment = computed(() => scheduleContext.bizType === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(scheduleContext.bizType))
|
||||
|
||||
const applicationContextLabel = computed(() => {
|
||||
const no = scheduleContext.applicationNo?.trim()
|
||||
|
||||
+2
-2
@@ -133,6 +133,7 @@
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { getPilotBizConfig } from '@/config/pilot-biz-type'
|
||||
import { resolveOutboundViewVariant } from '@/utils/outbound-qc-pilot-view-sections'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ScheduleViewDialog' })
|
||||
|
||||
@@ -179,8 +180,7 @@
|
||||
|
||||
const isBasicExperiment = computed(
|
||||
() =>
|
||||
detail.value?.application?.bizType === 'basic_experiment' ||
|
||||
detail.value?.bizType === 'basic_experiment'
|
||||
isResearchLikeBiz(detail.value?.application?.bizType || detail.value?.bizType)
|
||||
)
|
||||
|
||||
const scheduleBizType = computed(() =>
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<dl
|
||||
class="review-context-grid"
|
||||
:class="{ 'review-context-grid--cols3': reviewBizType === 'basic_experiment' }"
|
||||
:class="{ 'review-context-grid--cols3': isResearchLikeReview }"
|
||||
>
|
||||
<div
|
||||
v-for="item in reviewContextItems"
|
||||
@@ -230,6 +230,7 @@
|
||||
type OutboundReleaseReviewDetail
|
||||
} from '@/api/outbound-release-review'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
import {
|
||||
bizTypeLabel,
|
||||
qcStatusLabel,
|
||||
@@ -275,6 +276,7 @@
|
||||
const reviewBizType = computed(() =>
|
||||
resolvePilotBizType(singleDetail.value?.application?.bizType)
|
||||
)
|
||||
const isResearchLikeReview = computed(() => isResearchLikeBiz(reviewBizType.value))
|
||||
const reviewBizConfig = computed(() => getPilotBizConfig(reviewBizType.value))
|
||||
const reviewBizTypeLabel = computed(() => {
|
||||
const fromApi = singleDetail.value?.application?.bizTypeLabel
|
||||
@@ -371,9 +373,7 @@
|
||||
const d = singleDetail.value
|
||||
if (!d) return [] as Array<{ label: string; value: string; span?: boolean }>
|
||||
const pickupLabel = reviewBizConfig.value.pickupTimeLabel
|
||||
const isBasicExperiment = reviewBizType.value === 'basic_experiment'
|
||||
|
||||
if (isBasicExperiment) {
|
||||
if (isResearchLikeReview.value) {
|
||||
return [
|
||||
{ label: '课题名称', value: d.application?.projectTitle || '—' },
|
||||
{ label: '客户名称', value: d.application?.customerName || '—' },
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
type OutboundReleaseReview
|
||||
} from '@/api/outbound-release-review'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'PilotServiceOutboundReleaseReview' })
|
||||
|
||||
@@ -170,7 +171,7 @@
|
||||
const effectiveBizType = computed(() => resolvePilotBizType(props.bizType))
|
||||
const bizConfig = computed(() => getPilotBizConfig(effectiveBizType.value))
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
const isBasicExperiment = computed(() => effectiveBizType.value === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(effectiveBizType.value))
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名'
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
:required="!isEdit && projectRequired"
|
||||
><ProjectSelect
|
||||
v-model="formData.projectId"
|
||||
:biz-type="isBasicExperiment ? 'basic_experiment' : 'pilot_service'"
|
||||
:biz-type="isBasicExperiment ? props.bizType || 'basic_experiment' : 'pilot_service'"
|
||||
:disabled="isEdit"
|
||||
:project-name="formData.projectName"
|
||||
@required="projectRequired = $event"
|
||||
@@ -71,21 +71,35 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-if="isBasicExperiment">
|
||||
<el-form-item label="业务类型" prop="researchCategory">
|
||||
<el-form-item label="业务类型" prop="researchCategorySelect">
|
||||
<el-select
|
||||
v-model="formData.researchCategory"
|
||||
v-model="researchCategorySelect"
|
||||
class="w-full"
|
||||
clearable
|
||||
placeholder="请选择业务类型"
|
||||
@change="onResearchCategorySelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="opt in clinicalResearchCategoryOptions"
|
||||
v-for="opt in researchCategoryOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showResearchCategoryOther"
|
||||
label="自定义业务类型"
|
||||
prop="researchCategoryCustom"
|
||||
>
|
||||
<el-input
|
||||
v-model="researchCategoryCustom"
|
||||
maxlength="64"
|
||||
show-word-limit
|
||||
placeholder="请输入业务类型"
|
||||
@input="syncResearchCategoryFromOther"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道" prop="channelId">
|
||||
<el-select
|
||||
v-model="formData.channelId"
|
||||
@@ -1321,12 +1335,15 @@
|
||||
} 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'
|
||||
import {
|
||||
RESEARCH_CATEGORY_OTHER_VALUE,
|
||||
isFixedContractProcessingCategory,
|
||||
researchCategoryOptionsForBiz
|
||||
} from '@/constants/clinical-research-category'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ApplicationFormDialog' })
|
||||
|
||||
const clinicalResearchCategoryOptions = CLINICAL_RESEARCH_CATEGORY_OPTIONS
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
editId: string | null
|
||||
@@ -1342,7 +1359,53 @@
|
||||
const isEdit = computed(() => !!props.editId)
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
const isBasicExperiment = computed(() => props.bizType === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(props.bizType))
|
||||
const researchCategoryOptions = computed(() => researchCategoryOptionsForBiz(props.bizType))
|
||||
const researchCategorySelect = ref('')
|
||||
const researchCategoryCustom = ref('')
|
||||
const showResearchCategoryOther = computed(
|
||||
() =>
|
||||
props.bizType === 'contract_processing' &&
|
||||
researchCategorySelect.value === RESEARCH_CATEGORY_OTHER_VALUE
|
||||
)
|
||||
|
||||
function applyResearchCategoryToForm() {
|
||||
if (showResearchCategoryOther.value) {
|
||||
formData.researchCategory = (researchCategoryCustom.value || '').trim()
|
||||
} else {
|
||||
formData.researchCategory = researchCategorySelect.value || ''
|
||||
}
|
||||
}
|
||||
|
||||
function onResearchCategorySelectChange() {
|
||||
if (!showResearchCategoryOther.value) {
|
||||
researchCategoryCustom.value = ''
|
||||
}
|
||||
applyResearchCategoryToForm()
|
||||
}
|
||||
|
||||
function syncResearchCategoryFromOther() {
|
||||
applyResearchCategoryToForm()
|
||||
}
|
||||
|
||||
function hydrateResearchCategorySelect(code?: string | null) {
|
||||
const value = (code || '').trim()
|
||||
if (!value) {
|
||||
researchCategorySelect.value = ''
|
||||
researchCategoryCustom.value = ''
|
||||
formData.researchCategory = ''
|
||||
return
|
||||
}
|
||||
if (props.bizType === 'contract_processing' && !isFixedContractProcessingCategory(value)) {
|
||||
researchCategorySelect.value = RESEARCH_CATEGORY_OTHER_VALUE
|
||||
researchCategoryCustom.value = value
|
||||
formData.researchCategory = value
|
||||
return
|
||||
}
|
||||
researchCategorySelect.value = value
|
||||
researchCategoryCustom.value = ''
|
||||
formData.researchCategory = value
|
||||
}
|
||||
|
||||
// ── Tabs ───────────────────────────────────────────────────────────────
|
||||
const formTabs = computed(() => {
|
||||
@@ -1412,7 +1475,42 @@
|
||||
channelServiceOrderId: [
|
||||
{ required: true, message: '请选择服务订单', trigger: 'change' }
|
||||
],
|
||||
researchCategory: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
|
||||
researchCategorySelect: [
|
||||
{
|
||||
validator: (_rule: any, _value: any, callback: (e?: Error) => void) => {
|
||||
if (!isBasicExperiment.value) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
if (!researchCategorySelect.value) {
|
||||
callback(new Error('请选择业务类型'))
|
||||
return
|
||||
}
|
||||
if (showResearchCategoryOther.value && !(researchCategoryCustom.value || '').trim()) {
|
||||
callback(new Error('请填写自定义业务类型'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
researchCategoryCustom: [
|
||||
{
|
||||
validator: (_rule: any, _value: any, callback: (e?: Error) => void) => {
|
||||
if (!showResearchCategoryOther.value) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
if (!(researchCategoryCustom.value || '').trim()) {
|
||||
callback(new Error('请填写自定义业务类型'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
projectTitle: [{ required: true, message: '请填写课题名称', trigger: 'blur' }],
|
||||
customerName: [{ required: true, message: '请填写客户名称', trigger: 'blur' }],
|
||||
customerContact: [{ required: true, message: '请填写客户联系人', trigger: 'blur' }],
|
||||
@@ -2842,7 +2940,7 @@
|
||||
formData.customerName = ''
|
||||
formData.customerContact = ''
|
||||
formData.customerPhone = ''
|
||||
formData.researchCategory = ''
|
||||
hydrateResearchCategorySelect('')
|
||||
saleProductLines.value = []
|
||||
saleLineSeq = 0
|
||||
patientForm.customerId = ''
|
||||
@@ -2895,7 +2993,7 @@
|
||||
formData.customerName = detail.customerName || ''
|
||||
formData.customerContact = detail.customerContact || ''
|
||||
formData.customerPhone = detail.customerPhone || ''
|
||||
formData.researchCategory = detail.researchCategory || ''
|
||||
hydrateResearchCategorySelect(detail.researchCategory || '')
|
||||
|
||||
if (detail.consentAttachmentFiles?.length) {
|
||||
consentFileList.value = mapAttachmentFilesFromDetail(detail.consentAttachmentFiles)
|
||||
@@ -3108,6 +3206,7 @@
|
||||
}
|
||||
|
||||
if (isBasicExperiment.value) {
|
||||
applyResearchCategoryToForm()
|
||||
payload.researchCategory = formData.researchCategory || undefined
|
||||
payload.channelId = formData.channelId || undefined
|
||||
payload.projectTitle = formData.projectTitle || undefined
|
||||
|
||||
@@ -899,6 +899,7 @@
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import { getPilotBizConfig } from '@/config/pilot-biz-type'
|
||||
import { clinicalResearchCategoryLabel } from '@/constants/clinical-research-category'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
import {
|
||||
applicationStatusLabel,
|
||||
applicationStatusTagType,
|
||||
@@ -994,7 +995,7 @@
|
||||
const isYfkOrder = computed(() => serviceOrderDetail.value?.orderType === 'yfk')
|
||||
const isGmcpOrder = computed(() => serviceOrderDetail.value?.orderType === 'gmcp')
|
||||
const isBasicExperiment = computed(
|
||||
() => applicationDetail.value?.bizType === 'basic_experiment'
|
||||
() => isResearchLikeBiz(applicationDetail.value?.bizType)
|
||||
)
|
||||
|
||||
const settlementModeLabel = computed(() => {
|
||||
|
||||
@@ -544,12 +544,13 @@
|
||||
|
||||
const transferTypeOptions = ref<Api.Dict.DictDataOption[]>([])
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ClinicalPaymentTab' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const isBasicExperiment = computed(() => props.bizType === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(props.bizType))
|
||||
const pickupTimeLabel = computed(() => bizConfig.value.pickupTimeLabel)
|
||||
|
||||
type PayStatusKey = 'dfj' | 'jfqrz' | 'yjf' | 'tfqrz' | 'ytf'
|
||||
|
||||
@@ -399,13 +399,14 @@
|
||||
import ScheduleCancelDialog from '../infusion-schedule-management/ScheduleCancelDialog.vue'
|
||||
import InfusionScheduleHandoverDialog from '../infusion-schedule-management/InfusionScheduleHandoverDialog.vue'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'InfusionScheduleTab' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
const isBasicExperiment = computed(() => props.bizType === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(props.bizType))
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/患者姓名/渠道名称'
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
team
|
||||
v-model="teamFilter"
|
||||
:biz-type="
|
||||
props.bizType === 'basic_experiment'
|
||||
isResearchLikeBiz(props.bizType)
|
||||
? 'basic_experiment'
|
||||
: 'pilot_service'
|
||||
"
|
||||
@@ -18,7 +18,7 @@
|
||||
><ProjectSelect filter
|
||||
v-model="projectFilter"
|
||||
:biz-type="
|
||||
props.bizType === 'basic_experiment'
|
||||
isResearchLikeBiz(props.bizType)
|
||||
? 'basic_experiment'
|
||||
: 'pilot_service'
|
||||
"
|
||||
@@ -342,13 +342,14 @@
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
import { getPilotBizConfig, resolvePilotBizType } from '@/config/pilot-biz-type'
|
||||
import { clinicalResearchCategoryLabel } from '@/constants/clinical-research-category'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'PilotApplicationTab' })
|
||||
|
||||
const props = defineProps<{ bizType?: string }>()
|
||||
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
const isBasicExperiment = computed(() => props.bizType === 'basic_experiment')
|
||||
const isBasicExperiment = computed(() => isResearchLikeBiz(props.bizType))
|
||||
const keywordPlaceholder = computed(() =>
|
||||
isBasicExperiment.value ? '申请单号/课题名称/客户名称' : '申请单号/订单名称/患者姓名'
|
||||
)
|
||||
|
||||
+2
-1
@@ -390,6 +390,7 @@
|
||||
import ProductionStepBadge from './ProductionStepBadge.vue'
|
||||
import QcWorkOrderFeeSummaryBar from '@/views/quality-inspection/qc-work-order/QcWorkOrderFeeSummaryBar.vue'
|
||||
import QcWorkOrderProtocolPaymentPanel from '@/views/quality-inspection/qc-work-order/QcWorkOrderProtocolPaymentPanel.vue'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
defineOptions({ name: 'ProductionWorkOrderCardList' })
|
||||
|
||||
@@ -663,7 +664,7 @@
|
||||
if (row.workOrderStatus === 'yzf') return false
|
||||
const tabKey = resolveEffectiveRowTabKey(listTabKey.value, row)
|
||||
if (tabKey === 'outbound_basic_experiment') return true
|
||||
return row.bizType === 'basic_experiment' && (row.workOrderType || '') === 'outbound'
|
||||
return isResearchLikeBiz(row.bizType) && (row.workOrderType || '') === 'outbound'
|
||||
}
|
||||
|
||||
function canVoidWorkOrder(row: ProductionWorkOrderItem) {
|
||||
|
||||
+8
-3
@@ -17,7 +17,7 @@ import type { TagType } from '@/utils/status-tag-registry'
|
||||
import {
|
||||
buildOutboundPilotContextSections,
|
||||
resolveOutboundViewVariant,
|
||||
type OutboundViewVariant
|
||||
type OutboundViewContextVariant
|
||||
} from '@/utils/outbound-qc-pilot-view-sections'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import {
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
buildQcReceptionViewFields
|
||||
} from '@/utils/sample-reception-view-sections'
|
||||
import type { ProductionReceptionRecord } from '@/utils/sample-production-reception-fields'
|
||||
import { isResearchLikeBiz } from '@/utils/research-like-biz'
|
||||
|
||||
function woStatusTag(status: string) {
|
||||
const map: Record<string, { label: string; type: TagType }> = {
|
||||
@@ -181,7 +182,11 @@ function buildFeeSection(d: ProductionWorkOrderDetail): ViewSection {
|
||||
}
|
||||
}
|
||||
|
||||
function buildOutboundSections(d: ProductionWorkOrderDetail, variant: OutboundViewVariant, showFee: boolean) {
|
||||
function buildOutboundSections(
|
||||
d: ProductionWorkOrderDetail,
|
||||
variant: OutboundViewContextVariant,
|
||||
showFee: boolean
|
||||
) {
|
||||
const sections: ViewSection[] = [
|
||||
{
|
||||
title: '基本信息',
|
||||
@@ -271,6 +276,6 @@ export function isOutboundProductionView(d: ProductionWorkOrderDetail | null): b
|
||||
d?.workOrderType === 'outbound' &&
|
||||
(d.bizType === 'pilot_service' ||
|
||||
d.bizType === 'clinical_application' ||
|
||||
d.bizType === 'basic_experiment')
|
||||
isResearchLikeBiz(d.bizType))
|
||||
)
|
||||
}
|
||||
@@ -12,6 +12,7 @@ export const PRODUCTION_WORK_ORDER_TAB_COMPONENTS: Record<ProductionWorkOrderTab
|
||||
inbound_research_donation: InboundResearchDonationTab,
|
||||
outbound_pilot_service: OutboundPilotTab,
|
||||
outbound_basic_experiment: OutboundBasicExperimentTab,
|
||||
outbound_contract_processing: OutboundBasicExperimentTab,
|
||||
outbound_clinical_application: OutboundClinicalTab,
|
||||
temporary: TemporaryTab
|
||||
}
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ export const PRODUCTION_WORK_ORDER_VIEW_DIALOG_COMPONENTS: Record<
|
||||
inbound_research_donation: InboundResearchDonationProductionViewDialog,
|
||||
outbound_pilot_service: OutboundPilotProductionViewDialog,
|
||||
outbound_basic_experiment: OutboundBasicExperimentProductionViewDialog,
|
||||
outbound_contract_processing: OutboundBasicExperimentProductionViewDialog,
|
||||
outbound_clinical_application: OutboundClinicalProductionViewDialog,
|
||||
temporary: TemporaryProductionViewDialog
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ export const assignmentTabs: { key: AssignmentBizType; title: string }[] = [
|
||||
{ key: 'cell_storage', title: '细胞存储' },
|
||||
{ key: 'research_donation', title: '科研捐赠' },
|
||||
{ key: 'pilot_service', title: '中试服务' },
|
||||
{ key: 'basic_experiment', title: '临床科研' }
|
||||
{ key: 'basic_experiment', title: '临床科研' },
|
||||
{ key: 'contract_processing', title: '委托加工' }
|
||||
]
|
||||
|
||||
const collectionColumns: AssignmentColumn[] = [
|
||||
@@ -45,6 +46,13 @@ export const assignmentColumns: Record<AssignmentBizType, AssignmentColumn[]> =
|
||||
{ prop: 'customerName', label: '客户名称', minWidth: 180 },
|
||||
{ prop: 'customerContact', label: '客户联系人', minWidth: 140 },
|
||||
{ prop: 'customerPhone', label: '联系电话', minWidth: 150 }
|
||||
],
|
||||
contract_processing: [
|
||||
{ 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 }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -52,5 +60,6 @@ export const assignmentKeywordHints: Record<AssignmentBizType, string> = {
|
||||
cell_storage: '样本编码 / 母亲姓名、电话 / 医院 / 市场专员',
|
||||
research_donation: '样本编码 / 母亲姓名、电话 / 医院 / 市场专员',
|
||||
pilot_service: '申请单号、名称 / 渠道 / 服务订单 / 患者姓名、电话',
|
||||
basic_experiment: '申请单号 / 课题 / 客户名称、联系人、电话'
|
||||
basic_experiment: '申请单号 / 课题 / 客户名称、联系人、电话',
|
||||
contract_processing: '申请单号 / 课题 / 客户名称、联系人、电话'
|
||||
}
|
||||
@@ -96,7 +96,8 @@
|
||||
'cell_storage',
|
||||
'research_donation',
|
||||
'pilot_service',
|
||||
'basic_experiment'
|
||||
'basic_experiment',
|
||||
'contract_processing'
|
||||
]
|
||||
const applied = ref<ProjectRecord>({ groupBy: 'team' })
|
||||
const displayRows = computed(() => [
|
||||
|
||||
@@ -14,6 +14,7 @@ export const QC_WORK_ORDER_TAB_COMPONENTS: Record<QcWorkOrderTabKey, Component>
|
||||
inbound_research_donation: InboundResearchDonationTab,
|
||||
outbound_pilot_service: OutboundPilotTab,
|
||||
outbound_basic_experiment: OutboundBasicExperimentTab,
|
||||
outbound_contract_processing: OutboundBasicExperimentTab,
|
||||
outbound_clinical_application: OutboundClinicalTab,
|
||||
temporary: TemporaryTab
|
||||
}
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ export const QC_WORK_ORDER_VIEW_DIALOG_COMPONENTS: Record<QcWorkOrderTabKey, Com
|
||||
inbound_research_donation: InboundResearchDonationViewDialog,
|
||||
outbound_pilot_service: OutboundPilotViewDialog,
|
||||
outbound_basic_experiment: OutboundBasicExperimentViewDialog,
|
||||
outbound_contract_processing: OutboundBasicExperimentViewDialog,
|
||||
outbound_clinical_application: OutboundClinicalViewDialog,
|
||||
temporary: TemporaryQcViewDialog
|
||||
}
|
||||
Reference in new issue
Block a user