瀏覽代碼

feat: 微服务接入改造20%(创建订单页面:优惠券选择逻辑优化)

John-Hong 2 年之前
父節點
當前提交
3a9fe96a12

+ 99 - 98
prettier.config.js

@@ -1,98 +1,99 @@
-'use strict';
-
-module.exports = {
-  singleQuote: true,
-  //   tabWidth: 2,
-};
-
-// module.exports = {
-//   // 1.一行代码的最大字符数,默认是80(printWidth: <int>)
-//   printWidth: 80,
-//   // 2.tab宽度为2空格(tabWidth: <int>)
-//   tabWidth: 2,
-//   // 3.是否使用tab来缩进,我们使用空格(useTabs: <bool>)
-//   useTabs: false,
-//   // 4.结尾是否添加分号,false的情况下只会在一些导致ASI错误的其工况下在开头加分号,我选择无分号结尾的风格(semi: <bool>)
-//   semi: false,
-//   // 5.使用单引号(singleQuote: <bool>)
-//   singleQuote: true,
-//   // 6.object对象中key值是否加引号(quoteProps: "<as-needed|consistent|preserve>")as-needed只有在需求要的情况下加引号,consistent是有一个需要引号就统一加,preserve是保留用户输入的引号
-//   quoteProps: 'as-needed',
-//   // 7.在jsx文件中的引号需要单独设置(jsxSingleQuote: <bool>)
-//   jsxSingleQuote: false,
-//   // 8.尾部逗号设置,es5是尾部逗号兼容es5,none就是没有尾部逗号,all是指所有可能的情况,需要node8和es2017以上的环境。(trailingComma: "<es5|none|all>")
-//   trailingComma: 'es5',
-//   // 9.object对象里面的key和value值和括号间的空格(bracketSpacing: <bool>)
-//   bracketSpacing: true,
-//   // 10.jsx标签多行属性写法时,尖括号是否另起一行(jsxBracketSameLine: <bool>)
-//   jsxBracketSameLine: false,
-//   // 11.箭头函数单个参数的情况是否省略括号,默认always是总是带括号(arrowParens: "<always|avoid>")
-//   arrowParens: 'always',
-//   // 12.range是format执行的范围,可以选执行一个文件的一部分,默认的设置是整个文件(rangeStart: <int>  rangeEnd: <int>)
-//   rangeStart: 0,
-//   rangeEnd: Infinity,
-//   // 18. vue script和style标签中是否缩进,开启可能会破坏编辑器的代码折叠
-//   vueIndentScriptAndStyle: false,
-//   // 19.    endOfLine: "<lf|crlf|cr|auto>" 行尾换行符,默认是lf,
-//   endOfLine: 'lf',
-//   // 20.embeddedLanguageFormatting: "off",默认是auto,控制被引号包裹的代码是否进行格式化
-//   embeddedLanguageFormatting: 'off',
-// }
-
-// // 14. requirePragma: <bool>,格式化有特定开头编译指示的文件 比如下面两种
-// /**
-//  * @prettier
-//  */
-// // or
-// /**
-//  * @format
-//  */
-
-// // 15.insertPragma: <bool> 自当插入pragma到已经完成的format的文件开头
-
-// // 16. proseWrap: "<always|never|preserve>" 文章换行,默认情况下会对你的markdown文件换行进行format会控制在printwidth以内
-
-// // 13. 指定parser,因为pretter会自动选择,所以一般不用指定(parser: "<string>"  parser: require("./my-parser"))
-// // "babel" (via @babel/parser) Named "babylon" until v1.16.0
-// // "babel-flow" (same as "babel" but enables Flow parsing explicitly to avoid ambiguity) First available in v1.16.0
-// // "babel-ts" (similar to "typescript" but uses Babel and its TypeScript plugin) First available in v2.0.0
-// // "flow" (via flow-parser)
-// // "typescript" (via @typescript-eslint/typescript-estree) First available in v1.4.0
-// // "espree" (via espree) First available in v2.2.0
-// // "meriyah" (via meriyah) First available in v2.2.0
-// // "css" (via postcss-scss and postcss-less, autodetects which to use) First available in v1.7.1
-// // "scss" (same parsers as "css", prefers postcss-scss) First available in v1.7.1
-// // "less" (same parsers as "css", prefers postcss-less) First available in v1.7.1
-// // "json" (via @babel/parser parseExpression) First available in v1.5.0
-// // "json5" (same parser as "json", but outputs as json5) First available in v1.13.0
-// // "json-stringify" (same parser as "json", but outputs like JSON.stringify) First available in v1.13.0
-// // "graphql" (via graphql/language) First available in v1.5.0
-// // "markdown" (via remark-parse) First available in v1.8.0
-// // "mdx" (via remark-parse and @mdx-js/mdx) First available in v1.15.0
-// // "html" (via angular-html-parser) First available in 1.15.0
-// // "vue" (same parser as "html", but also formats vue-specific syntax) First available in 1.10.0
-// // "angular" (same parser as "html", but also formats angular-specific syntax via angular-estree-parser) First available in 1.15.0
-// // "lwc" (same parser as "html", but also formats LWC-specific syntax for unquoted template attributes) First available in 1.17.0
-// // "yaml" (via yaml and yaml-unist-parser) First available in 1.14.0
-
-// // 17. htmlWhitespaceSensitivity: "<css|strict|ignore>" html中的空格敏感性
-
-// // 针对不同文件或目录设置不同配置的方法,json格式例子
-// // {
-// //   "semi": false,
-// //   "overrides": [
-// //     {
-// //       "files": "*.test.js",
-// //       "options": {
-// //         "semi": true
-// //       }
-// //     },
-// //     {
-// //       "files": ["*.html", "legacy/**/*.js"],
-// //       "options": {
-// //         "tabWidth": 4
-// //       }
-// //     }
-// //   ]
-// // }
-
+'use strict';
+
+module.exports = {
+  singleQuote: true,
+  printWidth: 280,
+  //   tabWidth: 2,
+};
+
+// module.exports = {
+//   // 1.一行代码的最大字符数,默认是80(printWidth: <int>)
+//   printWidth: 80,
+//   // 2.tab宽度为2空格(tabWidth: <int>)
+//   tabWidth: 2,
+//   // 3.是否使用tab来缩进,我们使用空格(useTabs: <bool>)
+//   useTabs: false,
+//   // 4.结尾是否添加分号,false的情况下只会在一些导致ASI错误的其工况下在开头加分号,我选择无分号结尾的风格(semi: <bool>)
+//   semi: false,
+//   // 5.使用单引号(singleQuote: <bool>)
+//   singleQuote: true,
+//   // 6.object对象中key值是否加引号(quoteProps: "<as-needed|consistent|preserve>")as-needed只有在需求要的情况下加引号,consistent是有一个需要引号就统一加,preserve是保留用户输入的引号
+//   quoteProps: 'as-needed',
+//   // 7.在jsx文件中的引号需要单独设置(jsxSingleQuote: <bool>)
+//   jsxSingleQuote: false,
+//   // 8.尾部逗号设置,es5是尾部逗号兼容es5,none就是没有尾部逗号,all是指所有可能的情况,需要node8和es2017以上的环境。(trailingComma: "<es5|none|all>")
+//   trailingComma: 'es5',
+//   // 9.object对象里面的key和value值和括号间的空格(bracketSpacing: <bool>)
+//   bracketSpacing: true,
+//   // 10.jsx标签多行属性写法时,尖括号是否另起一行(jsxBracketSameLine: <bool>)
+//   jsxBracketSameLine: false,
+//   // 11.箭头函数单个参数的情况是否省略括号,默认always是总是带括号(arrowParens: "<always|avoid>")
+//   arrowParens: 'always',
+//   // 12.range是format执行的范围,可以选执行一个文件的一部分,默认的设置是整个文件(rangeStart: <int>  rangeEnd: <int>)
+//   rangeStart: 0,
+//   rangeEnd: Infinity,
+//   // 18. vue script和style标签中是否缩进,开启可能会破坏编辑器的代码折叠
+//   vueIndentScriptAndStyle: false,
+//   // 19.    endOfLine: "<lf|crlf|cr|auto>" 行尾换行符,默认是lf,
+//   endOfLine: 'lf',
+//   // 20.embeddedLanguageFormatting: "off",默认是auto,控制被引号包裹的代码是否进行格式化
+//   embeddedLanguageFormatting: 'off',
+// }
+
+// // 14. requirePragma: <bool>,格式化有特定开头编译指示的文件 比如下面两种
+// /**
+//  * @prettier
+//  */
+// // or
+// /**
+//  * @format
+//  */
+
+// // 15.insertPragma: <bool> 自当插入pragma到已经完成的format的文件开头
+
+// // 16. proseWrap: "<always|never|preserve>" 文章换行,默认情况下会对你的markdown文件换行进行format会控制在printwidth以内
+
+// // 13. 指定parser,因为pretter会自动选择,所以一般不用指定(parser: "<string>"  parser: require("./my-parser"))
+// // "babel" (via @babel/parser) Named "babylon" until v1.16.0
+// // "babel-flow" (same as "babel" but enables Flow parsing explicitly to avoid ambiguity) First available in v1.16.0
+// // "babel-ts" (similar to "typescript" but uses Babel and its TypeScript plugin) First available in v2.0.0
+// // "flow" (via flow-parser)
+// // "typescript" (via @typescript-eslint/typescript-estree) First available in v1.4.0
+// // "espree" (via espree) First available in v2.2.0
+// // "meriyah" (via meriyah) First available in v2.2.0
+// // "css" (via postcss-scss and postcss-less, autodetects which to use) First available in v1.7.1
+// // "scss" (same parsers as "css", prefers postcss-scss) First available in v1.7.1
+// // "less" (same parsers as "css", prefers postcss-less) First available in v1.7.1
+// // "json" (via @babel/parser parseExpression) First available in v1.5.0
+// // "json5" (same parser as "json", but outputs as json5) First available in v1.13.0
+// // "json-stringify" (same parser as "json", but outputs like JSON.stringify) First available in v1.13.0
+// // "graphql" (via graphql/language) First available in v1.5.0
+// // "markdown" (via remark-parse) First available in v1.8.0
+// // "mdx" (via remark-parse and @mdx-js/mdx) First available in v1.15.0
+// // "html" (via angular-html-parser) First available in 1.15.0
+// // "vue" (same parser as "html", but also formats vue-specific syntax) First available in 1.10.0
+// // "angular" (same parser as "html", but also formats angular-specific syntax via angular-estree-parser) First available in 1.15.0
+// // "lwc" (same parser as "html", but also formats LWC-specific syntax for unquoted template attributes) First available in 1.17.0
+// // "yaml" (via yaml and yaml-unist-parser) First available in 1.14.0
+
+// // 17. htmlWhitespaceSensitivity: "<css|strict|ignore>" html中的空格敏感性
+
+// // 针对不同文件或目录设置不同配置的方法,json格式例子
+// // {
+// //   "semi": false,
+// //   "overrides": [
+// //     {
+// //       "files": "*.test.js",
+// //       "options": {
+// //         "semi": true
+// //       }
+// //     },
+// //     {
+// //       "files": ["*.html", "legacy/**/*.js"],
+// //       "options": {
+// //         "tabWidth": 4
+// //       }
+// //     }
+// //   ]
+// // }
+

