Browse Source

挂号缴费成功后添加就诊提示

lighter 1 year ago
parent
commit
daecbfbb30

+ 8 - 0
src/api/appointment.js

@@ -109,3 +109,11 @@ export function cancelReqrec(data) {
     data,
   })
 }
+
+export function getDeptPos(deptCode) {
+  return request({
+    url: '/appointment/getDeptPos',
+    method: 'get',
+    params: { deptCode },
+  })
+}

+ 9 - 3
src/components/wx-order-detail/index.vue

@@ -52,8 +52,14 @@
     </div>
   </div>
   <div class="close-wrapper">
-    <van-button size="small" type="danger" round plain
-                style="width: 120px" @click="closeComponent">
+    <van-button
+        size="small"
+        type="danger"
+        round
+        plain
+        style="width: 120px"
+        @click="closeComponent"
+    >
       关闭
     </van-button>
   </div>
@@ -67,7 +73,7 @@ const emits = defineEmits(['close'])
 const createOrderRequest = store.getters.getCreateOrderRequest
 
 function fixDigits(money) {
-  return '¥' + money.toFixed(2)
+  return '¥' + money
 }
 
 function fixPrice(money) {

+ 7 - 1
src/views/public-pages/Cashier.vue

@@ -65,6 +65,7 @@ import {getMyCoupons} from "@/api/coupon";
 import {createPayOrder, queryOrderState} from "@/api/wx-jsapi";
 import router from "@/router";
 import PaymentCountdown from '@/components/countdown-for-payment/index.vue'
+import {getDeptPos} from "@/api/appointment";
 
 const countdownFinished = ref(false)
 const createOrderRequest = store.getters.getCreateOrderRequest
@@ -122,7 +123,7 @@ function weChatPay() {
       type: 'storeYjReqNo',
       yjReqNo: null
     })
