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

@@ -371,7 +371,7 @@
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
<span style="font-size: 16px; font-weight: 600">
{{ row.adviceName }}
{{ row.unitPrice ? Number(row.unitPrice).toFixed(2) + '/次' : '-' + '元' }}
{{ row.unitPrice ? ' -' + Number(row.unitPrice).toFixed(2) + '' : ' -元' }}
</span>
<div class="form-group">
<el-form-item

View File

@@ -426,38 +426,35 @@ const inputRefs = ref({}); // 存储输入框实例
const requiredProps = ref([]); // 存储必填项 prop 顺序
const totalAmount = ref(0);
const therapyEnum = ref('');
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 openDrawer = ref(false);
const orderClassCode = ref('');
const orderStatus = ref('');
// 医嘱类型
const adviceTypeList = ref([
{
label: '西药中成药',
value: 1,
},
// {
// label: '耗材',
// value: 2,
// },
{
label: '诊疗',
value: 3,
},
{
label: '手术',
value: 4,
},
{
label: '全部',
value: '',
},
]);
// 医嘱类型 - 使用 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: '' }];
}
// 默认返回值
return [
{ label: '西药中成药', value: 1 },
{ label: '诊疗', value: 3 },
{ label: '手术', value: 6 },
{ label: '全部', value: '' },
];
});
// 医嘱状态
const statusOption = [
{