Parcourir la source

违规退费现在可以不用选就进去了。

xiaochan il y a 3 ans
Parent
commit
a124012992

+ 28 - 0
src/App.vue

@@ -63,4 +63,32 @@ function getWindowSize() {
   border: 2px solid #000;
   border-radius: 4px;
 }
+
+.axios-loading,
+.axios-loading1 {
+  animation: axiosloading 1s;
+}
+.axios-loading2 {
+  animation: axiosloading 1s;
+}
+.axios-loading3 {
+  animation: axiosloading 2s;
+}
+.axios-loading4 {
+  animation: axiosloading 3s;
+}
+.axios-loading5 {
+  animation: axiosloading 4s;
+}
+@keyframes axiosloading {
+  0% {
+    opacity: 0;
+  }
+  99% {
+    opacity: 0;
+  }
+  100% {
+    opacity: 1;
+  }
+}
 </style>

+ 2 - 2
src/api/yibao/xiang-mu-lu-ru.js

@@ -118,11 +118,11 @@ export function cheXiaoTuiFei(inpatientNo, admissTimes, ledger, detailSn) {
   })
 }
 
-export function weiGuiFeiYongFenXi(inpatientNo, admissTimes, execUnit) {
+export function weiGuiFeiYongFenXi(inpatientNo, execUnit) {
   return request({
     url: '/xmlr/weiGuiFeiYongFenXi',
     method: 'get',
-    params: { inpatientNo, admissTimes, execUnit },
+    params: { inpatientNo, execUnit },
   })
 }
 

+ 74 - 25
src/components/inpatient/WeiGuiFeiYongFenXi.vue

@@ -3,11 +3,15 @@
     <el-header height="30">
       <el-descriptions title="患者信息" border>
         <template #extra>
-          <el-button type="primary" @click="chaoZuoZhiNan = true" size="small">操作指南</el-button>
-          <el-button type="primary" @click="ziDongPiPeiTuiFei" size="small">自动匹配</el-button>
+          <el-button type="primary" @click="chaoZuoZhiNan = true" icon="el-icon-bell" size="small">操作指南</el-button>
+          <el-button type="warning" @click="ziDongPiPeiTuiFei" icon="el-icon-refresh" size="small">自动匹配</el-button>
         </template>
         <el-descriptions-item label="姓名">{{ huanZheXinXi.name }}</el-descriptions-item>
-        <el-descriptions-item label="住院号">{{ huanZheXinXi.inpatientNo }}</el-descriptions-item>
+        <el-descriptions-item label="住院号">
+          <el-input size="mini" style="width: 120px" v-model="huanZheXinXi.inpatientNo" @keyup.enter="chaXunWeiGuiClick"></el-input>
+          <el-divider direction="vertical"></el-divider>
+          <el-button @click="chaXunWeiGuiClick">查询</el-button>
+        </el-descriptions-item>
         <el-descriptions-item label="住院次数">{{ huanZheXinXi.admissTimes }}</el-descriptions-item>
         <el-descriptions-item label="未匹配">{{ weiPiPei.data.length }} 条</el-descriptions-item>
         <el-descriptions-item label="违规费用">{{ weiGuiFeiYong.data.length }} 条</el-descriptions-item>
@@ -144,10 +148,10 @@
 </template>
 
 <script>
-import { onMounted, ref, watch } from 'vue'
+import { ref, watch } from 'vue'
 import store from '../../store'
-import { huoQuZhenShuKePiPei, caiFenPiPei, yiZhuTuiFeiPiPei } from '@/api/yibao/xiang-mu-lu-ru'
-import { ElMessageBox } from 'element-plus'
+import { huoQuZhenShuKePiPei, caiFenPiPei, yiZhuTuiFeiPiPei, weiGuiFeiYongFenXi } from '@/api/yibao/xiang-mu-lu-ru'
+import { ElMessage, ElMessageBox } from 'element-plus'
 import { shortcuts } from '@/data/shortcuts'
 import { getDateRangeFormatDate } from '../../utils/date'
 export default {
@@ -163,7 +167,13 @@ export default {
   setup(props, ctx) {
     const windowSize = store.state.app.windowSize
     const WinHeight = windowSize.h
-    const huanZheXinXi = props.patient
+
+    const huanZheXinXi = ref({
+      inpatientNo: '',
+      admissTimes: 0,
+      name: '',
+    })
+
     const feiYongXiuZhenDrawer = ref(false)
 
     const weiGuiTabs = ref('未匹配')
@@ -288,29 +298,26 @@ export default {
     watch(
       () => props.init,
       () => {
+        huanZheXinXi.value.deptCode = props.patient.deptCode
+        huanZheXinXi.value.inpatientNo = props.patient.inpatientNo
         genXingShuJu()
       }
     )
 
-    onMounted(() => {
-      genXingShuJu()
-      chaoZuoZhiNan.value = true
-    })
+    ctx.emit('open', false)
 
     const genXingShuJu = () => {
-      // 违规的费用
-      weiGuiFeiYong.value.currentPage = 1
-      weiGuiFeiYong.value.pageSize = 40
-      weiGuiFeiYong.value.data = props.patient.weiXieDaiYuanLiuShui
-      // 没有匹配
-      weiPiPei.value.currentPage = 1
-      weiPiPei.value.pageSize = 15
-      weiPiPei.value.data = props.patient.weiPiPei
-
-      if (props.patient.weiPiPei.length === 0 && props.patient.weiXieDaiYuanLiuShui.length > 0) {
-        weiGuiTabs.value = '违规退费'
+      if (huanZheXinXi.value.inpatientNo === '') {
+        qingKong()
+        ctx.emit('open', true)
+        setTimeout(() => {
+          ElMessage.warning({
+            message: '请输入住院号',
+          })
+        }, 1000)
       } else {
-        weiGuiTabs.value = '未匹配'
+        huanZheXinXi.value.inpatientNo = props.patient.inpatientNo
+        chaXunWeiGuiClick()
       }
     }
 
@@ -322,13 +329,54 @@ export default {
         dangerouslyUseHTMLString: true,
       })
         .then(() => {
-          yiZhuTuiFeiPiPei(props.patient.inpatientNo, props.patient.admissTimes, store.state.user.info.deptCode).then((res) => {
-            ctx.emit('shuaXin')
+          yiZhuTuiFeiPiPei(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.deptCode).then((res) => {
+            chaXunWeiGuiClick()
           })
         })
         .catch(() => {})
     }
 
+    const chaXunWeiGuiClick = () => {
+      weiGuiFeiYongFenXi(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.deptCode).then((res) => {
+        huanZheXinXi.value.inpatientNo = res.inpatientNo
+        huanZheXinXi.value.admissTimes = res.admissTimes
+        huanZheXinXi.value.name = res.name
+        // 违规的费用
+        weiGuiFeiYong.value.currentPage = 1
+        weiGuiFeiYong.value.pageSize = 40
+        weiGuiFeiYong.value.data = res.weiXieDaiYuanLiuShui
+        // 没有匹配
+        weiPiPei.value.currentPage = 1
+        weiPiPei.value.pageSize = 15
+        weiPiPei.value.data = res.weiPiPei
+        console.log(res)
+
+        if ((weiPiPei.value.data.length > 0 && huanZheXinXi.value.default === '') || weiGuiFeiYong.value.data.length > 0) {
+          ctx.emit('open', true)
+        }
+
+        if (weiPiPei.value.data.length === 0 && weiGuiFeiYong.value.data.length > 0) {
+          weiGuiTabs.value = '违规退费'
+        } else {
+          weiGuiTabs.value = '未匹配'
+        }
+      })
+    }
+
+    const qingKong = () => {
+      huanZheXinXi.value.inpatientNo = ''
+      huanZheXinXi.value.admissTimes = null
+      huanZheXinXi.value.name = ''
+      // 违规的费用
+      weiGuiFeiYong.value.currentPage = 1
+      weiGuiFeiYong.value.pageSize = 40
+      weiGuiFeiYong.value.data = []
+      // 没有匹配
+      weiPiPei.value.currentPage = 1
+      weiPiPei.value.pageSize = 15
+      weiPiPei.value.data = []
+    }
+
     return {
       weiPiPei,
       weiGuiFeiYong,
@@ -351,6 +399,7 @@ export default {
       chaoZuoZhiNan,
       keYiPiPeiDeZhenShuSizeChange,
       ziDongPiPeiTuiFei,
+      chaXunWeiGuiClick,
     }
   },
 }

+ 9 - 15
src/components/med-tec-mod/HuanZheFeiYong.vue

@@ -47,7 +47,7 @@
       ></el-pagination>
     </el-main>
     <el-dialog v-model="weiGuiTuiFeiFenXiDialog" title="违规费用分析" :fullscreen="true">
-      <wei-gui-fei-yong-fen-xi :init="weiGuiTuiFeiInit" @shuaXin="weiGuiTuiFeiFenXiDialogOpen" :patient="weiGuiJiBenXinXi"></wei-gui-fei-yong-fen-xi>
+      <wei-gui-fei-yong-fen-xi :init="weiGuiTuiFeiInit" @open="weiGuiTuiFeiOpenDialog" :patient="weiGuiJiBenXinXi"></wei-gui-fei-yong-fen-xi>
     </el-dialog>
   </el-container>
 </template>
@@ -164,24 +164,17 @@ export default {
 
     ///////////////////////////////////////////// 违规退费分析 /////////////////////////////////////////////////////////////////////////
     const weiGuiTuiFeiInit = ref(0)
-    const weiGuiTuiFeiFenXiDialog = ref(false)
+    const weiGuiTuiFeiFenXiDialog = ref(true)
 
     const weiGuiJiBenXinXi = ref({})
 
     const weiGuiTuiFeiFenXiDialogOpen = () => {
-      weiGuiFeiYongFenXi(props.patient.inpatientNo, props.patient.admissTimes, store.state.user.info.deptCode).then((res) => {
-        if (res.weiXieDaiYuanLiuShui.length > 0 || res.weiPiPei.length > 0) {
-          weiGuiTuiFeiFenXiDialog.value = true
-          weiGuiJiBenXinXi.value.inpatientNo = props.patient.inpatientNo
-          weiGuiJiBenXinXi.value.admissTimes = props.patient.admissTimes
-          weiGuiJiBenXinXi.value.name = props.patient.name
-          weiGuiJiBenXinXi.value.pageSize = 20
-          weiGuiJiBenXinXi.value.currentPage = 1
-        }
-        weiGuiTuiFeiInit.value += 1
-        weiGuiJiBenXinXi.value.weiPiPei = res.weiPiPei
-        weiGuiJiBenXinXi.value.weiXieDaiYuanLiuShui = res.weiXieDaiYuanLiuShui
-      })
+      weiGuiTuiFeiInit.value += 1
+      weiGuiJiBenXinXi.value.deptCode = store.state.user.info.deptCode
+    }
+
+    const weiGuiTuiFeiOpenDialog = (val) => {
+      weiGuiTuiFeiFenXiDialog.value = val
     }
 
     return {
@@ -199,6 +192,7 @@ export default {
       weiGuiTuiFeiFenXiDialog,
       weiGuiJiBenXinXi,
       weiGuiTuiFeiInit,
+      weiGuiTuiFeiOpenDialog,
     }
   },
 }

+ 30 - 2
src/utils/request.js

@@ -1,5 +1,5 @@
 import axios from 'axios'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import { ElLoading, ElMessage, ElMessageBox } from 'element-plus'
 import Cookies from 'js-cookie'
 import router from '@/router'
 import store from '@/store'
@@ -11,16 +11,42 @@ const service = axios.create({
   timeout: 0,
 })
 
+/*axios请求拦截*/
+var loading
+/*开启遮罩*/
+function startLoading(showLoadingTime) {
+  showLoadingTime = showLoadingTime || '2'
+  loading = ElLoading.service({
+    customClass: 'axios-loading' + showLoadingTime,
+    lock: true,
+    text: '加载中......',
+    spinner: 'el-icon-loading',
+    background: 'rgba(0, 0, 0, 0.7)',
+  })
+}
+
+/*关闭遮罩*/
+function endLoading() {
+  if (loading) {
+    loading.close()
+  }
+}
+
+var starTimestamp = new Date().valueOf()
+
 service.interceptors.request.use(
   (config) => {
+    starTimestamp = new Date().valueOf()
+    startLoading(config.showLoadingTime)
     if (store.getters['user/token']) {
       config.headers['token'] = store.state.user.token
     }
-    store.commit('app/setLoading', true)
+    store.commit('app/setLoading', false)
     return config
   },
   (error) => {
     store.commit('app/setLoading', false)
+    endLoading()
     return Promise.reject(error)
   }
 )
@@ -28,6 +54,7 @@ service.interceptors.request.use(
 service.interceptors.response.use(
   (response) => {
     store.commit('app/setLoading', false)
+    endLoading()
     if (response.data.code === 200 || response.data.code === 0) {
       return response.data.data
     }
@@ -85,6 +112,7 @@ service.interceptors.response.use(
     return Promise.reject(response.data.message || '服务器内部错误')
   },
   (error) => {
+    endLoading()
     store.commit('app/setLoading', false)
     ElMessage({
       message: error,

+ 13 - 16
src/views/medical-insurance/inpatient/InHospFeeUpload.vue

@@ -96,7 +96,7 @@
       </div>
     </el-main>
     <el-dialog v-model="weiGuiTuiFeiFenXiDialog" title="违规费用分析" :fullscreen="true">
-      <wei-gui-fei-yong-fen-xi :init="weiGuiTuiFeiInit" @shuaXin="weiGuiTuiFeiFenXiDialogOpen" :patient="weiGuiJiBenXinXi"></wei-gui-fei-yong-fen-xi>
+      <wei-gui-fei-yong-fen-xi :init="weiGuiTuiFeiInit" @open="weiGuiTuiFeiOpenDialog" ref="weiGui" :patient="weiGuiJiBenXinXi"></wei-gui-fei-yong-fen-xi>
     </el-dialog>
   </el-container>
 </template>
@@ -376,25 +376,20 @@ export default {
 
     ///////////////////////////////////////////// 违规退费分析 /////////////////////////////////////////////////////////////////////////
     const weiGuiTuiFeiInit = ref(0)
-    const weiGuiTuiFeiFenXiDialog = ref(false)
+    const weiGuiTuiFeiFenXiDialog = ref(true)
 
     const weiGuiJiBenXinXi = ref({})
 
+    const weiGui = ref()
+
     const weiGuiTuiFeiFenXiDialogOpen = () => {
-      if (nullPatient()) return
-      weiGuiFeiYongFenXi(patient.value.inpatientNo, patient.value.admissTimes, '').then((res) => {
-        if (res.weiXieDaiYuanLiuShui.length > 0 || res.weiPiPei.length > 0) {
-          weiGuiTuiFeiFenXiDialog.value = true
-          weiGuiJiBenXinXi.value.inpatientNo = patient.value.inpatientNo
-          weiGuiJiBenXinXi.value.admissTimes = patient.value.admissTimes
-          weiGuiJiBenXinXi.value.name = patient.value.name
-          weiGuiJiBenXinXi.value.pageSize = 20
-          weiGuiJiBenXinXi.value.currentPage = 1
-        }
-        weiGuiTuiFeiInit.value += 1
-        weiGuiJiBenXinXi.value.weiPiPei = res.weiPiPei
-        weiGuiJiBenXinXi.value.weiXieDaiYuanLiuShui = res.weiXieDaiYuanLiuShui
-      })
+      weiGuiTuiFeiInit.value += 1
+      weiGuiJiBenXinXi.value.deptCode = ''
+      weiGuiJiBenXinXi.value.inpatientNo = typeof patient.value.inpatientNo === 'undefined' ? '' : patient.value.inpatientNo
+    }
+
+    const weiGuiTuiFeiOpenDialog = (val) => {
+      weiGuiTuiFeiFenXiDialog.value = val
     }
 
     onMounted(() => {
@@ -438,6 +433,8 @@ export default {
       weiGuiTuiFeiFenXiDialogOpen,
       weiGuiJiBenXinXi,
       weiGuiTuiFeiInit,
+      weiGuiTuiFeiOpenDialog,
+      weiGui,
     }
   },
 }