Explorar o código

style(KIP-7551): 纸质优惠券减免页面

John-Hong %!s(int64=2) %!d(string=hai) anos
pai
achega
2fa1c68770

+ 147 - 84
src/pages/parkingFee/components/base/parkingFeeDetail.vue

@@ -6,13 +6,14 @@
       <div class="warp">
         <div
           :class="{
-              warp_index: true,
-              warp_index1: true,
-              'bgc-blue': custTypeId === 1,
-              'bgc-green': custTypeId === 2,
-            }"
-        >{{ parkInfo.carno | formatCarno }}</div
+            warp_index: true,
+            warp_index1: true,
+            'bgc-blue': custTypeId === 1,
+            'bgc-green': custTypeId === 2,
+          }"
         >
+          {{ parkInfo.carno | formatCarno }}
+        </div>
         <div class="warp_index">
           <div>停车场</div>
           <div class="warp_index_color">{{ parkInfo.parkname }}</div>
@@ -27,26 +28,27 @@
         </div>
         <div class="warp_index">
           <div>应缴</div>
-          <div class="warp_index_color">{{
-              (parkInfo.servicefee / 100) | currency
-            }}</div>
+          <div class="warp_index_color">
+            {{ (parkInfo.servicefee / 100) | currency }}
+          </div>
         </div>
       </div>
       <div class="warp" v-if="parkFee.parkInfoEntity">
         <div
           class="warp_index warp_index_da"
           v-if="
-              parkFee.parkInfoEntity.consumeReduce ||
-              parkFee.parkInfoEntity.memberLevelReduce
-            "
+            parkFee.parkInfoEntity.consumeReduce ||
+            parkFee.parkInfoEntity.memberLevelReduce
+          "
         >
           <div>停车优惠</div>
           <div class="warp_index_color" @click="discounts">
             <div
               style="margin-right: 10px"
               :class="hasDiscount ? 'text-red' : ''"
-            >{{ discountDesc }}</div
             >
+              {{ discountDesc }}
+            </div>
             <img
               style="width: 26px; height: 26px"
               :src="`${require('../../static/images/arrows.png')}`"
@@ -56,17 +58,18 @@
         <div
           class="warp_index warp_index_da"
           v-if="
-              parkFee.parkInfoEntity.isuseintegral === 1 &&
-              parkFee.discountKind === 7
-            "
+            parkFee.parkInfoEntity.isuseintegral === 1 &&
+            parkFee.discountKind === 7
+          "
         >
           <div>新会员积分优惠</div>
           <div class="warp_index_color" @click="newToggle('bottom')">
             <div
               style="margin-right: 10px"
               :class="bonusCopy >= integralNew || durationNew ? 'text-red' : ''"
-            >{{ integralDescNew }}</div
             >
+              {{ integralDescNew }}
+            </div>
             <img
               style="width: 26px; height: 26px"
               :src="`${require('../../static/images/arrows.png')}`"
@@ -82,8 +85,9 @@
             <div
               style="margin-right: 10px"
               :class="bonusCopy >= integral || duration ? 'text-red' : ''"
-            >{{ integralDesc }}</div
             >
+              {{ integralDesc }}
+            </div>
             <img
               style="width: 26px; height: 26px"
               :src="`${require('../../static/images/arrows.png')}`"
@@ -99,8 +103,9 @@
             <div
               style="margin-right: 10px"
               :class="couponCount > 0 ? 'text-red' : ''"
-            >{{ couponDesc }}</div
             >
+              {{ couponDesc }}
+            </div>
             <img
               style="width: 26px; height: 26px"
               :src="`${require('../../static/images/arrows.png')}`"
@@ -114,9 +119,9 @@
         >
           <div>纸质优惠劵</div>
           <div class="warp_index_color" @click="paperCoupon">
-            <div style="margin-right: 10px" class="text-red"
-            >扫描纸质优惠劵二维码</div
-            >
+            <div style="margin-right: 10px" class="text-red">
+              扫描纸质优惠劵二维码
+            </div>
             <img
               style="width: 26px; height: 26px"
               :src="`${require('../../static/images/arrows.png')}`"
@@ -125,24 +130,27 @@
         </div>
         <div
           :class="{
-              warp_index: true,
-              color_warp_index: custTypeId !== 0,
-              warp_index_da: true,
-            }"
+            warp_index: true,
+            color_warp_index: custTypeId !== 0,
+            warp_index_da: true,
+          }"
         >
           <div>优惠金额:</div>
-          <div class="warp_index_color" style="color: #ff0000"
-          >-{{ discountTotalFee | currency }}</div
-          >
+          <div class="warp_index_color" style="color: #ff0000">
+            -{{ discountTotalFee | currency }}
+          </div>
         </div>
         <div :class="{ warp_index: true, color_warp_index: custTypeId !== 0 }">
           <div>应付金额:</div>
-          <div class="warp_index_color" style="color: #ff0000">{{
-              actualFee | currency
-            }}</div>
+          <div class="warp_index_color" style="color: #ff0000">
+            {{ actualFee | currency }}
+          </div>
         </div>
       </div>
-      <div class="top_content" v-if="parkFee.parkInfoEntity && parkFee.parkInfoEntity.payinstruction">
+      <div
+        class="top_content"
+        v-if="parkFee.parkInfoEntity && parkFee.parkInfoEntity.payinstruction"
+      >
         <div class="title_box">
           <span class="btn">缴费说明</span>
         </div>
@@ -153,26 +161,27 @@
           class="top-down"
           @click="togglePayinstruction"
           v-if="!isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
-        >︾</div
         >
+          ︾
+        </div>
         <div
           class="top-down"
           @click="togglePayinstruction"
           v-if="isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
-        >︽</div
         >
+          ︽
+        </div>
       </div>
-      <div style="height: 130px;width: 100%;"></div>
+      <div style="height: 130px; width: 100%"></div>
     </div>
     <div class="flewx">
-      <div class="flewx-content"
-      >应付<span
-        style="color: #ff0000; font-size: 32px; padding-left: 20px"
-      >{{ actualFee | currency }}</span
-      >
+      <div class="flewx-content">
+        应付<span style="color: #ff0000; font-size: 32px; padding-left: 20px">{{
+          actualFee | currency
+        }}</span>
         <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px"
-        >已优惠{{ discountTotalFee | currency }}元</span
+          >已优惠{{ discountTotalFee | currency }}元</span
         >
         <div class="count-down-box">
           <van-count-down
@@ -186,25 +195,32 @@
       </div>
       <div
         :class="{
-              flewx_index3: true,
-              blue_flewx_index3: custTypeId === 1,
-              green_flewx_index3: custTypeId === 2,
-              'btn-disabled': payBtnDisabled,
-            }"
+          flewx_index3: true,
+          blue_flewx_index3: custTypeId === 1,
+          green_flewx_index3: custTypeId === 2,
+          'btn-disabled': payBtnDisabled,
+        }"
         @click="toPay"
-      >支付</div
       >
+        支付
+      </div>
     </div>
-    <uni-popup  v-model="popup" type="bottom" :animation="false" :maskClick="false">
+    <van-popup
+      v-model="popup"
+      position="bottom"
+      :animation="false"
+      :maskClick="false"
+      :close-on-click-overlay="false"
+    >
       <div class="popue_box">
         <div class="popue_box_index1">积分减免</div>
         <div class="popue_box_index">
           <div>减免规则</div>
-          <div style="color: #989898"
-          >{{ integral }}积分抵扣{{
+          <div style="color: #989898">
+            {{ integral }}积分抵扣{{
               parkMallCode === 5 ? integralToValue + '元' : '1小时'
-            }}</div
-          >
+            }}
+          </div>
         </div>
         <div class="popue_box_index">
           <div style="font-weight: 700">可用积分</div>
