Commit d066617629a1f489533b75ecf3ad23a842763a6f
Merge branch 'master' of http://123.56.79.57/xt/xcx-book
# By vking # Via vking * 'master' of http://123.56.79.57/xt/xcx-book: (38 commits) 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 周到安排 ...
Showing
51 changed files
with
674 additions
and
138 deletions
| @@ -16,30 +16,7 @@ Array.prototype.remove = function(val) { | @@ -16,30 +16,7 @@ Array.prototype.remove = function(val) { | ||
| 16 | this.splice(index, 1); | 16 | this.splice(index, 1); |
| 17 | } | 17 | } |
| 18 | }; | 18 | }; |
| 19 | -if (wx.getRealtimeLogManager) { | ||
| 20 | - const logger = wx.getRealtimeLogManager() | ||
| 21 | - let consoleLog=console.log | ||
| 22 | - function wlog(){ | ||
| 23 | - let argumentsX=[...arguments] | ||
| 24 | - return new Promise(function (success,fail) { | ||
| 25 | - let params=[] | ||
| 26 | - let len=0 | ||
| 27 | - argumentsX.forEach((val,i)=>{ | ||
| 28 | - if(len>=4500) return | ||
| 29 | - let str=JSON.stringify(val); | ||
| 30 | - if(!str) return; | ||
| 31 | - params[i]=str.substr(0,4500-len) | ||
| 32 | - len+=params[i].length | ||
| 33 | - }) | ||
| 34 | - logger.info(...params); | ||
| 35 | - success() | ||
| 36 | - }) | ||
| 37 | - } | ||
| 38 | - console.log=function () { | ||
| 39 | - consoleLog(...arguments) | ||
| 40 | - wlog(...arguments); | ||
| 41 | - } | ||
| 42 | -} | 19 | +import log from 'utils/realTimeLog' |
| 43 | App({ | 20 | App({ |
| 44 | openid:"", | 21 | openid:"", |
| 45 | system:{}, | 22 | system:{}, |
| @@ -187,7 +164,7 @@ App({ | @@ -187,7 +164,7 @@ App({ | ||
| 187 | wx.getClipboardData({ | 164 | wx.getClipboardData({ |
| 188 | success:(res)=>{ | 165 | success:(res)=>{ |
| 189 | let match=res.data.match(/#(.*)#/); | 166 | let match=res.data.match(/#(.*)#/); |
| 190 | - if(match && res.data.indexOf('一键订')>0){ | 167 | + if(match && res.data.indexOf('周到安排')>0){ |
| 191 | success(match[1]) | 168 | success(match[1]) |
| 192 | }else{ | 169 | }else{ |
| 193 | fail() | 170 | fail() |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | "pages/customer/remind", | 11 | "pages/customer/remind", |
| 12 | "pages/reserve/index", | 12 | "pages/reserve/index", |
| 13 | "pages/me/index", | 13 | "pages/me/index", |
| 14 | - "pages/me/concat", | 14 | + "pages/me/concat", |
| 15 | "pages/me/setting", | 15 | "pages/me/setting", |
| 16 | "pages/me/list", | 16 | "pages/me/list", |
| 17 | "pages/reserve/search", | 17 | "pages/reserve/search", |
| @@ -64,7 +64,8 @@ | @@ -64,7 +64,8 @@ | ||
| 64 | "pages/book/smsbatch/detail", | 64 | "pages/book/smsbatch/detail", |
| 65 | "pages/book/smsbatch/list", | 65 | "pages/book/smsbatch/list", |
| 66 | "pages/book/smsbatch/result", | 66 | "pages/book/smsbatch/result", |
| 67 | - "pages/book/roomtype/roomtype" | 67 | + "pages/book/roomtype/roomtype", |
| 68 | + "pages/book/b_reserve" | ||
| 68 | ] | 69 | ] |
| 69 | } | 70 | } |
| 70 | ], | 71 | ], |
| @@ -124,7 +125,7 @@ | @@ -124,7 +125,7 @@ | ||
| 124 | "version": "1.2.1", | 125 | "version": "1.2.1", |
| 125 | "provider": "wx23a9cef3522e4f7c" | 126 | "provider": "wx23a9cef3522e4f7c" |
| 126 | }, | 127 | }, |
| 127 | - "haowu":{ | 128 | + "haowu": { |
| 128 | "version": "3.2.0", | 129 | "version": "3.2.0", |
| 129 | "provider": "wx56c8f077de74b07c" | 130 | "provider": "wx56c8f077de74b07c" |
| 130 | } | 131 | } |
| @@ -134,9 +135,9 @@ | @@ -134,9 +135,9 @@ | ||
| 134 | "desc": "你的位置信息用于获得离你最近的餐厅" | 135 | "desc": "你的位置信息用于获得离你最近的餐厅" |
| 135 | } | 136 | } |
| 136 | }, | 137 | }, |
| 137 | - "usingComponents":{ | ||
| 138 | - "layout":"/components/layout", | ||
| 139 | - "fb":"/components/common/feedback" | 138 | + "usingComponents": { |
| 139 | + "layout": "/components/layout", | ||
| 140 | + "fb": "/components/common/feedback" | ||
| 140 | }, | 141 | }, |
| 141 | "debug": true, | 142 | "debug": true, |
| 142 | "sitemapLocation": "sitemap.json" | 143 | "sitemapLocation": "sitemap.json" |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | 优惠信息 | 5 | 优惠信息 |
| 6 | <view class="close"></view> | 6 | <view class="close"></view> |
| 7 | </view> | 7 | </view> |
| 8 | - <view class="slogan">致电商家时,请说明是一键订平台的客户</view> | 8 | + <view class="slogan">致电商家时,请说明是周到安排平台的客户</view> |
| 9 | <scroll-view | 9 | <scroll-view |
| 10 | scroll-y | 10 | scroll-y |
| 11 | class="list" | 11 | class="list" |
| @@ -65,7 +65,7 @@ Component({ | @@ -65,7 +65,7 @@ Component({ | ||
| 65 | item_code:seller.id+"", | 65 | item_code:seller.id+"", |
| 66 | title:seller.sellername, | 66 | title:seller.sellername, |
| 67 | desc:seller.slogan, | 67 | desc:seller.slogan, |
| 68 | - category_list:(seller.cate && seller.cate.length>0)?seller.cate:['餐厅','饭店','餐饮','订包间','一键订'], | 68 | + category_list:(seller.cate && seller.cate.length>0)?seller.cate:['餐厅','饭店','餐饮','订包间','周到安排'], |
| 69 | image_list:seller.envi_image, | 69 | image_list:seller.envi_image, |
| 70 | src_mini_program_path:'/pages/reserve/detail?id='+seller.id+'&from=haowu', | 70 | src_mini_program_path:'/pages/reserve/detail?id='+seller.id+'&from=haowu', |
| 71 | brand_info:{ | 71 | brand_info:{ |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <cover-view style="position: relative;" wx:if="{{!hidden}}"> | 5 | <cover-view style="position: relative;" wx:if="{{!hidden}}"> |
| 6 | <cover-image src="http://qn.colorcun.com/reserve/images/%E4%BC%98%E6%83%A0%E6%B4%BB%E5%8A%A83.png"></cover-image> | 6 | <cover-image src="http://qn.colorcun.com/reserve/images/%E4%BC%98%E6%83%A0%E6%B4%BB%E5%8A%A83.png"></cover-image> |
| 7 | <cover-view class="discount-view"> | 7 | <cover-view class="discount-view"> |
| 8 | - <cover-view class="text">精选折扣,一键订用户专享</cover-view> | 8 | + <cover-view class="text">精选折扣,周到安排用户专享</cover-view> |
| 9 | <cover-view class="close" catchtap="hide"></cover-view> | 9 | <cover-view class="close" catchtap="hide"></cover-view> |
| 10 | </cover-view> | 10 | </cover-view> |
| 11 | </cover-view> | 11 | </cover-view> |
| @@ -7,6 +7,10 @@ Component({ | @@ -7,6 +7,10 @@ Component({ | ||
| 7 | type:String, | 7 | type:String, |
| 8 | value:"", | 8 | value:"", |
| 9 | }, | 9 | }, |
| 10 | + hasPubSub:{ | ||
| 11 | + type:Boolean, | ||
| 12 | + value:false | ||
| 13 | + }, | ||
| 10 | }, | 14 | }, |
| 11 | data: {}, | 15 | data: {}, |
| 12 | methods: { | 16 | methods: { |
| @@ -14,29 +18,46 @@ Component({ | @@ -14,29 +18,46 @@ Component({ | ||
| 14 | var tebleid = e.currentTarget.dataset.id; | 18 | var tebleid = e.currentTarget.dataset.id; |
| 15 | var tables = util.cache('tableid') ? util.cache('tableid') : []; | 19 | var tables = util.cache('tableid') ? util.cache('tableid') : []; |
| 16 | var list = this.data.list; | 20 | var list = this.data.list; |
| 17 | - var pages = getCurrentPages(); | ||
| 18 | - var addnewPage=pages[pages.length - 2]; | ||
| 19 | - let checkedTids=this.data.checkedTids.split(','); | ||
| 20 | - list.forEach(function (v, i) { | ||
| 21 | - if (v.id == tebleid) { | ||
| 22 | - console.log('click.board',v); | ||
| 23 | - if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none'); | ||
| 24 | - if (v.isselect == true) { | ||
| 25 | - var thisindex = tables.indexOf(tebleid); | ||
| 26 | - tables.splice(thisindex, 1) | ||
| 27 | - delete addnewPage.checkedTables[tebleid] | ||
| 28 | - } else { | ||
| 29 | - tables.push(tebleid) | ||
| 30 | - addnewPage.checkedTables[tebleid]=v.name; | 21 | + if(this.data.hasPubSub){ |
| 22 | + let checkedTids=this.data.checkedTids.split(','); | ||
| 23 | + list.forEach(function (v, i) { | ||
| 24 | + if (v.id == tebleid) { | ||
| 25 | + console.log('click.board',v); | ||
| 26 | + if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none'); | ||
| 27 | + if (v.isselect == true) { | ||
| 28 | + var thisindex = tables.indexOf(tebleid); | ||
| 29 | + tables.splice(thisindex, 1) | ||
| 30 | + } else { | ||
| 31 | + tables.push(tebleid) | ||
| 32 | + } | ||
| 33 | + v.isselect = !v.isselect | ||
| 31 | } | 34 | } |
| 32 | - v.isselect = !v.isselect | ||
| 33 | - } | ||
| 34 | - }) | ||
| 35 | - addnewPage.data.form.tid = tables; | ||
| 36 | - addnewPage.setData({ | ||
| 37 | - form: addnewPage.data.form | ||
| 38 | - }) | ||
| 39 | - console.log('checkedTables',addnewPage.checkedTables); | 35 | + }) |
| 36 | + }else{ | ||
| 37 | + var pages = getCurrentPages(); | ||
| 38 | + var addnewPage=pages[pages.length - 2]; | ||
| 39 | + let checkedTids=this.data.checkedTids.split(','); | ||
| 40 | + list.forEach(function (v, i) { | ||
| 41 | + if (v.id == tebleid) { | ||
| 42 | + console.log('click.board',v); | ||
| 43 | + if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none'); | ||
| 44 | + if (v.isselect == true) { | ||
| 45 | + var thisindex = tables.indexOf(tebleid); | ||
| 46 | + tables.splice(thisindex, 1) | ||
| 47 | + delete addnewPage.checkedTables[tebleid] | ||
| 48 | + } else { | ||
| 49 | + tables.push(tebleid) | ||
| 50 | + addnewPage.checkedTables[tebleid]=v.name; | ||
| 51 | + } | ||
| 52 | + v.isselect = !v.isselect | ||
| 53 | + } | ||
| 54 | + }) | ||
| 55 | + addnewPage.data.form.tid = tables; | ||
| 56 | + addnewPage.setData({ | ||
| 57 | + form: addnewPage.data.form | ||
| 58 | + }) | ||
| 59 | + console.log('checkedTables',addnewPage.checkedTables); | ||
| 60 | + } | ||
| 40 | util.cache('tableid', tables); | 61 | util.cache('tableid', tables); |
| 41 | this.triggerEvent("changedesk"); | 62 | this.triggerEvent("changedesk"); |
| 42 | this.setData({ | 63 | this.setData({ |
| @@ -39,7 +39,7 @@ Component({ | @@ -39,7 +39,7 @@ Component({ | ||
| 39 | }) | 39 | }) |
| 40 | }, | 40 | }, |
| 41 | async sendMsg(e){ | 41 | async sendMsg(e){ |
| 42 | - let sign_name = '一键订'; | 42 | + let sign_name = '周到安排'; |
| 43 | let item = this.data.item; | 43 | let item = this.data.item; |
| 44 | let ss = await App.Reserve.SmsInfo({seller_id: item.sid}, true); | 44 | let ss = await App.Reserve.SmsInfo({seller_id: item.sid}, true); |
| 45 | let id = item.id; | 45 | let id = item.id; |
| @@ -15,24 +15,20 @@ Component({ | @@ -15,24 +15,20 @@ Component({ | ||
| 15 | data: { | 15 | data: { |
| 16 | pi: 0, | 16 | pi: 0, |
| 17 | dot:0, | 17 | dot:0, |
| 18 | - hasEditorFlag:false, | 18 | + hasEditorFlag:false,//添加预订 |
| 19 | + hasReserveOrder:false,//运营处理在线预订 | ||
| 19 | tabsHidden:true, | 20 | tabsHidden:true, |
| 20 | }, | 21 | }, |
| 21 | attached(){ | 22 | attached(){ |
| 22 | let pages = getCurrentPages(); | 23 | let pages = getCurrentPages(); |
| 23 | let p = pages[pages.length - 1]; | 24 | let p = pages[pages.length - 1]; |
| 24 | - let pi = ['/pack-book/pages/book/b_addnew', '/pack-book/pages/book/b_index', '/pack-book/pages/book/b_setting', '/pack-book/pages/book/setting/index']; | ||
| 25 | - for (let x in pi) { | ||
| 26 | - console.log('tabBar', pi[x], p); | ||
| 27 | - if (pi[x].indexOf(p.route) > -1) { | ||
| 28 | - this.setData({ | ||
| 29 | - pi: x | ||
| 30 | - }) | ||
| 31 | - break; | ||
| 32 | - } | ||
| 33 | - } | 25 | + let pr=p.route.split('/') |
| 26 | + this.setData({ | ||
| 27 | + pi: pr[pr.length-1] | ||
| 28 | + }) | ||
| 34 | }, | 29 | }, |
| 35 | ready(){ | 30 | ready(){ |
| 31 | + this.VerificationIsAdmin() | ||
| 36 | this.hasDot() | 32 | this.hasDot() |
| 37 | this.hasEditor(); | 33 | this.hasEditor(); |
| 38 | }, | 34 | }, |
| @@ -71,5 +67,16 @@ Component({ | @@ -71,5 +67,16 @@ Component({ | ||
| 71 | }) | 67 | }) |
| 72 | }) | 68 | }) |
| 73 | }, | 69 | }, |
| 70 | + VerificationIsAdmin(){ | ||
| 71 | + gl.VerificationIsAdmin().then(()=>{ | ||
| 72 | + this.setData({ | ||
| 73 | + hasReserveOrder:true, | ||
| 74 | + }) | ||
| 75 | + }).catch(()=>{ | ||
| 76 | + this.setData({ | ||
| 77 | + hasReserveOrder:false, | ||
| 78 | + }) | ||
| 79 | + }) | ||
| 80 | + }, | ||
| 74 | } | 81 | } |
| 75 | }) | 82 | }) |
| @@ -2,25 +2,31 @@ | @@ -2,25 +2,31 @@ | ||
| 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==0?'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> |
| 8 | </view> | 8 | </view> |
| 9 | </formids> | 9 | </formids> |
| 10 | + <formids wx:if="{{hasReserveOrder}}" class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_reserve"> | ||
| 11 | + <view class="flex-vc {{pi=='b_reserve'?'checked':''}}"> | ||
| 12 | + <view class="icon order"></view> | ||
| 13 | + <view class="text">在线预订</view> | ||
| 14 | + </view> | ||
| 15 | + </formids> | ||
| 10 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_index"> | 16 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_index"> |
| 11 | - <view class="flex-vc {{pi==1?'checked':''}}"> | 17 | + <view class="flex-vc {{pi=='b_index'?'checked':''}}"> |
| 12 | <view class="icon book"></view> | 18 | <view class="icon book"></view> |
| 13 | <view class="text">已预订</view> | 19 | <view class="text">已预订</view> |
| 14 | </view> | 20 | </view> |
| 15 | </formids> | 21 | </formids> |
| 16 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_setting"> | 22 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/b_setting"> |
| 17 | - <view class="flex-vc {{pi==2?'checked':''}}"> | 23 | + <view class="flex-vc {{pi=='b_setting'?'checked':''}}"> |
| 18 | <view class="icon board"></view> | 24 | <view class="icon board"></view> |
| 19 | <view class="text">桌位</view> | 25 | <view class="text">桌位</view> |
| 20 | </view> | 26 | </view> |
| 21 | </formids> | 27 | </formids> |
| 22 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/setting/index"> | 28 | <formids class="item flex-vc" bindtap="redirectTo" data-url="/pack-book/pages/book/setting/index"> |
| 23 | - <view class="flex-vc {{pi==3?'checked':''}}"> | 29 | + <view class="flex-vc {{pi=='index'?'checked':''}}"> |
| 24 | <view class="icon setting"> | 30 | <view class="icon setting"> |
| 25 | <view class="dot" wx:if="{{dot>0}}"></view> | 31 | <view class="dot" wx:if="{{dot>0}}"></view> |
| 26 | </view> | 32 | </view> |
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | } | 16 | } |
| 17 | .tabBar .item{ | 17 | .tabBar .item{ |
| 18 | width: 33%; | 18 | width: 33%; |
| 19 | - min-width: 25%; | 19 | + min-width: 20%; |
| 20 | } | 20 | } |
| 21 | .dot{ | 21 | .dot{ |
| 22 | position: absolute; | 22 | position: absolute; |
| @@ -62,3 +62,9 @@ | @@ -62,3 +62,9 @@ | ||
| 62 | .tabBar .checked .board { | 62 | .tabBar .checked .board { |
| 63 | background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards-checked.png"); | 63 | background-image: url("http://qn.colorcun.com/custom/lite-yd/image/seller-tabs2-boards-checked.png"); |
| 64 | } | 64 | } |
| 65 | +.tabBar .order{ | ||
| 66 | + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/%E6%97%B6%E9%97%B4%E6%8A%A5%E5%91%8A%20%281%29.png"); | ||
| 67 | +} | ||
| 68 | +.tabBar .checked .order { | ||
| 69 | + background-image: url("http://qn.colorcun.com/custom/lite-yd/image/%E6%97%B6%E9%97%B4%E6%8A%A5%E5%91%8A.png"); | ||
| 70 | +} |
| 1 | import App from '../utils/api' | 1 | import App from '../utils/api' |
| 2 | import util from '../utils/util' | 2 | import util from '../utils/util' |
| 3 | + | ||
| 3 | const {regeneratorRuntime} = global | 4 | const {regeneratorRuntime} = global |
| 4 | -module.exports ={ | ||
| 5 | - getHasEditorFlag(){ | ||
| 6 | - return new Promise(async function(success,fail){ | ||
| 7 | - let enter_params=util.cache('enter_params'); | ||
| 8 | - let res=await App.Reserve.SellerInfo(enter_params) | ||
| 9 | - if(res.data.config.is_auth==1){ | ||
| 10 | - success() | ||
| 11 | - }else{ | ||
| 12 | - fail() | ||
| 13 | - } | ||
| 14 | - }) | ||
| 15 | - }, | 5 | +module.exports = { |
| 6 | + getHasEditorFlag() { | ||
| 7 | + return new Promise(async function (success, fail) { | ||
| 8 | + let enter_params = util.cache('enter_params'); | ||
| 9 | + let res = await App.Reserve.SellerInfo(enter_params) | ||
| 10 | + if (res.data.config.is_auth == 1) { | ||
| 11 | + success() | ||
| 12 | + } else { | ||
| 13 | + fail() | ||
| 14 | + } | ||
| 15 | + }) | ||
| 16 | + }, | ||
| 17 | + VerificationIsAdmin() { | ||
| 18 | + //App.Seller.VerificationIsAdmin | ||
| 19 | + return new Promise(async function (success, fail) { | ||
| 20 | + let enter_params = util.cache('enter_params'); | ||
| 21 | + let res = await App.Seller.VerificationIsAdmin({openid:enter_params.seller_openid}) | ||
| 22 | + if (res.data && res.data.status==1) { | ||
| 23 | + success() | ||
| 24 | + } else { | ||
| 25 | + fail() | ||
| 26 | + } | ||
| 27 | + }) | ||
| 28 | + } | ||
| 16 | } | 29 | } |
| 1 | import util from '../../../utils/util'; | 1 | import util from '../../../utils/util'; |
| 2 | import comm from '../../../utils/bookCommon'; | 2 | import comm from '../../../utils/bookCommon'; |
| 3 | import App from '../../../utils/api'; | 3 | import App from '../../../utils/api'; |
| 4 | +import PubSub from '../../../utils/PubSub' | ||
| 4 | const {regeneratorRuntime} = global | 5 | const {regeneratorRuntime} = global |
| 5 | Page({ | 6 | Page({ |
| 6 | data: { | 7 | data: { |
| @@ -12,6 +13,7 @@ Page({ | @@ -12,6 +13,7 @@ Page({ | ||
| 12 | options:null, | 13 | options:null, |
| 13 | onLoad: function (opt) { | 14 | onLoad: function (opt) { |
| 14 | console.log('onLoad', opt) | 15 | console.log('onLoad', opt) |
| 16 | + wx.removeStorageSync({key: 'tableid'}) | ||
| 15 | this.options=opt; | 17 | this.options=opt; |
| 16 | var radio = 750 / util.getsystem().windowWidth; | 18 | var radio = 750 / util.getsystem().windowWidth; |
| 17 | var contentHeight = util.getsystem().windowHeight - Math.ceil(350 / radio); | 19 | var contentHeight = util.getsystem().windowHeight - Math.ceil(350 / radio); |
| @@ -26,7 +28,8 @@ Page({ | @@ -26,7 +28,8 @@ Page({ | ||
| 26 | this.setData({ | 28 | this.setData({ |
| 27 | sellerid: this.sellerid, | 29 | sellerid: this.sellerid, |
| 28 | opt: opt, | 30 | opt: opt, |
| 29 | - hasCheckedTable: this.checked_tids.length > 0 | 31 | + hasCheckedTable: this.checked_tids.length > 0, |
| 32 | + hasPubSub:opt.hasPubSub | ||
| 30 | }) | 33 | }) |
| 31 | //this.getdesklist(); | 34 | //this.getdesklist(); |
| 32 | this.getDeskList(); | 35 | this.getDeskList(); |
| @@ -48,6 +51,15 @@ Page({ | @@ -48,6 +51,15 @@ Page({ | ||
| 48 | buttonClick: true | 51 | buttonClick: true |
| 49 | }) | 52 | }) |
| 50 | //wx.removeStorage({key:'tableid'}) | 53 | //wx.removeStorage({key:'tableid'}) |
| 54 | + if(this.data.hasPubSub){ | ||
| 55 | + if(this.checked_tids.length<1) return | ||
| 56 | + wx.removeStorage({ | ||
| 57 | + key:'tableid' | ||
| 58 | + }) | ||
| 59 | + PubSub.emit('arrangeDesk',{ | ||
| 60 | + tableid:this.checked_tids | ||
| 61 | + }) | ||
| 62 | + } | ||
| 51 | wx.navigateBack(); | 63 | wx.navigateBack(); |
| 52 | }, | 64 | }, |
| 53 | getdesklist: function () { | 65 | getdesklist: function () { |
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | <view style="height: {{height-80}}px;overflow-y: auto;padding-bottom: 160rpx;overflow-x: hidden;width: 100%;"> | 12 | <view style="height: {{height-80}}px;overflow-y: auto;padding-bottom: 160rpx;overflow-x: hidden;width: 100%;"> |
| 13 | <block wx:for="{{desklist}}" wx:key="desklist.key"> | 13 | <block wx:for="{{desklist}}" wx:key="desklist.key"> |
| 14 | <orderDesk list="{{item.list}}" checkedTids="{{opt.checked_tids}}" | 14 | <orderDesk list="{{item.list}}" checkedTids="{{opt.checked_tids}}" |
| 15 | - bind:changedesk="changedesk" | 15 | + bind:changedesk="changedesk" hasPubSub="{{hasPubSub}}" |
| 16 | wx:if="{{item.name==menu_active_id}}"></orderDesk> | 16 | wx:if="{{item.name==menu_active_id}}"></orderDesk> |
| 17 | </block> | 17 | </block> |
| 18 | 18 |
| @@ -2,6 +2,7 @@ var util = require('../../../utils/util.js') | @@ -2,6 +2,7 @@ var util = require('../../../utils/util.js') | ||
| 2 | var uri = require('../../../utils/uri.js') | 2 | var uri = require('../../../utils/uri.js') |
| 3 | import App from '../../../utils/api'; | 3 | import App from '../../../utils/api'; |
| 4 | import RS from '../../../utils/reserveStatus' | 4 | import RS from '../../../utils/reserveStatus' |
| 5 | +import PubSub from '../../../utils/PubSub' | ||
| 5 | 6 | ||
| 6 | const {regeneratorRuntime} = global | 7 | const {regeneratorRuntime} = global |
| 7 | import TP from '../../../utils/tpls'; | 8 | import TP from '../../../utils/tpls'; |
| @@ -30,6 +31,12 @@ Page({ | @@ -30,6 +31,12 @@ Page({ | ||
| 30 | this.sc = (await App.Reserve.SellerInfo(this.enter_params)).data; | 31 | this.sc = (await App.Reserve.SellerInfo(this.enter_params)).data; |
| 31 | console.log('this.sc', this.sc); | 32 | console.log('this.sc', this.sc); |
| 32 | this.chooseManagerInit(); | 33 | this.chooseManagerInit(); |
| 34 | + PubSub.on('arrangeDesk',(desk)=>{ | ||
| 35 | + this.arrangeDesk(desk) | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + onUnload(){ | ||
| 39 | + PubSub.off('arrangeDesk') | ||
| 33 | }, | 40 | }, |
| 34 | onShow: function () { | 41 | onShow: function () { |
| 35 | this.notice = this.selectComponent('#notice'); | 42 | this.notice = this.selectComponent('#notice'); |
| @@ -178,20 +185,10 @@ Page({ | @@ -178,20 +185,10 @@ Page({ | ||
| 178 | }) | 185 | }) |
| 179 | }, | 186 | }, |
| 180 | async startDinner(e) { | 187 | async startDinner(e) { |
| 181 | - let cause = {}; | ||
| 182 | - let enter_params = util.cache('enter_params'); | ||
| 183 | - let sc = (await App.Reserve.SellerInfo(enter_params)).data | ||
| 184 | - cause = {desc: ""} | ||
| 185 | - if (enter_params) { | ||
| 186 | - cause.uid = enter_params.manager_id; | ||
| 187 | - } | ||
| 188 | - if (sc.seller_user) { | ||
| 189 | - cause.uname = (sc.seller_user.nick_name || sc.seller_user.nickname) | ||
| 190 | - } | ||
| 191 | App.Reserve.SetReserveStatus({ | 188 | App.Reserve.SetReserveStatus({ |
| 192 | rid: this.data.bookInfo.id, | 189 | rid: this.data.bookInfo.id, |
| 193 | status: util.attr(e, 'status'), | 190 | status: util.attr(e, 'status'), |
| 194 | - cause: JSON.stringify(cause), | 191 | + cause: await this.getCause(), |
| 195 | }).then(() => { | 192 | }).then(() => { |
| 196 | this.getDetail(this.data.bookInfo.id, true); | 193 | this.getDetail(this.data.bookInfo.id, true); |
| 197 | }); | 194 | }); |
| @@ -205,4 +202,93 @@ Page({ | @@ -205,4 +202,93 @@ Page({ | ||
| 205 | }, '/pack-cookbook/pages/success') | 202 | }, '/pack-cookbook/pages/success') |
| 206 | }); | 203 | }); |
| 207 | }, | 204 | }, |
| 205 | + refuseOrder(){ | ||
| 206 | + wx.showModal({ | ||
| 207 | + title: '确认拒绝订单吗?', | ||
| 208 | + content: '如果包间类型已订满,请及时停用', | ||
| 209 | + showCancel:true, | ||
| 210 | + cancelText:'拒绝订单', | ||
| 211 | + cancelColor:'', | ||
| 212 | + confirmText:'去安排', | ||
| 213 | + confirmColor:'', | ||
| 214 | + success:(async (res)=>{ | ||
| 215 | + console.info(res) | ||
| 216 | + if(res.cancel){ | ||
| 217 | + let params={ | ||
| 218 | + rid:this.data.bookInfo.id, | ||
| 219 | + status:6, | ||
| 220 | + cause:await this.getCause('拒绝订单'), | ||
| 221 | + } | ||
| 222 | + App.Reserve.SetReserveStatus(params).then(()=>{ | ||
| 223 | + this.getDetail(this.data.bookInfo.id,true); | ||
| 224 | + PubSub.emit('fulshReseveList') | ||
| 225 | + }) | ||
| 226 | + }else{//分配 | ||
| 227 | + this.arrangeOrder() | ||
| 228 | + } | ||
| 229 | + }) | ||
| 230 | + }) | ||
| 231 | + }, | ||
| 232 | + arrangeOrder(){ | ||
| 233 | + let bi=this.data.bookInfo | ||
| 234 | + let checked_tids='' | ||
| 235 | + //rdate=1568023200-1568041200&tid=0&pnum=6&checked_tids=&rid=&hasPubsub=1 | ||
| 236 | + wx.navigateTo({ | ||
| 237 | + url:util.http_build_query({ | ||
| 238 | + rdate:bi.rdate+'-'+bi.edate, | ||
| 239 | + tid:0, | ||
| 240 | + pnum:6, | ||
| 241 | + checked_tids:checked_tids, | ||
| 242 | + rid:'', | ||
| 243 | + hasPubSub:1, | ||
| 244 | + },'./b_desk') | ||
| 245 | + }) | ||
| 246 | + }, | ||
| 247 | + async arrangeDesk(res){ | ||
| 248 | + console.log('arrangeDesk',res.tableid) | ||
| 249 | + let params={ | ||
| 250 | + rid:this.data.bookInfo.id, | ||
| 251 | + status:5, | ||
| 252 | + cause:await this.getCause('安排包间'), | ||
| 253 | + tid:res.tableid.toString() | ||
| 254 | + } | ||
| 255 | + App.Reserve.SetReserveStatus(params).then(()=>{ | ||
| 256 | + this.getDetail(this.data.bookInfo.id,true); | ||
| 257 | + PubSub.emit('fulshReseveList') | ||
| 258 | + }) | ||
| 259 | + }, | ||
| 260 | + easyCall(e){ | ||
| 261 | + let bi=this.data.bookInfo | ||
| 262 | + let phone=bi.phone | ||
| 263 | + if(util.attr(e,'key')=='seller'){ | ||
| 264 | + phone=bi.seller.phone | ||
| 265 | + if(bi.seller.seller_tel){ | ||
| 266 | + let seller_tel=bi.seller.seller_tel.split(','); | ||
| 267 | + if(seller_tel.length>0){ | ||
| 268 | + phone=seller_tel[parseInt(Math.random()*seller_tel.length)] | ||
| 269 | + } | ||
| 270 | + } | ||
| 271 | + } | ||
| 272 | + phone=phone.replace(/[^\d]/g,'') | ||
| 273 | + if(phone){ | ||
| 274 | + wx.makePhoneCall({ | ||
| 275 | + phoneNumber: phone | ||
| 276 | + }) | ||
| 277 | + }else{ | ||
| 278 | + util.toast('号码为空','none') | ||
| 279 | + } | ||
| 280 | + }, | ||
| 281 | + async getCause(desc=""){ | ||
| 282 | + let cause = {}; | ||
| 283 | + let enter_params = util.cache('enter_params'); | ||
| 284 | + let sc = (await App.Reserve.SellerInfo(enter_params)).data | ||
| 285 | + cause = {desc: desc} | ||
| 286 | + if (enter_params) { | ||
| 287 | + cause.uid = enter_params.manager_id; | ||
| 288 | + } | ||
| 289 | + if (sc.seller_user) { | ||
| 290 | + cause.uname = (sc.seller_user.nick_name || sc.seller_user.nickname) | ||
| 291 | + } | ||
| 292 | + return JSON.stringify(cause) | ||
| 293 | + } | ||
| 208 | }) | 294 | }) |
| @@ -13,8 +13,11 @@ | @@ -13,8 +13,11 @@ | ||
| 13 | <view class="gray-deep-font font30r">用餐人数</view> | 13 | <view class="gray-deep-font font30r">用餐人数</view> |
| 14 | <view class="black-font font34r">{{bookInfo.pnum_str||bookInfo.pnum}}人</view> | 14 | <view class="black-font font34r">{{bookInfo.pnum_str||bookInfo.pnum}}人</view> |
| 15 | </view> | 15 | </view> |
| 16 | - <view class="reserve-status-tip" wx:if="{{bookInfo.status!=null}}"> | ||
| 17 | - <image src="http://qn.colorcun.com/custom/lite-yd/image/reserve-status-{{bookInfo.status}}.png"></image> | 16 | + <view class="reserve-status-tip" wx:if="{{bookInfo.status==0 || bookInfo.status==6}}"> |
| 17 | + <view class="text">{{bookInfo.status==0?'待处理':'已拒绝'}}</view> | ||
| 18 | + </view> | ||
| 19 | + <view class="reserve-status-tip" wx:elif="{{bookInfo.status}}"> | ||
| 20 | + <image src="http://qn.colorcun.com/custom/lite-yd/image/reserve-status-{{bookInfo.status==5?1:bookInfo.status}}.png"></image> | ||
| 18 | </view> | 21 | </view> |
| 19 | <view class="flex-lr order-desk" wx:if="{{bookInfo.type==1}}"> | 22 | <view class="flex-lr order-desk" wx:if="{{bookInfo.type==1}}"> |
| 20 | <view class="flex-re" style="width:100%;flex-wrap:wrap;"> | 23 | <view class="flex-re" style="width:100%;flex-wrap:wrap;"> |
| @@ -118,6 +121,25 @@ | @@ -118,6 +121,25 @@ | ||
| 118 | <view class="notice-opt" wx:if="{{bookInfo.status==2}}"> | 121 | <view class="notice-opt" wx:if="{{bookInfo.status==2}}"> |
| 119 | <formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">客户就餐完毕</formids> | 122 | <formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">客户就餐完毕</formids> |
| 120 | </view> | 123 | </view> |
| 124 | +<!--操作在线预订--> | ||
| 125 | +<view class="notice-opt" wx:if="{{bookInfo.status==0}}"> | ||
| 126 | + <view class="notice-button-border font34r flex-lr"> | ||
| 127 | + <view> | ||
| 128 | + <formids bindclick="easyCall" data-key="seller">联系商家</formids> | ||
| 129 | + </view> | ||
| 130 | + <view> | ||
| 131 | + <formids bindclick="easyCall" data-key="customer">联系顾客</formids> | ||
| 132 | + </view> | ||
| 133 | + </view> | ||
| 134 | + <view class="notice-button-border font34r flex-lr"> | ||
| 135 | + <view> | ||
| 136 | + <formids bindclick="refuseOrder">拒绝订单</formids> | ||
| 137 | + </view> | ||
| 138 | + <view> | ||
| 139 | + <formids bindclick="arrangeOrder">安排包间</formids> | ||
| 140 | + </view> | ||
| 141 | + </view> | ||
| 142 | +</view> | ||
| 121 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> | 143 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> |
| 122 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> | 144 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> |
| 123 | <block wx:for-items="{{actionSheetItems}}" wx:key="actionSheetItems.key"> | 145 | <block wx:for-items="{{actionSheetItems}}" wx:key="actionSheetItems.key"> |
| @@ -128,6 +128,16 @@ view{ | @@ -128,6 +128,16 @@ view{ | ||
| 128 | width: 82rpx; | 128 | width: 82rpx; |
| 129 | height: 52rpx; | 129 | height: 52rpx; |
| 130 | } | 130 | } |
| 131 | +.reserve-status-tip .text{ | ||
| 132 | + font-weight: bold; | ||
| 133 | + font-size: 32rpx; | ||
| 134 | + color: #C51B41; | ||
| 135 | + white-space : nowrap; | ||
| 136 | + transform: rotate(-15deg); | ||
| 137 | + border: solid 2rpx #C51B41; | ||
| 138 | + padding: 5rpx; | ||
| 139 | + width: 100rpx; | ||
| 140 | +} | ||
| 131 | .reserve-status-tip image{ | 141 | .reserve-status-tip image{ |
| 132 | width: 100%; | 142 | width: 100%; |
| 133 | height: 100%; | 143 | height: 100%; |
| @@ -36,6 +36,10 @@ Page({ | @@ -36,6 +36,10 @@ Page({ | ||
| 36 | indexOpt:null, | 36 | indexOpt:null, |
| 37 | YYYY:'YYYY', | 37 | YYYY:'YYYY', |
| 38 | onLoad:async function(opt){ | 38 | onLoad:async function(opt){ |
| 39 | + if(opt.rid){ | ||
| 40 | + this.reserveId=opt.rid | ||
| 41 | + delete opt.rid | ||
| 42 | + } | ||
| 39 | this.indexOpt=opt; | 43 | this.indexOpt=opt; |
| 40 | mta.Page.init({ | 44 | mta.Page.init({ |
| 41 | "appID":"500667280", | 45 | "appID":"500667280", |
| @@ -97,6 +101,13 @@ Page({ | @@ -97,6 +101,13 @@ Page({ | ||
| 97 | } | 101 | } |
| 98 | 102 | ||
| 99 | },1000); | 103 | },1000); |
| 104 | + if(this.reserveId){ | ||
| 105 | + let url='./b_detail?id='+this.reserveId | ||
| 106 | + this.reserveId='' | ||
| 107 | + return wx.navigateTo({ | ||
| 108 | + url:url | ||
| 109 | + }) | ||
| 110 | + } | ||
| 100 | }, | 111 | }, |
| 101 | async getbooklist(isExport=false){ | 112 | async getbooklist(isExport=false){ |
| 102 | let time=0; | 113 | let time=0; |
pack-book/pages/book/b_reserve.js
0 → 100644
| 1 | +// pack-book/pages/book/b_reserve.js | ||
| 2 | +// pages/book/setting/index.js | ||
| 3 | +import util from '../../../utils/util'; | ||
| 4 | +import App from '../../../utils/api'; | ||
| 5 | +const {regeneratorRuntime} = global | ||
| 6 | +import PubSub from '../../../utils/PubSub' | ||
| 7 | +import RS from '../../../utils/reserveStatus' | ||
| 8 | +Page({ | ||
| 9 | + offset: 1, | ||
| 10 | + limit: 10, | ||
| 11 | + hasMore: true, | ||
| 12 | + list:[], | ||
| 13 | + /** | ||
| 14 | + * 页面的初始数据 | ||
| 15 | + */ | ||
| 16 | + data: { | ||
| 17 | + list:[], | ||
| 18 | + hasMore:true, | ||
| 19 | + activeType:1, | ||
| 20 | + }, | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 生命周期函数--监听页面加载 | ||
| 24 | + */ | ||
| 25 | + enter_params: {}, | ||
| 26 | + onLoad: function (options) { | ||
| 27 | + this.enter_params = util.cache('enter_params'); | ||
| 28 | + this.seller_id=options.seller_id||this.enter_params.seller_id; | ||
| 29 | + this.getMembers(); | ||
| 30 | + PubSub.on('fulshReseveList',()=>{ | ||
| 31 | + this.switchTab({ | ||
| 32 | + currentTarget:{ | ||
| 33 | + dataset:{ | ||
| 34 | + type:this.data.activeType | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + }); | ||
| 38 | + }) | ||
| 39 | + }, | ||
| 40 | + onUnload(){ | ||
| 41 | + PubSub.off('fulshReseveList') | ||
| 42 | + }, | ||
| 43 | + /** | ||
| 44 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 45 | + */ | ||
| 46 | + onReady: function () { | ||
| 47 | + | ||
| 48 | + }, | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 生命周期函数--监听页面显示 | ||
| 52 | + */ | ||
| 53 | + onShow: function () { | ||
| 54 | + | ||
| 55 | + }, | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 生命周期函数--监听页面隐藏 | ||
| 59 | + */ | ||
| 60 | + onHide: function () { | ||
| 61 | + | ||
| 62 | + }, | ||
| 63 | + onUnload(){ | ||
| 64 | + | ||
| 65 | + }, | ||
| 66 | + /** | ||
| 67 | + * 页面上拉触底事件的处理函数 | ||
| 68 | + */ | ||
| 69 | + onReachBottom: function () { | ||
| 70 | + if(this.hasMore){ | ||
| 71 | + this.getMembers(true); | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + getMembers(hasReachBottom=false){ | ||
| 75 | + let params={ | ||
| 76 | + sid:this.seller_id, | ||
| 77 | + x:this.offset, | ||
| 78 | + y:this.limit, | ||
| 79 | + rdate:'1234567890-9999999999', | ||
| 80 | + sort:1, | ||
| 81 | + type:1, | ||
| 82 | + } | ||
| 83 | + if(this.data.activeType==1){ | ||
| 84 | + params.status='0,0' | ||
| 85 | + }else{ | ||
| 86 | + params.status='1,2,3,4,5,6' | ||
| 87 | + } | ||
| 88 | + App.Reserve.GetReserveList(params).then((res)=>{ | ||
| 89 | + let list = res.data | ||
| 90 | + if(list.length>0){ | ||
| 91 | + list.forEach((r,i)=>{ | ||
| 92 | + list[i]=RS.reserve(r) | ||
| 93 | + }) | ||
| 94 | + } | ||
| 95 | + this.list=this.list.concat(list) | ||
| 96 | + let obj={list:this.list}; | ||
| 97 | + if(list.length<this.limit && hasReachBottom){ | ||
| 98 | + this.hasMore=false; | ||
| 99 | + obj.hasMore=false; | ||
| 100 | + }else{ | ||
| 101 | + this.offset++; | ||
| 102 | + } | ||
| 103 | + this.setData(obj) | ||
| 104 | + }).catch(e=>{}) | ||
| 105 | + }, | ||
| 106 | + gotoDetail(e){ | ||
| 107 | + let url='./b_detail?id='+util.attr(e,'id') | ||
| 108 | + return wx.navigateTo({ | ||
| 109 | + url:url | ||
| 110 | + }) | ||
| 111 | + }, | ||
| 112 | + switchTab(e){ | ||
| 113 | + let activeType=util.attr(e,'type') | ||
| 114 | + this.setData({ | ||
| 115 | + activeType:activeType, | ||
| 116 | + hasMore:true, | ||
| 117 | + }) | ||
| 118 | + this.list=[] | ||
| 119 | + this.offset= 1 | ||
| 120 | + this.limit= 10 | ||
| 121 | + this.hasMore=true | ||
| 122 | + this.pageScrollToTop() | ||
| 123 | + setTimeout(()=>{ | ||
| 124 | + this.getMembers() | ||
| 125 | + },300) | ||
| 126 | + }, | ||
| 127 | + pageScrollToTop: function () { | ||
| 128 | + wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) { | ||
| 129 | + // 使页面滚动到底部 | ||
| 130 | + if(rect && rect.top){ | ||
| 131 | + wx.pageScrollTo({ | ||
| 132 | + scrollTop: rect.top | ||
| 133 | + }) | ||
| 134 | + } | ||
| 135 | + }).exec() | ||
| 136 | + }, | ||
| 137 | +}) |
pack-book/pages/book/b_reserve.json
0 → 100644
pack-book/pages/book/b_reserve.wxml
0 → 100644
| 1 | +<!--pack-book/pages/book/b_reserve.wxml--> | ||
| 2 | +<wxs src="../../../utils/util.wxs" module="util" /> | ||
| 3 | +<nav id="nav" backgroundColor="#199095" color="#fefefe">在线预订</nav> | ||
| 4 | +<view class="tabs flex-lr"> | ||
| 5 | + <view class="item {{activeType==1?'active':''}}" bindtap="switchTab" data-type="1">待处理</view> | ||
| 6 | + <view class="item {{activeType==2?'active':''}}" bindtap="switchTab" data-type="2">已处理</view> | ||
| 7 | +</view> | ||
| 8 | +<view class="pages"> | ||
| 9 | + <block wx:if="{{list.length>0}}"> | ||
| 10 | + <view class="row" wx:for="{{list}}" wx:key="list.key" data-id="{{item.id}}" bindtap="gotoDetail"> | ||
| 11 | + <view class="flex-lr"> | ||
| 12 | + <view class="flex-ll"> | ||
| 13 | + <view class="label">包间需求:</view> | ||
| 14 | + <view class="content">{{item.room_demand_str||''}}</view> | ||
| 15 | + </view> | ||
| 16 | + <view class="buttonStatus" wx:if="{{item.status>0}}">{{item.getStatusStr}}</view> | ||
| 17 | + </view> | ||
| 18 | + <view class="flex-ll"> | ||
| 19 | + <view class="label">就餐时间:</view> | ||
| 20 | + <view class="content">{{util.unixtoTime(item.ddate,'YYYY-MM-DD HH:II')}}</view> | ||
| 21 | + </view> | ||
| 22 | + <view class="flex-lr"> | ||
| 23 | + <view class="flex-ll"> | ||
| 24 | + <view class="label">预订客户:</view> | ||
| 25 | + <view class="content">{{item.rname}} {{['','先生','女士',''][item.sex]}}</view> | ||
| 26 | + </view> | ||
| 27 | + <view class="button" wx:if="{{item.status==0}}">立即处理</view> | ||
| 28 | + </view> | ||
| 29 | + </view> | ||
| 30 | + </block> | ||
| 31 | + <view wx:else="" class="history-is-empty flex-vc Medium"> | ||
| 32 | + <image src="http://qn.colorcun.com/custom/lite-yd/image/history-is-empty.png"></image> | ||
| 33 | + <view>暂时还没订单</view> | ||
| 34 | + </view> | ||
| 35 | + <view wx:if="{{!hasMore}}" class="flex-vc hasMore">已经到底了</view> | ||
| 36 | +</view> | ||
| 37 | +<tabBar></tabBar> |
pack-book/pages/book/b_reserve.wxss
0 → 100644
| 1 | +/* pack-book/pages/book/b_reserve.wxss */ | ||
| 2 | +.pages{ | ||
| 3 | + width: 90%; | ||
| 4 | + margin: 80rpx auto 0; | ||
| 5 | + color: #353535; | ||
| 6 | + overflow-y: auto; | ||
| 7 | + padding-bottom: 150rpx; | ||
| 8 | + min-height: 900rpx; | ||
| 9 | +} | ||
| 10 | +.row{ | ||
| 11 | + font-size: 34rpx; | ||
| 12 | + border-bottom: 2rpx solid #F1F0F4; | ||
| 13 | + padding-top: 34rpx; | ||
| 14 | + padding-bottom: 34rpx; | ||
| 15 | +} | ||
| 16 | +.hasMore{ | ||
| 17 | + padding-top: 34rpx; | ||
| 18 | + padding-bottom: 34rpx; | ||
| 19 | + font-size: 24rpx; | ||
| 20 | + color: #cccccc; | ||
| 21 | +} | ||
| 22 | +.history-is-empty{ | ||
| 23 | + margin: 200rpx auto; | ||
| 24 | + font-size: 34rpx; | ||
| 25 | + | ||
| 26 | +} | ||
| 27 | +.history-is-empty image{ | ||
| 28 | + width: 376rpx; | ||
| 29 | + height: 310rpx; | ||
| 30 | + margin-bottom: 122rpx; | ||
| 31 | +} | ||
| 32 | +.button{ | ||
| 33 | + background-color: #199095; | ||
| 34 | + color: #fefefe; | ||
| 35 | + border-radius: 10rpx; | ||
| 36 | + padding: 2rpx 10rpx; | ||
| 37 | + white-space:nowrap; | ||
| 38 | +} | ||
| 39 | +.buttonStatus{ | ||
| 40 | + border: solid 2rpx #199095; | ||
| 41 | + color: #199095; | ||
| 42 | + border-radius: 10rpx; | ||
| 43 | + padding: 2rpx 10rpx; | ||
| 44 | + white-space:nowrap; | ||
| 45 | + transform: rotate(-15deg); | ||
| 46 | +} | ||
| 47 | +.tabs{ | ||
| 48 | + background-color: #199095; | ||
| 49 | + margin-top: -2rpx; | ||
| 50 | + position: fixed; | ||
| 51 | + width: 100%; | ||
| 52 | + z-index: 9; | ||
| 53 | +} | ||
| 54 | +.tabs .item{ | ||
| 55 | + height: 80rpx; | ||
| 56 | + line-height: 80rpx; | ||
| 57 | + text-align: center; | ||
| 58 | + width: 50%; | ||
| 59 | + box-sizing: border-box; | ||
| 60 | + font-weight: bold; | ||
| 61 | + font-size: 34rpx; | ||
| 62 | + color: #fefefe; | ||
| 63 | +} | ||
| 64 | +.tabs .item:first-child{ | ||
| 65 | + border-radius: 0 8rpx 0 0 ; | ||
| 66 | +} | ||
| 67 | +.tabs .item:last-child{ | ||
| 68 | + border-radius: 8rpx 0 0 0 ; | ||
| 69 | +} | ||
| 70 | +.tabs .item.active{ | ||
| 71 | + background-color: #fefefe; | ||
| 72 | + color: #199095; | ||
| 73 | + width: 75%; | ||
| 74 | +} |
| @@ -65,16 +65,20 @@ Page({ | @@ -65,16 +65,20 @@ Page({ | ||
| 65 | async getDetail(id){ | 65 | async getDetail(id){ |
| 66 | let res=await App.Reserve.Detail({rid: id, openid: ''}); | 66 | let res=await App.Reserve.Detail({rid: id, openid: ''}); |
| 67 | this.bookInfo=res.data | 67 | this.bookInfo=res.data |
| 68 | - let tplMsg=await ST.getTplMsg(res.data,this.sc.setting.template_code,this.sc) | 68 | + if(res.data.operator_openid==2){//运营处理订单,强制使用运营短信 |
| 69 | + this.tplsIndex='SMS_173950289' | ||
| 70 | + } | ||
| 71 | + let tplMsg=await ST.getTplMsg(res.data,this.tplsIndex,this.sc) | ||
| 69 | this.setData({ | 72 | this.setData({ |
| 70 | bookInfo: res.data, | 73 | bookInfo: res.data, |
| 71 | tplMsg: tplMsg | 74 | tplMsg: tplMsg |
| 72 | }) | 75 | }) |
| 76 | + | ||
| 73 | }, | 77 | }, |
| 74 | sendsms(){ | 78 | sendsms(){ |
| 75 | App.SendSMS.Message({ | 79 | App.SendSMS.Message({ |
| 76 | phone: this.bookInfo.phone, | 80 | phone: this.bookInfo.phone, |
| 77 | - sign_name: '一键订', | 81 | + sign_name: '周到安排', |
| 78 | template_code: this.tplsIndex, | 82 | template_code: this.tplsIndex, |
| 79 | template_param: JSON.stringify(ST.smsData), | 83 | template_param: JSON.stringify(ST.smsData), |
| 80 | rid: this.bookInfo.id, | 84 | rid: this.bookInfo.id, |
| @@ -32,7 +32,9 @@ Page({ | @@ -32,7 +32,9 @@ Page({ | ||
| 32 | } | 32 | } |
| 33 | ) | 33 | ) |
| 34 | }, | 34 | }, |
| 35 | - | 35 | + onUnload(){ |
| 36 | + PubSub.off('flushNewCustomer') | ||
| 37 | + }, | ||
| 36 | /** | 38 | /** |
| 37 | * 生命周期函数--监听页面初次渲染完成 | 39 | * 生命周期函数--监听页面初次渲染完成 |
| 38 | */ | 40 | */ |
| @@ -75,7 +77,7 @@ Page({ | @@ -75,7 +77,7 @@ Page({ | ||
| 75 | hasSellerShare:true, | 77 | hasSellerShare:true, |
| 76 | },'/pages/reserve/detail') | 78 | },'/pages/reserve/detail') |
| 77 | return { | 79 | return { |
| 78 | - title:'请客订包间,就上一键订', | 80 | + title:'请客订包间,就上周到安排', |
| 79 | imageUrl:'https://xt04.colorcun.com/sellerShare/Share_'+this.data.seller.id+'.png?'+Math.random(), | 81 | imageUrl:'https://xt04.colorcun.com/sellerShare/Share_'+this.data.seller.id+'.png?'+Math.random(), |
| 80 | path: path, | 82 | path: path, |
| 81 | } | 83 | } |
| @@ -150,6 +150,12 @@ Page({ | @@ -150,6 +150,12 @@ Page({ | ||
| 150 | util.toast('本区域暂无配送人员', 'none'); | 150 | util.toast('本区域暂无配送人员', 'none'); |
| 151 | }, | 151 | }, |
| 152 | callSeller(){ | 152 | callSeller(){ |
| 153 | + if(this.data.detail.seller.is_online_reserve==1 && this.data.detail.seller.is_tele==0){ | ||
| 154 | + //在线预定没有话机 | ||
| 155 | + return wx.makePhoneCall({ | ||
| 156 | + phoneNumber:'400-000-9690' | ||
| 157 | + }) | ||
| 158 | + } | ||
| 153 | let seller_tel=this.data.detail.seller.seller_tel | 159 | let seller_tel=this.data.detail.seller.seller_tel |
| 154 | if(seller_tel.length<1) return util.toast('商家电话错误','none') | 160 | if(seller_tel.length<1) return util.toast('商家电话错误','none') |
| 155 | if(seller_tel.length==1){//只有一个电话 | 161 | if(seller_tel.length==1){//只有一个电话 |
| @@ -30,6 +30,10 @@ Page({ | @@ -30,6 +30,10 @@ Page({ | ||
| 30 | }) | 30 | }) |
| 31 | this.selectComponent("#network").debug(opt, 'scene'); | 31 | this.selectComponent("#network").debug(opt, 'scene'); |
| 32 | } | 32 | } |
| 33 | + if(opt.act=='tobook'){//消息跳入运营处理预订 | ||
| 34 | + delete opt.act | ||
| 35 | + return this.redirectTo({url: util.http_build_query(opt,'/pack-book/pages/book/b_index')}); | ||
| 36 | + } | ||
| 33 | mta.Page.init({ | 37 | mta.Page.init({ |
| 34 | "appID":"500667280", | 38 | "appID":"500667280", |
| 35 | "eventID":"500667287", | 39 | "eventID":"500667287", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | 5 | ||
| 6 | "backgroundTextStyle": "light", | 6 | "backgroundTextStyle": "light", |
| 7 | "usingComponents": { | 7 | "usingComponents": { |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "userinfo": "/components/userinfo/userinfo", | 6 | "userinfo": "/components/userinfo/userinfo", |
| 7 | "userinfo-share": "/components/userinfo/share", | 7 | "userinfo-share": "/components/userinfo/share", |
| 1 | <!--pages/manager-invitation/index.wxml--> | 1 | <!--pages/manager-invitation/index.wxml--> |
| 2 | <view class="pages flex-vc"> | 2 | <view class="pages flex-vc"> |
| 3 | - <view class="title">欢迎使用一键订</view> | 3 | + <view class="title">欢迎使用周到安排</view> |
| 4 | <view class="steps flex-cc"> | 4 | <view class="steps flex-cc"> |
| 5 | <view class="icon home"></view> | 5 | <view class="icon home"></view> |
| 6 | <view class="dot" wx:for="{{[4,5,6,7,8,9,10]}}" wx:key="key" style="opacity:{{item/10}};" ></view> | 6 | <view class="dot" wx:for="{{[4,5,6,7,8,9,10]}}" wx:key="key" style="opacity:{{item/10}};" ></view> |
| 7 | <view class="icon user"></view> | 7 | <view class="icon user"></view> |
| 8 | </view> | 8 | </view> |
| 9 | - <view class="info">一键订,客户经理专用的拓客工具</view> | 9 | + <view class="info">周到安排,客户经理专用的拓客工具</view> |
| 10 | <view class="dot-max" wx:for="{{dots}}" style="bottom: {{item.bottom}}rpx;left: {{item.left}}rpx;zoom: {{item.zoom}};" wx:key="key"></view> | 10 | <view class="dot-max" wx:for="{{dots}}" style="bottom: {{item.bottom}}rpx;left: {{item.left}}rpx;zoom: {{item.zoom}};" wx:key="key"></view> |
| 11 | <userinfo binduserinfo="userinfo" style="width: 100%;"> | 11 | <userinfo binduserinfo="userinfo" style="width: 100%;"> |
| 12 | <view class="userinfo">立即使用</view> | 12 | <view class="userinfo">立即使用</view> |
| @@ -13,7 +13,7 @@ Page({ | @@ -13,7 +13,7 @@ Page({ | ||
| 13 | current: 0, | 13 | current: 0, |
| 14 | tpls: TP.tpls(), | 14 | tpls: TP.tpls(), |
| 15 | seller:{ | 15 | seller:{ |
| 16 | - name:'一键订示例餐厅', | 16 | + name:'周到安排示例餐厅', |
| 17 | room:'天香阁', | 17 | room:'天香阁', |
| 18 | date:util.unixtoTime(new Date()/1000,'YYYY/MM/DD 星期WW HH:II'), | 18 | date:util.unixtoTime(new Date()/1000,'YYYY/MM/DD 星期WW HH:II'), |
| 19 | addr:'粤江西路啤酒文化创意艺术区B09' | 19 | addr:'粤江西路啤酒文化创意艺术区B09' |
| @@ -141,7 +141,7 @@ Page({ | @@ -141,7 +141,7 @@ Page({ | ||
| 141 | },'/pages/manager-invitation/display') | 141 | },'/pages/manager-invitation/display') |
| 142 | if(!this.data.options.rid){ | 142 | if(!this.data.options.rid){ |
| 143 | return { | 143 | return { |
| 144 | - title: '一键订,客户经理专用的拓客工具', | 144 | + title: '周到安排,客户经理专用的拓客工具', |
| 145 | path: '/pages/manager-invitation/index', | 145 | path: '/pages/manager-invitation/index', |
| 146 | imageUrl:this.data.tpls[this.data.current].shareFirstImage, | 146 | imageUrl:this.data.tpls[this.data.current].shareFirstImage, |
| 147 | } | 147 | } |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "getpos":"/components/userinfo/getpos", | 7 | "getpos":"/components/userinfo/getpos", |
| 1 | <!--pages/me/follow.wxml--> | 1 | <!--pages/me/follow.wxml--> |
| 2 | -<nav>订好座,就用一键订</nav> | 2 | +<nav>订好座,就用周到安排</nav> |
| 3 | <view class="pages"> | 3 | <view class="pages"> |
| 4 | <view class="flex-vc empty" wx:if="{{sellers.length<1}}"> | 4 | <view class="flex-vc empty" wx:if="{{sellers.length<1}}"> |
| 5 | <block wx:if="{{!hasFirstShow}}"> | 5 | <block wx:if="{{!hasFirstShow}}"> |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "userinfo": "/components/userinfo/userinfo", | 6 | "userinfo": "/components/userinfo/userinfo", |
| 7 | "formids":"/components/formids/formids", | 7 | "formids":"/components/formids/formids", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "nav":"/components/nav/nav" | 7 | "nav":"/components/nav/nav" |
| @@ -143,7 +143,7 @@ Page({ | @@ -143,7 +143,7 @@ Page({ | ||
| 143 | onShareAppMessage: function () { | 143 | onShareAppMessage: function () { |
| 144 | let path=util.http_build_query({id:this.data.seller.id,fromid:getApp().openid},'/pages/reserve/detail') | 144 | let path=util.http_build_query({id:this.data.seller.id,fromid:getApp().openid},'/pages/reserve/detail') |
| 145 | return { | 145 | return { |
| 146 | - title:'请客订包间,就上一键订', | 146 | + title:'请客订包间,就上周到安排', |
| 147 | imageUrl:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png?'+Math.random(), | 147 | imageUrl:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png?'+Math.random(), |
| 148 | path:path, | 148 | path:path, |
| 149 | } | 149 | } |
| @@ -154,15 +154,21 @@ Page({ | @@ -154,15 +154,21 @@ Page({ | ||
| 154 | activeTab:'reserve' | 154 | activeTab:'reserve' |
| 155 | }) | 155 | }) |
| 156 | } | 156 | } |
| 157 | - let seller_tel=this.data.seller.seller_tel | ||
| 158 | - if(seller_tel.length<1) return util.toast('商家电话错误','none') | ||
| 159 | - if(seller_tel.length==1){//只有一个电话 | ||
| 160 | - let phone=seller_tel[0].replace(/[^\d]/,'') | 157 | + if(this.data.hasOnlineReserve && this.data.seller.is_tele==0){ |
| 161 | wx.makePhoneCall({ | 158 | wx.makePhoneCall({ |
| 162 | - phoneNumber:phone | 159 | + phoneNumber:'400-000-9690' |
| 163 | }) | 160 | }) |
| 164 | }else{ | 161 | }else{ |
| 165 | - this.selectComponent('#as').show(); | 162 | + let seller_tel=this.data.seller.seller_tel |
| 163 | + if(seller_tel.length<1) return util.toast('商家电话错误','none') | ||
| 164 | + if(seller_tel.length==1){//只有一个电话 | ||
| 165 | + let phone=seller_tel[0].replace(/[^\d]/,'') | ||
| 166 | + wx.makePhoneCall({ | ||
| 167 | + phoneNumber:phone | ||
| 168 | + }) | ||
| 169 | + }else{ | ||
| 170 | + this.selectComponent('#as').show(); | ||
| 171 | + } | ||
| 166 | } | 172 | } |
| 167 | }, | 173 | }, |
| 168 | reservePhone(e){ | 174 | reservePhone(e){ |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "userinfo":"/components/userinfo/userinfo", | 7 | "userinfo":"/components/userinfo/userinfo", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "nav":"/components/nav/nav", | 7 | "nav":"/components/nav/nav", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "nav":"/components/nav/nav", | 7 | "nav":"/components/nav/nav", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "nav":"/components/nav/nav", | 7 | "nav":"/components/nav/nav", |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "formids":"/components/formids/formids", | 6 | "formids":"/components/formids/formids", |
| 7 | "nav":"/components/nav/nav" | 7 | "nav":"/components/nav/nav" |
| 1 | { | 1 | { |
| 2 | "navigationBarBackgroundColor": "#ffffff", | 2 | "navigationBarBackgroundColor": "#ffffff", |
| 3 | "navigationBarTextStyle": "black", | 3 | "navigationBarTextStyle": "black", |
| 4 | - "navigationBarTitleText":"一键订", | 4 | + "navigationBarTitleText":"周到安排", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "nav":"/components/nav/nav", | 6 | "nav":"/components/nav/nav", |
| 7 | "painter":"/components/painter/painter", | 7 | "painter":"/components/painter/painter", |
| @@ -220,8 +220,8 @@ | @@ -220,8 +220,8 @@ | ||
| 220 | "id": 21, | 220 | "id": 21, |
| 221 | "name": "预订本-80商家", | 221 | "name": "预订本-80商家", |
| 222 | "pathName": "pack-book/pages/book/b_index", | 222 | "pathName": "pack-book/pages/book/b_index", |
| 223 | - "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=762", | ||
| 224 | - "scene": "1001" | 223 | + "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=763&rid=33354", |
| 224 | + "scene": 1001 | ||
| 225 | }, | 225 | }, |
| 226 | { | 226 | { |
| 227 | "id": -1, | 227 | "id": -1, |
| @@ -478,7 +478,7 @@ | @@ -478,7 +478,7 @@ | ||
| 478 | "id": 57, | 478 | "id": 57, |
| 479 | "name": "pages/customer/detail_owner", | 479 | "name": "pages/customer/detail_owner", |
| 480 | "pathName": "pages/customer/detail_owner", | 480 | "pathName": "pages/customer/detail_owner", |
| 481 | - "query": "id= 32456&hasFirstShow=1", | 481 | + "query": "id=33347&hasFirstShow=1", |
| 482 | "scene": null | 482 | "scene": null |
| 483 | }, | 483 | }, |
| 484 | { | 484 | { |
| @@ -499,7 +499,21 @@ | @@ -499,7 +499,21 @@ | ||
| 499 | "id": 60, | 499 | "id": 60, |
| 500 | "name": "pack-book/pages/book/b_detail", | 500 | "name": "pack-book/pages/book/b_detail", |
| 501 | "pathName": "pack-book/pages/book/b_detail", | 501 | "pathName": "pack-book/pages/book/b_detail", |
| 502 | - "query": "id=30711", | 502 | + "query": "id=33284", |
| 503 | + "scene": null | ||
| 504 | + }, | ||
| 505 | + { | ||
| 506 | + "id": -1, | ||
| 507 | + "name": "pack-book/pages/book/b_reserve", | ||
| 508 | + "pathName": "pack-book/pages/book/b_reserve", | ||
| 509 | + "query": "", | ||
| 510 | + "scene": null | ||
| 511 | + }, | ||
| 512 | + { | ||
| 513 | + "id": -1, | ||
| 514 | + "name": "pages/customer/index?act=tobook", | ||
| 515 | + "pathName": "pages/customer/index", | ||
| 516 | + "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=763&rid=33354&act=tobook", | ||
| 503 | "scene": null | 517 | "scene": null |
| 504 | } | 518 | } |
| 505 | ] | 519 | ] |
| @@ -317,6 +317,11 @@ export default { | @@ -317,6 +317,11 @@ export default { | ||
| 317 | 'App.Seller.SetTableClassFull':null, | 317 | 'App.Seller.SetTableClassFull':null, |
| 318 | 318 | ||
| 319 | //获取包间置满日期 | 319 | //获取包间置满日期 |
| 320 | - 'App.Customer.GetTableFillUpDate':null | 320 | + 'App.Customer.GetTableFillUpDate':null, |
| 321 | + | ||
| 322 | + //提供openid获取身份信息 | ||
| 323 | + 'App.Seller.VerificationIsAdmin':{ | ||
| 324 | + cachetime: 1800, | ||
| 325 | + }, | ||
| 321 | 326 | ||
| 322 | } | 327 | } |
utils/realTimeLog.js
0 → 100644
| 1 | +//app.js | ||
| 2 | +// import log from 'utils/realTimeLog' | ||
| 3 | + | ||
| 4 | +function str2ab(str) { | ||
| 5 | + let strLen = str.length*2 | ||
| 6 | + var buf =new ArrayBuffer(strLen>5000?5000:strLen); | ||
| 7 | + var bufView =new Uint16Array(buf); | ||
| 8 | + for (var i = 0; i < buf.byteLength;i++) { | ||
| 9 | + let asc=str.charCodeAt(i) | ||
| 10 | + bufView[i] = asc; | ||
| 11 | + } | ||
| 12 | + return buf; | ||
| 13 | +} | ||
| 14 | +function ab2str(buf) { | ||
| 15 | + return String.fromCharCode.apply(null,new Uint16Array(buf)); | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +if (wx.getRealtimeLogManager) { | ||
| 19 | + const logger = wx.getRealtimeLogManager() | ||
| 20 | + let consoleLog=console.log | ||
| 21 | + function wlog(){ | ||
| 22 | + let argumentsX=[...arguments] | ||
| 23 | + return new Promise(function (success,fail) { | ||
| 24 | + let params="" | ||
| 25 | + argumentsX.forEach((val,i)=>{ | ||
| 26 | + let str=JSON.stringify(val); | ||
| 27 | + if(!str) return; | ||
| 28 | + params+=str | ||
| 29 | + }) | ||
| 30 | + let bs=str2ab(params) | ||
| 31 | + logger.info(ab2str(bs).toString()); | ||
| 32 | + success() | ||
| 33 | + }) | ||
| 34 | + } | ||
| 35 | + console.log=function () { | ||
| 36 | + consoleLog(...arguments) | ||
| 37 | + wlog(...arguments); | ||
| 38 | + } | ||
| 39 | +} |
| @@ -35,6 +35,9 @@ export default { | @@ -35,6 +35,9 @@ export default { | ||
| 35 | detail.getStatusStr=''; | 35 | detail.getStatusStr=''; |
| 36 | if(detail.status>=0){ | 36 | if(detail.status>=0){ |
| 37 | detail.getStatusStr=status[detail.status]; | 37 | detail.getStatusStr=status[detail.status]; |
| 38 | + if(!detail.hasRunning && (detail.status==1 || detail.status==5)){ | ||
| 39 | + detail.getStatusStr=status[3]; | ||
| 40 | + } | ||
| 38 | } | 41 | } |
| 39 | //mask | 42 | //mask |
| 40 | if(detail.phone){ | 43 | if(detail.phone){ |
| @@ -42,6 +45,15 @@ export default { | @@ -42,6 +45,15 @@ export default { | ||
| 42 | return $1+'**'+$3 | 45 | return $1+'**'+$3 |
| 43 | }) | 46 | }) |
| 44 | } | 47 | } |
| 48 | + //room_demand | ||
| 49 | + if(detail.room_demand && typeof detail.room_demand=='string'){ | ||
| 50 | + detail.room_demand=JSON.parse(detail.room_demand) | ||
| 51 | + detail.room_demand_str=detail.room_demand[0].name | ||
| 52 | + let how=detail.room_demand.length | ||
| 53 | + if(how>1){ | ||
| 54 | + detail.room_demand_str+=' 等'+how+'间' | ||
| 55 | + } | ||
| 56 | + } | ||
| 45 | return detail; | 57 | return detail; |
| 46 | }, | 58 | }, |
| 47 | hasRunningFlag(detail){//判断订单正在运行 | 59 | hasRunningFlag(detail){//判断订单正在运行 |
| @@ -50,6 +62,7 @@ export default { | @@ -50,6 +62,7 @@ export default { | ||
| 50 | if(detail.status==0 || detail.status==6 || detail.status==4) return false//未进行状态 | 62 | if(detail.status==0 || detail.status==6 || detail.status==4) return false//未进行状态 |
| 51 | if(detail.status==3) return false //用餐完成(离店) | 63 | if(detail.status==3) return false //用餐完成(离店) |
| 52 | //if(ns > detail.edate) return false//超时 | 64 | //if(ns > detail.edate) return false//超时 |
| 65 | + //console.log('ns > this.getNextTime(detail)',ns , this.getNextTime(detail)) | ||
| 53 | if(ns > this.getNextTime(detail)) return false//超时 | 66 | if(ns > this.getNextTime(detail)) return false//超时 |
| 54 | return flag | 67 | return flag |
| 55 | }, | 68 | }, |
| @@ -82,6 +95,6 @@ export default { | @@ -82,6 +95,6 @@ export default { | ||
| 82 | if(!last_time) return detail.edate; | 95 | if(!last_time) return detail.edate; |
| 83 | let ns=util.timetouUnix(util.unixtoTime(detail.edate,"YYYY-MM-DD "+last_time.substr(0,5)+':00')) | 96 | let ns=util.timetouUnix(util.unixtoTime(detail.edate,"YYYY-MM-DD "+last_time.substr(0,5)+':00')) |
| 84 | if(hasToday) return ns | 97 | if(hasToday) return ns |
| 85 | - return ns+86400 | 98 | + return parseInt(ns)+86400 |
| 86 | }, | 99 | }, |
| 87 | } | 100 | } |
| @@ -9,6 +9,7 @@ const tpls = { | @@ -9,6 +9,7 @@ const tpls = { | ||
| 9 | SMS_163050401: '尊敬的贵宾,您好!\n ${seller_name}已为您安排${date}的用餐,房间:${region_room_name}; \n地址:${seller_addr}; \n电话:${seller_phone} \n预祝用餐愉快,${cusman}期待您的光临!', | 9 | SMS_163050401: '尊敬的贵宾,您好!\n ${seller_name}已为您安排${date}的用餐,房间:${region_room_name}; \n地址:${seller_addr}; \n电话:${seller_phone} \n预祝用餐愉快,${cusman}期待您的光临!', |
| 10 | SMS_164277855:'贵宾您好!${seller_name}为您预留${date}的${region_room_name};\n电话:${seller_phone},预祝用餐愉快!', | 10 | SMS_164277855:'贵宾您好!${seller_name}为您预留${date}的${region_room_name};\n电话:${seller_phone},预祝用餐愉快!', |
| 11 | SMS_164268239:'贵宾您好!${seller_name}为您预留${date}的${region_room_name};\n地址:${seller_addr},电话:${seller_phone},预祝用餐愉快!', | 11 | SMS_164268239:'贵宾您好!${seller_name}为您预留${date}的${region_room_name};\n地址:${seller_addr},电话:${seller_phone},预祝用餐愉快!', |
| 12 | + SMS_173950289:'已为您预订${seller_name}的${rooms}包房,用餐时间为${shiduan},祝您用餐愉快!订包间享优惠,微信搜索“周到安排”。' | ||
| 12 | }; | 13 | }; |
| 13 | 14 | ||
| 14 | module.exports ={ | 15 | module.exports ={ |
| @@ -71,6 +72,7 @@ module.exports ={ | @@ -71,6 +72,7 @@ module.exports ={ | ||
| 71 | async getTplMsg(bookInfo,tplcode='SMS_163050401',sc=null){ | 72 | async getTplMsg(bookInfo,tplcode='SMS_163050401',sc=null){ |
| 72 | let smsData = {} | 73 | let smsData = {} |
| 73 | let txa=['早上','中午','晚上'] | 74 | let txa=['早上','中午','晚上'] |
| 75 | + let txb=['早餐','午餐','晚餐'] | ||
| 74 | let tx=await bcm.getTimeSpaceIndexData(bookInfo.rdate,sc); | 76 | let tx=await bcm.getTimeSpaceIndexData(bookInfo.rdate,sc); |
| 75 | if(!bookInfo.rdateStr){ | 77 | if(!bookInfo.rdateStr){ |
| 76 | bookInfo.rdateStr=util.unixtoTime(bookInfo.ddate, "MM月DD日 HH:II") | 78 | bookInfo.rdateStr=util.unixtoTime(bookInfo.ddate, "MM月DD日 HH:II") |
| @@ -114,6 +116,14 @@ module.exports ={ | @@ -114,6 +116,14 @@ module.exports ={ | ||
| 114 | seller_phone: bookInfo.seller.phone.substr(0, 20), | 116 | seller_phone: bookInfo.seller.phone.substr(0, 20), |
| 115 | } | 117 | } |
| 116 | break; | 118 | break; |
| 119 | + //【周到安排】已为您预订陕西风味面馆的春满大地、福寿同乐包房,用餐时间为9月12日晚餐,祝您用餐愉快!订包间享优惠,微信搜索“周到安排”。 | ||
| 120 | + case 'SMS_173950289'://运营安排包间 | ||
| 121 | + smsData = { | ||
| 122 | + seller_name: bookInfo.seller.sellername.substr(0, 20), | ||
| 123 | + shiduan: bookInfo.rdateStr.replace(/日.*/,'日'+txb[tx.timeIndex]), | ||
| 124 | + rooms: this.getTableNameOne(bookInfo.tables).substr(0, 20), | ||
| 125 | + } | ||
| 126 | + break; | ||
| 117 | default: | 127 | default: |
| 118 | let guest = ''; | 128 | let guest = ''; |
| 119 | if (bookInfo.sex == 3) { | 129 | if (bookInfo.sex == 3) { |
-
Please register or login to post a comment