Showing
9 changed files
with
126 additions
and
16 deletions
| 1 | <!--components/book/tabBar/tabBar.wxml--> | 1 | <!--components/book/tabBar/tabBar.wxml--> |
| 2 | <view class="tabBar flex-cc" > | 2 | <view class="tabBar flex-cc" > |
| 3 | <block wx:if="{{!tabsHidden}}"> | 3 | <block wx:if="{{!tabsHidden}}"> |
| 4 | - <formids wx:if="{{hasEditorFlag}}" class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_addnew"> | 4 | + <!-- <formids wx:if="{{hasEditorFlag}}" class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_addnew"> |
| 5 | <view class="flex-vc {{pi=='b_addnew'?'checked':''}}" > | 5 | <view class="flex-vc {{pi=='b_addnew'?'checked':''}}" > |
| 6 | <view class="icon reserve"></view> | 6 | <view class="icon reserve"></view> |
| 7 | <view class="text">订座</view> | 7 | <view class="text">订座</view> |
| @@ -24,6 +24,12 @@ | @@ -24,6 +24,12 @@ | ||
| 24 | <view class="icon board"></view> | 24 | <view class="icon board"></view> |
| 25 | <view class="text">桌位</view> | 25 | <view class="text">桌位</view> |
| 26 | </view> | 26 | </view> |
| 27 | + </formids> --> | ||
| 28 | + <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/reservation/reservation"> | ||
| 29 | + <view class="flex-vc {{pi=='reservation'?'checked':''}}"> | ||
| 30 | + <view class="icon order"></view> | ||
| 31 | + <view class="text">预订本</view> | ||
| 32 | + </view> | ||
| 27 | </formids> | 33 | </formids> |
| 28 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/setting/index"> | 34 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/setting/index"> |
| 29 | <view class="flex-vc {{pi=='index'?'checked':''}}"> | 35 | <view class="flex-vc {{pi=='index'?'checked':''}}"> |
| @@ -23,6 +23,12 @@ Page({ | @@ -23,6 +23,12 @@ Page({ | ||
| 23 | seller: res.data.seller, | 23 | seller: res.data.seller, |
| 24 | user: res.data.seller_user | 24 | user: res.data.seller_user |
| 25 | }) | 25 | }) |
| 26 | + let role_name = res.data.seller_user.role_name; | ||
| 27 | + let sellerInfo = util.cache('sellerInfo') | ||
| 28 | + util.cache('sellerInfo',{ | ||
| 29 | + ...sellerInfo, | ||
| 30 | + role_name | ||
| 31 | + }) | ||
| 26 | }) | 32 | }) |
| 27 | PubSub.on( | 33 | PubSub.on( |
| 28 | 'flushNewCustomer', | 34 | 'flushNewCustomer', |
| @@ -19,15 +19,15 @@ | @@ -19,15 +19,15 @@ | ||
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| 21 | </formids> | 21 | </formids> |
| 22 | - <formids url="/pack-book/pages/book/smsbatch/index"> | 22 | + <!-- <formids url="/pack-book/pages/book/smsbatch/index"> |
| 23 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 23 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 24 | <view>短信营销</view> | 24 | <view>短信营销</view> |
| 25 | <view class="flex-rr"> | 25 | <view class="flex-rr"> |
| 26 | <view class="more"></view> | 26 | <view class="more"></view> |
| 27 | </view> | 27 | </view> |
| 28 | </view> | 28 | </view> |
| 29 | - </formids> | ||
| 30 | - <formids url="/pack-book/pages/book/crm/index"> | 29 | + </formids> --> |
| 30 | + <!-- <formids url="/pack-book/pages/book/crm/index"> | ||
| 31 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 31 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 32 | <view>我的客户</view> | 32 | <view>我的客户</view> |
| 33 | <view class="flex-rr"> | 33 | <view class="flex-rr"> |
| @@ -35,23 +35,23 @@ | @@ -35,23 +35,23 @@ | ||
| 35 | <view class="more"></view> | 35 | <view class="more"></view> |
| 36 | </view> | 36 | </view> |
| 37 | </view> | 37 | </view> |
| 38 | - </formids> | ||
| 39 | - <formids url="/pack-book/pages/book/remark/index"> | 38 | + </formids> --> |
| 39 | + <!-- <formids url="/pack-book/pages/book/remark/index"> | ||
| 40 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 40 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 41 | <view>常用备注</view> | 41 | <view>常用备注</view> |
| 42 | <view class="flex-rr"> | 42 | <view class="flex-rr"> |
| 43 | <view class="more"></view> | 43 | <view class="more"></view> |
| 44 | </view> | 44 | </view> |
| 45 | </view> | 45 | </view> |
| 46 | - </formids> | ||
| 47 | - <formids url="/pack-book/pages/book/roomtype/roomtype"> | 46 | + </formids> --> |
| 47 | + <!-- <formids url="/pack-book/pages/book/roomtype/roomtype"> | ||
| 48 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 48 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 49 | <view>在线预订包间置满</view> | 49 | <view>在线预订包间置满</view> |
| 50 | <view class="flex-rr"> | 50 | <view class="flex-rr"> |
| 51 | <view class="more"></view> | 51 | <view class="more"></view> |
| 52 | </view> | 52 | </view> |
| 53 | </view> | 53 | </view> |
| 54 | - </formids> | 54 | + </formids> --> |
| 55 | <formids url="/pages/customer/index?islove=customer"> | 55 | <formids url="/pages/customer/index?islove=customer"> |
| 56 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 56 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 57 | <view>切换到顾客模式</view> | 57 | <view>切换到顾客模式</view> |
| @@ -60,14 +60,14 @@ | @@ -60,14 +60,14 @@ | ||
| 60 | </view> | 60 | </view> |
| 61 | </view> | 61 | </view> |
| 62 | </formids> | 62 | </formids> |
| 63 | - <formids url="/pages/manager-invitation/index"> | 63 | + <!-- <formids url="/pages/manager-invitation/index"> |
| 64 | <view class="row flex-lr" style="padding-top: 34rpx;"> | 64 | <view class="row flex-lr" style="padding-top: 34rpx;"> |
| 65 | <view>切换到客户经理模式</view> | 65 | <view>切换到客户经理模式</view> |
| 66 | <view class="flex-rr"> | 66 | <view class="flex-rr"> |
| 67 | <view class="more"></view> | 67 | <view class="more"></view> |
| 68 | </view> | 68 | </view> |
| 69 | </view> | 69 | </view> |
| 70 | - </formids> | 70 | + </formids> --> |
| 71 | </view> | 71 | </view> |
| 72 | <tabBar bindNewCustomer="NewCustomer" id="tabBar"></tabBar> | 72 | <tabBar bindNewCustomer="NewCustomer" id="tabBar"></tabBar> |
| 73 | <share id="share" seller_id="{{seller.id}}" hasSellerShare="{{true}}"></share> | 73 | <share id="share" seller_id="{{seller.id}}" hasSellerShare="{{true}}"></share> |
| @@ -104,7 +104,7 @@ Page({ | @@ -104,7 +104,7 @@ Page({ | ||
| 104 | let year1 = ddateStr.getFullYear(); | 104 | let year1 = ddateStr.getFullYear(); |
| 105 | let month1 = ddateStr.getMonth() + 1; | 105 | let month1 = ddateStr.getMonth() + 1; |
| 106 | let day1 = ddateStr.getDate(); | 106 | let day1 = ddateStr.getDate(); |
| 107 | - let day2 = year1 + '-' + (month1 < 10 ? '0' + month1 : month1) + '-' + day1; | 107 | + let day2 = year1 + '-' + (month1 < 10 ? '0' + month1 : month1) + '-' + (day1 < 10 ? '0' + day1 : day1); |
| 108 | App.Seller.getMealSectionByDay({ | 108 | App.Seller.getMealSectionByDay({ |
| 109 | sellerid: reserev.sid, | 109 | sellerid: reserev.sid, |
| 110 | day: day2, | 110 | day: day2, |
| @@ -33,7 +33,7 @@ Page({ | @@ -33,7 +33,7 @@ Page({ | ||
| 33 | } | 33 | } |
| 34 | if (opt.act == 'tobook') {//消息跳入运营处理预订 | 34 | if (opt.act == 'tobook') {//消息跳入运营处理预订 |
| 35 | delete opt.act | 35 | delete opt.act |
| 36 | - return this.redirectTo({url: util.http_build_query(opt, '/pack-book/pages/book/b_index')}); | 36 | + return this.redirectTo({url: util.http_build_query(opt, '/pack-book/pages/reservation/reservation')}); |
| 37 | } | 37 | } |
| 38 | mta.Page.init({ | 38 | mta.Page.init({ |
| 39 | "appID": "500667280", | 39 | "appID": "500667280", |
| @@ -80,9 +80,11 @@ Page({ | @@ -80,9 +80,11 @@ Page({ | ||
| 80 | let opt = this.options | 80 | let opt = this.options |
| 81 | let usi=this.usi | 81 | let usi=this.usi |
| 82 | if (usi.data.seller.flag) {//商户 | 82 | if (usi.data.seller.flag) {//商户 |
| 83 | + util.cache('sellerid',usi.data.data.seller_id) | ||
| 83 | //获得商户数据 | 84 | //获得商户数据 |
| 84 | //this.enter_params=await this.SellerForOpenid(opt.openid); | 85 | //this.enter_params=await this.SellerForOpenid(opt.openid); |
| 85 | this.enter_params = usi.data.data; | 86 | this.enter_params = usi.data.data; |
| 87 | + util.cache('enter_params',this.enter_params) | ||
| 86 | } | 88 | } |
| 87 | if (usi.data.invitation.flag) {//已是客户经理 | 89 | if (usi.data.invitation.flag) {//已是客户经理 |
| 88 | this.isInvitation = true; | 90 | this.isInvitation = true; |
| @@ -190,7 +192,7 @@ Page({ | @@ -190,7 +192,7 @@ Page({ | ||
| 190 | if (this.enter_params && this.islove != 'customer' && this.islove != 'invitation') { | 192 | if (this.enter_params && this.islove != 'customer' && this.islove != 'invitation') { |
| 191 | //商户且未手动切换到顾客端或客户经理 | 193 | //商户且未手动切换到顾客端或客户经理 |
| 192 | wx.reLaunch({ | 194 | wx.reLaunch({ |
| 193 | - url: util.http_build_query(this.enter_params, '/pack-book/pages/book/b_index') | 195 | + url: util.http_build_query(this.enter_params, '/pack-book/pages/reservation/reservation') |
| 194 | }) | 196 | }) |
| 195 | return; | 197 | return; |
| 196 | } | 198 | } |
| @@ -66,7 +66,7 @@ Page({ | @@ -66,7 +66,7 @@ Page({ | ||
| 66 | }) | 66 | }) |
| 67 | util.cache('islove','book'); | 67 | util.cache('islove','book'); |
| 68 | wx.reLaunch({ | 68 | wx.reLaunch({ |
| 69 | - url:util.http_build_query(res.data,'/pack-book/pages/book/b_index') | 69 | + url:util.http_build_query(res.data,'/pack-book/pages/reservation/reservation') |
| 70 | }) | 70 | }) |
| 71 | }else{ | 71 | }else{ |
| 72 | this.setData({ | 72 | this.setData({ |
| @@ -94,8 +94,9 @@ Page({ | @@ -94,8 +94,9 @@ Page({ | ||
| 94 | hasSellerBook:res.data, | 94 | hasSellerBook:res.data, |
| 95 | }) | 95 | }) |
| 96 | util.cache('islove','book'); | 96 | util.cache('islove','book'); |
| 97 | + util.cache('enter_params',res.data); | ||
| 97 | wx.reLaunch({ | 98 | wx.reLaunch({ |
| 98 | - url:util.http_build_query(res.data,'/pack-book/pages/book/b_index') | 99 | + url:util.http_build_query(res.data,'/pack-book/pages/reservation/reservation') |
| 99 | }) | 100 | }) |
| 100 | }else{ | 101 | }else{ |
| 101 | this.setData({ | 102 | this.setData({ |
| @@ -797,4 +797,88 @@ export default { | @@ -797,4 +797,88 @@ export default { | ||
| 797 | alias:'App.Seller.getMealSectionByDay', | 797 | alias:'App.Seller.getMealSectionByDay', |
| 798 | cachetime: 0, | 798 | cachetime: 0, |
| 799 | }, | 799 | }, |
| 800 | + | ||
| 801 | + //获取商家桌位列表及对应预订数据 | ||
| 802 | + 'App.Reserve.GetTableListOrReserve':{ | ||
| 803 | + alias:'Android.Reserve.GetTableListOrReserve', | ||
| 804 | + openid:'openid', | ||
| 805 | + cachetime: 0, | ||
| 806 | + }, | ||
| 807 | + | ||
| 808 | + //隐藏订单日期配置列表 | ||
| 809 | + 'App.Seller.GetSellerHideConf':{ | ||
| 810 | + openid:'openid', | ||
| 811 | + }, | ||
| 812 | + | ||
| 813 | + //预订详情所需数据集合 | ||
| 814 | + 'App.Reserve.GetReserveDetailDataSet':{ | ||
| 815 | + alias:'Android.Reserve.GetReserveDetailDataSet', | ||
| 816 | + cachetime: 0, | ||
| 817 | + }, | ||
| 818 | + | ||
| 819 | + //预订详情所需其他附属信息 | ||
| 820 | + 'App.Reserve.GetReserveDetailRelationData':{ | ||
| 821 | + alias:'Android.Reserve.GetReserveDetailRelationData', | ||
| 822 | + cachetime: 0, | ||
| 823 | + }, | ||
| 824 | + | ||
| 825 | + //店员列表 | ||
| 826 | + 'App.Seller.GetAuthUserLists':{ | ||
| 827 | + }, | ||
| 828 | + | ||
| 829 | + //编辑订单附加信息 | ||
| 830 | + 'App.Reserve.UpReserveInfo':{ | ||
| 831 | + }, | ||
| 832 | + | ||
| 833 | + //获取用餐类型 | ||
| 834 | + 'App.Seller.GetReserveTypeField':{ | ||
| 835 | + }, | ||
| 836 | + | ||
| 837 | + //设置订单服务经理 | ||
| 838 | + 'App.Reserve.SetServeUidByRid':{ | ||
| 839 | + }, | ||
| 840 | + | ||
| 841 | + //创建收定金 | ||
| 842 | + 'App.Reserve.CreateReserveDeposit':{ | ||
| 843 | + }, | ||
| 844 | + | ||
| 845 | + //删除定金 | ||
| 846 | + 'App.Reserve.DelReserveDepositByid':{ | ||
| 847 | + }, | ||
| 848 | + | ||
| 849 | + //创建核餐 | ||
| 850 | + 'App.Reserve.CreateReserveRecheck':{ | ||
| 851 | + }, | ||
| 852 | + | ||
| 853 | + //获取账号服务类型 | ||
| 854 | + 'App.Seller.GetSellerUserAccountType':{ | ||
| 855 | + }, | ||
| 856 | + | ||
| 857 | + //获取商家信息 | ||
| 858 | + 'App.Seller.GetSellerById':{ | ||
| 859 | + }, | ||
| 860 | + | ||
| 861 | + //设置预定状态 | ||
| 862 | + 'App.Customer.SetReserveStatus':{ | ||
| 863 | + alias:'Android.Customer.SetReserveStatus', | ||
| 864 | + cachetime: 0, | ||
| 865 | + }, | ||
| 866 | + | ||
| 867 | + //取消订单设置定金走向 | ||
| 868 | + 'App.Reserve.SetReserveDeposit':{ | ||
| 869 | + }, | ||
| 870 | + | ||
| 871 | + //发送预订短信 | ||
| 872 | + 'App.SendSMS.WxSendSms':{ | ||
| 873 | + }, | ||
| 874 | + | ||
| 875 | + | ||
| 876 | + //录入订座信息 | ||
| 877 | + 'App.Reserve.SetReserveInfo':{ | ||
| 878 | + alias:'Android.Reserve.SetReserveInfo', | ||
| 879 | + cachetime: 0, | ||
| 880 | + }, | ||
| 881 | + | ||
| 882 | + | ||
| 883 | + | ||
| 800 | } | 884 | } |
| @@ -269,6 +269,16 @@ function throttle(fn, gapTime) { | @@ -269,6 +269,16 @@ function throttle(fn, gapTime) { | ||
| 269 | } | 269 | } |
| 270 | } | 270 | } |
| 271 | } | 271 | } |
| 272 | +let roles = { | ||
| 273 | + cancel: ['管理员', '前台'],//取消预订 | ||
| 274 | + edit: ['管理员', '前台'],//变更预订 | ||
| 275 | + sending: ['管理员', '前台'],//发送短信 | ||
| 276 | + arrival: ['管理员', '店长', '前台', '迎宾'],//到店 | ||
| 277 | + leave: ['管理员', '店长', '前台', '迎宾'],//离店 | ||
| 278 | + addBanquet: ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],//创建宴会 | ||
| 279 | + addBook: ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],//新建预订 | ||
| 280 | + depositNuclearMeal: ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],//核餐和订金 | ||
| 281 | +} | ||
| 272 | module.exports = { | 282 | module.exports = { |
| 273 | formatTime: formatTime, | 283 | formatTime: formatTime, |
| 274 | unixtoTime: unixtoTime, | 284 | unixtoTime: unixtoTime, |
| @@ -281,6 +291,7 @@ module.exports = { | @@ -281,6 +291,7 @@ module.exports = { | ||
| 281 | uploadFile, | 291 | uploadFile, |
| 282 | deletelUpload, | 292 | deletelUpload, |
| 283 | throttle, | 293 | throttle, |
| 294 | + roles, | ||
| 284 | cgi: function (act) { | 295 | cgi: function (act) { |
| 285 | return uri.HOST__LINE + act //正式 | 296 | return uri.HOST__LINE + act //正式 |
| 286 | //return uri.HOST__TEST+act //测试 | 297 | //return uri.HOST__TEST+act //测试 |
-
Please register or login to post a comment