修改bug 企业预约

This commit is contained in:
Mr.jiang 2024-08-08 08:54:21 +08:00
parent b39f01417e
commit 635a41b2e4
8 changed files with 2285 additions and 212 deletions

View File

@ -135,6 +135,10 @@
uni.navigateTo({//
url:'/my/order/payModifyPt'
})
}else if(this.content=='企业'){
uni.navigateTo({//
url:'/my/order/payModifyQy'
})
}
},

2110
my/order/payModifyQy.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
<view class="bgImg u-skeleton-fillet" v-if="order.ordersPackageList && order.ordersPackageList.length > 0"
style="padding: 0 29rpx;">
<view class="head-top">
<view class="pay-title" style="">{{orderXm.type=='104'?'服务套餐':orderXm.type=='105'?'项目次卡':'服务疗程'}}</view>
<view class="pay-title" style="">{{orderXm.type=='104'?'服务套餐':orderXm.type=='105'?'项目次卡':orderXm.type=='106'?'服务疗程':'服务项目'}}</view>
<view class="flex justify-around">
<view class="" style="width: 160upx;height: 160upx;">
<image :src="order.ordersPackageList[0].packageImg"
@ -24,7 +24,11 @@
</view>
<view class="flex align-center">
<view class="money-pay" style="width: 100%;justify-content: space-between;">
<view class="money-pay-zhen">
<view class="money-pay-zhen" v-if="order.ordersPackageList[0].type =='114'">
<span></span>
<span>{{order.ordersPackageList[0].packagePrice}}/{{order.ordersPackageList[0].num}}</span>
</view>
<view class="money-pay-zhen" v-else>
<span></span>
<span>{{order.sumMoney}}/{{orderXm.serviceCount}}{{orderXm.type=='104'?'套':orderXm.type=='105'?'次':'次'}}</span>
</view>
@ -50,12 +54,16 @@
<view class="pay-ding feiuong">
<view class="fei-title">费用明细</view>
<view class="fei-view">
<view class="fei-view-list">
<span>{{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':'疗程'}}价格</span>
<view class="fei-view-list" v-if="order.ordersPackageList[0].type =='114'">
<span>项目价格</span>
<span>{{order.ordersPackageList[0].packagePrice}}</span>
</view>
<view class="fei-view-list" v-else>
<span>{{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':orderXm.type=='106'?'疗程':'项目'}}价格</span>
<span>{{order.sumMoney}}</span>
</view>
<view class="fei-view-list">
<span>{{orderXm.type=='104'?'套餐':orderXm.type=='105'?'次卡':'疗程'}}数量</span>
<span>{{orderXm.type=='104'?'套餐数量':orderXm.type=='105'?'次卡数量':orderXm.type=='106'?'疗程数量':'项目次数'}}</span>
<span>{{order.ordersPackageList[0].num}}</span>
</view>
<view class="fei-view-list" v-if="order.couponMoney">
@ -710,9 +718,16 @@
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
if(that.order.ordersPackageList[0].type=='114'){
uni.redirectTo({
url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业'
})
}else{
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
}
that.getOrder()
} else {
uni.showToast({
@ -723,49 +738,6 @@
});
} 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: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
// 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) {
@ -773,14 +745,20 @@
ordersId: that.order.ordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.$Request.post('/app/wxPay/payPackageOrder', data).then(rea => {
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
if(that.order.ordersPackageList[0].type=='114'){
uni.redirectTo({
url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业'
})
}else{
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
}
that.callPay(rea.data);
} else {
uni.showToast({
@ -795,7 +773,7 @@
type: 4
}
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.$Request.post('/app/wxPay/payPackageOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -805,9 +783,15 @@
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
if(that.order.ordersPackageList[0].type=='114'){
uni.redirectTo({
url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业'
})
}else{
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
}
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -821,65 +805,34 @@
}
});
}
// #endif
// #ifdef APP
let data = {
ordersId: that.order.ordersId,
type: 1
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #endif
} else if (that.openWay == 3) { //
that.$queue.showLoading('支付中...')
// #ifdef H5
let data = {
var data = {
ordersId: that.order.ordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
that.$Request.post('/app/aliPay/payPackageOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
if(that.order.ordersPackageList[0].type=='114'){
uni.redirectTo({
url:'/pages/shop/index?type='+that.orderXm.type+'&text='+'企业'
})
}else{
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
}
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 => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {

View File

@ -22,7 +22,7 @@
</view>
<view class="money-miao">只能用于平台消费支付充值后不可退款</view>
</view>
<view class="padding-lr">
<view class="padding-lr mian-biew">
<view class="chongzhi">
<span class="yu-e">余额充值</span>
<span v-if="artificerIdMy==true" @click="goNavtherapist('/pages/therapist/therapistDingdan')">为TA充值</span>
@ -50,24 +50,7 @@
</view>
</view>
<view class="padding-lr radius fuqian" style="margin-top: 24rpx;">
<view>
<view class="flex align-center justify-between" style="height: 100upx;padding: 20upx 0;"
v-for="(item,index) in openLists" :key='index'>
<view class="flex align-center">
<image :src="item.image" style="width: 50upx;height: 50upx;border-radius: 50upx; "></image>
<view style="font-size: 30upx;margin-left: 20upx;">{{item.text}}
</view>
</view>
<radio-group name="openWay" style="margin-left: 20upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#019c88" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<!-- <view class="bg radius padding" style="margin-top: 20rpx;margin-bottom: 20rpx;">
<view class="flex align-center justify-between" @click="goNav('/my/wallet/mymoneydetail')">
<view class="flex align-center">
@ -95,7 +78,7 @@
<view class="push-button">
<view class="detail-btn" @click="pay">
<view class="detail-btn" @click="toggle">
确定充值</view>
</view>
</view>
@ -214,64 +197,29 @@
</view>
</view>
<view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popup-content" style="margin-bottom:3rpx;">
<view class="popup-head">
<span>为TA充值</span>
<span @click="closePopup(type)">x</span>
</view>
<view class="popup-mian">
<!-- <view class="popup-mian-textarea">
<view class="popup-mian-view">
<span>原服务项目价格:</span>
<span>198</span>
</view>
<view class="popup-mian-view">
<span>现服务项目价格:</span>
<span>298</span>
</view>
<view class="popup-mian-view">
<span>改价需支付差价:</span>
<span>100</span>
</view>
</view> -->
<view class="chong">
<checkbox-group @change="checkboxChange">
<view class="chong-list">
<view class="chong-list-left">
<!-- 支付方式 -->
<uni-popup ref="popup" type="bottom" background-color="#fff" @change="change">
<view class="popup-content">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
<view class="flex align-center justify-between" style="height: 100upx;padding: 20upx 0;"
v-for="(item,index) in openLists" :key='index'>
<view class="flex align-center">
<image :src="item.image" style="width: 50upx;height: 50upx;border-radius: 50upx; "></image>
<view style="font-size: 30upx;margin-left: 20upx;">{{item.text}}
</view>
</view>
<radio-group name="openWay" style="margin-left: 20upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<checkbox :checked="checkbox" activeBackgroundColor="#096f4b" color="#096f4b" :value="1"/>
<radio color="#019c88" :checked="openWay === item.id ? true : false" />
</label>
<image src="../../static/jinggao.png" mode=""></image>
</view>
<view class="chong-list-right">
<view class="chong-title">
<span>王丽楠</span>
<image src="../../static/xinren.png" mode=""></image>
</view>
<view class="chong-bottom">
<view class="chong-bottom-ding">
<image src="../../static/orderDetail/dingwei.png" mode=""></image>
<span>0.8km</span>
</view>
<view class="chong-bottom-cheng">
<image class="therapist-bottom-img" src="../../static/dituzhaoren5.png">
<span>春城有约</span>
</view>
</view>
</view>
</radio-group>
</view>
</checkbox-group>
</view>
<view class="popup-mian-btn">
<span @click="closePopup(type)">
取消
</span>
<span>
确定
</span>
</view>
</view>
<view class="pay_btn" @click="pay()">确认支付</view>
</view>
</view>
</uni-popup>
@ -412,6 +360,18 @@
},
methods: {
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
closePopup(type){//
this.type = type
this.$refs.popup.close('bottom');
},
toggle(type) {//
this.type = type
// open uni-popup type
this.$refs.popup.open('bottom')
},
checkboxChange(e){//
this.couponId=e.detail.value.join(",");
@ -432,18 +392,7 @@
}
});
},
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
closePopup(type){//
this.type = type
this.$refs.popup.close(type);
},
toggle(type) {//
this.type = type
// open uni-popup type
this.$refs.popup.open(type)
},
//退
TuiPrice() {
@ -664,6 +613,7 @@
icon: 'success'
})
that.getMoney()
that.$refs.popup.close('bottom');
setTimeout(d => {
uni.navigateBack(1)
}, 1000);
@ -695,9 +645,14 @@
}
that.$Request.post('/app/wxPay/payMoney', data).then(res => {
if (res.code == 0) {
uni.showToast({
title: '支付成功!'
});
that.$refs.popup.close('bottom');
that.callPay(res.data);
that.getMoney()
} else {
that.$refs.popup.close('bottom');
uni.showToast({
icon: 'none',
title: '支付失败!'
@ -718,12 +673,16 @@
}
that.$Request.post('/app/wxPay/payMoney', data).then(res => {
if (res.code == 0) {
uni.showToast({
title: '支付成功!'
});
that.$refs.popup.close('bottom');
that.getMoney()
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/wallet/index';
window.location = res.data.mweb_url + url
that.getMoney()
} else {
uni.showToast({
icon: 'none',
@ -754,6 +713,7 @@
uni.showToast({
title: '支付成功!'
});
that.$refs.popup.close('bottom');
that.getMoney()
// const div = document.createElement('div')
// div.innerHTML = res.data //form
@ -964,6 +924,24 @@
</script>
<style scoped>
.mian-biew{
padding-bottom: 100px;
}
.pay_btn{
width: 90%;
margin: 0 auto;
text-align: center;
background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
height: 40px;
border-radius: 28px;
color: #ffffff;
line-height: 40px;
margin-top: 4px;
font-size: 16px;
}
/deep/.uni-popup__wrapper-box{
width: 100%;
}
.shenandou{
color: #019c88;
}
@ -1192,15 +1170,11 @@
padding: 0 20px;
}
.popup-content{
width: 613rpx;
padding-bottom: 10px;
width:100%;
background: #FFFFFF;
border-radius: 40rpx;
display: flex;
flex-direction: column;
}
.coupon-bottom{
font-weight: 400;
font-size: 28rpx;

View File

@ -921,6 +921,15 @@
"titleNView": false
}
}
},{
"path": "order/payModifyQy",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false
}
}
},{
"path": "order/payModifyCi",
"style": {

View File

@ -21,6 +21,7 @@
搜索
</view>
</view>
</view>
<!-- <view class="fenlei">
<z-tabs class="z-tabs-fenlei" :list="tabList" @change="tabChange" @changeClick="changeClick"/>
@ -368,7 +369,7 @@
color: #FFFFFF;
}
.item-view-bottom-qian span:nth-child(5) {
.item-view-bottom-qian span:nth-child(4) {
font-size: 28rpx;
color: #848484;
text-decoration-line: line-through;

View File

@ -8,11 +8,22 @@
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
<span>{{previousPage.name}}</span>
</view>
<!-- <view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue"
@input="input" @clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
搜索
</view>
</view> -->
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue"
@input="input" @clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
<image style="width:30rpx; height:30rpx; margin-right: 10rpx;"
src="../../static/search.png"></image>
搜索
</view>
</view>
@ -203,6 +214,11 @@
url: '/pages/my/pinTuanOderDrtail?id=' + this.previousPage.id + '&limit=' + 10 +
'&page=' + 1 + '&name=' + 'my'
})
}else if (this.previousPage.name == '企业预约'){
uni.reLaunch({
url: '/pages/shop/qiyeDatail?id=' + this.previousPage.id + '&limit=' + 10 +
'&page=' + 1 + '&name=' + 'my'
})
}
},
clear(res) {
@ -519,38 +535,42 @@
.search-btn {
text-align: center;
line-height: 28px;
color: #fff;
color: #019c88;
font-weight: bold;
position: absolute;
right: 14rpx;
top: 25rpx;
height: 29px !important;
right: 19px;
top: 0px;
margin-top: 12px;
font-size: 14px;
display: flex;
align-items: center;
}
/deep/.uni-searchbar__box-icon-search,
.search-btn {
width: 110rpx;
height: 50rpx;
background: #18A689;
border-radius: 31rpx;
// width: 110rpx;
// height: 50rpx;
// background: #18A689;
// border-radius: 31rpx;
}
/deep/.uni-searchbar__box {
height: 30px;
height: 34px;
border-radius: 30px !important;
background-color: #fff !important;
border: 1px solid #09a28a;
padding: 0px;
display: flex;
flex-direction: row;
flex-flow: row-reverse;
position: relative;
margin-top: 4rpx;
}
/deep/.uni-searchbar {
width: 240px;
width: 250px;
border-radius: 31rpx;
padding-right: 24rpx;
}
.service-head-top-left image {

View File

@ -58,7 +58,7 @@
</view>
<view class="detail-foot" v-if="dataList.name=='my'">
<view class="detail-foot-nav">
<span class="detail-foot-nav-text">次卡详情</span>
<span class="detail-foot-nav-text">服务项目</span>
<span class="detail-foot-nav-bor"></span>
</view>
<view class="detail-foot-mian1">
@ -83,7 +83,7 @@
</view>
</view>
<view class="detail-foot-title">
项目次卡
服务项目
</view>
</view>
</view>
@ -124,7 +124,9 @@
tpayMoney: '',
mainId:'',
serviceCount:'',
labels:[]
labels:[],
page:1,
limit:10
}
},
computed: {
@ -173,12 +175,12 @@
})
},
openpay(item) {//
item.serviceCount=this.detailData[0].serviceCount
this.$queue.setData('mainData',item)
this.$queue.setData('detailData',this.detailData)
this.$queue.setData('xiangmu',item)
this.$queue.setData('youhui','');
uni.navigateTo({
url:'/my/order/payModifyCi?ordersId='+item.id
url:'/my/order/payModifyQy?ordersId='+item.id
})
},
checkboxChange(e){
@ -190,8 +192,8 @@
let data = {
type:'114',
mainId: that.dataList.id,
page: that.dataList.page,
limit: that.dataList.limit,
page: that.page,
limit: that.limit,
}
that.$Request.get('/app/massage/packageDetail/findAppPage', data).then(res => {
if (res.code == 0) {