Commit 7cee7d1bd13c301866058fe4357231a0616c9004

Authored by zhangyan
2 parents eb87fa9c 499993c4

Merge branch 'master' of http://123.56.79.57/xt/xcx-book

... ... @@ -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
... ...
... ... @@ -190,8 +190,23 @@
bindblur="inputFocus"
data-key="cusdem"/>
</view>
<view wx:if="{{CustomRemark.length>0}}" class="book-info-single" 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"
data-id="{{item.id}}"
data-value="{{item.often_use}}">{{item.often_use}}</view>
</view>
</view>
<view class="CustomRemarkMore flex-rr">
<view class="CustomRemarkItem" style="margin-bottom: 0" bindtap="CustomRemarkMore">更多</view>
</view>
</view>
</view>
</view>
<view class="page-full submit">
<view class="page-full submit" style="background-color: #fefefe;">
<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
</view>
</view>
... ... @@ -246,4 +261,22 @@
>{{item}}</view>
</view>
</view>
</view>
<view class="calendar-mask" bindtap="CustomRemarkMore"
style="height:100%;" wx:if="{{CustomRemarkMoreMask}}">
<view class="timePicker" catchtap="catchtap">
<view class="flex-rr">
<image class="close" src="http://qn.colorcun.com/custom/lite-yd/image/add-act.png" bindtap="CustomRemarkMore"></image>
</view>
<view class="flex-cc" style="margin-bottom: 56rpx; font-size: 30rpx;">
<view bindtap="calendarClose">更多标签</view>
</view>
<view class="flex-ll" style="flex-wrap:wrap;width: 110%; margin-left: -5%; max-height: 700rpx;overflow-y: auto;">
<view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}"
wx:if="{{item.often_use}}" bindtap="oftenUse"
data-id="{{item.id}}"
data-value="{{item.often_use}}">{{item.often_use}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -274,4 +274,44 @@
transform:rotate(45deg);
margin-top: -10rpx;
margin-right: -10%;
}
.CustomRemark{
line-height: 60rpx;
overflow: hidden;
}
.CustomRemarks{
width: 100%;
}
.CustomRemarksView{
height: 60rpx;
overflow: hidden;
}
.CustomRemarkMore{
width: 200rpx;
}
.CustomRemarkItem{
height: 48rpx;
line-height: 48rpx;
padding: 4rpx 14rpx;
background-color: #F5F5F5;
font-size: 30rpx;
color: #999999;
border-radius: 10rpx;
margin-right: 20rpx;
float: left;
margin-bottom: 40rpx;
}
.CustomRemarkItem:last-child{
margin-right: 0;
}
.CustomRemarkMore .CustomRemarkItem{
padding: 4rpx 24rpx;
}
.book-info-single:last-child{
border-width: 0;
}
.CustomRemarkItem.active{
background-color: #6AB6B9;
color: #FFFFFF;
}
\ No newline at end of file
... ...
... ... @@ -171,7 +171,8 @@ module.exports ={
if (flag) {
break;
}
if (isDay) {
let nownd=util.unixtoTime(new Date()/1000,'HH:II')
if (isDay && nownd>times[i][times[i].length-1]) {
obj.timeOpt[i] = 'disabled';
}
}
... ...