From 1be0dc2417661e34ce95d2a973b5288c7cc1e5de Mon Sep 17 00:00:00 2001 From: xiaoming <13564692840@163.com> Date: Wed, 13 May 2026 17:49:27 +0800 Subject: [PATCH] =?UTF-8?q?bug515=20[=E4=BD=8F=E9=99=A2=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=AB=99-=E4=B8=B4=E5=BA=8A=E5=8C=BB=E5=98=B1]=20=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E2=80=9C=E7=AD=BE=E5=8F=91=E2=80=9D=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E5=8C=BB=E5=98=B1=E5=90=8E=E7=B3=BB=E7=BB=9F=E9=99=B7=E5=85=A5?= =?UTF-8?q?=E6=AD=BB=E5=BE=AA=E7=8E=AF=EF=BC=8CLoading=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=20=E5=90=8E=E7=AB=AFadvice=5Ftype=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdviceManageAppMapper.xml | 4 +-- .../home/components/order/index.vue | 34 ++++++++++++------- 2 files changed, 23 insertions(+), 15 deletions(-) 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('签发处方参数:', {