|
@@ -7,18 +7,21 @@
|
|
</div>
|
|
</div>
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="product-img" @click="toDetail">
|
|
<div class="product-img" @click="toDetail">
|
|
- <img class="img" :src="bundle.icon2" alt="">
|
|
|
|
|
|
+ <img v-if="bundle.icon2" class="img" :src="bundle.icon2" alt="">
|
|
|
|
+ <div v-else class="center-con">
|
|
|
|
+ <img class="img" src="/static/img/ic_shop_title_06.png" alt="">
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="product-info">
|
|
<div class="product-info">
|
|
<div @click="toDetail">
|
|
<div @click="toDetail">
|
|
- <div class="title">{{bundle.name}}</div>
|
|
|
|
- <div class="desc">{{bundle.tag}}</div>
|
|
|
|
|
|
+ <div class="title">{{detailData ? detailData.bundleName : ''}}</div>
|
|
|
|
+ <div class="desc">{{bundle.tag ? bundle.tag : ''}}</div>
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
|
|
+ <!-- <div>
|
|
<div class="price">
|
|
<div class="price">
|
|
- ¥{{bundle.price}}
|
|
|
|
|
|
+ ¥{{bundle.price ? bundle.price : 0}}
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="package-info" v-if="orderBundle.orderFlag === 'PAED'">
|
|
<div class="package-info" v-if="orderBundle.orderFlag === 'PAED'">
|
|
@@ -26,10 +29,10 @@
|
|
<!-- <form @submit="formSubmit" class="formId" report-submit="true">
|
|
<!-- <form @submit="formSubmit" class="formId" report-submit="true">
|
|
<button form-type="submit"></button>
|
|
<button form-type="submit"></button>
|
|
</form> -->
|
|
</form> -->
|
|
- <van-cell :title="item.itemName" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
|
|
|
|
|
|
+ <van-cell :title="item.itemName" :label="item.expiryDateStr" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
|
|
<div class="package-qr">
|
|
<div class="package-qr">
|
|
<span>剩余{{item.remainTimes}}次</span>
|
|
<span>剩余{{item.remainTimes}}次</span>
|
|
- <van-icon class="icon-qr" size="1.5em" name="qr" color="#f44" />
|
|
|
|
|
|
+ <van-icon class="icon-qr" size="1.5em" name="qr" color="#ff5500" />
|
|
</div>
|
|
</div>
|
|
</van-cell>
|
|
</van-cell>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
@@ -37,6 +40,10 @@
|
|
请将对应服务的二维码出示给门店进行消费
|
|
请将对应服务的二维码出示给门店进行消费
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 已支付 -->
|
|
|
|
+ <div class="look-record" v-if="orderBundle.orderFlag === 'PAED'" @click="goPage">
|
|
|
|
+ 查看使用记录
|
|
|
|
+ </div>
|
|
<div class="order-infos">
|
|
<div class="order-infos">
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell title="订单编号" :value="orderBundle.number" class="order-number">
|
|
<van-cell title="订单编号" :value="orderBundle.number" class="order-number">
|
|
@@ -55,7 +62,7 @@
|
|
<span class="price">¥-{{orderBundle.couponAmount}}</span>
|
|
<span class="price">¥-{{orderBundle.couponAmount}}</span>
|
|
</van-cell>
|
|
</van-cell>
|
|
|
|
|
|
- <van-cell title="实付款" v-if="orderBundle.orderFlag === 'PAED'">
|
|
|
|
|
|
+ <van-cell title="实付款" v-if="orderBundle.orderFlag === 'PAED'||orderBundle.orderFlag === 'RUND'">
|
|
<span class="price">¥{{orderBundle.payedAmount}}</span>
|
|
<span class="price">¥{{orderBundle.payedAmount}}</span>
|
|
</van-cell>
|
|
</van-cell>
|
|
<van-cell title="待付款" v-else>
|
|
<van-cell title="待付款" v-else>
|
|
@@ -65,18 +72,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="order-control" v-if="orderBundle.orderFlag === 'UNPA'">
|
|
<div class="order-control" v-if="orderBundle.orderFlag === 'UNPA'">
|
|
<van-button class="btn" plain size="large" @click="cancelHandler">取消订单</van-button>
|
|
<van-button class="btn" plain size="large" @click="cancelHandler">取消订单</van-button>
|
|
- <van-button class="btn" size="large" type="danger" :disabled="payLoading" :loading="payLoading" @click="toPay">立即支付</van-button>
|
|
|
|
|
|
+ <!-- <van-button class="btn" size="large" type="danger" :disabled="payLoading" :loading="payLoading" @click="toPay">立即支付</van-button> -->
|
|
</div>
|
|
</div>
|
|
- <div class="order-control" v-if="orderBundle.orderFlag === 'CAEL' || orderBundle.orderFlag === 'SYCA'">
|
|
|
|
|
|
+ <!-- <div class="order-control" v-if="orderBundle.orderFlag === 'CAEL' || orderBundle.orderFlag === 'SYCA'">
|
|
<van-button class="btn" size="large" type="danger" @click="rePay">重新购买</van-button>
|
|
<van-button class="btn" size="large" type="danger" @click="rePay">重新购买</van-button>
|
|
- </div>
|
|
|
|
- <div class="order-control" v-if="orderBundle.orderFlag === 'PAED'">
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+ <!-- <div class="order-control" v-if="orderBundle.orderFlag === 'PAED'">
|
|
<van-button class="btn" size="large" type="danger" @click="rePay">再次购买</van-button>
|
|
<van-button class="btn" size="large" type="danger" @click="rePay">再次购买</van-button>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
<van-popup :show="showQRcodePopup" @close="closePopup">
|
|
<van-popup :show="showQRcodePopup" @close="closePopup">
|
|
<div class="qrcode-panel">
|
|
<div class="qrcode-panel">
|
|
<canvas class="qrcode-img" canvas-id="mycanvas" />
|
|
<canvas class="qrcode-img" canvas-id="mycanvas" />
|
|
|
|
+ <p class="qrcode-des">二维码有效期24小时</p>
|
|
</div>
|
|
</div>
|
|
</van-popup>
|
|
</van-popup>
|
|
</div>
|
|
</div>
|
|
@@ -89,17 +97,22 @@ import { subscribePayMessage, subscribeHxMessage } from '@/utils/index.js';
|
|
export default {
|
|
export default {
|
|
components: {},
|
|
components: {},
|
|
name: 'package',
|
|
name: 'package',
|
|
-
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
payLoading: false,
|
|
payLoading: false,
|
|
finished: false,
|
|
finished: false,
|
|
showQRcodePopup: false,
|
|
showQRcodePopup: false,
|
|
- bundle: {},
|
|
|
|
|
|
+ bundle: {
|
|
|
|
+ icon2: null,
|
|
|
|
+ name: '',
|
|
|
|
+ tag: null,
|
|
|
|
+ price: 0
|
|
|
|
+ },
|
|
coupon: undefined,
|
|
coupon: undefined,
|
|
orderBundle: {},
|
|
orderBundle: {},
|
|
customerBundleItemList: [],
|
|
customerBundleItemList: [],
|
|
- formId:null
|
|
|
|
|
|
+ formId:null,
|
|
|
|
+ detailData: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -119,7 +132,8 @@ export default {
|
|
'INPA': '支付中',
|
|
'INPA': '支付中',
|
|
'PAED': '已支付',
|
|
'PAED': '已支付',
|
|
'CAEL': '已取消',
|
|
'CAEL': '已取消',
|
|
- 'SYCA': '已取消'
|
|
|
|
|
|
+ 'SYCA': '已取消',
|
|
|
|
+ 'RUND': '已退款'
|
|
};
|
|
};
|
|
return dict[this.orderBundle.orderFlag];
|
|
return dict[this.orderBundle.orderFlag];
|
|
}
|
|
}
|
|
@@ -191,10 +205,23 @@ export default {
|
|
const _this = this;
|
|
const _this = this;
|
|
orderDetail({ id: id}).then(res => {
|
|
orderDetail({ id: id}).then(res => {
|
|
if (res.status === '200') {
|
|
if (res.status === '200') {
|
|
- _this.bundle = res.data.bundle;
|
|
|
|
|
|
+ _this.detailData = res.data || null
|
|
|
|
+ _this.bundle = res.data.bundle || {icon2: null, name: '', tag: null, price: 0};
|
|
_this.coupon = res.data.coupon;
|
|
_this.coupon = res.data.coupon;
|
|
_this.orderBundle = res.data.orderBundle;
|
|
_this.orderBundle = res.data.orderBundle;
|
|
- _this.customerBundleItemList = res.data.customerBundleItemList;
|
|
|
|
|
|
+ res.data.customerBundleItemList.map(item => {
|
|
|
|
+ if((item.expiryDate && (item.expiryDate.substr(0,10) != '2099-01-01')) && item.cycleFlag== 0){
|
|
|
|
+ item.expiryDateStr = '过期时间:' + item.expiryDate
|
|
|
|
+ }else{
|
|
|
|
+ item.expiryDateStr = '过期时间:' + '--'
|
|
|
|
+ }
|
|
|
|
+ // if(item.expiryDate && (item.expiryDate.substr(0,10) != '2099-01-01') && item.cycleFlag== 0){
|
|
|
|
+ // item.expiryDateStr = '过期时间:' + item.expiryDate
|
|
|
|
+ // }else{
|
|
|
|
+ // item.expiryDateStr = '过期时间:' + '--'
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
+ _this.customerBundleItemList = res.data.customerBundleItemList
|
|
} else {
|
|
} else {
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: res.message,
|
|
title: res.message,
|
|
@@ -220,6 +247,12 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 查看使用记录
|
|
|
|
+ goPage(){
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: `/pages/pagesA/usageRecord/main?billNo=${this.detailData.orderBundleNo}`
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 去支付
|
|
// 去支付
|
|
toPay() {
|
|
toPay() {
|
|
let _this = this
|
|
let _this = this
|
|
@@ -259,7 +292,6 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
onShow() {
|
|
onShow() {
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
mask: true,
|
|
mask: true,
|
|
@@ -272,10 +304,16 @@ export default {
|
|
wx.hideLoading();
|
|
wx.hideLoading();
|
|
this.finished = false;
|
|
this.finished = false;
|
|
this.showQRcodePopup = false;
|
|
this.showQRcodePopup = false;
|
|
- this.bundle = {};
|
|
|
|
|
|
+ this.bundle = {
|
|
|
|
+ icon2: null,
|
|
|
|
+ name: '',
|
|
|
|
+ tag: null,
|
|
|
|
+ price: 0
|
|
|
|
+ };
|
|
this.coupon = undefined;
|
|
this.coupon = undefined;
|
|
this.orderBundle = {};
|
|
this.orderBundle = {};
|
|
this.customerBundleItemList = [];
|
|
this.customerBundleItemList = [];
|
|
|
|
+ this.detailData = null
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -294,6 +332,14 @@ export default {
|
|
border:none;
|
|
border:none;
|
|
padding:0;
|
|
padding:0;
|
|
}
|
|
}
|
|
|
|
+.look-record{
|
|
|
|
+ margin: 10rpx 0;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ line-height: 72rpx;
|
|
|
|
+ text-align center;
|
|
|
|
+}
|
|
.order-detail-panel {
|
|
.order-detail-panel {
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
|
|
|
|
@@ -304,7 +350,7 @@ export default {
|
|
padding: 15rpx 0;
|
|
padding: 15rpx 0;
|
|
|
|
|
|
.title {
|
|
.title {
|
|
- color: #f44;
|
|
|
|
|
|
+ color: #ff5500;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
font-size: 1.2em;
|
|
font-size: 1.2em;
|
|
padding-bottom: 10rpx;
|
|
padding-bottom: 10rpx;
|
|
@@ -331,10 +377,19 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
+ .center-con{
|
|
|
|
+ text-align: center;
|
|
|
|
+ height: 100%;
|
|
|
|
+ img{
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 204rpx;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.product-info {
|
|
.product-info {
|
|
- padding-left: 10%;
|
|
|
|
|
|
+ padding-left: 1em;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
font-size: 25rpx;
|
|
font-size: 25rpx;
|
|
flex: 1;
|
|
flex: 1;
|
|
@@ -389,7 +444,7 @@ export default {
|
|
margin-top: 10rpx;
|
|
margin-top: 10rpx;
|
|
|
|
|
|
.price {
|
|
.price {
|
|
- color: #f44;
|
|
|
|
|
|
+ color: #ff5500;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -414,6 +469,12 @@ export default {
|
|
height: 75vw;
|
|
height: 75vw;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
|
|
+.qrcode-des{
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ padding: 25rpx 0;
|
|
|
|
+ background-color: #f4f4f5;
|
|
|
|
+}
|
|
|
|
|
|
.order-number {
|
|
.order-number {
|
|
/deep/ .van-cell__value {
|
|
/deep/ .van-cell__value {
|