Commit 0ef02bc432e571daa1556b1185b968821491822a

Authored by wangfan
2 parents 3c2b887f 00cfdade

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

# Conflicts:
#	project.config.json
#	utils/api.url.js
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 .nav-main{ 3 .nav-main{
4 position:fixed; 4 position:fixed;
5 width: 100%; 5 width: 100%;
6 - z-index: 1; 6 + z-index: 10;
7 } 7 }
8 .nav{ 8 .nav{
9 font-size: 30rpx; 9 font-size: 30rpx;
@@ -150,12 +150,10 @@ @@ -150,12 +150,10 @@
150 bindconfirm="selectedValue" 150 bindconfirm="selectedValue"
151 data-key="phone" 151 data-key="phone"
152 value="{{form.phone}}" style="color:{{reminder ? '#E14553' : '#353535'}};width:{{reminder ? 400 : 680}}rpx;" cursor-spacing="260"/> 152 value="{{form.phone}}" style="color:{{reminder ? '#E14553' : '#353535'}};width:{{reminder ? 400 : 680}}rpx;" cursor-spacing="260"/>
153 - <block wx:if="{{reminder}}">  
154 - <view class="flex-rr" style="height:100rpx;">  
155 - <view style="color:#E14553;" class="font28r">{{reminder}}</view>  
156 - <image src="http://qn.colorcun.com/custom/lite-yd/image/name-have.png" class="phone-reminder"></image>  
157 - </view>  
158 - </block> 153 + <view bindtap="selectedValue" data-key="time" data-value="{{form.time}}" data-display="block" style="color:#199095">
  154 + <view style="font-size: 34rpx;height: 100rpx;line-height: 100rpx;" wx:if="{{hasUseDefDtime && form.time>0}}">{{defDtime[form.time]}}</view>
  155 + <view style="font-size: 34rpx;height: 100rpx;line-height: 100rpx;" wx:else="">{{timePickerArray[form.time][timePickerIndex[form.time]]}}</view>
  156 + </view>
159 <block wx:if="{{searchlist}}"> 157 <block wx:if="{{searchlist}}">
160 <searchList searchlist="{{searchlist}}" bind:selectphone="selectphone"></searchList> 158 <searchList searchlist="{{searchlist}}" bind:selectphone="selectphone"></searchList>
161 </block> 159 </block>
@@ -177,18 +175,17 @@ @@ -177,18 +175,17 @@
177 </block> 175 </block>
178 </view> 176 </view>
179 </view> 177 </view>
180 - <view class="book-info-single" bindtap="selectedValue" data-key="time" data-value="{{form.time}}" data-display="block">  
181 - <view style="font-size: 34rpx;height: 100rpx;line-height: 100rpx;" wx:if="{{hasUseDefDtime && form.time>0}}">{{defDtime[form.time]}}</view>  
182 - <view style="font-size: 34rpx;height: 100rpx;line-height: 100rpx;" wx:else="">{{timePickerArray[form.time][timePickerIndex[form.time]]}}</view>  
183 - </view>  
184 178
185 - <view class="book-info-single">  
186 - <input placeholder="客户的要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}" 179 + <view class="book-info-single flex-lr">
  180 + <input placeholder="客户要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}"
187 bindinput="selectedValue" 181 bindinput="selectedValue"
188 bindconfirm="selectedValue" 182 bindconfirm="selectedValue"
189 bindfocus="inputFocus" 183 bindfocus="inputFocus"
190 bindblur="inputFocus" 184 bindblur="inputFocus"
191 data-key="cusdem"/> 185 data-key="cusdem"/>
  186 + <view class="CustomRemarkMore flex-rr">
  187 + <view bindtap="CustomRemarkMore">快速备注</view>
  188 + </view>
192 </view> 189 </view>
193 <view wx:if="{{CustomRemark.length>0}}" class="book-info-single last" style="padding-top: 14rpx; height: 60rpx;"> 190 <view wx:if="{{CustomRemark.length>0}}" class="book-info-single last" style="padding-top: 14rpx; height: 60rpx;">
194 <view class="flex-lr CustomRemark"> 191 <view class="flex-lr CustomRemark">
@@ -200,13 +197,10 @@ @@ -200,13 +197,10 @@
200 data-value="{{item.often_use}}">{{item.often_use}}</view> 197 data-value="{{item.often_use}}">{{item.often_use}}</view>
201 </view> 198 </view>
202 </view> 199 </view>
203 - <view class="CustomRemarkMore flex-rr">  
204 - <view class="CustomRemarkItem" style="margin-bottom: 0" bindtap="CustomRemarkMore">更多</view>  
205 - </view>  
206 </view> 200 </view>
207 </view> 201 </view>
208 </view> 202 </view>
209 - <view class="page-full submit" style="background-color: #fefefe;"> 203 + <view class="page-full submit">
210 <view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view> 204 <view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
211 </view> 205 </view>
212 </view> 206 </view>
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 .book-info{ 174 .book-info{
175 width:100%; 175 width:100%;
176 padding-top:20rpx; 176 padding-top:20rpx;
177 - margin:0 auto; 177 + margin:0 auto 300rpx;
178 } 178 }
179 .book-info-single{ 179 .book-info-single{
180 width:100%; 180 width:100%;
@@ -216,8 +216,13 @@ @@ -216,8 +216,13 @@
216 提交按钮 216 提交按钮
217 */ 217 */
218 .submit{ 218 .submit{
219 - padding-top: 18rpx;  
220 - padding-bottom: 174rpx; 219 + position: fixed;
  220 + bottom: 120rpx;
  221 + left: 0;
  222 + right: 0;
  223 + height: 150rpx;
  224 + background-color: #fefefe;
  225 + z-index: 10;
221 } 226 }
222 .confirm-button{ 227 .confirm-button{
223 width:680rpx; 228 width:680rpx;
@@ -289,6 +294,9 @@ @@ -289,6 +294,9 @@
289 } 294 }
290 .CustomRemarkMore{ 295 .CustomRemarkMore{
291 width: 200rpx; 296 width: 200rpx;
  297 + min-width: 200rpx;
  298 + color:#199095;
  299 + font-size: 30rpx;
292 } 300 }
293 .CustomRemarkItem{ 301 .CustomRemarkItem{
294 height: 48rpx; 302 height: 48rpx;
@@ -13,6 +13,7 @@ Page({ @@ -13,6 +13,7 @@ Page({
13 data: { 13 data: {
14 list:[], 14 list:[],
15 hasMore:true, 15 hasMore:true,
  16 + hasSalesman:false,
16 }, 17 },
17 18
18 /** 19 /**
@@ -21,6 +22,11 @@ Page({ @@ -21,6 +22,11 @@ Page({
21 enter_params: {}, 22 enter_params: {},
22 onLoad: function (options) { 23 onLoad: function (options) {
23 this.enter_params = util.cache('enter_params'); 24 this.enter_params = util.cache('enter_params');
  25 + App.Reserve.SellerInfo(this.enter_params).then(res=>{
  26 + this.setData({
  27 + hasSalesman:res.data.hasSalesman==1
  28 + })
  29 + })
24 this.seller_id=options.seller_id||this.enter_params.seller_id; 30 this.seller_id=options.seller_id||this.enter_params.seller_id;
25 this.getMembers(); 31 this.getMembers();
26 }, 32 },
@@ -80,4 +86,15 @@ Page({ @@ -80,4 +86,15 @@ Page({
80 this.setData(obj) 86 this.setData(obj)
81 }) 87 })
82 }, 88 },
  89 + sendSalesmanMsg(e){
  90 + let openid=util.attr(e,'openid')
  91 + App.Reserve.OperationalMessagePush({
  92 + openid:openid
  93 + }).then(res=>{
  94 + if(res.ret!=200){
  95 + return util.toast(res.msg,'none')
  96 + }
  97 + util.toast('已发送')
  98 + })
  99 + },
83 }) 100 })
1 <!--pages/book/setting/index.wxml--> 1 <!--pages/book/setting/index.wxml-->
2 <nav id="nav" backgroundColor="#199095" color="#fefefe">我的客户</nav> 2 <nav id="nav" backgroundColor="#199095" color="#fefefe">我的客户</nav>
3 -<view class="page"> 3 +<view class="pages">
4 <block wx:if="{{list.length>0}}"> 4 <block wx:if="{{list.length>0}}">
5 <view class="row flex-lr" wx:for="{{list}}" wx:key="list.key" > 5 <view class="row flex-lr" wx:for="{{list}}" wx:key="list.key" >
6 <view class="flex-ll"> 6 <view class="flex-ll">
@@ -9,8 +9,9 @@ @@ -9,8 +9,9 @@
9 </view> 9 </view>
10 <view class="nickname">{{item.nickname||''}}</view> 10 <view class="nickname">{{item.nickname||''}}</view>
11 </view> 11 </view>
12 - <view class="flex-rr">  
13 - <!--view class="more"></view--> 12 + <view class="flex-rr optmsg" wx:if="{{hasSalesman}}" bindtap="sendSalesmanMsg" data-openid="{{item.openid}}">
  13 + <view>发送消息</view>
  14 + <view class="more"></view>
14 </view> 15 </view>
15 </view> 16 </view>
16 </block> 17 </block>
@@ -3,10 +3,11 @@ @@ -3,10 +3,11 @@
3 http://qn.colorcun.com/custom/lite-yd/image/icon-zk.png 3 http://qn.colorcun.com/custom/lite-yd/image/icon-zk.png
4 http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png 4 http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png
5 */ 5 */
6 -.page{ 6 +.pages{
7 width: 90%; 7 width: 90%;
8 - margin: 0 auto; 8 + margin: 0 auto 50rpx;
9 color: #353535; 9 color: #353535;
  10 + overflow-y: auto;
10 } 11 }
11 .row{ 12 .row{
12 font-size: 34rpx; 13 font-size: 34rpx;
@@ -48,4 +49,8 @@ http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png @@ -48,4 +49,8 @@ http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png
48 .nickname{ 49 .nickname{
49 margin-left: 40rpx; 50 margin-left: 40rpx;
50 font-size: 34rpx; 51 font-size: 34rpx;
  52 +}
  53 +.optmsg{
  54 + font-size: 30rpx;
  55 + color:#199095;
51 } 56 }
@@ -17,15 +17,32 @@ Page({ @@ -17,15 +17,32 @@ Page({
17 defineremark:util.trim(e.detail.value) 17 defineremark:util.trim(e.detail.value)
18 }) 18 })
19 }, 19 },
  20 + //选择常用备注
20 taplabel:function(e){ 21 taplabel:function(e){
21 var _target=e.currentTarget.dataset; 22 var _target=e.currentTarget.dataset;
22 - var mylabel=this.data.mylabel;  
23 - console.log(_target.id,_target.type);  
24 - this.setlabel(_target.id,_target.type); 23 + var oftenlabel=0,alllabel=this.data.alllabel;
  24 + alllabel.forEach(function(v,i){
  25 + if(v.often_use!=''){
  26 + oftenlabel++;
  27 + }
  28 + })
  29 + if(_target.type=='often'){
  30 + this.setlabel(_target.id,_target.type);
  31 + }else{
  32 + if(oftenlabel<10){
  33 + this.setlabel(_target.id,_target.type);
  34 + }else{
  35 + wx.showToast({
  36 + title:'最多可添加10个',
  37 + icon:'none',
  38 + duration:2000
  39 + })
  40 + }
  41 + }
25 }, 42 },
26 getlabellist:function(){ 43 getlabellist:function(){
27 App.User.GetCustomRemark({ 44 App.User.GetCustomRemark({
28 - uid:util.cache('enter_params')['manager_id'] 45 + uid:util.cache('enter_params')['manage_id']
29 }).then(res=>{ 46 }).then(res=>{
30 console.log(res) 47 console.log(res)
31 this.setData({ 48 this.setData({
@@ -38,7 +55,7 @@ Page({ @@ -38,7 +55,7 @@ Page({
38 }, 55 },
39 setlabel:function(id,flag){ 56 setlabel:function(id,flag){
40 App.User.GetCustomRemark({ 57 App.User.GetCustomRemark({
41 - uid:util.cache('enter_params')['manager_id'], 58 + uid:util.cache('enter_params')['manage_id'],
42 kid:id, 59 kid:id,
43 flag:flag, 60 flag:flag,
44 }).then(res=>{ 61 }).then(res=>{
@@ -60,7 +77,7 @@ Page({ @@ -60,7 +77,7 @@ Page({
60 //添加自定义标签 77 //添加自定义标签
61 addlabel:function(custom){ 78 addlabel:function(custom){
62 App.User.AddCustomRemark({ 79 App.User.AddCustomRemark({
63 - uid:util.cache('enter_params')['manager_id'], 80 + uid:util.cache('enter_params')['manage_id'],
64 custom:custom, 81 custom:custom,
65 }).then(res=>{ 82 }).then(res=>{
66 console.log(res) 83 console.log(res)
@@ -69,6 +86,15 @@ Page({ @@ -69,6 +86,15 @@ Page({
69 defineremark:null, 86 defineremark:null,
70 }) 87 })
71 this.getlabellist(); 88 this.getlabellist();
  89 + }else{
  90 + this.setData({
  91 + defineremark:null,
  92 + })
  93 + wx.showToast({
  94 + title:'最多可添加20个备注',
  95 + icon:'none',
  96 + duration:2000
  97 + })
72 } 98 }
73 }) 99 })
74 }, 100 },
1 <nav id="nav">常用备注</nav> 1 <nav id="nav">常用备注</nav>
2 <view class="cut"></view> 2 <view class="cut"></view>
3 <view class="label"> 3 <view class="label">
4 - <view class="label-title black-font font30r smooth" style="padding-bottom:40rpx;">我的常用备注</view> 4 + <view class="label-title black-font font30r smooth" style="padding-bottom:40rpx;">我的常用备注<text class="font24r smooth gray-deep-font">(最多添加10个)</text></view>
5 <view class="label-list flex-rs me-label-list"> 5 <view class="label-list flex-rs me-label-list">
6 <block wx:for="{{alllabel}}"> 6 <block wx:for="{{alllabel}}">
7 <block wx:if="{{item.often_use!=''}}"> 7 <block wx:if="{{item.often_use!=''}}">
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </block> 13 </block>
14 <view style="min-width:176rpx;"><input class="black-font flex-cc font28r smooth label-input flex-cc" placeholder="添加备注" maxlength="10" style="width:{{defineremark && defineremark.length>4 ? (defineremark.length-4)*28+160 : 160}}rpx;" value="{{defineremark}}" bindinput="inputremark" focus="{{focus}}" cursor-spacing="160" bindblur="addinputlabel" placeholder-style="color:#999;font-size:28rpx;text-align:center;"/></view> 14 <view style="min-width:176rpx;"><input class="black-font flex-cc font28r smooth label-input flex-cc" placeholder="添加备注" maxlength="10" style="width:{{defineremark && defineremark.length>4 ? (defineremark.length-4)*28+160 : 160}}rpx;" value="{{defineremark}}" bindinput="inputremark" focus="{{focus}}" cursor-spacing="160" bindblur="addinputlabel" placeholder-style="color:#999;font-size:28rpx;text-align:center;"/></view>
15 </view> 15 </view>
16 - <view class="label-title black-font font30r smooth">所有备注</view> 16 + <view class="label-title black-font font30r smooth">所有备注<text class="font24r smooth gray-deep-font">(最多添加20个)</text></view>
17 <view class="label-list flex-rs"> 17 <view class="label-list flex-rs">
18 <block wx:for="{{alllabel}}"> 18 <block wx:for="{{alllabel}}">
19 <view class="label-single flex-cc font28r smooth {{item.often_use!='' ? 'bg_green white-font' : 'all-label green-font'}}" data-id="{{item.id}}" data-type="{{item.often_use!='' ? 'often' : 'custom'}}" bindtap="taplabel" style="margin:0 16rpx 20rpx 0;">{{item.custom}}</view> 19 <view class="label-single flex-cc font28r smooth {{item.often_use!='' ? 'bg_green white-font' : 'all-label green-font'}}" data-id="{{item.id}}" data-type="{{item.often_use!='' ? 'often' : 'custom'}}" bindtap="taplabel" style="margin:0 16rpx 20rpx 0;">{{item.custom}}</view>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 "list": [] 31 "list": []
32 }, 32 },
33 "miniprogram": { 33 "miniprogram": {
34 - "current": 32, 34 + "current": 21,
35 "list": [ 35 "list": [
36 { 36 {
37 "id": 0, 37 "id": 0,
@@ -201,8 +201,8 @@ @@ -201,8 +201,8 @@
201 "id": 21, 201 "id": 21,
202 "name": "预定本-80商家", 202 "name": "预定本-80商家",
203 "pathName": "pages/book/b_index", 203 "pathName": "pages/book/b_index",
204 - "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=762",  
205 - "scene": "1001" 204 + "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=763",
  205 + "scene": 1001
206 }, 206 },
207 { 207 {
208 "id": -1, 208 "id": -1,
@@ -150,13 +150,18 @@ export default { @@ -150,13 +150,18 @@ export default {
150 150
151 /**crm**/ 151 /**crm**/
152 'App.Reserve.Members':null, 152 'App.Reserve.Members':null,
153 - 153 +
154 //常用备注 154 //常用备注
155 'App.User.GetCustomRemark':null, 155 'App.User.GetCustomRemark':null,
156 - 156 +
157 //添加备注 157 //添加备注
158 'App.User.AddCustomRemark':null, 158 'App.User.AddCustomRemark':null,
159 159
  160 + //运营发送消息demo
  161 + 'App.Reserve.OperationalMessagePush':{
  162 + silence: false,
  163 + },
  164 +
160 //顾客端配置信息、菜系 165 //顾客端配置信息、菜系
161 'App.Reserve.GetCustomerConfig':{ 166 'App.Reserve.GetCustomerConfig':{
162 cachetime: 1800, 167 cachetime: 1800,