+ 28 - 4
src/api/mockData/checkout.qh.response.json

@@ -26,7 +26,7 @@
         "name": "6元券",
         "expirationDate": "2023-01-08 13:15:11",
         "discountFee": 6,
-        "superpositionrule": 3,
+        "superpositionrule": "1",
         "defaultSelected": true
       },
       {
@@ -34,15 +34,39 @@
         "name": "6元券",
         "expirationDate": "2023-01-08 13:15:11",
         "discountFee": 6,
-        "superpositionrule": 3,
-        "defaultSelected": true
+        "superpositionrule": "1",
+        "defaultSelected": false
       },
       {
         "code": "couponCode3",
         "name": "5元券",
         "expirationDate": "2023-01-08 13:15:11",
         "discountFee": 5,
-        "superpositionrule": 3,
+        "superpositionrule": "1",
+        "defaultSelected": false
+      },
+      {
+        "code": "couponCode4",
+        "name": "5元券",
+        "expirationDate": "2023-01-08 13:15:11",
+        "discountFee": 5,
+        "superpositionrule": "2",
+        "defaultSelected": false
+      },
+      {
+        "code": "couponCode5",
+        "name": "5元券",
+        "expirationDate": "2023-01-08 13:15:11",
+        "discountFee": 5,
+        "superpositionrule": "2",
+        "defaultSelected": false
+      },
+      {
+        "code": "couponCode6",
+        "name": "5元券",
+        "expirationDate": "2023-01-08 13:15:11",
+        "discountFee": 5,
+        "superpositionrule": "2",
         "defaultSelected": false
       }
     ]

