Browse Source

优化挂号管理

lighter 2 years ago
parent
commit
45e693e8b1

+ 9 - 1
src/components/appointment-management-branch/index.vue

@@ -1,5 +1,6 @@
 <template>
-  <div :style="boxWrapper">
+  <van-empty :image="empty" description="没有查询到有效数据" v-if="showEmpty"></van-empty>
+  <div v-else :style="boxWrapper">
     <van-cell
         v-for="item in mzyReqsList"
         :title="item.unitCode"
@@ -15,6 +16,7 @@
 </template>
 
 <script>
+import empty from '../../assets/empty.png'
 import {computed, onMounted, ref} from "vue";
 import {listMzyReqrec} from '../../api/appointment.js'
 import {useStore} from "vuex";
@@ -31,6 +33,7 @@ export default {
     }
   },
   setup(props) {
+    const showEmpty = ref(true)
     const store = useStore()
     const windowSize = store.state.windowSize
     const boxWrapper = {
@@ -62,6 +65,7 @@ export default {
     onMounted(() => {
       const param = {patientId: props.patientId, payMark: props.payMark}
       listMzyReqrec(param).then(res => {
+        showEmpty.value = false
         switch (props.payMark) {
           case '5':
             mzyReqsUnPaid.value = res
@@ -73,10 +77,14 @@ export default {
             mzyReqsRefund.value = res
                 break
         }
+      }).catch(() => {
+        showEmpty.value = true
       })
     })
 
     return {
+      empty,
+      showEmpty,
       boxWrapper,
       mzyReqsList,
       makeRedirectPath

+ 1 - 2
src/views/hospital-service/appointment/SelectDoctorAndDate.vue

@@ -116,8 +116,7 @@ export default {
       } else {
         Dialog.confirm({
           title: '温馨提示',
-          message: '1.进入门诊不需要查看健康码和核酸/抗原,如您有发热或新冠病毒感染就诊需求,请提前告知医务人员或至发热门诊就诊;' +
-              '\r\n2.当日挂号均不换号、不退号、不转科,请您务必确认后再选择相应专科就诊。'
+          message: '超过预约日期未就诊,不予退号、换号、转科,敬请谅解。'
         }).then(() => {
           const to = '/doctorArrangement/' + data.dateSelected + '/' + deptCode + '/' + val.doctorCode
           router.push(to)

+ 1 - 1
src/views/hospital-service/appointment/management/AppointmentManagement.vue

@@ -4,7 +4,7 @@
       <van-tab title="未缴费" name="unpaid">
         <appointment-management-branch pay-mark="5" :patient-id="patientId"/>
       </van-tab>
-      <van-tab title="已缴费" name="paid">
+      <van-tab title="可退费" name="paid">
         <appointment-management-branch pay-mark="0" :patient-id="patientId"/>
       </van-tab>
       <van-tab title="已退费" name="refund">

+ 12 - 7
src/views/hospital-service/appointment/management/RefundAppointment.vue

@@ -21,7 +21,7 @@
     <van-button type="primary" block :disabled="disableRefundButton" @click="revokeMzyReq">退款退号</van-button>
     <div style="font-size: 14px; color: orangered; padding: 4px 12px">
       <p>小提示:</p>
-      <p style="font-weight: bold">仅支持最近15天内尚未就诊的微信自助挂号。</p>
+      <p style="font-weight: bold">仅支持不超过预约日期且尚未就诊的微信自助挂号。</p>
     </div>
   </window-size>
 </template>
@@ -29,7 +29,7 @@
 <script>
 import {onMounted, ref} from 'vue'
 import {getMzyReqrecInfo, cancelReqrec} from '../../../../api/appointment.js'
-import {Toast} from 'vant'
+import {Dialog, Toast} from 'vant'
 import {useRouter} from "vue-router";
 import {getDateDiff} from "../../../../utils/date";
 
@@ -46,17 +46,22 @@ export default {
     const disableRefundButton = ref(true)
 
     const revokeMzyReq = () => {
-      cancelReqrec(mzyReq.value).then(() => {
-        Toast.success('退号成功。');
-        router.go(-1)
-      })
+      Dialog.confirm({
+        title: '温馨提示',
+        message: '是否确认退号退费?'
+      }).then(() => {
+        cancelReqrec(mzyReq.value).then(() => {
+          Toast.success('退号成功,您的资金已原路退回,请留意微信退款信息。');
+          router.go(-1)
+        })
+      }).catch(() => {})
     }
 
     onMounted(() => {
       const params = {patientId, times, filterUnpaidReq: false}
       getMzyReqrecInfo(params).then(res => {
         mzyReq.value = res
-        disableRefundButton.value = (getDateDiff(res.requestDayStr) > 15 || null === res.paymode
+        disableRefundButton.value = (getDateDiff(res.requestDayStr) > 0 || null === res.paymode
             || res.visitedMark === '1' || res.cancelMark === '1');
         if (res.visitedMark === '1') {
           reqStatus.value = '挂号费(已就诊)'