LIJU 2 miesięcy temu
rodzic
commit
872cff62c5

+ 54 - 3
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -1654,10 +1654,61 @@ const beforeCancelRegister = () => {
       ).then(() => {
         patient.value.revokeRemark = value;
         if (injuryMode.value) {
-          revokeInpatientRegister(patient.value).then(() => {
-            ElMessageBox.alert("撤销入院登记成功。", "提示", {
-              type: "success",
+          //revokeInpatientRegister(patient.value).then(() => {
+          //  ElMessageBox.alert("撤销入院登记成功。", "提示", {
+          //    type: "success",
+          //  });
+          //});
+          // 工伤撤销入院登记
+          const businessParams = {
+            ipt_otp_no: patient.value.inpatientNo + '_' + patient.value.admissTimes + '_' + patient.value.ledgerSn,
+          }
+          const params = {
+            "action": "transaction",
+            "transactionName": "CancelRegister",
+            "businessParams": businessParams
+          }
+          
+          const loading = ElMessage({
+            message: '正在撤销工伤入院登记,请稍候...',
+            type: 'info',
+            duration: 0,
+            showClose: true,
+            grouping: true,
+          });
+          
+          fetch('http://130.150.161.72:9206/thyy/api/public/injury/workinjury', {
+            method: 'POST',
+            headers: {
+              'Content-Type': 'application/json',
+            },
+            body: JSON.stringify(params),
+          })
+          .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",
+              });
+            } else {
+              ElMessage({
+                message: result.message || '工伤撤销入院登记失败',
+                type: 'error',
+                duration: 2500,
+                showClose: true,
+              });
+            }
+          })
+          .catch(error => {
+            ElMessage({
+              message: '工伤撤销入院登记接口异常',
+              type: 'error',
+              duration: 2500,
+              showClose: true,
             });
+          })
+          .finally(() => {
+            loading.close && loading.close();
           });
         } else {
           revokeAdmission(patient.value).then(() => {