Commit 6a1cad7df325eb44b097a7cb8494d4a48e857e2f

Authored by wangfan
2 parents 310d80b7 a7434664

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

@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 "backgroundTextStyle": "light", 54 "backgroundTextStyle": "light",
55 "navigationBarBackgroundColor": "#199095", 55 "navigationBarBackgroundColor": "#199095",
56 "navigationBarTitleText": "点餐商户端", 56 "navigationBarTitleText": "点餐商户端",
57 - "navigationBarTextStyle": "light" 57 + "navigationBarTextStyle": "white"
58 }, 58 },
59 "networkTimeout": { 59 "networkTimeout": {
60 "request": 5000, 60 "request": 5000,
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 "color": "#999999", 64 "color": "#999999",
65 "selectedColor": "#353535", 65 "selectedColor": "#353535",
66 "backgroundColor": "#FEFEFE", 66 "backgroundColor": "#FEFEFE",
67 - "borderStyle": "", 67 + "borderStyle": "white",
68 "list": [ 68 "list": [
69 { 69 {
70 "pagePath": "pages/reserve/index", 70 "pagePath": "pages/reserve/index",
@@ -137,6 +137,7 @@ @@ -137,6 +137,7 @@
137 text-overflow:ellipsis; 137 text-overflow:ellipsis;
138 white-space: nowrap; 138 white-space: nowrap;
139 color:#999999; 139 color:#999999;
  140 + width:90%;
140 } 141 }
141 .hasListModel .label{ 142 .hasListModel .label{
142 height: 22rpx; 143 height: 22rpx;
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "formids":"/components/formids/formids" 7 "formids":"/components/formids/formids"
1 // cookbook/index.js 1 // cookbook/index.js
  2 +var mta=require('mta-wechat-analysis')
2 import util from '../../utils/util'; 3 import util from '../../utils/util';
3 import App from '../../utils/api'; 4 import App from '../../utils/api';
4 const {regeneratorRuntime} = global 5 const {regeneratorRuntime} = global
@@ -34,6 +35,14 @@ Page({ @@ -34,6 +35,14 @@ Page({
34 }) 35 })
35 this.getCookList(); 36 this.getCookList();
36 this.initOrder(); 37 this.initOrder();
  38 + mta.Page.init({
  39 + "appID":"500667280",
  40 + "eventID":"500667287",
  41 + "statPullDownFresh":true,
  42 + "statShareApp":true,
  43 + "statReachBottom":true,
  44 + "lauchOpts":options, //渠道分析
  45 + });
37 }, 46 },
38 initOrder(){ 47 initOrder(){
39 App.Advance.CreateOrder({ 48 App.Advance.CreateOrder({
@@ -112,7 +121,7 @@ Page({ @@ -112,7 +121,7 @@ Page({
112 onShareAppMessage: function () { 121 onShareAppMessage: function () {
113 return { 122 return {
114 title:'一起来点菜啦!', 123 title:'一起来点菜啦!',
115 - imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-go.jpg', 124 + imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-go2.jpg',
116 } 125 }
117 }, 126 },
118 formatCookList(list){ 127 formatCookList(list){
@@ -74,7 +74,7 @@ Page({ @@ -74,7 +74,7 @@ Page({
74 return { 74 return {
75 title:'菜品已点好,快来看看都点了什么~', 75 title:'菜品已点好,快来看看都点了什么~',
76 path:util.http_build_query(options,'/pack-cookbook/pages/success'), 76 path:util.http_build_query(options,'/pack-cookbook/pages/success'),
77 - imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-show.jpg', 77 + imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-show2.jpg',
78 } 78 }
79 }, 79 },
80 80
@@ -61,11 +61,10 @@ @@ -61,11 +61,10 @@
61 line-height: 140rpx; 61 line-height: 140rpx;
62 border-top: 2rpx solid #F5F5F5; 62 border-top: 2rpx solid #F5F5F5;
63 border-radius: 0 0 10rpx 10rpx; 63 border-radius: 0 0 10rpx 10rpx;
64 - margin:0 10rpx 20rpx; 64 + margin:0 0 20rpx;
65 text-align: right; 65 text-align: right;
66 font-weight: bold; 66 font-weight: bold;
67 font-size: 36rpx; 67 font-size: 36rpx;
68 - padding-right: 34rpx;  
69 } 68 }
70 .hr{ 69 .hr{
71 height: 20rpx; 70 height: 20rpx;
@@ -161,9 +161,9 @@ Page({ @@ -161,9 +161,9 @@ Page({
161 */ 161 */
162 onShow: function () { 162 onShow: function () {
163 //if(!this.reserve_id || util.cache('tableid').length>0){ 163 //if(!this.reserve_id || util.cache('tableid').length>0){
164 - if (util.cache('tableid').length > 0) { 164 + //if (util.cache('tableid').length > 0) {
165 this.getTables(); 165 this.getTables();
166 - } 166 + //}
167 setTimeout(() => { 167 setTimeout(() => {
168 this.setData({ 168 this.setData({
169 calendarMaskLoad: true, 169 calendarMaskLoad: true,
@@ -272,9 +272,11 @@ Page({ @@ -272,9 +272,11 @@ Page({
272 console.log('ts', sobj.tables,this.checkedTables); 272 console.log('ts', sobj.tables,this.checkedTables);
273 //console.log(e.type,key,val,form); 273 //console.log(e.type,key,val,form);
274 sobj.form = form; 274 sobj.form = form;
275 - sobj.buttonhide = true; 275 + sobj.buttonhide = this.data.buttonhide;
276 if (form.tid.length > 0 && form.rname.length > 0) { 276 if (form.tid.length > 0 && form.rname.length > 0) {
277 sobj.buttonhide = false; 277 sobj.buttonhide = false;
  278 + }else{
  279 + sobj.buttonhide = true;
278 } 280 }
279 let displayTimes = false; 281 let displayTimes = false;
280 if (key == 'time') { 282 if (key == 'time') {
@@ -286,7 +288,7 @@ Page({ @@ -286,7 +288,7 @@ Page({
286 if ('date,time,pnum,pnum_str,tabid'.indexOf(key) > -1) { 288 if ('date,time,pnum,pnum_str,tabid'.indexOf(key) > -1) {
287 if (!displayTimes) { 289 if (!displayTimes) {
288 //sobj.form.tid = []; //切换日期时间清空桌位 290 //sobj.form.tid = []; //切换日期时间清空桌位
289 - sobj.buttonhide = true; 291 + //sobj.buttonhide = true;
290 this.getTables(); 292 this.getTables();
291 } 293 }
292 if (key == 'date') { 294 if (key == 'date') {
@@ -330,7 +332,9 @@ Page({ @@ -330,7 +332,9 @@ Page({
330 let tablesLength = 0; 332 let tablesLength = 0;
331 if (tableid.length > 0) { 333 if (tableid.length > 0) {
332 let toastTables={...this.checkedTables} 334 let toastTables={...this.checkedTables}
333 - res.data.forEach(p => { 335 + let resData=res.data.slice(1,res.data.length);
  336 + console.log('resData',resData)
  337 + resData.forEach(p => {
334 //if(tables.length>=3) return true; 338 //if(tables.length>=3) return true;
335 p.list.forEach(t => { 339 p.list.forEach(t => {
336 delete toastTables[t.id] 340 delete toastTables[t.id]
@@ -361,6 +365,7 @@ Page({ @@ -361,6 +365,7 @@ Page({
361 } 365 }
362 wx.removeStorage({key: 'tableid'}) 366 wx.removeStorage({key: 'tableid'})
363 } 367 }
  368 + console.log('tables',tables);
364 if(tables.length<1){ 369 if(tables.length<1){
365 tablesLength=0; 370 tablesLength=0;
366 tables_tmp = []; 371 tables_tmp = [];
@@ -417,19 +422,24 @@ Page({ @@ -417,19 +422,24 @@ Page({
417 if (!form.tid) { 422 if (!form.tid) {
418 return util.toast('请选择桌子', 'none'); 423 return util.toast('请选择桌子', 'none');
419 } 424 }
  425 + if (!form.rname) {
  426 + return util.toast('请填写预订人', 'none');
  427 + }
420 form.sid = this.sellerid; 428 form.sid = this.sellerid;
421 form.rdate = rdate 429 form.rdate = rdate
422 - if (!form.rid) {  
423 - try {  
424 - let enter_params = util.cache('enter_params');  
425 - let sc = (await App.Reserve.SellerInfo(enter_params)).data  
426 - let note_openid = enter_params.seller_openid;  
427 - let note_name = sc.seller_user.nickname;  
428 - form.note_openid = note_openid || '';  
429 - form.note_name = note_name || '';  
430 - } catch (e) { 430 +
  431 + try {
  432 + let enter_params = util.cache('enter_params');
  433 + let sc = (await App.Reserve.SellerInfo(enter_params)).data
  434 + let note_openid = enter_params.seller_openid;
  435 + let note_name = sc.seller_user.nick_name || sc.seller_user.nickname;
  436 + form.note_openid = note_openid || '';
  437 + if (form.rid) {//修改时传递uid
  438 + form.note_openid = enter_params.manager_id || '';
431 } 439 }
432 - } 440 + form.note_name = note_name || '';
  441 + } catch (e) {}
  442 +
433 form.ddate = d_rdate.substr(0, 10); 443 form.ddate = d_rdate.substr(0, 10);
434 if (this.data.hasUseDefDtime && this.data.form.time > 0) {//转为默认时间 444 if (this.data.hasUseDefDtime && this.data.form.time > 0) {//转为默认时间
435 let ddateStr = util.unixtoTime(form.ddate, "YYYY-MM-DD " + this.data.defDtime[this.data.form.time] + ":00"); 445 let ddateStr = util.unixtoTime(form.ddate, "YYYY-MM-DD " + this.data.defDtime[this.data.form.time] + ":00");
@@ -489,7 +499,7 @@ Page({ @@ -489,7 +499,7 @@ Page({
489 [changeDay]: clickDay, 499 [changeDay]: clickDay,
490 [changeBg]: "#84e7d0", 500 [changeBg]: "#84e7d0",
491 //[`form.tid`]: [], //切换日期时间清空桌位 501 //[`form.tid`]: [], //切换日期时间清空桌位
492 - buttonhide: true, 502 + //buttonhide: true,
493 }) 503 })
494 this.setDateStr(cktime == day0 ? new Date() / 1000 : cktime) 504 this.setDateStr(cktime == day0 ? new Date() / 1000 : cktime)
495 this.getTables(); 505 this.getTables();
@@ -47,7 +47,7 @@ Page({ @@ -47,7 +47,7 @@ Page({
47 //title: (nickname||'')+'给你发送了一个订座信息,点击查看详情', 47 //title: (nickname||'')+'给你发送了一个订座信息,点击查看详情',
48 title: '点击查看详情,发邀请函', 48 title: '点击查看详情,发邀请函',
49 path: path+'&hasInvitation=1&hasSellerShare=1', 49 path: path+'&hasInvitation=1&hasSellerShare=1',
50 - imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-anpai.jpg', 50 + imageUrl:'http://qn.colorcun.com/custom/lite-yd-cook/image/share-anpai2.jpg',
51 success: function (res) { 51 success: function (res) {
52 console.log(res,666666) 52 console.log(res,666666)
53 }, 53 },
@@ -168,10 +168,21 @@ Page({ @@ -168,10 +168,21 @@ Page({
168 actionSheetHidden:true 168 actionSheetHidden:true
169 }) 169 })
170 }, 170 },
171 - startDinner(e){ 171 + async startDinner(e){
  172 + let cause={};
  173 + let enter_params=util.cache('enter_params');
  174 + let sc=(await App.Reserve.SellerInfo(enter_params)).data
  175 + cause={desc:""}
  176 + if(enter_params){
  177 + cause.uid=enter_params.manager_id;
  178 + }
  179 + if(sc.seller_user){
  180 + cause.uname=(sc.seller_user.nick_name||sc.seller_user.nickname)
  181 + }
172 App.Reserve.SetReserveStatus({ 182 App.Reserve.SetReserveStatus({
173 rid:this.data.bookInfo.id, 183 rid:this.data.bookInfo.id,
174 status:util.attr(e,'status'), 184 status:util.attr(e,'status'),
  185 + cause:JSON.stringify(cause),
175 }).then(()=>{ 186 }).then(()=>{
176 this.getDetail(this.data.bookInfo.id,true); 187 this.getDetail(this.data.bookInfo.id,true);
177 }); 188 });
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <image src="http://qn.colorcun.com/custom/lite-yd/image/reserve-status-{{bookInfo.status}}.png"></image> 13 <image src="http://qn.colorcun.com/custom/lite-yd/image/reserve-status-{{bookInfo.status}}.png"></image>
14 </view> 14 </view>
15 <view class="flex-lr order-detail"> 15 <view class="flex-lr order-detail">
16 - <view class="gray-deep-font font30r">预定座位</view> 16 + <view class="gray-deep-font font30r">预订座位</view>
17 <view class="black-font font34r">{{tables.length}}个</view> 17 <view class="black-font font34r">{{tables.length}}个</view>
18 </view> 18 </view>
19 <view class="flex-lr order-desk"> 19 <view class="flex-lr order-desk">
@@ -78,19 +78,27 @@ @@ -78,19 +78,27 @@
78 <!--通知预订人--> 78 <!--通知预订人-->
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 bindtap="noticeCall">通知预订人</view> 81 + <view>
  82 + <formids bindclick="noticeCall">通知预订人</formids>
  83 + </view>
82 <view wx:if="{{bookInfo.order && bookInfo.order.cookbooklist.length>0}}"> 84 <view wx:if="{{bookInfo.order && bookInfo.order.cookbooklist.length>0}}">
83 <formids bindclick="showOrder">查看菜品</formids> 85 <formids bindclick="showOrder">查看菜品</formids>
84 </view> 86 </view>
85 </view> 87 </view>
86 <view class="notice-button-border font34r flex-lr"> 88 <view class="notice-button-border font34r flex-lr">
87 - <view bindtap="gotoModify">变更预定</view>  
88 - <view bindtap="cancelReserve">取消预定</view>  
89 - <view bindtap="startDinner" data-status="2">确认到店</view> 89 + <view>
  90 + <formids bindclick="gotoModify">变更预订</formids>
  91 + </view>
  92 + <view >
  93 + <formids bindclick="cancelReserve">取消预订</formids>
  94 + </view>
  95 + <view>
  96 + <formids bindclick="startDinner" data-status="2">确认到店</formids>
  97 + </view>
90 </view> 98 </view>
91 </view> 99 </view>
92 <view class="notice-opt" wx:if="{{bookInfo.status==2}}"> 100 <view class="notice-opt" wx:if="{{bookInfo.status==2}}">
93 - <view class="notice-button white-font font34r flex-cc" bindtap="startDinner" data-status="3">顾客就餐完毕</view> 101 + <formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">顾客就餐完毕</formids>
94 </view> 102 </view>
95 <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> 103 <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall>
96 <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> 104 <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll">
@@ -28,6 +28,9 @@ Page({ @@ -28,6 +28,9 @@ Page({
28 [], 28 [],
29 ], 29 ],
30 speciallist:[], 30 speciallist:[],
  31 + ReservesCountMonth:[],
  32 + ReservesTotal:0,
  33 + timeStrLabel:bookOrder.timeStrLabel
31 }, 34 },
32 sellerid:0, 35 sellerid:0,
33 indexOpt:null, 36 indexOpt:null,
@@ -70,6 +73,8 @@ Page({ @@ -70,6 +73,8 @@ Page({
70 }) 73 })
71 //util.setBarTitle('预定本'); 74 //util.setBarTitle('预定本');
72 this.indexOpt=opt; 75 this.indexOpt=opt;
  76 + this.ReservesCountDay(util.unixtoTime(d,'YYYY-MM-DD'));
  77 + this.ReservesCountMonth(util.unixtoTime(d,'YYYY-MM'));
73 }, 78 },
74 onShow:function(){ 79 onShow:function(){
75 this.setData({ 80 this.setData({
@@ -169,13 +174,14 @@ Page({ @@ -169,13 +174,14 @@ Page({
169 let clickDay = event.detail.date.substr(8,2); 174 let clickDay = event.detail.date.substr(8,2);
170 let changeDay = `dayStyle[1].day`; 175 let changeDay = `dayStyle[1].day`;
171 let changeBg = `dayStyle[1].background`; 176 let changeBg = `dayStyle[1].background`;
172 - this.setData({  
173 - dateStr:util.unixtoTime(cktime,'MM-DD `DAY/周WW`'),  
174 - [changeDay]: clickDay,  
175 - [changeBg]: "#84e7d0"  
176 - })  
177 - this.getbooklist();  
178 - this.calendarClose(); 177 + this.setData({
  178 + dateStr:util.unixtoTime(cktime,'MM-DD `DAY/周WW`'),
  179 + [changeDay]: clickDay,
  180 + [changeBg]: "#84e7d0"
  181 + })
  182 + this.getbooklist();
  183 + this.calendarClose();
  184 + this.ReservesCountDay(event.detail.date);
179 }, 185 },
180 calendarClose(){ 186 calendarClose(){
181 this.setData({ 187 this.setData({
@@ -221,4 +227,48 @@ Page({ @@ -221,4 +227,48 @@ Page({
221 exportFile(){ 227 exportFile(){
222 this.getbooklist(true); 228 this.getbooklist(true);
223 }, 229 },
  230 + ReservesCountDay(day){
  231 + App.Reserve.ReservesCountDay({
  232 + sid:this.sellerid,
  233 + day:day
  234 + }).then(res=>{
  235 +
  236 + let ReservesTotal=0;
  237 + let ReservesCountDay={};
  238 + if(res.ret==200){
  239 + ReservesCountDay=res.data;
  240 + Object.keys(res.data).forEach(k=>{
  241 + if(res.data[k]!=-1){
  242 + ReservesTotal+=parseInt(res.data[k])
  243 + }
  244 + })
  245 + }
  246 + this.setData({
  247 + ReservesTotal:ReservesTotal,
  248 + ReservesCountDay:ReservesCountDay,
  249 + })
  250 + })
  251 + },
  252 + ReservesCountMonth(month){
  253 + App.Reserve.ReservesCountMonth({
  254 + sid:this.sellerid,
  255 + month:month
  256 + }).then(res=>{
  257 + let ReservesCountMonth=[];
  258 + if(res.ret==200){
  259 + res.data.forEach(v=>{
  260 + ReservesCountMonth.push(v>=1?1:0)
  261 + })
  262 + }
  263 + this.setData({
  264 + ReservesCountMonth:ReservesCountMonth,
  265 + })
  266 + })
  267 + },
  268 + clickMonth(e){
  269 + this.ReservesCountMonth(e.detail.currentYear+'-'+e.detail.currentMonth);
  270 + },
  271 + gotoday(e){
  272 + this.ReservesCountMonth(e.detail.date.substr(0,7));
  273 + }
224 }) 274 })
@@ -33,18 +33,20 @@ @@ -33,18 +33,20 @@
33 </view> 33 </view>
34 </view> 34 </view>
35 </view> 35 </view>
  36 + <view class="book-list-cut flex-ll font26r black-font">
  37 + <text>已订 {{ReservesTotal}}</text>
  38 + <text wx:for="{{ReservesCountDay}}" wx:if="{{item>-1}}" wx:key="ReservesCountDay.key">{{timeStrLabel[index]}} {{item}}</text>
  39 + </view>
36 <block wx:if="{{!bookList}}"> 40 <block wx:if="{{!bookList}}">
37 - <nothingBook height="{{listHeight}}"></nothingBook> 41 + <nothingBook height="{{listHeight}}"></nothingBook>
38 </block> 42 </block>
39 <block wx:else> 43 <block wx:else>
40 - <view class="book-list-cut flex-lr font26r black-font">  
41 - <text>已订 {{bookList.length}}</text>  
42 - </view> 44 +
43 <view bindcsroll="onPullDownRefresh" class="bg_white"> 45 <view bindcsroll="onPullDownRefresh" class="bg_white">
44 46
45 <view class="book-list-thead flex-lr font34r black-font"> 47 <view class="book-list-thead flex-lr font34r black-font">
46 <view>桌号</view> 48 <view>桌号</view>
47 - <view class="flex-cc">预定人</view> 49 + <view class="flex-cc">预订人</view>
48 <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>
49 <view class="flex-rr">操作</view> 51 <view class="flex-rr">操作</view>
50 </view> 52 </view>
@@ -81,13 +83,17 @@ @@ -81,13 +83,17 @@
81 datefont-style="datefont-style" 83 datefont-style="datefont-style"
82 todaybtn-style="todaybtn-style" 84 todaybtn-style="todaybtn-style"
83 85
84 - bindnextMonth="nextMonth"  
85 - bindprevMonth="prevMonth" 86 + bindnextMonth="clickMonth"
  87 + bindprevMonth="clickMonth"
86 bindselectDate="dateChange" 88 bindselectDate="dateChange"
87 bindgotoday="gotoday" 89 bindgotoday="gotoday"
88 90
89 colored="#199095" 91 colored="#199095"
90 - circle_show="{{false}}" 92 + circle_show="{{true}}"
  93 + mystatus="{{ReservesCountMonth}}"
  94 + dotcolor-o="dotcolor-o"
  95 + dotcolor-t="dotcolor-t"
  96 + allshow="{{true}}"
91 ></calendar> 97 ></calendar>
92 </view> 98 </view>
93 </view> 99 </view>
@@ -62,6 +62,9 @@ page{ @@ -62,6 +62,9 @@ page{
62 font-size: 26rpx; 62 font-size: 26rpx;
63 line-height: 66rpx; 63 line-height: 66rpx;
64 } 64 }
  65 +.book-list-cut text{
  66 + margin-right: 50rpx;
  67 +}
65 .border-line{ 68 .border-line{
66 width:670rpx; 69 width:670rpx;
67 height:1px; 70 height:1px;
@@ -50,3 +50,15 @@ @@ -50,3 +50,15 @@
50 position: absolute; 50 position: absolute;
51 bottom: 10rpx; right: 60rpx; 51 bottom: 10rpx; right: 60rpx;
52 } 52 }
  53 +/* 出勤 */
  54 +.dotcolor-o{
  55 + background-color: #ff3333!important;
  56 + top: 20rpx!important;
  57 + left: 70%!important;
  58 + width: 10rpx!important;
  59 + height: 10rpx!important;
  60 +}
  61 +/* 未出勤 */
  62 +.dotcolor-t{
  63 + background-color: #fefefe!important;
  64 +}
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "tabBar":"/components/book/tabBar/tabBar", 7 "tabBar":"/components/book/tabBar/tabBar",
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "tabBar":"/components/book/tabBar/tabBar", 7 "tabBar":"/components/book/tabBar/tabBar",
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <nav id="nav" backgroundColor="#199095" color="#fefefe">订座</nav> 2 <nav id="nav" backgroundColor="#199095" color="#fefefe">订座</nav>
3 <view class="header"> 3 <view class="header">
4 <view class="info"> 4 <view class="info">
5 - <view class="nick">{{user.nickname}}</view> 5 + <view class="nick">{{user.nick_name || user.nickname}}</view>
6 <view class="seller Medium">{{seller.sellername}} | {{user.role_name||''}}</view> 6 <view class="seller Medium">{{seller.sellername}} | {{user.role_name||''}}</view>
7 </view> 7 </view>
8 </view> 8 </view>
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "formids":"/components/formids/formids" 7 "formids":"/components/formids/formids"
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "userinfo":"/components/userinfo/userinfo", 6 "userinfo":"/components/userinfo/userinfo",
7 "nav":"/components/nav/nav", 7 "nav":"/components/nav/nav",
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "userinfo":"/components/userinfo/userinfo", 6 "userinfo":"/components/userinfo/userinfo",
7 "nav":"/components/nav/nav", 7 "nav":"/components/nav/nav",
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "userinfo":"/components/userinfo/userinfo", 6 "userinfo":"/components/userinfo/userinfo",
7 "nav":"/components/nav/nav", 7 "nav":"/components/nav/nav",
1 { 1 {
2 "backgroundTextStyle":"light", 2 "backgroundTextStyle":"light",
3 "navigationBarBackgroundColor": "#fff", 3 "navigationBarBackgroundColor": "#fff",
4 - "navigationBarTextStyle":"light", 4 + "navigationBarTextStyle":"white",
5 "usingComponents": { 5 "usingComponents": {
6 "nav":"/components/nav/nav", 6 "nav":"/components/nav/nav",
7 "formids":"/components/formids/formids" 7 "formids":"/components/formids/formids"
1 // pages/customer/detail_owner.js 1 // pages/customer/detail_owner.js
  2 +var mta=require('mta-wechat-analysis')
2 import util from '../../utils/util'; 3 import util from '../../utils/util';
3 import App from '../../utils/api'; 4 import App from '../../utils/api';
4 const {regeneratorRuntime} = global 5 const {regeneratorRuntime} = global
@@ -24,6 +25,14 @@ Page({ @@ -24,6 +25,14 @@ Page({
24 invite_name:invite_name 25 invite_name:invite_name
25 }) 26 })
26 } 27 }
  28 + mta.Page.init({
  29 + "appID":"500667280",
  30 + "eventID":"500667287",
  31 + "statPullDownFresh":true,
  32 + "statShareApp":true,
  33 + "statReachBottom":true,
  34 + "lauchOpts":options, //渠道分析
  35 + });
27 }, 36 },
28 37
29 /** 38 /**
1 { 1 {
2 "navigationBarBackgroundColor": "#ffffff", 2 "navigationBarBackgroundColor": "#ffffff",
3 - "navigationBarTextStyle": "light", 3 + "navigationBarTextStyle": "white",
4 "navigationBarTitleText":"订座详情", 4 "navigationBarTitleText":"订座详情",
5 "usingComponents": { 5 "usingComponents": {
6 "userinfo": "/components/userinfo/userinfo", 6 "userinfo": "/components/userinfo/userinfo",
1 // pages/customer/detail_owner.js 1 // pages/customer/detail_owner.js
  2 +var mta=require('mta-wechat-analysis')
2 import util from '../../utils/util'; 3 import util from '../../utils/util';
3 import App from '../../utils/api'; 4 import App from '../../utils/api';
4 const {regeneratorRuntime} = global 5 const {regeneratorRuntime} = global
@@ -24,6 +25,14 @@ Page({ @@ -24,6 +25,14 @@ Page({
24 invite_name:invite_name 25 invite_name:invite_name
25 }) 26 })
26 } 27 }
  28 + mta.Page.init({
  29 + "appID":"500667280",
  30 + "eventID":"500667287",
  31 + "statPullDownFresh":true,
  32 + "statShareApp":true,
  33 + "statReachBottom":true,
  34 + "lauchOpts":options, //渠道分析
  35 + });
27 }, 36 },
28 37
29 /** 38 /**
1 { 1 {
2 "navigationBarBackgroundColor": "#ffffff", 2 "navigationBarBackgroundColor": "#ffffff",
3 - "navigationBarTextStyle": "light", 3 + "navigationBarTextStyle": "white",
4 "navigationBarTitleText":"订座详情", 4 "navigationBarTitleText":"订座详情",
5 "usingComponents": { 5 "usingComponents": {
6 "userinfo": "/components/userinfo/userinfo", 6 "userinfo": "/components/userinfo/userinfo",
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <view class="pages"> 3 <view class="pages">
4 <view class="flex-vc" style="position: relative;"> 4 <view class="flex-vc" style="position: relative;">
5 <view class="invit-logo"> 5 <view class="invit-logo">
6 - <image src="http://qn.colorcun.com/custom/lite-yd-cook/image/detail_owner_invitation-1.png"></image> 6 + <image src="http://qn.colorcun.com/custom/lite-yd-cook/image/detail_owner_invitation-1-1.png"></image>
7 </view> 7 </view>
8 <view class="seller flex-vc"> 8 <view class="seller flex-vc">
9 <view class="title">餐厅</view> 9 <view class="title">餐厅</view>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <view class="tip">在这里维护你的常用预订信息</view> 4 <view class="tip">在这里维护你的常用预订信息</view>
5 <view class="card"> 5 <view class="card">
6 <view class="item flex-lr"> 6 <view class="item flex-lr">
7 - <view class="item-label">预 定 人</view> 7 + <view class="item-label">预 订 人</view>
8 <view class="Medium flex-rr"> 8 <view class="Medium flex-rr">
9 <input class="name input" placeholder="请输入姓名" 9 <input class="name input" placeholder="请输入姓名"
10 bindinput="changeInput" 10 bindinput="changeInput"
@@ -60,7 +60,15 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0, @@ -60,7 +60,15 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0,
60 if(formids){ 60 if(formids){
61 wx.removeStorage({key:'formids'}); 61 wx.removeStorage({key:'formids'});
62 } 62 }
63 - 63 + let enter_params = wx.getStorageSync('enter_params');
  64 + let operator=''
  65 + if(enter_params){
  66 + operator=JSON.stringify({
  67 + uid:enter_params.manager_id,
  68 + openid: enter_params.seller_openid,
  69 + sid:enter_params.seller_id,
  70 + })
  71 + }
64 wx.request({ 72 wx.request({
65 url: host+act, 73 url: host+act,
66 method: 'POST', 74 method: 'POST',
@@ -69,6 +77,7 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0, @@ -69,6 +77,7 @@ function rpc(host='',act,data={},fouce=false,header={},silence=true,cachetime=0,
69 ...header, 77 ...header,
70 openid:openid, 78 openid:openid,
71 formids:formids.toString(), 79 formids:formids.toString(),
  80 + operator:operator,
72 'content-type': 'application/x-www-form-urlencoded' 81 'content-type': 'application/x-www-form-urlencoded'
73 }, 82 },
74 success: function (res) { 83 success: function (res) {
@@ -116,6 +116,12 @@ export default { @@ -116,6 +116,12 @@ export default {
116 alias:'App.SendSMS.SmsBatchSend', 116 alias:'App.SendSMS.SmsBatchSend',
117 silence: false, 117 silence: false,
118 }, 118 },
  119 + //统计某个商家某天预定总数
  120 + 'App.Reserve.ReservesCountDay':null,
  121 + //统计某个商家某月预定总数
  122 + 'App.Reserve.ReservesCountMonth':{
  123 + cachetime: 300,
  124 + },
119 125
120 /**提前点餐**/ 126 /**提前点餐**/
121 'App.Advance.CreateOrder':{ 127 'App.Advance.CreateOrder':{
@@ -59,8 +59,10 @@ module.exports ={ @@ -59,8 +59,10 @@ module.exports ={
59 } 59 }
60 if (sc.daily){ 60 if (sc.daily){
61 let ti=['morning','noon','night']; 61 let ti=['morning','noon','night'];
62 - console.log('getTimeSpace',sc.daily,sc.daily[ti[timeIndex]],timeIndex);  
63 - let ts=sc.daily[ti[timeIndex]].split('-'); 62 + let scDaily=sc.daily[ti[timeIndex]]||'00:00-23:59';
  63 + console.log('getTimeSpace',sc.daily,scDaily,timeIndex);
  64 +
  65 + let ts=scDaily.split('-');
64 66
65 let stime 67 let stime
66 if(stimestr){ 68 if(stimestr){
@@ -175,6 +177,6 @@ module.exports ={ @@ -175,6 +177,6 @@ module.exports ={
175 } 177 }
176 //console.log('times',obj); 178 //console.log('times',obj);
177 return obj; 179 return obj;
178 - }  
179 - 180 + },
  181 + timeStrLabel:{'morning':'早市','noon':'午市','night':'晚市'},
180 } 182 }
1 //正式 1 //正式
2 var uri={ 2 var uri={
3 3
4 - HOST__LINE:'https://xt04.colorcun.com/?s=', 4 + HOST__LINE:'https://xt05.colorcun.com/?s=',
5 5
6 //获取商家信息 6 //获取商家信息
7 CGI__USER_GETSELLERBYID: 'App.Seller.GetSellerById', 7 CGI__USER_GETSELLERBYID: 'App.Seller.GetSellerById',