提交
This commit is contained in:
1 parent
7145c6c683
commit
c137b46939
311 files changed
+41432
-30702
No files matched your search
@@ -60,6 +60,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!isClinical"
|
||||
label="服务订单"
|
||||
prop="channelServiceOrderId"
|
||||
class="form-col-span-2-cols"
|
||||
@@ -261,14 +262,17 @@
|
||||
<div class="section-title">
|
||||
<div class="section-title-left section-title-left--with-hint">
|
||||
<h3>输注方案</h3>
|
||||
<p v-if="!selectedServiceOrder" class="section-title-hint">
|
||||
<p v-if="!isClinical && !selectedServiceOrder" class="section-title-hint">
|
||||
请先在「申请单信息」中选择渠道与服务订单,系统将按订单类型加载协议与可选细胞产品。
|
||||
</p>
|
||||
<p v-if="isClinical" class="section-title-hint">
|
||||
请先在「申请单信息」中选择渠道,系统将加载可选细胞产品。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 订单关联信息 -->
|
||||
<div class="form-grid form-grid--col3 infusion-order-meta">
|
||||
<div v-if="!isClinical" class="form-grid form-grid--col3 infusion-order-meta">
|
||||
<el-form-item label="渠道协议">
|
||||
<div class="field-with-action">
|
||||
<span class="agreement-display field-with-action__main">{{
|
||||
@@ -421,6 +425,16 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isClinical" label="金额(元)">
|
||||
<el-input-number
|
||||
v-model="schedule.amount"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
:disabled="!isScheduleEditable(schedule)"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 细胞产品子表 -->
|
||||
@@ -820,6 +834,7 @@
|
||||
modelValue: boolean
|
||||
editId: string | null
|
||||
listRow?: any
|
||||
bizType?: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -828,6 +843,7 @@
|
||||
}>()
|
||||
|
||||
const isEdit = computed(() => !!props.editId)
|
||||
const isClinical = computed(() => props.bizType === 'clinical_application')
|
||||
|
||||
// ── Tabs ───────────────────────────────────────────────────────────────
|
||||
const formTabs = [
|
||||
@@ -858,7 +874,17 @@
|
||||
const formRules = reactive({
|
||||
applicationName: [{ required: true, message: '请输入申请单名称', trigger: 'blur' }],
|
||||
channelId: [{ required: true, message: '请选择渠道', trigger: 'change' }],
|
||||
channelServiceOrderId: [{ required: true, message: '请选择服务订单', trigger: 'change' }]
|
||||
channelServiceOrderId: [
|
||||
{ required: true, message: '请选择服务订单', trigger: 'change' }
|
||||
]
|
||||
})
|
||||
|
||||
// 临床模式下不需要服务订单
|
||||
watchEffect(() => {
|
||||
const rule = formRules.channelServiceOrderId
|
||||
if (Array.isArray(rule)) {
|
||||
rule[0].required = !isClinical.value
|
||||
}
|
||||
})
|
||||
|
||||
// ── 患者信息 ───────────────────────────────────────────────────────────
|
||||
@@ -911,6 +937,13 @@
|
||||
serviceOrderOptions.value = []
|
||||
resetInfusionOrderContext()
|
||||
if (!channelId) return
|
||||
|
||||
if (isClinical.value) {
|
||||
// 临床模式:直接加载渠道协议,无需服务订单
|
||||
await loadAgreements(channelId)
|
||||
return
|
||||
}
|
||||
|
||||
serviceOrderLoading.value = true
|
||||
try {
|
||||
serviceOrderOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
@@ -1054,9 +1087,13 @@
|
||||
return '—'
|
||||
})
|
||||
|
||||
const canAddCellProduct = computed(
|
||||
() => !!selectedServiceOrder.value && agreementPriceOptions.value.length > 0
|
||||
)
|
||||
const canAddCellProduct = computed(() => {
|
||||
if (isClinical.value) {
|
||||
// 临床模式:需要渠道和协议价格
|
||||
return !!formData.channelId && agreementPriceOptions.value.length > 0
|
||||
}
|
||||
return !!selectedServiceOrder.value && agreementPriceOptions.value.length > 0
|
||||
})
|
||||
|
||||
const isYfkOrder = computed(() => selectedServiceOrder.value?.orderType === 'yfk')
|
||||
const isGmcpOrder = computed(() => selectedServiceOrder.value?.orderType === 'gmcp')
|
||||
@@ -1668,6 +1705,7 @@
|
||||
infusionTime: computeScheduleTime(i),
|
||||
infusionLocation: '',
|
||||
infusionMethod: '',
|
||||
amount: null,
|
||||
_expanded: i === 0,
|
||||
cellProducts: [] as any[]
|
||||
})
|
||||
@@ -1695,6 +1733,7 @@
|
||||
infusionTime: computeScheduleTime(idx),
|
||||
infusionLocation: '',
|
||||
infusionMethod: '',
|
||||
amount: null,
|
||||
_expanded: true,
|
||||
cellProducts: [] as any[]
|
||||
})
|
||||
@@ -1872,7 +1911,7 @@
|
||||
formData.remark = detail.remark || ''
|
||||
|
||||
// 加载渠道后加载服务订单
|
||||
if (formData.channelId) {
|
||||
if (formData.channelId && !isClinical.value) {
|
||||
try {
|
||||
serviceOrderOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchChannelServiceOrderList({
|
||||
@@ -1945,6 +1984,7 @@
|
||||
infusionMethod: s.infusionMethod || '',
|
||||
infusionStatus: normalizeInfusionStatusCode(s.infusionStatus) || 'dtz',
|
||||
scheduleStatus: s.scheduleStatus || 'dsc',
|
||||
amount: s.amount ?? null,
|
||||
_expanded: i === 0,
|
||||
cellProducts: (s.cellProducts || []).map((cp: any) => ({
|
||||
id: cp.id || '',
|
||||
@@ -1965,7 +2005,7 @@
|
||||
if (formData.channelId) {
|
||||
await loadAgreements(formData.channelId)
|
||||
}
|
||||
if (formData.channelServiceOrderId) {
|
||||
if (!isClinical.value && formData.channelServiceOrderId) {
|
||||
await onServiceOrderChange(formData.channelServiceOrderId, { preserveCellProducts: true })
|
||||
} else if (infusionPlan.channelAgreementId) {
|
||||
await onAgreementChange(infusionPlan.channelAgreementId)
|
||||
@@ -1991,8 +2031,9 @@
|
||||
try {
|
||||
const payload: Record<string, any> = {
|
||||
applicationName: formData.applicationName || undefined,
|
||||
channelServiceOrderId: formData.channelServiceOrderId,
|
||||
channelServiceOrderId: formData.channelServiceOrderId || undefined,
|
||||
remark: formData.remark || undefined,
|
||||
bizType: props.bizType || undefined,
|
||||
patient: {
|
||||
customerId: patientForm.customerId || undefined,
|
||||
patientName: patientForm.patientName || undefined,
|
||||
@@ -2023,6 +2064,7 @@
|
||||
infusionTime: s.infusionTime || undefined,
|
||||
infusionLocation: s.infusionLocation || undefined,
|
||||
infusionMethod: s.infusionMethod || undefined,
|
||||
amount: isClinical.value ? s.amount ?? undefined : undefined,
|
||||
cellProducts: (s.cellProducts || []).map((cp: any) => ({
|
||||
id: cp.id || undefined,
|
||||
priceId: cp.priceId || undefined,
|
||||
|
||||
Reference in new issue
Block a user