This commit is contained in:
zlwu committed 2026-06-02 09:39:50 +08:00
1 parent 2e66e03792
commit 09afdb1d65
93 files changed
+22307 -15075

No files matched your search

@@ -2,7 +2,7 @@
<template>
<el-dialog
:model-value="modelValue"
:title="(isEditMode ? '编辑体检信息' : '填写体检信息') + ' — ' + patientName"
:title="(isEditMode ? '编辑预约信息' : '填写体检信息') + ' — ' + patientName"
width="1080px"
class="dialog-form-layout checkup-fill-dialog"
align-center
@@ -2,7 +2,7 @@
<template>
<el-dialog
:model-value="modelValue"
:title="'标记已体检 — ' + (patientName || '')"
:title="(editMode ? '编辑体检信息' : '标记已体检') + ' — ' + (patientName || '')"
width="1080px"
class="dialog-form-layout checkup-mark-checked-dialog"
align-center
@@ -158,7 +158,11 @@
<el-icon><Close /></el-icon>取消
</el-button>
<el-button class="btn-main" type="primary" :loading="submitLoading" @click="handleSubmit">
<el-icon><CircleCheck /></el-icon>确认标记已体检
<el-icon>
<Check v-if="editMode" />
<CircleCheck v-else />
</el-icon>
{{ editMode ? '确定' : '确认标记已体检' }}
</el-button>
</template>
</el-dialog>
@@ -480,6 +484,8 @@
modelValue: boolean
checkupId: string
patientName?: string
/** 编辑模式:仅保存体检登记信息,不变更体检状态 */
editMode?: boolean
}>()
const emit = defineEmits(['update:modelValue', 'success'])
@@ -530,7 +536,7 @@
const requireInstitution = () => {
if (!checkupInstitutionId.value) {
ElMessage.warning('该记录未关联体检机构,请先在「编辑体检信息」中选择机构')
ElMessage.warning('该记录未关联体检机构,请先在「编辑预约信息」中选择机构')
return false
}
return true
@@ -814,8 +820,10 @@
checkupRemark: checkupRemark.value || undefined,
actualCheckupFee: actualTotal.value || undefined
})
await markPilotCheckupChecked({ id: props.checkupId })
ElMessage.success('已标记为已体检')
if (!props.editMode) {
await markPilotCheckupChecked({ id: props.checkupId })
}
ElMessage.success(props.editMode ? '保存成功' : '已标记为已体检')
emit('update:modelValue', false)
emit('success')
} catch (e: any) {
@@ -221,8 +221,11 @@
<el-dropdown-item v-if="hasPrimaryCheckupActions(row)" command="view">
<el-icon><View /></el-icon>查看
</el-dropdown-item>
<el-dropdown-item v-if="canEditCheckup(row)" command="edit">
<el-icon><EditPen /></el-icon>编辑
<el-dropdown-item v-if="canEditReserve(row)" command="editReserve">
<el-icon><EditPen /></el-icon>编辑预约信息
</el-dropdown-item>
<el-dropdown-item v-if="canEditActualCheckupInfo(row)" command="editActual">
<el-icon><Edit /></el-icon>编辑体检信息
</el-dropdown-item>
</el-dropdown-menu>
</template>
@@ -251,7 +254,7 @@
@success="onBatchReserveSuccess"
/>
<!-- 填写 / 编辑体检信息弹窗 -->
<!-- 填写 / 编辑预约信息弹窗 -->
<CheckupFillDialog
v-model="fillDialogVisible"
:checkup-id="currentCheckupId"
@@ -263,11 +266,12 @@
<!-- 查看弹窗 -->
<CheckupViewDialog v-model="viewDialogVisible" :checkup-row="viewCheckupRow" />
<!-- 标记已体检弹窗 -->
<!-- 标记已体检 / 编辑体检登记信息弹窗 -->
<CheckupMarkCheckedDialog
v-model="markCheckedVisible"
:checkup-id="currentCheckupId"
:patient-name="currentPatientName"
:edit-mode="markCheckedEditMode"
@success="loadData"
/>
</div>
@@ -330,6 +334,7 @@
const viewDialogVisible = ref(false)
const viewCheckupRow = ref<any>(null)
const markCheckedVisible = ref(false)
const markCheckedEditMode = ref(false)
const currentCheckupId = ref('')
const currentPatientName = ref('')
@@ -387,8 +392,11 @@
/** 待体检且已填写机构信息时可标记已体检 */
const canMarkChecked = (row: any) => row.checkupStatus === 'dtj' && !!row.institutionName
/** 已填写机构信息时可编辑 */
const canEditCheckup = (row: any) => !!row.institutionName
/** 已填写机构信息时可编辑预约 */
const canEditReserve = (row: any) => !!row.institutionName
/** 已体检时可编辑体检登记信息 */
const canEditActualCheckupInfo = (row: any) => row.checkupStatus === 'ytj'
/** 是否存在填写体检信息 / 标记已体检主操作 */
const hasPrimaryCheckupActions = (row: any) =>
@@ -397,9 +405,9 @@
/** 更多菜单是否展示 */
const hasMoreCheckupActions = (row: any) => {
if (hasPrimaryCheckupActions(row)) {
return canEditCheckup(row) || canMarkChecked(row)
return canEditReserve(row) || canMarkChecked(row)
}
return canEditCheckup(row)
return canEditReserve(row) || canEditActualCheckupInfo(row)
}
const handleDropdownCommand = (command: string, row: any) => {
@@ -407,8 +415,11 @@
case 'view':
handleView(row)
break
case 'edit':
handleEdit(row)
case 'editReserve':
handleEditReserve(row)
break
case 'editActual':
handleEditActual(row)
break
}
}
@@ -420,13 +431,20 @@
fillDialogVisible.value = true
}
const handleEdit = (row: any) => {
const handleEditReserve = (row: any) => {
currentCheckupId.value = row.id
currentPatientName.value = row.patientName || ''
fillEditRow.value = { ...row }
fillDialogVisible.value = true
}
const handleEditActual = (row: any) => {
currentCheckupId.value = row.id
currentPatientName.value = row.patientName || ''
markCheckedEditMode.value = true
markCheckedVisible.value = true
}
const onFillSuccess = () => {
fillEditRow.value = null
loadData()
@@ -461,6 +479,7 @@
const handleMarkChecked = (row: any) => {
currentCheckupId.value = row.id
currentPatientName.value = row.patientName || ''
markCheckedEditMode.value = false
markCheckedVisible.value = true
}