+ 29 - 34
src/pages/parkingFee/components/base/parkingFeeCoupon.vue

@@ -1,25 +1,17 @@
 <template>
   <scroll-view scroll-y="true" class="scroll-Y">
-<!--    <wx-points-commit ref="wxPointsCommit"></wx-points-commit>-->
+    <!--    <wx-points-commit ref="wxPointsCommit"></wx-points-commit>-->
 
-    <van-checkbox-group @change="checkboxChange" v-model="checkedCouponList" checked-color="#EA3323">
-      <div class="card-list">
-        <div
-          class="item"
-          v-for="(item, index) in list"
-          :key="index"
-          :class="index == list.length - 1 ? 'mgb-110' : ''"
-        >
+    <van-checkbox-group :value="checkedCouponList" checked-color="#EA3323">
+      <div class="card-list" v-if="couponList.length">
+        <div class="item" v-for="(item, index) in couponList" :key="index" :class="index === couponList.length - 1 ? 'mgb-110' : ''">
           <div class="item-image cro">
             <div class="cro_right_top"></div>
             <div class="cro_right_bottom"></div>
             <div class="img">
               <div>
                 <span style="font-weight: bold; color: #ed1c24">¥</span>
-                <span
-                  style="font-weight: bold; color: #ed1c24; font-size: 50px"
-                  >{{ item.value }}</span
-                >
+                <span style="font-weight: bold; color: #ed1c24; font-size: 50px">{{ item.discountFee }}</span>
               </div>
               <span style="color: #989898; font-size: 30px">停车劵</span>
             </div>
