|
|
@@ -83,7 +83,14 @@
|
|
|
<view class="flex-col right">
|
|
|
<view class="flex-row justify-between">
|
|
|
<text class="serviceType">{{item.serviceName}}</text>
|
|
|
- <text class="projectState">{{item.statusDesc}}</text>
|
|
|
+ <view class="flex-row justify-start">
|
|
|
+ <text class="projectState">{{item.statusDesc}}</text>
|
|
|
+ <view class="flex-row justify-center" style="margin-left: 20rpx" v-if="item.status === 8 || item.status === 1" @click="appeal(item.orderServiceId)">
|
|
|
+ <u-icon name="/static/order/ud17.png" color="#93D21A" size="14"></u-icon>
|
|
|
+ <text class="ss_key">申诉</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view class="flex-row justify-between">
|
|
|
@@ -123,19 +130,15 @@
|
|
|
<!-- </view>-->
|
|
|
</view>
|
|
|
|
|
|
- <view class="flex-row justify-center" v-if="item.status === 8 || item.status === 1" @click="appeal(item.orderServiceId)">
|
|
|
- <u-icon name="/static/order/ud17.png" color="#93D21A" size="14"></u-icon>
|
|
|
- <text class="ss_key">申诉</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="flex-row justify-between key">
|
|
|
+ <view class="flex-row justify-start key">
|
|
|
<view class="flex-row">
|
|
|
<u-icon size="16" name="coupon"></u-icon>
|
|
|
<text>优惠选择:</text>
|
|
|
</view>
|
|
|
- <view class="flex-row value flex1 " style="height: 100%" @click="openCoupon(item,index)">
|
|
|
+ <view class="flex-row justify-start value" style="height: 100%" @click="openCoupon(item,index)">
|
|
|
<text v-if="item.suggestType == 0">选择优惠券或权益卡</text>
|
|
|
<text v-if="item.suggestType == 1">{{ item.suggestCoupon.name }} </text>
|
|
|
<text v-if="item.suggestType == 2">{{ item.suggestEquityCard.equityCardName }} </text>
|
|
|
@@ -295,20 +298,28 @@
|
|
|
<text>优惠选择</text>
|
|
|
</view>
|
|
|
|
|
|
- <scroll-view scroll-y style="height: 700rpx">
|
|
|
+ <view class="flex-row justify-center">
|
|
|
+ <view class="couponTabs flex-col justify-center" :class="[couponTabs == 0 ? '' : 'couponTabs1']" @click="changeCouponTabs(0)" >
|
|
|
+ <text>我的</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="couponTabs flex-col justify-center" :class="[couponTabs == 1 ? '' : 'couponTabs1']" @click="changeCouponTabs(1)">
|
|
|
+ <text>亲情卡优惠券</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <scroll-view v-if="couponTabs == 0" scroll-y style="height: 700rpx">
|
|
|
<view class="flex-row justify-between coupon1">
|
|
|
<view class="flex-row justify-start">
|
|
|
<view class="flex-col justify-center icon1">
|
|
|
<text>0</text>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="flex-col justify-center couponMsg">
|
|
|
<view class="flex-col justify-center couponName">
|
|
|
<text>不选择优惠</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
<view class="flex-col justify-center " style="margin-right: 30rpx">
|
|
|
<text class="couponBtn" @click="use(item,0)">选择</text>
|
|
|
@@ -407,6 +418,58 @@
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
+ <scroll-view v-if="couponTabs == 1" scroll-y style="height: 700rpx">
|
|
|
+
|
|
|
+ <view class="flex-row justify-between coupon1">
|
|
|
+ <view class="flex-row justify-start">
|
|
|
+ <view class="flex-col justify-center icon1">
|
|
|
+ <text>0</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center couponMsg">
|
|
|
+ <view class="flex-col justify-center couponName">
|
|
|
+ <text>不选择优惠</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center " style="margin-right: 30rpx">
|
|
|
+ <text class="couponBtn" @click="use(item,0)">选择</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex-row justify-start" :class="[item.canUse? 'coupon4' : 'coupon3']" v-for="(item,index) in couponByLoveCardList" :key="index">
|
|
|
+ <view class="flex-row justify-start">
|
|
|
+ <view class="flex-col justify-center " :class="[item.canUse? 'icon4' : '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 class="flex-col justify-center couponMsg">
|
|
|
+ <view class="flex-col justify-center couponName">
|
|
|
+ <text>{{item.name}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center couponValue">
|
|
|
+ <text>使用项目:{{item.useServiceDesc}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center couponValue">
|
|
|
+ <text>可用门店:{{item.useStoreDesc}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center couponValue" v-if="!item.canUse">
|
|
|
+ <text>不可用原因:{{item.unavailabilityReason}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex-col justify-center" v-if="item.canUse">
|
|
|
+ <text class="couponBtn" @click="use(item,1)">立即使用</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex-col justify-center" v-else>
|
|
|
+ <text class="couponBtn1">不可用</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </scroll-view>
|
|
|
+
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
@@ -439,8 +502,10 @@
|
|
|
loveCardList:[],
|
|
|
availableCouponList:[],
|
|
|
availableEquityCardList:[],
|
|
|
+ couponByLoveCardList:[],
|
|
|
availableChild:null,
|
|
|
- availableIndex:null
|
|
|
+ availableIndex:null,
|
|
|
+ couponTabs:0
|
|
|
}
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
@@ -453,6 +518,10 @@
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
+ changeCouponTabs(couponTabs){
|
|
|
+ this.couponTabs = couponTabs
|
|
|
+ },
|
|
|
+
|
|
|
use(item,suggestType){
|
|
|
|
|
|
if (suggestType == 1){
|
|
|
@@ -463,18 +532,18 @@
|
|
|
if (item.discountsType == 1){
|
|
|
//满减优惠券
|
|
|
this.availableChild.discountAmount = item.discountsPrice
|
|
|
- this.availableChild.payAmount = this.availableChild.servicePrice - item.discountsPrice
|
|
|
+ this.availableChild.payAmount = (this.availableChild.servicePrice - item.discountsPrice).toFixed(2)
|
|
|
}else {
|
|
|
//折扣券
|
|
|
this.availableChild.discountAmount = (this.availableChild.servicePrice * (item.discounts / 10).toFixed(2)).toFixed(2)
|
|
|
- this.availableChild.payAmount = this.availableChild.servicePrice - this.availableChild.discountAmount
|
|
|
+ this.availableChild.payAmount = (this.availableChild.servicePrice - this.availableChild.discountAmount).toFixed(2)
|
|
|
}
|
|
|
}else if (suggestType == 2){
|
|
|
//使用权益卡
|
|
|
this.availableChild.suggestCoupon = null
|
|
|
this.availableChild.suggestType = 2
|
|
|
this.availableChild.suggestEquityCard = item
|
|
|
- this.availableChild.discountAmount = this.availableChild.servicePrice - item.faceValue
|
|
|
+ this.availableChild.discountAmount = (this.availableChild.servicePrice - item.faceValue).toFixed(2)
|
|
|
this.availableChild.payAmount = item.faceValue
|
|
|
}else {
|
|
|
//不使用优惠
|
|
|
@@ -488,7 +557,7 @@
|
|
|
let payAmount = 0 //计算订单总支付金额
|
|
|
let discountAmount = 0 //计算订单总优惠金额
|
|
|
for (const child of this.order.child) {
|
|
|
- if (child.status == 1){
|
|
|
+ if (child.status == 1 || child.status == 8){
|
|
|
payAmount += child.payAmount - 0
|
|
|
discountAmount += child.discountAmount - 0
|
|
|
}
|
|
|
@@ -512,9 +581,18 @@
|
|
|
this.availableChild = item
|
|
|
this.availableCoupons(item)
|
|
|
this.availableEquityCards(item)
|
|
|
+ this.getCouponByLoveCard(item)
|
|
|
this.$refs.couponPopup.open()
|
|
|
},
|
|
|
|
|
|
+ getCouponByLoveCard(item){
|
|
|
+ this.$api.getCouponByLoveCard({
|
|
|
+ orderServiceId:item.orderServiceId
|
|
|
+ }).then(res=>{
|
|
|
+ this.couponByLoveCardList = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
availableEquityCards(item){
|
|
|
this.$api.availableEquityCards({
|
|
|
orderServiceId:item.orderServiceId
|