Commit 999a2a6f953a023869b2a4433ffcf55f8b274ae0

Authored by liuxuqinfhp1220
1 parent 902a975a

包间类型、时段、日历、周历、联系人列表、新增、删除、修改联系人

... ... @@ -11,6 +11,7 @@
"pages/customer/remind",
"pages/reserve/index",
"pages/me/index",
"pages/me/concat",
"pages/me/setting",
"pages/me/list",
"pages/reserve/search",
... ...
import util from '../../../utils/util';
import App from '../../../utils/api';
Component({
properties:{
seller:Object,
//选中日期
date:{
type:String,
value:util.unixtoTime(new Date()/1000,'YYYY-MM-DD'),
},
hidecalendar:{
type:Boolean,
value:true
marklist:{
type:Array,
value:[]
}
},
data: {
showprev:false
},
observers: {
'seller,date': function(seller,newdate) {
if(seller && newdate!=''){
let showYearMonth=this.getshowmonth();
'date': function(newdate,newmarklist) {
let showYearMonth=this.getshowmonth();
let obj={
...showYearMonth,
action:'defalut'
}
if(newdate!=''){
if(this.data.showYearMonth){ //周历点击
if(showYearMonth.showyear==this.data.showYearMonth.showyear && showYearMonth.showmonth==this.data.showYearMonth.showmonth){
this.changedatestyle(newdate);
... ... @@ -29,20 +30,27 @@ Component({
showprev:this.isShowPrev(showYearMonth)
})
this.getdayslist(showYearMonth.showyear,showYearMonth.showmonth);
// this.gethousefulldate(seller);
this.triggerEvent('tellmonth',obj);
}
}else{
//初始化---默认
console.log('默认')
this.setData({
showYearMonth:showYearMonth,
showprev:this.isShowPrev(showYearMonth)
})
this.getdayslist(showYearMonth.showyear,showYearMonth.showmonth);
// this.gethousefulldate(seller);
this.triggerEvent('tellmonth',obj);
}
}
},
'marklist'(newmarklist){
if(this.data.daylist){
this.markdaylist(newmarklist)
}
}
},
attached(){
... ... @@ -83,7 +91,7 @@ Component({
},
//获取某一天是星期几
getdayweek:function(year,month,day){
var tmpdate=new Date(year,month,day);
var tmpdate=new Date(year,month-1,day);
return tmpdate.getDay()
},
//获取当月日期
... ... @@ -189,12 +197,16 @@ Component({
showyear:showyear,
showmonth:showmonth
}
let obj={
...showYearMonth,
action:'click'
}
this.setData({
showYearMonth:showYearMonth,
showprev:this.isShowPrev(showYearMonth)
})
this.getdayslist(showYearMonth.showyear,showYearMonth.showmonth);
this.gethousefulldate(this.data.seller);
this.triggerEvent('tellmonth',obj);
},
//推前月份
nextmonth(){
... ... @@ -215,33 +227,21 @@ Component({
showprev:this.isShowPrev(showYearMonth)
})
this.getdayslist(showYearMonth.showyear,showYearMonth.showmonth);
this.gethousefulldate(this.data.seller);
},
//根据指定年份月份获取当月满房的日期
gethousefulldate(seller){
let showYearMonth=this.data.showYearMonth;
let parmdata={
sid:seller.id,
type:'month',
date:showYearMonth.showyear+'-'+(showYearMonth.showmonth<10 ? '0'+showYearMonth.showmonth : showYearMonth.showmonth)
let obj={
...showYearMonth,
action:'click'
}
App.Customer.GetHouseFullDate(parmdata).then((json)=>{
console.log(json)
if(json.ret==200){
if(json.data && json.data.length>0){
this.markFullHouse(json.data);
}
}
})
this.triggerEvent('tellmonth',obj);
},
//标记满房
markFullHouse(fullHouseDate){
markdaylist(marklist){
console.log('xxxxxx')
let daylist=this.data.daylist;
daylist.forEach((v,i)=>{
v.list.forEach((r,n)=>{
fullHouseDate.forEach((r1,n1)=>{
if(r1==r.date){
r.mark='满'
marklist.forEach((r1,n1)=>{
if(r.date && r1.date==r.date){
r.mark=r1.mark
}
})
})
... ...
<view class="calendar" hidden="{{hidecalendar}}">
<view class="calendar">
<view class="calendar-title flex-lr">
<view class="black-font font30r Semibold calendar-title-date">{{showYearMonth.showyear}}-{{showYearMonth.showmonth<10 ? '0'+showYearMonth.showmonth : showYearMonth.showmonth}}</view>
<view class="calendar-title-tab-list flex-rr">
... ...
@import "../../../app.wxss";
.calendar{
width:100%;
background: #FFFBF2;
border-top-left-radius:20rpx;
border-top-right-radius:20rpx;
overflow: hidden;
padding:30rpx 0;
}
.calendar-title{
... ...
import util from '../../../utils/util';
import App from '../../../utils/api';
Component({
properties:{
seller:Object,
date:{
type:String,
value:util.unixtoTime(new Date()/1000,'YYYY-MM-DD'),
},
},
data:{
marklist:[]
},
attached(){
},
observers:{
'seller'(newseller){
if(newseller){
this.showYearMonth=this.getshowmonth();
console.log(newseller,this.showYearMonth);
this.gethousefulldate(newseller,this.showYearMonth)
}
}
},
methods:{
//获取当前选中日期
getshowmonth(){
let datearr=this.data.date.split('-');
return{
showyear:Number(datearr[0]),
showmonth:Number(datearr[1]),
}
},
//切换月份
getmonth(e){
console.log('tellmonth',e)
this.showYearMonth=e.detail;
if(e.detail.action='click'){
this.gethousefulldate(this.data.seller,this.showYearMonth)
}
},
//根据指定年份月份获取当月满房的日期
gethousefulldate(seller,showYearMonth){
let parmdata={
sid:seller.id,
type:'month',
date:showYearMonth.showyear+'-'+(showYearMonth.showmonth<10 ? '0'+showYearMonth.showmonth : showYearMonth.showmonth)
}
App.Customer.GetHouseFullDate(parmdata).then((json)=>{
console.log(json)
if(json.ret==200){
if(json.data && json.data.length>0){
let marklist=[];
json.data.forEach((v,i)=>{
marklist.push({
date:v,
mark:'满'
})
})
marklist=[{
date:'2019-08-20',
mark:'满'
}]
this.setData({
marklist:marklist
})
}
}
})
},
tellselectdate(e){
this.triggerEvent('tellselectdate',e.detail);
}
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"calendar":"../calendar/calendar"
}
}
\ No newline at end of file
... ...
<calendar date="{{date}}" marklist="{{marklist}}" bind:tellselectdate="tellselectdate" bind:tellmonth="getmonth"></calendar>
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@ Component({
count:{
type:Number,
value:6
}
},
},
data:{
current:0
... ...
import App from '../../../utils/api';
import util from '../../../utils/util';
Component({
properties:{
seller:Object,
date:{
type:String,
value:util.unixtoTime(new Date()/1000,'YYYY-MM-DD')
},
section:String,
seletroom:{
type:Array,
value:[]
}
},
data:{
roomlist:[
{
id:1,
name:'6人间',
mostpnum:8,
lastmoney:3000,
isfull:0,
selectnum:2,
},
{
id:2,
name:'8人间',
mostpnum:8,
lastmoney:3000,
isfull:1,
selectnum:0,
},
{
id:3,
name:'10人间',
mostpnum:8,
lastmoney:3000,
isfull:0,
selectnum:0,
},
{
id:4,
name:'16人间',
mostpnum:8,
lastmoney:3000,
isfull:0,
selectnum:0,
}
]
},
methods:{
getroomtype(){
},
selectroom(e){
let _target=e.currentTarget.dataset;
console.log(typeof _target.selectnum)
let setkey='roomlist['+_target.index+'].selectnum';
this.setData({
[setkey]:_target.selectnum+1
})
this.triggerEvent('selectroom',this.data.roomlist[_target.index])
},
cancelroom(id){
let roomlist=this.data.roomlist;
roomlist.forEach((v,i)=>{
if(v.id==id){
let setkey='roomlist['+i+'].selectnum';
this.setData({
[setkey]:v.selectnum-1,
})
}
})
},
}
})
\ No newline at end of file
... ...
<view class="room-list flex-rs">
<block wx:for="{{roomlist}}" wx:key="{{index}}">
<view class="room-item black-font {{item.isfull==1 ? 'border-gray bg-gray' : 'border-yellow bg-yellow'}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum}}" catchtap="{{item.isfull==1 ? '' : 'selectroom'}}">
<view class="font30r font-bold">{{item.name}}</view>
<view class="font24r font-bold room-more">最多可坐8人</view>
<view class="font20r font-bold room-consume">最低消费300元</view>
<block wx:if="{{item.isfull==1}}">
<view class="room-full black-font font24r">订满</view>
</block>
<block wx:if="{{item.selectnum>0}}">
<view class="room-select white-font font24r flex-cc">已选{{item.selectnum}}</view>
</block>
</view>
</block>
</view>
\ No newline at end of file
... ...
@import "../../../app.wxss";
.room-list{
width:100%;
padding-left:30rpx;
box-sizing: border-box;
}
.room-item{
width:330rpx;
height:140rpx;
padding:0 30rpx;
box-sizing: border-box;
border-radius:10rpx;
margin-bottom: 20rpx;
margin-right: 30rpx;
position: relative;
overflow: hidden;
}
.border-yellow{
border:2rpx solid #C3A56C;
}
.bg-yellow{
background: #FFF5EB;
}
.border-gray{
border:2rpx solid #E0E0E0;
}
.bg-gray{
background: #F5F5F5;
}
.room-more{
margin-top: 10rpx;
}
.room-consume{
margin-top:6rpx;
color:#C3A66B;
}
.room-full{
width:148rpx;
height:148rpx;
border-radius:50%;
position: absolute;
right:-74rpx;
bottom:-74rpx;
background: #E0E0E0;
padding:34rpx 20rpx;
box-sizing: border-box;
}
.room-select{
min-width:92rpx;
height:40rpx;
position: absolute;
right:0;
top:0;
background: #C6A96E;
border-bottom-left-radius: 10rpx;
padding:0 4rpx;
box-sizing: border-box;
}
... ...
... ... @@ -8,12 +8,33 @@ Component({
value:util.unixtoTime(new Date()/1000,'YYYY-MM-DD')
},
section:String,
seletroom:{
type:Array,
value:[]
}
},
data:{
seletroomlist:[]
},
attached(){
this.room=this.selectComponent('#room');
console.log('xxxxx',this.data.seller);
},
methods:{
selectroom(e){
console.log(e)
let _target=e.detail;
let seletroomlist=this.data.seletroomlist;
seletroomlist.push(_target);
this.setData({
seletroomlist:this.data.seletroomlist
})
this.triggerEvent('changeroom',{selectroom:this.data.seletroomlist})
},
cancelroom(e){
let _target=e.currentTarget.dataset;
this.data.seletroomlist.splice(_target.index,1);
this.setData({
seletroomlist:this.data.seletroomlist
})
this.room.cancelroom(_target.id);
this.triggerEvent('changeroom',{selectroom:this.data.seletroomlist});
}
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {}
"usingComponents": {
"room":"../room/room"
}
}
\ No newline at end of file
... ...
<view>ddddddddd</view>
\ No newline at end of file
<view class="select-rooms flex-rs">
<view class="select-rooms-title black-font font-bold font30r">已选包间</view>
<block wx:for="{{seletroomlist}}" wx:key="{{index}}">
<view class="select-rooms-item flex-vc" data-index="{{index}}" data-id="{{item.id}}" catchtap="cancelroom">
<view class="white-font font-bold font30r">{{item.name}}</view>
<view class="select-rooms-close flex-cc">
<image src="../../../pages/image/close.jpg" class="close-icon"></image>
</view>
</view>
</block>
</view>
<room bindselectroom="selectroom" id="room"></room>
\ No newline at end of file
... ...
@import "../../../app.wxss";
.select-rooms{
width:100%;
padding:70rpx 0 0 30rpx;
box-sizing: border-box;
}
.select-rooms-title{
margin-right:30rpx;
height:70rpx;
margin-bottom:20rpx;
}
.select-rooms-item{
width:150rpx;
height:70rpx;
margin-right:30rpx;
background: -webkit-linear-gradient(top, #F2D190, #C0A369); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(-45deg, #F2D190, #C0A369); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(top, #F2D190, #C0A369); /* Firefox 3.6 - 15 */
background: linear-gradient(to bottom, #F2D190, #C0A369);
border-radius:10rpx;
position: relative;
margin-bottom:20rpx;
}
.select-rooms-close{
width:36rpx;
height:36rpx;
background: #C1C0C0;
border-radius:50%;
position: absolute;
right:-18rpx;
top:-18rpx;
}
.close-icon{
width:14rpx;
height:14rpx;
}
\ No newline at end of file
... ...
... ... @@ -52,7 +52,7 @@ Component({
//选中时间时间戳
let selectedtime=Number(util.timetouUnix(this.data.date,'-'));
//选中日期星期几
let selectedweek=new Date(selectedtime*1000).getDay();
let selectedweek=new Date(this.data.date).getDay();
//今天日期
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
console.log('selectedweek',selectedweek)
... ...
{
"component": true,
"usingComponents": {
"calendar":"../calendar/calendar"
"online-calendar":"../online-calendar/online-calendar"
}
}
\ No newline at end of file
... ...
... ... @@ -23,4 +23,6 @@
</view>
<view class="calendar-mask" hidden="{{hidecalendar}}" catchtap="closecalendar"></view>
<calendar seller="{{seller}}" date="{{date}}" hidecalendar="{{hidecalendar}}" bind:tellselectdate="tellselectdate"></calendar>
\ No newline at end of file
<view class="calendar-cover" hidden="{{hidecalendar}}">
<online-calendar seller="{{seller}}" date="{{date}}" hidecalendar="{{hidecalendar}}" bindtellselectdate="tellselectdate"></online-calendar>
</view>
\ No newline at end of file
... ...
... ... @@ -51,4 +51,15 @@
bottom:0;
z-index:10;
background:rgba(21,20,20,.5);
}
.calendar-cover{
position: fixed;
left:0;
right:0;
bottom:0;
background: #FFFBF2;
border-top-left-radius:20rpx;
border-top-right-radius:20rpx;
overflow: hidden;
z-index:11;
}
\ No newline at end of file
... ...
import util from '../../utils/util';
import App from '../../utils/api';
Page({
data:{
},
onLoad(opt){
console.log(opt)
this.action=opt.action ? opt.action : null
},
onShow(){
this.getlist();
},
getlist(){
App.Customer.GetCustomerInfo().then((json)=>{
console.log(json)
if(json.ret==200){
this.setData({
concatlist:json.data
})
}
})
},
edit(e){
console.log(e)
let index=e.currentTarget.dataset.index;
if(this.action){
let pages = getCurrentPages();
pages[pages.length-2].setData({
user:this.data.concatlist[index]
})
wx.navigateBack()
}else{
let path='setting';
let i=0;
for(let key in this.data.concatlist[index]){
if(i==0){
path+='?'
}else{
path+='&'
}
i++;
path+=key+'='+this.data.concatlist[index][key]
}
wx.navigateTo({
url:path
})
}
},
add(){
wx.navigateTo({
url:'setting'
})
}
})
\ No newline at end of file
... ...
{
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
}
}
\ No newline at end of file
... ...
<nav hasHome>常用联系人</nav>
<view class="concat-list">
<block wx:for="{{concatlist}}" wx:key="{{index}}">
<view class="flex-lr item font30r black-font" data-index="{{index}}" catchtap="edit">
<view class="font-bold">{{item.name}}</view>
<view>{{item.phone}}</view>
</view>
</block>
</view>
<view class="white-font font32r add-button flex-cc" catchtap="add">新建联系人</view>
\ No newline at end of file
... ...
.concat-list{
width:100%;
padding:0 40rpx;
box-sizing: border-box;
}
.item{
width:100%;
height:140rpx;
border-bottom: 2rpx solid #F1F0F4;
box-sizing: border-box;
}
.add-button{
width:680rpx;
height:80rpx;
position: fixed;
left:0;
right:0;
bottom:80rpx;
margin:0 auto;
background: #242320;
}
\ No newline at end of file
... ...
... ... @@ -23,14 +23,22 @@
</view>
</view>
</formids>
<formids url="/pages/me/setting">
<!-- <formids url="/pages/me/setting">
<view class="item flex-lr">
<view class="left">常用信息</view>
<view class="right">
<image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
</view>
</view>
</formids>
</formids> -->
<formids url="/pages/me/concat">
<view class="item flex-lr">
<view class="left">常用联系人</view>
<view class="right">
<image src="http://qn.colorcun.com/custom/lite-yd/image/click.png"></image>
</view>
</view>
</formids>
<formids bindclick="gotoSellerBook" wx:if="{{hasSellerBook}}">
<view class="item flex-lr">
<view class="left">切换到商户模式</view>
... ...
... ... @@ -7,7 +7,8 @@ const _u = {
name: '',
sex: 1,
phone: '',
remark: '',
is_default:0,
remark:''
}
Page({
... ... @@ -22,14 +23,13 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
App.Customer.GetCustomerInfo().then(res=>{
if(res.data){
this.user = res.data
this.setData({
user: res.data,
})
}
})
console.log(options)
if(options && options.id){
this.setData({
user:options
})
}
this.user=this.data.user;
},
/**
... ... @@ -61,6 +61,7 @@ Page({
},
saved() {
console.log(this.user.name)
if(!this.user.name){
return util.toast('请填写预定人','none')
}
... ... @@ -72,18 +73,37 @@ Page({
})
},
changeInput(e) {
console.log(e)
let key = util.attr(e, 'key');
let val = ''
if (key == 'sex') {
if (key == 'sex' || key == 'is_default') {
val = util.attr(e, 'val');
console.log(val)
} else {
val = util.val(e);
}
this.user[key] = val;
if (key == 'sex') {
if (key == 'sex' || key == 'is_default') {
this.setData({
user: this.user
})
}
},
getphone(e){
console.log('getphone',e);
if(e.detail.ret!=200){
return util.toast('获取失败,请重新获取','none');
}
this.user.phone=e.detail.phone
this.setData({
user: this.user
})
},
deletuser(){
App.Customer.DelCustomerInfo({phone:this.user.phone}).then((json)=>{
App.Customer.GetCustomerInfo({},'clear')
wx.navigateBack()
console.log(json)
})
}
})
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@
"navigationBarTitleText":"我的",
"usingComponents": {
"nav":"/components/nav/nav",
"formids":"/components/formids/formids"
"formids":"/components/formids/formids",
"phone":"/components/userinfo/getphone"
}
}
\ No newline at end of file
... ...
<!--pages/me/setting.wxml-->
<nav hasHome>常用信息</nav>
<view class="page">
<view class="tip">在这里维护你的常用预订信息</view>
<!-- <view class="tip">在这里维护你的常用预订信息</view> -->
<view class="card">
<view class="item flex-lr">
<view class="item-label">预 订 人</view>
<view class="Medium flex-rr">
<input class="name input" placeholder="请输入姓名"
<view class="Medium flex-ll">
<view class="item-label">姓名</view>
<input class="name input" placeholder="请填写用餐人姓名"
bindinput="changeInput"
data-key="name"
value="{{user.name}}"
placeholder-class="input-pl" maxlength="10"/>
<view class="flex-rr switch">
<view
bindtap="changeInput"
data-key="sex"
data-val="1"
class="switch-item {{user.sex==1?'checked':''}}">先生</view>
<view
bindtap="changeInput"
data-key="sex"
data-val="2"
class="switch-item {{user.sex==2?'checked':''}}">女士</view>
<view
bindtap="changeInput"
data-key="sex"
data-val="3"
class="switch-item {{user.sex==3?'checked':''}}">公司</view>
</view>
</view>
<view class="flex-rr switch">
<view
bindtap="changeInput"
data-key="sex"
data-val="1"
class="switch-item {{user.sex==1?'checked':''}}">先生</view>
<view
bindtap="changeInput"
data-key="sex"
data-val="2"
class="switch-item {{user.sex==2?'checked':''}}">女士</view>
<view
bindtap="changeInput"
data-key="sex"
data-val="3"
class="switch-item {{user.sex==3?'checked':''}}">公司</view>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">手机号码</view>
<view class="Medium">
<input class="phone input" placeholder="请输入手机号码"
<view class="Medium flex-ll">
<view class="item-label">手机</view>
<input class="phone input" placeholder="请填写联系方式"
bindinput="changeInput"
data-key="phone"
type="number"
value="{{user.phone}}"
placeholder-class="input-pl" maxlength="20"/>
</view>
<view class="flex-rr">
<!-- 一键获取 -->
<phone bindgetphone="getphone">
<view class="smooth white-font get-phone flex-vc" style="font-size:28rpx;">一键获取</view>
</phone>
</view>
</view>
<view class="item flex-lr">
<view class="flex-vl userinfo-setting">
<view class="flex-lr" style="margin-bottom:30rpx;">
<view class="font30r font-bold">设置默认联系人</view>
<switch color="#C0A369" checked="{{user.is_default==1 ? true : false}}"
data-key="is_default" data-val="{{user.is_default==1 ? 0 : 1}}" bindchange="changeInput"/>
</view>
<view class="gray-font font28r" style="line-height:1.5;">提醒:每次下单时商家会记录默认联系人作为订单联系 人,在预订过程中,如有需要,商家将联系订单联系人</view>
</view>
<block wx:if="{{user.id}}">
<view class="item flex-lr">
<view class="font30r font-bold">删除联系人</view>
<switch color="#C0A369" bindchange="deletuser"/>
</view>
</block>
<!-- <view class="item flex-lr">
<view class="item-label">备注信息</view>
<view class="Medium">
<input class="cusdem input" placeholder="请填写预订需求"
... ... @@ -50,9 +70,11 @@
value="{{user.remark}}"
placeholder-class="input-pl" maxlength="20"/>
</view>
</view>
</view> -->
</view>
<formids bindclick="saved">
<view class="share-but">保存</view>
</formids>
<view class="save-button">
<formids bindclick="saved">
<view class="share-but">保存</view>
</formids>
</view>
</view>
... ...
/* pages/me/setting.wxss */
.page{
width: 90%;
margin: 0 5%;
width: 100%;
color:#353535;
}
.tip{
... ... @@ -10,18 +9,20 @@
margin-bottom: 38rpx;
}
.card{
box-shadow: 2rpx 2rpx 14rpx 6rpx RGBA(231, 228, 228, 0.5);
font-size: 30rpx;
padding: 0 40rpx;
border-radius: 10rpx;
width:100%;
padding:0 30rpx;
box-sizing: border-box;
}
.item{
height: 124rpx;
line-height: 124rpx;
border-bottom: 2rpx solid #F5F5F5;
padding-top: 20rpx;
}
.item-label{
width: 120rpx;
min-width: 120rpx;
font-weight:bold;
}
.item view:last-child{
font-size: 34rpx;
... ... @@ -30,30 +31,54 @@
width: 252rpx;
height: 50rpx;
line-height: 50rpx;
border: 2rpx solid #262628;
border: 2rpx solid #C0A369;
margin-left: 16rpx;
font-size: 28rpx;
border-right:0;
}
input.input{
text-align: right !important;
width: 100%;
}
.input-pl{
font-size: 28rpx;
color:#999;
}
.switch .switch-item{
width: 84rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
color: #C0A369;
border-right: 2rpx solid #C0A369;
}
.switch .checked{
background-color:#262628;
color: #FEFEFE;
background-color:#C0A369;
color: #FEFEFE;
}
.save-button{
width:680rpx;
height:80rpx;
position: fixed;
left:0;
right:0;
bottom:80rpx;
margin:0 auto;
}
.share-but{
color:#FEFEFE;
background: #262628;
width: 100%;
width: 680rpx;
line-height: 80rpx;
font-size: 34rpx;
text-align: center;
margin-top: 300rpx;
}
.get-phone{
width:160rpx;
height:50rpx;
line-height: 50rpx;
background: #C0A369;
}
.userinfo-setting{
padding: 60rpx 0 30rpx 0;
border-bottom: 2rpx solid #F5F5F5;
}
\ No newline at end of file
... ...
... ... @@ -276,12 +276,29 @@ Page({
//时段改变
selectsection(e){
console.log(e);
this.setData({
reserveSection:e.detail.section
})
let t=setTimeout(()=>{
this.setData({
reserveSection:e.detail.section,
})
clearTimeout(t);
},0)
this.reserve.section=e.detail.section;
this.reserve.time=e.detail.time;
},
//包间类型改变
selectroom(e){
console.log(e)
this.reserve.selectroom=e.detail.selectroom;
},
complete(){
this.reserve.sid=this.options.id
this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00');
this.reserve.selectroom=JSON.stringify(this.reserve.selectroom);
wx.navigateTo({
url:util.http_build_query(this.reserve,'./submit')
})
},
selecttime(e){//时间改变
console.log(e);
if(!e.detail.time){//满房
... ... @@ -316,6 +333,7 @@ Page({
reserveDate:e.detail.date,
hasFullHouse:false,
fullHouseMsg:'今日所有包间已订满',
reserveSection:e.detail.section
})
}
})
\ No newline at end of file
... ...
... ... @@ -213,9 +213,9 @@
<view class="olreserve bg_white">
<calendar seller="{{seller}}" bindselectdate="selectdate"></calendar>
<view class="reserve-time Semibold">预订时段</view>
<section seller="{{seller}}" date="{{reserveDate}}" bindselectsection="selectsection"></section>
<select-room seller="{{seller}}" date="{{reserveDate}}" section="{{reserveSection}}"></select-room>
<view class="hasFullHouse Semibold flex-vc" wx:if="{{hasFullHouse}}">{{fullHouseMsg}}</view>
<section seller="{{seller}}" date="{{reserveDate}}" bind:selectsection="selectsection"></section>
<select-room seller="{{seller}}" date="{{reserveDate}}" section="{{reserveSection}}" bindchangeroom="selectroom"></select-room>
</view>
<view class="white-font font32r reserve-button flex-cc" catchtap="complete">选好了</view>
</view>
</layout>
\ No newline at end of file
... ...
... ... @@ -532,3 +532,13 @@
background-position: center center;
background-image: url("https://qn.colorcun.com/reserve/images/sphone.png");
}
.reserve-button{
width:680rpx;
height:80rpx;
position: fixed;
left:0;
right:0;
bottom:80rpx;
margin:0 auto;
background: #242320;
}
... ...
... ... @@ -23,14 +23,20 @@ Page({
*/
options:null,
onLoad: function (options) {
console.log(options)
this.options=options
this.GetSellerDetail();
App.Customer.GetCustomerInfo().then(res=>{
if(res.data){
this.user = res.data
this.setData({
user: res.data,
})
if(res.data.length>0){
res.data.forEach((v,i)=>{
if(v.is_default==1){
this.user = v
this.setData({
user: v,
})
return;
}
})
}
})
},
... ... @@ -93,6 +99,11 @@ Page({
}
})
},
selectconcat(){
wx.navigateTo({
url:'/pages/me/concat?action=select'
})
},
changeInput(e) {
let key = util.attr(e, 'key');
let val = ''
... ...
<!--pages/reserve/submit.wxml-->
<layout>
<nav hasBack>预订详情</nav>
<view class="pages">
<view class="pages bg_white">
<card hasShowStatus hasAddress="{{false}}" bindevent="cardEvent"
hasOnlineReserve
seller="{{seller}}" detail="{{detail}}">
... ... @@ -14,6 +14,15 @@
</view>
</card>
<view class="userinfo">
<view class="userinfo-title flex-lr" catchtap="selectconcat">
<view class="flex-ll">
<image src="../image/concat.jpg" class="concat-icon"></image>
<view class="black-font font36r" style="font-size:36rpx;">选择联系人</view>
</view>
<view class="click-cover">
<image src="../image/click-icon.png"></image>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">姓名</view>
<view class="Medium flex-rr">
... ... @@ -58,17 +67,17 @@
</view>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">备注</view>
<view class="Medium">
<input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)"
bindinput="changeInput"
data-key="remark"
value="{{user.remark}}"
placeholder-class="input-pl" maxlength="20"/>
</view>
</view>
</view>
<view class="item flex-lr">
<view class="item-label">备注</view>
<view class="Medium">
<input class="cusdem input" placeholder="您的特殊要求,我们会尽量安排(20字)"
bindinput="changeInput"
data-key="remark"
value="{{user.remark}}"
placeholder-class="input-pl" maxlength="25"/>
</view>
</view>
<formids bindclick="saved">
<view class="share-but">提交预订</view>
</formids>
... ...
... ... @@ -20,7 +20,25 @@
}
.userinfo{
width:690rpx;
font-size: 30rpx;
border-radius:10rpx;
box-shadow: 0 0 16rpx rgba(157,156,156,.5);
margin:20rpx auto 0;
padding:0 30rpx;
box-sizing: border-box;
}
.concat-icon{
width:56rpx;
height:58rpx;
margin:0 20rpx 0 10rpx;
}
.userinfo-title{
width:100%;
height:116rpx;
padding:34rpx 0 26rpx 0;
border-bottom: 2rpx solid #F5F5F5;
box-sizing: border-box;
}
.item{
height: 124rpx;
... ... @@ -28,6 +46,13 @@
border-bottom: 2rpx solid #F5F5F5;
padding-top: 20rpx;
}
.click-cover{
padding:20rpx;
}
.click-cover image{
width:14rpx;
height:26rpx;
}
.item-label{
width: 100rpx;
min-width: 100rpx;
... ... @@ -76,6 +101,7 @@
}
.input-pl{
font-size: 28rpx;
color:#999;
}
.get-phone{
width:160rpx;
... ...
... ... @@ -49,7 +49,7 @@
"list": []
},
"miniprogram": {
"current": 56,
"current": 55,
"list": [
{
"id": 0,
... ... @@ -471,7 +471,7 @@
"id": 56,
"name": "测试组件",
"pathName": "pages/reserve/detail",
"query": "id=154&activeTab=reserve",
"query": "id=154",
"scene": null
},
{
... ...
... ... @@ -298,5 +298,11 @@ export default {
'App.Customer.GetHouseFullDate':null,
//获取微信用户绑定的手机号
'App.Customer.GetCustomerTel':null
'App.Customer.GetCustomerTel':null,
//根据openid及联系电话删除对应的数据 将其状态改为0
'App.Customer.DelCustomerInfo':{
openid:'openid'
}
}
\ No newline at end of file
... ...