@@ -28,50 +20,43 @@
             <div class="cro_left_top"></div>
             <div class="cro_left_bottom"></div>
             <div class="content">
-              <span class="h3">{{ item.ticketName }}</span>
-              <span class="span">有效期至 {{ item.cancelEndTime }}</span>
+              <span class="h3">{{ item.name }}</span>
+              <span class="span">有效期至 {{ item.expirationDate }}</span>
             </div>
             <div class="erwm_box">
-              <van-checkbox
-                :name="index"
-                color="#fff"
-                :disabled="item.disabled"
-                :checked="item.checked"
-              />
+              <van-checkbox :name="`coupon${index}`" color="#fff" :disabled="item.disabled" @click="checkboxItemChange(`coupon${index}`, index)" />
             </div>
           </div>
         </div>
       </div>
     </van-checkbox-group>
     <div class="flewx">
-      <div class="flewx-content"
-        >应付<span style="color: red; font-size: 32px; padding-left: 20px">{{
-          actualFee | currency
-        }}</span>
+      <div class="flewx-content">
+        应付<span style="color: red; font-size: 32px; padding-left: 20px">{{ actualPayFee | currency }}</span>
-        <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px"
-          >已优惠{{ discountFee | currency }}元</span
-        ></div
-      >
+        <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px">已优惠{{ usingTotalDiscount | currency }}元</span>
+      </div>
       <div
         :class="{
           flewx_index3: true,
           blue_flewx_index3: custTypeId === 1,
           green_flewx_index3: custTypeId === 2,
-          'btn-disabled': !parkInfo.servicefee,
+          'btn-disabled': !checkedCouponList.servicefee,
         }"
         @click="confirm"
-        >确定</div
       >
+        确定
+      </div>
     </div>
   </scroll-view>
 </template>
 
 <script>
-import parkingFeeCouponJs from '../../mixins/parkingFeeCoupon'
+import parkingFeeCouponJs from '../../mixins/parkingFeeCoupon';
+
 export default {
-  mixins:[parkingFeeCouponJs]
-}
+  mixins: [parkingFeeCouponJs],
+};
 </script>
 
 <style lang="less" scoped>
@@ -83,6 +68,7 @@ export default {
   height: 100vh;
   background: #f1f1f1;
 }
+
 .card-list {
   width: 100%;
   display: flex;
@@ -186,6 +172,7 @@ export default {
     }
   }
 }
+
 // 凹圆角
 .cro_left_top,
 .cro_left_bottom,
@@ -238,9 +225,11 @@ export default {
   border-left: 1px solid #f2f2f2;
   border-right: 1px solid #f2f2f2;
 }
+
 .mgb-110 {
   margin-bottom: 110px !important;
 }
+
 .flewx {
   width: 100%;
   height: 100px;
@@ -254,10 +243,12 @@ export default {
   // padding-bottom: constant(safe-area-inset-bottom);
   // padding-bottom: env(safe-area-inset-bottom);
   padding-bottom: 20px;
+
   .flewx-content {
     position: absolute;
     left: 16px;
   }
+
   .flewx_index3 {
     width: 150px;
     height: 70px;
@@ -271,18 +262,22 @@ export default {
     position: absolute;
     right: 16px;
   }
+
   .blue_flewx_index3 {
     .color-background-color('blue');
   }
+
   .green_flewx_index3 {
     .color-background-color('green');
   }
 }
+
 /deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
   background-color: red !important;
   border-radius: 50% !important;
   border: 1px solid red;
 }
+
 /deep/ checkbox .wx-checkbox-input {
   border-radius: 50% !important;
 }

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

@@ -12,120 +12,70 @@
             'bgc-green': custTypeId === 2,
           }"
         >
-          {{ parkInfo.carno | formatCarno }}
+          {{ orderDetail.parkingRecord.vehicleNo | formatCarno }}
         </div>
         <div class="warp_index">
           <div>停车场</div>
-          <div class="warp_index_color">{{ parkInfo.parkname }}</div>
+          <div class="warp_index_color">{{ orderDetail.parkInfo.parkname }}</div>
         </div>
         <div class="warp_index">
           <div>入场时间</div>
