This commit is contained in:
parent
437d14866f
commit
09190c51ac
|
@ -330,7 +330,7 @@
|
||||||
this.orderXm=this.$queue.getData('xiangmu');//上一个页面带过来的全部数据
|
this.orderXm=this.$queue.getData('xiangmu');//上一个页面带过来的全部数据
|
||||||
this.textareaData=this.orderXm.remark
|
this.textareaData=this.orderXm.remark
|
||||||
this.number=this.orderXm.massageNum
|
this.number=this.orderXm.massageNum
|
||||||
console.log('this.orderXm',this.orderXm.technicianType)
|
console.log('this.orderXm',this.orderXm)
|
||||||
this.youhui()
|
this.youhui()
|
||||||
// this.getOrder()
|
// this.getOrder()
|
||||||
// couponMoney
|
// couponMoney
|
||||||
|
|
|
@ -258,6 +258,9 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.detail-foot-mian-txet span:nth-child(1){
|
.detail-foot-mian-txet span:nth-child(1){
|
||||||
color: #777777;
|
color: #777777;
|
||||||
|
@ -357,6 +360,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 5rpx 0rpx;
|
padding: 5rpx 0rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tese span:nth-child(1){
|
.tese span:nth-child(1){
|
||||||
|
@ -408,7 +412,7 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 21rpx;
|
border-radius: 21rpx;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
.jianjie{
|
.jianjie{
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -632,5 +636,8 @@
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -68,7 +68,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-view" style="position: relative;">
|
<view class="detail-view" style="position: relative;">
|
||||||
<image class="detail-view-img" :src="item.massageImg" mode=""></image>
|
<image class="detail-view-img" :src="item.massageImg" mode=""></image>
|
||||||
<span class="img-span">{{item.status=='1'?'已使用':'未使用'}}</span>
|
<span v-if="serviData.name!='index'" class="img-span">{{item.status=='1'?'已使用':'未使用'}}</span>
|
||||||
<view class="detail-view-mina">
|
<view class="detail-view-mina">
|
||||||
<view class="header-bottom-money" style="margin: 7px 0px;">
|
<view class="header-bottom-money" style="margin: 7px 0px;">
|
||||||
<view class="header-bottom-money-zhen">
|
<view class="header-bottom-money-zhen">
|
||||||
|
@ -602,7 +602,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
detail(item){
|
detail(item){
|
||||||
if(item.status=='1'){
|
if(item.status=='1'&&this.serviData.name!='index'){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'该项目已使用!'
|
title:'该项目已使用!'
|
||||||
})
|
})
|
||||||
|
@ -806,6 +806,9 @@
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.header-top image{
|
.header-top image{
|
||||||
width: 706.25rpx;
|
width: 706.25rpx;
|
||||||
|
@ -888,6 +891,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 15px 0px;
|
padding: 15px 0px;
|
||||||
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tese span:nth-child(1){
|
.tese span:nth-child(1){
|
||||||
|
@ -1092,7 +1096,11 @@
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: 100vh;
|
||||||
|
position: relative;
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -81,14 +81,14 @@
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="showBtn" v-if="item.status ==2">
|
<view class="showBtn" v-if="item.status ==2">
|
||||||
<u-button v-if="item.addNum==null&&item.oldOrdersId==null"
|
<u-button
|
||||||
:custom-style="customStyle" shape="circle" :plain="true"
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
class="btns xianshi"
|
class="btns xianshi"
|
||||||
@click="cancelOrder(item)">
|
@click="cancelOrder(item)">
|
||||||
取消订单
|
取消订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button
|
<u-button
|
||||||
v-if="item.btnShow == 'true'&&item.oldOrdersId==null&&!item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
|
v-if="item.btnShow == 'true'" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
|
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
|
||||||
修改订单
|
修改订单
|
||||||
</u-button>
|
</u-button>
|
||||||
|
@ -97,39 +97,112 @@
|
||||||
联系客服
|
联系客服
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="showBtn" :style="{'justify-content':item.status ==6||item.status ==1?'space-between':'flex-end'}">
|
<view class="showBtn" v-if="item.status ==3">
|
||||||
|
<u-button :custom-style="customStyle1" class="btns xianshi" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/feedback?artificerId='+item.artificerId,item)">
|
||||||
|
待评价
|
||||||
|
</u-button>
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" class="btns xianshi" :plain="true"
|
||||||
|
@click="goNav('/my/order/complain?id='+item.ordersId,item)" >
|
||||||
|
去投诉
|
||||||
|
</u-button>
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
|
联系客服
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
<view class="showBtn" v-if="item.status ==4">
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
|
联系客服
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
<view class="showBtn" v-if="item.status ==5">
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
|
联系客服
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
<view class="showBtn" v-if="item.status==6" :style="{'justify-content':item.status ==6||item.status ==1?'space-between':'flex-end'}">
|
||||||
<view class="gengduo" @click.stop="gengBtn(index)" v-show="item.status ==6||item.status ==1">
|
<view class="gengduo" @click.stop="gengBtn(index)" v-show="item.status ==6||item.status ==1">
|
||||||
<!-- v-show="item.status ==6||item.status ==1" -->
|
|
||||||
更多
|
更多
|
||||||
</view>
|
</view>
|
||||||
<u-button
|
<u-button
|
||||||
v-if="item.status != 3 &&
|
v-if="item.addNum==null&&item.oldOrdersId==null"
|
||||||
item.status != 4 &&
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
item.status != 5&&
|
class="btns xianshi"
|
||||||
item.status != 10&&
|
@click="cancelOrder(item)">
|
||||||
item.addNum==null&&item.oldOrdersId==null"
|
取消订单
|
||||||
|
</u-button>
|
||||||
|
<u-button :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/wallet/index?artificerId='+item.artificerId+'&ordersId='+item.ordersId,item)">
|
||||||
|
充值
|
||||||
|
</u-button>
|
||||||
|
<u-button v-if="item.addNum ==null" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
||||||
|
加钟
|
||||||
|
</u-button>
|
||||||
|
|
||||||
|
<view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}">
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
|
联系客服
|
||||||
|
</u-button>
|
||||||
|
<u-button v-if="item.oldOrdersId==null && item.addNum==null" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
||||||
|
服务升级
|
||||||
|
</u-button>
|
||||||
|
<u-button :custom-style="customStyle1" shape="circle" class="btns xianshi" :plain="true" @click="goNav('/my/order/complain?id='+item.ordersId)" >
|
||||||
|
去投诉
|
||||||
|
</u-button>
|
||||||
|
<u-button :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
||||||
|
@click="toggle('center',item)">
|
||||||
|
提前结束
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="showBtn" v-if="item.status ==7">
|
||||||
|
<u-button
|
||||||
:custom-style="customStyle" shape="circle" :plain="true"
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
class="btns xianshi"
|
class="btns xianshi"
|
||||||
@click="cancelOrder(item)">
|
@click="cancelOrder(item)">
|
||||||
取消订单
|
取消订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button
|
<u-button
|
||||||
v-if="item.btnShow == 'true'&&item.oldOrdersId==null&&(item.status==1||item.status==2||item.status==7||item.status==8)&&!item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
|
v-if="item.btnShow == 'true'" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
|
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
|
||||||
修改订单
|
修改订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 10" :custom-style="customStyle1" shape="circle" :plain="true"
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns xianshi">
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
立即预约
|
联系客服
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 3" :custom-style="customStyle1" class="btns xianshi" shape="circle" :plain="true"
|
</view>
|
||||||
@click="goNav('/my/order/feedback?artificerId='+item.artificerId+ '&ordersId='+item.ordersId)">
|
<view class="showBtn" v-if="item.status ==8">
|
||||||
待评价
|
<u-button
|
||||||
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
|
class="btns xianshi"
|
||||||
|
@click="cancelOrder(item)">
|
||||||
|
取消订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 3||item.status == 6" :custom-style="customStyle1" shape="circle" class="btns xianshi" :plain="true" @click="goNav('/my/order/complain?id='+item.ordersId)" >
|
<u-button
|
||||||
去投诉
|
v-if="item.btnShow == 'true'" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/payModifyDzhifu?ordersId='+item.ordersId,item,'修改')" class="btns xianshi">
|
||||||
|
修改订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 9&&item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
|
联系客服
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
|
<view class="showBtn" v-if="item.status ==9">
|
||||||
|
<u-button
|
||||||
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
|
class="btns xianshi"
|
||||||
|
@click="cancelOrder(item)">
|
||||||
|
取消订单
|
||||||
|
</u-button>
|
||||||
|
<u-button v-if="item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="toggleQ('center',item)" class="btns xianshi">
|
@click="toggleQ('center',item)" class="btns xianshi">
|
||||||
拒单详情
|
拒单详情
|
||||||
</u-button>
|
</u-button>
|
||||||
|
@ -137,29 +210,28 @@
|
||||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
联系客服
|
联系客服
|
||||||
</u-button>
|
</u-button>
|
||||||
<view class="showBtn-view" v-if="gengBtnShow==true" :style="gengNum==index?{display:'inline-block'}:{display:'none'}">
|
</view>
|
||||||
<u-button v-if="item.status == 1" :custom-style="customStyle1" shape="circle" :plain="true"
|
<view class="showBtn" v-if="item.status ==10">
|
||||||
@click="goNav('/my/order/payding?ordersId='+item.ordersId,item)" class="btns">
|
<u-button
|
||||||
去支付
|
:custom-style="customStyle" shape="circle" :plain="true"
|
||||||
|
class="btns xianshi"
|
||||||
|
@click="TuiPopup(type,2,item)">
|
||||||
|
取消订单
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.oldOrdersId==null && item.status == 6&&item.addNum==null" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
<u-button v-if="item.packageType=='104'||item.packageType=='105'||item.packageType=='106'" :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
@click="taocanDaiBd('/my/order/payModifyTcMyDaiB?ordersId='+item.ordersId,item)" class="btns xianshi">
|
||||||
服务升级
|
立即预约
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
<u-button v-else :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="toggle('center',item)">
|
@click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns xianshi">
|
||||||
提前结束
|
立即预约
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button v-if="item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
|
||||||
@click="goNav('/my/wallet/index?artificerId='+item.artificerId+'&ordersId='+item.ordersId,item)">
|
@click="goNav('/my/order/pay?ordersId='+item.ordersId)" class="btnsH xianshi">
|
||||||
充值
|
联系客服
|
||||||
</u-button>
|
|
||||||
<u-button v-if="item.addNum ==null && item.status == 6" :custom-style="customStyle1" class="btns" shape="circle" :plain="true"
|
|
||||||
@click="goNav('/my/order/pay?ordersId='+item.ordersId,item)">
|
|
||||||
加钟
|
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -329,9 +401,17 @@
|
||||||
// margin: "0 0 0 20rpx"
|
// margin: "0 0 0 20rpx"
|
||||||
// }
|
// }
|
||||||
earlyFinishReason:'',
|
earlyFinishReason:'',
|
||||||
|
currentDate:new Date()
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
getCurrentTime() {
|
||||||
|
const hours = this.currentDate.getHours().toString().padStart(2, '0');
|
||||||
|
const minutes = this.currentDate.getMinutes().toString().padStart(2, '0');
|
||||||
|
return `${hours}:${minutes}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.userId = uni.getStorageSync('userId')
|
this.userId = uni.getStorageSync('userId')
|
||||||
this.nickName = uni.getStorageSync('nickName');
|
this.nickName = uni.getStorageSync('nickName');
|
||||||
|
@ -358,23 +438,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
taocanDaiBd(url,item){
|
||||||
|
this.$queue.setData('getJishi','');
|
||||||
|
this.$queue.setData('mainData',item);
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
goNav(url,item,text) {
|
goNav(url,item,text) {
|
||||||
this.$queue.setData('xiangmu',item);
|
this.$queue.setData('xiangmu',item);
|
||||||
console.log("oldOrdersId=======",item)
|
console.log("oldOrdersId=======",item)
|
||||||
// if(item.isSupplement=='1'){
|
|
||||||
// uni.navigateTo({
|
if(item.isSupplement=='2'){//如果有订单有升级 那就去升级订单详情
|
||||||
// url:url
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
if(item.oldOrdersId){//如果有订单有升级 那就去升级订单详情
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payShengji?ordersId='+item.ordersId
|
url:'/my/order/payShengji?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
}else if(item.addNum){
|
}else if(item.addNum||(item.addNum&&item.isSupplement=='1')){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
}else if(item.addNum&&item.oldOrdersId){
|
}else if(item.addNum&&item.isSupplement=='2'){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
|
@ -382,17 +466,64 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
|
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
}else if(item.packageType=='104'||item.packageType=='105'||item.packageType=='106'){
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/my/order/paydingTCX?ordersId='+item.ordersId
|
|
||||||
})
|
|
||||||
}else{
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:url
|
url:url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
timeToMilliseconds(timeStr) {
|
||||||
|
// 分割时分为数组
|
||||||
|
let parts = timeStr.split(':');
|
||||||
|
// 确保时和分是数字
|
||||||
|
if (parts.length === 2 && !isNaN(parseInt(parts[0])) && !isNaN(parseInt(parts[1]))) {
|
||||||
|
// 将时和分转换为整数
|
||||||
|
let hours = parseInt(parts[0]);
|
||||||
|
let minutes = parseInt(parts[1]);
|
||||||
|
// 计算并返回毫秒数
|
||||||
|
return (hours * 60 + minutes) * 60 * 1000;
|
||||||
|
} else {
|
||||||
|
// 如果格式不正确,返回0或抛出错误
|
||||||
|
return 0; // 或者 throw new Error('Invalid time format');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取列表数据
|
||||||
|
getOrderList() {
|
||||||
|
let curTab = this.tabs[this.tabIndex].status
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
status: curTab,
|
||||||
|
page: this.page,
|
||||||
|
limit: this.limit
|
||||||
|
}
|
||||||
|
// selectOrdersList
|
||||||
|
this.$Request.get('/app/artificer/selectAppOrdersList', data).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.hideLoading();
|
||||||
|
if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
|
||||||
|
this.goods = [...this.goods, ...res.data.list]; //追加新数据
|
||||||
|
var timestamp = this.timeToMilliseconds(this.getCurrentTime);
|
||||||
|
var twoTime=2* 60 * 60 * 1000;
|
||||||
|
var time='';
|
||||||
|
|
||||||
|
for(var i=0;i<this.goods.length;i++){
|
||||||
|
time=this.timeToMilliseconds(this.goods[i].serveTime.slice(11, 16))
|
||||||
|
if(time - timestamp>twoTime){
|
||||||
|
this.$set(this.goods[i], 'btnShow', 'true')
|
||||||
|
}else{
|
||||||
|
this.$set(this.goods[i], 'btnShow', 'false')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log("this.goods[i].serveTime.slice(15, 16)",this.goods)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(() => {
|
||||||
|
//联网失败, 结束加载
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
gengBtn(index){//更多按钮
|
gengBtn(index){//更多按钮
|
||||||
// console.log("inex=====",index)
|
// console.log("inex=====",index)
|
||||||
this.gengNum=index;
|
this.gengNum=index;
|
||||||
|
@ -409,24 +540,25 @@
|
||||||
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
|
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
|
||||||
this.$refs.popupQ.open(type)
|
this.$refs.popupQ.open(type)
|
||||||
},
|
},
|
||||||
TuiPopup(typeTxte,type){//确认拒单 全额退款.同意按钮 关闭弹出框
|
TuiPopup(typeTxte,type,id){//确认拒单 全额退款.同意按钮 关闭弹出框
|
||||||
this.type = typeTxte
|
var that=this;
|
||||||
|
that.type = typeTxte
|
||||||
let data = {
|
let data = {
|
||||||
ordersId: this.qurenJd.ordersId,
|
ordersId: that.qurenJd.ordersId?that.qurenJd.ordersId:id.ordersId,
|
||||||
isAuto: '0',
|
isAuto: '0',
|
||||||
type: type
|
type: type
|
||||||
}
|
}
|
||||||
this.$Request.post('/app/artificer/cancelSupplementOrders', data).then(res => {
|
that.$Request.post('/app/artificer/cancelSupplementOrders', data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'操作完成!'
|
title:'操作完成!'
|
||||||
})
|
})
|
||||||
this.getOrderList()
|
that.getOrderList()
|
||||||
this.$refs.popupQ.close(typeTxte);
|
that.$refs.popupQ.close(typeTxte);
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon:'error',
|
icon:'error',
|
||||||
title:'操作失败!'
|
title:res.msg
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,54 +663,8 @@
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
getTimeStampWithoutSeconds(date) {
|
|
||||||
// 将日期转换为标准的UTC时间
|
|
||||||
var utcDate = new Date(
|
|
||||||
date.getUTCFullYear(),
|
|
||||||
date.getUTCMonth(),
|
|
||||||
date.getUTCDate(),
|
|
||||||
date.getUTCHours(),
|
|
||||||
date.getUTCMinutes(),
|
|
||||||
0);
|
|
||||||
// 返回不含秒的时间戳
|
|
||||||
return utcDate.getTime();
|
|
||||||
},
|
|
||||||
//获取列表数据
|
|
||||||
getOrderList() {
|
|
||||||
let curTab = this.tabs[this.tabIndex].status
|
|
||||||
|
|
||||||
let data = {
|
|
||||||
status: curTab,
|
|
||||||
page: this.page,
|
|
||||||
limit: this.limit
|
|
||||||
}
|
|
||||||
// selectOrdersList
|
|
||||||
this.$Request.get('/app/artificer/selectAppOrdersList', data).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
|
|
||||||
this.goods = [...this.goods, ...res.data.list]; //追加新数据
|
|
||||||
var date = new Date(); // 当前日期和时间
|
|
||||||
var timestamp = this.getTimeStampWithoutSeconds(date); // 不含秒的时间戳
|
|
||||||
const twoHoursInMilliseconds = 2 * 60 * 60 * 1000; // 两个小时的毫秒数
|
|
||||||
var twoTime=parseInt(new Date(twoHoursInMilliseconds).getTime())
|
|
||||||
var time='';
|
|
||||||
for(var i=0;i<this.goods.length;i++){
|
|
||||||
time=parseInt(new Date(this.goods[i].serveTime).getTime())
|
|
||||||
if(time-timestamp>twoTime){
|
|
||||||
this.$set(this.goods, 'btnShow', 'true')
|
|
||||||
}else{
|
|
||||||
this.$set(this.goods, 'btnShow', 'false')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if(){}
|
|
||||||
}
|
|
||||||
|
|
||||||
}).catch(() => {
|
|
||||||
//联网失败, 结束加载
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 切换菜单
|
// 切换菜单
|
||||||
tabChange(index) {
|
tabChange(index) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
@ -712,6 +798,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.content{
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
.xianshi{
|
.xianshi{
|
||||||
margin: 0px 5px 0px 0px !important;
|
margin: 0px 5px 0px 0px !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,9 +448,7 @@
|
||||||
|
|
||||||
goNav(url,item,text) {
|
goNav(url,item,text) {
|
||||||
this.$queue.setData('xiangmu',item);
|
this.$queue.setData('xiangmu',item);
|
||||||
console.log("oldOrdersId=======",item)
|
if(item.isSupplement=='2'||(item.addNum&&item.isSupplement=='2')){//如果有订单有升级 那就去升级订单详情
|
||||||
|
|
||||||
if(item.oldOrdersId){//如果有订单有升级 那就去升级订单详情
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payShengji?ordersId='+item.ordersId
|
url:'/my/order/payShengji?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
|
@ -458,10 +456,6 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
||||||
})
|
})
|
||||||
}else if(item.addNum&&item.oldOrdersId){
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/my/order/payJaZ?ordersId='+item.ordersId
|
|
||||||
})
|
|
||||||
}else if(text=='修改'){
|
}else if(text=='修改'){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
|
url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId
|
||||||
|
|
Loading…
Reference in New Issue