Commit 4f23052e by zhangzhen

细节优化

parent f8eecbdb
......@@ -503,7 +503,8 @@
5:"星期五",
6:"星期六",
0:"星期日",
}
},
allDayUseStatus: false, // 当日无可预约时段,true 无法预约,false 可预约
};
},
filters: {
......@@ -547,7 +548,6 @@
}
},
methods: {
// 日期切换
onDateChange(k) {
if (this.dateIndex === k || this.orderType ==2) return;
......@@ -556,11 +556,12 @@
this.modeIndex = 0;
this.modeIndex2 = -1;
}
this.allDayUseStatus = false;
this.onGetSortDistance()
},
// 小时标签切换
onChangePackage(index){
if(this.modeIndex == index) return;
if(this.modeIndex == index || this.allDayUseStatus) return;
let startDateTime = this.orderType ==2? this.orderInfo.endDate: ''
......@@ -911,6 +912,12 @@
endDateTime: tempEndDate,
useStatus: moment(tempEndDate).valueOf() - moment(tempStartDate).valueOf() < timeStampLong
}
if(this.modeIndex == 0 && params.useStatus){
// 当前日期,全天可用状态 true 不可用,false 还有可用时段;
this.allDayUseStatus = true;
this.tipErrMsg = "当前日期,空闲时间不足,请选择其他日期"
}
return params
},
......@@ -1188,6 +1195,16 @@
let h = Number(moment().format("HH"))
this.hourList = this.hourList.filter(item => Number(item) >= Number(h));
}
this.checkedDateList = this.formatAllData.startTime.split(":").map((item,index) => {
let n = 0
if(index == 0){
n = this.hourList.findIndex(val => Number(val) == Number(item))
} else if(index ==1 && Number(item)%5 == 0) {
n = this.minuteList.findIndex(val => Number(val) == Number(item))
}
return n
})
this.$refs.popup.open();
}
},
......
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