-          <div class="warp_index_color">{{ parkInfo.entertime }}</div>
+          <div class="warp_index_color">{{ orderDetail.parkInfo.entertime }}</div>
         </div>
         <div class="warp_index">
           <div>已停车时长</div>
-          <div class="warp_index_color">{{ parkingTime }}</div>
+          <div class="warp_index_color">{{ orderDetail.parkingRecord.serviceMin }}</div>
         </div>
         <div class="warp_index">
           <div>应缴</div>
           <div class="warp_index_color">
-            {{ (parkInfo.servicefee / 100) | currency }}
+            {{ (orderDetail.parkingRecord.totalFee / 100) | currency }}
           </div>
         </div>
       </div>
-      <div class="warp" v-if="parkFee.parkInfoEntity">
-        <div
-          class="warp_index warp_index_da"
-          v-if="
-            parkFee.parkInfoEntity.consumeReduce ||
-            parkFee.parkInfoEntity.memberLevelReduce
-          "
-        >
+      <div class="warp">
+        <div class="warp_index warp_index_da" v-if="enableConsume">
           <div>停车优惠</div>
           <div class="warp_index_color" @click="discounts">
-            <div
-              style="margin-right: 10px"
-              :class="hasDiscount ? 'text-red' : ''"
-            >
+            <div style="margin-right: 10px" :class="discountDesc === '暂无可用优惠' ? '' : 'text-red'">
               {{ discountDesc }}
             </div>
-            <img
-              style="width: 26px; height: 26px"
-              :src="`${require('../../static/images/arrows.png')}`"
-            />
+            <img style="width: 26px; height: 26px" :src="`${require('../../static/images/arrows.png')}`" />
           </div>
         </div>
-        <div
-          class="warp_index warp_index_da"
-          v-if="
-            parkFee.parkInfoEntity.isuseintegral === 1 &&
-            parkFee.discountKind === 7
-          "
-        >
+        <div class="warp_index warp_index_da" v-if="false && parkFee.parkInfoEntity.isuseintegral === 1 && parkFee.discountKind === 7">
           <div>新会员积分优惠</div>
           <div class="warp_index_color" @click="newToggle('bottom')">
-            <div
-              style="margin-right: 10px"
-              :class="bonusCopy >= integralNew || durationNew ? 'text-red' : ''"
-            >
+            <div style="margin-right: 10px" :class="bonusCopy >= integralNew || durationNew ? 'text-red' : ''">
               {{ integralDescNew }}
             </div>
-            <img
-              style="width: 26px; height: 26px"
-              :src="`${require('../../static/images/arrows.png')}`"
-            />
+            <img style="width: 26px; height: 26px" :src="`${require('../../static/images/arrows.png')}`" />
           </div>
         </div>
-        <div
-          class="warp_index warp_index_da"
-          v-if="parkFee.parkInfoEntity.isuseintegral === 1"
-        >
+        <div class="warp_index warp_index_da" v-if="enablePoints">
           <div>积分减免</div>
-          <div class="warp_index_color" @click="toggle('bottom')">
-            <div
-              style="margin-right: 10px"
-              :class="bonusCopy >= integral || duration ? 'text-red' : ''"
-            >
+          <div class="warp_index_color" @click="showPointsMathPopup('bottom')">
+            <div style="margin-right: 10px" :class="integralDesc === '今日已达上限' ? 'text-disable' : 'text-red'">
               {{ integralDesc }}
             </div>
-            <img
-              style="width: 26px; height: 26px"
-              :src="`${require('../../static/images/arrows.png')}`"
-            />
+            <img style="width: 26px; height: 26px" :src="`${require('../../static/images/arrows.png')}`" />
           </div>
         </div>
-        <div
-          class="warp_index warp_index_da"
-          v-if="parkFee.parkInfoEntity.isuseticket === 1"
-        >
+        <div class="warp_index warp_index_da" v-if="enableCoupon">
           <div>优惠劵</div>
           <div class="warp_index_color" @click="coupon">
-            <div
-              style="margin-right: 10px"
-              :class="couponCount > 0 ? 'text-red' : ''"
-            >
+            <div style="margin-right: 10px" :class="maxOneDayCoupons > 0 ? 'text-red' : 'text-disable'">
               {{ couponDesc }}
             </div>
-            <img
-              style="width: 26px; height: 26px"
-              :src="`${require('../../static/images/arrows.png')}`"
-            />
+            <img style="width: 26px; height: 26px" :src="`${require('../../static/images/arrows.png')}`" />
           </div>
         </div>
         <!-- 纸质券 -->