-    if (createOrderRequest.cashpayAmt === 0) {
+    if (Number(createOrderRequest.cashpayAmt) === 0) {
       queryOrderTradeState(order.tradeNo)
     } else {
       executePaymentAction(order)
@@ -158,6 +159,11 @@ function queryOrderTradeState(tradeNo) {
 
 onMounted(() => {
   const hisOrdNum = createOrderRequest.hisOrdNum || 'REGISTER'
+  if (hisOrdNum === 'REGISTER') {
+    getDeptPos(createOrderRequest.deptCode).then(res => {
+      createOrderRequest.deptPos = res
+    })
+  }
   const chargeCodeList = []
   if (createOrderRequest.chargeList) {
     createOrderRequest.chargeList.forEach((item) => {

+ 152 - 101
src/views/public-pages/PaymentSuccess.vue

@@ -1,12 +1,12 @@
 <template>
-  <div style="height: 100vh">
+  <div class="payment-success">
     <van-nav-bar title="支付完成" @click-right="closePage">
       <template #right>
         <van-icon name="close" size="18" /><span class="nav-bar-text">关闭</span>
       </template>
     </van-nav-bar>
 
-    <div style="background-color: white; padding: 12px 0">
+    <div class="main-box">
       <div class="icon-wrapper">
         <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="icon-success">
           <path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"></path>
@@ -57,15 +57,50 @@
             {{createOrderRequest.payTime}}
           </div>
         </div>
+        <div
+            v-if="createOrderRequest.body === '挂号费' && createOrderRequest.deptPos"
+            class="registration-note"
+        >
+          您已成功预约
+          <van-tag type="primary">
+            {{createOrderRequest.date}} {{createOrderRequest.apValue}}
+          </van-tag>
+          <van-tag type="primary">
+            {{createOrderRequest.deptName}}
+          </van-tag>
+          <van-tag type="primary">
+            {{createOrderRequest.doctorName}}医生
+          </van-tag>
+          门诊,请您按预约时间来院就诊。
+          <br/>
+          就诊地点:
+          <van-tag type="primary">
+            {{createOrderRequest.deptPos}}
+          </van-tag>
+          。
+          <br />
+          就诊前请先至就诊楼层分诊台分诊。
+          感谢您的配合,祝您就诊顺利!
+        </div>
       </div>
       <div style="text-align: center;margin: 24px 0 12px 0">
-        <van-button size="small" type="warning" plain round
-                    style="width:120px" @click="checkMyOrder">
+        <van-button
+            size="small"
+            type="warning"
+            plain
+            round
+            style="width:120px"
+            @click="checkMyOrder"
+        >
           查看订单
         </van-button>
-        <van-button size="small" type="warning" round
-                    style="width:120px;margin-left: 12px"
-                    @click="toHome">
+        <van-button
+            size="small"
+            type="warning"
+            round
+            style="width:120px;margin-left: 12px"
+            @click="toHome"
+        >
           回到首页
         </van-button>
       </div>
@@ -105,9 +140,15 @@
             style="border: 1px solid lightgray; border-radius: 5px; margin-top: 12px"
         />
         <div class="comment-submit-box">
-          <van-button size="small" round type="danger" plain
-                      :disabled="disableSubmitComment"
-                      style="width: 120px" @click="submitComment">
+          <van-button
+              size="small"
+              type="danger"
+              round
+              plain
+              :disabled="disableSubmitComment"
+              style="width: 120px"
+              @click="submitComment"
+          >
             提交
           </van-button>
         </div>
@@ -188,96 +229,106 @@ function submitComment() {
 }
 </script>
 
-<style scoped>
-.nav-bar-text {
-  color: #1989fa;
-  margin-left: 4px;
-}
-
-.icon-wrapper {
-  width: 100%;
-  text-align: center;
-}
-
-.icon-success {
-  color: #67c23a;
-  width: 64px;
-  height: 64px;
-}
-.result_title {
-  margin-top: 8px;
-}
-.result_title > p {
-  margin: 0;
-  font-size: 14px;
-  font-weight: bold;
-  color: #303133;
-  line-height: 1.3;
-}
-
-.pay-brief-wrapper {
-  margin-top: 20px;
-  text-align: center;
-  font-size: 14px;
-}
-.brief-line {
-  display: flex;
-  margin-bottom: 4px;
-}
-.brief-line > div {
-  flex: 1;
-}
-.left-column {
-  text-align: left;
-  padding-left: 20px;
-}
-.right-column {
-  text-align: right;
-  padding-right: 20px;
-}
-.money-color {
-  color: orangered;
-}
-
-.comment-wrapper {
-  background-image: linear-gradient(#fca46d, #fcd5b3);
-  margin: 24px 12px;
-  border-radius: 10px;
-  padding-bottom: 12px;
-}
-
-.comment-bar-title {
-  display: flex;
-  align-items: center;
-  padding: 4px 0 2px 16px;
-}
-
-.comment-bar-title_icon {
-  color: #dc2424;
-  font-size: 18px;
-  margin-top: 3px;
-}
-.comment-bar-title_text {
-  color: #dc2424;
-  margin-left: 6px;
-  font-size: 14px;
-  line-height: 30px;
-}
-.comment-bar-title_subtext {
-  margin-left: 8px;
-  font-size: 12px;
-  color: white;
-  line-height: 30px;
-}
-.comment-content-box {
-  background-color: white;
-  margin: 0 12px;
-  padding: 12px;
-}
-
-.comment-submit-box {
-  width: 100%;
-  margin-top: 12px;
-  text-align: center;
+<style lang="scss">
+.payment-success {
+  height: 100vh;
+  .main-box {
+    background-color: white;
+    padding: 12px 0;
+  }
+  .nav-bar-text {
+    color: #1989fa;
+    margin-left: 4px;
+  }
+  .icon-wrapper {
+    width: 100%;
+    text-align: center;
+  }
+  .icon-success {
+    color: #67c23a;
+    width: 64px;
+    height: 64px;
+  }
+  .result_title {
+    margin-top: 8px;
+    > p {
+      margin: 0;
+      font-size: 14px;
+      font-weight: bold;
+      color: #303133;
+      line-height: 1.3;
+    }
+  }
+  .pay-brief-wrapper {
+    margin-top: 20px;
+    text-align: center;
+    font-size: 14px;
+  }
+  .brief-line {
+    display: flex;
+    margin-bottom: 4px;
+    > div {
+      flex: 1;
+    }
+  }
+  .registration-note {
+    padding: 8px ;
+    margin: 18px;
+    text-align: left;
+    border: 1px solid lightgray;
+    box-shadow: #00a828 0 0 3px 0;
+    .van-tag {
+      margin-right: 2px;
+    }
+  }
+  .left-column {
+    text-align: left;
+    padding-left: 20px;
+  }
+  .right-column {
+    text-align: right;
+    padding-right: 20px;
+  }
+  .money-color {
+    color: orangered;
+  }
+  .comment-wrapper {
+    background-image: linear-gradient(#fca46d, #fcd5b3);
+    margin: 24px 12px;
+    border-radius: 10px;
+    padding-bottom: 12px;
+  }
+  .comment-bar-title {
+    display: flex;
+    align-items: center;
+    padding: 4px 0 2px 16px;
+  }
+  .comment-bar-title_icon {
+    color: #dc2424;
+    font-size: 18px;
+    margin-top: 3px;
+  }
+  .comment-bar-title_text {
+    color: #dc2424;
+    margin-left: 6px;
+    font-size: 14px;
+    line-height: 30px;
+  }
+  .comment-bar-title_subtext {
+    margin-left: 8px;
+    font-size: 12px;
+    color: white;
+    line-height: 30px;
+  }
+  .comment-content-box {
+    background-color: white;
+    margin: 0 12px;
+    padding: 12px;
+  }
+  .comment-submit-box {
+    width: 100%;
+    margin-top: 12px;
+    text-align: center;
+  }
 }
 </style>