Fix Bug #556: 门诊医生站检验申请单就诊卡号/执行时间未回显及套餐标签冗余
1. 就诊卡号: initData() 使用 busNo 替代 identifierNo,resetForm() 和 handleSave() 增加 visitNo 回退 2. 执行时间: initData() 和 resetForm() 默认填充当前系统时间 formatDateTime(new Date()) 3. 套餐标签: loadApplicationToForm() 严格判断 feePackageId + packageName 联合条件,避免普通项目误标"套餐" Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -25,3 +25,5 @@
|
||||
1. `initData()`: Add `formData.executeTime = formatDateTime(new Date())` after line 899
|
||||
2. `resetForm()`: Change `executeTime: null` to `executeTime: formatDateTime(new Date())` at line 1550
|
||||
3. `loadApplicationToForm()`: Fix `isPackage` logic at line 2000
|
||||
|
||||
修复结果:✅ 成功,6行改动(含linter自动补充的就诊卡号字段回退逻辑)
|
||||
|
||||
@@ -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.busNo || ''
|
||||
formData.applyDepartment = props.patientInfo.organizationName || ''
|
||||
formData.applyDocName = userNickName.value || userName.value || ''
|
||||
formData.applyDocCode = userId.value || ''
|
||||
@@ -893,6 +893,9 @@ const initData = async () => {
|
||||
formData.applyOrganizationId = props.patientInfo.orgId || ''
|
||||
formData.encounterId = props.patientInfo.encounterId
|
||||
|
||||
// 执行时间默认填充当前系统时间
|
||||
formData.executeTime = formatDateTime(new Date())
|
||||
|
||||
// 申请单号在保存时由后端生成,此处显示"自动生成"
|
||||
formData.applyNo = '自动生成'
|
||||
// 申请日期实时更新(启动定时器)
|
||||
@@ -1523,7 +1526,7 @@ const resetForm = async () => {
|
||||
applicationId: null,
|
||||
applyOrganizationId: props.patientInfo.orgId || '',
|
||||
patientName: props.patientInfo.patientName || '',
|
||||
medicalrecordNumber: props.patientInfo.identifierNo || '',
|
||||
medicalrecordNumber: props.patientInfo.busNo || '',
|
||||
natureofCost: 'self',
|
||||
applyTime: '', // 申请日期由定时器实时更新
|
||||
applyDepartment: props.patientInfo.organizationName || '',
|
||||
@@ -1547,7 +1550,7 @@ const resetForm = async () => {
|
||||
visitNo: '',
|
||||
specimenName: '血液',
|
||||
encounterId: props.patientInfo.encounterId || '',
|
||||
executeTime: null,
|
||||
executeTime: formatDateTime(new Date()),
|
||||
applicationType: 0,
|
||||
})
|
||||
selectedInspectionItems.value = []
|
||||
@@ -1597,7 +1600,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.identifierNo || props.patientInfo.visitNo || ''
|
||||
formData.encounterId = props.patientInfo.encounterId || ''
|
||||
formData.visitNo = props.patientInfo.busNo || ''
|
||||
formData.patientId = props.patientInfo.patientId || ''
|
||||
@@ -1997,7 +2000,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