Jelajahi Sumber

Merge pull request #285 from John-Hong/John/release-2.18.0/KIP-10659

feat(KIP-10665): C端 | HKC车辆管理功能调整
Tron 1 tahun lalu
induk
melakukan
67e9ab960e

+ 6 - 0
src/api/parking/index.js

@@ -302,4 +302,10 @@ export function delVehicle(vehicleId, params) {
 export function parkingRecord(vehicleId, params) {
   return window.requestms.get('parking-record/', params, { loading: false });
   // return window.requestms.delete(`https://dev-kip-service-internal.kerryonvip.com/temporary-parking-service/vehicles/${vehicleId}`, params, { loading: false });
+}
+
+// vehicles/check-eligibility 查询车辆优惠资格并提示跳转页面
+export function checkEligibility(vehicleId) {
+  return window.requestms.get(`vehicles/check-eligibility/${vehicleId}`, {} , { loading: false });
+  // return window.requestms.delete(`https://dev-kip-service-internal.kerryonvip.com/temporary-parking-service/vehicles/${vehicleId}`, params, { loading: false });
 }

+ 154 - 0
src/components/checkCarPopup/checkCarPopup.vue

@@ -0,0 +1,154 @@
+<template>
+  <van-popup v-model="show">
+    <div class="popup-box">
+      <img class="unlicensed" :src="`${require(`../../pages/parkingFee/static/images/vnfo-2.19.svg`)}`"
+           alt="unlicensed"/>
+      <div class="title" v-if="redirectTo === 'BIND_NEW'">是否将车牌号 <span class="vehicleNo">{{ vehicleNo }}</span> 添加绑定?</div>
+      <div class="title" v-if="redirectTo === 'CHANGE_BINDING'">绑定车牌号数量已达上限,是否换绑?</div>
+      <div class="title" v-if="redirectTo === 'PAY_WITHOUT_DISCOUNT'">您当月可享停车优惠车牌号数量已达上限,当前车辆缴费无停车优惠。</div>
+      <div class="title" v-if="redirectTo === 'delete'">删除已绑定车辆后,本车缴费将不再享受停车优惠</div>
+      <div class="title" v-if="redirectTo === 'edit'">编辑已绑定车辆后,本车缴费将不再享受停车优惠</div>
+      <div class="title" v-if="redirectTo === 'no-fee'">您当月可享停车优惠车牌号数量已达上限,当前车辆缴费无停车优惠。</div>
+      <div class="desc mt41">1. 绑定车牌号才能享受停车缴费优惠。</div>
+      <div class="desc mt16">2. 每位会员每月可享停车优惠的车牌号有数量限制。</div>
+      <div class="btn default mt54" @click="topBtn">{{topBtnName}}</div>
+      <div class="btn other mt30" @click="bottomBtn">{{bottomBtnName}}</div>
+    </div>
+  </van-popup>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      show: false,
+      topBtnName: '',
+      topBtnFn: false,
+      bottomBtnName: '',
+      bottomBtnFn: false,
+      vehicleNo: '',
+      redirectTo: 'BIND_NEW'
+    }
+  },
+  mounted() {
+    // this.open({})
+  },
+  methods: {
+
+    open({
+           topBtnName = '绑定缴费(可享停车优惠)',
+           topBtnFn = false,
+           bottomBtnName = '不绑定缴费(无停车优惠)',
+           bottomBtnFn = false,
+           vehicleNo = '浙A7YW31', // TODO 后期移除
+           redirectTo = 'BIND_NEW'
+         }) {
+      this.show = true
+      this.topBtnName = topBtnName
+      this.topBtnFn = topBtnFn
+      this.bottomBtnName = bottomBtnName
+      this.bottomBtnFn = bottomBtnFn
+      this.vehicleNo = vehicleNo
+      this.redirectTo = redirectTo
+    },
+    topBtn() {
+      this.show = false
+      this.topBtnFn && this.topBtnFn()
+    },
+    bottomBtn() {
+      this.show = false
+      this.bottomBtnFn && this.bottomBtnFn()
+    }
+  }
+}
+
+</script>
+
+<style lang="less" scoped>
+.van-popup {
+  border-radius: 20px;
+}
+
+.popup-box {
+  width: 560px;
+  margin: 0 auto;
+  position: relative;
+  height: 690px;
+  padding: 135px 0px 0px;
+  box-sizing: border-box;
+  border-radius: 20px;
+
+
+  .unlicensed {
+    position: absolute;
+    left: 29px;
+    top: 9px;
+    display: block;
+    width: 295.02px;
+    //height: 171.17px;
+  }
+
+  .title {
+    font-size: 34px;
+    font-weight: 500;
+    line-height: 45px;
+    letter-spacing: 0;
+    text-align: left;
+    padding: 0 75px;
+    color: #333333;
+
+    .vehicleNo {
+      font-size: 40px;
+    }
+  }
+
+  .desc {
+    padding-left: 60px;
+    padding-right: 60px;
+    font-family: PingFang SC;
+    font-size: 24px;
+    font-weight: 400;
+    line-height: 33px;
+    letter-spacing: 0px;
+    text-align: left;
+    color: #999999;
+  }
+
+  .btn {
+    margin: 0 auto;
+    border-radius: 40px;
+    width: 400px;
+    height: 74px;
+    line-height: 74px;
+    font-size: 26px;
+    font-weight: 400;
+    font-family: PingFang HK;
+    text-align: center;
+    &.default {
+      background: #644A79;
+      box-shadow: 6px 6px 23px 0px #644A79;
+      color: #FFFFFF;
+    }
+    &.other {
+      background: #D6DBE3;
+      box-shadow: 6px 6px 26px 0px #B6BFCD;
+      color: #888888;
+
+    }
+  }
+
+  .mt41 {
+    margin-top: 41px;
+  }
+
+  .mt16 {
+    margin-top: 16px;
+  }
+
+  .mt54 {
+    margin-top: 54px;
+  }
+  .mt30 {
+    margin-top: 30px;
+  }
+}
+</style>

+ 2 - 0
src/components/install.js

@@ -12,6 +12,7 @@ import wxPointsCommit from './wx-points-commit/wx-points-commit';
 import myProtocolModal from './my-protocol-modal/my-protocol-modal';
 import uniText from './uni-text/index';
 import uniButton from './uni-button/index';
+import checkCarPopup from './checkCarPopup/checkCarPopup';
 // KIP组件
 import kIcon from '@/kui/components/k-icon/k-icon'
 import kButton from '@/kui/components/k-button/k-button'
