Commit fafe41f3 by zhangzhen

优化

parent c3ac9059
......@@ -603,11 +603,11 @@
onCheckPackageUse(valData){
let useStatus = true;
let startStr = `${this.dateList[this.dateIndex].readDate} ${valData.packaStartPeriod}:00:00`
let startStr = `${this.dateList[this.dateIndex].readDate} ${Number(valData.packaStartPeriod)>= 10 ?valData.packaStartPeriod: '0'+valData.packaStartPeriod}:00:00`
let startDate = moment(moment().format(startStr)).format("YYYY-MM-DD HH:00:00");
let endStr = `${this.dateList[this.dateIndex].readDate} ${valData.packaEndPeriod}:00:00`
let endStr = `${this.dateList[this.dateIndex].readDate} ${Number(valData.packaEndPeriod)>= 10 ?valData.packaEndPeriod: '0'+valData.packaEndPeriod}:00:00`
let endDate = moment(moment().format(endStr)).format("YYYY-MM-DD HH:00:00");
console.log(startDate,endDate,6666)
console.log(startStr,endStr,6666)
// 如果是续单,则订单的结束时间必须在套餐的开始时间和结束时间内,否则无法续对应的套餐
if(this.orderType == 2){
if(!(moment(this.orderInfo.endDate).valueOf() >= moment(startDate).valueOf() && moment(this.orderInfo.endDate).valueOf() <= moment(endDate).valueOf())){
......@@ -670,10 +670,12 @@
if(this.modeIndex2 == index || !val.show) return;
this.tempPackageIndex = index;
let startStr = `${this.dateList[this.dateIndex].readDate} ${this.packageMode[this.tempPackageIndex].packaStartPeriod}:00:00`
let hStartStr = this.packageMode[this.tempPackageIndex].packaStartPeriod
let startStr = `${this.dateList[this.dateIndex].readDate} ${Number(hStartStr)>= 10 ?hStartStr:'0'+hStartStr}:00:00`
let startDate = moment(moment().format(startStr)).format("YYYY-MM-DD HH:00:00");
let endStr = `${this.dateList[this.dateIndex].readDate} ${this.packageMode[this.tempPackageIndex].packaEndPeriod}:00:00`
let hEndtStr = this.packageMode[this.tempPackageIndex].packaEndPeriod
let endStr = `${this.dateList[this.dateIndex].readDate} ${Number(hEndtStr)>= 10 ?hEndtStr:'0'+hEndtStr}:00:00`
let endDate = moment(moment().format(endStr)).format("YYYY-MM-DD HH:00:00");
// 如果此套餐的结束时间在11点前,则为通宵套餐,会在当天及明天进行找合适的时间段,否则则没有合适的套餐时段
......
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