@@ -214,17 +230,17 @@
           <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
           <div class="popue_box_index" style="width: 325px">
             <div class="popue_box_index4_xs">
-              <div class="popue_box_index4_xs_index1" @click="durationMinus"
-              >-</div
-              >
+              <div class="popue_box_index4_xs_index1" @click="durationMinus">
+                -
+              </div>
               <div class="popue_box_index4_xs_index2">{{ duration }}</div>
-              <div class="popue_box_index4_xs_index3" @click="durationAdd"
-              >+</div
-              >
+              <div class="popue_box_index4_xs_index3" @click="durationAdd">
+                +
+              </div>
+            </div>
+            <div style="color: #808080">
+              {{ parkMallCode === 5 ? '元' : '小时' }}
             </div>
-            <div style="color: #808080">{{
-                parkMallCode === 5 ? '元' : '小时'
-              }}</div>
           </div>
         </div>
         <div class="popue_box_index5">
@@ -235,8 +251,9 @@
               green_popue_box_index4_by: custTypeId === 2,
             }"
             @click="cancel(1)"
-          >取消</div
           >
+            取消
+          </div>
           <div
             :class="{
               popue_box_index4_by1: true,
@@ -244,16 +261,18 @@
               green_popue_box_index4_by1: custTypeId === 2,
             }"
             @click="confirm(1)"
-          >确定</div
           >
+            确定
+          </div>
         </div>
       </div>
-    </uni-popup>
-    <uni-popup
+    </van-popup>
+    <van-popup
       v-model="newpopup"
-      type="bottom"
+      position="bottom"
       :animation="false"
       :maskClick="false"
+      :close-on-click-overlay="false"
     >
       <div class="popue_box">
         <div class="popue_box_index1">积分优惠减免</div>
@@ -269,17 +288,17 @@
           <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
           <div class="popue_box_index" style="width: 325px">
             <div class="popue_box_index4_xs">
-              <div class="popue_box_index4_xs_index1" @click="durationMinusNew"
-              >-</div
-              >
+              <div class="popue_box_index4_xs_index1" @click="durationMinusNew">
+                -
+              </div>
               <div class="popue_box_index4_xs_index2">{{ durationNew }}</div>
-              <div class="popue_box_index4_xs_index3" @click="durationAddNew"
-              >+</div
-              >
+              <div class="popue_box_index4_xs_index3" @click="durationAddNew">
+                +
+              </div>
+            </div>
+            <div style="color: #808080">
+              {{ parkMallCode === 5 ? '元' : '小时' }}
             </div>
-            <div style="color: #808080">{{
-                parkMallCode === 5 ? '元' : '小时'
-              }}</div>
           </div>
         </div>
         <div class="popue_box_index5">
@@ -290,8 +309,9 @@
               green_popue_box_index4_by: custTypeId === 2,
             }"
             @click="cancel(2)"
-          >取消</div
           >
+            取消
+          </div>
           <div
             :class="{
               popue_box_index4_by1: true,
@@ -299,19 +319,21 @@
               green_popue_box_index4_by1: custTypeId === 2,
             }"
             @click="confirm(2)"
-          >确定</div
           >
+            确定
+          </div>
         </div>
       </div>
-    </uni-popup>
+    </van-popup>
   </scroll-view>
 </template>
 
 <script>
-import parkingFeeDetailJs from '../../mixins/parkingFeeDetail'
+import parkingFeeDetailJs from '../../mixins/parkingFeeDetail';
+
 export default {
-  mixins:[parkingFeeDetailJs]
-}
+  mixins: [parkingFeeDetailJs],
+};
 </script>
 
 <style lang="less" scoped>
