소스 검색

费用上传的进度条

lighter 4 달 전
부모
커밋
3886cbc19f
3개의 변경된 파일176개의 추가작업 그리고 243개의 파일을 삭제
  1. 1 0
      src/api/medical-insurance/si-inpatient.js
  2. 3 2
      src/layout/HeaderV2/BackgroundTask.vue
  3. 172 241
      src/views/medical-insurance/inpatient/InHospFeeUpload.vue

+ 1 - 0
src/api/medical-insurance/si-inpatient.js

@@ -44,6 +44,7 @@ export function multipleUpload(data) {
   return request({
     url: '/siZy/multipleUpload',
     method: 'post',
+    showLoading: false,
     data,
   })
 }

+ 3 - 2
src/layout/HeaderV2/BackgroundTask.vue

@@ -36,7 +36,7 @@ onMounted(() => {
   <teleport to="body">
     <div class="system_background-task">
       <div v-for="item in store" class="system_background-task-item">
-        <div style="font-size: 18px; margin-bottom: 5px">{{ item.name }}:</div>
+        <div style="font-size: 12px">{{ item.name }}:</div>
         <div class="system_background-task-item_progress">
           <el-progress
             style="width: 240px"
@@ -46,7 +46,7 @@ onMounted(() => {
             :text-inside="item.textInside || false"
             :stroke-width="item.strokeWidth || 15"
           />
-          <div>
+          <div style="margin-left: 8px">
             <el-button
               icon="CircleClose"
               circle
@@ -61,6 +61,7 @@ onMounted(() => {
 
 <style lang="scss">
 .system_background-task {
+  z-index: 99;
   position: fixed;
   right: 10px;
   bottom: 10px;

+ 172 - 241
src/views/medical-insurance/inpatient/InHospFeeUpload.vue

@@ -5,42 +5,46 @@
       <el-button type="success" @click="preCalculateCost">医保试算</el-button>
       <el-button type="success" @click="uploadFees">费用上传</el-button>
       <el-button type="warning" :disabled="!isAdmin" @click="cancelFees"
-        >取消上传</el-button
+      >取消上传
+      </el-button
       >
       <el-button type="primary" @click="weiGuiTuiFeiFenXiDialogOpen(true)"
-        >违规费用分析</el-button
+      >违规费用分析
+      </el-button
       >
       <el-popover placement="left" width="730" trigger="click">
         <template #reference>
           <el-button type="warning" icon="CircleClose" plain
-            >错误信息 ({{ errorMessages.length }})</el-button
+          >错误信息 ({{ errorMessages.length }})
+          </el-button
           >
         </template>
         <el-tag type="info">错误信息</el-tag>
         <el-divider direction="vertical"></el-divider>
         <el-button type="warning" @click="clearErrorMessages"
-          >清除内容</el-button
+        >清除内容
+        </el-button
         >
         <el-table
-          width="700"
-          max-height="300"
-          class="errTable"
-          :data="errorMessages"
+            width="700"
+            max-height="300"
+            class="errTable"
+            :data="errorMessages"
         >
           <el-table-column
-            width="80"
-            property="patNo"
-            label="住院号"
+              width="80"
+              property="patNo"
+              label="住院号"
           ></el-table-column>
           <el-table-column
-            width="80"
-            property="patName"
-            label="姓名"
+              width="80"
+              property="patName"
+              label="姓名"
           ></el-table-column>
           <el-table-column
-            width="450"
-            property="message"
-            label="错误详情"
+              width="450"
+              property="message"
+              label="错误详情"
           ></el-table-column>
         </el-table>
       </el-popover>
@@ -58,46 +62,46 @@
     <div class="layout_flex_1-y">
       <el-table :data="xmFeeList" stripe height="100%">
         <el-table-column
-          prop="detailSn"
-          label="流水号"
-          width="80"
+            prop="detailSn"
+            label="流水号"
+            width="80"
         ></el-table-column>
         <el-table-column
-          prop="chargeCodeMx"
-          label="院内码"
-          width="100"
+            prop="chargeCodeMx"
+            label="院内码"
+            width="100"
         ></el-table-column>
         <el-table-column
-          prop="chargeAmount"
-          label="数量"
-          sortable
-          width="80"
+            prop="chargeAmount"
+            label="数量"
+            sortable
+            width="80"
         ></el-table-column>
         <el-table-column
-          prop="chargeFee"
-          label="金额"
-          width="80"
+            prop="chargeFee"
+            label="金额"
+            width="80"
         ></el-table-column>
         <el-table-column prop="chargeDate" label="收费日期"></el-table-column>
         <el-table-column prop="ybCode" :label="ybCodeLabel"></el-table-column>
         <el-table-column prop="chargeName" label="项目名称"></el-table-column>
         <el-table-column
-          prop="ybSelfFlag"
-          label="报销"
-          width="80"
+            prop="ybSelfFlag"
+            label="报销"
+            width="80"
         ></el-table-column>
         <el-table-column>
           <template #default="scope">
             <el-button
-              circle
-              v-if="
+                circle
+                v-if="
                 !injuryMode && patient.mdtrtId && scope.row.chargeAmount < 0
               "
-              @click="fixNegativeFeeUploadProblem(scope.row, 1)"
+                @click="fixNegativeFeeUploadProblem(scope.row, 1)"
             >
               <i
-                class="iconfont icon-tools-hardware"
-                style="font-size: 10px"
+                  class="iconfont icon-tools-hardware"
+                  style="font-size: 10px"
               ></i>
             </el-button>
           </template>
@@ -106,14 +110,14 @@
     </div>
     <div>
       <el-pagination
-        small
-        @size-change="handleXmSizeChange"
-        @current-change="handleCurrentXmChange"
-        :current-page="page.xmPage"
-        :page-sizes="[10, 30, 50, 70, 100, 300]"
-        :page-size="page.xmPageSize"
-        layout="total, sizes, prev, pager, next"
-        :total="xmTotalSize"
+          small
+          @size-change="handleXmSizeChange"
+          @current-change="handleCurrentXmChange"
+          :current-page="page.xmPage"
+          :page-sizes="[10, 30, 50, 70, 100, 300]"
+          :page-size="page.xmPageSize"
+          layout="total, sizes, prev, pager, next"
+          :total="xmTotalSize"
       >
       </el-pagination>
     </div>
@@ -124,46 +128,46 @@
     <div class="layout_flex_1-y">
       <el-table :data="ypFeeList" stripe height="100%">
         <el-table-column
-          prop="detailSn"
-          label="流水号"
-          width="80"
+            prop="detailSn"
+            label="流水号"
+            width="80"
         ></el-table-column>
         <el-table-column
-          prop="chargeCodeMx"
-          label="院内码"
-          width="100"
+            prop="chargeCodeMx"
+            label="院内码"
+            width="100"
         ></el-table-column>
         <el-table-column
-          prop="chargeAmount"
-          label="数量"
-          sortable
-          width="80"
+            prop="chargeAmount"
+            label="数量"
+            sortable
+            width="80"
         ></el-table-column>
         <el-table-column
-          prop="chargeFee"
-          label="金额"
-          width="80"
+            prop="chargeFee"
+            label="金额"
+            width="80"
         ></el-table-column>
         <el-table-column prop="chargeDate" label="收费日期"></el-table-column>
         <el-table-column prop="ybCode" :label="ybCodeLabel"></el-table-column>
         <el-table-column prop="chargeName" label="项目名称"></el-table-column>
         <el-table-column
-          prop="ybSelfFlag"
-          label="报销"
-          width="80"
+            prop="ybSelfFlag"
+            label="报销"
+            width="80"
         ></el-table-column>
         <el-table-column>
           <template #default="scope">
             <el-button
-              circle
-              v-if="
+                circle
+                v-if="
                 !injuryMode && patient.mdtrtId && scope.row.chargeAmount < 0
               "
-              @click="fixNegativeFeeUploadProblem(scope.row, 2)"
+                @click="fixNegativeFeeUploadProblem(scope.row, 2)"
             >
               <i
-                class="iconfont icon-tools-hardware"
-                style="font-size: 10px"
+                  class="iconfont icon-tools-hardware"
+                  style="font-size: 10px"
               ></i>
             </el-button>
           </template>
@@ -172,67 +176,36 @@
     </div>
     <div>
       <el-pagination
-        small
-        @size-change="handleYpSizeChange"
-        @current-change="handleCurrentYpChange"
-        :current-page="page.ypPage"
-        :page-sizes="[10, 30, 50, 70, 100, 300]"
-        :page-size="page.ypPageSize"
-        layout="total, sizes, prev, pager, next"
-        :total="ypTotalSize"
+          small
+          @size-change="handleYpSizeChange"
+          @current-change="handleCurrentYpChange"
+          :current-page="page.ypPage"
+          :page-sizes="[10, 30, 50, 70, 100, 300]"
+          :page-size="page.ypPageSize"
+          layout="total, sizes, prev, pager, next"
+          :total="ypTotalSize"
       >
       </el-pagination>
     </div>
   </div>
 
-  <div class="m-wrapper" v-show="showProgress">
-    <div class="dj-center-box-wrapper">
-      <div class="el-message-box" style="font-size: 13px">
-        <div
-          style="
-            background: #409eff;
-            color: white;
-            padding: 7px 10px;
-            font-weight: bold;
-          "
-        >
-          <i class="el-icon-loading"></i>
-          上传进度
-        </div>
-        <div style="padding: 10px">
-          <div style="margin-bottom: 10px">{{ uploadIndexText }} ...</div>
-          <div style="margin-bottom: 10px" v-show="percentage === 100">
-            上传结束,正在进行费用计算 ...
-          </div>
-          <el-progress
-            :text-inside="true"
-            :stroke-width="22"
-            :percentage="percentage"
-            status="success"
-          ></el-progress>
-          <div style="height: 5px"></div>
-        </div>
-      </div>
-    </div>
-  </div>
-
   <el-dialog
-    v-model="weiGuiTuiFeiFenXiDialog"
-    title="违规费用分析"
-    :fullscreen="true"
+      v-model="weiGuiTuiFeiFenXiDialog"
+      title="违规费用分析"
+      :fullscreen="true"
   >
     <wei-gui-fei-yong-fen-xi
-      :init="weiGuiTuiFeiInit"
-      @open="weiGuiTuiFeiOpenDialog"
-      ref="weiGui"
-      :patient="weiGuiJiBenXinXi"
+        :init="weiGuiTuiFeiInit"
+        @open="weiGuiTuiFeiOpenDialog"
+        ref="weiGui"
+        :patient="weiGuiJiBenXinXi"
     ></wei-gui-fei-yong-fen-xi>
   </el-dialog>
   <MedfeeAnalyse
-    v-if="showFeeDetl"
-    type="unsettled"
-    :mdtrt-id="patient.mdtrtId"
-    @close="showFeeDetl = false"
+      v-if="showFeeDetl"
+      type="unsettled"
+      :mdtrt-id="patient.mdtrtId"
+      @close="showFeeDetl = false"
   />
 </template>
 
@@ -246,9 +219,9 @@ import {
   ref,
   watch,
 } from "vue";
-import { fetchNotUploadedFees, getPatientInfo } from "@/api/inpatient/patient";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { nullPatient } from "@/utils/validate";
+import {fetchNotUploadedFees, getPatientInfo} from "@/api/inpatient/patient";
+import {ElMessage, ElMessageBox} from "element-plus";
+import {nullPatient} from "@/utils/validate";
 import {
   hospitalizationPreSettlement,
   multipleUpload,
@@ -261,15 +234,15 @@ import {
   inpatientSettlement,
   inpatientCostUpload,
 } from "@/api/medical-insurance/si-injury";
-import { setCallback } from "@/utils/websocket";
-import { getGreatestRole } from "@/utils/permission";
-import { baseinfo, setBaseinfo } from "@/data/inpatient";
+import {setCallback} from "@/utils/websocket";
+import {getGreatestRole} from "@/utils/permission";
+import {baseinfo, setBaseinfo} from "@/data/inpatient";
 import WeiGuiFeiYongFenXi from "@/components/inpatient/WeiGuiFeiYongFenXi.vue";
 import MedfeeAnalyse from "../../../components/medical-insurance/medfee-analyse/Index.vue";
-import { clone } from "@/utils/clone";
-import { useMedinsStore } from "@/pinia/medins-store";
-import { useUserStore } from "@/pinia/user-store";
-import { useProgressBarStore } from "@/pinia/progress-bar-store";
+import {clone} from "@/utils/clone";
+import {useMedinsStore} from "@/pinia/medins-store";
+import {useUserStore} from "@/pinia/user-store";
+import {useProgressBarStore} from "@/pinia/progress-bar-store";
 
 const medinsStore = useMedinsStore();
 const injuryMode = computed(() => {
@@ -346,18 +319,18 @@ onDeactivated(() => {
 });
 
 watch(
-  () => patient.value.inpatientNo,
-  () => {
-    if (activated.value) {
-      if (patient.value.inpatientNo) {
-        fetchProjectFees();
-        fetchMedicineFees();
-        weiGuiTuiFeiFenXiDialogOpen(false);
-      } else {
-        clearFees();
+    () => patient.value.inpatientNo,
+    () => {
+      if (activated.value) {
+        if (patient.value.inpatientNo) {
+          fetchProjectFees();
+          fetchMedicineFees();
+          weiGuiTuiFeiFenXiDialogOpen(false);
+        } else {
+          clearFees();
+        }
       }
     }
-  }
 );
 
 const errorMessages = ref([]);
@@ -415,21 +388,15 @@ const excutePreCal = () => {
   });
 };
 
-const patientIndex = ref(1);
-const showProgress = ref(false);
-const percentage = ref(0);
-
 const selections = computed(() => {
   return medinsStore.overviewSelections;
 });
 
 const uploadFees = () => {
   if (selections.value.length > 0) {
-    showProgress.value = true;
     doMultipleUpload();
   } else {
     if (nullPatient()) return;
-    showProgress.value = true;
     if (injuryMode.value) {
       doSingleInjuryUpload();
     } else {
@@ -442,56 +409,42 @@ const userInfo = useUserStore().userInfo;
 const doSingleInjuryUpload = () => {
   patient.value.sid = userInfo.sid;
   inpatientCostUpload(patient.value)
-    .then(res => {
-      fetchProjectFees();
-      fetchMedicineFees();
-      showProgress.value = false;
-      percentage.value = 0;
-      patient.value.chargeYb = res.fundPay;
-      ElMessageBox.alert(res, "成功", {
-        type: "success",
-        confirmButtonText: "确定",
-      });
-      getPatientInfo(patient.value.inpatientNo).then(res => {
-        setBaseinfo(res);
+      .then(res => {
+        fetchProjectFees();
+        fetchMedicineFees();
+        patient.value.chargeYb = res.fundPay;
+        ElMessageBox.alert(res, "成功", {
+          type: "success",
+          confirmButtonText: "确定",
+        });
+        getPatientInfo(patient.value.inpatientNo).then(res => {
+          setBaseinfo(res);
+        });
+      })
+      .catch(() => {
+        fetchProjectFees();
+        fetchMedicineFees();
       });
-    })
-    .catch(() => {
-      showProgress.value = false;
-      percentage.value = 0;
-      fetchProjectFees();
-      fetchMedicineFees();
-    });
 };
 
 const doSingleNormalUpload = () => {
-  const param = {
+  let list = [{
     inpatientNo: patient.value.inpatientNo,
     admissTimes: patient.value.admissTimes,
     ledgerSn: patient.value.ledgerSn,
     sid: userInfo.sid,
-  };
-  uploadFeeDetail(param)
-    .then(res => {
-      fetchProjectFees();
-      fetchMedicineFees();
-      showProgress.value = false;
-      percentage.value = 0;
-      ElMessageBox.alert(res, "成功", {
-        type: "success",
-        confirmButtonText: "确定",
-      });
-      useProgressBarStore().closeProgressBar();
-      getPatientInfo(patient.value.inpatientNo).then(res => {
-        setBaseinfo(res);
-      });
-    })
-    .catch(() => {
-      fetchProjectFees();
-      fetchMedicineFees();
-      showProgress.value = false;
-      percentage.value = 0;
+    mdtrtId: patient.value.mdtrtId,
+    medType: patient.value.medType,
+    injurySerialNo: patient.value.injurySerialNo,
+  }]
+  multipleUpload(list).then(() => {
+    ElMessage({
+      message: "费用上传完成。",
+      type: "success",
+      duration: 2500,
+      showClose: true,
     });
+  })
 };
 
 const doMultipleUpload = () => {
@@ -499,21 +452,14 @@ const doMultipleUpload = () => {
   list.forEach(item => {
     item.sid = userInfo.sid;
   });
-  multipleUpload(list)
-    .then(res => {
-      ElMessage({
-        message: "处理完成。",
-        type: "success",
-        duration: 2500,
-        showClose: true,
-      });
-      showProgress.value = false;
-      percentage.value = 0;
-    })
-    .catch(() => {
-      showProgress.value = false;
-      percentage.value = 0;
+  multipleUpload(list).then(() => {
+    ElMessage({
+      message: "费用上传完成。",
+      type: "success",
+      duration: 2500,
+      showClose: true,
     });
+  })
 };
 
 const socketCallback = data => {
@@ -524,57 +470,42 @@ const socketCallback = data => {
     case "uploadFeeResponse":
       errorMessages.value.push(data);
       break;
-    case "updatePatientIndex":
-      patientIndex.value = data.patientIndex;
-      percentage.value = 0;
-      break;
-    case "updateProgress":
-      percentage.value = data.percentage;
-      break;
-    default:
-      break;
   }
 };
 
-const uploadIndexText = computed(() => {
-  let total = selections.value.length;
-  if (total === 0) {
-    total = 1;
-  }
-  return "共 " + total + " 人,正在处理第 " + patientIndex.value + " 人";
-});
 const cancelFees = () => {
   ElMessageBox.confirm("是否确定取消此患者已上传的费用?", "提示", {
     type: "warning",
     confirmButtonText: "确定",
     cancelButtonText: "放弃",
   })
-    .then(() => {
-      if (injuryMode.value) {
-        revokeInpatientCost(patient.value).then(() => {
-          ElMessage({
-            message: "操作成功。",
-            type: "success",
-            duration: 2500,
-            showClose: true,
+      .then(() => {
+        if (injuryMode.value) {
+          revokeInpatientCost(patient.value).then(() => {
+            ElMessage({
+              message: "操作成功。",
+              type: "success",
+              duration: 2500,
+              showClose: true,
+            });
+            fetchProjectFees();
+            fetchMedicineFees();
           });
-          fetchProjectFees();
-          fetchMedicineFees();
-        });
-      } else {
-        revokeUploadFees(patient.value).then(() => {
-          ElMessage({
-            message: "操作成功。",
-            type: "success",
-            duration: 2500,
-            showClose: true,
+        } else {
+          revokeUploadFees(patient.value).then(() => {
+            ElMessage({
+              message: "操作成功。",
+              type: "success",
+              duration: 2500,
+              showClose: true,
+            });
+            fetchProjectFees();
+            fetchMedicineFees();
           });
-          fetchProjectFees();
-          fetchMedicineFees();
-        });
-      }
-    })
-    .catch(() => {});
+        }
+      })
+      .catch(() => {
+      });
 };
 
 const showFeeDetl = ref(false);
@@ -609,9 +540,9 @@ const weiGuiTuiFeiFenXiDialogOpen = val => {
   weiGuiTuiFeiInit.value += 1;
   weiGuiJiBenXinXi.value.deptCode = "";
   weiGuiJiBenXinXi.value.inpatientNo =
-    typeof patient.value.inpatientNo === "undefined"
-      ? ""
-      : patient.value.inpatientNo;
+      typeof patient.value.inpatientNo === "undefined"
+          ? ""
+          : patient.value.inpatientNo;
   weiGuiJiBenXinXi.value.openDialog = val;
 };