John-Hong 2 роки тому
батько
коміт
825edf7492

+ 8 - 0
src/components/plate-number/plateNumber.vue

@@ -402,6 +402,11 @@ export default {
     };
   },
   computed: {
+    init() {
+      console.log(406, this.ind, this.active, this.numArr);
+      console.log(406, this.carnoIndex, this.activeIndex, this.carnoArr);
+      return 99900;
+    },
     // ChineseList() {
     //   if (this.carType === 2) {
     //     return this.chinese.filter(item => item.id >= 32 && item.id <= 99);
@@ -514,6 +519,8 @@ export default {
     },
     openKeyboardCN() {
       // this.$refs["chinese_popup"].open();
+      console.log(521, '打开属性面板', this.init);
+      this.closeKeyboardEN();
       this.chinese_popup = true;
     },
     closeKeyboardCN() {
@@ -521,6 +528,7 @@ export default {
       // this.$refs["chinese_popup"].close();
     },
     openKeyboardEN() {
+      this.openKeyboardCN();
       this.allBoard_popup = true;
       // this.$refs["allBoard_popup"].open();
     },

+ 2 - 2
src/main.js

@@ -6,7 +6,7 @@ import App from './App';
 import sensors from 'sa-sdk-javascript';
 import store from './store/index.js';
 import VueRouter from 'vue-router';
-import { Icon, Checkbox, CheckboxGroup, RadioGroup, Radio, Field, Popup, CountDown } from 'vant';
+import { Icon, Checkbox, CheckboxGroup, RadioGroup, Radio, Field, Popup, CountDown, Switch } from 'vant';
 import router from './routes/index.js';
 import wx from '@/utils/js_sdk/weixin';
 
@@ -34,7 +34,7 @@ Vue.prototype.$sensors = sensors;
 Vue.config.productionTip = false;
 App.mpType = 'app';
 Vue.use(VueRouter);
-Vue.use(Icon).use(Checkbox).use(CheckboxGroup).use(RadioGroup).use(Radio).use(Field).use(Popup).use(CountDown);
+Vue.use(Icon).use(Checkbox).use(CheckboxGroup).use(RadioGroup).use(Radio).use(Field).use(Popup).use(CountDown).use(Switch);
 
 const app = new Vue({
   store,

+ 210 - 88
src/pages/parkingFee/parkingFeeDiscounts.vue

@@ -1,46 +1,92 @@
 <template>
   <scroll-view scroll-y="true" class="scroll-Y">
-    <van-checkbox-group v-model="active" checked-color="#064C8A" @change="checkboxChange">
+    <van-checkbox-group
+      v-model="active"
+      checked-color="#064C8A"
+      @change="checkboxChange"
+    >
       <div class="container" v-if="false">
         <!--todo: 杭州首停不显示暂时根据groupId写死-->
         <div class="item">
           <div class="title">首停优惠</div>
-          <div class="content">首停减免{{parkInfoEntity.parkHour}}小时。可优惠{{firstParkDiscountFee}}元</div>
+          <div class="content">
+            首停减免{{ parkInfoEntity.parkHour }}小时。可优惠{{
+              firstParkDiscountFee
+            }}元
+          </div>
         </div>
-        <van-checkbox value="firstPark" color="#fff" :checked="isCheck('firstPark')" />
+        <van-checkbox
+          value="firstPark"
+          color="#fff"
+          :checked="isCheck('firstPark')"
+        />
       </div>
       <div class="container" v-if="parkInfoEntity.memberLevelReduce">
         <div class="item">
           <div class="title">会员等级减免</div>
-          <div class="content">{{memberDiscount.memberOrderdesc || ''}}减免{{memberDiscount.reduceContent ||
-          0}}小时。可优惠{{memberDiscountFee || 0}}元</div>
+          <div class="content">
+            {{ memberDiscount.memberOrderdesc || '' }}减免{{
+              memberDiscount.reduceContent || 0
+            }}小时。可优惠{{ memberDiscountFee || 0 }}元
+          </div>
+        </div>
+        <van-checkbox
+          value="member"
+          color="#fff"
+          name="a"
+          :disabled="
+            (!isCheck('member') && isDiscountDisabled) ||
+            isMemberDiscountDisabled ||
+            memberDiscount.reduceContent <= 0
+          "
+          :checked="isCheck('member')"
+        />
+        <div class="member-discount-info" v-if="isMemberDiscountDisabled">
+          当日已使用
         </div>
-        <van-checkbox value="member" color="#fff"
-        name="a"
-          :disabled="(!isCheck('member') && isDiscountDisabled) || isMemberDiscountDisabled || memberDiscount.reduceContent <= 0"
-          :checked="isCheck('member')" />
-        <div class="member-discount-info" v-if="isMemberDiscountDisabled">当日已使用</div>
       </div>
       <div class="container" v-if="isShowReduceDiscount">
         <div class="item">
           <div class="title">消费减免</div>
           <!-- <uni-view class="content" v-if="parkInfoEntity.parkMallCode === 1 && parkInfoEntity.expirationDate">{{reduceDiscountMessage}}</uni-view> -->
-          <div class="content" v-if="parkInfoEntity.parkMallCode !== 1">{{todayReduceDiscountMessage}}</div>
-          <uni-number-box v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0" :min="1" :max="maxReduceDiscount"
-            v-model="reduceHours" @input="reducesChange"></uni-number-box>
+          <div class="content" v-if="parkInfoEntity.parkMallCode !== 1">
+            {{ todayReduceDiscountMessage }}
+          </div>
+          <uni-number-box
+            v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0"
+            :min="1"
+            :max="maxReduceDiscount"
+            v-model="reduceHours"
+            @input="reducesChange"
+          ></uni-number-box>
         </div>
-        <van-checkbox value="reduces" color="#fff"
-          :disabled="(!isCheck('reduces') && isDiscountDisabled) || !reducesDiscount.recuceContent"
-          :checked="isCheck('reduces')" />
+        <van-checkbox
+          value="reduces"
+          color="#fff"
+          :disabled="
+            (!isCheck('reduces') && isDiscountDisabled) ||
+            !reducesDiscount.recuceContent
+          "
+          :checked="isCheck('reduces')"
+        />
       </div>
       <div class="flewx">
-        <div class="flewx-content">合计<span style="color: #333;font-weight: 600; font-size: 36px;padding-left: 0px;">{{actualFee |
-        currency}}</span> 元 <span style="color: #999;padding-left: 0px;font-size: 28px;">已优惠{{discountFee |
-            currency}}元</span>
+        <div class="flewx-content">
+          合计<span
+            style="
+              color: #333;
+              font-weight: 600;
+              font-size: 36px;
+              padding-left: 0px;
+            "
+            >{{ actualFee | currency }}</span
+          >
+          元
+          <span style="color: #999; padding-left: 0px; font-size: 28px"
+            >已优惠{{ discountFee | currency }}元</span
+          >
         </div>
-        <div
-          class="flewx_index3"
-          @click="confirm">确定</div>
+        <div class="flewx_index3" @click="confirm">确定</div>
       </div>
     </van-checkbox-group>
   </scroll-view>
@@ -51,13 +97,13 @@ import { mapState } from 'vuex';
 import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
 import uni from '@/utils/uniHooks';
 // const app = getApp()
-const app = {};
 export default {
   components: { uniNumberBox },
   created() {
     // 纸质优惠券
     if (uni.getStorageSync('paperCouponInfo')) {
-      this.paperCouponFee = uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
+      this.paperCouponFee =
+        uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
     }
     // 电子券
     if (uni.getStorageSync('couponInfo')) {
@@ -72,38 +118,61 @@ export default {
     }
 
     this.parkFee = JSON.parse(uni.getStorageSync('parkFee'));
-    console.log(616161, this.parkFee)
+    console.log(616161, this.parkFee);
     this.parkInfoEntity = this.parkFee.parkInfoEntity;
-    this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime ? this.parkInfoEntity.useReduceTime : 0; // 已用优惠时长
-    this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.remainReduceTime > 0 ? this.parkInfoEntity.remainReduceTime : 0; // 剩余可用优惠时长
+    this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime
+      ? this.parkInfoEntity.useReduceTime
+      : 0; // 已用优惠时长
+    this.parkInfoEntity.remainReduceTime =
+      this.parkInfoEntity.remainReduceTime > 0
+        ? this.parkInfoEntity.remainReduceTime
+        : 0; // 剩余可用优惠时长
     this.parkMallCode = this.parkInfoEntity.parkMallCode;
     // 浦东每次上限处理
-    if (this.parkMallCode === 1 && this.parkInfoEntity.remainReduceTime > this.parkInfoEntity.maxonetimediscount) {
-      this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxonetimediscount;
+    if (
+      this.parkMallCode === 1 &&
+      this.parkInfoEntity.remainReduceTime >
+        this.parkInfoEntity.maxonetimediscount
+    ) {
+      this.parkInfoEntity.remainReduceTime =
+        this.parkInfoEntity.maxonetimediscount;
     }
 
     // 沈阳上限处理
     if (this.parkMallCode === 4) {
-      this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
+      this.parkInfoEntity.remainReduceTime =
+        this.parkInfoEntity.maxOneDayHour -
+        this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
       if (this.couponFee) {
-        this.parkInfoEntity.remainReduceTime -= this.couponFee / this.parkInfoEntity.needmoney;
+        this.parkInfoEntity.remainReduceTime -=
+          this.couponFee / this.parkInfoEntity.needmoney;
       }
     }
 
     // 上限金额
-    this.maxonetimediscountFee = this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
-    this.maxonedaydiscountFee = (this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) * this.parkInfoEntity.needmoney || 0;
+    this.maxonetimediscountFee =
+      this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
+    this.maxonedaydiscountFee =
+      (this.parkInfoEntity.maxOneDayHour -
+        this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) *
+        this.parkInfoEntity.needmoney || 0;
     if (this.maxonedaydiscountFee < 0) {
       this.maxonedaydiscountFee = 0;
     }
 
     // 会员优惠
-    if (this.parkFee.parkMemberOrderReducesEntityList && this.parkFee.parkMemberOrderReducesEntityList[0]) {
+    if (
+      this.parkFee.parkMemberOrderReducesEntityList &&
+      this.parkFee.parkMemberOrderReducesEntityList[0]
+    ) {
       this.memberDiscount = this.parkFee.parkMemberOrderReducesEntityList[0];
     }
 
     // 消费减免
-    if (this.parkFee.parkConsumeReducesEntityList && this.parkFee.parkConsumeReducesEntityList.length) {
+    if (
+      this.parkFee.parkConsumeReducesEntityList &&
+      this.parkFee.parkConsumeReducesEntityList.length
+    ) {
       this.reducesDiscount = this.parkFee.parkConsumeReducesEntityList[0];
     } else {
       this.reducesDiscount = { consumerLimit: 0, recuceContent: 0 };
@@ -118,12 +187,13 @@ export default {
 
     // 反显处理
     if (this.discountTotal.consumeFee) {
-      this.reduceHours = (this.discountTotal.consumeFee / this.parkInfoEntity.needmoney) || 0;
+      this.reduceHours =
+        this.discountTotal.consumeFee / this.parkInfoEntity.needmoney || 0;
     }
     const checkedList = uni.getStorageSync('checkedList');
     if (checkedList && checkedList.length) {
       this.checkedList = checkedList;
-    }/* else {
+    } /* else {
 			if (this.memberDiscount.reduceContent > 0) {
 				// 浦东上限控制
 				if (this.parkMallCode === 1) {
@@ -147,8 +217,13 @@ export default {
     // 浦东上限控制
     if (this.parkMallCode === 1 || this.parkMallCode === 4) {
       if (this.discountTotal.memberGradeFee) {
-        this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - (this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney);
-        if (this.parkMallCode === 4 && this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
+        this.maxReduceDiscount =
+          this.parkInfoEntity.remainReduceTime -
+          this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney;
+        if (
+          this.parkMallCode === 4 &&
+          this.maxReduceDiscount > this.reducesDiscount.recuceContent
+        ) {
           this.maxReduceDiscount = this.reducesDiscount.recuceContent;
         }
       }
@@ -201,16 +276,22 @@ export default {
       parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
       paperCouponFee: 0, // 纸质优惠金额
       couponFee: 0, // 电子券优惠金额
-      active: 'a'
-    }
+      active: 'a',
+    };
   },
   computed: {
     // 是否显示消费减免
     isShowReduceDiscount() {
-      if (this.parkInfoEntity.parkMallCode === 0 || this.parkInfoEntity.parkMallCode === 1) {
-        return this.parkInfoEntity.consumeReduce && this.reducesDiscount.consumerLimit
+      if (
+        this.parkInfoEntity.parkMallCode === 0 ||
+        this.parkInfoEntity.parkMallCode === 1
+      ) {
+        return (
+          this.parkInfoEntity.consumeReduce &&
+          this.reducesDiscount.consumerLimit
+        );
       }
-      return this.parkInfoEntity.consumeReduce
+      return this.parkInfoEntity.consumeReduce;
     },
     // 首停减免金额
     firstParkDiscountFee() {
@@ -226,8 +307,16 @@ export default {
     },
     // 浦东有效期内消费提示
     reduceDiscountMessage() {
-      return this.parkInfoEntity.expirationDate + '日内消费了' + this.parkInfoEntity.totalAmont + '元,已使用' +
-        parseInt(this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney) + '小时满减抵扣。';
+      return (
+        this.parkInfoEntity.expirationDate +
+        '日内消费了' +
+        this.parkInfoEntity.totalAmont +
+        '元,已使用' +
+        parseInt(
+          this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney
+        ) +
+        '小时满减抵扣。'
+      );
     },
     // 消费减免(拆分部分)提示文本
     reduceSplitMessage() {
@@ -238,7 +327,11 @@ export default {
     },
     // 当日消费提示
     todayReduceDiscountMessage() {
-      if (this.parkInfoEntity.remainReduceTime || this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) {
+      if (
+        this.parkInfoEntity.remainReduceTime ||
+        this.parkInfoEntity.maxOneDayHour -
+          this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour
+      ) {
         if (this.reducesDiscount.consumerLimit) {
           if (this.parkMallCode === 0) {
             return `今日可减免${this.reducesDiscount.recuceContent}小时`;
@@ -247,15 +340,18 @@ export default {
           if (this.parkMallCode === 4) {
             return `未达上限时今日可减免${this.reducesDiscount.recuceContent}小时`;
           }
-          if (this.reducesDiscount.recuceContent > this.parkInfoEntity.remainReduceTime) {
-            return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
+          if (
+            this.reducesDiscount.recuceContent >
+            this.parkInfoEntity.remainReduceTime
+          ) {
+            return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`;
           }
-          return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
+          return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`;
         }
-        return '消费金额未达到最低优惠要求'
+        return '消费金额未达到最低优惠要求';
       }
       if (this.parkInfoEntity.dateReduceUpperliLimit) {
-        return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`
+        return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`;
       }
     },
     // 选择优惠数量
@@ -268,7 +364,7 @@ export default {
       this.member = 0;
       this.reduces = 0;
       let total = 0;
-      this.checkedList.forEach(item => {
+      this.checkedList.forEach((item) => {
         this[item] = this[item + 'DiscountFee'];
         total += this[item + 'DiscountFee'];
       });
@@ -293,33 +389,48 @@ export default {
         }
       }
       if (this.parkMallCode === 4) {
-        if (total - this.paperCouponFee - this.parkDiscountTotal.bonusfee > this.maxonedaydiscountFee) {
-          total = this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee + this.paperCouponFee;
+        if (
+          total - this.paperCouponFee - this.parkDiscountTotal.bonusfee >
+          this.maxonedaydiscountFee
+        ) {
+          total =
+            this.maxonedaydiscountFee +
+            this.parkDiscountTotal.bonusfee +
+            this.paperCouponFee;
         }
       }
       return total;
     },
     ...mapState({
-      custTypeId: state => state.custTypeId,
-      groupId: state => state.groupId,
-    })
+      custTypeId: (state) => state.custTypeId,
+      groupId: (state) => state.groupId,
+    }),
   },
   methods: {
     // 选择回调
     checkboxChange(e) {
-      console.log('checkboxChange')
-      console.log('paperCouponFee------>', this.paperCouponFee)
+      console.log('checkboxChange');
+      console.log('paperCouponFee------>', this.paperCouponFee);
       this.checkedList = e.detail.value;
       // 浦东上限控制
       if (this.parkMallCode === 1) {
         if (this.isCheck('member')) {
-          this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
+          this.maxReduceDiscount =
+            this.parkInfoEntity.remainReduceTime -
+            (this.discountFee - this.paperCouponFee - this.reduces) /
+              this.parkInfoEntity.needmoney;
           this.reduceHours = this.maxReduceDiscount;
         } else {
           if (this.isCheck('reduces')) {
-            this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
+            this.maxReduceDiscount =
+              this.parkInfoEntity.remainReduceTime -
+              (this.discountFee - this.paperCouponFee - this.reduces) /
+                this.parkInfoEntity.needmoney;
           } else {
-            this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee) / this.parkInfoEntity.needmoney);
+            this.maxReduceDiscount =
+              this.parkInfoEntity.remainReduceTime -
+              (this.discountFee - this.paperCouponFee) /
+                this.parkInfoEntity.needmoney;
             this.reduceHours = this.maxReduceDiscount;
           }
         }
@@ -327,7 +438,9 @@ export default {
       // 沈阳上限控制
       if (this.parkMallCode === 4) {
         if (this.isCheck('member')) {
-          this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - this.memberDiscount.reduceContent;
+          this.maxReduceDiscount =
+            this.parkInfoEntity.remainReduceTime -
+            this.memberDiscount.reduceContent;
           if (this.maxReduceDiscount < 0) {
             this.maxReduceDiscount = 0;
           }
@@ -348,12 +461,12 @@ export default {
 
     // 是否选中
     isCheck(val) {
-      return this.checkedList.findIndex(e => e == val) !== -1;
+      return this.checkedList.findIndex((e) => e == val) !== -1;
     },
 
     // 计数器回调
     reducesChange() {
-      console.log('reducesChange')
+      console.log('reducesChange');
       if (this.isCheck('reduces')) {
         this.crossMessage();
       }
@@ -362,7 +475,8 @@ export default {
     // 超限提示
     crossMessage() {
       let totalFee = this.parkDiscountTotal.feeCopy;
-      const remainReduceFee = this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
+      const remainReduceFee =
+        this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
       // if (this.discountTotal && this.discountTotal.fee !== 0) {
       // 	totalFee += this.totalFee - this.discountTotal.fee;
       // } else {
@@ -371,27 +485,38 @@ export default {
       totalFee += this.totalFee;
       // 浦东每次总优惠上限
       this.isDiscountDisabled = false;
-      if (this.parkMallCode === 1 && totalFee - this.paperCouponFee >= this.maxonetimediscountFee) {
+      if (
+        this.parkMallCode === 1 &&
+        totalFee - this.paperCouponFee >= this.maxonetimediscountFee
+      ) {
         this.isDiscountDisabled = true;
         return uni.showToast({
           title: `超出抵扣上限,每次最高可抵扣${this.parkInfoEntity.maxonetimediscount}小时`,
-          icon: 'none'
+          icon: 'none',
         });
       }
       // 沈阳超限处理(maxonedaydiscountFee 会员、消费、电子券减免)
-      if (this.parkMallCode === 4 && totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >= this.maxonedaydiscountFee) {
+      if (
+        this.parkMallCode === 4 &&
+        totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >=
+          this.maxonedaydiscountFee
+      ) {
         this.isDiscountDisabled = true;
         return uni.showToast({
           title: `(会员等级、消费、电子券)每日最高可抵扣${this.parkInfoEntity.maxOneDayHour}小时`,
-          icon: 'none'
+          icon: 'none',
         });
       }
       // 消费每天优惠上限(非浦东、沈阳)
-      if (this.parkMallCode !== 1 && this.parkMallCode !== 4 && this.reduces > remainReduceFee) {
+      if (
+        this.parkMallCode !== 1 &&
+        this.parkMallCode !== 4 &&
+        this.reduces > remainReduceFee
+      ) {
         this.reduces = remainReduceFee;
         return uni.showToast({
           title: `超出抵扣上限,消费减免每天最高可抵扣${this.parkInfoEntity.dateReduceUpperliLimit}小时,可使用${this.parkInfoEntity.remainReduceTime}小时`,
-          icon: 'none'
+          icon: 'none',
         });
       }
     },
@@ -399,7 +524,8 @@ export default {
     // 确认
     confirm() {
       // 计算单价
-      const cost = this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
+      const cost =
+        this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
       // 算出消费减免在哪个档
       let useConsumeFee = 0;
       if (this.reduces) {
@@ -417,13 +543,12 @@ export default {
         consumeFee: this.reduces,
         useConsumeFee: useConsumeFee,
         time: this.totalTime,
-        fee: this.totalFee
+        fee: this.totalFee,
       });
       this.$router.back();
     },
-
-  }
-}
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -434,11 +559,11 @@ export default {
   display: flex;
   flex-direction: column;
   height: 100vh;
-  background: #F4F7FF;
+  background: #f4f7ff;
 }
 
 .container {
-  background-color: #FAFBFF;
+  background-color: #fafbff;
   width: calc(100% - 100px);
   margin: 30px;
   padding-left: 40px;
@@ -448,7 +573,7 @@ export default {
   line-height: 70px;
   position: relative;
   height: inherit;
-  border: 1px solid #D8DAE0;
+  border: 1px solid #d8dae0;
 
   .item {
     width: 570px;
@@ -475,7 +600,7 @@ export default {
   .page_img {
     width: 49px;
     height: 49px;
-    border: 1px solid #E6E6E6;
+    border: 1px solid #e6e6e6;
     border-radius: 50%;
     overflow: hidden;
 
@@ -515,18 +640,18 @@ export default {
     line-height: 70px;
     color: #fff;
     // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
-    background: #064C8A;
+    background: #064c8a;
     box-shadow: 2px 3px 5px #888888;
     position: absolute;
     right: 16px;
   }
 
   .blue_flewx_index3 {
-    .color-background-color('blue')
+    .color-background-color('blue');
   }
 
   .green_flewx_index3 {
-    .color-background-color('green')
+    .color-background-color('green');
   }
 }
 
@@ -540,6 +665,3 @@ export default {
   border-radius: 50% !important;
 }
 </style>
-
-
-

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

@@ -1,6 +1,6 @@
 <template>
 	<scroll-view scroll-y="true" class="scroll-Y">
-		<img :src="icon"></img>
+		<img :src="icon"/>
 		<div style="font-weight:bold;font-size: 32px;">[支付成功]</div>
 		<div style="font-size: 30px;color: #888888;margin-top: 10px;">{{carno | formatCarno}}停车费支付成功</div>
 		<div style="font-size: 30px;color: #888888;margin-top: 10px;">请在<span style="color: red;">{{outParkCharging}}分钟</span>内离场</div>

+ 16 - 6
src/pages/parkingFee/parkingReceipt/parkingApplication.vue

@@ -204,6 +204,7 @@ import arrowIcon from '../static/images/arrows.png';
 import { mapState } from 'vuex';
 // import MemberCacheTool from '@/utils/member-cache-tool.js';
 import uni from '@/utils/uniHooks';
+import { getUrlParams } from '@/utils/index.js';
 export default {
   data() {
     return {
@@ -239,9 +240,9 @@ export default {
     };
   },
   created() {
-    const options = this.$route.query;
-    console.log('===>onLoad', options);
-    this.pageOptions = options;
+    // const options = this.$route.query;
+    // console.log('===>onLoad', options);
+    // this.pageOptions = options;
     // 埋点本地化
     this.preUrl = uni.getStorageSync('previousUrl');
     uni.setStorageSync(
@@ -250,15 +251,23 @@ export default {
     );
   },
   mounted() {
+    console.log(253, this.ids);
     setTimeout(() => {
       uni.setNavigationBarTitle({
         title: '发票申请',
       });
     }, 300);
+    // console.clear();
+    const query = getUrlParams();
     console.log('是否重新回到改页面', this.pageOptions);
+    console.log('是否重新回到改页面', query);
+    console.log(260, this.$route.query);
+    this.pageOptions = query
     if (this.pageOptions) {
       const options = this.pageOptions;
       console.log('===>onShow', options);
+      console.log('===>onShow', options.ids);
+      
       if (options.type && options.money) {
         this.type = options.type;
         this.invoiceAmount = options.money;
@@ -271,6 +280,7 @@ export default {
           this.ids = ids;
         }
         this.orderQuantity = this.ids.length;
+        console.log('获取订单信息');
         this.getParkOrderInfo();
         this.getInvoiceEmailInfo();
       }
@@ -305,7 +315,7 @@ export default {
     },
     changeHeader() {
       this.$router.push({
-        path: '/parkingChooseHeader?id=' + this.ids[0],
+        path: '/parkingChooseHeader?ids=' + this.ids,
       });
     },
     gotoDetail() {
@@ -338,7 +348,7 @@ export default {
         data: params,
         header: JSON.parse(uni.getStorageSync('handleUser')),
         success: (res) => {
-          console.log(res.data);
+          console.log('开票信息', res.data);
           if (res.data.code === 0) {
             const list = res.data.data;
             let currentIndex = 0;
@@ -379,7 +389,7 @@ export default {
       uni.request({
         url: self.$baseURL + 'api/1.0/invoice/myParkOrderListByIds',
         method: 'POST',
-        data: this.ids,
+        data: typeof this.ids === 'string' ? [this.ids] : this.ids,
         header: JSON.parse(uni.getStorageSync('handleUser')),
         success: (res) => {
           if (res.data.code === 0) {

+ 18 - 17
src/pages/parkingFee/parkingReceipt/parkingChangeHeader.vue

@@ -50,9 +50,9 @@
         <div class="part-item lines">
           <span class="part-item-key">设为默认</span>
           <div class="part-item-value">
-            <switch
-              color="#8CC63F"
-              :checked="isDefault"
+            <van-switch
+              active-color="#064C8A"
+              v-model="isDefault"
               @change="switch1Change"
             />
           </div>
@@ -137,8 +137,8 @@ export default {
       id: '',
       globalData: app.globalData,
       items: [
-        {value: '0',name: '单位'},
-        {value: '1',name: '个人/非企业单位'},
+        {value: 0,name: '单位'},
+        {value: 1,name: '个人/非企业单位'},
       ],
       isDefault: true, // 记录
       condition: {
@@ -263,18 +263,19 @@ export default {
           console.log(res.data)
           if ( res.data.code === 0 ) {
             // 保存结果埋点
-            self.sensorsClick('$ClickSubmitHeader',{
-              redirect_url: '',
-              type_header:
-                params.invoiceTitleType == 0
-                  ? 'SelectCompany'
-                  : 'SelectPersonal',
-              default_header:
-                params.setDefault == 0
-                  ? 'SetAsDefaultClose'
-                  : 'SetAsDefaultOpen',
-            })
-            uni.navigateBack({delta: 1})
+            // self.sensorsClick('$ClickSubmitHeader',{
+            //   redirect_url: '',
+            //   type_header:
+            //     params.invoiceTitleType == 0
+            //       ? 'SelectCompany'
+            //       : 'SelectPersonal',
+            //   default_header:
+            //     params.setDefault == 0
+            //       ? 'SetAsDefaultClose'
+            //       : 'SetAsDefaultOpen',
+            // })
+            this.$router.back()
+            // uni.navigateBack({delta: 1})
           } else {
             uni.showToast({
               title: res.data.msg,

+ 135 - 127
src/pages/parkingFee/parkingReceipt/parkingChooseHeader.vue

@@ -1,66 +1,59 @@
 <template>
-  <scroll-view class="scroll-Y" scroll-y>
-    <div class="choose-invoice-header" v-if="list.length">
-      <radio-group class="radios">
-        <label
-          class="uni-list-cell uni-list-cell-pd radio-label lines"
-          v-for="(item, index) in list"
-          :key="index"
-          :index="item.id"
-        >
-          <div
-            class="invoice-header-info"
-            @click.native="chooseHeader(item, index)"
-          >
-            <!-- <uni-view><radio :value="item.id" :checked="index === current" /></uni-view> -->
-            <div class="invoice-header-text">
-              <div class="invoice-header-name">
-                <div class="invoice-header-name-text">
-                  {{ item.invoiceTitleName
-                  }}<span class="isDefault" v-if="item.setDefault === 1"
-                    >默认</span
-                  >
-                </div>
-                <div class="invoice-header-name-icon">
-                  <div
-                    class="edit-header"
-                    @click.stop="changeHeader('edit', item.id)"
-                  >
-                    <img
-                      class="invoice-header-arrow"
-                      :src="editwIcon"
-                      mode="widthFix"
-                    ></img>
+  <div>
+    <scroll-view class="scroll-Y" scroll-y>
+      <div>
+        <div class="choose-invoice-header" v-if="list.length">
+          <van-radio-group class="radios">
+            <label
+              class="uni-list-cell uni-list-cell-pd radio-label lines"
+              v-for="(item, index) in list"
+              :key="index"
+              :index="item.id"
+              @click="chooseHeader(item, index)"
+            >
+              <div class="invoice-header-info">
+                <div class="invoice-header-text">
+                  <div class="invoice-header-name">
+                    <div class="invoice-header-name-text">
+                      {{ item.invoiceTitleName
+                      }}<span class="isDefault" v-if="item.setDefault === 1"
+                        >默认</span
+                      >
+                    </div>
+                    <div class="invoice-header-name-icon">
+                      <div
+                        class="edit-header"
+                        @click.stop="changeHeader('edit', item.id)"
+                      >
+                        <img
+                          class="invoice-header-arrow"
+                          :src="editwIcon"
+                          mode="widthFix"
+                        />
+                      </div>
+                      <div class="edit-header" @click.stop="delHeader(item.id)">
+                        <img
+                          class="invoice-header-arrow"
+                          :src="delwIcon"
+                          mode="widthFix"
+                        />
+                      </div>
+                    </div>
                   </div>
-                  <div class="edit-header" @click.stop="delHeader(item.id)">
-                    <img
-                      class="invoice-header-arrow"
-                      :src="delwIcon"
-                      mode="widthFix"
-                    ></img>
+                  <div class="duty-paragraph">
+                    税号 {{ item.corporationTax }}
                   </div>
                 </div>
               </div>
-              <div class="duty-paragraph">
-                税号 {{ item.corporationTax }}
-              </div>
-            </div>
-          </div>
-          <!-- <uni-view class="invoice-header-icon">
-                        <uni-view class="edit-header" @click.native="changeHeader('edit', item.id)">
-                            <img class="invoice-header-arrow" :src="editwIcon" mode="widthFix"></img>
-                        </uni-view>
-                        <uni-view class="edit-header" @click.native="delHeader(item.id)">
-                            <img class="invoice-header-arrow" :src="delwIcon" mode="widthFix"></img>
-                        </uni-view>
-                    </uni-view> -->
-        </label>
-      </radio-group>
-    </div>
-    <div class="choose-invoice-header noData" v-else>
-      <img class="noDataImg" :src="noDataIcon" mode="widthFix"></img>
-      <div class="">您还没添加发票抬头</div>
-    </div>
+            </label>
+          </van-radio-group>
+        </div>
+        <div class="choose-invoice-header noData" v-else>
+          <img class="noDataImg" :src="noDataIcon" mode="widthFix" />
+          <div class="">您还没添加发票抬头</div>
+        </div>
+      </div>
+    </scroll-view>
     <div class="footer">
       <div
         :class="{
@@ -69,19 +62,20 @@
           'green-push-again-btn': custTypeId === 2,
         }"
         @click="changeHeader('add')"
-        >添加抬头</div
       >
+        添加抬头
+      </div>
     </div>
-  </scroll-view>
+  </div>
 </template>
 
 <script>
 // const app = getApp()
- const app = {}
-import editwIcon from '../static/images/edit.png'
-import delwIcon from '../static/images/delete.png'
-import noDataIcon from '../static/images/nodataicon.png'
-import { mapState } from 'vuex'
+const app = {};
+import editwIcon from '../static/images/edit.png';
+import delwIcon from '../static/images/delete.png';
+import noDataIcon from '../static/images/nodataicon.png';
+import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
 
 export default {
@@ -93,64 +87,60 @@ export default {
       noDataIcon: noDataIcon,
       globalData: app.globalData,
       current: -1,
-      id: '',
+      ids: '',
       list: [],
       preUrl: '',
-    }
+    };
   },
   created() {
     const options = this.$route.query;
-    if (options.id) this.id = options.id
+    if (options.ids) this.ids = options.ids;
     // 埋点本地化
-    this.preUrl = uni.getStorageSync('previousUrl')
+    this.preUrl = uni.getStorageSync('previousUrl');
     uni.setStorageSync(
       'previousUrl',
       '/pages/parkingFee/parkingReceipt/parkingChooseHeader.vue'
-    )
+    );
   },
-  onShow() {
+  mounted() {
     // console.log('全剧信息', this.globalData);
-    this.getInvoiceTitle()
+    this.getInvoiceTitle();
   },
   onBackPress() {
-    console.log('===> 点击返回按钮')
-    const pages = getCurrentPages()
-    const prePage = pages[pages.length - 2]
+    console.log('===> 点击返回按钮');
+    const pages = getCurrentPages();
+    const prePage = pages[pages.length - 2];
     const options = {
       header: this.list[this.current] || {},
-    }
+    };
     // TODO 开票界面选择了 A,两个列表中如果有当前是 A,删除 A之后,点击返回按钮 开票界面 A 还存在
-    prePage.$vm.pageOptions = options
+    prePage.$vm.pageOptions = options;
   },
   computed: {
     ...mapState({
       custTypeId: (state) => state.custTypeId,
+      member: (state) => state.member,
     }),
   },
   methods: {
     changeHeader(type, id) {
       if (id)
         this.$router.push({
-          path:
-            '/parkingChangeHeader?type=' +
-            type +
-            '&id=' +
-            id,
-        })
+          path: '/parkingChangeHeader?type=' + type + '&id=' + id,
+        });
       else
         this.$router.push({
-          path:
-            '/parkingChangeHeader?type=' + type,
-        })
+          path: '/parkingChangeHeader?type=' + type,
+        });
     },
     // 埋点方法
     sensorsClick(eventName, params) {
-      let optionsQuery = uni.getStorageSync('options_query')
+      let optionsQuery = uni.getStorageSync('options_query');
       let fixedParams = {
           cta_itemno: '',
           cta_name: '',
           previous_path: this.preUrl || '',
-          $brand_id:uni.getStorageSync('groupId'),
+          $brand_id: uni.getStorageSync('groupId'),
           $location: uni.getStorageSync('mallid'),
           $channel: optionsQuery.channel || '',
           // $utm_lbs: this.optionsQuery.utm_lbs || '',
@@ -160,13 +150,13 @@ export default {
           $utm_function: optionsQuery.utm_function || '',
           $utm_user: optionsQuery.utm_user || '',
         },
-        finalParams = Object.assign(fixedParams, params)
-      this.$sensors.track(eventName, finalParams)
+        finalParams = Object.assign(fixedParams, params);
+      this.$sensors.track(eventName, finalParams);
     },
     // 删除抬头
     delHeader(id) {
-      const self = this
-      self.$md([id])
+      const self = this;
+      self.$md([id]);
       uni.showModal({
         content: '确认要删除该发票抬头吗?',
         success: function (res) {
@@ -177,100 +167,105 @@ export default {
               data: [id],
               header: JSON.parse(uni.getStorageSync('handleUser')),
               success: (res) => {
-                console.log('删除抬头', res.data)
+                console.log('删除抬头', res.data);
                 if (res.data.code === 0) {
                   // 删除抬头埋点
                   self.sensorsClick('$ClickDeleteIcon', {
                     redirect_path: '',
                     delete_header_id: id,
-                  })
-                  self.getInvoiceTitle()
+                  });
+                  self.getInvoiceTitle();
                 } else {
                   uni.showToast({
                     title: res.data.msg,
                     duration: 2000,
                     icon: 'none',
-                  })
+                  });
                 }
               },
               fail: () => {
                 uni.showToast({
                   title: '服务器开小差了呢,请您稍后再试',
                   icon: 'none',
-                })
+                });
               },
-            })
+            });
           }
         },
-      })
+      });
     },
     // 选择抬头
     chooseHeader(item, index) {
-      this.current = index
-      if (!this.id) return false
-      const pages = getCurrentPages()
-      const prePage = pages[pages.length - 2]
-      const options = {
-        header: this.list[index] || {},
-      }
-      prePage.$vm.pageOptions = options
-      this.$router.back()
-      // this.$router.replace({ path: '/pages/parkingFee/parkingReceipt/parkingApplication?ids=' + this.id + '&header=' + JSON.stringify(item) });
+      console.log(178, item, index);
+      this.current = index;
+      if (!this.ids || !this.ids.length) return false;
+      // const pages = getCurrentPages();
+      // const prePage = pages[pages.length - 2];
+      // const options = {
+      //   header: this.list[index] || {},
+      // };
+      // prePage.$vm.pageOptions = options;
+      // this.$router.back();
+      this.$router.replace({ path: '/parkingApplication?ids=' + this.ids + '&header=' + JSON.stringify(item) });
     },
     // 查询全部抬头列表信息
     getInvoiceTitle() {
-      const self = this
+      const self = this;
       const params = {
-        vipcode: this.globalData.member.vipcode,
-      }
-      self.$md(params)
+        vipcode: this.member.vipcode,
+      };
+      self.$md(params);
       uni.request({
         url: self.$baseURL + 'api/1.0/invoiceTitle/page',
         method: 'GET',
         data: params,
         header: JSON.parse(uni.getStorageSync('handleUser')),
         success: (res) => {
-          console.log(res.data)
+          console.log('查询全部抬头列表信息', res.data);
           if (res.data.code === 0) {
-            this.list = res.data.data
+            this.list = res.data.data;
             if (this.list.length) {
               this.list.map((item, index) => {
-                if (item.setDefault === 1) this.current = index
-              })
-              if (this.current == -1) this.current = 0
+                if (item.setDefault === 1) this.current = index;
+              });
+              if (this.current == -1) this.current = 0;
             }
           } else {
             uni.showToast({
               title: res.data.msg,
               duration: 2000,
               icon: 'none',
-            })
+            });
           }
         },
         fail: () => {
           uni.showToast({
             title: '服务器开小差了呢,请您稍后再试',
             icon: 'none',
-          })
+          });
         },
-      })
+      });
     },
   },
-}
+};
 </script>
 
 <style lang="less" scoped>
 @import '../../../styles/common.less';
+
 .scroll-Y {
   width: 100%;
   display: flex;
   flex-direction: column;
   height: 100vh;
-  background: #F4F7FF;
+  background: #f4f7ff;
+
   .choose-invoice-header {
     padding: 20px 30px;
+
     .radios {
       width: 100%;
+
       .radio-label {
         display: flex;
         align-items: center;
@@ -278,14 +273,17 @@ export default {
         border-radius: 10px;
         background-color: #ffffff;
         margin-bottom: 20px;
+
         .invoice-header-info {
           flex: 1;
           display: flex;
           justify-content: flex-start;
           align-items: center;
+
           .invoice-header-text {
             width: 100%;
             padding: 0 20px;
+
             .invoice-header-name {
               color: #333333;
               padding: 20px 0;
@@ -293,6 +291,7 @@ export default {
               display: flex;
               justify-content: space-between;
               align-items: center;
+
               .isDefault {
                 color: #8cc63f;
                 border: 2px solid #8cc63f;
@@ -300,27 +299,32 @@ export default {
                 border-radius: 20px;
                 padding: 0 10px;
               }
+
               .invoice-header-name-icon {
                 width: 100px;
                 display: flex;
                 align-items: center;
                 justify-content: space-around;
+
                 .invoice-header-arrow {
                   width: 30px;
                 }
               }
             }
           }
+
           .duty-paragraph {
             color: #6f6f70;
             padding: 20px 0;
           }
         }
+
         .invoice-header-icon {
           width: 100px;
           display: flex;
           align-items: center;
           justify-content: space-around;
+
           .invoice-header-arrow {
             width: 30px;
           }
@@ -328,17 +332,20 @@ export default {
       }
     }
   }
+
   .noData {
     position: relative;
     top: 20%;
     transform: translateY(-50%);
     color: #cccccc;
     text-align: center;
+
     .noDataImg {
       width: 200px;
       margin-bottom: 20px;
     }
   }
+
   .footer {
     width: 100%;
     background-color: #ffffff;
@@ -350,27 +357,28 @@ export default {
     // padding-bottom: constant(safe-area-inset-bottom);
     // padding-bottom: env(safe-area-inset-bottom);
     padding-bottom: 20px;
+
     .push-again-btn {
       margin: 20px 60px;
       color: #ffffff;
       // background-image: linear-gradient(to right, #7d4ea1, #40397c);
-      background-color: #064C8A;
+      background-color: #064c8a;
       border-radius: 50px;
       text-align: center;
       padding: 20px 0;
     }
+
     .blue-push-again-btn {
       .color-background-color('blue');
     }
+
     .green-push-again-btn {
       .color-background-color('green');
     }
   }
+
   .lines {
     border-bottom: 2px solid #ececec;
   }
 }
 </style>
-
-
-

+ 5 - 3
src/pages/parkingFee/parkingReceipt/parkingInvoice.vue

@@ -6,7 +6,6 @@
         <div class="part-item-value invoiceTitleName" @click="showHeader">
           {{ order.invoiceTitleName || 'order' }}
           <van-icon name="arrow" size="10" color="#D8DAE0"/>
-          <!-- <img class="invoice-header-arrow" :src="arrowIcon" mode="widthFix" /> -->
         </div>
       </div>
       <div class="part-item">
@@ -83,8 +82,9 @@ export default {
       id: '',
     };
   },
-  onLoad(options) {
-    this.id = options.id;
+  created() {
+    console.log('查看发票详情的id', this.$route.query);
+    this.id = this.$route.query.id;
   },
   mounted() {
     setTimeout(() => {
@@ -102,6 +102,8 @@ export default {
   methods: {
     // 根据发票id获取发票详情信息(含发票抬头信息),
     getInvoicedDetail(id) {
+      // 
+      console.log('根据发票id获取发票详情信息(含发票抬头信息),', id );
       const self = this;
       const data = {
         id: id,

+ 1 - 1
src/pages/parkingFee/parkingReceipt/parkingInvoiceApply.vue

@@ -2,7 +2,7 @@
   <scroll-view class="scroll-Y" scroll-y>
     <div class="apply-success-box">
       <div class="apply-success-img">
-        <img class="apply-image" mode="widthFix" :src="icon"></img>
+        <img class="apply-image" mode="widthFix" :src="icon"/>
       </div>
       <div class="apply-success-text">【发票申请提交成功】</div>
     </div>

+ 6 - 6
src/pages/parkingFee/parkingReceipt/parkingInvoiceImage.vue

@@ -10,10 +10,10 @@
         <span class="part-item-value"></span>
       </div>
       <div class="invoice-img" v-if="order.invoiceUrl">
-        <!-- <img class="img" :src="picUrl + order.invoiceImgUrl" mode="widthFix"></img>
+        <!-- <img class="img" :src="picUrl + order.invoiceImgUrl" mode="widthFix"/>
                 <uni-view class="img-index">1/1</uni-view> -->
         <!-- <uni-view :class="{download: true, 'blue-download': custTypeId === 1, 'green-download': custTypeId === 2}" @click="downloadOrder(order.invoiceUrl)">
-                    <img mode="widthFix" :src="downloadBtnIcon"></img>
+                    <img mode="widthFix" :src="downloadBtnIcon"/>
                     <span>下载发票</span>
                 </uni-view> -->
       </div>
@@ -52,10 +52,10 @@ export default {
     }
   },
   created() {
-    // this.order = JSON.parse(this.$route.query.order)
-    this.order = {
-      mailbox: '1212'
-    }
+    this.order = JSON.parse(this.$route.query.order)
+    // this.order = {
+    //   mailbox: '1212'
+    // }
     console.log('获取的发票信息', this.order)
     // 埋点本地化
     this.preUrl = uni.getStorageSync('previousUrl')

+ 3 - 9
src/pages/parkingFee/parkingReceipt/parkingReceipt.vue

@@ -22,14 +22,7 @@
         {{ item }}
       </div>
     </div>
-    <div
-      class="shanghaiClassify"
-      :class="{
-        blueClassify: custTypeId === 1,
-        greenClassify: custTypeId === 2,
-      }"
-      v-else
-    >
+    <div class="shanghaiClassify" v-else>
       <div
         :class="{ classifyItem: true, isChecked: tabIndex === index + 1 }"
         v-for="(item, index) in invoiceList"
@@ -287,7 +280,7 @@ export default {
       this.$sensors.track(eventName, finalParams);
     },
     goToDeatil(item) {
-      if ((this.tabIndex === 2 && item.status === 2) || true) {
+      if (this.tabIndex === 2 && item.status === 2) {
         this.$router.push({
           path: '/parkingInvoice?id=' + item.id,
         });
@@ -533,6 +526,7 @@ export default {
       border: 1px solid #d8dae0;
       padding: 36px 30px 30px 30px;
       // margin: 20px 0;
+      margin-bottom: 30px;
       // border-radius: 20px;
       // background-color: #fff;
 

+ 17 - 11
src/pages/parkingFee/vehicleAddOrEdit.vue

@@ -202,7 +202,7 @@
         :disabled="disabledBtn"
         @click="handleAddLicensePlateByKipMember"
       >
-        确认添加
+        确认{{ carInfo.id ? '修改' : '添加' }}
       </div>
     </div>
     <plate-number
@@ -248,6 +248,11 @@ export default {
     };
   },
   created() {
+    // 埋点本地化
+    this.preUrl = uni.getStorageSync('previousUrl');
+    uni.setStorageSync('previousUrl', '/pages/parkingFee/vehicleAddOrEdit.vue');
+  },
+  mounted() {
     const params = this.$route.query;
     console.log(252, params);
     if (params.carType) {
@@ -258,9 +263,6 @@ export default {
       this.numArr = this.carInfo.carno.split('');
       this.vehicleNumber = this.carInfo.carno;
     }
-    // 埋点本地化
-    this.preUrl = uni.getStorageSync('previousUrl');
-    uni.setStorageSync('previousUrl', '/pages/parkingFee/vehicleAddOrEdit.vue');
   },
   computed: {
     disabledBtn() {
@@ -309,12 +311,16 @@ export default {
     clickShowKeyboard(index) {
       this.ind = index;
       this.active = index;
-      if (index === 0) {
-        this.$refs['plateKeyboard'].openKeyboardCN();
-      } else {
-        this.$refs['plateKeyboard'].closeKeyboardCN();
-        this.$refs['plateKeyboard'].openKeyboardEN();
-      }
+      console.log('唤起键盘', this.ind, this.active);
+      this.$nextTick(() => {
+        // return;
+        if (index === 0) {
+          this.$refs['plateKeyboard'].openKeyboardCN();
+        } else {
+          // this.$refs['plateKeyboard'].closeKeyboardCN();
+          this.$refs['plateKeyboard'].openKeyboardEN();
+        }
+      });
     },
     // 接收子组件数据
     updateCarno(val) {
@@ -390,7 +396,7 @@ export default {
                   duration: 1300,
                   icon: 'none',
                 });
-                setTimeout(function () {
+                setTimeout(() => {
                   this.$router.back();
                 }, 1500);
               }

+ 28 - 28
src/pages/pointsMall/pointsMall.vue

@@ -10,7 +10,7 @@
             confirm-type="search"
             @confirm="getProductList"
           />
-          <img class="searchIcon" :src="searchIcon"></img>
+          <img class="searchIcon" :src="searchIcon"/>
           <span class="searchText" @click="getProductList">搜索</span>
         </div>
         <div
@@ -66,11 +66,11 @@
             <img
               class="upIcon"
               :src="comprehensive == 1 ? triUpActivedIcon : triUpIcon"
-            ></img>
+            />
             <img
               class="downIcon"
               :src="comprehensive == 0 ? triDownActivedIcon : triDownIcon"
-            ></img>
+            />
           </div>
         </div>
         <div
@@ -83,11 +83,11 @@
             <img
               class="upIcon"
               :src="sales == 1 ? triUpActivedIcon : triUpIcon"
-            ></img>
+            />
             <img
               class="downIcon"
               :src="sales == 0 ? triDownActivedIcon : triDownIcon"
-            ></img>
+            />
           </div>
         </div>
         <div
@@ -100,11 +100,11 @@
             <img
               class="upIcon"
               :src="price == 1 ? triUpActivedIcon : triUpIcon"
-            ></img>
+            />
             <img
               class="downIcon"
               :src="price == 0 ? triDownActivedIcon : triDownIcon"
-            ></img>
+            />
           </div>
         </div>
         <div
@@ -114,7 +114,7 @@
         >
           <img
             :src="isNavClassify ? navClassifyActivedIcon : navClassifyIcon"
-          ></img>
+          />
           <div>分类</div>
         </div>
       </div>
@@ -146,14 +146,14 @@
                 v-if="item.isSpike == '1'"
               ></label-tip>
               <div class="sellBg" v-if="item.batchAvailableNum == 0">
-                <img class="imgNull" :src="sellOut" mode="widthFix"></img>
+                <img class="imgNull" :src="sellOut" mode="widthFix"/>
               </div>
               <img
                 class="imgNull1"
                 v-if="item.isComingSoon == '1'"
                 :src="toSell"
                 mode="widthFix"
-              ></img>
+              />
             </div>
             <img
               class="productImg"
@@ -161,14 +161,14 @@
               :src="picUrl + item.picture"
               v-if="String(item.imageUrl).indexOf('http') == -1"
               mode="widthFix"
-            ></img>
+            />
             <img
               class="productImg"
               :class="'productImg' + index1"
               :src="item.picture"
               v-else
               mode="widthFix"
-            ></img>
+            />
           </div>
           <div class="single-p-b">
             <div class="productTitle">{{ item.ticketName }}</div>
@@ -201,7 +201,7 @@
                     >积分+<span>{{ item.exMoney }}</span> 元
                   </div>
                   <!-- <uni-div class="prodectPriceCard">
-                                        <img :src="productCardIcon"></img>
+                                        <img :src="productCardIcon"/>
                                     </uni-div> -->
                 </div>
                 <div class="productStop" v-else>
@@ -227,7 +227,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon : likeIcon"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'liked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -237,7 +237,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon1 : blueLike"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'blueLiked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -247,7 +247,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon1 : greenLike"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'greenLiked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -276,14 +276,14 @@
                 v-if="item.isSpike == '1'"
               ></label-tip>
               <div class="sellBg" v-if="item.batchAvailableNum == 0">
-                <img class="imgNull" :src="sellOut" mode="widthFix"></img>
+                <img class="imgNull" :src="sellOut" mode="widthFix"/>
               </div>
               <img
                 class="imgNull1"
                 v-if="item.isComingSoon == '1'"
                 :src="toSell"
                 mode="widthFix"
-              ></img>
+              />
             </div>
             <img
               class="productImg"
@@ -291,14 +291,14 @@
               :src="picUrl + item.picture"
               v-if="String(item.imageUrl).indexOf('http') == -1"
               mode="widthFix"
-            ></img>
+            />
             <img
               class="productImg"
               :class="'productImg' + index1"
               :src="item.picture"
               v-else
               mode="widthFix"
-            ></img>
+            />
           </div>
           <div class="single-p-b">
             <div class="productTitle">{{ item.ticketName }}</div>
@@ -331,7 +331,7 @@
                     >积分+<span>{{ item.exMoney }}</span> 元
                   </div>
                   <!-- <uni-div class="prodectPriceCard">
-                                        <img :src="productCardIcon"></img>
+                                        <img :src="productCardIcon"/>
                                     </uni-div> -->
                 </div>
                 <div class="productStop" v-else>
@@ -357,7 +357,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon : likeIcon"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'liked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -367,7 +367,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon1 : blueLike"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'blueLiked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -377,7 +377,7 @@
                     class="islikeImg"
                     :src="item.iscollect == '1' ? unlikeIcon1 : greenLike"
                     mode="widthFix"
-                  ></img>
+                  />
                   <span :class="item.iscollect == '1' ? '' : 'greenLiked'">{{
                     item.iscollect == '1' ? '收藏' : '已收藏'
                   }}</span>
@@ -397,7 +397,7 @@
     <!-- 没有数据的占位展示 -->
     <div class="no-products" v-else>
       <div class="no-product-info">
-        <img class="no-product-img" :src="noTickets"></img>
+        <img class="no-product-img" :src="noTickets"/>
         <div class="no-product-text">暂时没有相关兑换商品</div>
       </div>
     </div>
@@ -535,19 +535,19 @@
               class="img"
               :src="likedIcon"
               mode="widthFix"
-            ></img>
+            />
             <img
               v-if="custTypeId === 1"
               class="img"
               :src="blueLiked"
               mode="widthFix"
-            ></img>
+            />
             <img
               v-if="custTypeId === 2"
               class="img"
               :src="greenLiked"
               mode="widthFix"
-            ></img>
+            />
             <div class="text">恭喜您已收藏该电子券!</div>
           </div>
         </div>

+ 2 - 2
src/pages/pointsMall/pointsSuccess.vue

@@ -3,8 +3,8 @@
     <div class="pointsBox">
         <div class="points-info-box">
             <div class="points-infos">
-                <!-- <img :src='picUrl + pointSuccessImg'></img> -->
-                <img :src='successImgUrl' ></img>
+                <!-- <img :src='picUrl + pointSuccessImg'/> -->
+                <img :src='successImgUrl' />
                 <div class="bold">兑换成功</div>
                 <div class="detailText">恭喜你,兑换成功,快去使用吧!</div>
             </div>