diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml index 4be9c7059..b26646eb2 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml @@ -288,7 +288,7 @@ AND T1.refund_device_id IS NULL ORDER BY T1.status_enum) UNION ALL - (SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE COALESCE(T1.category_enum, 3) END AS advice_type, + (SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE 3 END AS advice_type, T1.id AS request_id, T1.id || '-3' AS unique_key, T1.requester_id AS requester_id, @@ -373,4 +373,4 @@ - \ No newline at end of file + diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue index ef47a8e7d..eae04b1ab 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/index.vue @@ -1181,19 +1181,27 @@ function handleSave() { }); // 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可 loading.value = true; - let list = saveList.map((item) => { - const parsedContent = JSON.parse(item.contentJson); - return { - ...parsedContent, - adviceType: item.adviceType, - requestId: item.requestId, - dbOpType: '1', - groupId: item.groupId, - uniqueKey: undefined, - // 确保 therapyEnum 被正确传递 - therapyEnum: parsedContent.therapyEnum || item.therapyEnum || '1', - }; - }); + let list = []; + try { + list = saveList.map((item) => { + const parsedContent = item.contentJson ? JSON.parse(item.contentJson) || {} : {}; + return { + ...parsedContent, + adviceType: item.adviceType, + requestId: item.requestId, + dbOpType: '1', + groupId: item.groupId, + uniqueKey: undefined, + // 确保 therapyEnum 被正确传递 + therapyEnum: parsedContent.therapyEnum || item.therapyEnum || '1', + }; + }); + } catch (error) { + loading.value = false; + isSaving.value = false; + proxy.$modal.msgError('医嘱内容解析失败,请检查待签发医嘱'); + return; + } // 保存签发按钮 isSaving.value = true; console.log('签发处方参数:', {