-        <div
-          class="warp_index warp_index_da"
-          v-if="parkFee.parkInfoEntity.papercoupons === 1 || isShowPapercoupons"
-        >
+        <div class="warp_index warp_index_da" v-if="enablePaperCoupons">
           <div>纸质优惠劵</div>
           <div class="warp_index_color" @click="paperCoupon">
-            <div style="margin-right: 10px" class="text-red">
-              扫描纸质优惠劵二维码
-            </div>
-            <img
-              style="width: 26px; height: 26px"
-              :src="`${require('../../static/images/arrows.png')}`"
-            />
+            <div style="margin-right: 10px" class="text-red">扫描纸质优惠劵二维码</div>
+            <img style="width: 26px; height: 26px" :src="`${require('../../static/images/arrows.png')}`" />
           </div>
         </div>
         <div
@@ -136,60 +86,34 @@
           }"
         >
           <div>优惠金额:</div>
-          <div class="warp_index_color" style="color: #ff0000">
-            -{{ discountTotalFee | currency }}
-          </div>
+          <div class="warp_index_color" style="color: #ff0000">-{{ usingTotalDiscount | currency }}</div>
         </div>
         <div :class="{ warp_index: true, color_warp_index: custTypeId !== 0 }">
           <div>应付金额:</div>
           <div class="warp_index_color" style="color: #ff0000">
-            {{ actualFee | currency }}
+            {{ actualPayFee | currency }}
           </div>
         </div>
       </div>
-      <div
-        class="top_content"
-        v-if="parkFee.parkInfoEntity && parkFee.parkInfoEntity.payinstruction"
-      >
+      <div class="top_content" v-if="orderDetail.parkInfo && orderDetail.parkInfo.description">
         <div class="title_box">
           <span class="btn">缴费说明</span>
         </div>
-        <div class="info" :class="!isShow ? 'is-show' : ''">
-          <span>{{ parkFee.parkInfoEntity.payinstruction }}</span>
-        </div>
-        <div
-          class="top-down"
-          @click="togglePayinstruction"
-          v-if="!isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
-        >
-          ︾
-        </div>
-        <div
-          class="top-down"
-          @click="togglePayinstruction"
-          v-if="isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
-        >
-          ︽
+        <div class="info" :class="!isShowDescription ? 'is-show' : ''">
+          <span>{{ orderDetail.parkInfo.description }}</span>
         </div>
+        <div class="top-down" @click="togglePayinstruction" v-if="!isShowDescription && orderDetail.parkInfo.description.length > 60">︾</div>
+        <div class="top-down" @click="togglePayinstruction" v-if="isShowDescription && orderDetail.parkInfo.description.length > 60">︽</div>
       </div>
       <div style="height: 130px; width: 100%"></div>
     </div>
     <div class="flewx">
       <div class="flewx-content">
-        应付<span style="color: #ff0000; font-size: 32px; padding-left: 20px">{{
-          actualFee | currency
-        }}</span>
+        应付<span style="color: #ff0000; font-size: 32px; padding-left: 20px">{{ actualPayFee | currency }}</span>
-        <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px"
-          >已优惠{{ discountTotalFee | currency }}元</span
-        >
+        <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px">已优惠{{ usingTotalDiscount | currency }}元</span>
         <div class="count-down-box">
-          <van-count-down
-            v-if="payCarno"
-            format="mm:ss"
-            :time="refreshTime * 1000"
-            @finish="resetCountDown()"
-          />
+          <van-count-down v-if="orderDetail.parkingRecord.vehicleNo" format="mm:ss" :time="refreshTime * 1000" @finish="resetCountDown()" />
           <span class="desc">后同步最新费用</span>
         </div>
       </div>
@@ -205,41 +129,27 @@
         支付
       </div>
     </div>
-    <van-popup
-      v-model="popup"
-      position="bottom"
-      :animation="false"
-      :maskClick="false"
-      :close-on-click-overlay="false"
-    >
+    <van-popup v-model="popup" position="bottom" :animation="false" :maskClick="false" :close-on-click-overlay="false">
       <div class="popue_box">
         <div class="popue_box_index1">积分减免</div>
         <div class="popue_box_index">
           <div>减免规则</div>
-          <div style="color: #989898">
-            {{ integral }}积分抵扣{{
-              parkMallCode === 5 ? integralToValue + '元' : '1小时'
-            }}
-          </div>
+          <div style="color: #989898">{{ pointsPerHour }}积分抵扣{{ orderDetail.parkInfo.parkMallCode === 5 ? integralToValue + '元' : '1小时' }}</div>
         </div>
         <div class="popue_box_index">
           <div style="font-weight: 700">可用积分</div>
