订单升级
This commit is contained in:
parent
593eb697fe
commit
8f56b4484c
|
@ -111,9 +111,12 @@ export default {
|
|||
uni.showToast({
|
||||
title: '提交成功'
|
||||
});
|
||||
setTimeout(function() {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
uni.switchTab({
|
||||
url:'/pages/order/index'
|
||||
})
|
||||
// setTimeout(function() {
|
||||
// uni.navigateBack();
|
||||
// }, 1000);
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
}
|
||||
this.$queue.showLoading('加载中...');
|
||||
let userId = this.$queue.getData("userId");
|
||||
console.log("this.byUserId",this.byUserId,this.byuserName)
|
||||
this.$Request.postJson('/app/message/insertMessage', {
|
||||
// ordersId: this.ordersId,
|
||||
byUserId: this.byUserId,
|
||||
|
|
610
my/order/pay.vue
610
my/order/pay.vue
|
@ -19,12 +19,12 @@
|
|||
{{order.ordersMassageList[0].massageType.title}}
|
||||
</view>
|
||||
<view class="zhuangtai">
|
||||
<view v-if="order.status ==1">待付款...</view>
|
||||
<view v-if="order.status ==1">待支付</view>
|
||||
<view v-if="order.status ==2">待服务</view>
|
||||
<view v-if="order.status ==5">已完成</view>
|
||||
<view v-if="order.status ==6">服务中</view>
|
||||
<view v-if="order.status ==7">理疗师出发</view>
|
||||
<view v-if="order.status ==8">理疗师到达</view>
|
||||
<view v-if="order.status ==7">技师出发</view>
|
||||
<view v-if="order.status ==8">技师到达</view>
|
||||
<view v-if="order.status ==3">待评价</view>
|
||||
<view v-if="order.status ==4">已取消</view>
|
||||
<view v-if="order.status ==9">待确认</view>
|
||||
|
@ -32,27 +32,23 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view>
|
||||
<view style="width: 100%;">
|
||||
<view class="flex justify-between margin-tb-sm" style="color: #999999;">
|
||||
<view style="justify-content: space-between;">
|
||||
{{order.ordersMassageList[0].massageType.duration}}分钟
|
||||
x{{order.ordersMassageList[0].num}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="money-pay">
|
||||
<view class="money-pay" style="justify-content: space-between;">
|
||||
<view class="money-pay-zhen">
|
||||
<span>¥</span>
|
||||
<span>{{order.price}}</span>
|
||||
<span>{{order.massagePrice}}</span>
|
||||
</view>
|
||||
<view>
|
||||
<uni-number-box :disabled="true" :value="order.ordersMassageList[0].num" :width='27' :min="1" @change="changeValue" />
|
||||
</view>
|
||||
<view class="money-pay-jia">¥298</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="jz_btn"
|
||||
v-if="order.addNum < order.ordersMassageList[0].massageType.addNum && order.status == 6"
|
||||
@tap="saveJZ(order.ordersMassageList[0].massageType.massageTypeId)">
|
||||
加钟/补价</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -83,13 +79,16 @@
|
|||
<image :src="order.artificer.artificerImg" class="d-touxiang"></image>
|
||||
<view class="margin-left-sm" style="width: 90%;">
|
||||
<view class="flex align-center" style="width: 100%;justify-content: space-between;">
|
||||
<view class="d-title">{{order.artificer.artificerName}}</view>
|
||||
<view class="d-title">
|
||||
<span>{{order.artificer.artificerName}}</span>
|
||||
</view>
|
||||
<!-- <image
|
||||
v-if="order.status !=1 && order.status !=5 && order.status !=3 && order.status !=4 && order.status !=2"
|
||||
src="../../static/img/phone.png" style="width: 10px;height: 13px;margin-left: 11px;"
|
||||
@click="bindphone(order.artificer.phone)"></image> -->
|
||||
<image src="../../static/img/phone.png" class="phone-pay"
|
||||
@click="bindphone(order.artificer.phone)"></image>
|
||||
<!-- <image src="../../static/img/phone.png" class="phone-pay"
|
||||
@click="bindphone(order.artificer.phone)"></image> -->
|
||||
<view>{{order.technicianType=='3'?'新手':order.technicianType=='4'?'专家':'资深'}}</view>
|
||||
</view>
|
||||
<view class="flex align-center flex-wrap" v-if="order.artificer.ordersCount">
|
||||
<view class="margin-right">
|
||||
|
@ -103,6 +102,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="list-pay">
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">订单信息</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">订单编号</view>
|
||||
<view class="flex align-center" @tap="copy(order.ordersNo)"
|
||||
|
@ -111,6 +111,7 @@
|
|||
<u-icon name="file-text" style="color: #096f4b;margin-left: 10rpx;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">预约时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.serveTime}}</view>
|
||||
|
@ -127,10 +128,39 @@
|
|||
<view style="color: #999;font-size: 26rpx;">结束服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTimes}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.endTime" style="margin-top: 19rpx;">
|
||||
<view class="flex justify-between" v-if="order.endTime" style="margin-top: 19rpx;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;">
|
||||
<view style="color: #999;font-size: 26rpx;">预估结束时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTime}}</view>
|
||||
</view>
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">订单费用</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">项目名称</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.ordersMassageList[0].massageType.title}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">服务时长</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.ordersMassageList[0].massageType.duration}}分钟</view>
|
||||
</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">项目价格</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">¥{{order.massagePrice}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">会员折扣</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.vipRate}}%</view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg" style="justify-content: flex-end;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;">
|
||||
<view style="color: #333;font-size: 26rpx;">
|
||||
小计:
|
||||
</view>
|
||||
<view class="" style="color: #333;">
|
||||
<text style="font-size: 35rpx;font-weight: bold;">
|
||||
¥{{order.massagePrice*(order.vipRate/100)*(1+order.technicianRate/100)}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">出行费用</view>
|
||||
<view class="flex justify-between" v-if="order.tripWay" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">出行方式</view>
|
||||
<view v-if="order.tripWay == 1">公交</view>
|
||||
|
@ -141,44 +171,47 @@
|
|||
<view style="color: #999;font-size: 26rpx;">全程距离</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.km}}km</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.taxiMoney" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">出行交通费用</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.taxiMoney}}</view>
|
||||
<view class="flex justify-between" v-if="order.taxiMoney" style="margin-top: 19rpx;border-bottom:1px solid #ccc;padding-bottom:5px ;margin-bottom: 5px;">
|
||||
<view style="color: #999;font-size: 26rpx;">出行费用</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">¥{{order.taxiMoney}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.couponMoney" style="margin-top: 19rpx;">
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">优惠券信息</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;">
|
||||
<view style="color: #999;font-size: 26rpx;">优惠券</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.couponMoney}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.addNum" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">加钟次数</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.addNum}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.addTime" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">加钟时长</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.addTime}}分钟</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.addMoney" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">加钟费用</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.addMoney}}</view>
|
||||
</view>
|
||||
<view class="textarea-pay-list">
|
||||
<textarea class="textarea-pay" placeholder="请输入备注" name="" maxlength="100"></textarea>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.remark" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">备注内容</view>
|
||||
<view class="flex">
|
||||
<view class="">
|
||||
{{order.remark}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;" v-if="order.couponMoney">-¥{{order.couponMoney}}</view>
|
||||
<view class="" v-else>-</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">费用明细</view>
|
||||
<view class="flex align-center margin-top-lg justify-between">
|
||||
<view style="color: #333;font-size: 26rpx;">订单费用:</view>
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 26rpx;font-weight: bold;">{{order.massagePrice*(order.vipRate/100)*(1+order.technicianRate/100)}}</text></view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg justify-between" v-if="order.taxiMoney">
|
||||
<view style="color: #333;font-size: 26rpx;">出行费用:</view>
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 26rpx;font-weight: bold;">{{order.taxiMoney}}</text></view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg justify-between">
|
||||
<view style="color: #333;font-size: 26rpx;">优惠券:</view>
|
||||
<view class="" style="color: #F93731;" v-if="order.couponMoney">
|
||||
-¥<text style="font-size: 26rpx;font-weight: bold;">{{order.couponMoney}}</text></view>
|
||||
<view class="" v-else>-</view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg" style="justify-content: flex-end;">
|
||||
<view style="color: #333;font-size: 26rpx;">合计:</view>
|
||||
<view class="" style="color: #F93731;">¥<text
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 35rpx;font-weight: bold;">{{order.sumMoney}}</text></view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 12px;">温馨提示:费用随会员等级及技师等级不同而上下浮动</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="pay-ding feiuong">
|
||||
|
@ -312,14 +345,13 @@
|
|||
充值
|
||||
</u-button>
|
||||
<u-button
|
||||
v-if="order.addNum < order.ordersMassageList[0].massageType.addNum && order.status == 6"
|
||||
v-if="order.oldOrdersId && order.status == 6"
|
||||
shape="circle" :plain="true"
|
||||
@tap="saveJZ(order.ordersMassageList[0].massageType.massageTypeId)"
|
||||
class="btns">
|
||||
加钟
|
||||
</u-button>
|
||||
<u-button
|
||||
v-if="order.status == 6"
|
||||
<u-button v-if="order.oldOrdersId==null && order.status == 6"
|
||||
shape="circle" :plain="true"
|
||||
@tap="saveJZS(order.artificerId)"
|
||||
class="btns">
|
||||
|
@ -382,7 +414,7 @@
|
|||
</view>
|
||||
<view class="xiangmu-foot-left-dazhe">{{item.oldPrice}}</view>
|
||||
</view>
|
||||
<view class="xiadan" @click="goOrder(item)">
|
||||
<view class="xiadan" @click="goOrderS(item)">
|
||||
确认升级
|
||||
</view>
|
||||
</view>
|
||||
|
@ -527,7 +559,8 @@
|
|||
type:'center',
|
||||
earlyFinishReason:'',
|
||||
qurenJd:[],
|
||||
artificerlist:[]
|
||||
artificerlist:[],
|
||||
tordersId:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
@ -613,12 +646,13 @@
|
|||
|
||||
})
|
||||
},
|
||||
saveJZ(classifyId) {
|
||||
saveJZ(classifyId) {//加钟
|
||||
let data = {
|
||||
parentId: classifyId,
|
||||
page: 1,
|
||||
limit: 50,
|
||||
status: 1
|
||||
status: 1,
|
||||
artificerId:this.order.artificerId
|
||||
}
|
||||
let that = this;
|
||||
this.$queue.showLoading('查询中...')
|
||||
|
@ -644,6 +678,242 @@
|
|||
|
||||
})
|
||||
},
|
||||
goOrderJ(item) {//加钟 生成订单
|
||||
let that = this
|
||||
let payMoney = that.isVip ? item.memberPrice : item.price;
|
||||
let data = {
|
||||
parentId: that.order.ordersId,
|
||||
artificerId: that.order.artificerId,
|
||||
ordersMassageList: [{
|
||||
massageId: item.massageTypeId,
|
||||
num: 1,
|
||||
}],
|
||||
price: payMoney,
|
||||
couponId: '',
|
||||
payMoney: payMoney,
|
||||
userId: uni.getStorageSync('userId'),
|
||||
addMassageTypeId:item.massageTypeId,
|
||||
addEntryName:item.title
|
||||
}
|
||||
that.$Request.postJson("/app/artificer/insertOrders", data).then(res => {
|
||||
that.showorder = false
|
||||
if (res.code == 0) {
|
||||
that.tordersId = res.data.ordersId;
|
||||
that.tpayMoney = payMoney;
|
||||
that.showpay = true;
|
||||
that.paySel = 1;
|
||||
} else {
|
||||
that.$queue.showToast(res.msg)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
goOrderS(item) {//升级 生成订单
|
||||
|
||||
let that = this
|
||||
let data = {
|
||||
classifyId:item.classifyId,
|
||||
ordersId:that.order.ordersId,
|
||||
massageTypeId:that.order.massageTypeId,
|
||||
userPackageDetailId:that.order.userPackageDetailId,
|
||||
ordersMassageList:[
|
||||
{massageId: item.massageTypeId,num: 1},
|
||||
],
|
||||
}
|
||||
that.$Request.postJson("/app/artificer/updateOrders", data).then(res => {
|
||||
that.showorder = false
|
||||
if (res.code == 0) {
|
||||
that.tordersId = res.data.ordersId;
|
||||
// that.ordersId = res.data.ordersId;
|
||||
that.tpayMoney = res.data.payMoney;
|
||||
that.showpay = true;
|
||||
that.paySel = 1;
|
||||
} else {
|
||||
that.$queue.showToast(res.msg)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
// 支付订单
|
||||
pay() {
|
||||
let that = this
|
||||
this.showpay = false
|
||||
if (this.paySel != 0) {
|
||||
this.payJZ();
|
||||
return;
|
||||
}
|
||||
if (that.openWay == 1) { //零钱支付
|
||||
uni.showModal({
|
||||
title: '付款提示',
|
||||
content: '确认支付' + that.tpayMoney + '元吗?',
|
||||
success: function(re) {
|
||||
if (re.confirm) {
|
||||
that.$queue.showLoading('支付中...')
|
||||
console.log('用户点击确定');
|
||||
that.$Request.post("/app/artificer/payOrders", {
|
||||
ordersId: that.tordersId,
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
console.log(111)
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payShengji?ordersId='+that.tordersId
|
||||
})
|
||||
uni.showToast({
|
||||
title: '支付成功'
|
||||
})
|
||||
// that.getOrder()
|
||||
// that.showorderS=false;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
} else if (re.cancel) {
|
||||
uni.hideLoading();
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} else if (that.openWay == 2) { //微信支付
|
||||
that.$queue.showLoading('支付中...')
|
||||
// #ifdef MP-WEIXIN
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 3
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
|
||||
console.log(ret)
|
||||
if (ret.code == 0) {
|
||||
uni.hideLoading();
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: ret.data.timestamp,
|
||||
nonceStr: ret.data.noncestr,
|
||||
package: ret.data.package,
|
||||
signType: ret.data.signType,
|
||||
paySign: ret.data.sign,
|
||||
success: function(ret) {
|
||||
console.log(ret)
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
that.getOrder()
|
||||
console.log(222)
|
||||
// this.$queue.showToast('支付成功');
|
||||
|
||||
// uni.switchTab({
|
||||
// url: '/pages/my/index'
|
||||
// })
|
||||
},
|
||||
fail: function(err) {
|
||||
// this.$queue.showToast('支付失败');
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'nones'
|
||||
});
|
||||
that.getOrder()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') != -1) {
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 2
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
that.callPay(rea.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: rea.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 4
|
||||
}
|
||||
// debugger;
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
// const urlArr = window.location.href;
|
||||
// const hostUrl = urlArr.split("/");
|
||||
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||
// const url = '&redirect_url=' + callBack + 'my/order/pay';
|
||||
// window.location = rea.mweb_url + url
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
const urlArr = window.location.href;
|
||||
const hostUrl = urlArr.split("/");
|
||||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||
const url = '&redirect_url=' + callBack + 'my/order/pay';
|
||||
window.location = rea.data.mweb_url + url
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: rea.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef APP
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 1
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
console.log(rea)
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else if (that.openWay == 3) { //支付宝支付
|
||||
that.$queue.showLoading('支付中...')
|
||||
// #ifdef H5
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 2
|
||||
}
|
||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||
rea => {
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
||||
document.body.appendChild(div)
|
||||
document.forms[0].submit()
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 1
|
||||
}
|
||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||
rea => {
|
||||
that.setPayment('alipay', rea.data);
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
|
||||
getTimeStampWithoutSeconds(date) {
|
||||
// 将日期转换为标准的UTC时间
|
||||
var utcDate = new Date(
|
||||
|
@ -867,59 +1137,11 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
goOrderJ(item) {
|
||||
|
||||
let that = this
|
||||
let data = {
|
||||
classifyId:item.classifyId,
|
||||
ordersId:that.order.ordersId,
|
||||
ordersMassageList:[
|
||||
{massageId: item.massageTypeId,num: 1},
|
||||
],
|
||||
massageTypeId:item.massageTypeId,
|
||||
userPackageDetailId:item.userPackageDetailId,
|
||||
}
|
||||
that.$Request.postJson("/app/artificer/updateOrders", data).then(res => {
|
||||
that.showorder = false
|
||||
if (res.code == 0) {
|
||||
that.ordersId = res.data.ordersId;
|
||||
that.tpayMoney = res.data.payMoney;
|
||||
that.showpay = true;
|
||||
that.paySel = 1;
|
||||
} else {
|
||||
that.$queue.showToast(res.msg)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
goOrder(item) {
|
||||
|
||||
let that = this
|
||||
let data = {
|
||||
classifyId:item.classifyId,
|
||||
ordersId:that.order.ordersId,
|
||||
ordersMassageList:[
|
||||
{massageId: item.massageTypeId,num: 1},
|
||||
],
|
||||
massageTypeId:item.massageTypeId,
|
||||
userPackageDetailId:item.userPackageDetailId,
|
||||
}
|
||||
that.$Request.postJson("/app/artificer/updateOrders", data).then(res => {
|
||||
that.showorder = false
|
||||
if (res.code == 0) {
|
||||
that.ordersId = res.data.ordersId;
|
||||
that.tpayMoney = res.data.payMoney;
|
||||
that.showpay = true;
|
||||
that.paySel = 1;
|
||||
} else {
|
||||
that.$queue.showToast(res.msg)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
payJZ() {
|
||||
let that = this;
|
||||
if (that.openWay == 1) { //零钱支付
|
||||
console.log('1111')
|
||||
uni.showModal({
|
||||
title: '付款提示',
|
||||
content: '确认支付' + that.tpayMoney + '元吗?',
|
||||
|
@ -928,7 +1150,7 @@
|
|||
that.$queue.showLoading('支付中...')
|
||||
// console.log('用户点击确定');
|
||||
that.$Request.post("/app/artificer/payOrders", {
|
||||
ordersId: that.ordersId,
|
||||
ordersId: that.tordersId,
|
||||
}).then(ret => {
|
||||
uni.hideLoading();
|
||||
if (ret.code == 0) {
|
||||
|
@ -936,6 +1158,9 @@
|
|||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payShengji?ordersId='+that.tordersId
|
||||
})
|
||||
that.getOrder()
|
||||
|
||||
} else {
|
||||
|
@ -1193,178 +1418,7 @@
|
|||
})
|
||||
// this.showpay = true
|
||||
},
|
||||
// 支付订单
|
||||
pay() {
|
||||
let that = this
|
||||
this.showpay = false
|
||||
if (this.paySel != 0) {
|
||||
this.payJZ();
|
||||
return;
|
||||
}
|
||||
if (that.openWay == 1) { //零钱支付
|
||||
uni.showModal({
|
||||
title: '付款提示',
|
||||
content: '确认支付' + that.order.payMoney + '元吗?',
|
||||
success: function(re) {
|
||||
if (re.confirm) {
|
||||
that.$queue.showLoading('支付中...')
|
||||
console.log('用户点击确定');
|
||||
that.$Request.post("/app/artificer/payOrders", {
|
||||
ordersId: that.order.ordersId,
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: '支付成功'
|
||||
})
|
||||
that.getOrder()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
} else if (re.cancel) {
|
||||
uni.hideLoading();
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} else if (that.openWay == 2) { //微信支付
|
||||
that.$queue.showLoading('支付中...')
|
||||
// #ifdef MP-WEIXIN
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 3
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
|
||||
console.log(ret)
|
||||
if (ret.code == 0) {
|
||||
uni.hideLoading();
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: ret.data.timestamp,
|
||||
nonceStr: ret.data.noncestr,
|
||||
package: ret.data.package,
|
||||
signType: ret.data.signType,
|
||||
paySign: ret.data.sign,
|
||||
success: function(ret) {
|
||||
console.log(ret)
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
that.getOrder()
|
||||
// this.$queue.showToast('支付成功');
|
||||
|
||||
// uni.switchTab({
|
||||
// url: '/pages/my/index'
|
||||
// })
|
||||
},
|
||||
fail: function(err) {
|
||||
// this.$queue.showToast('支付失败');
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'nones'
|
||||
});
|
||||
that.getOrder()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') != -1) {
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 2
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
that.callPay(rea.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: rea.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 4
|
||||
}
|
||||
// debugger;
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
// const urlArr = window.location.href;
|
||||
// const hostUrl = urlArr.split("/");
|
||||
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||
// const url = '&redirect_url=' + callBack + 'my/order/pay';
|
||||
// window.location = rea.mweb_url + url
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
const urlArr = window.location.href;
|
||||
const hostUrl = urlArr.split("/");
|
||||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||
const url = '&redirect_url=' + callBack + 'my/order/pay';
|
||||
window.location = rea.data.mweb_url + url
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: rea.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef APP
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 1
|
||||
}
|
||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||
console.log(rea)
|
||||
that.showpay = false
|
||||
if (rea.code == 0) {
|
||||
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else if (that.openWay == 3) { //支付宝支付
|
||||
that.$queue.showLoading('支付中...')
|
||||
// #ifdef H5
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 2
|
||||
}
|
||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||
rea => {
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
||||
document.body.appendChild(div)
|
||||
document.forms[0].submit()
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
let data = {
|
||||
ordersId: that.order.ordersId,
|
||||
type: 1
|
||||
}
|
||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||
rea => {
|
||||
that.setPayment('alipay', rea.data);
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
|
||||
callPay: function(response) {
|
||||
if (typeof WeixinJSBridge === "undefined") {
|
||||
if (document.addEventListener) {
|
||||
|
@ -1519,6 +1573,10 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.padding-bottom{
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
/deep/.u-drawer{
|
||||
z-index:11 !important;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -84,9 +84,9 @@
|
|||
<view class="margin-top-xl pay-ding">
|
||||
<view class="flex align-center pay-ding-top">
|
||||
<image :src="order.artificer.artificerImg" class="d-touxiang"></image>
|
||||
<view class="margin-left-sm" style="width: 90%;">
|
||||
<view class="flex align-center" style="width: 100%;justify-content: space-between;">
|
||||
<view class="d-title">{{order.artificer.artificerName}}</view>
|
||||
<view class="margin-left-sm flex" style="width: 90%;justify-content: space-between;flex-direction: row;align-items: center;">
|
||||
<view class="flex align-center" style="width: 80%;justify-content: space-between;">
|
||||
<view class="d-title">{{order.artificer.artificerName}}1</view>
|
||||
<!-- <image
|
||||
v-if="order.status !=1 && order.status !=5 && order.status !=3 && order.status !=4 && order.status !=2"
|
||||
src="../../static/img/phone.png" style="width: 10px;height: 13px;margin-left: 11px;"
|
||||
|
@ -94,18 +94,20 @@
|
|||
<!-- <image src="../../static/img/phone.png" class="phone-pay"
|
||||
@click="bindphone(order.artificer.phone)"></image> -->
|
||||
</view>
|
||||
<view class="flex align-center flex-wrap" v-if="order.artificer.ordersCount">
|
||||
<view>{{order.technicianType=='3'?'新手':order.technicianType=='4'?'专家':'资深'}}</view>
|
||||
<!-- <view class="flex align-center flex-wrap" v-if="order.artificer.ordersCount">
|
||||
<view class="margin-right">
|
||||
<image src="../../static/images/start.png" style="width: 24rpx;height: 22rpx;">
|
||||
</image>
|
||||
<text
|
||||
style="color: #F93731;margin-left: 5rpx;">{{order.artificer.ordersCount}}</text>
|
||||
style="color: #F93731;margin-left: 5rpx;">{{order.artificer.ordersCount}}2</text>
|
||||
</view>
|
||||
<text class="margin-bottom-xs box" style="margin-right: 10upx;">健康理疗师</text>
|
||||
</view>
|
||||
<text class="margin-bottom-xs box" style="margin-right: 10upx;">健康理疗师3</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-pay">
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">订单信息</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">订单编号</view>
|
||||
<view class="flex align-center" @tap="copy(order.ordersNo)"
|
||||
|
@ -118,22 +120,52 @@
|
|||
<view style="color: #999;font-size: 26rpx;">预约时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.serveTime}}</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="flex justify-between" v-if="order.startTime" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">开始服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.startTime}}</view>
|
||||
</view> -->
|
||||
<!-- <view class="flex justify-between" v-if="order.endTimes" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">结束服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTimes}}</view>
|
||||
</view> -->
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">预计开始服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.startTime}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">预计结束服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTime}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between bottom-view">
|
||||
<view style="color: #999;font-size: 26rpx;">下单时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.createTime}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.startTime" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">开始服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.startTime}}</view>
|
||||
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">订单费用</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">项目名称</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.ordersMassageList[0].massageType.title}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.endTimes" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">结束服务时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTimes}}</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">服务时长</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.ordersMassageList[0].massageType.duration}}分钟</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.endTime" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">预估结束时间</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.endTime}}</view>
|
||||
<view class="flex justify-between">
|
||||
<view style="color: #999;font-size: 26rpx;">项目价格</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">¥{{order.massagePrice}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">会员折扣</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.vipRate}}%</view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg" style="justify-content: flex-end;border-bottom:1px solid #ccc;padding-bottom:5px ;margin: 5px 0px;">
|
||||
<view style="color: #333;font-size: 26rpx;">小计:</view>
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 35rpx;font-weight: bold;">{{order.massagePrice*(order.vipRate/100)*(1+order.technicianRate/100)}}</text></view>
|
||||
</view>
|
||||
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">出行费用</view>
|
||||
<view class="flex justify-between" v-if="order.tripWay" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">出行方式</view>
|
||||
<view v-if="order.tripWay == 1">公交</view>
|
||||
|
@ -144,14 +176,18 @@
|
|||
<view style="color: #999;font-size: 26rpx;">全程距离</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.km}}km</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.taxiMoney" style="margin-top: 19rpx;">
|
||||
<view class="flex justify-between bottom-view" v-if="order.taxiMoney">
|
||||
<view style="color: #999;font-size: 26rpx;">出行交通费用</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.taxiMoney}}</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">¥{{order.taxiMoney}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between" v-if="order.couponMoney" style="margin-top: 19rpx;">
|
||||
|
||||
<view style="font-size: 14px;font-weight: bold;margin-bottom: 10px;">优惠券信息</view>
|
||||
<view class="flex justify-between justify-between" v-if="order.couponMoney">
|
||||
<view style="color: #999;font-size: 26rpx;">优惠券</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.couponMoney}}</view>
|
||||
<view class="" style="color: #F93731;font-size: 26rpx;">-¥{{order.couponMoney}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="flex justify-between" v-if="order.addNum" style="margin-top: 19rpx;">
|
||||
<view style="color: #999;font-size: 26rpx;">加钟次数</view>
|
||||
<view class="" style="color: #333;font-size: 26rpx;">{{order.addNum}}</view>
|
||||
|
@ -165,6 +201,7 @@
|
|||
<view class="" style="color: #F93731;font-size: 26rpx;">¥{{order.addMoney}}</view>
|
||||
</view>
|
||||
<view class="textarea-pay-list">
|
||||
<view style="color: #999;font-size: 26rpx;margin-bottom: 9px;">备注内容</view>
|
||||
<textarea class="textarea-pay" v-model="order.remark" disabled="disabled" placeholder="请输入备注" name="" maxlength="100"></textarea>
|
||||
</view>
|
||||
<!-- <view class="flex justify-between textarea-pay-list" v-if="order.remark" style="margin-top: 19rpx;background-color: #f3f3f3;padding: 7px;border-radius: 6px;">
|
||||
|
@ -188,7 +225,24 @@
|
|||
<view class="pay-ding feiuong">
|
||||
<view class="fei-title">费用明细</view>
|
||||
<view class="fei-view">
|
||||
<view class="fei-view-list">
|
||||
<view class="flex align-center margin-top-lg justify-between">
|
||||
<view style="color: #333;font-size: 26rpx;">订单费用:</view>
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 26rpx;font-weight: bold;">{{order.massagePrice*(order.vipRate/100)*(1+order.technicianRate/100)}}</text></view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg justify-between" v-if="order.taxiMoney">
|
||||
<view style="color: #333;font-size: 26rpx;">出行费用:</view>
|
||||
<view class="" style="color: #333;">¥<text
|
||||
style="font-size: 26rpx;font-weight: bold;">{{order.taxiMoney}}</text></view>
|
||||
</view>
|
||||
<view class="flex align-center margin-top-lg justify-between">
|
||||
<view style="color: #333;font-size: 26rpx;">优惠券:</view>
|
||||
<view class="" style="color: #F93731;" v-if="order.couponMoney">
|
||||
-¥<text style="font-size: 26rpx;font-weight: bold;">{{order.couponMoney}}</text></view>
|
||||
<view class="" v-else>-</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="fei-view-list">
|
||||
<span>服务价格</span>
|
||||
<span>¥{{order.price}}</span>
|
||||
</view>
|
||||
|
@ -201,14 +255,7 @@
|
|||
<span>会员折扣</span>
|
||||
<span>{{order.vipRate}}%</span>
|
||||
</view>
|
||||
<view class="fei-view-list">
|
||||
<span>技师等级</span>
|
||||
<span>{{order.technicianType=='3'?'新手':order.technicianType=='4'?'专家':'资深'}}</span>
|
||||
</view>
|
||||
<view class="fei-view-list">
|
||||
<span>技师服务佣金上浮比例</span>
|
||||
<span>{{order.technicianRate}}%</span>
|
||||
</view>
|
||||
|
||||
<view class="fei-view-list">
|
||||
<span>服务费用</span>
|
||||
<span>¥{{order.massageMoney}}</span>
|
||||
|
@ -216,7 +263,7 @@
|
|||
<view class="fei-view-list">
|
||||
<span>出行费用</span>
|
||||
<span>¥{{order.taxiMoney}}</span>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="fei-view-list-z">
|
||||
<span>总金额</span>
|
||||
<span style="color: #FF3939;font-size: 29rpx;">¥{{order.sumMoney}}</span>
|
||||
|
@ -1405,6 +1452,12 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bottom-view{
|
||||
margin-top: 9px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/deep/.u-drawer{
|
||||
z-index:11 !important;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<span>{{money}}</span>
|
||||
<span>账户余额(元)</span>
|
||||
</view>
|
||||
<view class="mingxi" @click="goNav('/my/wallet/mymoneydetail')">钱包明细</view>
|
||||
<view class="mingxi" v-if="artificerIdMy==true" @click="goNav('/my/wallet/mymoneydetail')">钱包明细</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money-miao">只能用于平台消费支付,充值后不可退款</view>
|
||||
|
@ -626,6 +626,7 @@
|
|||
title: '支付成功',
|
||||
icon: 'success'
|
||||
})
|
||||
this.getMoney()
|
||||
setTimeout(d => {
|
||||
uni.navigateBack(1)
|
||||
}, 1000);
|
||||
|
@ -652,6 +653,7 @@
|
|||
this.$Request.post('/app/wxPay/payMoney', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.callPay(res.data);
|
||||
this.getMoney()
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
@ -672,6 +674,7 @@
|
|||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||
const url = '&redirect_url=' + callBack + 'my/wallet/index';
|
||||
window.location = res.data.mweb_url + url
|
||||
this.getMoney()
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
@ -699,6 +702,7 @@
|
|||
uni.showToast({
|
||||
title: '支付成功!'
|
||||
});
|
||||
this.getMoney()
|
||||
// const div = document.createElement('div')
|
||||
// div.innerHTML = res.data //此处form就是后台返回接收到的数据
|
||||
// document.body.appendChild(div)
|
||||
|
@ -724,6 +728,7 @@
|
|||
}
|
||||
this.$Request.post("/app/aliPay/payOrderMoney", data).then(ret => {
|
||||
console.log(ret)
|
||||
this.getMoney()
|
||||
this.isCheckPay(ret.code, 'alipay', ret.data);
|
||||
});
|
||||
// #endif
|
||||
|
@ -872,6 +877,7 @@
|
|||
icon: 'none',
|
||||
title: res.msg
|
||||
})
|
||||
this.getMoney()
|
||||
that.moneyNum = null
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
10
pages.json
10
pages.json
|
@ -767,6 +767,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order/payShengji",
|
||||
"style": {
|
||||
"navigationBarTitleText": "升级订单详情",
|
||||
"navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"titleNView": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "order/tousuList",
|
||||
"style": {
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="header-bottom-money-view">
|
||||
服务时长:{{getList.duration}}分钟
|
||||
</view>
|
||||
<view class="header-bottom-title-bottom" v-if="dataList.titleNmae=='服务疗程'">
|
||||
<image src="../../static/my-cika.png" mode=""></image>
|
||||
<span>30天一疗程,每隔三天一次</span>
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
</view>
|
||||
<!-- 数据列表 -->
|
||||
<view v-if="goods.length > 0" class="margin-sm bg" v-for="(item,index) in goods" :key='index'
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" style="border-radius: 20rpx;padding: 36rpx;">
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)" style="border-radius: 20rpx;padding: 36rpx;">
|
||||
<view class="flex justify-between">
|
||||
<view class="flex align-center">
|
||||
<image src="../../static/logo.png" style="width: 48rpx;height: 48rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view class="margin-left-xs ">{{item.artificerName}}</view>
|
||||
</view>
|
||||
<view class="text-green" v-if="item.status ==1"><span>{{item.ordersNo}}</span><span>待付款</span></view>
|
||||
<view class="text-green" v-if="item.status ==1"><span>{{item.ordersNo}}</span><span>待支付</span></view>
|
||||
<view class="text-green" v-if="item.status ==2"><span>{{item.ordersNo}}</span><span>待服务</span></view>
|
||||
<view class="text-green" v-if="item.status ==3"><span>{{item.ordersNo}}</span><span>待评价</span></view>
|
||||
<view class="text-green" v-if="item.status ==4"><span>{{item.ordersNo}}</span><span>已取消</span></view>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<view class="text-green" v-if="item.status ==8"><span>{{item.ordersNo}}</span><span>技师到达</span></view>
|
||||
<view class="text-green" v-if="item.status ==9"><span>{{item.ordersNo}}</span><span>待确认</span></view>
|
||||
<view class="text-green" v-if="item.status ==10"><span>{{item.ordersNo}}</span><span>待补单</span></view>
|
||||
<view class="text-green" v-if="item.status == 11"><span>{{item.ordersNo}}</span><span>临时挂单</span></view>
|
||||
|
||||
<!-- <view class="u-tips-color">{{item.createTime}}</view> -->
|
||||
</view>
|
||||
<view class="margin-top-sm" style="width: 100%;height: 1rpx;background: #f7f7f7;"></view>
|
||||
|
@ -81,14 +81,14 @@
|
|||
</u-button>
|
||||
|
||||
<u-button v-if="item.btnShow == 'true'&&item.status==2||item.status==6||item.status==7||item.status==8||item.status == 9&&!item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item)" class="btns">
|
||||
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns">
|
||||
修改订单
|
||||
</u-button>
|
||||
<u-button v-if="item.status == 5" :custom-style="customStyle1" shape="circle" class="btns" :plain="true" @click="goNav('/my/order/complain?id='+item.ordersId)" >
|
||||
去投诉
|
||||
</u-button>
|
||||
<u-button v-if="item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)">
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
||||
升级项目
|
||||
</u-button>
|
||||
<u-button v-if="item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||
|
@ -114,7 +114,7 @@
|
|||
充值
|
||||
</u-button>
|
||||
<u-button v-if="item.addNum < item.ordersMassageList[0].massageType.addNum && item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)">
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
||||
加钟
|
||||
</u-button>
|
||||
|
||||
|
@ -313,11 +313,21 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
goNav(url,item) {
|
||||
goNav(url,item,text) {
|
||||
this.$queue.setData('xiangmu',item);
|
||||
uni.navigateTo({
|
||||
url:url
|
||||
})
|
||||
if(item.oldOrdersId){//如果有订单有升级 那就去升级订单详情
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payShengji?ordersId='+item.ordersId
|
||||
})
|
||||
}else if(text=='修改'){
|
||||
uni.navigateTo({
|
||||
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:url
|
||||
})
|
||||
}
|
||||
},
|
||||
gengBtn(index){//更多按钮
|
||||
this.btnShow=index
|
||||
|
|
|
@ -0,0 +1,403 @@
|
|||
<!-- 菜单悬浮的原理: 通过给菜单添加position:sticky实现, 用法超简单, 仅APP端的低端机不兼容 https://caniuse.com/#feat=css-sticky -->
|
||||
<template>
|
||||
<view>
|
||||
<view class="sticky-tabs">
|
||||
<u-tabs :list="tabs" :is-scroll="true" :current="tabIndex" @change="tabChange" active-color="#333333"
|
||||
inactive-color="#333333"></u-tabs>
|
||||
</view>
|
||||
<!-- 数据列表 -->
|
||||
<view v-if="goods.length > 0" class="margin-sm bg" v-for="(item,index) in goods" :key='index'
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" style="border-radius: 20rpx;padding: 36rpx;">
|
||||
<view class="flex justify-between">
|
||||
<view class="flex align-center">
|
||||
<image src="../../static/logo.png" style="width: 48rpx;height: 48rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view class="margin-left-xs ">{{item.artificerName}}</view>
|
||||
</view>
|
||||
<view class="text-green" v-if="item.status ==1">待付款</view>
|
||||
<view class="text-green" v-if="item.status ==2">待服务</view>
|
||||
<view class="text-green" v-if="item.status ==3">待评价</view>
|
||||
<view class="text-green" v-if="item.status ==5">已完成</view>
|
||||
<view class="text-green" v-if="item.status ==6">服务中</view>
|
||||
<view class="text-green" v-if="item.status ==7">理疗师出发</view>
|
||||
<view class="text-green" v-if="item.status ==8">理疗师到达</view>
|
||||
<view class="text-green" v-if="item.status ==4" style="color: #333333;">已取消</view>
|
||||
<!-- <view class="u-tips-color">{{item.createTime}}</view> -->
|
||||
</view>
|
||||
<view class="margin-top-sm" style="width: 100%;height: 1rpx;background: #f7f7f7;"></view>
|
||||
<view class=" u-flex u-p-t-30">
|
||||
<view class="u-m-r-10">
|
||||
<u-avatar
|
||||
:src="(item.ordersMassageList && item.ordersMassageList.length > 0 && item.ordersMassageList[0].massageType && item.ordersMassageList[0].massageType.massageImg)?item.ordersMassageList[0].massageType.massageImg: '../../static/logo.png'"
|
||||
mode="square" size="100" style="height: 132rpx;width: 132rpx;flex: 0 0 132rpx;">
|
||||
</u-avatar>
|
||||
</view>
|
||||
<view class="u-flex-1" style="margin-left: 20rpx;">
|
||||
<view class="text-bold u-line-1" style="width: 560rpx;">
|
||||
<view class=" text-lg "
|
||||
v-if="item.ordersMassageList && item.ordersMassageList.length > 0 && item.ordersMassageList[0].massageType && item.ordersMassageList[0].massageType.title"
|
||||
style="font-size: 32rpx;margin-top: 0rpx;display: inline-block;width: 470rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
||||
{{item.ordersMassageList[0].massageType.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;">
|
||||
预约时间:{{item.serveTime}}
|
||||
</view>
|
||||
<view class="flex-sub u-font-12 margin-top-xs" style="color: #999999;">
|
||||
实付:<text class="text-df" style="color: #FF1200;">¥</text><text class="text-xl text-bold" style="color: #FF1200;">{{item.sumMoney}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="flex u-p-t-20 justify-between align-center" style="justify-content: flex-end;">
|
||||
<view class="flex text-right">
|
||||
<u-button
|
||||
v-if="(item.status == 1 || item.status == 2 || item.status == 7 || item.status == 8) && yhqxSel != '否'"
|
||||
:custom-style="customStyle" shape="circle" :plain="true"
|
||||
@click="cancelOrder(item)">取消订单</u-button>
|
||||
<u-button v-if="item.status == 1" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" style="background: linear-gradient(to right, #223845, #00a85b);">去支付</u-button>
|
||||
<u-button v-if="item.status == 2" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" style="background: linear-gradient(to right, #223845, #00a85b);border: 0;">查看详情</u-button>
|
||||
<!-- <u-button v-if="item.status == 6" :custom-style="customStyle" shape="circle" :plain="true"
|
||||
@click="cancel(item)">订单完成</u-button> -->
|
||||
<!-- <u-button v-if="item.state == 2" :custom-style="customStyle" shape="circle" :plain="true" @click="goNav('/my/order/complain?id='+item.ordersId)" >去投诉</u-button> -->
|
||||
<u-button v-if="item.status == 3" :custom-style="customStyle1" style="background: linear-gradient(to right, #223845, #00a85b);border: 0;" shape="circle" :plain="true"
|
||||
@click="goNav('/my/order/feedback?artificerId='+item.artificerId+ '&ordersId='+item.ordersId)">
|
||||
去评价
|
||||
</u-button>
|
||||
<!-- <u-button v-if="item.status == 4" :custom-style="customStyle" shape="circle" :plain="true"
|
||||
@click="delOrder(item)">删除订单</u-button> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="goods.length == 0"></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollMixin from "@/components/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
||||
import mescrollBody from "@/components/mescroll-uni/components/mescroll-body/mescroll-body.vue";
|
||||
import meTabs from "@/components/mescroll-uni/me-tabs/me-tabs.vue";
|
||||
import empty from '@/components/empty.vue'
|
||||
|
||||
export default {
|
||||
mixins: [MescrollMixin], // 使用mixin
|
||||
components: {
|
||||
mescrollBody,
|
||||
meTabs,
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goods: [], // 数据列表
|
||||
game: [],
|
||||
tabs: [{
|
||||
name: '全部',
|
||||
status: '0'
|
||||
}, {
|
||||
name: '待支付',
|
||||
status: '1'
|
||||
}, {
|
||||
name: '待服务',
|
||||
status: '2'
|
||||
}, {
|
||||
name: '理疗师出发',
|
||||
status: '7'
|
||||
}, {
|
||||
name: '理疗师到达',
|
||||
status: '8'
|
||||
}, {
|
||||
name: '服务中',
|
||||
status: '6'
|
||||
}, {
|
||||
name: '待评价',
|
||||
status: '3'
|
||||
}, {
|
||||
name: '已取消',
|
||||
status: '4'
|
||||
}, {
|
||||
name: '已完成',
|
||||
status: '5'
|
||||
}],
|
||||
tabIndex: 0, // tab下标
|
||||
page: 1,
|
||||
limit: 10,
|
||||
userId: 0,
|
||||
status: 1,
|
||||
nickName: '',
|
||||
avatar: '',
|
||||
customStyle: {
|
||||
color: '#999999',
|
||||
border: '4rpx solid #999999',
|
||||
border: "8rpx",
|
||||
width: '180rpx',
|
||||
height: '60rpx',
|
||||
margin: "0 0 0 20rpx",
|
||||
fontSize: '26rpx'
|
||||
},
|
||||
customStyle1: {
|
||||
color: '#FFFFFF',
|
||||
backgroundColor: '',
|
||||
border: "8rpx",
|
||||
width: '180rpx',
|
||||
height: '60rpx',
|
||||
margin: "0 0 0 20rpx",
|
||||
fontSize: '26rpx'
|
||||
},
|
||||
yhqxSel: '否'
|
||||
// customStyle: {
|
||||
// color: '#1789FD',
|
||||
// backgroundColor: '#1E1F31',
|
||||
// border: "8rpx",
|
||||
// width: '180rpx',
|
||||
// height: '54rpx',
|
||||
// margin: "0 0 0 20rpx"
|
||||
// }
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userId = uni.getStorageSync('userId')
|
||||
this.nickName = uni.getStorageSync('nickName')
|
||||
},
|
||||
onShow() {
|
||||
this.yhqxSel = this.$queue.getData("yhqxSel");
|
||||
let SelectIndex = this.$queue.getData('SelectIndex');
|
||||
if (SelectIndex) {
|
||||
this.tabIndex = SelectIndex;
|
||||
this.$queue.remove('SelectIndex')
|
||||
}
|
||||
|
||||
let token = this.$queue.getData('token');
|
||||
if (token) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.getOrderList()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取列表数据
|
||||
getOrderList() {
|
||||
let curTab = this.tabs[this.tabIndex].status
|
||||
|
||||
let data = {
|
||||
status: curTab,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$Request.get('/app/artificer/selectOrdersList', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.hideLoading();
|
||||
console.log(res)
|
||||
if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
|
||||
this.goods = [...this.goods, ...res.data.list]; //追加新数据
|
||||
// this.goods.forEach(ret => {
|
||||
// switch (ret.status) {
|
||||
// case '1':
|
||||
// ret.statusName = '待付款'
|
||||
// break;
|
||||
// case '2':
|
||||
// ret.statusName = '进行中'
|
||||
// break;
|
||||
// case '3':
|
||||
// ret.statusName = '已评价'
|
||||
// break;
|
||||
// case '4':
|
||||
// ret.statusName = '已取消'
|
||||
// break;
|
||||
// case '5':
|
||||
// ret.statusName = '已完成'
|
||||
// break;
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
//联网失败, 结束加载
|
||||
|
||||
});
|
||||
},
|
||||
// 切换菜单
|
||||
tabChange(index) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.tabIndex = index
|
||||
// this.goods = []; // 置空列表,显示加载进度条
|
||||
this.page = 1
|
||||
this.getOrderList()
|
||||
},
|
||||
// 取消订单
|
||||
cancelOrder(e) {
|
||||
let contentName = '';
|
||||
let closeKC = this.$queue.getData('closeKC');
|
||||
if (e.status == 7 || e.status == 8 && closeKC) {
|
||||
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
|
||||
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
|
||||
}
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '是否确认取消订单?' + contentName,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
ordersId: e.ordersId
|
||||
}
|
||||
that.$queue.showLoading('取消中...')
|
||||
that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
that.page = 1
|
||||
that.getOrderList()
|
||||
} else {
|
||||
that.$queue.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/*下拉刷新的回调 */
|
||||
downCallback() {
|
||||
// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
|
||||
// loadSwiper();
|
||||
// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
|
||||
this.mescroll.resetUpScroll()
|
||||
this.page = 1;
|
||||
this.getOrderList();
|
||||
},
|
||||
// 完成订单
|
||||
cancel(e) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认完成订单吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
ordersId: e.ordersId,
|
||||
}
|
||||
that.$queue.showLoading('提交中...')
|
||||
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
that.page = 1
|
||||
that.getOrderList()
|
||||
} else {
|
||||
that.$queue.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//删除
|
||||
delOrder(e) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除订单吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let data = {
|
||||
ordersId: e.ordersId,
|
||||
}
|
||||
that.$queue.showLoading('删除中...')
|
||||
that.$Request.post('/app/artificer/removeOrders', data).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
name: "删除成功"
|
||||
})
|
||||
that.page = 1
|
||||
that.getOrderList()
|
||||
} else {
|
||||
that.$queue.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
goNav(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.page = this.page + 1;
|
||||
this.getOrderList();
|
||||
if (this.totalCount == this.orderList.length) {
|
||||
uni.showToast({
|
||||
title: '已经到底了~',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.getOrderList();
|
||||
setTimeout(d => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 2000)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.u-scroll-box{
|
||||
display: flex;
|
||||
}
|
||||
page {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
/*
|
||||
sticky生效条件:
|
||||
1、父元素不能overflow:hidden或者overflow:auto属性。(mescroll-body设置:sticky="true"即可, mescroll-uni本身没有设置overflow)
|
||||
2、必须指定top、bottom、left、right4个值之一,否则只会处于相对定位
|
||||
3、父元素的高度不能低于sticky元素的高度
|
||||
4、sticky元素仅在其父元素内生效,所以父元素必须是 mescroll
|
||||
*/
|
||||
.sticky-tabs {
|
||||
z-index: 990;
|
||||
position: sticky;
|
||||
top: var(--window-top);
|
||||
// background-color: #fff;
|
||||
}
|
||||
|
||||
// 使用mescroll-uni,则top为0
|
||||
.mescroll-uni,
|
||||
/deep/.mescroll-uni {
|
||||
.sticky-tabs {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-tip {
|
||||
padding: 18upx;
|
||||
font-size: 24upx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
.bg {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
|
@ -102,8 +102,8 @@ class Request {
|
|||
constructor() {
|
||||
this.config = {
|
||||
// baseUrl: 'https://admin.sjajk.com/', // 请求的根域名//生产需替换
|
||||
baseUrl: 'http://120.46.52.165/', // 请求的根域名
|
||||
// baseUrl: 'http://192.168.2.222:8187/',
|
||||
// baseUrl: 'http://120.46.52.165/', // 请求的根域名
|
||||
baseUrl: 'http://192.168.2.222:8187/',
|
||||
// baseUrl: 'http://47.75.182.93:8090/',
|
||||
// 默认的请求头
|
||||
header: {},
|
||||
|
|
Loading…
Reference in New Issue