fix(prescription): 解决处方列表中手术类型和其他医嘱类型的问题

- 更新 lodash.template 修复脚本以处理 assignWith 函数的自定义器参数
- 在多个处方组件中引入 drord_doctor_type 字典用于动态生成医嘱类型列表
- 修复手术类型(adviceType=6)的特殊处理逻辑,包括类型映射和字段过滤
- 调整后端医嘱保存服务中的类型分类逻辑,正确处理手术类型
- 更新数据库查询映射以支持手术类型的正确显示和数据传输
- 修复费用对话框和订单表单中的相关类型显示问题
This commit is contained in:
2026-04-01 18:24:24 +08:00
parent 6694ae52ba
commit ac1cd3afc8
16 changed files with 306 additions and 186 deletions

View File

@@ -571,7 +571,7 @@
<script setup>
import {getOrgTree, saveOrderGroup} from './api';
import adviceBaseList from './adviceBaseList';
import {getCurrentInstance, nextTick, watch} from 'vue';
import {computed, getCurrentInstance, nextTick, ref, watch} from 'vue';
import {calculateQuantityByDays, formatNumber} from '@/utils/his';
const emit = defineEmits(['selectDiagnosis']);
@@ -620,31 +620,31 @@ const stockList = ref([]);
const { proxy } = getCurrentInstance();
const inputRefs = ref({}); // 存储输入框实例
const requiredProps = ref([]); // 存储必填项 prop 顺序
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
const { method_code, unit_code, rate_code, distribution_category_code, drord_doctor_type } = proxy.useDict(
'method_code',
'unit_code',
'rate_code',
'distribution_category_code'
'distribution_category_code',
'drord_doctor_type'
);
const adviceTypeList = ref([
{
label: '西药中成药',
value: 1,
},
{
label: '耗材',
value: 2,
},
{
label: '诊疗',
value: 3,
},
{
label: '全部',
value: undefined,
},
]);
// 使用 drord_doctor_type 字典
const adviceTypeList = computed(() => {
if (drord_doctor_type.value && drord_doctor_type.value.length > 0) {
const list = drord_doctor_type.value.map(item => ({
label: item.label,
value: parseInt(item.value) || item.value
}));
return [...list, { label: '全部', value: undefined }];
}
// 默认值
return [
{ label: '西药中成药', value: 1 },
{ label: '耗材', value: 4 },
{ label: '诊疗', value: 3 },
{ label: '全部', value: undefined },
];
});
onMounted(() => {
document.addEventListener('keydown', escKeyListener);
});