Commit 0d8add071daefc3c154e58801aeba7d7730a2ba3

Authored by wangfan
2 parents 9ee494ab feda1d05

Merge remote-tracking branch 'remotes/origin/master' into online-reserve

... ... @@ -9,6 +9,7 @@
</view>
</view>
<view class="tid" wx:if="{{board.tid==2}}">包间</view>
<view class="tid" wx:if="{{board.tid==3}}">卡座</view>
<view class="status" wx:if="{{board.status_str}}" style="width: {{width}}rpx;">{{board.status_str}}</view>
<icon type="success" size="20" color="#199095" class="desk-active" wx:if="{{board.isselect==true}}"/>
</view>
... ...
... ... @@ -716,8 +716,14 @@ Page({
App.User.GetCustomRemark({
uid:util.cache('enter_params')['manager_id'],
}).then(res=>{
let CustomRemark=[];
res.data.forEach(r=>{
if(r.often_use){
CustomRemark.push(r);
}
})
this.setData({
CustomRemark:res.data,
CustomRemark:CustomRemark,
})
})
},
... ... @@ -741,6 +747,7 @@ Page({
CustomRemark:CustomRemark,
form:form,
})
this.conditionInfo()
},
CustomRemarkMore(){
this.setData({
... ...
... ... @@ -190,12 +190,12 @@
bindblur="inputFocus"
data-key="cusdem"/>
</view>
<view wx:if="{{CustomRemark.length>0}}" class="book-info-single" style="padding-top: 14rpx; height: 60rpx;">
<view wx:if="{{CustomRemark.length>0}}" class="book-info-single last" style="padding-top: 14rpx; height: 60rpx;">
<view class="flex-lr CustomRemark">
<view class="CustomRemarks">
<view class="CustomRemarksView">
<view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}"
wx:if="{{item.often_use}}" bindtap="oftenUse"
bindtap="oftenUse"
data-id="{{item.id}}"
data-value="{{item.often_use}}">{{item.often_use}}</view>
</view>
... ...
... ... @@ -308,7 +308,7 @@
.CustomRemarkMore .CustomRemarkItem{
padding: 4rpx 24rpx;
}
.book-info-single:last-child{
.book-info-single.last{
border-width: 0;
}
.CustomRemarkItem.active{
... ...
... ... @@ -7,6 +7,7 @@ Page({
menu_active_id:''
},
checked_tids:[],
desks:[],
onLoad:function(opt){
console.log('onLoad',opt)
util.setBarTitle('选择桌位');
... ... @@ -52,24 +53,35 @@ Page({
App.Reserve.GetTableList(formdata).then(function (json) {
if(json.ret==200){
console.log('this.checked_tids',that.checked_tids);
if(json.data.length>0){
json.data.forEach(function(v,i){
v.list.forEach(function(r,n){
r.isselect=false
if(that.checked_tids._indexOf(r.id)>-1){
r.isselect=true;
}
})
})
}
that.setData({
desklist:json.data,
menu_active_id:json.data[0].name
})
that.desks=json.data
that.formatDesklist(true)
}
})
},
formatDesklist(hasFirst=true){
let desks=this.desks;
if(desks.length>0){
desks.forEach((v,i)=>{
v.list.forEach((r,n)=>{
r.isselect=false
if(this.checked_tids._indexOf(r.id)>-1){
r.isselect=true;
}
})
})
let param={
desklist:desks,
}
if(hasFirst){
param.menu_active_id=desks[0].name
}
this.setData(param)
}
return desks;
},
switchMenu(e){
this.formatDesklist(false)
this.setData({
menu_active_id:util.attr(e,'id')
})
... ...
... ... @@ -5,7 +5,6 @@ Page({
alllabel:[
],
focus:true
},
onLoad:function(){
this.getlabellist();
... ... @@ -30,7 +29,10 @@ Page({
}).then(res=>{
console.log(res)
this.setData({
alllabel:res.data
alllabel:res.data,
})
this.setData({
focus:true,
})
})
},
... ... @@ -64,13 +66,10 @@ Page({
console.log(res)
if(res.ret==200){
this.setData({
defineremark:'',
defineremark:null,
})
this.getlabellist();
}
this.setData({
focus:true
})
})
},
})
\ No newline at end of file
... ...
... ... @@ -11,7 +11,7 @@
</view>
</block>
</block>
<input class="black-font flex-cc font28r smooth label-input flex-cc" placeholder="添加备注" placeholder-class="smooth flex-cc" maxlength="10" style="width:{{defineremark.length>4 ? (defineremark.length-4)*28+160 : 160}}rpx;" value="{{defineremark}}" bindinput="inputremark" focus="{{focus}}" cursor-spacing="160" bindblur="addinputlabel" placeholder-style="color:#999;font-size:28rpx;"/>
<view style="min-width:176rpx;"><input class="black-font flex-cc font28r smooth label-input flex-cc" placeholder="添加备注" maxlength="10" style="width:{{defineremark && defineremark.length>4 ? (defineremark.length-4)*28+160 : 160}}rpx;" value="{{defineremark}}" bindinput="inputremark" focus="{{focus}}" cursor-spacing="160" bindblur="addinputlabel" placeholder-style="color:#999;font-size:28rpx;text-align:center;"/></view>
</view>
<view class="label-title black-font font30r smooth">所有备注</view>
<view class="label-list flex-rs">
... ...