|
@@ -130,16 +130,18 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="flex-row justify-between key" v-if="item.status == 1 || item.status == 8">
|
|
|
|
|
|
|
+ <view class="flex-row justify-between key">
|
|
|
<view class="flex-row">
|
|
<view class="flex-row">
|
|
|
<u-icon size="16" name="coupon"></u-icon>
|
|
<u-icon size="16" name="coupon"></u-icon>
|
|
|
<text>优惠选择:</text>
|
|
<text>优惠选择:</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-row justify-between value flex1" style="height: 100%" @click="openCoupon(item,index)">
|
|
|
|
|
|
|
+ <view class="flex-row value flex1 " style="height: 100%" @click="openCoupon(item,index)">
|
|
|
<text v-if="item.suggestType == 0">选择优惠券或权益卡</text>
|
|
<text v-if="item.suggestType == 0">选择优惠券或权益卡</text>
|
|
|
- <text v-if="item.suggestType == 1">{{ item.suggestCoupon.name }} {{ item.suggestType }}</text>
|
|
|
|
|
- <text v-if="item.suggestType == 2">{{ item.suggestEquityCard.name }} {{ item.suggestType }}</text>
|
|
|
|
|
- <u-icon size="12" name="arrow-right"></u-icon>
|
|
|
|
|
|
|
+ <text v-if="item.suggestType == 1">{{ item.suggestCoupon.name }} </text>
|
|
|
|
|
+ <text v-if="item.suggestType == 2">{{ item.suggestEquityCard.equityCardName }} </text>
|
|
|
|
|
+ <view class="flex-col justify-center">
|
|
|
|
|
+ <u-icon v-if="order.orderStatus != 1 || order.orderStatus != 3" size="12" name="arrow-right"></u-icon>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -293,17 +295,22 @@
|
|
|
<text>优惠选择</text>
|
|
<text>优惠选择</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view style="height: 700rpx;overflow: auto" >
|
|
|
|
|
|
|
+ <scroll-view scroll-y style="height: 700rpx">
|
|
|
<view class="flex-row justify-between coupon1">
|
|
<view class="flex-row justify-between coupon1">
|
|
|
<view class="flex-row justify-start">
|
|
<view class="flex-row justify-start">
|
|
|
<view class="flex-col justify-center icon1">
|
|
<view class="flex-col justify-center icon1">
|
|
|
<text>0</text>
|
|
<text>0</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-col justify-center couponName">
|
|
|
|
|
- <text>不选择优惠</text>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view class="flex-col justify-center couponMsg">
|
|
|
|
|
+ <view class="flex-col justify-center couponName">
|
|
|
|
|
+ <text>不选择优惠</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-col justify-center " >
|
|
|
|
|
|
|
+ <view class="flex-col justify-center " style="margin-right: 30rpx">
|
|
|
<text class="couponBtn" @click="use(item,0)">选择</text>
|
|
<text class="couponBtn" @click="use(item,0)">选择</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -318,12 +325,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="flex-row justify-between coupon2" v-for="(item,index) in availableCouponList" :key="index">
|
|
|
|
|
|
|
+ <view class="flex-row justify-start" :class="[item.canUse? 'coupon2' : 'coupon3']" v-for="(item,index) in availableCouponList" :key="index">
|
|
|
<view class="flex-row justify-start">
|
|
<view class="flex-row justify-start">
|
|
|
- <view class="flex-col justify-center icon2">
|
|
|
|
|
- <text>{{item.discountsPrice}}</text>
|
|
|
|
|
|
|
+ <view class="flex-col justify-center " :class="[item.canUse? 'icon2' : 'icon3']">
|
|
|
|
|
+ <text v-if="item.discountsType == 1">减{{item.discountsPrice}}</text>
|
|
|
|
|
+ <text v-if="item.discountsType == 2">{{item.discount}}折</text>
|
|
|
|
|
+ <text class="reachPrice">满{{item.reachPrice}}可用</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-col justify-center">
|
|
|
|
|
|
|
+ <view class="flex-col justify-center couponMsg">
|
|
|
<view class="flex-col justify-center couponName">
|
|
<view class="flex-col justify-center couponName">
|
|
|
<text>{{item.name}}</text>
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -331,13 +340,21 @@
|
|
|
<text>使用项目:{{item.useServiceDesc}}</text>
|
|
<text>使用项目:{{item.useServiceDesc}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex-col justify-center couponValue">
|
|
<view class="flex-col justify-center couponValue">
|
|
|
- <text>使用金额:{{item.reachPrice}}</text>
|
|
|
|
|
|
|
+ <text>可用门店:{{item.useStoreDesc}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center couponValue" v-if="!item.canUse">
|
|
|
|
|
+ <text>不可用原因:{{item.unavailabilityReason}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-col justify-center" >
|
|
|
|
|
|
|
+ <view class="flex-col justify-center" v-if="item.canUse">
|
|
|
<text class="couponBtn" @click="use(item,1)">立即使用</text>
|
|
<text class="couponBtn" @click="use(item,1)">立即使用</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="flex-col justify-center" v-else>
|
|
|
|
|
+ <text class="couponBtn1">不可用</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -351,27 +368,44 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="flex-row justify-between coupon2" v-for="(item,index) in availableEquityCardList" :key="index">
|
|
|
|
|
|
|
+ <view class="flex-row justify-start " :class="[item.canUse? 'coupon2' : 'coupon3']" v-for="(item,index) in availableEquityCardList" :key="index">
|
|
|
<view class="flex-row justify-start">
|
|
<view class="flex-row justify-start">
|
|
|
- <view class="flex-col justify-center icon2">
|
|
|
|
|
|
|
+ <view class="flex-col justify-center" :class="[item.canUse? 'icon2' : 'icon3']">
|
|
|
<text>{{item.faceValue}}</text>
|
|
<text>{{item.faceValue}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="flex-col justify-center">
|
|
|
|
|
|
|
+ <view class="flex-col justify-center couponMsg">
|
|
|
<view class="flex-col justify-center couponName">
|
|
<view class="flex-col justify-center couponName">
|
|
|
- <text>{{item.title}}</text>
|
|
|
|
|
|
|
+ <text>{{item.equityCardName}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center couponValue">
|
|
|
|
|
+ <text>适用项目:{{item.serviceProjectName || ''}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center couponValue">
|
|
|
|
|
+ <text>适用门店:{{ item.useStoreDesc || '' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex-col justify-center couponValue">
|
|
<view class="flex-col justify-center couponValue">
|
|
|
- <text>使用项目:{{item.serviceProjectName}}</text>
|
|
|
|
|
|
|
+ <text>绑定对象:{{item.serviceObjectName}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center couponValue">
|
|
|
|
|
+ <text>结束期限:{{item.effectiveEndTime.substring(0,10)}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center couponValue" v-if="!item.canUse">
|
|
|
|
|
+ <text>不可用原因:{{item.unavailabilityReason}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-col justify-center" >
|
|
|
|
|
- <text class="couponBtn" @click="use(item,2)">立即使用</text>
|
|
|
|
|
|
|
+ <view class="flex-col justify-center" v-if="item.canUse">
|
|
|
|
|
+ <text class="couponBtn" @click="use(item,2)">立即使用</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="flex-col justify-center" v-else>
|
|
|
|
|
+ <text class="couponBtn1">不可用</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
@@ -422,19 +456,31 @@
|
|
|
use(item,suggestType){
|
|
use(item,suggestType){
|
|
|
|
|
|
|
|
if (suggestType == 1){
|
|
if (suggestType == 1){
|
|
|
|
|
+ //使用优惠券
|
|
|
|
|
+ this.availableChild.suggestEquityCard = null
|
|
|
this.availableChild.suggestType = 1
|
|
this.availableChild.suggestType = 1
|
|
|
this.availableChild.suggestCoupon = item
|
|
this.availableChild.suggestCoupon = item
|
|
|
- this.availableChild.discountAmount = item.discountsPrice
|
|
|
|
|
- this.availableChild.payAmount = this.availableChild.servicePrice - item.discountsPrice
|
|
|
|
|
|
|
+ if (item.discountsType == 1){
|
|
|
|
|
+ //满减优惠券
|
|
|
|
|
+ this.availableChild.discountAmount = item.discountsPrice
|
|
|
|
|
+ this.availableChild.payAmount = this.availableChild.servicePrice - item.discountsPrice
|
|
|
|
|
+ }else {
|
|
|
|
|
+ //折扣券
|
|
|
|
|
+ this.availableChild.discountAmount = (this.availableChild.servicePrice * (item.discounts / 10).toFixed(2)).toFixed(2)
|
|
|
|
|
+ this.availableChild.payAmount = this.availableChild.servicePrice - this.availableChild.discountAmount
|
|
|
|
|
+ }
|
|
|
}else if (suggestType == 2){
|
|
}else if (suggestType == 2){
|
|
|
|
|
+ //使用权益卡
|
|
|
|
|
+ this.availableChild.suggestCoupon = null
|
|
|
this.availableChild.suggestType = 2
|
|
this.availableChild.suggestType = 2
|
|
|
this.availableChild.suggestEquityCard = item
|
|
this.availableChild.suggestEquityCard = item
|
|
|
- this.availableChild.discountAmount = item.faceValue
|
|
|
|
|
- this.availableChild.payAmount = this.availableChild.servicePrice - item.faceValue
|
|
|
|
|
|
|
+ this.availableChild.discountAmount = this.availableChild.servicePrice - item.faceValue
|
|
|
|
|
+ this.availableChild.payAmount = item.faceValue
|
|
|
}else {
|
|
}else {
|
|
|
|
|
+ //不使用优惠
|
|
|
this.availableChild.suggestType = 0
|
|
this.availableChild.suggestType = 0
|
|
|
- this.availableChild.suggestCoupon = []
|
|
|
|
|
- this.availableChild.suggestEquityCard = []
|
|
|
|
|
|
|
+ this.availableChild.suggestCoupon = null
|
|
|
|
|
+ this.availableChild.suggestEquityCard = null
|
|
|
this.availableChild.discountAmount = 0
|
|
this.availableChild.discountAmount = 0
|
|
|
this.availableChild.payAmount = this.availableChild.servicePrice
|
|
this.availableChild.payAmount = this.availableChild.servicePrice
|
|
|
}
|
|
}
|
|
@@ -457,6 +503,10 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
openCoupon(item,index){
|
|
openCoupon(item,index){
|
|
|
|
|
+ if (this.order.orderStatus == 1 || this.order.orderStatus == 3){
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
console.log(item)
|
|
console.log(item)
|
|
|
this.availableIndex = index
|
|
this.availableIndex = index
|
|
|
this.availableChild = item
|
|
this.availableChild = item
|
|
@@ -628,33 +678,26 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
qenPayInfo(){
|
|
qenPayInfo(){
|
|
|
- //
|
|
|
|
|
- // for(let i=0;i<this.order.child.length;i++){
|
|
|
|
|
- // if (this.order.child[i].status==3){
|
|
|
|
|
- // uni.$u.toast('子订单未审核结束')
|
|
|
|
|
- // return
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // let orderServiceIds = []
|
|
|
|
|
- // this.order.child.forEach(i=>{
|
|
|
|
|
- // if (i.status !=5){ //排除审核通过的子订单
|
|
|
|
|
- // orderServiceIds.push(i.orderServiceId)
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
- this.$api.oneClickPay({
|
|
|
|
|
- orderId:this.order.orderId
|
|
|
|
|
|
|
+
|
|
|
|
|
+ let childArr = []
|
|
|
|
|
+ for (const child of this.order.child) {
|
|
|
|
|
+ console.log('+++++++++++++++++++++',child)
|
|
|
|
|
+ let c = {
|
|
|
|
|
+ orderServiceId:child.orderServiceId,
|
|
|
|
|
+ couponId: child.suggestCoupon ? child.suggestCoupon.id : null,
|
|
|
|
|
+ equityCardId: child.suggestEquityCard ? child.suggestEquityCard.id : null,
|
|
|
|
|
+ }
|
|
|
|
|
+ childArr.push(c)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.$api.oneClickPayV2({
|
|
|
|
|
+ orderId:this.order.orderId,
|
|
|
|
|
+ serviceChildren:childArr
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
this.tradeNo = res.data.data.tradeNo
|
|
this.tradeNo = res.data.data.tradeNo
|
|
|
this.$refs.popup.open()
|
|
this.$refs.popup.open()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // this.$api.qenPayInfo({
|
|
|
|
|
- // orderServiceIds:orderServiceIds,
|
|
|
|
|
- // orderNo:this.order.orderNo
|
|
|
|
|
- // }).then(res=>{
|
|
|
|
|
- // this.tradeNo=res.data.data.tradeNo
|
|
|
|
|
- // this.$refs.popup.open()
|
|
|
|
|
- // })
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
commitAppeal(){
|
|
commitAppeal(){
|