feat(doctorstation): 优化医生工作站处方列表功能

- 调整诊疗定义表结构,添加序号和服务范围字段
- 修改费用项目查询逻辑,使用INNER JOIN替代LEFT JOIN并优化排序
- 增加批处理批次大小从500到1000,提升查询性能
- 修复处方类型筛选中的诊疗和耗材顺序错误
- 优化处方行数据重置逻辑,避免残留数据问题
- 移除不必要的README标题元素
This commit is contained in:
2026-01-19 11:39:29 +08:00
parent f3eeee7405
commit 7e76083c37
5 changed files with 26 additions and 33 deletions

View File

@@ -788,10 +788,10 @@
adviceQueryParams.categoryCode = '2';
} else if (value == 2) { // 中成药
adviceQueryParams.categoryCode = '1';
} else if (value == 3) { // 耗材
adviceQueryParams.categoryCode = ''; // 耗材不需要categoryCode筛选
} else if (value == 4) { // 诊疗
} else if (value == 3) { // 诊疗
adviceQueryParams.categoryCode = ''; // 诊疗不需要categoryCode筛选
} else if (value == 4) { // 耗材
adviceQueryParams.categoryCode = ''; // 耗材不需要categoryCode筛选
} else {
adviceQueryParams.categoryCode = ''; // 全部类型
}
@@ -1124,6 +1124,7 @@ const { method_code, unit_code, rate_code, distribution_category_code, drord_doc
);
// 删除硬编码的adviceTypeList直接使用drord_doctor_type字典
// drord_doctor_type: 1=西药, 2=中成药, 3=诊疗, 4=耗材, 5=全部
const adviceTypeList = ref([
{
label: '西药',
@@ -1133,13 +1134,12 @@ const adviceTypeList = ref([
label: '中成药',
value: 2,
},
{
label: '耗材',
label: '诊疗',
value: 3,
},
{
label: '诊疗',
label: '耗材',
value: 4,
},
{
@@ -1781,6 +1781,7 @@ function handleFocus(row, index) {
adviceQueryParams.value = {
adviceType: adviceType,
adviceTypes: adviceType ? adviceType.toString() : '1,2,3', // 根据当前类型设置查询类型,避免显示其他类型的数据
categoryCode: categoryCode,
searchKey: adviceQueryParams.value.searchKey || ''
};
@@ -1850,12 +1851,16 @@ function selectAdviceBase(key, row) {
}
function setNewRow(key, row) {
// 每次选择药品时,将当前行数据初始化为最初状态
prescriptionList.value[rowIndex.value] = {
// 每次选择药品时,将当前行数据完全重置,清空所有旧数据
const preservedData = {
uniqueKey: prescriptionList.value[rowIndex.value].uniqueKey,
isEdit: true,
statusEnum: 1,
};
// 完全替换整个对象,只保留必要的初始字段
prescriptionList.value[rowIndex.value] = preservedData;
setValue(row);
expandOrder.value = [key];
nextTick(() => {
@@ -2497,13 +2502,17 @@ function setValue(row) {
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
: 0;
// 创建一个新的对象,而不是合并旧数据,以避免残留数据问题
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...JSON.parse(JSON.stringify(row)),
// 确保adviceType为数字类型避免类型不匹配导致的显示问题
adviceType: Number(row.adviceType),
skinTestFlag: skinTestFlag, // 确保皮试字段是数字类型
skinTestFlag_enumText: skinTestFlag == 1 ? '是' : '否', // 更新显示文本
// 保留原来设置的初始状态值
uniqueKey: prescriptionList.value[rowIndex.value].uniqueKey,
isEdit: prescriptionList.value[rowIndex.value].isEdit,
statusEnum: prescriptionList.value[rowIndex.value].statusEnum,
};
prescriptionList.value[rowIndex.value].orgId = undefined;
prescriptionList.value[rowIndex.value].dose = undefined;