-          <div style="color: #ed1c24">{{ bonus }}分</div>
+          <div style="color: #ed1c24">{{ available }}分</div>
         </div>
         <div class="popue_box_index">
-          <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
+          <div>抵扣{{ orderDetail.parkInfo.parkMallCode === 5 ? '金额' : '时长' }}</div>
           <div class="popue_box_index" style="width: 325px">
             <div class="popue_box_index4_xs">
-              <div class="popue_box_index4_xs_index1" @click="durationMinus">
-                -
-              </div>
-              <div class="popue_box_index4_xs_index2">{{ duration }}</div>
-              <div class="popue_box_index4_xs_index3" @click="durationAdd">
-                +
-              </div>
+              <div class="popue_box_index4_xs_index1" @click="$store.dispatch('order/pointsMath',{type: 'minus'})">-</div>
+              <div class="popue_box_index4_xs_index2">{{ pointsTime }}</div>
+              <div class="popue_box_index4_xs_index3" @click="$store.dispatch('order/pointsMath',{type: 'add'})">+</div>
             </div>
             <div style="color: #808080">
-              {{ parkMallCode === 5 ? '元' : '小时' }}
+              {{ orderDetail.parkInfo.parkMallCode === 5 ? '元' : '小时' }}
             </div>
           </div>
         </div>
@@ -250,7 +160,7 @@
               blue_popue_box_index4_by: custTypeId === 1,
               green_popue_box_index4_by: custTypeId === 2,
             }"
-            @click="cancel(1)"
+            @click="cancelPointsMathPopup()"
           >
             取消
           </div>
@@ -260,20 +170,14 @@
               blue_popue_box_index4_by1: custTypeId === 1,
               green_popue_box_index4_by1: custTypeId === 2,
             }"
-            @click="confirm(1)"
+            @click="savePointsMathPopup()"
           >
             确定
           </div>
         </div>
       </div>
     </van-popup>
-    <van-popup
-      v-model="newpopup"
-      position="bottom"
-      :animation="false"
-      :maskClick="false"
-      :close-on-click-overlay="false"
-    >
+    <van-popup v-if="false" v-model="newpopup" position="bottom" :animation="false" :maskClick="false" :close-on-click-overlay="false">
       <div class="popue_box">
         <div class="popue_box_index1">积分优惠减免</div>
         <div class="popue_box_index">
@@ -285,19 +189,15 @@
           <div style="color: #ed1c24">{{ bonus }}分</div>
         </div>
         <div class="popue_box_index">
-          <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
+          <div>抵扣{{ orderDetail.parkInfo.parkMallCode === 5 ? '金额' : '时长' }}</div>
           <div class="popue_box_index" style="width: 325px">
             <div class="popue_box_index4_xs">
-              <div class="popue_box_index4_xs_index1" @click="durationMinusNew">
-                -
-              </div>
+              <div class="popue_box_index4_xs_index1" @click="durationMinusNew">-</div>
               <div class="popue_box_index4_xs_index2">{{ durationNew }}</div>
-              <div class="popue_box_index4_xs_index3" @click="durationAddNew">
-                +
-              </div>
+              <div class="popue_box_index4_xs_index3" @click="durationAddNew">+</div>
             </div>
             <div style="color: #808080">
-              {{ parkMallCode === 5 ? '元' : '小时' }}
+              {{ orderDetail.parkInfo.parkMallCode === 5 ? '元' : '小时' }}
             </div>
           </div>
         </div>

+ 11 - 33
src/pages/parkingFee/components/officeBlue/parkingFeeCoupon.vue

@@ -2,9 +2,7 @@
   <div>
     <scroll-view scroll-y="true" class="scroll-Y">
       <div class="parkingFeeCoupon">
-        <van-checkbox-group
-          :value="checkedCouponList"
-        >
+        <van-checkbox-group :value="checkedCouponList">
           <div class="card-list" v-if="couponList.length">
             <div class="item" v-for="(item, index) in couponList" :key="index">
               <div class="item-image cro">
@@ -26,13 +24,7 @@
                   <span class="span">有效期至 {{ item.expirationDate }}</span>
                 </div>
                 <div class="erwm_box">
-                  <van-checkbox
-                    color="#fff"
-                    @click="checkboxItemChange(`coupon${index}`, index)"
-                    checked-color="#064C8A"
-                    :disabled="item.disabled"
-                    :name="`coupon${index}`"
-                  />
+                  <van-checkbox color="#fff" @click="checkboxItemChange(`coupon${index}`, index)" checked-color="#064C8A" :disabled="item.disabled" :name="`coupon${index}`" />
                 </div>
               </div>
             </div>
