LIJU 4 semanas atrás
pai
commit
fd40d1ea89

+ 36 - 2
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -1687,8 +1687,42 @@ const beforeCancelRegister = () => {
           .then(response => response.json())
           .then(result => {
             if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
-              ElMessageBox.alert("工伤撤销入院登记成功。", "提示", {
-                type: "success",
+              // 新增:调用本地表撤销同步接口
+              fetch('http://130.150.161.72:9206/thyy/api/public/injury/localTablesModifyForAdmissionCancellation', {
+                method: 'POST',
+                headers: {
+                  'Content-Type': 'application/json',
+                },
+                body: JSON.stringify({
+                  patNo: patient.value.inpatientNo,
+                  times: patient.value.admissTimes,
+                  ledgerSn: patient.value.ledgerSn,
+                  insuplc_admdvs: patient.value.insuplcAdmdvs,
+                  mdtrt_id: patient.value.mdtrtId,
+                }),
+              })
+              .then(res => res.json())
+              .then(localResult => {
+                if (localResult && localResult.code === 1) {
+                  ElMessageBox.alert("工伤撤销入院登记成功。", "提示", {
+                    type: "success",
+                  });
+                } else {
+                  ElMessage({
+                    message: localResult.message || '本地表撤销同步失败',
+                    type: 'error',
+                    duration: 2500,
+                    showClose: true,
+                  });
+                }
+              })
+              .catch(() => {
+                ElMessage({
+                  message: '本地表撤销同步接口异常',
+                  type: 'error',
+                  duration: 2500,
+                  showClose: true,
+                });
               });
             } else {
               ElMessage({