@@ -699,14 +721,17 @@ export default {
     background-color: #fff;
     border-bottom: 1px solid #eee;
     padding: 15px 30px;
+
     .title {
       font-size: 16px;
     }
+
     .dk_desc {
       font-size: 12px;
       color: #999;
       margin-top: 3px;
     }
+
     .value {
       font-size: 14px;
       color: #999;
@@ -883,6 +908,7 @@ export default {
             line-height: 48px;
             font-weight: 600;
           }
+
           .h3.color_disabled {
             color: #838181;
             font-weight: 400;
@@ -923,6 +949,7 @@ export default {
       }
     }
   }
+
   // 对勾
   .dot {
     position: absolute;
@@ -967,6 +994,7 @@ export default {
   background-color: #fff;
   border-radius: 10px;
   padding-bottom: 10px;
+
   .warp_index {
     width: 650px;
     margin-left: 27.5px;
@@ -976,21 +1004,26 @@ export default {
     padding: 20px 0;
     font-size: 28px;
   }
+
   .warp_index1 {
     justify-content: center;
     font-size: 40px;
     padding: 30px 0;
     border-bottom: 1px solid #f2f2f2;
   }
+
   .color_warp_index {
     color: #000000;
   }
+
   .bgc-blue {
     .bgc-color('blue');
   }
+
   .bgc-green {
     .bgc-color('green');
   }
+
   .bgc-color(@value) {
     @color: 'color-@{value}';
     color: #fff;
@@ -999,10 +1032,12 @@ export default {
     width: 100%;
     border-radius: 10px 10px 0 0;
   }
+
   .warp_index_da {
     padding: 30px 0;
     border-bottom: 1px solid #f2f2f2;
   }
+
   .warp_index_color {
     color: #999999;
     display: flex;
@@ -1022,26 +1057,30 @@ export default {
   // padding-bottom: constant(safe-area-inset-bottom);
   // padding-bottom: env(safe-area-inset-bottom);
   padding-bottom: 20px;
+
   .flewx-content {
     position: absolute;
     left: 16px;
+
     .count-down-box {
       padding-left: 10px;
       display: flex;
       font-weight: 400;
       align-items: center;
+
       .van-count-down {
         font-size: 25px;
-        color: #FF0000;
+        color: #ff0000;
         margin-right: 10px;
       }
 
       .desc {
         font-size: 25px;
-        color: #FF0000;
+        color: #ff0000;
       }
     }
   }
+
   .flewx_index3 {
     width: 150px;
     height: 70px;
@@ -1055,17 +1094,21 @@ export default {
     position: absolute;
     right: 16px;
   }
+
   .blue_flewx_index3 {
     .color_flewx_index3('blue');
   }
+
   .green_flewx_index3 {
     .color_flewx_index3('green');
   }
+
   .color_flewx_index3(@value) {
     @color: 'color-@{value}';
     background-image: none;
     background-color: @@color;
   }
+
   .btn-disabled {
     color: hsla(0, 0%, 100%, 0.6);
     cursor: not-allowed;
@@ -1073,6 +1116,7 @@ export default {
     background-image: none;
   }
 }
+
 .popue_box {
   height: 530px;
   background-color: #fff;
@@ -1080,6 +1124,7 @@ export default {
   bottom: 0;
   left: 0;
   right: 0;
+
   .popue_box_index {
     width: 92%;
     margin-left: 4%;
@@ -1090,6 +1135,7 @@ export default {
     align-items: center;
     justify-content: space-between;
   }
+
   .popue_box_index1 {
     font-size: 32px;
     width: 92%;
@@ -1100,6 +1146,7 @@ export default {
     border-bottom: 1px solid #f5f5f5;
     text-align: center;
   }
+
   .popue_box_index4_xs {
     width: 250px;
     height: 55px;
@@ -1108,6 +1155,7 @@ export default {
     align-items: center;
     justify-content: space-between;
     border-radius: 10px;
+
     .popue_box_index4_xs_index1 {
       width: 54px;
       height: 54px;
@@ -1116,6 +1164,7 @@ export default {
       line-height: 54px;
       border-right: 1px solid #e5e6ec;
     }
+
     .popue_box_index4_xs_index3 {
       width: 54px;
       height: 54px;
@@ -1125,6 +1174,7 @@ export default {
       border-left: 1px solid #e5e6ec;
     }
   }
+
   .popue_box_index5 {
     font-size: 30px;
     width: 92%;
@@ -1136,6 +1186,7 @@ export default {
     align-items: center;
     justify-content: space-between;
   }
+
   .popue_box_index4_by {
     width: 320px;
     height: 90px;
@@ -1147,17 +1198,21 @@ export default {
     font-weight: 700;
     border: 1px solid #7e4fa1;
   }
+
   .blue_popue_box_index4_by {
     .color_popue_box_index4_by('blue');
   }
+
   .green_popue_box_index4_by {
     .color_popue_box_index4_by('green');
   }
+
   .color_popue_box_index4_by(@value) {
     @color: 'color-@{value}';
     color: @@color;
     border: 1px solid @@color;
   }
+
   .popue_box_index4_by1 {
     width: 320px;
     height: 90px;
@@ -1168,19 +1223,24 @@ export default {
     background-image: linear-gradient(to right, #7e4fa1, #433c7f);
     border: 1px solid #7e4fa1;
   }
+
   .blue_popue_box_index4_by1 {
     .color-background-color('blue');
   }
+
   .green_popue_box_index4_by1 {
     .color-background-color('green');
   }
 }
+
 .text-purple {
   color: #703a98;
 }
+
 .text-red {
   color: #ff0000;
 }
+
 .top_content {
   padding: 25px 35px 120px;
   box-sizing: border-box;
@@ -1208,6 +1268,7 @@ export default {
       text-align: center;
     }
   }
+
   .info {
     padding-left: 18px;
     font-size: 27px;
@@ -1215,6 +1276,7 @@ export default {
     color: #666;
     line-height: 45px;
   }
+
   .is-show {
     word-break: break-all;
     text-overflow: ellipsis;
@@ -1223,6 +1285,7 @@ export default {
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
   }
+
   .top-down {
     text-align: center;
     color: #d6d2d2;

+ 180 - 0
src/pages/parkingFee/components/base/parkingFeePaperCoupon.vue

@@ -0,0 +1,180 @@
+<template>
+  <scroll-view scroll-y="true" class="scroll-Y">
+    <div>
+      <wx-points-commit ref="wxPointsCommit"></wx-points-commit>
+
+      <div class="worp">
+        <div style="font-size: 32px">纸质优惠劵减免说明</div>
+        <div style="font-size: 28px; color: #808080; padding-top: 12px">{{
+            parkPaperCouponRemark
+          }}</div>
+      </div>
+      <template v-if="paperCouponList.length">
+        <div
+          class="worp_index1"
+          v-for="(item, index) in paperCouponList"
+          :key="item.discountCode"
+        >
+          <div class="worp_index1_index">
+            <div class="content">劵码 {{ item.discountCode }}</div>
+            <div @click="deleteCoupon(index)"
+            ><img
+              :src="require('../../static/images/delete.png')"
+              style="width: 30px; height: 30px; margin-right: 20px"
+            /></div>
+          </div>
+          <div
+            style="
+                padding-bottom: 25px;
+                margin-left: 20px;
+                margin-top: 20px;
+                font-size: 28px;
+              "
+          >优惠劵金额 :<span style="color: #ed1c24">{{
+              item.discountValueMoney | currency
+            }}</span></div
+          >
+        </div>
+      </template>
+
+      <div
+        :class="{
+            worp_button: true,
+            blue_flewx_index3: custTypeId === 1,
+            green_flewx_index3: custTypeId === 2,
+          }"
+        @click="scanCode"
+      >
+        <img
+          :src="require('../../static/images/sweep.png')"
+          style="width: 35px; height: 35px; margin-right: 20px"
+        />
+        <div>扫码用劵</div>
+      </div>
+      <div class="flewx">
+        <div class="flewx-content"
+        >应付<span style="color: red; font-size: 32px; padding-left: 20px">{{
+            actualFee | currency
+          }}</span>
+          元
+          <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px"
+          >已优惠{{ discountFee | currency }}元</span
+          ></div
+        >
+        <div
+          :class="{
+              flewx_index3: true,
+              blue_flewx_index3: custTypeId === 1,
+              green_flewx_index3: custTypeId === 2,
+              'btn-disabled': !parkInfo.servicefee,
+            }"
+          @click="confirm"
+        >确定</div
+        >
+      </div>
+      <!-- 新的toast -->
+      <fui-toast ref="toast"></fui-toast>
+    </div>
+  </scroll-view>
+</template>
+
+<script>
+import parkingFeePaperCouponJs from '../../mixins/parkingFeePaperCoupon'
+export default {
+  mixins:[parkingFeePaperCouponJs]
+}
+</script>
+
+<style lang="less" scoped>
+//@import '../../styles/common.less';
+.scroll-Y {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background: #f1f1f1;
+}
+.worp {
+  padding-left: 30px;
+  margin-top: 30px;
+  overflow: hidden;
+}
+.worp_index1 {
+  width: 92%;
+  background-color: #fff;
+  margin-top: 30px;
+  border-radius: 10px;
+  margin-left: 4%;
+  font-size: 30px;
+}
+.worp_index1_index {
+  width: 650px;
+  height: 60px;
+  margin-left: 20px;
+  border-bottom: 1px solid #f2f2f2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-top: 10px;
+  .content {
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+}
+.worp_button {
+  width: 690px;
+  height: 80px;
+  border-radius: 50px;
+  text-align: center;
+  font-size: 30px;
+  line-height: 80px;
+  color: #fff;
+  margin-top: 40px;
+  background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+  margin-left: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.flewx {
+  width: 100%;
+  height: 100px;
+  background-color: #fff;
+  position: fixed;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  // padding-bottom: constant(safe-area-inset-bottom);
+  // padding-bottom: env(safe-area-inset-bottom);
+  padding-bottom: 20px;
+  .flewx-content {
+    position: absolute;
+    left: 16px;
+  }
+  .flewx_index3 {
+    width: 150px;
+    height: 70px;
+    border-radius: 50px;
+    text-align: center;
+    font-size: 28px;
+    line-height: 70px;
+    color: #fff;
+    background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+    box-shadow: 2px 3px 5px #888888;
+    position: absolute;
+    right: 16px;
+  }
+}
+.blue_flewx_index3 {
+  .color_flewx_index3('blue');
+}
+.green_flewx_index3 {
+  .color_flewx_index3('green');
+}
+.color_flewx_index3(@value) {
+  @color: 'color-@{value}';
+  background-image: none !important;
+  background-color: @@color !important;
+}
+</style>

+ 202 - 0
src/pages/parkingFee/components/officeBlue/parkingFeePaperCoupon.vue

@@ -0,0 +1,202 @@
+<template>
+  <scroll-view scroll-y="true" class="scroll-Y">
+    <div class="worp">
+      <div class="title">纸质优惠劵减免说明</div>
+      <div style="font-size: 28px; color: #808080; padding-top: 12px">
+        {{ parkPaperCouponRemark }}
+      </div>
+    </div>
+    <template v-if="paperCouponList.length">
+      <div
+        class="worp_index1"
+        v-for="(item, index) in paperCouponList"
+        :key="item.discountCode"
+      >
+        <div class="worp_index1_index">
+          <div class="content">劵码 {{ item.discountCode }}</div>
+          <div @click="deleteCoupon(index)"><van-icon name="delete-o" /></div>
+        </div>
+        <div
+          style="
+            padding-bottom: 25px;
+            margin-left: 20px;
+            margin-top: 20px;
+            font-size: 28px;
+          "
+        >
+          优惠劵金额 :<span style="color: #064c8a">{{
+            item.discountValueMoney | currency
+          }}</span>
+        </div>
+      </div>
+    </template>
+    <div
+      :class="{
+        worp_button: true,
+        blue_flewx_index3: custTypeId === 1,
+        green_flewx_index3: custTypeId === 2,
+      }"
+      @click="scanCode"
+    >
+      <img
+        :src="require('../../static/images/sweep.png')"
+        style="width: 35px; height: 35px; margin-right: 20px"
+      />
+      <div>扫码用劵</div>
+    </div>
+    <div class="flewx">
+      <!-- <div class="flewx-content">应付<span style="color: red;font-size: 32px;padding-left: 20px;">{{actualFee |
+      currency}}</span> 元 <span style="color: #8d8d8d;padding-left: 30px;font-size: 28px;">已优惠{{discountFee |
+          currency}}元</span>
+      </div> -->
+      <div class="flewx-content">
+        已选<span class="num">{{ paperCouponList.length }}张</span>
+        <span class="discountFee"
+          >优惠券可优惠{{ discountFee | currency }}</span
+        >
+      </div>
+      <div
+        :class="{
+          flewx_index3: true,
+          blue_flewx_index3: custTypeId === 1,
+          green_flewx_index3: custTypeId === 2,
+          'btn-disabled': !parkInfo.servicefee,
+        }"
+        @click="confirm"
+      >
+        确定
+      </div>
+    </div>
+    <!-- 新的toast -->
+    <fui-toast ref="toast"></fui-toast>
+  </scroll-view>
+</template>
+
+<script>
+import parkingFeePaperCouponJs from '../../mixins/parkingFeePaperCoupon'
+export default {
+  mixins:[parkingFeePaperCouponJs]
+}
+</script>
+
+<style lang="less" scoped>
+.scroll-Y {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background: #f4f7ff;
+}
+
+.worp {
+  padding-left: 30px;
+  margin-top: 30px;
+  overflow: hidden;
+
+  .title {
+    font-size: 30px;
+    font-weight: 600;
+    color: #333333;
+    line-height: 42px;
+  }
+}
+
+.worp_index1 {
+  width: 92%;
+  margin-top: 30px;
+  margin-left: 4%;
+  font-size: 30px;
+  background: #fafbff;
+  border-radius: 4px;
+  border: 1px solid #d8dae0;
+}
+
+.worp_index1_index {
+  width: 650px;
+  height: 60px;
+  margin-left: 20px;
+  border-bottom: 1px solid #f2f2f2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-top: 10px;
+
+  .content {
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+}
+
+.worp_button {
+  width: 690px;
+  height: 80px;
+  border-radius: 50px;
+  text-align: center;
+  font-size: 30px;
+  line-height: 80px;
+  color: #fff;
+  margin-top: 45px;
+  // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+  background: #064c8a;
+  margin-left: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.flewx {
+  width: 100%;
+  height: 100px;
+  background-color: #fff;
+  position: fixed;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  // padding-bottom: constant(safe-area-inset-bottom);
+  // padding-bottom: env(safe-area-inset-bottom);
+  padding-bottom: 20px;
+
+  .flewx-content {
+    font-weight: 400;
+    position: absolute;
+    left: 16px;
+    font-size: 28px;
+    .num {
+      color: #064c8a;
+    }
+    .discountFee {
+      color: #ee4d3f;
+    }
+  }
+
+  .flewx_index3 {
+    width: 150px;
+    height: 70px;
+    border-radius: 45px;
+    text-align: center;
+    font-size: 28px;
+    line-height: 70px;
+    color: #fff;
+    // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+    background: #064c8a;
+    box-shadow: 2px 3px 5px #888888;
+    position: absolute;
+    right: 16px;
+  }
+}
+
+.blue_flewx_index3 {
+  .color_flewx_index3('blue');
+}
+
+.green_flewx_index3 {
+  .color_flewx_index3('green');
+}
+
+.color_flewx_index3(@value) {
+  @color: 'color-@{value}';
+  background-image: none !important;
+  background-color: @@color !important;
+}
+</style>

+ 6 - 4
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -627,14 +627,15 @@ export default {
 
     // 积分确认 flag: 1(普通积分) 2(新会员积分)
     confirm(flag) {
-      if (type === 1) {
+      if (flag === 1) {
         this.$store.commit('SET_BONUS_COPY', this.bonus);
         this.durationCopy = this.duration;
         // this.$refs.popup.close();
         this.popup = false;
       }
       if ( flag === 2 ) {
-        this.bonusCopy = this.bonus;
+        // this.bonusCopy = this.bonus;
+        this.$store.commit('SET_BONUS_COPY', this.bonus);
         this.durationCopy2 = this.durationNew;
         this.newpopup = false;
       }
@@ -1306,7 +1307,7 @@ export default {
         this.bonusfee = this.duration * this.hourMoney;
       }
       this.durationCopy = this.duration;
-      this.bonusCopy = this.bonus;
+      // this.bonusCopy = this.bonus;
       this.$store.commit('SET_BONUS_COPY', this.bonus);
     },
     // 北京新会员自动选取积分减免
@@ -1332,7 +1333,8 @@ export default {
       this.bonus -= this.integralNew * this.durationNew;
       this.durationCopy2 = this.durationNew;
       this.newBonusfee = this.durationNew * this.hourMoney;
-      this.bonusCopy = this.bonus;
+      // this.bonusCopy = this.bonus;
+      this.$store.commit('SET_BONUS_COPY', this.bonus);
     },
     // 节流函数
     throttle(fc, waitTime = 1500, imme = true) {

+ 412 - 0
src/pages/parkingFee/mixins/parkingFeePaperCoupon.js

@@ -0,0 +1,412 @@
+import uni from '@/utils/uniHooks';
+import { Toast } from 'vant';
+// const app = getApp()
+const app = {};
+import { mapState } from 'vuex';
+import fuiToast from '@/components/fui-toast/fui-toast.vue';
+import { initWxJsSdkConfig } from '@/utils/login';
+import { getPlatform } from '@/utils/index';
+
+export default {
+  components: {
+    fuiToast,
+  },
+  created() {
+    this.servicefee = uni.getStorageSync('servicefee'); // 应缴金额
+    this.parkDiscountTotal = uni.getStorageSync('parkingTotal'); // 总停车优惠
+    if (uni.getStorageSync('parkFee')) {
+      this.parkFee = JSON.parse(uni.getStorageSync('parkFee')); // discount接口返回的数据
+      this.parkMallCode = this.parkFee.parkInfoEntity.parkMallCode;
+      // 上限金额
+      this.maxonetimediscountFee =
+        this.parkFee.parkInfoEntity.maxonetimediscount *
+        this.parkFee.parkInfoEntity.needmoney;
+      this.maxonedaydiscountFee =
+        (this.parkFee.parkInfoEntity.maxOneDayHour -
+          this.parkFee.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) *
+          this.parkFee.parkInfoEntity.needmoney || 0;
+      if (this.maxonedaydiscountFee < 0) {
+        this.maxonedaydiscountFee = 0;
+      }
+
+      // 纸质优惠券说明
+      if (
+        this.parkFee.parkPaperCouponsEntities &&
+        this.parkFee.parkPaperCouponsEntities[0]
+      ) {
+        this.parkPaperCouponRemark =
+          this.parkFee.parkPaperCouponsEntities[0].remark;
+      }
+    }
+
+    // 本页面数据缓存
+    this.paperCouponInfo = uni.getStorageSync('paperCouponInfo');
+    if (this.paperCouponInfo && this.paperCouponInfo.paperCouponList) {
+      // this.paperCouponList = this.paperCouponInfo.paperCouponList;
+
+      this.paperDiscountFee = this.paperCouponInfo.paperDiscountFee;
+      this.paperDiscountTime = this.paperCouponInfo.paperDiscountTime;
+      this.parkDiscountTotal.feeCopy -= this.paperCouponInfo.paperDiscountFee;
+    }
+    // this.paperCouponList = [
+    //   {
+    //     discountCode: '123456',
+    //     discountValueMoney: 10
+    //   }
+    // ];
+  },
+  data() {
+    return {
+      parkFee: {}, // 停车规则相关信息
+      parkPaperCouponRemark: '', // 纸质优惠券说明
+      servicefee: 0, // 应缴金额
+      paperDiscountFee: 0, // 纸质优惠券减免金额
+      paperDiscountTime: 0, // 纸质优惠券减免时长
+      parkDiscountTotal: {}, // 总停车优惠
+      paperCouponList: [], // 纸质券list
+      paperCouponInfo: {}, // 页面缓存
+      maxonetimediscountFee: 0, // 每次优惠上限金额
+      maxonedaydiscountFee: 0, // 每天优惠上限金额
+      parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
+      parkInfo: {},
+    };
+  },
+  async mounted() {
+    setTimeout(() => {
+      uni.setNavigationBarTitle({
+        title: '纸质优惠券减免',
+      });
+    }, 300);
+    const platform = getPlatform();
+    if (platform === 'micromessenger') {
+      // this.getTicket();
+      await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
+      // await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
+      // if (window.wxJsSdkConfigInitPromise) {
+      //   await window.wxJsSdkConfigInitPromise;
+      // }
+    }
+    setTimeout(() => {
+      uni.setNavigationBarTitle({
+        title: '优惠券',
+      });
+    }, 300);
+  },
+  computed: {
+    ...mapState({
+      custTypeId: (state) => state.custTypeId,
+      mallid: (state) => state.mallId,
+      openId: (state) => state.openid,
+      member: (state) => state.member,
+      groupId: (state) => state.groupId,
+    }),
+    // 实际支付金额
+    actualFee() {
+      const fee = this.servicefee - this.discountFee;
+      return fee > 0 ? fee : 0;
+    },
+    // 已优惠金额
+    discountFee() {
+      // 超出上限按上限计算
+      if (this.parkMallCode === 1) {
+        if (this.parkDiscountTotal.feeCopy > this.maxonetimediscountFee) {
+          this.parkDiscountTotal.feeCopy = this.maxonetimediscountFee;
+        }
+      }
+      if (this.parkMallCode === 4) {
+        if (
+          this.parkDiscountTotal.feeCopy - this.parkDiscountTotal.bonusfee >
+          this.maxonedaydiscountFee
+        ) {
+          this.parkDiscountTotal.feeCopy =
+            this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee;
+        }
+      }
+      return this.parkDiscountTotal.feeCopy + this.paperDiscountFee;
+    },
+  },
+  methods: {
+    showToast(text) {
+      let options = {};
+      options.text = text;
+      this.$refs.toast.show(options);
+    },
+    // 扫码
+    scanCode() {
+      const runScanFn = (res) => {
+        if (res.scanType == 'QR_CODE' && res.scanType) {
+          console.log(res.result);
+          const url = res.result;
+          if (url.indexOf('auth/') === -1) {
+            this.getPaperCouponInfo(res.result);
+          } else {
+            const start = url.indexOf('auth/');
+            const end = url.indexOf('?');
+            const params = url.slice(start, end).split('/');
+            if (params && params.length) {
+              const couponCode = params[1];
+              this.getPaperCouponInfo(couponCode);
+            }
+          }
+        }
+      };
+      // 微信小程序
+      const platform = getPlatform();
+      if (platform === 'miniprogram') {
+        window.toWXSendMsg({
+          type: 'scanQRCode',
+        });
+        window.subscribe('scanQRCodeOver', (options) => {
+          console.log('微信扫码结束之后的返回参数', options);
+          runScanFn(options);
+        });
+      } else {
+        this.$wx.scanQRCode({
+          desc: 'scanQRCode desc',
+          needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+          // scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
+          success: (res) => {
+            console.log(237, res);
+            runScanFn(res);
+            // this.formMsg.deviceCode = res.resultStr;
+          },
+          error: (res) => {
+            console.log(242, res);
+          },
+        });
+      }
+
+      /* uni.scanCode({
+       onlyFromCamera: false,
+       scanType: ['qrCode'],
+       success: (res) => {
+       console.log('扫码', res);
+       if (res.scanType == 'QR_CODE' && res.scanType) {
+       console.log(res.result);
+       const url = res.result;
+       if (url.indexOf('auth/') === -1) {
+       this.getPaperCouponInfo(res.result);
+       } else {
+       const start = url.indexOf('auth/');
+       const end = url.indexOf('?');
+       const params = url.slice(start, end).split('/');
+       if (params && params.length) {
+       const couponCode = params[1];
+       this.getPaperCouponInfo(couponCode);
+       }
+       }
+       }
+       },
+       }); */
+    },
+
+    // 根据卡券ID查询卡券信息
+    getPaperCouponInfo(couponCode) {
+      uni.showLoading({
+        title: '加载中',
+      });
+      const params = {
+        groupId: this.groupId,
+        mallid: this.mallid,
+        couponcode: couponCode,
+        orderno: uni.getStorageSync('orderno'),
+      };
+      this.$md(params);
+      uni.request({
+        url: this.$baseURL + 'api/1.0/park/queryTicketCount',
+        data: params,
+        method: 'POST',
+        header: JSON.parse(uni.getStorageSync('handleUser')),
+        success: (res) => {
+          uni.hideLoading();
+          console.log(res);
+          if (res.data.code !== 0) {
+            // return uni.showToast({
+            // 	title: res.data.msg,
+            // 	duration: 2000,
+            // 	icon: 'none'
+            // })
+            return Toast({
+              message: res.data.msg,
+            });
+            // return this.showToast(res.data.msg);
+          }
+          if (res.data.data.type === 2) {
+            if (res.data.data.discountType == '0') {
+              return Toast({
+                message: '该纸质优惠券未激活',
+              });
+              // return uni.showToast({
+              //   title: '该纸质优惠券未激活',
+              //   duration: 2000,
+              //   icon: 'none',
+              // });
+            }
+            if (res.data.data.discountRuleId == '1') {
+              return Toast({
+                message: '该纸质优惠券已领取',
+              });
+              // return uni.showToast({
+              //   title: '该纸质优惠券已领取',
+              //   duration: 2000,
+              //   icon: 'none',
+              // });
+            }
+            if (res.data.data.discountRuleId == '2') {
+              return Toast({
+                message: '该纸质优惠券已使用',
+              });
+              // return uni.showToast({
+              //   title: '该纸质优惠券已使用',
+              //   duration: 2000,
+              //   icon: 'none',
+              // });
+            }
+            if (res.data.data.discountRuleId == '3') {
+              return Toast({
+                message: '该纸质优惠券已核销',
+              });
+              // return uni.showToast({
+              //   title: '该纸质优惠券已核销',
+              //   duration: 2000,
+              //   icon: 'none',
+              // });
+            }
+          }
+          if (this.paperCouponList.length) {
+            const index = this.paperCouponList.findIndex(
+              (e) => e.discountCode === couponCode
+            );
+            if (index === -1) {
+              this.paperCouponList.push(res.data.data);
+              this.paperDiscountFee += Number(res.data.data.discountValueMoney);
+              this.paperDiscountTime =
+                this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
+            }
+          } else {
+            this.paperCouponList.push(res.data.data);
+            this.paperDiscountFee += Number(res.data.data.discountValueMoney);
+            this.paperDiscountTime =
+              this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
+          }
+
+          // this.crossMessage();
+        },
+        fail: (err) => {
+          uni.hideLoading();
+          console.log(err);
+        },
+      });
+    },
+
+    // 删除
+    deleteCoupon(i) {
+      this.paperDiscountFee -= Number(
+        this.paperCouponList[i].discountValueMoney
+      );
+      this.paperDiscountTime =
+        this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
+      this.paperCouponList.splice(i, 1);
+    },
+
+    /**
+     * 2021-12-24 微信小群确定取消纸质券限制
+     */
+    // 超限提示
+    // crossMessage() {
+    // 	let totalFee = this.parkDiscountTotal.feeCopy;
+    // 	if (this.paperCouponInfo && this.paperCouponInfo.paperDiscountFee !== 0) {
+    // 		totalFee += this.paperDiscountFee - this.paperCouponInfo.paperDiscountFee;
+    // 	} else {
+    // 		totalFee += this.paperDiscountFee;
+    // 	}
+    // 	// 是否受每次最大优惠限制(浦东)
+    // 	if (this.parkFee.parkPaperCouponsEntities[0].isMaxLimit !== 1) {
+    // 		if (totalFee > this.maxonetimediscountFee) {
+    // 			return uni.showToast({
+    // 				title: `超出抵扣上限,每次最高可抵扣${this.parkFee.parkInfoEntity.maxonetimediscount}小时`,
+    // 				icon: 'none'
+    // 			});
+    // 		}
+    // 	}
+    // 	// 浦东总优惠不包含纸质券
+    // 	if (this.parkMallCode !== 1) {
+    // 		if (totalFee > this.maxonedaydiscountFee) {
+    // 			return uni.showToast({
+    // 				title: `超出抵扣上限,每天最高可抵扣${this.parkFee.parkInfoEntity.maxonedaydiscount}小时`,
+    // 				icon: 'none'
+    // 			});
+    // 		}
+    // 	}
+    // },
+
+    // 确认
+    confirm() {
+      let paperCouponcode = '';
+      this.paperCouponList.forEach((e, i) => {
+        if (i === this.paperCouponList.length - 1) {
+          paperCouponcode += e.discountCode;
+        } else {
+          paperCouponcode += e.discountCode + '#';
+        }
+      });
+      uni.setStorageSync('paperCouponInfo', {
+        paperDiscountFee: this.paperDiscountFee,
+        paperDiscountTime: this.paperDiscountTime,
+        paperCouponcode: paperCouponcode,
+        paperCouponList: this.paperCouponList,
+      });
+      this.$router.back();
+    },
+    /*
+     // h5获取配置---公众号支付
+     getTicket() {
+     let self = this;
+     var datas = {
+     groupId: this.$store.state.groupId,
+     mallid: this.$store.state.mallid,
+     url: window.location.href.split('#')[0],
+     };
+     self.$md(datas);
+     uni.request({
+     url: self.$baseURL + 'api/1.0/login/getTicket',
+     method: 'POST',
+     data: datas,
+     header: JSON.parse(uni.getStorageSync('handleUser')),
+     success: (res) => {
+     if (res.data.code == 0) {
+     self.$wx.config({
+     debug: false, // 开启调试模式
+     appId: res.data.data.appId, // 必填,公众号的唯一标识
+     timestamp: res.data.data.timestamp, // 必填,生成签名的时间戳
+     nonceStr: res.data.data.nonceStr, // 必填,生成签名的随机串
+     signature: res.data.data.signature, // 必填,签名
+     jsApiList: ['chooseWXPay', 'scanQRCode', 'checkJsApi'], // 必填,需要使用的JS接口列表
+     });
+     self.$wx.ready(function () {
+     self.$wx.checkJsApi({
+     jsApiList: ['chooseWXPay'],
+     success: (res) => {
+     console.log('checked api:', res);
+     },
+     fail: (err) => {
+     console.log('check api fail:', err);
+     },
+     });
+     });
+     self.$wx.error(function (res) {
+     console.log('err', res);
+     });
+     } else {
+     uni.showToast({
+     title: res.data.msg,
+     duration: 2000,
+     icon: 'none',
+     });
+     }
+     },
+     });
+     },
+     */
+  },
+};

+ 9 - 598
src/pages/parkingFee/parkingFeePaperCoupon.vue

@@ -1,607 +1,18 @@
 <template>
-  <scroll-view scroll-y="true" class="scroll-Y">
-    <div class="worp">
-      <div class="title">纸质优惠劵减免说明</div>
-      <div style="font-size: 28px; color: #808080; padding-top: 12px">
-        {{ parkPaperCouponRemark }}
-      </div>
-    </div>
-    <template v-if="paperCouponList.length">
-      <div
-        class="worp_index1"
-        v-for="(item, index) in paperCouponList"
-        :key="item.discountCode"
-      >
-        <div class="worp_index1_index">
-          <div class="content">劵码 {{ item.discountCode }}</div>
-          <div @click="deleteCoupon(index)"><van-icon name="delete-o" /></div>
-        </div>
-        <div
-          style="
-            padding-bottom: 25px;
-            margin-left: 20px;
-            margin-top: 20px;
-            font-size: 28px;
-          "
-        >
-          优惠劵金额 :<span style="color: #064c8a">{{
-            item.discountValueMoney | currency
-          }}</span>
-        </div>
-      </div>
-    </template>
-    <div
-      :class="{
-        worp_button: true,
-        blue_flewx_index3: custTypeId === 1,
-        green_flewx_index3: custTypeId === 2,
-      }"
-      @click="scanCode"
-    >
-      <img
-        :src="require('./static/images/sweep.png')"
-        style="width: 35px; height: 35px; margin-right: 20px"
-      />
-      <div>扫码用劵</div>
-    </div>
-    <div class="flewx">
-      <!-- <div class="flewx-content">应付<span style="color: red;font-size: 32px;padding-left: 20px;">{{actualFee |
-      currency}}</span> 元 <span style="color: #8d8d8d;padding-left: 30px;font-size: 28px;">已优惠{{discountFee |
-          currency}}元</span>
-      </div> -->
-      <div class="flewx-content">
-        已选<span class="num">{{ paperCouponList.length }}张</span>
-        <span class="discountFee"
-          >优惠券可优惠{{ discountFee | currency }}</span
-        >
-      </div>
-      <div
-        :class="{
-          flewx_index3: true,
-          blue_flewx_index3: custTypeId === 1,
-          green_flewx_index3: custTypeId === 2,
-          'btn-disabled': !parkInfo.servicefee,
-        }"
-        @click="confirm"
-      >
-        确定
-      </div>
-    </div>
-    <!-- 新的toast -->
-    <fui-toast ref="toast"></fui-toast>
-  </scroll-view>
+  <div>
+    <component :is="componentName"></component>
+  </div>
 </template>
 
 <script>
-import uni from '@/utils/uniHooks';
-import { Toast } from 'vant';
-// const app = getApp()
-const app = {};
-import { mapState } from 'vuex';
-import fuiToast from '@/components/fui-toast/fui-toast.vue';
-import { initWxJsSdkConfig } from '@/utils/login';
-import { getPlatform } from '@/utils/index';
-
+import officeBlueCom from './components/officeBlue/parkingFeePaperCoupon.vue';
+import baseParkingFeeCom from './components/base/parkingFeePaperCoupon.vue';
+import baseMixins from './mixins/base'
 export default {
+  mixins:[baseMixins],
   components: {
-    fuiToast,
-  },
-  created() {
-    this.servicefee = uni.getStorageSync('servicefee'); // 应缴金额
-    this.parkDiscountTotal = uni.getStorageSync('parkingTotal'); // 总停车优惠
-    if (uni.getStorageSync('parkFee')) {
-      this.parkFee = JSON.parse(uni.getStorageSync('parkFee')); // discount接口返回的数据
-      this.parkMallCode = this.parkFee.parkInfoEntity.parkMallCode;
-      // 上限金额
-      this.maxonetimediscountFee =
-        this.parkFee.parkInfoEntity.maxonetimediscount *
-        this.parkFee.parkInfoEntity.needmoney;
-      this.maxonedaydiscountFee =
-        (this.parkFee.parkInfoEntity.maxOneDayHour -
-          this.parkFee.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) *
-          this.parkFee.parkInfoEntity.needmoney || 0;
-      if (this.maxonedaydiscountFee < 0) {
-        this.maxonedaydiscountFee = 0;
-      }
-
-      // 纸质优惠券说明
-      if (
-        this.parkFee.parkPaperCouponsEntities &&
-        this.parkFee.parkPaperCouponsEntities[0]
-      ) {
-        this.parkPaperCouponRemark =
-          this.parkFee.parkPaperCouponsEntities[0].remark;
-      }
-    }
-
-    // 本页面数据缓存
-    this.paperCouponInfo = uni.getStorageSync('paperCouponInfo');
-    if (this.paperCouponInfo && this.paperCouponInfo.paperCouponList) {
-      // this.paperCouponList = this.paperCouponInfo.paperCouponList;
-
-      this.paperDiscountFee = this.paperCouponInfo.paperDiscountFee;
-      this.paperDiscountTime = this.paperCouponInfo.paperDiscountTime;
-      this.parkDiscountTotal.feeCopy -= this.paperCouponInfo.paperDiscountFee;
-    }
-    // this.paperCouponList = [
-    //   {
-    //     discountCode: '123456',
-    //     discountValueMoney: 10
-    //   }
-    // ];
-  },
-  data() {
-    return {
-      parkFee: {}, // 停车规则相关信息
-      parkPaperCouponRemark: '', // 纸质优惠券说明
-      servicefee: 0, // 应缴金额
-      paperDiscountFee: 0, // 纸质优惠券减免金额
-      paperDiscountTime: 0, // 纸质优惠券减免时长
-      parkDiscountTotal: {}, // 总停车优惠
-      paperCouponList: [], // 纸质券list
-      paperCouponInfo: {}, // 页面缓存
-      maxonetimediscountFee: 0, // 每次优惠上限金额
-      maxonedaydiscountFee: 0, // 每天优惠上限金额
-      parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
-      parkInfo: {},
-    };
-  },
-  async mounted() {
-    const platform = getPlatform();
-    if (platform === 'micromessenger') {
-      // this.getTicket();
-      await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
-      // await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
-      // if (window.wxJsSdkConfigInitPromise) {
-      //   await window.wxJsSdkConfigInitPromise;
-      // }
-    }
-    setTimeout(() => {
-      uni.setNavigationBarTitle({
-        title: '优惠券',
-      });
-    }, 300);
-  },
-  computed: {
-    ...mapState({
-      custTypeId: (state) => state.custTypeId,
-      mallid: (state) => state.mallId,
-      openId: (state) => state.openid,
-      member: (state) => state.member,
-      groupId: (state) => state.groupId,
-    }),
-    // 实际支付金额
-    actualFee() {
-      const fee = this.servicefee - this.discountFee;
-      return fee > 0 ? fee : 0;
-    },
-    // 已优惠金额
-    discountFee() {
-      // 超出上限按上限计算
-      if (this.parkMallCode === 1) {
-        if (this.parkDiscountTotal.feeCopy > this.maxonetimediscountFee) {
-          this.parkDiscountTotal.feeCopy = this.maxonetimediscountFee;
-        }
-      }
-      if (this.parkMallCode === 4) {
-        if (
-          this.parkDiscountTotal.feeCopy - this.parkDiscountTotal.bonusfee >
-          this.maxonedaydiscountFee
-        ) {
-          this.parkDiscountTotal.feeCopy =
-            this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee;
-        }
-      }
-      return this.parkDiscountTotal.feeCopy + this.paperDiscountFee;
-    },
-  },
-  methods: {
-    showToast(text) {
-      let options = {};
-      options.text = text;
-      this.$refs.toast.show(options);
-    },
-    // 扫码
-    scanCode() {
-      const runScanFn = (res) => {
-        if (res.scanType == 'QR_CODE' && res.scanType) {
-          console.log(res.result);
-          const url = res.result;
-          if (url.indexOf('auth/') === -1) {
-            this.getPaperCouponInfo(res.result);
-          } else {
-            const start = url.indexOf('auth/');
-            const end = url.indexOf('?');
-            const params = url.slice(start, end).split('/');
-            if (params && params.length) {
-              const couponCode = params[1];
-              this.getPaperCouponInfo(couponCode);
-            }
-          }
-        }
-      };
-      // 微信小程序
-      const platform = getPlatform();
-      if (platform === 'miniprogram') {
-        window.toWXSendMsg({
-          type: 'scanQRCode',
-        });
-        window.subscribe('scanQRCodeOver', (options) => {
-          console.log('微信扫码结束之后的返回参数', options);
-          runScanFn(options);
-        });
-      } else {
-        this.$wx.scanQRCode({
-          desc: 'scanQRCode desc',
-          needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-          // scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
-          success: (res) => {
-            console.log(237, res);
-            runScanFn(res);
-            // this.formMsg.deviceCode = res.resultStr;
-          },
-          error: (res) => {
-            console.log(242, res);
-          },
-        });
-      }
-
-      /* uni.scanCode({
-        onlyFromCamera: false,
-        scanType: ['qrCode'],
-        success: (res) => {
-          console.log('扫码', res);
-          if (res.scanType == 'QR_CODE' && res.scanType) {
-            console.log(res.result);
-            const url = res.result;
-            if (url.indexOf('auth/') === -1) {
-              this.getPaperCouponInfo(res.result);
-            } else {
-              const start = url.indexOf('auth/');
-              const end = url.indexOf('?');
-              const params = url.slice(start, end).split('/');
-              if (params && params.length) {
-                const couponCode = params[1];
-                this.getPaperCouponInfo(couponCode);
-              }
-            }
-          }
-        },
-      }); */
-    },
-
-    // 根据卡券ID查询卡券信息
-    getPaperCouponInfo(couponCode) {
-      uni.showLoading({
-        title: '加载中',
-      });
-      const params = {
-        groupId: this.groupId,
-        mallid: this.mallid,
-        couponcode: couponCode,
-        orderno: uni.getStorageSync('orderno'),
-      };
-      this.$md(params);
-      uni.request({
-        url: this.$baseURL + 'api/1.0/park/queryTicketCount',
-        data: params,
-        method: 'POST',
-        header: JSON.parse(uni.getStorageSync('handleUser')),
-        success: (res) => {
-          uni.hideLoading();
-          console.log(res);
-          if (res.data.code !== 0) {
-            // return uni.showToast({
-            // 	title: res.data.msg,
-            // 	duration: 2000,
-            // 	icon: 'none'
-            // })
-            return Toast({
-              message: res.data.msg,
-            });
-            // return this.showToast(res.data.msg);
-          }
-          if (res.data.data.type === 2) {
-            if (res.data.data.discountType == '0') {
-              return Toast({
-                message: '该纸质优惠券未激活',
-              });
-              // return uni.showToast({
-              //   title: '该纸质优惠券未激活',
-              //   duration: 2000,
-              //   icon: 'none',
-              // });
-            }
-            if (res.data.data.discountRuleId == '1') {
-              return Toast({
-                message: '该纸质优惠券已领取',
-              });
-              // return uni.showToast({
-              //   title: '该纸质优惠券已领取',
-              //   duration: 2000,
-              //   icon: 'none',
-              // });
-            }
-            if (res.data.data.discountRuleId == '2') {
-              return Toast({
-                message: '该纸质优惠券已使用',
-              });
-              // return uni.showToast({
-              //   title: '该纸质优惠券已使用',
-              //   duration: 2000,
-              //   icon: 'none',
-              // });
-            }
-            if (res.data.data.discountRuleId == '3') {
-              return Toast({
-                message: '该纸质优惠券已核销',
-              });
-              // return uni.showToast({
-              //   title: '该纸质优惠券已核销',
-              //   duration: 2000,
-              //   icon: 'none',
-              // });
-            }
-          }
-          if (this.paperCouponList.length) {
-            const index = this.paperCouponList.findIndex(
-              (e) => e.discountCode === couponCode
-            );
-            if (index === -1) {
-              this.paperCouponList.push(res.data.data);
-              this.paperDiscountFee += Number(res.data.data.discountValueMoney);
-              this.paperDiscountTime =
-                this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
-            }
-          } else {
-            this.paperCouponList.push(res.data.data);
-            this.paperDiscountFee += Number(res.data.data.discountValueMoney);
-            this.paperDiscountTime =
-              this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
-          }
-
-          // this.crossMessage();
-        },
-        fail: (err) => {
-          uni.hideLoading();
-          console.log(err);
-        },
-      });
-    },
-
-    // 删除
-    deleteCoupon(i) {
-      this.paperDiscountFee -= Number(
-        this.paperCouponList[i].discountValueMoney
-      );
-      this.paperDiscountTime =
-        this.paperDiscountFee / this.parkFee.parkInfoEntity.needmoney;
-      this.paperCouponList.splice(i, 1);
-    },
-
-    /**
-     * 2021-12-24 微信小群确定取消纸质券限制
-     */
-    // 超限提示
-    // crossMessage() {
-    // 	let totalFee = this.parkDiscountTotal.feeCopy;
-    // 	if (this.paperCouponInfo && this.paperCouponInfo.paperDiscountFee !== 0) {
-    // 		totalFee += this.paperDiscountFee - this.paperCouponInfo.paperDiscountFee;
-    // 	} else {
-    // 		totalFee += this.paperDiscountFee;
-    // 	}
-    // 	// 是否受每次最大优惠限制(浦东)
-    // 	if (this.parkFee.parkPaperCouponsEntities[0].isMaxLimit !== 1) {
-    // 		if (totalFee > this.maxonetimediscountFee) {
-    // 			return uni.showToast({
-    // 				title: `超出抵扣上限,每次最高可抵扣${this.parkFee.parkInfoEntity.maxonetimediscount}小时`,
-    // 				icon: 'none'
-    // 			});
-    // 		}
-    // 	}
-    // 	// 浦东总优惠不包含纸质券
-    // 	if (this.parkMallCode !== 1) {
-    // 		if (totalFee > this.maxonedaydiscountFee) {
-    // 			return uni.showToast({
-    // 				title: `超出抵扣上限,每天最高可抵扣${this.parkFee.parkInfoEntity.maxonedaydiscount}小时`,
-    // 				icon: 'none'
-    // 			});
-    // 		}
-    // 	}
-    // },
-
-    // 确认
-    confirm() {
-      let paperCouponcode = '';
-      this.paperCouponList.forEach((e, i) => {
-        if (i === this.paperCouponList.length - 1) {
-          paperCouponcode += e.discountCode;
-        } else {
-          paperCouponcode += e.discountCode + '#';
-        }
-      });
-      uni.setStorageSync('paperCouponInfo', {
-        paperDiscountFee: this.paperDiscountFee,
-        paperDiscountTime: this.paperDiscountTime,
-        paperCouponcode: paperCouponcode,
-        paperCouponList: this.paperCouponList,
-      });
-      this.$router.back();
-    },
-    /*
-    // h5获取配置---公众号支付
-    getTicket() {
-      let self = this;
-      var datas = {
-        groupId: this.$store.state.groupId,
-        mallid: this.$store.state.mallid,
-        url: window.location.href.split('#')[0],
-      };
-      self.$md(datas);
-      uni.request({
-        url: self.$baseURL + 'api/1.0/login/getTicket',
-        method: 'POST',
-        data: datas,
-        header: JSON.parse(uni.getStorageSync('handleUser')),
-        success: (res) => {
-          if (res.data.code == 0) {
-            self.$wx.config({
-              debug: false, // 开启调试模式
-              appId: res.data.data.appId, // 必填,公众号的唯一标识
-              timestamp: res.data.data.timestamp, // 必填,生成签名的时间戳
-              nonceStr: res.data.data.nonceStr, // 必填,生成签名的随机串
-              signature: res.data.data.signature, // 必填,签名
-              jsApiList: ['chooseWXPay', 'scanQRCode', 'checkJsApi'], // 必填,需要使用的JS接口列表
-            });
-            self.$wx.ready(function () {
-              self.$wx.checkJsApi({
-                jsApiList: ['chooseWXPay'],
-                success: (res) => {
-                  console.log('checked api:', res);
-                },
-                fail: (err) => {
-                  console.log('check api fail:', err);
-                },
-              });
-            });
-            self.$wx.error(function (res) {
-              console.log('err', res);
-            });
-          } else {
-            uni.showToast({
-              title: res.data.msg,
-              duration: 2000,
-              icon: 'none',
-            });
-          }
-        },
-      });
-    },
-    */
+    officeBlueCom,
+    baseParkingFeeCom,
   },
 };
 </script>
-
-<style lang="less" scoped>
-@import '../../styles/common.less';
-
-.scroll-Y {
-  width: 100%;
-  display: flex;
-  flex-direction: column;
-  height: 100vh;
-  background: #f4f7ff;
-}
-
-.worp {
-  padding-left: 30px;
-  margin-top: 30px;
-  overflow: hidden;
-
-  .title {
-    font-size: 30px;
-    font-weight: 600;
-    color: #333333;
-    line-height: 42px;
-  }
-}
-
-.worp_index1 {
-  width: 92%;
-  margin-top: 30px;
-  margin-left: 4%;
-  font-size: 30px;
-  background: #fafbff;
-  border-radius: 4px;
-  border: 1px solid #d8dae0;
-}
-
-.worp_index1_index {
-  width: 650px;
-  height: 60px;
-  margin-left: 20px;
-  border-bottom: 1px solid #f2f2f2;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding-top: 10px;
-
-  .content {
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    overflow: hidden;
-  }
-}
-
-.worp_button {
-  width: 690px;
-  height: 80px;
-  border-radius: 50px;
-  text-align: center;
-  font-size: 30px;
-  line-height: 80px;
-  color: #fff;
-  margin-top: 45px;
-  // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
-  background: #064c8a;
-  margin-left: 30px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.flewx {
-  width: 100%;
-  height: 100px;
-  background-color: #fff;
-  position: fixed;
-  bottom: 0;
-  display: flex;
-  align-items: center;
-  // padding-bottom: constant(safe-area-inset-bottom);
-  // padding-bottom: env(safe-area-inset-bottom);
-  padding-bottom: 20px;
-
-  .flewx-content {
-    font-weight: 400;
-    position: absolute;
-    left: 16px;
-    font-size: 28px;
-    .num {
-      color: #064c8a;
-    }
-    .discountFee {
-      color: #ee4d3f;
-    }
-  }
-
-  .flewx_index3 {
-    width: 150px;
-    height: 70px;
-    border-radius: 45px;
-    text-align: center;
-    font-size: 28px;
-    line-height: 70px;
-    color: #fff;
-    // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
-    background: #064c8a;
-    box-shadow: 2px 3px 5px #888888;
-    position: absolute;
-    right: 16px;
-  }
-}
-
-.blue_flewx_index3 {
-  .color_flewx_index3('blue');
-}
-
-.green_flewx_index3 {
-  .color_flewx_index3('green');
-}
-
-.color_flewx_index3(@value) {
-  @color: 'color-@{value}';
-  background-image: none !important;
-  background-color: @@color !important;
-}
-</style>