|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <common ref="common" @asynCallBack="asynCallBack"></common>
|
|
|
+ <common-merchant ref="common" @asynCallBack="asynCallBack"></common-merchant>
|
|
|
<top-header :pageTitle="pageTitle"></top-header>
|
|
|
|
|
|
<div class="mui-content vongi-car-dj">
|
|
@@ -9,35 +9,37 @@
|
|
|
<img class="mui-media-object" src="~$project/assets/img/antFill-car.png">
|
|
|
<div class="mui-media-body ">
|
|
|
车牌号码
|
|
|
- <p class='mui-h2'>鄂D 88888</p>
|
|
|
+ <p class='mui-h2' v-text="detail.carNumber"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <button class="mui-btn mui-btn-outlined">修改</button>
|
|
|
+ <button class="mui-btn mui-btn-outlined" @click="goToSearch">修改</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="vongi-car-over">
|
|
|
<h1>- 停车中 -</h1>
|
|
|
<div class="vongi-car-over-line"></div>
|
|
|
- <h4>协议商户:金盆洗脚城</h4>
|
|
|
- <h4>停车位置:金盆岭停车场</h4>
|
|
|
- <h4>入场时间:07-12 13:51</h4>
|
|
|
- <h4>已停时长:14分钟</h4>
|
|
|
+ <h4>协议商户:{{detail.merchantName}}</h4>
|
|
|
+ <h4>停车位置:{{detail.parkingName}}</h4>
|
|
|
+ <h4>入场时间:{{detail.inParkingTime}}</h4>
|
|
|
+ <h4>已停时长:{{detail.parkingTime}}</h4>
|
|
|
</div>
|
|
|
<div class="vongi-car-juan flew-items">
|
|
|
<div class="car-juan">
|
|
|
- <h2>¥<span class="mui-h1">5</span></h2>
|
|
|
+ <h2>¥<span class="mui-h1" v-text="detail.discountMoney"></span></h2>
|
|
|
<h6>抵用券</h6>
|
|
|
</div>
|
|
|
<div class="car-juan-text">
|
|
|
- <h4 class="mui-ellipsis">[停车]5元停车抵用券</h4>
|
|
|
- <p class="colorf8b155">仅限 2021.3.4 当日有效</p>
|
|
|
+ <h4 class="mui-ellipsis">[停车]{{detail.discountMoney}}元停车抵用券</h4>
|
|
|
+ <p class="colorf8b155">仅限 {{today}} 当日有效</p>
|
|
|
<p>本抵用券无法叠加使用</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="fyy-footer">
|
|
|
- <div class="bindfyy-btn"><button type="submit" class="mui-btn mui-btn-primary ">确认赠送</button></div>
|
|
|
+ <div class="bindfyy-btn">
|
|
|
+ <button type="button" @click="sure" class="mui-btn mui-btn-primary ">确认赠送</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<loading :visible="isLoading"></loading>
|
|
@@ -45,17 +47,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import Common from '$project/components/Common.vue'
|
|
|
+ import * as API_Merchant from '@/apis/merchant'
|
|
|
+ import CommonMerchant from '@/components/CommonMerchant.vue'
|
|
|
import Loading from '$project/components/Loading.vue'
|
|
|
import TopHeader from '$project/components/TopHeader.vue'
|
|
|
import {
|
|
|
mapGetters,
|
|
|
mapMutations
|
|
|
} from 'vuex'
|
|
|
+ import {
|
|
|
+ currentTimeStamp,
|
|
|
+ parseUnixTime
|
|
|
+ } from '$project/utils'
|
|
|
export default {
|
|
|
name: 'MerchantCheckSearchResult',
|
|
|
components: {
|
|
|
- Common,
|
|
|
+ CommonMerchant,
|
|
|
Loading,
|
|
|
TopHeader,
|
|
|
},
|
|
@@ -64,13 +71,53 @@
|
|
|
isLoading: false,
|
|
|
|
|
|
pageTitle: '车牌登记',
|
|
|
+
|
|
|
+ detail: {},
|
|
|
+
|
|
|
+ sureForm: {
|
|
|
+ carNumber: '',
|
|
|
+ id: '',
|
|
|
+ },
|
|
|
+ today: '',
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ this.detail = this.$route.params.detail;
|
|
|
+ this.sureForm.carNumber = this.detail.carNumber;
|
|
|
+ this.sureForm.id = this.detail.id;
|
|
|
+
|
|
|
+ this.today = parseUnixTime(currentTimeStamp(), '{y}.{m}.{d}');
|
|
|
+ },
|
|
|
methods: {
|
|
|
- asynCallBack() {
|
|
|
+ //确认赠送
|
|
|
+ sure() {
|
|
|
+ var _this = this;
|
|
|
+ var btnArray = ['否', '是'];
|
|
|
+ mui.confirm('是否确认赠送?', '提示', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ _this.sendTicket();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ sendTicket() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Merchant.giveDiscountTicket(this.sureForm).then(response => {
|
|
|
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ this.$router.push({
|
|
|
+ name: 'MerchantCheckResult'
|
|
|
+ })
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //返回修改
|
|
|
+ goToSearch() {
|
|
|
+ this.$router.go(-1);
|
|
|
},
|
|
|
+ asynCallBack() {},
|
|
|
},
|
|
|
mounted() {},
|
|
|
destroyed() {
|