|
@@ -70,28 +70,28 @@
|
|
|
<text class="payType">请选择支付方式</text>
|
|
<text class="payType">请选择支付方式</text>
|
|
|
<image class="x" src="/static/common/ox.png" @click="closePayPopup"></image>
|
|
<image class="x" src="/static/common/ox.png" @click="closePayPopup"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="payTitle">
|
|
|
|
|
- <text>选择微信支付或余额支付</text>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+<!-- <view class="payTitle">-->
|
|
|
|
|
+<!-- <text>选择微信支付或余额支付</text>-->
|
|
|
|
|
+<!-- </view>-->
|
|
|
<view :style="{'min-height':'380rpx'}">
|
|
<view :style="{'min-height':'380rpx'}">
|
|
|
-
|
|
|
|
|
-<!-- <view v-if="loveCard.totalBalance" class="payItem flex-row justify-between" @click="payItem(0)">-->
|
|
|
|
|
-<!-- <view class="flex-row">-->
|
|
|
|
|
-<!-- <u-icon name="/static/me/familyCard_icon.png" color="#38db38" size="36"></u-icon>-->
|
|
|
|
|
-<!-- <view class="payName flex-col justify-center">-->
|
|
|
|
|
-<!-- <text>亲情卡支付</text>-->
|
|
|
|
|
-<!-- <text class="balance">{{loveCard.presentUserName + loveCard.presentUserNo}}赠送的亲情卡</text>-->
|
|
|
|
|
-<!-- <text class="balance">余额{{loveCard.totalBalance}}</text>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
-<!-- <view class="flex-col justify-center">-->
|
|
|
|
|
-<!-- <u-icon v-if="curServiceTab === 0" name="checkmark-circle-fill" color="#38db38"-->
|
|
|
|
|
-<!-- size="25"></u-icon>-->
|
|
|
|
|
-<!-- <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
|
|
+ <view v-if="loveCardList.length>0" class="payItem flex-row" >
|
|
|
|
|
+ <u-icon name="/static/me/familyCard_icon.png" color="#38db38" size="36"></u-icon>
|
|
|
|
|
+ <view class="payName flex-col justify-center flex-grow">
|
|
|
|
|
+ <text>亲情卡支付</text>
|
|
|
|
|
+ <scroll-view scroll-y class="loveCard">
|
|
|
|
|
+ <view class="flex-row justify-between loveCardItem " v-for="(item,index) in loveCardList" :key="index" @click="payLoveItem(0,index,item)">
|
|
|
|
|
+ <view class="select flex-col" >
|
|
|
|
|
+ <text>{{item.presentUserName}}({{item.presentUserNo}})</text>
|
|
|
|
|
+ <text class="balance">可用余额:{{item.totalBalance}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-col justify-center">
|
|
|
|
|
+ <u-icon v-if="curServiceTab === 0 && item.select" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
|
|
|
|
|
+ <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<view class="payItem flex-row justify-between" @click="payItem(1)">
|
|
<view class="payItem flex-row justify-between" @click="payItem(1)">
|
|
|
<view class="flex-row">
|
|
<view class="flex-row">
|
|
@@ -131,9 +131,6 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<view class="commitBtn" @click="commonGeneralOrder">
|
|
<view class="commitBtn" @click="commonGeneralOrder">
|
|
|
<text>确定</text>
|
|
<text>确定</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -171,7 +168,6 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- loveCard:{},
|
|
|
|
|
orderNumberData:{},
|
|
orderNumberData:{},
|
|
|
num: 0,
|
|
num: 0,
|
|
|
payAmount:'',//调用支付组件时需要支付的金额
|
|
payAmount:'',//调用支付组件时需要支付的金额
|
|
@@ -198,8 +194,9 @@
|
|
|
password:'',
|
|
password:'',
|
|
|
openType:0,//开启的支付类型:1一键支付子订单费用,2:支付预约费用
|
|
openType:0,//开启的支付类型:1一键支付子订单费用,2:支付预约费用
|
|
|
appointmentOrder:{},
|
|
appointmentOrder:{},
|
|
|
- requestStatus : false
|
|
|
|
|
-
|
|
|
|
|
|
|
+ requestStatus : false,
|
|
|
|
|
+ loveCardId:'',
|
|
|
|
|
+ loveCardList:[]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -223,7 +220,7 @@
|
|
|
uni.removeStorageSync('orderListIndex');
|
|
uni.removeStorageSync('orderListIndex');
|
|
|
|
|
|
|
|
this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
|
- // this.getMyReceiveList()
|
|
|
|
|
|
|
+ this.getMyReceiveList()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -301,7 +298,7 @@
|
|
|
if (this.openType == 2){
|
|
if (this.openType == 2){
|
|
|
this.$api.familyCardPay({
|
|
this.$api.familyCardPay({
|
|
|
orderNo: this.appointmentOrder.subOrderNo,
|
|
orderNo: this.appointmentOrder.subOrderNo,
|
|
|
- loveCardId: this.loveCard.id
|
|
|
|
|
|
|
+ loveCardId: this.loveCardId
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
this.requestStatus=false
|
|
this.requestStatus=false
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -325,7 +322,7 @@
|
|
|
}else{
|
|
}else{
|
|
|
this.$api.familyCardTradePay({
|
|
this.$api.familyCardTradePay({
|
|
|
tradeNo:this.tradeNo,
|
|
tradeNo:this.tradeNo,
|
|
|
- loveCardId:this.loveCard.id
|
|
|
|
|
|
|
+ loveCardId:this.loveCardId
|
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
this.requestStatus=false
|
|
this.requestStatus=false
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -420,15 +417,25 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ payLoveItem(num,index,loveCard){
|
|
|
|
|
+ console.log(loveCard.totalBalance*1, this.totalAmount*1)
|
|
|
|
|
+ if (loveCard.totalBalance*1 < this.totalAmount*1 && num == 0){
|
|
|
|
|
+ console.log(this.totalAmount)
|
|
|
|
|
+ uni.$u.toast('余额不足')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.curServiceTab = num
|
|
|
|
|
+ this.loveCardList.forEach(item=>{
|
|
|
|
|
+ item.select = false
|
|
|
|
|
+ })
|
|
|
|
|
+ loveCard.select=true
|
|
|
|
|
+ this.loveCardId = loveCard.id
|
|
|
|
|
+ this.$set(this.loveCardList,index,loveCard)
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
payItem(num){
|
|
payItem(num){
|
|
|
|
|
|
|
|
console.log(this.userInfo.balance*1,this.appointmentOrder.totalAmount*1)
|
|
console.log(this.userInfo.balance*1,this.appointmentOrder.totalAmount*1)
|
|
|
-
|
|
|
|
|
- // if (this.loveCard.totalBalance*1 < this.appointmentOrder.totalAmount*1 && num == 0){
|
|
|
|
|
- // uni.$u.toast('余额不足')
|
|
|
|
|
- // return
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
if (this.userInfo.balance*1 < this.payAmount*1){
|
|
if (this.userInfo.balance*1 < this.payAmount*1){
|
|
|
uni.$u.toast('余额不足')
|
|
uni.$u.toast('余额不足')
|
|
|
return
|
|
return
|
|
@@ -541,7 +548,7 @@
|
|
|
|
|
|
|
|
getMyReceiveList(){
|
|
getMyReceiveList(){
|
|
|
this.$api.getMyReceiveList().then(res=>{
|
|
this.$api.getMyReceiveList().then(res=>{
|
|
|
- this.loveCard = res.data.data[0]
|
|
|
|
|
|
|
+ this.loveCardList = res.data.data
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|