Commit 15b353c5 by zhangzhen

细节优化

parent 623687f3
......@@ -99,7 +99,8 @@ import moment from "@/common/moment";
2:'维护中',
3:'待保洁',
4:'保洁中',
5:'未保洁'
5:'未保洁',
6:'已下架'
},
colorEnum:{
0:"#6fc544",
......@@ -107,7 +108,8 @@ import moment from "@/common/moment";
2:"#4aa3ff",
3:"#ff494e",
4:"#ff49ef",
5:"#ff0000"
5:"#ff0000",
6:"#999999",
},
colorList:[
{
......@@ -180,7 +182,7 @@ import moment from "@/common/moment";
roolList: item.roolList && item.roolList.length ? item.roolList.map(val=>{
return {
...val,
colorStatus: val.isDirtyRoom>=1 && val.recordsStatus===0 ? 5 : val.recordsStatus>=0&& val.recordsStatus=== 0? 3: val.recordsStatus >= 0&& val.recordsStatus=== 1? 4: val.status
colorStatus: val.roomStat ===3? 2 : val.roomStat ===2? 6: val.isDirtyRoom>=1 && val.recordsStatus===0 ? 5 : val.recordsStatus>=0&& val.recordsStatus=== 0? 3: val.recordsStatus >= 0&& val.recordsStatus=== 1? 4: val.status
}
}):[]
}
......@@ -220,7 +222,7 @@ import moment from "@/common/moment";
})
},
onNavSearch(val){
if(val.recordsStatus == 0 || val.recordsUserId == this.userInfo.id){
if(val.roomStat === 1 && (val.recordsStatus == 0 || val.recordsUserId == this.userInfo.id)){
uni.navigateTo({
url:"/pages/cleanOrderInfo/cleanOrderInfo?id="+val.recordsId
})
......
......@@ -63,7 +63,10 @@
</view>
<view class="price">
<view class="">
<view class='cu-tag radius line-red' v-if="item.isDirtyRoom >= 1">
<view class='cu-tag radius line-orange' v-if="item.roomStat >= 3">
维护
</view>
<view class='cu-tag radius line-red' v-else-if="item.isDirtyRoom >= 1">
未保洁
</view>
<view v-else class='cu-tag radius'
......@@ -407,6 +410,13 @@
})
},
onNavToOrder(item) {
if (item.roomStat >= 3) {
uni.showToast({
icon: "none",
title: '当前房间维护中,无法预定,请选择其他房间'
})
return
}
if (item.isDirtyRoom >= 1) {
uni.showToast({
icon: "none",
......@@ -585,7 +595,7 @@
height: 98upx;
text {
font-size: 40rpx;
font-size: 36rpx;
font-weight: 600;
color: #3D3D3D;
line-height: 58rpx;
......
......@@ -1140,6 +1140,13 @@
})
},
onOrderConfirm() {
if(this.roomInfo.roomStat >=3){
uni.showToast({
icon:"none",
title:'当前房间维护中,无法预定,请选择其他房间'
})
return;
}
if(this.roomInfo.isDirtyRoom >=1){
uni.showToast({
icon:"none",
......@@ -1492,7 +1499,10 @@
}else{
this.dateIndex+=1;
}
this.onGetSortDistance();
//房间维护就不循环
if(this.roomInfo.roomStat !==3){
this.onGetSortDistance();
}
return;
}else{
let startDateTime= "";
......@@ -1508,7 +1518,10 @@
let i = this.dateList.findIndex(item => item.readDate === startDateTime)
if(this.dateIndex !== i && this.dateIndex>=0){
this.dateIndex = i;
this.onGetSortDistance();
//房间维护就不循环
if(this.roomInfo.roomStat !==3){
this.onGetSortDistance();
}
return;
}
this.onSetEndTime()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment