fix(prescription): 解决处方列表中手术类型和其他医嘱类型的问题
- 更新 lodash.template 修复脚本以处理 assignWith 函数的自定义器参数 - 在多个处方组件中引入 drord_doctor_type 字典用于动态生成医嘱类型列表 - 修复手术类型(adviceType=6)的特殊处理逻辑,包括类型映射和字段过滤 - 调整后端医嘱保存服务中的类型分类逻辑,正确处理手术类型 - 更新数据库查询映射以支持手术类型的正确显示和数据传输 - 修复费用对话框和订单表单中的相关类型显示问题
This commit is contained in:
@@ -250,12 +250,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, onMounted, reactive, ref, watch} from 'vue';
|
||||
import {computed, getCurrentInstance, onMounted, reactive, ref, watch} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
import {getAdviceBaseInfo, getDiseaseTreatmentInitLoc, getOrgList} from './api.js';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { drord_doctor_type } = proxy.useDict('drord_doctor_type');
|
||||
|
||||
// Props定义
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@@ -280,11 +283,26 @@ const dialogVisible = computed({
|
||||
get: () => props.visible,
|
||||
set: (value) => emit('update:visible', value),
|
||||
});
|
||||
const adviceTypeList = ref([
|
||||
{ label: '耗材', value: 2 },
|
||||
{ label: '诊疗', value: 3 },
|
||||
{ label: '全部', value: '' },
|
||||
]);
|
||||
// 使用 drord_doctor_type 字典
|
||||
const adviceTypeList = computed(() => {
|
||||
if (drord_doctor_type.value && drord_doctor_type.value.length > 0) {
|
||||
// 只保留耗材(4)和诊疗(3)类型,并添加全部选项
|
||||
const filtered = drord_doctor_type.value.filter(item => {
|
||||
const val = parseInt(item.value);
|
||||
return val === 3 || val === 4;
|
||||
}).map(item => ({
|
||||
label: item.label,
|
||||
value: parseInt(item.value)
|
||||
}));
|
||||
return [...filtered, { label: '全部', value: '' }];
|
||||
}
|
||||
// 默认值
|
||||
return [
|
||||
{ label: '耗材', value: 4 },
|
||||
{ label: '诊疗', value: 3 },
|
||||
{ label: '全部', value: '' },
|
||||
];
|
||||
});
|
||||
const adviceType = ref('');
|
||||
const feeItemsList = ref([]);
|
||||
const executeTime = ref('');
|
||||
|
||||
Reference in New Issue
Block a user