diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue index 80d3f8b50..c684db759 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/OrderForm.vue @@ -642,16 +642,16 @@ onMounted(() => { }); // Bug #589: 出院带药不自动设置频次为ST,由医生手动选择 if (props.row.therapyEnum == '2' && !props.row.rateCode && props.row.adviceType != 7) { - setRateCodeToST(); + setRateCodeToONCE(); } }); watch( () => props.row.therapyEnum, (newVal) => { - // Bug #589: 出院带药不自动设置频次为ST,由医生手动选择 + // Bug #589/#615: 出院带药不自动设置频次,临时医嘱默认频次为ONCE(临时一次) if (newVal == '2' && props.row.adviceType != 7) { - setRateCodeToST(); + setRateCodeToONCE(); } else if (newVal == '1') { props.row.rateCode = ''; props.row.rateCode_dictText = ''; @@ -659,15 +659,21 @@ watch( } ); -const setRateCodeToST = () => { +const setRateCodeToONCE = () => { if (Array.isArray(props.config.rateCode)) { - const stOption = props.config.rateCode.find((item) => item.value === 'ST'); - if (stOption) { - props.row.rateCode = 'ST'; - props.row.rateCode_dictText = 'ST ' + stOption.label; + const onceOption = props.config.rateCode.find((item) => item.value === 'ONCE'); + if (onceOption) { + props.row.rateCode = 'ONCE'; + props.row.rateCode_dictText = 'ONCE ' + onceOption.label; } else { - props.row.rateCode = 'ST'; - props.row.rateCode_dictText = 'ST 立即'; + const stOption = props.config.rateCode.find((item) => item.value === 'ST'); + if (stOption) { + props.row.rateCode = 'ST'; + props.row.rateCode_dictText = 'ST ' + stOption.label; + } else { + props.row.rateCode = 'ST'; + props.row.rateCode_dictText = 'ST 立即'; + } } } };