|
...
|
...
|
@@ -70,6 +70,8 @@ Page({ |
|
|
|
},
|
|
|
|
defDtime: ['', '12:00', '18:30'],
|
|
|
|
hasUseDefDtime: true,
|
|
|
|
CustomRemark:[],
|
|
|
|
CustomRemarkMoreMask:false,
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
...
|
...
|
@@ -78,6 +80,7 @@ Page({ |
|
|
|
checkedTables:{},//已选中的桌子集合
|
|
|
|
onLoad: async function (options) {
|
|
|
|
this.initLoad(options)
|
|
|
|
this.getCustomRemark();
|
|
|
|
},
|
|
|
|
async initLoad(options = {}){
|
|
|
|
let nt = new Date() / 1000;
|
|
...
|
...
|
@@ -88,7 +91,7 @@ Page({ |
|
|
|
];
|
|
|
|
this.reserve_id = options.id || '';
|
|
|
|
await this.setDateStr();
|
|
|
|
this.sellerid = util.cache('sellerid');
|
|
|
|
this.sellerid = util.cache('enter_params')['seller_id'];
|
|
|
|
let timePickerArray = await comm.getDayTimeSpace();
|
|
|
|
//判断hasUseDefDtime
|
|
|
|
let hasUseDefDtime = true;
|
|
...
|
...
|
@@ -321,7 +324,7 @@ Page({ |
|
|
|
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
|
|
|
|
console.log('rdate', this.data.dateStr[this.data.form.date], rdate);
|
|
|
|
App.Reserve.GetTableList({
|
|
|
|
sid: this.sellerid,
|
|
|
|
sid: util.cache('enter_params')['seller_id'],
|
|
|
|
//pnum_str:form.pnum_str,
|
|
|
|
pnum: form.pnum,
|
|
|
|
rdate: rdate,
|
|
...
|
...
|
@@ -448,6 +451,7 @@ Page({ |
|
|
|
}
|
|
|
|
App.Reserve.SetReserveInfo(form).then(res => {
|
|
|
|
if (res.ret == 200) {
|
|
|
|
this.getCustomRemark()
|
|
|
|
let _id = (res.data.id || res.data)
|
|
|
|
this.setData({
|
|
|
|
form: JSON.parse(JSON.stringify(formTpl)),
|
|
...
|
...
|
@@ -708,4 +712,39 @@ Page({ |
|
|
|
console.log('initQuick', e)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getCustomRemark(){
|
|
|
|
App.User.GetCustomRemark({
|
|
|
|
uid:util.cache('enter_params')['manager_id'],
|
|
|
|
}).then(res=>{
|
|
|
|
this.setData({
|
|
|
|
CustomRemark:res.data,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
oftenUse(e){
|
|
|
|
let id=util.attr(e,'id');
|
|
|
|
let val=util.attr(e,'value');
|
|
|
|
let CustomRemark=this.data.CustomRemark;
|
|
|
|
let form=this.data.form;
|
|
|
|
CustomRemark.forEach(r=>{
|
|
|
|
if(id==r.id){
|
|
|
|
if(r.active){
|
|
|
|
form.cusdem=form.cusdem.replace(val+'、','')
|
|
|
|
}
|
|
|
|
r.active=!r.active
|
|
|
|
if(r.active){
|
|
|
|
form.cusdem+=val+'、'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.setData({
|
|
|
|
CustomRemark:CustomRemark,
|
|
|
|
form:form,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
CustomRemarkMore(){
|
|
|
|
this.setData({
|
|
|
|
CustomRemarkMoreMask:!this.data.CustomRemarkMoreMask
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|