门诊挂号->医生字段无数据问题。
This commit is contained in:
@@ -274,7 +274,7 @@
|
||||
@change="
|
||||
() => {
|
||||
form.serviceTypeId = undefined;
|
||||
setchargeItem;
|
||||
setchargeItem();
|
||||
}
|
||||
"
|
||||
clearable
|
||||
@@ -709,6 +709,7 @@ const patientInfoList = ref(undefined);
|
||||
const contractList = ref(undefined);
|
||||
// const locationOptions = ref(undefined); // 地点树选项
|
||||
const doctorList = ref(undefined); // 医生选项
|
||||
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
|
||||
const healthcareList = ref([]); // 挂号项目选项
|
||||
const orgOptions = ref(undefined); // 科室选项
|
||||
const readCardLoading = ref(false);
|
||||
@@ -1014,6 +1015,15 @@ function setInfo() {
|
||||
form.value.doctorName = doctorData.length > 0 ? doctorData[0].name : '';
|
||||
}
|
||||
|
||||
// 挂号类型选择变化处理
|
||||
function handleServiceTypeChange() {
|
||||
setchargeItem();
|
||||
// 如果已选择科室和医生,重新过滤医生列表
|
||||
if (form.value.orgId && allDoctorList.value) {
|
||||
filterDoctorsByHealthcare();
|
||||
}
|
||||
}
|
||||
|
||||
// 设定费用项管理表单
|
||||
function setchargeItem() {
|
||||
if (healthcareList.value.length > 0) {
|
||||
@@ -1026,6 +1036,13 @@ function setchargeItem() {
|
||||
form.value.totalPrice =
|
||||
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
|
||||
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
|
||||
} else {
|
||||
// 如果没有挂号类型数据,清空相关字段
|
||||
form.value.locationId_dictText = '';
|
||||
form.value.price = '';
|
||||
form.value.activityPrice = '';
|
||||
form.value.totalPrice = '';
|
||||
form.value.definitionId = '';
|
||||
}
|
||||
}
|
||||
/** 查询患者信息 */
|
||||
@@ -1471,7 +1488,7 @@ function transformFormData(form) {
|
||||
patientId: form.patientId,
|
||||
definitionId: form.definitionId,
|
||||
serviceId: form.serviceTypeId,
|
||||
totalPrice: form.price, // 默认值为 99.99
|
||||
totalPrice: form.totalPrice, // 使用正确的总价字段
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user