Commit 1b8d37db24b1b3a8d762190b34af5eeed1647b89

Authored by wangfan
2 parents c7beec3d 40130f36

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

# Conflicts:
#	utils/api.url.js
... ... @@ -23,6 +23,7 @@
"pages/book/setting/sms",
"pages/book/setting/sms_buy",
"pages/book/crm/index",
"pages/book/remark/index",
"pages/book/smsbatch/index",
"pages/book/smsbatch/update",
"pages/book/smsbatch/detail",
... ...
... ... @@ -11,7 +11,7 @@
<view class="book-list-td flex-vc">{{vitem.order_time}}</view>
<view class="book-list-td flex-rr green-font">
<view>
<view>{{vitem.status==1?'通知预订人':vitem.status_str}}</view>
<view>{{vitem.status==1?'通知客户':vitem.status_str}}</view>
</view>
</view>
</view>
... ...
... ... @@ -70,6 +70,8 @@ Page({
},
defDtime: ['', '12:00', '18:30'],
hasUseDefDtime: true,
CustomRemark:[],
CustomRemarkMoreMask:false,
},
/**
* 生命周期函数--监听页面加载
... ... @@ -78,6 +80,7 @@ Page({
checkedTables:{},//已选中的桌子集合
onLoad: async function (options) {
this.initLoad(options)
this.getCustomRemark();
},
async initLoad(options = {}){
let nt = new Date() / 1000;
... ... @@ -88,7 +91,7 @@ Page({
];
this.reserve_id = options.id || '';
await this.setDateStr();
this.sellerid = util.cache('sellerid');
this.sellerid = util.cache('enter_params')['seller_id'];
let timePickerArray = await comm.getDayTimeSpace();
//判断hasUseDefDtime
let hasUseDefDtime = true;
... ... @@ -321,7 +324,7 @@ Page({
let rdate = await comm.getTimeSpace(this.data.dateStr[this.data.form.date], this.data.form.time);
console.log('rdate', this.data.dateStr[this.data.form.date], rdate);
App.Reserve.GetTableList({
sid: this.sellerid,
sid: util.cache('enter_params')['seller_id'],
//pnum_str:form.pnum_str,
pnum: form.pnum,
rdate: rdate,
... ... @@ -369,15 +372,16 @@ Page({
if(tables.length<1){
tablesLength=0;
tables_tmp = [];
res.data.forEach(p => {
res.data.forEach((p,ri) => {
p.list.forEach(t => {
tablesLength++;
if(ri>0) tablesLength++;
//if(tables.length>=3) return true;
if (t.tid == 2) {
tables.push(t);
} else {
tables_tmp.push(t);
}
// if (t.tid == 2) {
// tables.push(t);
// } else {
// tables_tmp.push(t);
// }
tables.push(t);
})
})
if (tables.length < 3) {
... ... @@ -447,6 +451,7 @@ Page({
}
App.Reserve.SetReserveInfo(form).then(res => {
if (res.ret == 200) {
this.getCustomRemark()
let _id = (res.data.id || res.data)
this.setData({
form: JSON.parse(JSON.stringify(formTpl)),
... ... @@ -707,4 +712,39 @@ Page({
console.log('initQuick', e)
}
},
getCustomRemark(){
App.User.GetCustomRemark({
uid:util.cache('enter_params')['manager_id'],
}).then(res=>{
this.setData({
CustomRemark:res.data,
})
})
},
oftenUse(e){
let id=util.attr(e,'id');
let val=util.attr(e,'value');
let CustomRemark=this.data.CustomRemark;
let form=this.data.form;
CustomRemark.forEach(r=>{
if(id==r.id){
if(r.active){
form.cusdem=form.cusdem.replace(val+'、','')
}
r.active=!r.active
if(r.active){
form.cusdem+=val+'、'
}
}
})
this.setData({
CustomRemark:CustomRemark,
form:form,
})
},
CustomRemarkMore(){
this.setData({
CustomRemarkMoreMask:!this.data.CustomRemarkMoreMask
})
}
})
\ No newline at end of file
... ...
... ... @@ -145,7 +145,7 @@
</view>
<view class="book-info">
<view class="book-info-single flex-lr" style="align-items:flex-start;position:relative;z-index:10;">
<input placeholder="预订人电话" placeholder-class="gray-font font34r" class="black-font font34r" type="number" maxlength="11"
<input placeholder="客户电话" placeholder-class="gray-font font34r" class="black-font font34r" type="number" maxlength="11"
bindinput="selectedValue"
bindconfirm="selectedValue"
data-key="phone"
... ... @@ -161,7 +161,7 @@
</block>
</view>
<view class="book-info-single flex-lr" style="align-items:flex-start;">
<input placeholder="预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r"
<input placeholder="客户姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r"
maxlength="12" style="width:450rpx;" value="{{form.rname}}"
bindinput="selectedValue"
bindconfirm="selectedValue"
... ... @@ -183,15 +183,30 @@
</view>
<view class="book-info-single">
<input placeholder="顾客的要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}"
<input placeholder="客户的要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{form.cusdem}}"
bindinput="selectedValue"
bindconfirm="selectedValue"
bindfocus="inputFocus"
bindblur="inputFocus"
data-key="cusdem"/>
</view>
<view wx:if="{{CustomRemark.length>0}}" class="book-info-single" style="padding-top: 14rpx; height: 60rpx;">
<view class="flex-lr CustomRemark">
<view class="CustomRemarks">
<view class="CustomRemarksView">
<view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}"
wx:if="{{item.often_use}}" bindtap="oftenUse"
data-id="{{item.id}}"
data-value="{{item.often_use}}">{{item.often_use}}</view>
</view>
</view>
<view class="CustomRemarkMore flex-rr">
<view class="CustomRemarkItem" style="margin-bottom: 0" bindtap="CustomRemarkMore">更多</view>
</view>
</view>
</view>
</view>
<view class="page-full submit">
<view class="page-full submit" style="background-color: #fefefe;">
<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
</view>
</view>
... ... @@ -246,4 +261,22 @@
>{{item}}</view>
</view>
</view>
</view>
<view class="calendar-mask" bindtap="CustomRemarkMore"
style="height:100%;" wx:if="{{CustomRemarkMoreMask}}">
<view class="timePicker" catchtap="catchtap">
<view class="flex-rr">
<image class="close" src="http://qn.colorcun.com/custom/lite-yd/image/add-act.png" bindtap="CustomRemarkMore"></image>
</view>
<view class="flex-cc" style="margin-bottom: 56rpx; font-size: 30rpx;">
<view bindtap="calendarClose">更多标签</view>
</view>
<view class="flex-ll" style="flex-wrap:wrap;width: 110%; margin-left: -5%; max-height: 700rpx;overflow-y: auto;">
<view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}"
wx:if="{{item.often_use}}" bindtap="oftenUse"
data-id="{{item.id}}"
data-value="{{item.often_use}}">{{item.often_use}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -274,4 +274,44 @@
transform:rotate(45deg);
margin-top: -10rpx;
margin-right: -10%;
}
.CustomRemark{
line-height: 60rpx;
overflow: hidden;
}
.CustomRemarks{
width: 100%;
}
.CustomRemarksView{
height: 60rpx;
overflow: hidden;
}
.CustomRemarkMore{
width: 200rpx;
}
.CustomRemarkItem{
height: 48rpx;
line-height: 48rpx;
padding: 4rpx 14rpx;
background-color: #F5F5F5;
font-size: 30rpx;
color: #999999;
border-radius: 10rpx;
margin-right: 20rpx;
float: left;
margin-bottom: 40rpx;
}
.CustomRemarkItem:last-child{
margin-right: 0;
}
.CustomRemarkMore .CustomRemarkItem{
padding: 4rpx 24rpx;
}
.book-info-single:last-child{
border-width: 0;
}
.CustomRemarkItem.active{
background-color: #6AB6B9;
color: #FFFFFF;
}
\ No newline at end of file
... ...
... ... @@ -26,11 +26,11 @@
</view>
</view>
<view class="flex-lr order-detail">
<text class="gray-deep-font font30r" space="true" decode="true">预&ensp;订&ensp;人</text>
<text class="gray-deep-font font30r" space="true" decode="true">客户姓名</text>
<view class="black-font font34r">{{bookInfo.rname}} {{bookInfo.sex==1?'先生':(bookInfo.sex==2?'女士':'')}}</view>
</view>
<view class="flex-lr order-detail">
<view class="gray-deep-font font30r">手机号码</view>
<view class="gray-deep-font font30r">客户电话</view>
<view class="black-font font34r" bindtap="getcall">{{bookInfo.phoneStr||''}}</view>
</view>
<block wx:if="{{bookInfo.cusdem!='' && bookInfo.cusdem!='null'}}">
... ... @@ -79,7 +79,7 @@
<view class="notice-opt" wx:if="{{bookInfo.status==1}}">
<view class="notice-button-border font34r flex-lr">
<view>
<formids bindclick="noticeCall">通知预订人</formids>
<formids bindclick="noticeCall">通知客户</formids>
</view>
<view wx:if="{{bookInfo.order && bookInfo.order.cookbooklist.length>0}}">
<formids bindclick="showOrder">查看菜品</formids>
... ... @@ -98,7 +98,7 @@
</view>
</view>
<view class="notice-opt" wx:if="{{bookInfo.status==2}}">
<formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">顾客就餐完毕</formids>
<formids class="notice-button white-font font34r flex-cc" bindclick="startDinner" data-status="3">客户就餐完毕</formids>
</view>
<noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall>
<action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll">
... ...
... ... @@ -5,7 +5,7 @@
<view class="book-search flex-lr">
<view class="flex-ll book-search-left">
<image src="http://qn.colorcun.com/custom/lite-yd/image/search.png" class="search-icon"></image>
<input placeholder="桌位/预定人姓名/手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/>
<input placeholder="桌位/客户姓名/手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/>
</view>
<view bindtap="exportFile" class="exportFile flex-vc">
<image src="http://qn.colorcun.com/custom/lite-yd/image/export.png" class="search-icon"></image>
... ... @@ -46,7 +46,7 @@
<view class="book-list-thead flex-lr font34r black-font">
<view>桌号</view>
<view class="flex-cc">预订人</view>
<view class="flex-cc">客户姓名</view>
<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>
<view class="flex-rr">操作</view>
</view>
... ...
<!--pages/book/b_sms.wxml-->
<nav>发送短信</nav>
<view class="page">
<view class="tip">已自动生成通知短信,可修改或直接发送</view>
<view class="tip">已自动生成通知短信,可直接发送</view>
<textarea class="tpl" auto-height value="{{tplMsg}}" maxlength="-1" disabled>
</textarea>
... ...
import util from '../../../utils/util';
import App from '../../../utils/api';
Page({
data:{
alllabel:[
],
focus:true
},
onLoad:function(){
this.getlabellist();
},
onShow:function(){
},
inputremark:function(e){
this.setData({
defineremark:util.trim(e.detail.value)
})
},
taplabel:function(e){
var _target=e.currentTarget.dataset;
var mylabel=this.data.mylabel;
console.log(_target.id,_target.type);
this.setlabel(_target.id,_target.type);
},
getlabellist:function(){
App.User.GetCustomRemark({
uid:util.cache('enter_params')['manager_id']
}).then(res=>{
console.log(res)
this.setData({
alllabel:res.data
})
})
},
setlabel:function(id,flag){
App.User.GetCustomRemark({
uid:util.cache('enter_params')['manager_id'],
kid:id,
flag:flag,
}).then(res=>{
console.log(res)
this.setData({
alllabel:res.data
})
})
},
addinputlabel:function(e){
this.setData({
focus:false
})
if(util.trim(e.detail.value)!=''){
this.addlabel(util.trim(e.detail.value))
}
},
//添加自定义标签
addlabel:function(custom){
App.User.AddCustomRemark({
uid:util.cache('enter_params')['manager_id'],
custom:custom,
}).then(res=>{
console.log(res)
if(res.ret==200){
this.setData({
defineremark:'',
})
this.getlabellist();
}
this.setData({
focus:true
})
})
},
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"white",
"usingComponents": {
"nav":"/components/nav/nav",
"tabBar":"/components/book/tabBar/tabBar",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<nav id="nav">常用备注</nav>
<view class="cut"></view>
<view class="label">
<view class="label-title black-font font30r smooth" style="padding-bottom:40rpx;">我的常用备注</view>
<view class="label-list flex-rs me-label-list">
<block wx:for="{{alllabel}}">
<block wx:if="{{item.often_use!=''}}">
<view class="label-single-all flex-ll bg_green" data-id="{{item.id}}" data-type="often" bindtap="taplabel">
<view class="white-font label-single flex-cc font28r smooth">{{item.custom}}</view>
<view style="height:40rpx;border-left:1px solid rgba(255,255,255,.3);padding:0 8rpx;" class="flex-cc"><image src="../../image/close.svg" class="close"></image></view>
</view>
</block>
</block>
<input class="black-font flex-cc font28r smooth label-input flex-cc" placeholder="添加备注" placeholder-class="smooth flex-cc" maxlength="10" style="width:{{defineremark.length>4 ? (defineremark.length-4)*28+160 : 160}}rpx;" value="{{defineremark}}" bindinput="inputremark" focus="{{focus}}" cursor-spacing="160" bindblur="addinputlabel" placeholder-style="color:#999;font-size:28rpx;"/>
</view>
<view class="label-title black-font font30r smooth">所有备注</view>
<view class="label-list flex-rs">
<block wx:for="{{alllabel}}">
<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>
</block>
</view>
</view>
\ No newline at end of file
... ...
.label{
width:100%;
padding:0 30rpx;
box-sizing: border-box;
}
.label-title{
width:100%;
padding:30rpx 0;
}
.me-label-list{
padding-bottom: 10rpx;
border-bottom:1px solid #eee;
margin-bottom:40rpx;
}
.label-single-all{
height:56rpx;
margin:0 16rpx 20rpx 0;
border-radius:8rpx;
overflow:hidden;
}
.label-single{
height:56rpx;
padding:0 24rpx;
border-radius:8rpx;
}
.label-input{
width:160rpx;
height:56rpx;
box-sizing: border-box;
border:1px solid #ccc;
max-width:400rpx;
min-width:140rpx;
margin:0 16rpx 20rpx 0;
border-radius:8rpx;
text-align:center;
padding:0 10rpx;
}
.all-label{
box-sizing: border-box;
border:1px solid rgba(25,144,149,.3);
}
.close{
width:18rpx;
height:18rpx;
}
\ No newline at end of file
... ...
... ... @@ -32,6 +32,14 @@
</view>
</view>
</formids>
<formids url="/pages/book/remark/index">
<view class="row flex-lr" style="padding-top: 34rpx;">
<view>常用备注</view>
<view class="flex-rr">
<view class="more"></view>
</view>
</view>
</formids>
<formids url="/pages/customer/index?islove=customer">
<view class="row flex-lr" style="padding-top: 34rpx;">
<view>切换到顾客模式</view>
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1550046540077" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M510.37 584.01L189.495 906.512c-19.945 20.045-52.362 20.126-72.407 0.182-20.045-19.944-20.126-52.362-0.182-72.408l322.281-323.914-322.098-320.478c-20.045-19.944-20.127-52.362-0.184-72.407 19.944-20.045 52.362-20.128 72.407-0.183L513.629 439.99l320.877-322.504c19.945-20.045 52.362-20.126 72.407-0.182 20.045 19.944 20.126 52.362 0.182 72.408L584.814 513.627l322.098 320.478c20.045 19.944 20.127 52.362 0.184 72.407-19.944 20.045-52.362 20.128-72.407 0.183L510.371 584.01z" fill="#ffffff" p-id="2884"></path></svg>
\ No newline at end of file
... ...
... ... @@ -151,6 +151,12 @@ export default {
/**crm**/
'App.Reserve.Members':null,
//常用备注
'App.User.GetCustomRemark':null,
//添加备注
'App.User.AddCustomRemark':null
//顾客端配置信息、菜系
'App.Reserve.GetCustomerConfig':{
cachetime: 1800,
... ...
... ... @@ -171,7 +171,8 @@ module.exports ={
if (flag) {
break;
}
if (isDay) {
let nownd=util.unixtoTime(new Date()/1000,'HH:II')
if (isDay && nownd>times[i][times[i].length-1]) {
obj.timeOpt[i] = 'disabled';
}
}
... ...
//正式
var uri={
HOST__LINE:'https://xt05.colorcun.com/?s=',
HOST__LINE:'https://xt04.colorcun.com/?s=',
//获取商家信息
CGI__USER_GETSELLERBYID: 'App.Seller.GetSellerById',
... ...