|
...
|
...
|
@@ -452,8 +452,28 @@ conditionInfo:function(){ |
|
|
|
this.setData({
|
|
|
|
buttonhide:this.data.buttonhide
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 修改初始化
|
|
|
|
*/
|
|
|
|
async initModify(id){
|
|
|
|
try{
|
|
|
|
let res= await App.Reserve.Detail({rid:id,openid:''});
|
|
|
|
|
|
|
|
console.log('initModify',res);
|
|
|
|
//设置日期
|
|
|
|
let obj = await this.setDateStr(res.data.rdate);
|
|
|
|
//设置时间
|
|
|
|
let nd=util.unixtoTime(res.data.rdate,'HH:II');
|
|
|
|
let timePickerIndex=this.data.timePickerIndex
|
|
|
|
console.log('initModify-',this.data.timePickerArray,obj.form.time)
|
|
|
|
this.data.timePickerArray[obj.form.time].forEach((dd,ii)=>{
|
|
|
|
console.log('initModify-',nd,dd)
|
|
|
|
if(nd==dd){
|
|
|
|
timePickerIndex[obj.form.time]=ii;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log('initModify-timePickerIndex',timePickerIndex);
|
|
|
|
obj.form.pnum_str=res.data.pnum_str;
|
|
...
|
...
|
@@ -465,9 +485,9 @@ conditionInfo:function(){ |
|
|
|
obj.form.tid=[];
|
|
|
|
res.data.tables.forEach((t,ti)=>{
|
|
|
|
t.isselect=true
|
|
|
|
res.data.tables[ti]=t;
|
|
|
|
obj.form.tid.push(t.id)
|
|
|
|
})
|
|
|
|
res.data.tables[ti]=t;
|
|
|
|
obj.form.tid.push(t.id)
|
|
|
|
})
|
|
|
|
this.setData({
|
|
|
|
timePickerIndex:timePickerIndex,
|
|
|
|
form:obj.form,
|
|
...
|
...
|
@@ -477,4 +497,5 @@ conditionInfo:function(){ |
|
|
|
console.log('initModify',e)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
|
|
|
|
|
|
|
}) |
...
|
...
|
|