Browse Source

优化门诊缴费获取医保费用

lighter 1 year ago
parent
commit
e3b1710dc0

+ 8 - 8
src/api/pay-mz-fee.js

@@ -24,14 +24,6 @@ export function getMzPaidList(patientId) {
   })
 }
 
-export function getUnsettledMdtrtId(hisOrdNum) {
-  return request({
-    url: '/payMzFee/getUnsettledMdtrtId',
-    method: 'get',
-    params: { hisOrdNum },
-  })
-}
-
 export function getUnsettledMedinsTrade(mdtrtId) {
   return request({
     url: '/payMzFee/getUnsettledMedinsTrade',
@@ -55,3 +47,11 @@ export function getMzPaidDetail(hisOrdNum) {
     params: { hisOrdNum },
   })
 }
+
+export function getFundPayAmt(hisOrdNum) {
+  return request({
+    url: '/payMzFee/getFundPayAmt',
+    method: 'get',
+    params: { hisOrdNum },
+  })
+}

+ 20 - 18
src/views/hospital-service/pay-mz-fee/FromGuideBillQrScan.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script setup>
-import { getUnPaidFee, getUnsettledMdtrtId } from '../../../api/pay-mz-fee'
+import {getFundPayAmt, getUnPaidFee} from '../../../api/pay-mz-fee'
 import empty from '../../../assets/empty.png'
 import { useRouter } from 'vue-router'
 import { computed, onMounted, ref } from 'vue'
@@ -28,23 +28,25 @@ const showEmpty = computed(() => {
 })
 
 const onClickFeeItem = (item) => {
-  const routeParams = {
-    patientId: patientId,
-    hisOrdNum: item.hisOrdNum,
-    patName: item.patName,
-    deptName: item.deptName,
-    doctorCode: item.doctorCode,
-    doctorName: item.doctorName,
-    totalAmt: item.totalAmt,
-    selfAmt: item.selfAmt,
-    fundPay: item.fundPay,
-    acctPay: item.acctPay
-  }
-  getUnsettledMdtrtId(item.hisOrdNum).then(res => {
-    routeParams.mdtrtId = res
-    toMedinsSettle(routeParams)
-  }).catch(() => {
-    toDetail(routeParams)
+  getFundPayAmt(item.hisOrdNum).then(res => {
+    const routeParams = {
+      patientId: patientId,
+      hisOrdNum: item.hisOrdNum,
+      patName: item.patName,
+      deptName: item.deptName,
+      doctorCode: item.doctorCode,
+      doctorName: item.doctorName,
+      totalAmt: item.totalAmt,
+      fundPay: res.fundPaySumamt,
+      acctPay: res.acctPay,
+      selfAmt: item.totalAmt - res.fundPaySumamt - res.acctPay
+    }
+    if (res.mdtrtId && !res.setlId) {
+      routeParams.mdtrtId = res.mdtrtId;
+      toMedinsSettle(routeParams);
+    } else {
+      toDetail(routeParams);
+    }
   })
 }
 

+ 27 - 23
src/views/hospital-service/pay-mz-fee/UnPaidList.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script setup>
-import { getUnPaidFee, getUnsettledMdtrtId } from '../../../api/pay-mz-fee'
+import {getFundPayAmt, getUnPaidFee} from '../../../api/pay-mz-fee'
 import empty from '../../../assets/empty.png'
 import { useRouter } from 'vue-router'
 import { computed, onMounted, ref } from 'vue'
@@ -26,23 +26,25 @@ const showEmpty = computed(() => {
 })
 
 const onClickFeeItem = (item) => {
-  const routeParams = {
-    patientId: patientId,
-    hisOrdNum: item.hisOrdNum,
-    patName: item.patName,
-    deptName: item.deptName,
-    doctorCode: item.doctorCode,
-    doctorName: item.doctorName,
-    totalAmt: item.totalAmt,
-    selfAmt: item.selfAmt,
-    fundPay: item.fundPay,
-    acctPay: item.acctPay
-  }
-  getUnsettledMdtrtId(item.hisOrdNum).then(res => {
-    routeParams.mdtrtId = res
-    toMedinsSettle(routeParams)
-  }).catch(() => {
-    toDetail(routeParams)
+  getFundPayAmt(item.hisOrdNum).then(res => {
+    const routeParams = {
+      patientId: patientId,
+      hisOrdNum: item.hisOrdNum,
+      patName: item.patName,
+      deptName: item.deptName,
+      doctorCode: item.doctorCode,
+      doctorName: item.doctorName,
+      totalAmt: item.totalAmt,
+      fundPay: res.fundPaySumamt,
+      acctPay: res.acctPay,
+      selfAmt: item.totalAmt - res.fundPaySumamt - res.acctPay
+    }
+    if (res.mdtrtId && !res.setlId) {
+      routeParams.mdtrtId = res.mdtrtId;
+      toMedinsSettle(routeParams);
+    } else {
+      toDetail(routeParams);
+    }
   })
 }
 
@@ -59,11 +61,6 @@ const toDetail = (params) => {
     params,
   })
 }
-onMounted(() => {
-  getUnPaidFee(patientId).then((res) => {
-    unpaidFees.value = res
-  })
-})
 
 function makeTitle(item) {
   return item.deptName + ' | ' + item.doctorName
@@ -73,4 +70,11 @@ function makeMoney(money) {
   const m = money / 100
   return '¥ ' + m.toFixed(2)
 }
+
+onMounted(() => {
+  getUnPaidFee(patientId).then((res) => {
+    unpaidFees.value = res
+  })
+})
+
 </script>