Commit 455431ac076f6b833fea1c1ceac3a64f54c1560f
1 parent
eb4a88b5
欠费缴纳--费用支付
Showing
8 changed files
with
86 additions
and
3 deletions
src/assets/images/blackBG.png
0 → 100644
5.57 KB
src/assets/images/blueBG.png
0 → 100644
5.6 KB
src/assets/images/greenBG.png
0 → 100644
5.92 KB
src/assets/images/whiteBG.png
0 → 100644
5.68 KB
src/assets/images/yellowBG.png
0 → 100644
5.76 KB
src/components/orderPay.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <div class="car-wrap"> | ||
| 4 | + <div class="carBG"> | ||
| 5 | + <p>蒙DT849</p> | ||
| 6 | + <p>D36.0123</p> | ||
| 7 | + </div> | ||
| 8 | + </div> | ||
| 9 | + | ||
| 10 | + </div> | ||
| 11 | +</template> | ||
| 12 | + | ||
| 13 | +<script> | ||
| 14 | +export default { | ||
| 15 | + name: 'orderPay' | ||
| 16 | +} | ||
| 17 | +</script> | ||
| 18 | + | ||
| 19 | +<style scoped lang="scss"> | ||
| 20 | + .car-wrap { | ||
| 21 | + padding: 7px 7px; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + .carBG { | ||
| 25 | + width: 100%; | ||
| 26 | + height: 130px; | ||
| 27 | + background: url("../assets/images/yellowBG.png") no-repeat; | ||
| 28 | + background-size: 100% 100%; | ||
| 29 | + } | ||
| 30 | +</style> |
src/components/parkRecord.vue
| @@ -87,14 +87,14 @@ | @@ -87,14 +87,14 @@ | ||
| 87 | 87 | ||
| 88 | <div class="history-footer"> | 88 | <div class="history-footer"> |
| 89 | <p class="statistical-data">您已选中 | 89 | <p class="statistical-data">您已选中 |
| 90 | - <span>3</span>笔交易 | ||
| 91 | - 合计:<span>¥ 50.00</span> | 90 | + <span>{{historyCheckedLen}}</span>笔交易 |
| 91 | + 合计:¥ <span>{{historyCheckedMon/100}}.00</span> | ||
| 92 | </p> | 92 | </p> |
| 93 | <div class="opration-wrap"> | 93 | <div class="opration-wrap"> |
| 94 | <p class="check-btn" :class="{isAllChecked:allChecked}" | 94 | <p class="check-btn" :class="{isAllChecked:allChecked}" |
| 95 | @click="checkedAll" | 95 | @click="checkedAll" |
| 96 | >全选</p> | 96 | >全选</p> |
| 97 | - <p class="settle-btn">清缴欠费</p> | 97 | + <p class="settle-btn" @click="toPayPage">清缴欠费</p> |
| 98 | </div> | 98 | </div> |
| 99 | </div> | 99 | </div> |
| 100 | 100 | ||
| @@ -110,6 +110,15 @@ | @@ -110,6 +110,15 @@ | ||
| 110 | <div v-else class="noRecord"> | 110 | <div v-else class="noRecord"> |
| 111 | 暂无记录 | 111 | 暂无记录 |
| 112 | </div> | 112 | </div> |
| 113 | + | ||
| 114 | + <modal-alert ref="alert"> | ||
| 115 | + <div class="trave-tip-content txt-l" slot="content"> | ||
| 116 | + <div class="confirm-text"> | ||
| 117 | + <p>请至少选择一笔记录</p> | ||
| 118 | + </div> | ||
| 119 | + </div> | ||
| 120 | + <span slot="button">知道了</span> | ||
| 121 | + </modal-alert> | ||
| 113 | </div> | 122 | </div> |
| 114 | </template> | 123 | </template> |
| 115 | 124 | ||
| @@ -133,8 +142,12 @@ export default { | @@ -133,8 +142,12 @@ export default { | ||
| 133 | {money:400,checked:false, id: 4}, | 142 | {money:400,checked:false, id: 4}, |
| 134 | ] , | 143 | ] , |
| 135 | allChecked:false, // 全部选择事件 | 144 | allChecked:false, // 全部选择事件 |
| 145 | + historyCheckedLen:0, //选中了几笔交易 | ||
| 146 | + historyCheckedMon: 0, //选中了待缴纳的金额 | ||
| 136 | } | 147 | } |
| 137 | }, | 148 | }, |
| 149 | + mounted(){ | ||
| 150 | + }, | ||
| 138 | created() { | 151 | created() { |
| 139 | this.carNumber = this.$route.query.carNumber // 获取车牌号 | 152 | this.carNumber = this.$route.query.carNumber // 获取车牌号 |
| 140 | console.log(this.carNumber) | 153 | console.log(this.carNumber) |
| @@ -145,9 +158,43 @@ export default { | @@ -145,9 +158,43 @@ export default { | ||
| 145 | }, | 158 | }, |
| 146 | chooseHandle(i, index) { // 历史欠费单个选择事件 | 159 | chooseHandle(i, index) { // 历史欠费单个选择事件 |
| 147 | i.checked = !i.checked | 160 | i.checked = !i.checked |
| 161 | + let me = this | ||
| 162 | + if(i.checked ){ //单个选中 | ||
| 163 | + me.historyCheckedLen ++ | ||
| 164 | + me.historyCheckedMon += i.money | ||
| 165 | + }else{ //单个不选中 | ||
| 166 | + me.historyCheckedLen -- | ||
| 167 | + me.historyCheckedMon -= i.money | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + | ||
| 148 | }, | 171 | }, |
| 149 | checkedAll() { // 全选选择事件 | 172 | checkedAll() { // 全选选择事件 |
| 150 | this.allChecked = !this.allChecked | 173 | this.allChecked = !this.allChecked |
| 174 | + if(this.allChecked){ //全选 | ||
| 175 | + let me = this | ||
| 176 | + me.historyCheckedMon = 0 | ||
| 177 | + this.historyList.forEach(function(item){ | ||
| 178 | + item.checked = true; | ||
| 179 | + me.historyCheckedMon += item.money | ||
| 180 | + }); | ||
| 181 | + this.historyCheckedLen = this.historyList.length | ||
| 182 | + }else{ //反选 | ||
| 183 | + | ||
| 184 | + this.historyList.forEach(function(item){ | ||
| 185 | + item.checked = false; | ||
| 186 | + | ||
| 187 | + }); | ||
| 188 | + this.historyCheckedLen = 0 | ||
| 189 | + this.historyCheckedMon = 0 | ||
| 190 | + } | ||
| 191 | + }, | ||
| 192 | + toPayPage() { //缴纳费用 | ||
| 193 | + if(this.historyCheckedLen==0){ | ||
| 194 | + this.$refs.alert.open() | ||
| 195 | + return | ||
| 196 | + } | ||
| 197 | + this.$router.push({path:'orderPay'}) | ||
| 151 | } | 198 | } |
| 152 | }, | 199 | }, |
| 153 | filters: { | 200 | filters: { |
src/router/index.js
| @@ -22,6 +22,12 @@ export default new Router({ | @@ -22,6 +22,12 @@ export default new Router({ | ||
| 22 | name: 'parkRecord', | 22 | name: 'parkRecord', |
| 23 | component: parkRecord | 23 | component: parkRecord |
| 24 | }, | 24 | }, |
| 25 | + { | ||
| 26 | + path: '/orderPay', | ||
| 27 | + name: 'orderPay', | ||
| 28 | + component: () => import("@/components/orderPay.vue") | ||
| 29 | + }, | ||
| 30 | + | ||
| 25 | 31 | ||
| 26 | ] | 32 | ] |
| 27 | }) | 33 | }) |