@@ -42,6 +43,7 @@ function plugins(Vue) {
   Vue.component('uni-text', uniText)
   Vue.component('my-protocol-modal', myProtocolModal)
   Vue.component('uni-button', uniButton)
+  Vue.component('checkCarPopup', checkCarPopup)
   // KIP组件
   Vue.component('k-icon', kIcon)
   Vue.component('k-button', kButton)

+ 117 - 6
src/pages/parkingFee/mixins/parkingFee.js

@@ -17,7 +17,7 @@ import uni from '@/utils/uniHooks';
 // import greenCom from '../components/green/home.vue';
 // import officeBlueCom from '../components/officeBlue/home.vue';
 // import purpleCom from '../components/purple/home.vue';
-import { parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey, getVehicles, parkingRecord } from '@/api/parking';
+import { parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey, getVehicles, parkingRecord, checkEligibility, addVehicles } from '@/api/parking';
 import { reject } from 'lodash';
 
 export default {
@@ -62,8 +62,11 @@ export default {
       qrCodeHistory: '',
       currentTabType: this.carType,
       isAlipayClient: isAlipayClient,
-      licensePlateList: []
+      licensePlateList: [],
       // custTypeId: 0,
+      // 2.19新增内容
+      eligibility: {}, // 
+      eventId: '',
     };
   },
   computed: {
@@ -361,21 +364,129 @@ export default {
         }
       }
     },
+    async checkEligibility() {
+      try {
+        /*
+        * 如果是杭州,并且是登陆情况
+        * {
+            "eligible": false, // 是否优惠车
+            "isBound": false, // 是否绑定
+            "maxBindingCount": 3, // 绑定数量上限
+            "maxChangeCount": 5, // 换绑数量上限
+            "userBindingCount": 3, // 用户当前绑定车牌数量 
+            "userRemainingChangeCount": 5, // 用户剩余换绑次数
+            "redirectTo": "CHANGE_BINDING" // 跳转页面
+          }
+          BIND_NEW //去绑定
+          CHANGE_BINDING //去换绑
+          PAY_WITHOUT_DISCOUNT //去无优惠支付或放弃支付
+          CHECK_OUT //直接去查费,带优惠
+        * 
+        * */
+        // 如果是杭州,并且是登陆情况
+        this.eligibility = await checkEligibility(this.vehicleNumber)
+        /*this.eligibility = {
+          "eligible": false, // 是否优惠车
+          "isBound": false, // 是否绑定
+          "maxBindingCount": 3, // 绑定数量上限
+          "maxChangeCount": 5, // 换绑数量上限
+          "userBindingCount": 3, // 用户当前绑定车牌数量 
+          "userRemainingChangeCount": 5, // 用户剩余换绑次数
+          "redirectTo": "CHANGE_BINDING" // 跳转页面
+        }*/
+        // 是否优惠车 是否绑定, 或者 直接去查费,带优惠
+        if(this.eligibility.eligible && this.eligibility.isBound || this.eligibility.redirectTo === 'CHECK_OUT') {
+          this.toParkingFeeDetail()
+          return
+        }
+        // 是否绑定
+        if(this.eligibility.redirectTo === 'BIND_NEW' && this.eligibility.maxBindingCount > this.eligibility.userBindingCount) {
+          this.$refs['checkCarPopup'].open({
+            redirectTo: this.eligibility.redirectTo,
+            vehicleNo: this.vehicleNumber,
+            topBtnFn: async () => {
+              const res = await  addVehicles(this.kipUserId,
+                {
+                  userId: this.kipUserId,
+                  licensePlateType: LICENSE_PLATE_TYPE_ARR[this.carType].value,
+                  vehicleNo: this.vehicleNumber,
+                })
+              if(res?.id) {
+                this.toParkingFeeDetail()
+              }
+            },
+            bottomBtnFn: () => {
+              this.toParkingFeeDetail()
+            }
+          })
+          return
+        }
+        // 是否换绑
+        if(this.eligibility.redirectTo === 'CHANGE_BINDING' && this.eligibility.userRemainingChangeCount) {
+          this.$refs['checkCarPopup'].open({
+            redirectTo: this.eligibility.redirectTo,
+            vehicleNo: this.vehicleNumber,
+            topBtnName: '去换绑(可享停车优惠)',
+            topBtnFn: async () => {
+              this.doRouter2()
+            },
+            bottomBtnName: '放弃换绑(无停车优惠)',
+            bottomBtnFn: () => {
+              this.toParkingFeeDetail()
+            }
+          })
+          return
+        }
+        // 去无优惠支付或放弃支付,其余场景都是无优惠
+        /*if(this.eligibility.redirectTo === 'PAY_WITHOUT_DISCOUNT') {
+         
+        }*/
+        this.$refs['checkCarPopup'].open({
+          // redirectTo: this.eligibility.redirectTo,
+          redirectTo: 'PAY_WITHOUT_DISCOUNT',
+          vehicleNo: this.vehicleNumber,
+          topBtnName: '继续缴费(无停车优惠)',
+          topBtnFn: () => {
+            this.toParkingFeeDetail()
+          },
+          bottomBtnName: '放弃缴费 ',
+        })
+      }  catch (err) {
+
+      }
+    },
     // 校验车牌号
-    preHandleSearch() {
+    async preHandleSearch() {
       if (this.disabledBtn) return
+      // 不是杭州的车牌 或者 用户拒绝登陆的场景
+      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied')  {
+        this.toParkingFeeDetail()
+        return
+      }
+      // 查询车辆优惠资格并提示跳转页面
+      await this.checkEligibility()
+    },
+    // 去缴费详情
+    toParkingFeeDetail() {
       uni.setStorageSync('carList', [
         ...new Set([this.vehicleNumber, ...this.carList]),
       ].slice(0, 6));
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         name: 'parkingFeeDetail',
       });
+      this.$store.commit('SET_REGRESH_PAGE_KEY')
       this.$nextTick(() => {
+        const query = {
+          ...this.$route.query,
+          vehicleNo: this.vehicleNumber,
+        }
+        // fromPage && format && unlicensed
+        query.fromPage = ''
+        query.format = ''
+        query.unlicensed = ''
         this.$router.push({
           path: 'parkingFeeDetail',
-          query: {
-            vehicleNo: this.vehicleNumber,
-          },
+          query,
         });
       })
     },

+ 36 - 32
src/pages/parkingFee/mixins/vehicleAddOrEdit.js

@@ -105,6 +105,7 @@ export default {
           this.numArr[6],
         ];
       }
