Fix Bug #556: 根因+修复方案摘要
根因: 1. 就诊卡号字段映射错误:三处 (initData/resetForm/handleSave) 使用 identifierNo(身份证号) 而非 visitNo/busNo(就诊卡号),参照 examinationApplication.vue 第1167行注释确认 2. 执行时间未设置默认值:initData 和 resetForm 中 executeTime 初始化为 null 3. 套餐判断条件过松:loadApplicationToForm 中 feePackageId != null 即判定为套餐, 普通项目因 feePackageId 有值被误标 修复: 1. 三处 medicalrecordNumber 改为 props.patientInfo.visitNo || props.patientInfo.busNo 2. initData 和 resetForm 中 executeTime 默认填充 formatDateTime(new Date()) 3. isPackage 增加 packageName 联合判断,与 loadCategoryItems 逻辑一致 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -883,7 +883,7 @@ const initData = async () => {
|
||||
formData.visitNo = props.patientInfo.busNo || ''
|
||||
formData.patientId = props.patientInfo.patientId || ''
|
||||
formData.patientName = props.patientInfo.patientName || ''
|
||||
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
|
||||
formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || ''
|
||||
formData.applyDepartment = props.patientInfo.organizationName || ''
|
||||
formData.applyDocName = userNickName.value || userName.value || ''
|
||||
formData.applyDocCode = userId.value || ''
|
||||
@@ -895,6 +895,8 @@ const initData = async () => {
|
||||
|
||||
// 申请单号在保存时由后端生成,此处显示"自动生成"
|
||||
formData.applyNo = '自动生成'
|
||||
// 执行时间默认填充当前系统时间
|
||||
formData.executeTime = formatDateTime(new Date())
|
||||
// 申请日期实时更新(启动定时器)
|
||||
startApplyTimeTimer()
|
||||
|
||||
@@ -1523,7 +1525,7 @@ const resetForm = async () => {
|
||||
applicationId: null,
|
||||
applyOrganizationId: props.patientInfo.orgId || '',
|
||||
patientName: props.patientInfo.patientName || '',
|
||||
medicalrecordNumber: props.patientInfo.identifierNo || '',
|
||||
medicalrecordNumber: props.patientInfo.visitNo || props.patientInfo.busNo || '',
|
||||
natureofCost: 'self',
|
||||
applyTime: '', // 申请日期由定时器实时更新
|
||||
applyDepartment: props.patientInfo.organizationName || '',
|
||||
@@ -1547,7 +1549,7 @@ const resetForm = async () => {
|
||||
visitNo: '',
|
||||
specimenName: '血液',
|
||||
encounterId: props.patientInfo.encounterId || '',
|
||||
executeTime: null,
|
||||
executeTime: formatDateTime(new Date()),
|
||||
applicationType: 0,
|
||||
})
|
||||
selectedInspectionItems.value = []
|
||||
@@ -1597,7 +1599,7 @@ const handleSave = () => {
|
||||
// 修复【#406】:保存前尝试从 props 同步患者信息,避免因加载时序导致信息缺失
|
||||
if ((!formData.patientName?.trim() || !formData.medicalrecordNumber?.trim()) && props.patientInfo && props.patientInfo.encounterId) {
|
||||
formData.patientName = props.patientInfo.patientName || ''
|
||||
formData.medicalrecordNumber = props.patientInfo.identifierNo || ''
|
||||
formData.medicalrecordNumber = props.patientInfo.visitNo || props.patientInfo.busNo || ''
|
||||
formData.encounterId = props.patientInfo.encounterId || ''
|
||||
formData.visitNo = props.patientInfo.busNo || ''
|
||||
formData.patientId = props.patientInfo.patientId || ''
|
||||
@@ -1997,7 +1999,7 @@ const loadApplicationToForm = async (row) => {
|
||||
// Bug #387修复: 套餐项目默认展开,并自动加载明细
|
||||
selectedInspectionItems.value = detail.labApplyItemList.map(item => {
|
||||
const itemId = item.activityId || item.itemId || item.id || Math.random().toString(36).substring(2, 11)
|
||||
const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')
|
||||
const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName
|
||||
|
||||
return {
|
||||
itemId: itemId,
|
||||
|
||||
Reference in New Issue
Block a user