fix(#615): 请修复 Bug #615:【住院医生工作站-临床医嘱】录入“临时”医嘱时,【用药频次】字段被置灰锁死为“立即”且无法更改

由 AI Agent (zhaoyun) 自动修复,请查看 diff 确认变更内容。
This commit is contained in:
2026-05-31 02:51:39 +08:00
parent 9e7618d80e
commit 07f97d4193

View File

@@ -642,16 +642,16 @@ onMounted(() => {
}); });
// Bug #589: 出院带药不自动设置频次为ST由医生手动选择 // Bug #589: 出院带药不自动设置频次为ST由医生手动选择
if (props.row.therapyEnum == '2' && !props.row.rateCode && props.row.adviceType != 7) { if (props.row.therapyEnum == '2' && !props.row.rateCode && props.row.adviceType != 7) {
setRateCodeToST(); setRateCodeToONCE();
} }
}); });
watch( watch(
() => props.row.therapyEnum, () => props.row.therapyEnum,
(newVal) => { (newVal) => {
// Bug #589: 出院带药不自动设置频次为ST由医生手动选择 // Bug #589/#615: 出院带药不自动设置频次临时医嘱默认频次为ONCE(临时一次)
if (newVal == '2' && props.row.adviceType != 7) { if (newVal == '2' && props.row.adviceType != 7) {
setRateCodeToST(); setRateCodeToONCE();
} else if (newVal == '1') { } else if (newVal == '1') {
props.row.rateCode = ''; props.row.rateCode = '';
props.row.rateCode_dictText = ''; props.row.rateCode_dictText = '';
@@ -659,8 +659,13 @@ watch(
} }
); );
const setRateCodeToST = () => { const setRateCodeToONCE = () => {
if (Array.isArray(props.config.rateCode)) { if (Array.isArray(props.config.rateCode)) {
const onceOption = props.config.rateCode.find((item) => item.value === 'ONCE');
if (onceOption) {
props.row.rateCode = 'ONCE';
props.row.rateCode_dictText = 'ONCE ' + onceOption.label;
} else {
const stOption = props.config.rateCode.find((item) => item.value === 'ST'); const stOption = props.config.rateCode.find((item) => item.value === 'ST');
if (stOption) { if (stOption) {
props.row.rateCode = 'ST'; props.row.rateCode = 'ST';
@@ -670,6 +675,7 @@ const setRateCodeToST = () => {
props.row.rateCode_dictText = 'ST 立即'; props.row.rateCode_dictText = 'ST 立即';
} }
} }
}
}; };
// 格式化库存显示 // 格式化库存显示