+      this.vehicleNumber = this.numArr.toString().replace(/,/g, '')
     },
     // 唤起键盘
     clickShowKeyboard(index) {
@@ -167,15 +168,36 @@ export default {
         licensePlateType: this.licensePlateTypeArr[this.carType].value,
         vehicleNo: this.vehicleNumber,
       };
-      if(this.carInfo?.id) {
-        // 修改
-        const res = await editVehicles(this.carInfo?.id, {
-          id: this.carInfo?.id,
-          ...params
-        })
-        if(res.id) {
+      try {
+        if (this.carInfo?.id) {
+          // 修改
+          const res = await editVehicles(this.carInfo?.id, {
+            id: this.carInfo?.id,
+            ...params
+          })
+          if (res.id) {
+            Toast({
+              message: '修改车牌成功',
+              position: 'top',
+              onClose: () => {
+                setTimeout(() => {
+                  this.$router.go(-1)
+                }, 300)
+              }
+            });
+          } else {
+            const message = res.langMessage || '修改车牌失败';
+            Toast({
+              message: message,
+            });
+          }
+          return
+        }
+        // 添加
+        const res = await addVehicles(this.kipUserId, params)
+        if (res?.id) {
           Toast({
-            message: '修改车牌成功',
+            message: '绑定车牌成功',
             position: 'top',
             onClose: () => {
               // this.$router.replace({
@@ -187,34 +209,16 @@ export default {
             }
           });
         } else {
-          const message = res.langMessage || '修改车牌失败';
+          const message = res.langMessage || '绑定车牌失败';
           Toast({
             message: message,
+            position: 'top',
           });
         }
-        return
-      } 
-      // 添加
-      const res= await addVehicles( this.kipUserId, params )
-      if(res?.id) {
-        Toast({
-          message: '绑定车牌成功',
-          position: 'top',
-          onClose: () => {
-            // this.$router.replace({
-            //   path: `vehicleManagement`,
-            // });
-            setTimeout(() => {
-              this.$router.go(-1)
-            }, 300)
-          }
-        });
-      } else {
-        const message = res.langMessage || '绑定车牌失败';
-        Toast({
-          message: message,
-          position: 'top',
-        });
+      } catch (err) {
+        if(err.code === 'FOUND_DUPLICATE') {
+          Toast('当前车牌已经存在,请勿重复绑定');
+        }
       }
     },
     handleAddLicensePlateByKipMember() {

+ 53 - 2
src/pages/parkingFee/mixins/vehicleManagement.js

@@ -15,7 +15,7 @@ import MemberCacheTool from '@/utils/member-cache-tool.js';
 import { REG_SOURCE } from '@/constants.js';
 import uni from '@/utils/uniHooks.js';
 // import { vehicles as vehiclesList } from './list';
-import { wxToLoginCallback } from '@/utils/index';
+import { wxToLoginCallback, isHZ } from '@/utils/index';
 import { Toast } from 'vant';
 import { getVehicles, delVehicle } from '@/api/parking/index'
 
@@ -38,6 +38,9 @@ export default {
     }),
     isNoLogin() {
       return JSON.stringify(this.member) === '{}'
+    },
+    isHZ() {
+      return isHZ(this.mallid)
     }
   },
   data() {
@@ -124,6 +127,22 @@ export default {
       this.$router.push({ path: 'vehicleAddOrEdit' });
     },
     // 跳转支付页面
+    toPayBefore(item) {
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || item.eligible){
+        this.toPay(item.vehicleNo)
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'no-fee',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '继续缴费(无停车优惠)',
+        topBtnFn: async () => {
+          this.toPay(item.vehicleNo)
+        },
+        bottomBtnName: '放弃缴费 '
+      })
+    },
     toPay(carno) {
       if(this.isNoLogin) return
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
@@ -241,9 +260,24 @@ export default {
     },
     // 删除
     toDelete(item) {
+      console.log(263, item)
       this.activeId = item.id;
       this.activeCarno = item.vehicleNo;
-      this.show = true
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || !item.eligible) {
+        this.show = true
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'delete',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '确认删除',
+        topBtnFn: async () => {
+          this.delVehicleInTMP()
+        },
+        bottomBtnName: '取消'
+      })
+      
 
       // Dialog.confirm({
       //   title: '删除已绑定车牌',
@@ -260,6 +294,23 @@ export default {
       //   });
       // this.deleteDialogSwitch = true;
     },
+    // 编辑
+    toEditBefore(item) {
+      // TODO 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || !item.eligible){
+        this.toEdit(item)
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'edit',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '继续修改',
+        topBtnFn: async () => {
+          this.toEdit(item)
+        },
+        bottomBtnName: '取消'
+      })
+    },
     doDelete() {
       this.delVehicleInTMP();
       return

+ 1 - 0
src/pages/parkingFee/parkingFee.vue

@@ -154,6 +154,7 @@
     </scroll-view>
     <wx-points-auth ref="wxPointsAuth"></wx-points-auth>
     <plate-number ref="plateKeyboard" :noDisBtn="[32, 33, 34,35, 36, 37]" :carType="carType" :active="active" :ind="ind" :numArr="numArr" @carnoArr="updateCarno"></plate-number>
+    <checkCarPopup ref="checkCarPopup"></checkCarPopup>
   </div>
 </template>
 

File diff ditekan karena terlalu besar
+ 2 - 0
src/pages/parkingFee/static/images/discountCar.svg


File diff ditekan karena terlalu besar
+ 2 - 0
src/pages/parkingFee/static/images/discountCarOffice.svg


+ 61 - 0
src/pages/parkingFee/static/images/vnfo-2.19.svg

@@ -0,0 +1,61 @@
+<svg width="296" height="172" viewBox="0 0 296 172" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g opacity="0.6">
+<circle opacity="0.2" cx="234.03" cy="84.0149" r="6.00003" fill="url(#paint0_linear_13132_249)"/>
+<circle cx="170.825" cy="35.691" r="9.15832" fill="url(#paint1_linear_13132_249)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M281.308 21.2175H280.807C278.37 14.2236 269.551 9.04077 259.03 9.04077C247.767 9.04077 238.417 14.9893 236.834 22.7414C230.473 24.3905 225.982 28.4102 225.982 33.1145C225.982 39.2912 233.727 44.2974 243.283 44.2974C247.599 44.3792 251.849 43.2356 255.541 40.9992C256.7 41.1265 257.865 41.1904 259.03 41.1906C263.266 41.2238 267.457 40.3292 271.31 38.5697C274.18 40.7546 277.702 41.9087 281.308 41.8458C288.883 41.8458 295.016 37.2225 295.016 31.539C295.016 25.8556 288.883 21.2175 281.308 21.2175Z" fill="url(#paint2_linear_13132_249)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M76.4752 15.2909C76.2617 15.2909 76.0555 15.2909 75.842 15.2909C72.7868 6.508 61.707 0 48.4996 0C34.3498 0 22.6442 7.46506 20.6271 17.205C12.6393 19.2737 7 24.324 7 30.2284C7 37.9805 16.7252 44.2677 28.7252 44.2677C34.74 44.2677 40.1879 42.6848 44.1265 40.1302C45.5785 40.2937 47.0385 40.3748 48.4996 40.3732C53.8194 40.4166 59.0841 39.2933 63.9229 37.0824C67.524 39.8298 71.9464 41.2823 76.4752 41.2051C85.9868 41.2051 93.6949 35.3965 93.6949 28.2406C93.6949 21.0848 85.9868 15.2909 76.4752 15.2909Z" fill="url(#paint3_linear_13132_249)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M246.39 53.7794H246.132C244.866 50.1573 240.294 47.4702 234.839 47.4702C229.001 47.4702 224.164 50.5475 223.332 54.5672C220.034 55.4285 217.7 57.512 217.7 59.9488C217.7 63.1513 221.72 65.75 226.674 65.75C228.915 65.7949 231.121 65.1998 233.035 64.0347C233.634 64.1027 234.236 64.1371 234.839 64.1378C237.036 64.1545 239.209 63.6896 241.207 62.7758C242.685 63.9048 244.5 64.5038 246.36 64.4764C250.292 64.4764 253.472 62.0838 253.472 59.1243C253.472 56.1647 250.292 53.7794 246.39 53.7794Z" fill="url(#paint4_linear_13132_249)"/>
+<ellipse opacity="0.414504" cx="154.365" cy="98.269" rx="60.3168" ry="13.459" fill="#D8DDE8"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M201.724 37.0603C201.901 37.0603 207.157 37.0603 207.157 42.7585H207.113C207.113 47.9266 201.658 48.4566 201.658 48.4566C201.731 48.5339 201.804 48.6111 201.877 48.6882C204.525 51.4898 207.091 54.2044 207.091 59.7499V79.4874C207.091 84.8396 207.01 85.1856 204.382 85.1856V87.9905C204.382 91.9366 201.319 93.6814 197.638 93.6814H194.929C191.167 93.6814 188.185 91.9219 188.185 87.9905V85.1856H123.4V87.9905C123.4 91.9366 120.337 93.6814 116.656 93.6814H113.947C110.185 93.6814 107.203 91.9219 107.203 87.9905V85.1856C104.671 85.1856 104.494 84.7439 104.494 79.4874V59.7499C104.494 54.0591 107.218 50.9082 109.927 48.4566C109.927 48.4566 104.494 48.0149 104.494 42.7585C104.494 37.0603 109.581 37.0603 109.927 37.0603H115.346L126.146 22.9621C126.601 22.4095 127.025 21.8864 127.426 21.3921C131.35 16.5513 133.041 14.4663 139.64 14.4663H172.077C178.989 14.4663 180.297 16.1546 184.831 22.007C185.069 22.3138 185.315 22.632 185.572 22.9621L196.328 37.0603H201.724ZM132.757 20.8713L121.273 38.9966V39.0113C119.403 42.4714 121.368 44.9892 127.066 44.9892H184.645C190.527 44.9892 192.588 42.5524 190.439 38.9156L178.946 20.8713C177.576 19.04 175.439 17.9405 173.153 17.8897H138.551C136.274 17.9762 134.152 19.0683 132.757 20.8713Z" fill="url(#paint5_linear_13132_249)"/>
+<ellipse cx="120.044" cy="64.6414" rx="6.10309" ry="10.9105" transform="rotate(-64.38 120.044 64.6414)" fill="#9BA4B2"/>
+<ellipse cx="192.354" cy="64.632" rx="10.9105" ry="6.10309" transform="rotate(-25.62 192.354 64.632)" fill="#9BA4B2"/>
+<path d="M181.707 82.793V82.4986C181.703 79.3666 179.163 76.8298 176.031 76.8298H135.591C132.459 76.8298 129.919 79.3666 129.915 82.4986V82.793H181.707Z" fill="#909AA9"/>
+<ellipse cx="120.041" cy="63.0938" rx="6.10309" ry="10.9105" transform="rotate(-64.38 120.041 63.0938)" fill="#FBFCFF"/>
+<ellipse cx="192.353" cy="63.0766" rx="10.9105" ry="6.10309" transform="rotate(-25.62 192.353 63.0766)" fill="#FBFCFF"/>
+<path d="M181.707 81.2398V80.96C181.707 77.8252 179.165 75.2839 176.031 75.2839H135.591C132.456 75.2839 129.915 77.8252 129.915 80.96V81.2472L181.707 81.2398Z" fill="#FBFCFF"/>
+<path d="M127.067 44.9891C121.369 44.9891 119.403 42.4713 121.273 39.0112L132.758 20.886C134.152 19.0829 136.274 17.9909 138.552 17.9044H160.638L162.257 14.4663H139.641C132.368 14.4663 131.057 16.9988 126.147 22.9621L115.347 37.0603H109.928C109.582 37.0603 104.495 37.0603 104.495 42.7585C104.495 48.0149 109.928 48.4566 109.928 48.4566C107.219 50.9082 104.495 54.0591 104.495 59.7499V79.4874C104.495 84.7439 104.672 85.1856 107.204 85.1856V87.9905C107.204 91.9219 110.186 93.6814 113.948 93.6814H116.657C120.338 93.6814 123.401 91.9366 123.401 87.9905V85.1856H128.885L147.843 45.0259L127.067 44.9891Z" fill="url(#paint6_linear_13132_249)"/>
+</g>
+<path d="M30.5318 125.731C30.6978 121.609 26.4208 117.265 25.0505 123.157C23.6802 129.05 21.3966 131.236 21.3966 131.236C21.3966 131.236 17.0786 138.635 17.0786 133.476C17.0786 128.317 17.2866 125.381 16.0824 119.359C14.8781 113.337 10.8501 114.841 9.43879 118.668C8.02744 122.496 11.3072 127.538 10.435 131.237C9.56285 134.936 6.97298 136.227 5.95097 130.032C4.92896 123.837 6.8432 111.444 6.8432 111.444C6.8432 111.444 5.42613 109.944 4.2896 110.071C3.15308 110.198 2.2971 111.967 2.2971 111.967C2.2971 111.967 -1.64781 126.247 0.801778 134.677C3.25137 143.106 9.02369 136.437 12.0964 145.688C15.1691 154.938 14.588 170.462 14.588 170.462C16.1332 171.004 17.7693 171.237 19.4041 171.15C20.6504 170.922 21.7718 170.25 22.5599 169.257C22.5599 169.257 19.1971 157.214 19.4041 150.16C19.6112 143.106 21.5216 145.861 24.0543 142.247C25.6531 139.902 26.9365 137.357 27.8713 134.677C27.8713 134.677 30.3657 129.853 30.5318 125.731Z" fill="#E0E4EC"/>
+<path d="M60.3124 95.9369C60.4283 93.0595 57.4428 90.0274 56.4862 94.1405C55.5297 98.2536 53.9357 99.7793 53.9357 99.7793C53.9357 99.7793 50.9215 104.944 50.9215 101.343C50.9215 97.7421 51.0667 95.6929 50.2261 91.4891C49.3855 87.2853 46.5738 88.3349 45.5886 91.007C44.6035 93.679 46.8929 97.198 46.2841 99.78C45.6752 102.362 43.8674 103.264 43.154 98.9391C42.4406 94.6146 43.7768 85.9643 43.7768 85.9643C43.7768 85.9643 42.7876 84.9166 41.9943 85.0053C41.201 85.094 40.6035 86.329 40.6035 86.329C40.6035 86.329 37.8498 96.297 39.5597 102.181C41.2696 108.066 45.2989 103.41 47.4438 109.867C49.5886 116.324 49.183 127.161 49.183 127.161C50.2616 127.539 51.4037 127.702 52.5449 127.641C53.4148 127.482 54.1976 127.013 54.7477 126.32C54.7477 126.32 52.4003 117.914 52.5449 112.99C52.6894 108.066 54.023 109.989 55.7908 107.465C56.9069 105.829 57.8027 104.052 58.4553 102.181C58.4553 102.181 60.1965 98.8144 60.3124 95.9369Z" fill="#E0E4EC"/>
+<defs>
+<linearGradient id="paint0_linear_13132_249" x1="225.312" y1="72.5789" x2="225.312" y2="90.0149" gradientUnits="userSpaceOnUse">
+<stop stop-color="#E0E5EF" stop-opacity="0.01"/>
+<stop offset="1" stop-color="#E0E5EF"/>
+</linearGradient>
+<linearGradient id="paint1_linear_13132_249" x1="161.667" y1="26.5327" x2="161.667" y2="44.8494" gradientUnits="userSpaceOnUse">
+<stop stop-color="#E0E5EF" stop-opacity="0.01"/>
+<stop stop-color="#C5CCD8"/>
+<stop offset="1" stop-color="white" stop-opacity="0.01"/>
+</linearGradient>
+<linearGradient id="paint2_linear_13132_249" x1="187.701" y1="-23.3099" x2="187.701" y2="51.0572" gradientUnits="userSpaceOnUse">
+<stop stop-color="#E0E5EF" stop-opacity="0.01"/>
+<stop offset="0.453044" stop-color="#C5CCD8"/>
+<stop offset="1" stop-color="white" stop-opacity="0.01"/>
+</linearGradient>
+<linearGradient id="paint3_linear_13132_249" x1="7" y1="0" x2="7" y2="44.2677" gradientUnits="userSpaceOnUse">
+<stop stop-color="#E0E5EF" stop-opacity="0.01"/>
+<stop stop-color="#C5CCD8"/>
+<stop offset="1" stop-color="white" stop-opacity="0.01"/>
+</linearGradient>
+<linearGradient id="paint4_linear_13132_249" x1="209.478" y1="47.4702" x2="209.478" y2="74.1572" gradientUnits="userSpaceOnUse">
+<stop stop-color="#E0E5EF" stop-opacity="0.01"/>
+<stop stop-color="#C5CCD8"/>
+<stop offset="1" stop-color="white" stop-opacity="0.01"/>
+</linearGradient>
+<linearGradient id="paint5_linear_13132_249" x1="99.1745" y1="11.1618" x2="98.7108" y2="72.0384" gradientUnits="userSpaceOnUse">
+<stop stop-color="#ACB4C2"/>
+<stop offset="0.05" stop-color="#E1E6EF"/>
+<stop offset="0.54" stop-color="#DEE4EE"/>
+<stop offset="1" stop-color="#ACB5C2"/>
+<stop offset="1" stop-color="#A6AFBC"/>
+</linearGradient>
+<linearGradient id="paint6_linear_13132_249" x1="117.444" y1="-22.0265" x2="73.9391" y2="41.7479" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.3"/>
+<stop offset="0.03" stop-color="white" stop-opacity="0.28"/>
+<stop offset="0.29" stop-color="white" stop-opacity="0.16"/>
+<stop offset="0.55" stop-color="white" stop-opacity="0.07"/>
+<stop offset="0.79" stop-color="white" stop-opacity="0.02"/>
+<stop offset="1" stop-color="white" stop-opacity="0.01"/>
+</linearGradient>
+</defs>
+</svg>

+ 40 - 20
src/pages/parkingFee/vehicleManagement.vue

@@ -19,13 +19,14 @@
             >
               我的车牌
             </div>
+            <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />
             <div class="plate_plate_index plate_plate_index2">
               {{ item.vehicleNo | formatCarno }}
             </div>
             <div class="plate_plate_index plate_plate_index3 bb">
               <img
                 class="car-icon"
-                :src="require(`../../static/images/icon-carType.png`)"
+                :src="require(`@/pages/parkingFee/static/images/icon-carType.png`)"
               />
               <div>车牌类型</div>
               <div class="licensePlateTypeDesc">
@@ -40,16 +41,16 @@
               : ''
           " v-if="custTypeId > 0"></div> -->
             <div class="plate_plate_index plate_plate_index4">
-              <div class="item" @click.stop="toPay(item.vehicleNo)">
-                <img :src="require(`./static/images/white_detail.png`)" alt=""/><span>查询</span>
+              <div class="item" @click.stop="toPayBefore(item)">
+                <img :src="require(`@/pages/parkingFee/static/images/white_detail.png`)" alt=""/><span>查询{{ isHZ ? '缴费' : ''}}</span>
               </div>
-              <div class="item" @click="toEdit(item)">
-                <img :src="require(`./static/images/white_edit.png`)" alt=""/><span
-              >编辑</span
+              <div class="item" @click="toEditBefore(item)">
+                <img :src="require(`@/pages/parkingFee/static/images/white_edit.png`)" alt=""/><span
+              >{{isHZ? '修改': '编辑'}}</span
               >
               </div>
               <div class="item" @click="toDelete(item)">
-                <img :src="require(`./static/images/white_delete.png`)" alt=""/><span
+                <img :src="require(`@/pages/parkingFee/static/images/white_delete.png`)" alt=""/><span
               >删除</span
               >
               </div>
@@ -139,6 +140,7 @@
       <div class="info">是否确认删除已经绑定车牌</div>
       <div class="activeCarno">{{ activeCarnoFilter(activeCarno) }}</div>
     </van-dialog>
+    <checkCarPopup ref="checkCarPopup"></checkCarPopup>
   </div>
 </template>
 
@@ -232,6 +234,7 @@ export default {
       border-radius: 4px;
       padding: 30px;
       color: #ffffff;
+      position: relative;
 
       .plate_tag {
         display: inline-block;
@@ -254,11 +257,16 @@ export default {
     }
 
     .plate_plate_index {
-      // padding-left: 37px;
       padding-top: 10px;
       font-size: 26px;
     }
-
+    .discountCar {
+      position: absolute;
+      right: 30px;
+      top: 30px;
+      width: 120px;
+      height: 44px;
+    }
     .plate_plate_index1,
     .plate_plate_index3 {
       font-size: 28px;
@@ -304,14 +312,17 @@ export default {
 
     .plate_plate_index4 {
       display: flex;
-      justify-content: space-around;
+      justify-content: space-between;
+      padding: 0 50px;
+      
 
       .plate_plate_index4_index2 {
         width: 164px;
       }
 
       .item {
-        width: 33.33%;
+        //width: 100%;
+        //flex: 1;
         font-size: 28px;
         font-weight: 400;
         color: #ffffff;
@@ -319,14 +330,24 @@ export default {
         align-items: center;
         justify-content: center;
         position: relative;
-
-        &::after {
-          content: '';
-          width: 1px;
-          height: 30px;
-          position: absolute;
-          right: 8%;
-          background-color: rgba(255, 255, 255, 0.3);
+        white-space: nowrap;
+        &:nth-child(2) {
+          &::after {
+            content: '';
+            width: 1px;
+            height: 30px;
+            position: absolute;
+            right: -40%;
+            background-color: rgba(255, 255, 255, 0.3);
+          }
+          &::before {
+            content: '';
+            width: 1px;
+            height: 30px;
+            position: absolute;
+            left: -40%;
+            background-color: rgba(255, 255, 255, 0.3);
+          }
         }
 
         &:last-child {
@@ -342,7 +363,6 @@ export default {
         }
 
         span {
-          flex: 0 0 50%;
           text-align: left;
         }
       }

+ 107 - 4
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -12,7 +12,7 @@ const app = {
   },
 };
 import uni from '@/utils/uniHooks';
-import {parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey, getVehicles, parkingRecord} from '@/api/parking';
+import {parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey, getVehicles, parkingRecord, checkEligibility, addVehicles} from '@/api/parking';
 
 export default {
   components: {
@@ -54,8 +54,11 @@ export default {
       tabbarActive: '手动缴费',
       supportUnlicensed: false, // 控制当前site,是否使用无牌车
       qrCodeHistory: '',
-      isAlipayClient: isAlipayClient
+      isAlipayClient: isAlipayClient,
       // custTypeId: 0,
+      // 2.19新增内容
+      eligibility: {}, // 
+      eventId: '',
     };
   },
   computed: {
@@ -82,7 +85,6 @@ export default {
     // console.log('二次加载this.$route.query.fromPage', this.$route.query.fromPage, this.$store.state.pageHistory);
     // console.log('二次加载', this.$route.query.fromPage && !this.$store.state.pageHistory[this.$route.query.fromPage]);
     const fromPage = localStorage.getItem(`${this.$route.query.fromPage}`)
-    // console.log(9191, this.$route.query?.fromPage);
     if (this.$route.query?.fromPage !== 'undefined' && !this.$store.state.pageHistory[this.$route.query.fromPage] && !fromPage) {
       // console.log(93939);
       this.$store.commit('setPageHistory', {
@@ -269,9 +271,110 @@ export default {
         }
       }
     },
+    async checkEligibility() {
+      try {
+        /*
+        * 如果是杭州,并且是登陆情况
+        * {
+            "eligible": false, // 是否优惠车
+            "isBound": false, // 是否绑定
+            "maxBindingCount": 3, // 绑定数量上限
+            "maxChangeCount": 5, // 换绑数量上限
+            "userBindingCount": 3, // 用户当前绑定车牌数量 
+            "userRemainingChangeCount": 5, // 用户剩余换绑次数
+            "redirectTo": "CHANGE_BINDING" // 跳转页面
+          }
+          BIND_NEW //去绑定
+          CHANGE_BINDING //去换绑
+          PAY_WITHOUT_DISCOUNT //去无优惠支付或放弃支付
+          CHECK_OUT //直接去查费,带优惠
+        * 
+        * */
+        // 如果是杭州,并且是登陆情况
+        this.eligibility = await checkEligibility(this.vehicleNumber)
+        /*this.eligibility = {
+          "eligible": false, // 是否优惠车
+          "isBound": false, // 是否绑定
+          "maxBindingCount": 3, // 绑定数量上限
+          "maxChangeCount": 5, // 换绑数量上限
+          "userBindingCount": 3, // 用户当前绑定车牌数量 
+          "userRemainingChangeCount": 5, // 用户剩余换绑次数
+          "redirectTo": "CHANGE_BINDING" // 跳转页面
+        }*/
+        // 是否优惠车 是否绑定, 或者 直接去查费,带优惠
+        if(this.eligibility.eligible && this.eligibility.isBound || this.eligibility.redirectTo === 'CHECK_OUT') {
+          this.toParkingFeeDetail()
+          return
+        }
+        // 是否绑定
+        if(this.eligibility.redirectTo === 'BIND_NEW' && this.eligibility.maxBindingCount > this.eligibility.userBindingCount) {
+          this.$refs['checkCarPopup'].open({
+            redirectTo: this.eligibility.redirectTo,
+            vehicleNo: this.vehicleNumber,
+            topBtnFn: async () => {
+              const res = await  addVehicles(this.kipUserId,
+                {
+                  userId: this.kipUserId,
+                  licensePlateType: LICENSE_PLATE_TYPE_ARR[this.carType].value,
+                  vehicleNo: this.vehicleNumber,
+              })
+              if(res?.id) {
+                this.toParkingFeeDetail()  
+              }
+            },
+            bottomBtnFn: () => {
+              this.toParkingFeeDetail()
+            }
+          })
+          return
+        }
+        // 是否换绑
+        if(this.eligibility.redirectTo === 'CHANGE_BINDING' && this.eligibility.userRemainingChangeCount) {
+          this.$refs['checkCarPopup'].open({
+            redirectTo: this.eligibility.redirectTo,
+            vehicleNo: this.vehicleNumber,
+            topBtnName: '去换绑(可享停车优惠)',
+            topBtnFn: async () => {
+              this.doRouter2()
+            },
+            bottomBtnName: '放弃换绑(无停车优惠)',
+            bottomBtnFn: () => {
+              this.toParkingFeeDetail()
+            }
+          })
+          return
+        }
+        // 去无优惠支付或放弃支付,其余场景都是无优惠
+        /*if(this.eligibility.redirectTo === 'PAY_WITHOUT_DISCOUNT') {
+         
+        }*/
+        this.$refs['checkCarPopup'].open({
+          // redirectTo: this.eligibility.redirectTo,
+          redirectTo: 'PAY_WITHOUT_DISCOUNT',
+          vehicleNo: this.vehicleNumber,
+          topBtnName: '继续缴费(无停车优惠)',
+          topBtnFn: () => {
+            this.toParkingFeeDetail()
+          },
+          bottomBtnName: '放弃缴费 ',
+        })
+      }  catch (err) {
+
+      }
+    },
     // 校验车牌号
-    preHandleSearch() {
+    async preHandleSearch() {
       if (this.disabledBtn) return
+      // 不是杭州的车牌 或者 用户拒绝登陆的场景
+      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied')  {
+        this.toParkingFeeDetail()
+        return
+      }
+      // 查询车辆优惠资格并提示跳转页面
+      await this.checkEligibility()
+    },
+    // 去缴费详情
+    toParkingFeeDetail() {
       uni.setStorageSync('carList', [
         ...new Set([this.vehicleNumber, ...this.carList]),
       ].slice(0, 6));

+ 56 - 50
src/pages/parkingFeeV2/mixins/vehicleAddOrEdit.js

@@ -1,15 +1,15 @@
 import uniPop from '@/components/uni-popup/uni-popup.vue';
 import plateNumber from '@/components/plate-number/plateNumber.vue';
 import uni from '@/utils/uniHooks';
-import { Toast } from 'vant';
+import {Toast} from 'vant';
 
-import { LICENSE_PLATE_TYPE_ARR } from '@/constants.js';
+import {LICENSE_PLATE_TYPE_ARR} from '@/constants.js';
 import {
   kipAddMemberVehicles,
   kipModifyMemberVehicles,
 } from '@/utils/api-kip.js';
-import { mapState } from 'vuex';
-import { addVehicles, editVehicles } from '@/api/parking/index'
+import {mapState} from 'vuex';
+import {addVehicles, editVehicles} from '@/api/parking/index'
 
 export default {
   components: {
@@ -61,7 +61,6 @@ export default {
       this.ind = 0;
       this.active = 0;
       this.carType = index;
-
       if (this.carType == '1') {
         this.numArr = [
           this.numArr[0],
@@ -84,10 +83,11 @@ export default {
           this.numArr[6],
         ];
       }
+      this.vehicleNumber = this.numArr.toString().replace(/,/g, '')
     },
     // 唤起键盘
     clickShowKeyboard(index) {
-      if ( this.carType !== 1 && index === 7) return
+      if (this.carType !== 1 && index === 7) return
       this.ind = index;
       this.active = index;
       // console.log('唤起键盘', this.ind, this.active);
@@ -146,15 +146,39 @@ export default {
         licensePlateType: this.licensePlateTypeArr[this.carType].value,
         vehicleNo: this.vehicleNumber,
       };
-      if(this.carInfo?.id) {
-        // 修改
-        const res = await editVehicles(this.carInfo?.id, {
-          id: this.carInfo?.id,
-          ...params
-        })
-        if(res.id) {
+      try {
+        if (this.carInfo?.id) {
+          // 修改
+          const res = await editVehicles(this.carInfo?.id, {
+            id: this.carInfo?.id,
+            ...params
+          })
+          if (res.id) {
+            Toast({
+              message: '修改车牌成功',
+              position: 'top',
+              onClose: () => {
+                // this.$router.replace({
+                //   path: `vehicleManagement`,
+                // });
+                setTimeout(() => {
+                  this.$router.go(-1)
+                }, 300)
+              }
+            });
+          } else {
+            const message = res.langMessage || '修改车牌失败';
+            Toast({
+              message: message,
+            });
+          }
+          return
+        }
+        // 添加
+        const res = await addVehicles(this.kipUserId, params)
+        if (res?.id) {
           Toast({
-            message: '修改车牌成功',
+            message: '绑定车牌成功',
             position: 'top',
             onClose: () => {
               // this.$router.replace({
@@ -166,34 +190,16 @@ export default {
             }
           });
         } else {
-          const message = res.langMessage || '修改车牌失败';
+          const message = res.langMessage || '绑定车牌失败';
           Toast({
             message: message,
+            position: 'top',
           });
         }
-        return
-      } 
-      // 添加
-      const res= await addVehicles( this.kipUserId, params )
-      if(res?.id) {
-        Toast({
-          message: '绑定车牌成功',
-          position: 'top',
-          onClose: () => {
-            // this.$router.replace({
-            //   path: `vehicleManagement`,
-            // });
-            setTimeout(() => {
-              this.$router.go(-1)
-            }, 300)
-          }
-        });
-      } else {
-        const message = res.langMessage || '绑定车牌失败';
-        Toast({
-          message: message,
-          position: 'top',
-        });
+      } catch (err) {
+        if (err.code === 'FOUND_DUPLICATE') {
+          Toast('当前车牌已经存在,请勿重复绑定');
+        }
       }
     },
     handleAddLicensePlateByKipMember() {
@@ -225,7 +231,7 @@ export default {
                   onClose: () => {
                     this.$router.replace({
                       path: `vehicleManagement`,
-                      query:{
+                      query: {
                         ...this.$route.query,
                       }
                     });
@@ -262,22 +268,22 @@ export default {
                   onClose: () => {
                     this.$router.replace({
                       path: `vehicleManagement`,
-                      query:{
+                      query: {
                         ...this.$route.query,
                       }
                     });
                   }
                 });
-               /* Dialog.alert({
-                  message: '绑定车牌成功',
-                  confirmButtonColor: '#333',
-                }).then(() => {
-                  // on confirm
-                  this.$router.replace({
-                    path: `vehicleManagement`,
-                  });
-                  // this.$router.back();
-                });*/
+                /* Dialog.alert({
+                   message: '绑定车牌成功',
+                   confirmButtonColor: '#333',
+                 }).then(() => {
+                   // on confirm
+                   this.$router.replace({
+                     path: `vehicleManagement`,
+                   });
+                   // this.$router.back();
+                 });*/
                 // setTimeout(() => {
                 //   // this.$router.back();
                 //   this.$router.replace({

+ 52 - 2
src/pages/parkingFeeV2/mixins/vehicleManagement.js

@@ -15,7 +15,7 @@ import MemberCacheTool from '@/utils/member-cache-tool.js';
 import { REG_SOURCE } from '@/constants.js';
 import uni from '@/utils/uniHooks.js';
 // import { vehicles as vehiclesList } from './list';
-import { wxToLoginCallback } from '@/utils/index';
+import {isHZ, wxToLoginCallback} from '@/utils/index';
 import { Toast } from 'vant';
 import { getVehicles, delVehicle } from '@/api/parking/index'
 
@@ -39,6 +39,9 @@ export default {
     isNoLogin() {
       // return JSON.stringify(this.member) === '{}'
       return this.isLogin !== 'haveLoggedIn'
+    },
+    isHZ() {
+      return isHZ(this.mallid)
     }
   },
   data() {
@@ -142,6 +145,39 @@ export default {
       this.$router.push({ path: 'vehicleAddOrEdit',query:{...this.$route.query,} });
     },
     // 跳转支付页面
+    toPayBefore(item) {
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || item.eligible){
+        this.toPay(item.vehicleNo)
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'no-fee',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '继续缴费(无停车优惠)',
+        topBtnFn: async () => {
+          this.toPay(item.vehicleNo)
+        },
+        bottomBtnName: '放弃缴费 '
+      })
+    },
+    // 编辑
+    toEditBefore(item) {
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || !item.eligible){
+        this.toEdit(item)
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'edit',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '继续修改',
+        topBtnFn: async () => {
+          this.toEdit(item)
+        },
+        bottomBtnName: '取消'
+      })
+    },
     toPay(carno) {
       console.log(145, this.isNoLogin, this.isLogin);
       if (this.isNoLogin) return
@@ -282,7 +318,21 @@ export default {
     toDelete(item) {
       this.activeId = item.id;
       this.activeCarno = item.vehicleNo;
-      this.show = true
+      // 不是杭州的车牌 或者 是非优惠的车牌
+      if(!this.isHZ || !item.eligible) {
+        this.show = true
+        return
+      }
+      this.$refs['checkCarPopup'].open({
+        redirectTo: 'delete',
+        vehicleNo: this.vehicleNumber,
+        topBtnName: '确认删除',
+        topBtnFn: async () => {
+          this.delVehicleInTMP()
+        },
+        bottomBtnName: '取消'
+      })
+      
 
       // Dialog.confirm({
       //   title: '删除已绑定车牌',

+ 1 - 0
src/pages/parkingFeeV2/parkingFee.vue

@@ -152,6 +152,7 @@
     </scroll-view>
     <wx-points-auth ref="wxPointsAuth"></wx-points-auth>
     <plate-number ref="plateKeyboard" :noDisBtn="[32, 33, 34,35, 36, 37]" :carType="carType" :active="active" :ind="ind" :numArr="numArr" @carnoArr="updateCarno"></plate-number>
+    <checkCarPopup ref="checkCarPopup"></checkCarPopup>
   </div>
 </template>
 

+ 37 - 17
src/pages/parkingFeeV2/vehicleManagement.vue

@@ -19,6 +19,7 @@
             >
               我的车牌
             </div>
+            <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />
             <div class="plate_plate_index plate_plate_index2">
               {{ item.vehicleNo | formatCarno }}
             </div>
@@ -40,12 +41,12 @@
               : ''
           " v-if="custTypeId > 0"></div> -->
             <div class="plate_plate_index plate_plate_index4">
-              <div class="item" @click.stop="toPay(item.vehicleNo)">
-                <img :src="require(`@/pages/parkingFee/static/images/white_detail.png`)" alt=""/><span>查询</span>
+              <div class="item" @click.stop="toPayBefore(item)">
+                <img :src="require(`@/pages/parkingFee/static/images/white_detail.png`)" alt=""/><span>查询{{ isHZ ? '缴费' : ''}}</span>
               </div>
-              <div class="item" @click="toEdit(item)">
+              <div class="item" @click="toEditBefore(item)">
                 <img :src="require(`@/pages/parkingFee/static/images/white_edit.png`)" alt=""/><span
-              >编辑</span
+              >{{isHZ? '修改': '编辑'}}</span
               >
               </div>
               <div class="item" @click="toDelete(item)">
@@ -139,6 +140,7 @@
       <div class="info">是否确认删除已经绑定车牌</div>
       <div class="activeCarno">{{ activeCarnoFilter(activeCarno) }}</div>
     </van-dialog>
+    <checkCarPopup ref="checkCarPopup"></checkCarPopup>
   </div>
 </template>
 
@@ -232,6 +234,7 @@ export default {
       border-radius: 4px;
       padding: 30px;
       color: #ffffff;
+      position: relative;
 
       .plate_tag {
         display: inline-block;
@@ -254,11 +257,16 @@ export default {
     }
 
     .plate_plate_index {
-      // padding-left: 37px;
       padding-top: 10px;
       font-size: 26px;
     }
-
+    .discountCar {
+      position: absolute;
+      right: 30px;
+      top: 30px;
+      width: 120px;
+      height: 44px;
+    }
     .plate_plate_index1,
     .plate_plate_index3 {
       font-size: 28px;
@@ -304,14 +312,17 @@ export default {
 
     .plate_plate_index4 {
       display: flex;
-      justify-content: space-around;
+      justify-content: space-between;
+      padding: 0 50px;
+      
 
       .plate_plate_index4_index2 {
         width: 164px;
       }
 
       .item {
-        width: 33.33%;
+        //width: 100%;
+        //flex: 1;
         font-size: 28px;
         font-weight: 400;
         color: #ffffff;
@@ -319,14 +330,24 @@ export default {
         align-items: center;
         justify-content: center;
         position: relative;
-
-        &::after {
-          content: '';
-          width: 1px;
-          height: 30px;
-          position: absolute;
-          right: 8%;
-          background-color: rgba(255, 255, 255, 0.3);
+        white-space: nowrap;
+        &:nth-child(2) {
+          &::after {
+            content: '';
+            width: 1px;
+            height: 30px;
+            position: absolute;
+            right: -40%;
+            background-color: rgba(255, 255, 255, 0.3);
+          }
+          &::before {
+            content: '';
+            width: 1px;
+            height: 30px;
+            position: absolute;
+            left: -40%;
+            background-color: rgba(255, 255, 255, 0.3);
+          }
         }
 
         &:last-child {
@@ -342,7 +363,6 @@ export default {
         }
 
         span {
-          flex: 0 0 50%;
           text-align: left;
         }
       }

+ 5 - 0
src/store/index.js

@@ -351,6 +351,11 @@ const store = new Vuex.Store({
         }
         if(isLogin) {
           commit('SET_IS_LOGIN', isLogin);
+          dispatch('memberInit', {
+            openid: openId,
+            unionId,
+            isError: true
+          });
         }
         callback && callback();
         return

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini