Commit 1b8d37db24b1b3a8d762190b34af5eeed1647b89
Merge remote-tracking branch 'remotes/origin/master' into online-reserve
# Conflicts: # utils/api.url.js
Showing
17 changed files
with
306 additions
and
23 deletions
| @@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
| 23 | "pages/book/setting/sms", | 23 | "pages/book/setting/sms", |
| 24 | "pages/book/setting/sms_buy", | 24 | "pages/book/setting/sms_buy", |
| 25 | "pages/book/crm/index", | 25 | "pages/book/crm/index", |
| 26 | + "pages/book/remark/index", | ||
| 26 | "pages/book/smsbatch/index", | 27 | "pages/book/smsbatch/index", |
| 27 | "pages/book/smsbatch/update", | 28 | "pages/book/smsbatch/update", |
| 28 | "pages/book/smsbatch/detail", | 29 | "pages/book/smsbatch/detail", |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | <view class="book-list-td flex-vc">{{vitem.order_time}}</view> | 11 | <view class="book-list-td flex-vc">{{vitem.order_time}}</view> |
| 12 | <view class="book-list-td flex-rr green-font"> | 12 | <view class="book-list-td flex-rr green-font"> |
| 13 | <view> | 13 | <view> |
| 14 | - <view>{{vitem.status==1?'通知预订人':vitem.status_str}}</view> | 14 | + <view>{{vitem.status==1?'通知客户':vitem.status_str}}</view> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| @@ -70,6 +70,8 @@ Page({ | @@ -70,6 +70,8 @@ Page({ | ||
| 70 | }, | 70 | }, |
| 71 | defDtime: ['', '12:00', '18:30'], | 71 | defDtime: ['', '12:00', '18:30'], |
| 72 | hasUseDefDtime: true, | 72 | hasUseDefDtime: true, |
| 73 | + CustomRemark:[], | ||
| 74 | + CustomRemarkMoreMask:false, | ||
| 73 | }, | 75 | }, |
| 74 | /** | 76 | /** |
| 75 | * 生命周期函数--监听页面加载 | 77 | * 生命周期函数--监听页面加载 |
| @@ -78,6 +80,7 @@ Page({ | @@ -78,6 +80,7 @@ Page({ | ||
| 78 | checkedTables:{},//已选中的桌子集合 | 80 | checkedTables:{},//已选中的桌子集合 |
| 79 | onLoad: async function (options) { | 81 | onLoad: async function (options) { |
| 80 | this.initLoad(options) | 82 | this.initLoad(options) |
| 83 | + this.getCustomRemark(); | ||
| 81 | }, | 84 | }, |
| 82 | async initLoad(options = {}){ | 85 | async initLoad(options = {}){ |
| 83 | let nt = new Date() / 1000; | 86 | let nt = new Date() / 1000; |
| @@ -88,7 +91,7 @@ Page({ | @@ -88,7 +91,7 @@ Page({ | ||
| 88 | ]; | 91 | ]; |
| 89 | this.reserve_id = options.id || ''; | 92 | this.reserve_id = options.id || ''; |
| 90 | await this.setDateStr(); | 93 | await this.setDateStr(); |
| 91 | - this.sellerid = util.cache('sellerid'); | 94 | + this.sellerid = util.cache('enter_params')['seller_id']; |
| 92 | let timePickerArray = await comm.getDayTimeSpace(); | 95 | let timePickerArray = await comm.getDayTimeSpace(); |
| 93 | //判断hasUseDefDtime | 96 | //判断hasUseDefDtime |
| 94 | let hasUseDefDtime = true; | 97 | let hasUseDefDtime = true; |
| @@ -321,7 +324,7 @@ Page({ | @@ -321,7 +324,7 @@ Page({ | ||
| 321 | let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time); | 324 | let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time); |
| 322 | console.log('rdate', this.data.dateStr[this.data.form.date], rdate); | 325 | console.log('rdate', this.data.dateStr[this.data.form.date], rdate); |
| 323 | App.Reserve.GetTableList({ | 326 | App.Reserve.GetTableList({ |
| 324 | - sid: this.sellerid, | 327 | + sid: util.cache('enter_params')['seller_id'], |
| 325 | //pnum_str:form.pnum_str, | 328 | //pnum_str:form.pnum_str, |
| 326 | pnum: form.pnum, | 329 | pnum: form.pnum, |
| 327 | rdate: rdate, | 330 | rdate: rdate, |
| @@ -369,15 +372,16 @@ Page({ | @@ -369,15 +372,16 @@ Page({ | ||
| 369 | if(tables.length<1){ | 372 | if(tables.length<1){ |
| 370 | tablesLength=0; | 373 | tablesLength=0; |
| 371 | tables_tmp = []; | 374 | tables_tmp = []; |
| 372 | - res.data.forEach(p => { | 375 | + res.data.forEach((p,ri) => { |
| 373 | p.list.forEach(t => { | 376 | p.list.forEach(t => { |
| 374 | - tablesLength++; | 377 | + if(ri>0) tablesLength++; |
| 375 | //if(tables.length>=3) return true; | 378 | //if(tables.length>=3) return true; |
| 376 | - if (t.tid == 2) { | ||
| 377 | - tables.push(t); | ||
| 378 | - } else { | ||
| 379 | - tables_tmp.push(t); | ||
| 380 | - } | 379 | + // if (t.tid == 2) { |
| 380 | + // tables.push(t); | ||
| 381 | + // } else { | ||
| 382 | + // tables_tmp.push(t); | ||
| 383 | + // } | ||
| 384 | + tables.push(t); | ||
| 381 | }) | 385 | }) |
| 382 | }) | 386 | }) |
| 383 | if (tables.length < 3) { | 387 | if (tables.length < 3) { |
| @@ -447,6 +451,7 @@ Page({ | @@ -447,6 +451,7 @@ Page({ | ||
| 447 | } | 451 | } |
| 448 | App.Reserve.SetReserveInfo(form).then(res => { | 452 | App.Reserve.SetReserveInfo(form).then(res => { |
| 449 | if (res.ret == 200) { | 453 | if (res.ret == 200) { |
| 454 | + this.getCustomRemark() | ||
| 450 | let _id = (res.data.id || res.data) | 455 | let _id = (res.data.id || res.data) |
| 451 | this.setData({ | 456 | this.setData({ |
| 452 | form: JSON.parse(JSON.stringify(formTpl)), | 457 | form: JSON.parse(JSON.stringify(formTpl)), |
| @@ -707,4 +712,39 @@ Page({ | @@ -707,4 +712,39 @@ Page({ | ||
| 707 | console.log('initQuick', e) | 712 | console.log('initQuick', e) |
| 708 | } | 713 | } |
| 709 | }, | 714 | }, |
| 715 | + getCustomRemark(){ | ||
| 716 | + App.User.GetCustomRemark({ | ||
| 717 | + uid:util.cache('enter_params')['manager_id'], | ||
| 718 | + }).then(res=>{ | ||
| 719 | + this.setData({ | ||
| 720 | + CustomRemark:res.data, | ||
| 721 | + }) | ||
| 722 | + }) | ||
| 723 | + }, | ||
| 724 | + oftenUse(e){ | ||
| 725 | + let id=util.attr(e,'id'); | ||
| 726 | + let val=util.attr(e,'value'); | ||
| 727 | + let CustomRemark=this.data.CustomRemark; | ||
| 728 | + let form=this.data.form; | ||
| 729 | + CustomRemark.forEach(r=>{ | ||
| 730 | + if(id==r.id){ | ||
| 731 | + if(r.active){ | ||
| 732 | + form.cusdem=form.cusdem.replace(val+'、','') | ||
| 733 | + } | ||
| 734 | + r.active=!r.active | ||
| 735 | + if(r.active){ | ||
| 736 | + form.cusdem+=val+'、' | ||
| 737 | + } | ||
| 738 | + } | ||
| 739 | + }) | ||
| 740 | + this.setData({ | ||
| 741 | + CustomRemark:CustomRemark, | ||
| 742 | + form:form, | ||
| 743 | + }) | ||
| 744 | + }, | ||
| 745 | + CustomRemarkMore(){ | ||
| 746 | + this.setData({ | ||
| 747 | + CustomRemarkMoreMask:!this.data.CustomRemarkMoreMask | ||
| 748 | + }) | ||
| 749 | + } | ||
| 710 | }) | 750 | }) |
| @@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
| 145 | </view> | 145 | </view> |
| 146 | <view class="book-info"> | 146 | <view class="book-info"> |
| 147 | <view class="book-info-single flex-lr" style="align-items:flex-start;position:relative;z-index:10;"> | 147 | <view class="book-info-single flex-lr" style="align-items:flex-start;position:relative;z-index:10;"> |
| 148 | - <input placeholder="预订人电话" placeholder-class="gray-font font34r" class="black-font font34r" type="number" maxlength="11" | 148 | + <input placeholder="客户电话" placeholder-class="gray-font font34r" class="black-font font34r" type="number" maxlength="11" |
| 149 | bindinput="selectedValue" | 149 | bindinput="selectedValue" |
| 150 | bindconfirm="selectedValue" | 150 | bindconfirm="selectedValue" |
| 151 | data-key="phone" | 151 | data-key="phone" |
| @@ -161,7 +161,7 @@ | @@ -161,7 +161,7 @@ | ||
| 161 | </block> | 161 | </block> |
| 162 | </view> | 162 | </view> |
| 163 | <view class="book-info-single flex-lr" style="align-items:flex-start;"> | 163 | <view class="book-info-single flex-lr" style="align-items:flex-start;"> |
| 164 | - <input placeholder="预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" | 164 | + <input placeholder="客户姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" |
| 165 | maxlength="12" style="width:450rpx;" value="{{form.rname}}" | 165 | maxlength="12" style="width:450rpx;" value="{{form.rname}}" |
| 166 | bindinput="selectedValue" | 166 | bindinput="selectedValue" |
| 167 | bindconfirm="selectedValue" | 167 | bindconfirm="selectedValue" |
| @@ -183,15 +183,30 @@ | @@ -183,15 +183,30 @@ | ||
| 183 | </view> | 183 | </view> |
| 184 | 184 | ||
| 185 | <view class="book-info-single"> | 185 | <view class="book-info-single"> |
| 186 | - <input placeholder="顾客的要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}" | 186 | + <input placeholder="客户的要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}" |
| 187 | bindinput="selectedValue" | 187 | bindinput="selectedValue" |
| 188 | bindconfirm="selectedValue" | 188 | bindconfirm="selectedValue" |
| 189 | bindfocus="inputFocus" | 189 | bindfocus="inputFocus" |
| 190 | bindblur="inputFocus" | 190 | bindblur="inputFocus" |
| 191 | data-key="cusdem"/> | 191 | data-key="cusdem"/> |
| 192 | </view> | 192 | </view> |
| 193 | + <view wx:if="{{CustomRemark.length>0}}" class="book-info-single" style="padding-top: 14rpx; height: 60rpx;"> | ||
| 194 | + <view class="flex-lr CustomRemark"> | ||
| 195 | + <view class="CustomRemarks"> | ||
| 196 | + <view class="CustomRemarksView"> | ||
| 197 | + <view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}" | ||
| 198 | + wx:if="{{item.often_use}}" bindtap="oftenUse" | ||
| 199 | + data-id="{{item.id}}" | ||
| 200 | + data-value="{{item.often_use}}">{{item.often_use}}</view> | ||
| 201 | + </view> | ||
| 202 | + </view> | ||
| 203 | + <view class="CustomRemarkMore flex-rr"> | ||
| 204 | + <view class="CustomRemarkItem" style="margin-bottom: 0" bindtap="CustomRemarkMore">更多</view> | ||
| 205 | + </view> | ||
| 206 | + </view> | ||
| 207 | + </view> | ||
| 193 | </view> | 208 | </view> |
| 194 | - <view class="page-full submit"> | 209 | + <view class="page-full submit" style="background-color: #fefefe;"> |
| 195 | <view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view> | 210 | <view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view> |
| 196 | </view> | 211 | </view> |
| 197 | </view> | 212 | </view> |
| @@ -246,4 +261,22 @@ | @@ -246,4 +261,22 @@ | ||
| 246 | >{{item}}</view> | 261 | >{{item}}</view> |
| 247 | </view> | 262 | </view> |
| 248 | </view> | 263 | </view> |
| 264 | +</view> | ||
| 265 | + | ||
| 266 | +<view class="calendar-mask" bindtap="CustomRemarkMore" | ||
| 267 | + style="height:100%;" wx:if="{{CustomRemarkMoreMask}}"> | ||
| 268 | + <view class="timePicker" catchtap="catchtap"> | ||
| 269 | + <view class="flex-rr"> | ||
| 270 | + <image class="close" src="http://qn.colorcun.com/custom/lite-yd/image/add-act.png" bindtap="CustomRemarkMore"></image> | ||
| 271 | + </view> | ||
| 272 | + <view class="flex-cc" style="margin-bottom: 56rpx; font-size: 30rpx;"> | ||
| 273 | + <view bindtap="calendarClose">更多标签</view> | ||
| 274 | + </view> | ||
| 275 | + <view class="flex-ll" style="flex-wrap:wrap;width: 110%; margin-left: -5%; max-height: 700rpx;overflow-y: auto;"> | ||
| 276 | + <view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}" | ||
| 277 | + wx:if="{{item.often_use}}" bindtap="oftenUse" | ||
| 278 | + data-id="{{item.id}}" | ||
| 279 | + data-value="{{item.often_use}}">{{item.often_use}}</view> | ||
| 280 | + </view> | ||
| 281 | + </view> | ||
| 249 | </view> | 282 | </view> |
| @@ -274,4 +274,44 @@ | @@ -274,4 +274,44 @@ | ||
| 274 | transform:rotate(45deg); | 274 | transform:rotate(45deg); |
| 275 | margin-top: -10rpx; | 275 | margin-top: -10rpx; |
| 276 | margin-right: -10%; | 276 | margin-right: -10%; |
| 277 | +} | ||
| 278 | + | ||
| 279 | +.CustomRemark{ | ||
| 280 | + line-height: 60rpx; | ||
| 281 | + overflow: hidden; | ||
| 282 | +} | ||
| 283 | +.CustomRemarks{ | ||
| 284 | + width: 100%; | ||
| 285 | +} | ||
| 286 | +.CustomRemarksView{ | ||
| 287 | + height: 60rpx; | ||
| 288 | + overflow: hidden; | ||
| 289 | +} | ||
| 290 | +.CustomRemarkMore{ | ||
| 291 | + width: 200rpx; | ||
| 292 | +} | ||
| 293 | +.CustomRemarkItem{ | ||
| 294 | + height: 48rpx; | ||
| 295 | + line-height: 48rpx; | ||
| 296 | + padding: 4rpx 14rpx; | ||
| 297 | + background-color: #F5F5F5; | ||
| 298 | + font-size: 30rpx; | ||
| 299 | + color: #999999; | ||
| 300 | + border-radius: 10rpx; | ||
| 301 | + margin-right: 20rpx; | ||
| 302 | + float: left; | ||
| 303 | + margin-bottom: 40rpx; | ||
| 304 | +} | ||
| 305 | +.CustomRemarkItem:last-child{ | ||
| 306 | + margin-right: 0; | ||
| 307 | +} | ||
| 308 | +.CustomRemarkMore .CustomRemarkItem{ | ||
| 309 | + padding: 4rpx 24rpx; | ||
| 310 | +} | ||
| 311 | +.book-info-single:last-child{ | ||
| 312 | + border-width: 0; | ||
| 313 | +} | ||
| 314 | +.CustomRemarkItem.active{ | ||
| 315 | + background-color: #6AB6B9; | ||
| 316 | + color: #FFFFFF; | ||
| 277 | } | 317 | } |
| @@ -26,11 +26,11 @@ | @@ -26,11 +26,11 @@ | ||
| 26 | </view> | 26 | </view> |
| 27 | </view> | 27 | </view> |
| 28 | <view class="flex-lr order-detail"> | 28 | <view class="flex-lr order-detail"> |
| 29 | - <text class="gray-deep-font font30r" space="true" decode="true">预 订 人</text> | 29 | + <text class="gray-deep-font font30r" space="true" decode="true">客户姓名</text> |
| 30 | <view class="black-font font34r">{{bookInfo.rname}} {{bookInfo.sex==1?'先生':(bookInfo.sex==2?'女士':'')}}</view> | 30 | <view class="black-font font34r">{{bookInfo.rname}} {{bookInfo.sex==1?'先生':(bookInfo.sex==2?'女士':'')}}</view> |
| 31 | </view> | 31 | </view> |
| 32 | <view class="flex-lr order-detail"> | 32 | <view class="flex-lr order-detail"> |
| 33 | - <view class="gray-deep-font font30r">手机号码</view> | 33 | + <view class="gray-deep-font font30r">客户电话</view> |
| 34 | <view class="black-font font34r" bindtap="getcall">{{bookInfo.phoneStr||''}}</view> | 34 | <view class="black-font font34r" bindtap="getcall">{{bookInfo.phoneStr||''}}</view> |
| 35 | </view> | 35 | </view> |
| 36 | <block wx:if="{{bookInfo.cusdem!='' && bookInfo.cusdem!='null'}}"> | 36 | <block wx:if="{{bookInfo.cusdem!='' && bookInfo.cusdem!='null'}}"> |
| @@ -79,7 +79,7 @@ | @@ -79,7 +79,7 @@ | ||
| 79 | <view class="notice-opt" wx:if="{{bookInfo.status==1}}"> | 79 | <view class="notice-opt" wx:if="{{bookInfo.status==1}}"> |
| 80 | <view class="notice-button-border font34r flex-lr"> | 80 | <view class="notice-button-border font34r flex-lr"> |
| 81 | <view> | 81 | <view> |
| 82 | - <formids bindclick="noticeCall">通知预订人</formids> | 82 | + <formids bindclick="noticeCall">通知客户</formids> |
| 83 | </view> | 83 | </view> |
| 84 | <view wx:if="{{bookInfo.order && bookInfo.order.cookbooklist.length>0}}"> | 84 | <view wx:if="{{bookInfo.order && bookInfo.order.cookbooklist.length>0}}"> |
| 85 | <formids bindclick="showOrder">查看菜品</formids> | 85 | <formids bindclick="showOrder">查看菜品</formids> |
| @@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
| 98 | </view> | 98 | </view> |
| 99 | </view> | 99 | </view> |
| 100 | <view class="notice-opt" wx:if="{{bookInfo.status==2}}"> | 100 | <view class="notice-opt" wx:if="{{bookInfo.status==2}}"> |
| 101 | - <formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">顾客就餐完毕</formids> | 101 | + <formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">客户就餐完毕</formids> |
| 102 | </view> | 102 | </view> |
| 103 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> | 103 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> |
| 104 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> | 104 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <view class="book-search flex-lr"> | 5 | <view class="book-search flex-lr"> |
| 6 | <view class="flex-ll book-search-left"> | 6 | <view class="flex-ll book-search-left"> |
| 7 | <image src="http://qn.colorcun.com/custom/lite-yd/image/search.png" class="search-icon"></image> | 7 | <image src="http://qn.colorcun.com/custom/lite-yd/image/search.png" class="search-icon"></image> |
| 8 | - <input placeholder="桌位/预定人姓名/手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/> | 8 | + <input placeholder="桌位/客户姓名/手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/> |
| 9 | </view> | 9 | </view> |
| 10 | <view bindtap="exportFile" class="exportFile flex-vc"> | 10 | <view bindtap="exportFile" class="exportFile flex-vc"> |
| 11 | <image src="http://qn.colorcun.com/custom/lite-yd/image/export.png" class="search-icon"></image> | 11 | <image src="http://qn.colorcun.com/custom/lite-yd/image/export.png" class="search-icon"></image> |
| @@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
| 46 | 46 | ||
| 47 | <view class="book-list-thead flex-lr font34r black-font"> | 47 | <view class="book-list-thead flex-lr font34r black-font"> |
| 48 | <view>桌号</view> | 48 | <view>桌号</view> |
| 49 | - <view class="flex-cc">预订人</view> | 49 | + <view class="flex-cc">客户姓名</view> |
| 50 | <view class="flex-cc" bindtap="timeorder">时间<image src="http://qn.colorcun.com/custom/lite-yd/image/direction.png" class="icon22-26" background-size="cover"></image></view> | 50 | <view class="flex-cc" bindtap="timeorder">时间<image src="http://qn.colorcun.com/custom/lite-yd/image/direction.png" class="icon22-26" background-size="cover"></image></view> |
| 51 | <view class="flex-rr">操作</view> | 51 | <view class="flex-rr">操作</view> |
| 52 | </view> | 52 | </view> |
| 1 | <!--pages/book/b_sms.wxml--> | 1 | <!--pages/book/b_sms.wxml--> |
| 2 | <nav>发送短信</nav> | 2 | <nav>发送短信</nav> |
| 3 | <view class="page"> | 3 | <view class="page"> |
| 4 | - <view class="tip">已自动生成通知短信,可修改或直接发送</view> | 4 | + <view class="tip">已自动生成通知短信,可直接发送</view> |
| 5 | <textarea class="tpl" auto-height value="{{tplMsg}}" maxlength="-1" disabled> | 5 | <textarea class="tpl" auto-height value="{{tplMsg}}" maxlength="-1" disabled> |
| 6 | 6 | ||
| 7 | </textarea> | 7 | </textarea> |
pages/book/remark/index.js
0 → 100644
| 1 | +import util from '../../../utils/util'; | ||
| 2 | +import App from '../../../utils/api'; | ||
| 3 | +Page({ | ||
| 4 | + data:{ | ||
| 5 | + alllabel:[ | ||
| 6 | + | ||
| 7 | + ], | ||
| 8 | + focus:true | ||
| 9 | + }, | ||
| 10 | + onLoad:function(){ | ||
| 11 | + this.getlabellist(); | ||
| 12 | + }, | ||
| 13 | + onShow:function(){ | ||
| 14 | + | ||
| 15 | + }, | ||
| 16 | + inputremark:function(e){ | ||
| 17 | + this.setData({ | ||
| 18 | + defineremark:util.trim(e.detail.value) | ||
| 19 | + }) | ||
| 20 | + }, | ||
| 21 | + taplabel:function(e){ | ||
| 22 | + var _target=e.currentTarget.dataset; | ||
| 23 | + var mylabel=this.data.mylabel; | ||
| 24 | + console.log(_target.id,_target.type); | ||
| 25 | + this.setlabel(_target.id,_target.type); | ||
| 26 | + }, | ||
| 27 | + getlabellist:function(){ | ||
| 28 | + App.User.GetCustomRemark({ | ||
| 29 | + uid:util.cache('enter_params')['manager_id'] | ||
| 30 | + }).then(res=>{ | ||
| 31 | + console.log(res) | ||
| 32 | + this.setData({ | ||
| 33 | + alllabel:res.data | ||
| 34 | + }) | ||
| 35 | + }) | ||
| 36 | + }, | ||
| 37 | + setlabel:function(id,flag){ | ||
| 38 | + App.User.GetCustomRemark({ | ||
| 39 | + uid:util.cache('enter_params')['manager_id'], | ||
| 40 | + kid:id, | ||
| 41 | + flag:flag, | ||
| 42 | + }).then(res=>{ | ||
| 43 | + console.log(res) | ||
| 44 | + this.setData({ | ||
| 45 | + alllabel:res.data | ||
| 46 | + }) | ||
| 47 | + }) | ||
| 48 | + }, | ||
| 49 | + addinputlabel:function(e){ | ||
| 50 | + this.setData({ | ||
| 51 | + focus:false | ||
| 52 | + }) | ||
| 53 | + if(util.trim(e.detail.value)!=''){ | ||
| 54 | + this.addlabel(util.trim(e.detail.value)) | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + }, | ||
| 58 | + //添加自定义标签 | ||
| 59 | + addlabel:function(custom){ | ||
| 60 | + App.User.AddCustomRemark({ | ||
| 61 | + uid:util.cache('enter_params')['manager_id'], | ||
| 62 | + custom:custom, | ||
| 63 | + }).then(res=>{ | ||
| 64 | + console.log(res) | ||
| 65 | + if(res.ret==200){ | ||
| 66 | + this.setData({ | ||
| 67 | + defineremark:'', | ||
| 68 | + }) | ||
| 69 | + this.getlabellist(); | ||
| 70 | + } | ||
| 71 | + this.setData({ | ||
| 72 | + focus:true | ||
| 73 | + }) | ||
| 74 | + }) | ||
| 75 | + }, | ||
| 76 | +}) |
pages/book/remark/index.json
0 → 100644
pages/book/remark/index.wxml
0 → 100644
| 1 | +<nav id="nav">常用备注</nav> | ||
| 2 | +<view class="cut"></view> | ||
| 3 | +<view class="label"> | ||
| 4 | + <view class="label-title black-font font30r smooth" style="padding-bottom:40rpx;">我的常用备注</view> | ||
| 5 | + <view class="label-list flex-rs me-label-list"> | ||
| 6 | + <block wx:for="{{alllabel}}"> | ||
| 7 | + <block wx:if="{{item.often_use!=''}}"> | ||
| 8 | + <view class="label-single-all flex-ll bg_green" data-id="{{item.id}}" data-type="often" bindtap="taplabel"> | ||
| 9 | + <view class="white-font label-single flex-cc font28r smooth">{{item.custom}}</view> | ||
| 10 | + <view style="height:40rpx;border-left:1px solid rgba(255,255,255,.3);padding:0 8rpx;" class="flex-cc"><image src="../../image/close.svg" class="close"></image></view> | ||
| 11 | + </view> | ||
| 12 | + </block> | ||
| 13 | + </block> | ||
| 14 | + <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;"/> | ||
| 15 | + </view> | ||
| 16 | + <view class="label-title black-font font30r smooth">所有备注</view> | ||
| 17 | + <view class="label-list flex-rs"> | ||
| 18 | + <block wx:for="{{alllabel}}"> | ||
| 19 | + <view class="label-single flex-cc font28r smooth {{item.often_use!='' ? 'bg_green white-font' : 'all-label green-font'}}" data-id="{{item.id}}" data-type="{{item.often_use!='' ? 'often' : 'custom'}}" bindtap="taplabel" style="margin:0 16rpx 20rpx 0;">{{item.custom}}</view> | ||
| 20 | + </block> | ||
| 21 | + </view> | ||
| 22 | +</view> |
pages/book/remark/index.wxss
0 → 100644
| 1 | +.label{ | ||
| 2 | + width:100%; | ||
| 3 | + padding:0 30rpx; | ||
| 4 | + box-sizing: border-box; | ||
| 5 | +} | ||
| 6 | +.label-title{ | ||
| 7 | + width:100%; | ||
| 8 | + padding:30rpx 0; | ||
| 9 | +} | ||
| 10 | +.me-label-list{ | ||
| 11 | + padding-bottom: 10rpx; | ||
| 12 | + border-bottom:1px solid #eee; | ||
| 13 | + margin-bottom:40rpx; | ||
| 14 | +} | ||
| 15 | +.label-single-all{ | ||
| 16 | + height:56rpx; | ||
| 17 | + margin:0 16rpx 20rpx 0; | ||
| 18 | + border-radius:8rpx; | ||
| 19 | + overflow:hidden; | ||
| 20 | +} | ||
| 21 | +.label-single{ | ||
| 22 | + height:56rpx; | ||
| 23 | + padding:0 24rpx; | ||
| 24 | + border-radius:8rpx; | ||
| 25 | +} | ||
| 26 | +.label-input{ | ||
| 27 | + width:160rpx; | ||
| 28 | + height:56rpx; | ||
| 29 | + box-sizing: border-box; | ||
| 30 | + border:1px solid #ccc; | ||
| 31 | + max-width:400rpx; | ||
| 32 | + min-width:140rpx; | ||
| 33 | + margin:0 16rpx 20rpx 0; | ||
| 34 | + border-radius:8rpx; | ||
| 35 | + text-align:center; | ||
| 36 | + padding:0 10rpx; | ||
| 37 | +} | ||
| 38 | +.all-label{ | ||
| 39 | + box-sizing: border-box; | ||
| 40 | + border:1px solid rgba(25,144,149,.3); | ||
| 41 | +} | ||
| 42 | +.close{ | ||
| 43 | + width:18rpx; | ||
| 44 | + height:18rpx; | ||
| 45 | +} |
| @@ -32,6 +32,14 @@ | @@ -32,6 +32,14 @@ | ||
| 32 | </view> | 32 | </view> |
| 33 | </view> | 33 | </view> |
| 34 | </formids> | 34 | </formids> |
| 35 | + <formids url="/pages/book/remark/index"> | ||
| 36 | + <view class="row flex-lr" style="padding-top: 34rpx;"> | ||
| 37 | + <view>常用备注</view> | ||
| 38 | + <view class="flex-rr"> | ||
| 39 | + <view class="more"></view> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | + </formids> | ||
| 35 | <formids url="/pages/customer/index?islove=customer"> | 43 | <formids url="/pages/customer/index?islove=customer"> |
| 36 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 44 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 37 | <view>切换到顾客模式</view> | 45 | <view>切换到顾客模式</view> |
pages/image/close.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1550046540077" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M510.37 584.01L189.495 906.512c-19.945 20.045-52.362 20.126-72.407 0.182-20.045-19.944-20.126-52.362-0.182-72.408l322.281-323.914-322.098-320.478c-20.045-19.944-20.127-52.362-0.184-72.407 19.944-20.045 52.362-20.128 72.407-0.183L513.629 439.99l320.877-322.504c19.945-20.045 52.362-20.126 72.407-0.182 20.045 19.944 20.126 52.362 0.182 72.408L584.814 513.627l322.098 320.478c20.045 19.944 20.127 52.362 0.184 72.407-19.944 20.045-52.362 20.128-72.407 0.183L510.371 584.01z" fill="#ffffff" p-id="2884"></path></svg> |
| @@ -151,6 +151,12 @@ export default { | @@ -151,6 +151,12 @@ export default { | ||
| 151 | /**crm**/ | 151 | /**crm**/ |
| 152 | 'App.Reserve.Members':null, | 152 | 'App.Reserve.Members':null, |
| 153 | 153 | ||
| 154 | + //常用备注 | ||
| 155 | + 'App.User.GetCustomRemark':null, | ||
| 156 | + | ||
| 157 | + //添加备注 | ||
| 158 | + 'App.User.AddCustomRemark':null | ||
| 159 | + | ||
| 154 | //顾客端配置信息、菜系 | 160 | //顾客端配置信息、菜系 |
| 155 | 'App.Reserve.GetCustomerConfig':{ | 161 | 'App.Reserve.GetCustomerConfig':{ |
| 156 | cachetime: 1800, | 162 | cachetime: 1800, |
| @@ -171,7 +171,8 @@ module.exports ={ | @@ -171,7 +171,8 @@ module.exports ={ | ||
| 171 | if (flag) { | 171 | if (flag) { |
| 172 | break; | 172 | break; |
| 173 | } | 173 | } |
| 174 | - if (isDay) { | 174 | + let nownd=util.unixtoTime(new Date()/1000,'HH:II') |
| 175 | + if (isDay && nownd>times[i][times[i].length-1]) { | ||
| 175 | obj.timeOpt[i] = 'disabled'; | 176 | obj.timeOpt[i] = 'disabled'; |
| 176 | } | 177 | } |
| 177 | } | 178 | } |
-
Please register or login to post a comment