订单 提前结束 加非空检验

This commit is contained in:
Mr.jiang 2024-07-04 22:45:05 +08:00
parent 5cb8291e0b
commit eee5e792dc
15 changed files with 602 additions and 457 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<view> <view class="content-view">
<view class="flex align-center justify-between you-nav"> <view class="flex align-center justify-between you-nav">
<view v-for="(item,index) in tab" :key="index" class="text-center box" <view v-for="(item,index) in tab" :key="index" class="text-center box"
:class="tabIndex == index?'tanColor':''" @click="bindTab(item.state)"> :class="tabIndex == index?'tanColor':''" @click="bindTab(item.state)">
@ -181,6 +181,26 @@
</script> </script>
<style scoped> <style scoped>
.content-view{
height: 100vh;
width: 100%;
overflow: hidden;
}
.you-nav{
background: #FFFFFF;
padding: 14px 25px 0px 25px;
position: fixed;
top: 0;
width: 100%;
z-index: 66;
}
/deep/.refresh-body{
box-sizing: border-box;
height: 830px!important;
padding-top: 0px !important;
margin-top: 42px;
}
/deep/.page-box{ /deep/.page-box{
width: 100%; width: 100%;
} }

View File

@ -151,12 +151,13 @@
page:this.page, page:this.page,
limit:this.size, limit:this.size,
status:this.tabIndex, status:this.tabIndex,
minMoney:this.$queue.getData('minMoney') minMoney:this.priceDd
} }
this.$Request.getT('/app/coupon/selectUserCouponList',data).then(res => { this.$Request.getT('/app/coupon/selectUserCouponList',data).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (this.page == 1) this.hongbao = []; // if (this.page == 1) this.hongbao = []; //
this.hongbao = [...this.hongbao, ...res.data.list]; // this.hongbao = [...this.hongbao, ...res.data.list]; //
console.log("hongbao",this.hongbao)
// uni.stopPullDownRefresh() // uni.stopPullDownRefresh()
// if (this.page == 1) { // if (this.page == 1) {
// this.hongbao = []; // this.hongbao = [];

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="content"> <view class="content">
<view class="header-view"> <view class="header-view">
-提交好评或建议帮助盛安做得更好 ~ 当你累了 想起盛安到家 ~
</view> </view>
<view class="box"> <view class="box">
<view class="feedback-title"> <view class="feedback-title">
@ -124,7 +124,9 @@
title: '评价成功' title: '评价成功'
}); });
setTimeout(function() { setTimeout(function() {
uni.navigateBack(); uni.switchTab({
url:'/pages/order/index'
})
}, 1000); }, 1000);
} else { } else {
uni.hideLoading(); uni.hideLoading();

View File

@ -290,6 +290,7 @@
</view> </view>
<view class="showBtn" v-if="order.status==6" :style="{'justify-content':order.status ==6||order.status ==1?'space-between':'flex-end'}"> <view class="showBtn" v-if="order.status==6" :style="{'justify-content':order.status ==6||order.status ==1?'space-between':'flex-end'}">
<view class="gengduo" @click.stop="gengBtn">更多</view> <view class="gengduo" @click.stop="gengBtn">更多</view>
<view style="display: flex;flex-direction: row;align-items: center;justify-content: flex-end">
<u-button <u-button
shape="circle" :plain="true" shape="circle" :plain="true"
@click="toggle('center',order)" @click="toggle('center',order)"
@ -310,6 +311,7 @@
class="btns"> class="btns">
加钟 加钟
</u-button> </u-button>
</view>
<view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}"> <view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}">
<u-button :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat" <u-button :custom-style="customStyle2" shape="circle" :plain="true" @click="goChat"
class="dingshi">联系客服</u-button> class="dingshi">联系客服</u-button>
@ -364,7 +366,7 @@
class="dingshi">联系客服</u-button> class="dingshi">联系客服</u-button>
</view> </view>
<view class="showBtn" v-if="order.status ==9"> <view class="showBtn" v-if="order.status ==9">
<u-button class="dingshi" @click="cancelOrder(order)" shape="circle" :custom-style="customStyle" :hair-line="false" <u-button class="dingshi" @click="TuiPopup(type,2,order)" shape="circle" :custom-style="customStyle" :hair-line="false"
> >
取消订单 取消订单
</u-button> </u-button>
@ -1059,6 +1061,8 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
console.log("earlyFinishReason",that.earlyFinishReason)
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -1077,13 +1081,13 @@
uni.showToast({ uni.showToast({
title:'操作完成!' title:'操作完成!'
}) })
that.getOrder() // that.getOrder()
that.$refs.popup.close(type); that.$refs.popup.close(type);
}else{ }else{
that.getOrder() // that.getOrder()
uni.showToast({ uni.showToast({
icon:'error', icon:'error',
title:'操作失败' title:'操作失败11'
}) })
} }
@ -1094,7 +1098,7 @@
}, },
fail: function(e) { fail: function(e) {
that.getOrder() // that.getOrder()
// #ifdef H5 // #ifdef H5
uni.showToast({ uni.showToast({
title:'获取地址失败!' title:'获取地址失败!'
@ -1106,6 +1110,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -1039,6 +1039,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -1086,6 +1087,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -1054,7 +1054,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -1101,6 +1101,13 @@
// #endif // #endif
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//

View File

@ -1054,7 +1054,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -1102,6 +1102,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -706,7 +706,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -754,6 +754,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -620,6 +620,9 @@
}) })
this.getOrder() this.getOrder()
this.$refs.popupQ.close(typeTxte); this.$refs.popupQ.close(typeTxte);
uni.switchTab({
url:'/pages/order/index'
})
}else{ }else{
this.getOrder() this.getOrder()
uni.showToast({ uni.showToast({
@ -644,7 +647,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -665,6 +668,9 @@
}) })
that.getOrder() that.getOrder()
that.$refs.popup.close(type); that.$refs.popup.close(type);
uni.switchTab({
url:'/pages/order/index'
})
}else{ }else{
that.getOrder() that.getOrder()
uni.showToast({ uni.showToast({
@ -692,6 +698,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;
@ -780,8 +793,7 @@
}); });
}, },
goOrder(item) { goOrder(item) {
console.log("item=====>",item)
console.log("order=====>",this.order)
let that = this let that = this
let data = { let data = {
classifyId:item.classifyId, classifyId:item.classifyId,
@ -826,6 +838,9 @@
icon: 'none' icon: 'none'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
@ -863,6 +878,9 @@
icon: 'none' icon: 'none'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
// this.$queue.showToast(''); // this.$queue.showToast('');
// uni.switchTab({ // uni.switchTab({
@ -893,6 +911,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.callPay(rea.data); that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -913,6 +934,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -934,6 +958,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
} }
}); });
// #endif // #endif
@ -950,6 +977,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -962,6 +992,9 @@
rea => { rea => {
that.showpay = false that.showpay = false
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
} }
@ -1057,7 +1090,9 @@
uni.showToast({ uni.showToast({
name: "删除成功" name: "删除成功"
}) })
uni.navigateBack() uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }
@ -1108,6 +1143,9 @@
title: '支付成功' title: '支付成功'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -1147,6 +1185,9 @@
icon: 'none' icon: 'none'
}) })
that.getOrder() that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
// this.$queue.showToast(''); // this.$queue.showToast('');
// uni.switchTab({ // uni.switchTab({
@ -1177,6 +1218,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.callPay(rea.data); that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1203,6 +1247,9 @@
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay'; const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url window.location = rea.data.mweb_url + url
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: rea.msg, title: rea.msg,
@ -1224,6 +1271,9 @@
that.showpay = false that.showpay = false
if (rea.code == 0) { if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
} }
}); });
// #endif // #endif
@ -1240,6 +1290,9 @@
div.innerHTML = rea.data //form div.innerHTML = rea.data //form
document.body.appendChild(div) document.body.appendChild(div)
document.forms[0].submit() document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
@ -1251,6 +1304,9 @@
that.$Request.post('/app/aliPay/payOrder', data).then( that.$Request.post('/app/aliPay/payOrder', data).then(
rea => { rea => {
that.setPayment('alipay', rea.data); that.setPayment('alipay', rea.data);
uni.switchTab({
url:'/pages/order/index'
})
}); });
// #endif // #endif
} }
@ -1351,6 +1407,9 @@
that.$Request.post('/app/artificer/deleteOrders', data).then(res => { that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder() that.getOrder()
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
@ -1377,7 +1436,9 @@
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
uni.navigateBack() uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -623,7 +623,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -671,6 +671,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -692,7 +692,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -740,6 +740,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -99,7 +99,7 @@
</view> </view>
<view class="showBtn" v-if="item.status ==3"> <view class="showBtn" v-if="item.status ==3">
<u-button :custom-style="customStyle1" class="btns xianshi" shape="circle" :plain="true" <u-button :custom-style="customStyle1" class="btns xianshi" shape="circle" :plain="true"
@click="goNav('/my/order/feedback?artificerId='+item.artificerId,item)"> @click="goNav('/my/order/feedback?artificerId='+item.artificerId+'&ordersId='+item.ordersId,item)">
待评价 待评价
</u-button> </u-button>
<u-button :custom-style="customStyle1" shape="circle" class="btns xianshi" :plain="true" <u-button :custom-style="customStyle1" shape="circle" class="btns xianshi" :plain="true"
@ -587,7 +587,7 @@
tiqian(type){// tiqian(type){//
var that=this; var that=this;
that.type = type; that.type = type;
if(that.earlyFinishReason){
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (resa) { success: function (resa) {
@ -635,6 +635,13 @@
} }
}); });
}else{
uni.showToast({
icon:'error',
title:'请输入提前结束原因!'
})
}
}, },
toggle(type,item) {// toggle(type,item) {//
this.tiqianData=item; this.tiqianData=item;

View File

@ -49,7 +49,7 @@
<view class="oder-mian"> <view class="oder-mian">
<view class="oder-mian-left"> <view class="oder-mian-left">
<span>ID:{{order.artificerId}}</span> <span>ID:{{order.invitationCode}}</span>
<span>·</span> <span>·</span>
<span>{{order.collectCount}} 关注</span> <span>{{order.collectCount}} 关注</span>
</view> </view>

View File

@ -1344,7 +1344,7 @@ import permision from "@/components/permission.js";
color: #13141A; color: #13141A;
} }
.keyuyue{ .keyuyue{
width: 160rpx; // width: 160rpx;
height: 20px; height: 20px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -1352,7 +1352,7 @@ import permision from "@/components/permission.js";
background: linear-gradient(90deg, #fee9ca, #fde4c6); background: linear-gradient(90deg, #fee9ca, #fde4c6);
border: 1px #decbae solid; border: 1px #decbae solid;
border-radius: 30rpx 30rpx 30rpx 2rpx; border-radius: 30rpx 30rpx 30rpx 2rpx;
padding: 3rpx 15rpx; padding: 3rpx 18rpx;
color:#8d500f; color:#8d500f;
font-size: 22rpx; font-size: 22rpx;
margin-left: 15rpx; margin-left: 15rpx;

View File

@ -10,9 +10,9 @@
<u-search class="flex-sub" placeholder="请输入技师名字" :focus="false" shape="square" v-model="artificerName" <u-search class="flex-sub" placeholder="请输入技师名字" :focus="false" shape="square" v-model="artificerName"
:show-action="true" :animation="true" bg-color="#f5f5f5" color="#1A1A1A" @search="onSearch()" :show-action="true" :animation="true" bg-color="#f5f5f5" color="#1A1A1A" @search="onSearch()"
action-text="搜索" @custom="onSearch()"></u-search> action-text="搜索" @custom="onSearch()"></u-search>
<view class="flex align-center justify-between"> <!-- <view class="flex align-center justify-between">
<selectSwitchDitu @change="switch1Change" /> <selectSwitchDitu @change="switch1Change" />
</view> </view> -->
</view> </view>
</view> </view>
<view class="liebiao" v-show="current === 0"> <view class="liebiao" v-show="current === 0">
@ -83,11 +83,11 @@
</view> </view>
<view> <view>
<view class="terap-button" v-if="item.status == 1" @click.stop="goOrder(item)"> <view class="terap-button" v-if="item.status == 1" @click.stop="goOrder(item)">
立即预约 确认
</view> </view>
<view class="text-center text-sm" @click.stop="showTips()" v-else <view class="text-center text-sm" @click.stop="showTips()" v-else
style="background: #d9d9d9;color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;"> style="background: #d9d9d9;color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;">
立即预约 确认
</view> </view>
</view> </view>
</view> </view>
@ -195,11 +195,11 @@
<view class="text-center make-now" v-if="getOrderByCurrentMarkerIndex().status == 1" <view class="text-center make-now" v-if="getOrderByCurrentMarkerIndex().status == 1"
style="background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;" style="background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;"
@click.stop="goOrder(getOrderByCurrentMarkerIndex())"> @click.stop="goOrder(getOrderByCurrentMarkerIndex())">
立即预约 确认
</view> </view>
<view class="text-center make-now1" @click.stop="showTips()" v-else <view class="text-center make-now1" @click.stop="showTips()" v-else
style="background: #d9d9d9;color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;"> style="background: #d9d9d9;color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;">
立即预约 确认
</view> </view>
@ -1381,7 +1381,7 @@
color: #13141A; color: #13141A;
} }
.keyuyue{ .keyuyue{
width: 160rpx; // width: 160rpx;
height: 20px; height: 20px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -1389,7 +1389,7 @@
background: linear-gradient(90deg, #fee9ca, #fde4c6); background: linear-gradient(90deg, #fee9ca, #fde4c6);
border: 1px #decbae solid; border: 1px #decbae solid;
border-radius: 30rpx 30rpx 30rpx 2rpx; border-radius: 30rpx 30rpx 30rpx 2rpx;
padding: 3rpx 15rpx; padding: 3rpx 18rpx;
color:#8d500f; color:#8d500f;
font-size: 22rpx; font-size: 22rpx;
margin-left: 15rpx; margin-left: 15rpx;