Commit 3b7daf0c by zhangzhen

细节优化

parent 6e7fe225
...@@ -273,6 +273,7 @@ ...@@ -273,6 +273,7 @@
this.$refs.popup.open() this.$refs.popup.open()
uni.hideLoading() uni.hideLoading()
} }
this.objListDate = [];
this.onGetListStore() this.onGetListStore()
} }
}) })
......
...@@ -672,15 +672,17 @@ ...@@ -672,15 +672,17 @@
let end = Number(this.endTime.split(":")[0]) let end = Number(this.endTime.split(":")[0])
let endM = Number(this.endTime.split(":")[1]) let endM = Number(this.endTime.split(":")[1])
if(this.setStartTime.days >=2){ // if(this.setStartTime.days >=2){
start +=24 // start +=24
this.setStartTime.days = 1 // this.setStartTime.days = 1
} // }
if(this.orderType ==1 && end <= start) {
if (this.orderType ==2 && end < start){
end += 24 end += 24
} else if (this.orderType ==2 && end < start){ }else if(this.orderType ==1 && end <= start) {
end += 24 end += 24
} }
// 重新将数据还原到元数据 // 重新将数据还原到元数据
this.intervalList = [ this.intervalList = [
...this.dateIntervalList ...this.dateIntervalList
...@@ -794,13 +796,13 @@ ...@@ -794,13 +796,13 @@
}, },
// 下单模式切换 // 下单模式切换
onTypeChange(i) { onTypeChange(i) {
if (this.orderType == 2) { // if (this.orderType == 2) {
uni.showToast({ // uni.showToast({
icon: 'none', // icon: 'none',
title: '房间续单无法选择套餐模式' // title: '房间续单无法选择套餐模式'
}) // })
return // return
} // }
if (this.index === i || !this.packageMode.length) return; if (this.index === i || !this.packageMode.length) return;
this.index = i this.index = i
this.modeIndex = 0; this.modeIndex = 0;
...@@ -1110,7 +1112,10 @@ ...@@ -1110,7 +1112,10 @@
let startArr = startTime.split(":") let startArr = startTime.split(":")
let endArr = endTime.split(":") let endArr = endTime.split(":")
obj.startDate = `${this.dateList[this.dateIndex].readDate} ${startTime}:00` obj.startDate = `${this.dateList[this.dateIndex].readDate} ${startTime}:00`
if (Number(endArr[0]) <= Number(startArr[0])) { if (this.orderType == 1 && Number(endArr[0]) <= Number(startArr[0])) {
obj.endDate =
`${moment(this.dateList[this.dateIndex].readDate).add(1,"days").format("YYYY-MM-DD")} ${endTime}:00`
}else if(this.orderType == 2 && Number(endArr[0]) < Number(startArr[0])) {
obj.endDate = obj.endDate =
`${moment(this.dateList[this.dateIndex].readDate).add(1,"days").format("YYYY-MM-DD")} ${endTime}:00` `${moment(this.dateList[this.dateIndex].readDate).add(1,"days").format("YYYY-MM-DD")} ${endTime}:00`
} else { } else {
......
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