@@ -43,10 +35,7 @@
           </div>
         </van-checkbox-group>
         <!-- 为避免冲突,小程序 和 H5 跳转 CRM小程序:积分商城 的逻辑分开处理 -->
-        <div
-          :class="['guide-box', 'mgb-110', !couponList?.length && 'flex-bottom']"
-          v-if="platform === 'miniprogram'"
-        >
+        <div :class="['guide-box', 'mgb-110', !couponList?.length && 'flex-bottom']" v-if="platform === 'miniprogram'">
           <div class="guide-title">优惠券兑换指导</div>
           <div class="guide-desc" @click="navigateToMiniProgram">
             停车优惠券可直接使用,若您还没有兑换或继续兑换,可前往
@@ -54,23 +43,12 @@
             进行兑换
           </div>
         </div>
-        <div
-          :class="['guide-box', 'mgb-110', !couponList?.length && 'flex-bottom']"
-          v-if="platform === 'micromessenger'"
-        >
+        <div :class="['guide-box', 'mgb-110', !couponList?.length && 'flex-bottom']" v-if="platform === 'micromessenger'">
           <div class="guide-title">优惠券兑换指导</div>
           <div class="guide-desc">
             停车优惠券可直接使用,若您还没有兑换或继续兑换,可前往
             <span class="guide-mini">嘉里中心小程序>积分商城</span>
-            <wx-open-launch-weapp
-              username="gh_0bd6a97b6d38"
-              id="launch-btn"
-              :path="`pages/pointsMall/pointsMall.html${launchPath}`"
-              class="wx-open-launch-weapp"
-              :env-version="envVersion"
-              @launch="launchFn"
-              @error="launchErrorFn"
-            >
+            <wx-open-launch-weapp username="gh_0bd6a97b6d38" id="launch-btn" :path="`pages/pointsMall/pointsMall.html${launchPath}`" class="wx-open-launch-weapp" :env-version="envVersion" @launch="launchFn" @error="launchErrorFn">
               <script type="text/wxtag-template">
                 <span style="white-space: nowrap;display: inline-block;color: transparent;text-decoration: underline;margin: 0 5px;font-size: 14PX;"></span>
               </script>
@@ -87,9 +65,7 @@
           <div style="color: #333333; font-size: 32px; padding-left: 5px">
             {{ actualPayFee | currency }}
           </div>
-          <div style="color: #ee4d3f; font-size: 24px; padding-left: 5px">
-            已优惠{{ usingTotalDiscount | currency }}元
-          </div>
+          <div style="color: #ee4d3f; font-size: 24px; padding-left: 5px">已优惠{{ usingTotalDiscount | currency }}元</div>
         </div>
       </div>
       <div
@@ -108,10 +84,11 @@
 </template>
 
 <script>
-import parkingFeeCouponJs from '../../mixins/parkingFeeCoupon'
+import parkingFeeCouponJs from '../../mixins/parkingFeeCoupon';
+
 export default {
-  mixins:[parkingFeeCouponJs]
-}
+  mixins: [parkingFeeCouponJs],
+};
 </script>
 
 <style lang="less" scoped>
@@ -332,6 +309,7 @@ export default {
     color: #999999;
     line-height: 42px;
     position: relative;
+
     .guide-mini {
       display: inline-block;
       color: #064c8a;

+ 3 - 2
src/pages/parkingFee/mixins/parkingFeeCoupon.js

@@ -207,7 +207,7 @@ export default {
       }
 
       // 选中状态赋值
-      this.couponList.forEach((e, i) => {
+      this.couponList = this.couponList.map((e, i) => {
         if (this.checkedCouponList.findIndex((c) => c === `coupon${i}`) !== -1) {
           e.checked = true;
         } else {
@@ -215,7 +215,7 @@ export default {
         }
         // superpositionrule  叠加使用规则 (1不可叠加,2仅同类型可叠加,3可叠加)
         if (item.superpositionrule === "1") {
-          if (e.couponCode !== item.couponCode) {
+          if (e.code !== item.code) {
             e.disabled = true;
           }
         } else if (item.superpositionrule === "2") {
@@ -249,6 +249,7 @@ export default {
           // 类型3可叠加
           e.disabled = false;
         }
+        return e
       });
     },
     // 是否选中

+ 1 - 1
src/store/index.js

@@ -36,7 +36,7 @@ const store = new Vuex.Store({
     member: {},
     userInfo: {},
     mobile: '',
-    custTypeId: 3, // 0 默认版本,1 上海静安 2 上海浦东 3 KIP:默认版本
+    custTypeId: 0, // 0 默认版本,1 上海静安 2 上海浦东 3 KIP:默认版本
     paramsScene: {},
     parkFee: {},
     marketList: [],