This commit is contained in:
Your Name
2026-06-12 17:48:42 +08:00
parent 08249451a7
commit c97cac5e4d
3 changed files with 31 additions and 4 deletions
@@ -1246,7 +1246,7 @@
<el-option
v-for="item in createOrderPatientList"
:key="item.id"
:label="`${item.patient_name} (${item.phone || '无手机'})`"
:label="formatPatientOptionLabel(item)"
:value="item.id"
/>
</el-select>
@@ -1691,6 +1691,7 @@ import {
prescriptionLibraryLists
} from '@/api/tcm'
import { medicineLists } from '@/api/medicine'
import { searchPatients as searchPatientsAPI } from '@/api/order'
import { getDictData } from '@/api/app'
import { roleAll } from '@/api/perms/role'
import { usePaging } from '@/hooks/usePaging'
@@ -2351,6 +2352,12 @@ async function openCreateOrderFromPrescription(row: any) {
}
}
/** 患者选项展示「诊单ID + 医助」,避免同名患者选错诊单导致支付单错绑 */
function formatPatientOptionLabel(item: any) {
const base = `诊单#${item.id} ${item.patient_name || '-'} (${item.phone || '无手机'})`
return item.assistant_name ? `${base} · 医助:${item.assistant_name}` : base
}
async function searchPatientsForOrder(query: string) {
if (!query) {
createOrderPatientList.value = []
+8 -2
View File
@@ -546,7 +546,7 @@
<el-option
v-for="item in patientList"
:key="item.id"
:label="`${item.patient_name} (${item.phone})`"
:label="formatPatientOptionLabel(item)"
:value="item.id"
/>
</el-select>
@@ -646,7 +646,7 @@
<el-option
v-for="item in editPatientList"
:key="item.id"
:label="`${item.patient_name || '-'} (${item.phone || '-'})`"
:label="formatPatientOptionLabel(item)"
:value="item.id"
/>
</el-select>
@@ -1006,6 +1006,12 @@ const editOrderRules = {
order_type: [{ required: true, message: '请选择订单类型', trigger: 'change' }]
}
// 患者选项展示「诊单ID + 医助」,避免同名患者选错诊单导致支付单错绑
const formatPatientOptionLabel = (item: any) => {
const base = `诊单#${item.id} ${item.patient_name || '-'} (${item.phone || '无手机'})`
return item.assistant_name ? `${base} · 医助:${item.assistant_name}` : base
}
// 搜索患者
const searchPatients = async (query: string) => {
if (!query) {