|
@@ -78,6 +78,7 @@ Page({ |
|
@@ -78,6 +78,7 @@ Page({ |
|
78
|
*/
|
78
|
*/
|
|
79
|
reserve_id: '',
|
79
|
reserve_id: '',
|
|
80
|
checkedTables:{},//已选中的桌子集合
|
80
|
checkedTables:{},//已选中的桌子集合
|
|
|
|
81
|
+ year:util.unixtoTime(new Date() / 1000,'YYYY'),
|
|
81
|
onLoad: async function (options) {
|
82
|
onLoad: async function (options) {
|
|
82
|
this.initLoad(options)
|
83
|
this.initLoad(options)
|
|
83
|
this.getCustomRemark();
|
84
|
this.getCustomRemark();
|
|
@@ -214,6 +215,9 @@ Page({ |
|
@@ -214,6 +215,9 @@ Page({ |
|
214
|
let key = util.attr(e, 'key');
|
215
|
let key = util.attr(e, 'key');
|
|
215
|
let val;
|
216
|
let val;
|
|
216
|
let sobj = {};
|
217
|
let sobj = {};
|
|
|
|
218
|
+ if (key == 'date') {
|
|
|
|
219
|
+ this.year=util.unixtoTime(new Date() / 1000,'YYYY');
|
|
|
|
220
|
+ }
|
|
217
|
if (e.type == 'input' || e.type == 'confirm') {
|
221
|
if (e.type == 'input' || e.type == 'confirm') {
|
|
218
|
val = util.val(e);
|
222
|
val = util.val(e);
|
|
219
|
if (key == 'phone') {
|
223
|
if (key == 'phone') {
|
|
@@ -321,7 +325,7 @@ Page({ |
|
@@ -321,7 +325,7 @@ Page({ |
|
321
|
}
|
325
|
}
|
|
322
|
console.log('getTables-tableid', tableid, tableid.length);
|
326
|
console.log('getTables-tableid', tableid, tableid.length);
|
|
323
|
try {
|
327
|
try {
|
|
324
|
- let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
|
328
|
+ let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time,null,null,this.year);
|
|
325
|
console.log('rdate', this.data.dateStr[this.data.form.date], rdate);
|
329
|
console.log('rdate', this.data.dateStr[this.data.form.date], rdate);
|
|
326
|
App.Reserve.GetTableList({
|
330
|
App.Reserve.GetTableList({
|
|
327
|
sid: util.cache('enter_params')['seller_id'],
|
331
|
sid: util.cache('enter_params')['seller_id'],
|
|
@@ -390,6 +394,7 @@ Page({ |
|
@@ -390,6 +394,7 @@ Page({ |
|
390
|
tables: tables,
|
394
|
tables: tables,
|
|
391
|
tablesLength: tablesLength
|
395
|
tablesLength: tablesLength
|
|
392
|
})
|
396
|
})
|
|
|
|
397
|
+ this.conditionInfo();
|
|
393
|
})
|
398
|
})
|
|
394
|
} catch (e) {
|
399
|
} catch (e) {
|
|
395
|
this.setData({
|
400
|
this.setData({
|
|
@@ -402,10 +407,10 @@ Page({ |
|
@@ -402,10 +407,10 @@ Page({ |
|
402
|
try {
|
407
|
try {
|
|
403
|
let d_stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[this.data.form.time]];
|
408
|
let d_stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[this.data.form.time]];
|
|
404
|
let d_rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
409
|
let d_rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
|
405
|
- this.data.form.time, d_stimestr);
|
410
|
+ this.data.form.time, d_stimestr,null,this.year);
|
|
406
|
let stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[0]];
|
411
|
let stimestr = this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[0]];
|
|
407
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
412
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date],
|
|
408
|
- this.data.form.time, stimestr);
|
413
|
+ this.data.form.time, stimestr,null,this.year);
|
|
409
|
console.log('stimestr', stimestr, this.data.form.time, this.data.timePickerIndex);
|
414
|
console.log('stimestr', stimestr, this.data.form.time, this.data.timePickerIndex);
|
|
410
|
console.log('rdate', rdate);
|
415
|
console.log('rdate', rdate);
|
|
411
|
this.setData({
|
416
|
this.setData({
|
|
@@ -486,6 +491,8 @@ Page({ |
|
@@ -486,6 +491,8 @@ Page({ |
|
486
|
console.log(event);
|
491
|
console.log(event);
|
|
487
|
//let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
|
492
|
//let cktime=util.timetouUnix(event.detail.year+'/'+event.detail.month+'/'+event.detail.day)
|
|
488
|
let cktime = util.timetouUnix(event.detail.date)
|
493
|
let cktime = util.timetouUnix(event.detail.date)
|
|
|
|
494
|
+ this.year=event.detail.date.substr(0, 4);
|
|
|
|
495
|
+ console.log('this.year',this.year);
|
|
489
|
let day0 = parseInt(new Date(new Date().setHours(0, 0, 0, 0)) / 1000);
|
496
|
let day0 = parseInt(new Date(new Date().setHours(0, 0, 0, 0)) / 1000);
|
|
490
|
// if (cktime < day0) {
|
497
|
// if (cktime < day0) {
|
|
491
|
// util.toast('请选择有效日期', 'none');
|
498
|
// util.toast('请选择有效日期', 'none');
|
|
@@ -515,7 +522,7 @@ Page({ |
|
@@ -515,7 +522,7 @@ Page({ |
|
515
|
})
|
522
|
})
|
|
516
|
},
|
523
|
},
|
|
517
|
async selectdesk(){
|
524
|
async selectdesk(){
|
|
518
|
- let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
|
525
|
+ let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time,null,null,this.year);
|
|
519
|
console.log(this.data.form)
|
526
|
console.log(this.data.form)
|
|
520
|
wx.navigateTo({
|
527
|
wx.navigateTo({
|
|
521
|
url: 'b_desk?rdate=' + rdate + '&tid=' + this.data.form.tabid
|
528
|
url: 'b_desk?rdate=' + rdate + '&tid=' + this.data.form.tabid
|
|
@@ -676,6 +683,7 @@ Page({ |
|
@@ -676,6 +683,7 @@ Page({ |
|
676
|
console.log('initQuick', options);
|
683
|
console.log('initQuick', options);
|
|
677
|
this.checkedTables[options.tid]=options.tname
|
684
|
this.checkedTables[options.tid]=options.tname
|
|
678
|
options.ddate=options.ddate.substr(0,10);
|
685
|
options.ddate=options.ddate.substr(0,10);
|
|
|
|
686
|
+ this.year=util.unixtoTime(options.ddate,'YYYY');
|
|
679
|
//设置日期
|
687
|
//设置日期
|
|
680
|
let obj = await this.setDateStr(options.ddate);
|
688
|
let obj = await this.setDateStr(options.ddate);
|
|
681
|
//设置时间
|
689
|
//设置时间
|