Commit 15b353c5 by zhangzhen

细节优化

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