|
...
|
...
|
@@ -78,6 +78,7 @@ Page({ |
|
|
|
*/
|
|
|
|
reserve_id: '',
|
|
|
|
checkedTables:{},//已选中的桌子集合
|
|
|
|
year:util.unixtoTime(new Date() / 1000,'YYYY'),
|
|
|
|
onLoad: async function (options) {
|
|
|
|
this.initLoad(options)
|
|
|
|
this.getCustomRemark();
|
|
...
|
...
|
@@ -214,6 +215,9 @@ Page({ |
|
|
|
let key = util.attr(e, 'key');
|
|
|
|
let val;
|
|
|
|
let sobj = {};
|
|
|
|
if (key == 'date') {
|
|
|
|
this.year=util.unixtoTime(new Date() / 1000,'YYYY');
|
|
|
|
}
|
|
|
|
if (e.type == 'input' || e.type == 'confirm') {
|
|
|
|
val = util.val(e);
|
|
|
|
if (key == 'phone') {
|
|
...
|
...
|
@@ -321,7 +325,7 @@ Page({ |
|
|
|
}
|
|
|
|
console.log('getTables-tableid', tableid, tableid.length);
|
|
|
|
try {
|
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
|
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time,null,null,this.year);
|
|
|
|
console.log('rdate', this.data.dateStr[this.data.form.date], rdate);
|
|
|
|
App.Reserve.GetTableList({
|
|
|
|
sid: util.cache('enter_params')['seller_id'],
|
|
...
|
...
|
@@ -390,6 +394,7 @@ Page({ |
|
|
|
tables: tables,
|
|
|
|
tablesLength: tablesLength
|
|
|
|
})
|
|
|
|
this.conditionInfo();
|
|
|
|
})
|
|
|
|
} catch (e) {
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -402,10 +407,10 @@ Page({ |
|
|
|
try {
|
|
|
|
let d_stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[this.data.form.time]];
|
|
|
|
let d_rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
|
|
|
this.data.form.time, d_stimestr);
|
|
|
|
this.data.form.time, d_stimestr,null,this.year);
|
|
|
|
let stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[0]];
|
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
|
|
|
this.data.form.time, stimestr);
|
|
|
|
this.data.form.time, stimestr,null,this.year);
|
|
|
|
console.log('stimestr', stimestr, this.data.form.time, this.data.timePickerIndex);
|
|
|
|
console.log('rdate', rdate);
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -486,6 +491,8 @@ Page({ |
|
|
|
console.log(event);
|
|
|
|
//let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
|
|
|
|
let cktime = util.timetouUnix(event.detail.date)
|
|
|
|
this.year=event.detail.date.substr(0, 4);
|
|
|
|
console.log('this.year',this.year);
|
|
|
|
let day0 = parseInt(new Date(new Date().setHours(0, 0, 0, 0)) / 1000);
|
|
|
|
// if (cktime < day0) {
|
|
|
|
// util.toast('请选择有效日期', 'none');
|
|
...
|
...
|
@@ -515,7 +522,7 @@ Page({ |
|
|
|
})
|
|
|
|
},
|
|
|
|
async selectdesk(){
|
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
|
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time,null,null,this.year);
|
|
|
|
console.log(this.data.form)
|
|
|
|
wx.navigateTo({
|
|
|
|
url: 'b_desk?rdate=' + rdate + '&tid=' + this.data.form.tabid
|
|
...
|
...
|
@@ -676,6 +683,7 @@ Page({ |
|
|
|
console.log('initQuick', options);
|
|
|
|
this.checkedTables[options.tid]=options.tname
|
|
|
|
options.ddate=options.ddate.substr(0,10);
|
|
|
|
this.year=util.unixtoTime(options.ddate,'YYYY');
|
|
|
|
//设置日期
|
|
|
|
let obj = await this.setDateStr(options.ddate);
|
|
|
|
//设置时间
|
...
|
...
|
|