|
...
|
...
|
@@ -229,14 +229,21 @@ Page({ |
|
|
|
if(form.tid.length>0 && form.rname.length>0){
|
|
|
|
sobj.buttonhide=false;
|
|
|
|
}
|
|
|
|
if('date,time,pnum,pnum_str,tabid'.indexOf(key)>-1){
|
|
|
|
sobj.form.tid=[];
|
|
|
|
sobj.buttonhide=true;
|
|
|
|
this.getTables();
|
|
|
|
}
|
|
|
|
let displayTimes=false;
|
|
|
|
if(key=='time'){
|
|
|
|
sobj.timePickerMask=true;
|
|
|
|
if(util.attr(e,'display')=='block'){
|
|
|
|
displayTimes=true;
|
|
|
|
sobj.timePickerMask=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if('date,time,pnum,pnum_str,tabid'.indexOf(key)>-1){
|
|
|
|
if(!displayTimes){
|
|
|
|
sobj.form.tid=[];
|
|
|
|
sobj.buttonhide=true;
|
|
|
|
this.getTables();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setData(sobj)
|
|
|
|
},
|
|
|
|
async getTables(){
|
|
...
|
...
|
@@ -298,10 +305,13 @@ Page({ |
|
|
|
async formsubmit(){
|
|
|
|
if(this.data.buttonhide) return;
|
|
|
|
try {
|
|
|
|
let stimestr=this.data.timePickerArray[this.data.form.time][this.data.timePickerIndex[this.data.form.time]];
|
|
|
|
console.log('stimestr', stimestr,this.data.form.time,this.data.timePickerIndex);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
console.log('stimestr', stimestr,this.data.form.time,this.data.timePickerIndex);
|
|
|
|
console.log('rdate', rdate);
|
|
|
|
this.setData({
|
|
|
|
buttonhide: true,
|
|
...
|
...
|
@@ -325,12 +335,14 @@ Page({ |
|
|
|
form.note_name=note_name||'';
|
|
|
|
}catch (e){}
|
|
|
|
}
|
|
|
|
form.ddate=d_rdate.substr(0,10);
|
|
|
|
App.Reserve.SetReserveInfo(form).then(res => {
|
|
|
|
if(res.ret==200){
|
|
|
|
let _id=(res.data.id || res.data)
|
|
|
|
this.setData({
|
|
|
|
form:JSON.parse(JSON.stringify(formTpl)),
|
|
|
|
tables:[],
|
|
|
|
timePickerIndex:[0,0,0],
|
|
|
|
})
|
|
|
|
this.initLoad();
|
|
|
|
App.Reserve.Detail({rid:_id,openid:''},'clear')
|
|
...
|
...
|
@@ -430,9 +442,9 @@ Page({ |
|
|
|
|
|
|
|
console.log('initModify',res);
|
|
|
|
//设置日期
|
|
|
|
let obj = await this.setDateStr(res.data.rdate);
|
|
|
|
let obj = await this.setDateStr(res.data.ddate);
|
|
|
|
//设置时间
|
|
|
|
let nd=util.unixtoTime(res.data.rdate,'HH:II');
|
|
|
|
let nd=util.unixtoTime(res.data.ddate,'HH:II');
|
|
|
|
let timePickerIndex=this.data.timePickerIndex
|
|
|
|
console.log('initModify-',this.data.timePickerArray,obj.form.time,nd)
|
|
|
|
this.data.timePickerArray[obj.form.time].forEach((dd,ii)=>{
|
...
|
...
|
|