Commit dc3c309f by 张立顺

Merge branch 'dev_V4.20.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into dev_V4.20.0
2 parents ee645fee 2fad3eba
...@@ -77,7 +77,7 @@ Component({ ...@@ -77,7 +77,7 @@ Component({
swiperHeight: 0, swiperHeight: 0,
backChange: false, //跳过change切换 backChange: false, //跳过change切换
disabledDateList: {}, //禁用的日期集合 disabledDateList: {}, //禁用的日期集合
isShow: true,
scheduList: {}, scheduList: {},
classNameList: { classNameList: {
5: "blue", // 待到店, 5: "blue", // 待到店,
...@@ -573,12 +573,20 @@ Component({ ...@@ -573,12 +573,20 @@ Component({
this.setData({ this.setData({
currentSelect: full, currentSelect: full,
selectDay: o, selectDay: o,
showCurrentMonth: `${o.year}年${o.month}月` showCurrentMonth: `${o.year}年${o.month}月${o.day}日`,
isShow: false
}) })
// this.triggerEvent('change', list) // this.triggerEvent('change', list)
this.triggerEventSelectDay(); this.triggerEventSelectDay();
}, },
// 收起/展开
handleUpOrDown() {
this.setData({
isShow: !this.data.isShow
})
},
// 打开日期选择 // 打开日期选择
openPicker() { openPicker() {
this.setData({ this.setData({
...@@ -611,7 +619,7 @@ Component({ ...@@ -611,7 +619,7 @@ Component({
this.setData({ this.setData({
showPopup: false, showPopup: false,
currentMonth: e.detail, currentMonth: e.detail,
showCurrentMonth: new Date(e.detail).format('yyyy年MM月'), showCurrentMonth: new Date(e.detail).format('yyyy年MM月dd日'),
currentSelect: `${y}-${m}-${d}`, currentSelect: `${y}-${m}-${d}`,
selectDay: _day selectDay: _day
}) })
...@@ -707,7 +715,7 @@ Component({ ...@@ -707,7 +715,7 @@ Component({
}, },
currentSelect: today, currentSelect: today,
today: today, today: today,
showCurrentMonth: new Date(`${year}/${month}/${day}`).format('yyyy年MM月') showCurrentMonth: new Date(`${year}/${month}/${day}`).format('yyyy年MM月dd日')
}); });
// let user = getStorageSync('user'); // let user = getStorageSync('user');
......
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
<view class="header"> <view class="header">
<view class="title"> <view class="title">
<view class="header-wrap"> <view class="header-wrap">
<view class="flex"> <!-- <view class="flex"> -->
<view class="month"> <view class="month" bindtap="openPicker">
{{showCurrentMonth}} {{showCurrentMonth}}
<image src="../../images/icon-arrow.png"></image> <image class="img" src="../../images/icon-arrow.png"></image>
</view> </view>
</view> <!-- </view> -->
<view class="today" bindtap="openPicker">切换 <view class="today" bindtap="handleUpOrDown">
{{isShow ? "收起" : "展开"}}
<image class="img" src="../../images/{{isShow ? 'down' : 'up'}}.png"></image>
<!-- <image src="../../images/calendar.png" mode="widthFix" class="img" /> --> <!-- <image src="../../images/calendar.png" mode="widthFix" class="img" /> -->
<!-- <glsx-image src="calendar.png" mode="widthFix" custom-class="img" /> --> <!-- <glsx-image src="calendar.png" mode="widthFix" custom-class="img" /> -->
</view> </view>
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
</view> </view>
</swiper-item> </swiper-item>
</swiper> --> </swiper> -->
<view class="flex-around flex-wrap calendar-main" style="height:{{swiperHeight}}rpx"> <view wx:if="{{isShow}}" class="flex-around flex-wrap calendar-main" style="height:{{swiperHeight}}rpx">
<view wx:for="{{dateList1}}" wx:key="dateList" class="day"> <view wx:for="{{dateList1}}" wx:key="dateList" class="day">
<view class="bg {{item.full == today?'now':''}}" catchtap="dayOnSelect" data-full="{{item.full}}" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}"> <view class="bg {{item.full == today?'now':''}}" catchtap="dayOnSelect" data-full="{{item.full}}" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}">
<view class="{{(item.year == selectDay.year && item.month == selectDay.month) ? (item.day === selectDay.day && oldCurrent === listIndex ?'select':''): 'other-month'}} {{item.full == currentSelect ? 'select' : ''}}">{{item.day}}</view> <view class="{{(item.year == selectDay.year && item.month == selectDay.month) ? (item.day === selectDay.day && oldCurrent === listIndex ?'select':''): 'other-month'}} {{item.full == currentSelect ? 'select' : ''}}">{{item.day}}</view>
......
...@@ -10,14 +10,24 @@ ...@@ -10,14 +10,24 @@
} }
.header-wrap { .header-wrap {
height: 88rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.today {
display: flex;
align-items: center;
font-weight: 500;
font-size: 28rpx;
color: #323233;
}
.today .img { .today .img {
width: 80rpx; width: 40rpx;
height: 84rpx; height: 40rpx;
margin-left: 4rpx;
} }
.direction-column { .direction-column {
...@@ -238,8 +248,18 @@ ...@@ -238,8 +248,18 @@
} }
.header-wrap .month { .header-wrap .month {
display: flex;
align-items: center;
width: calc(100% - 240rpx);
height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
color: #929797; color: #929797;
}
.header-wrap .month .img {
width: 40rpx;
height: 40rpx;
} }
.dot_list { .dot_list {
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
<view class="card-box" wx:for="{{list}}" wx:key="index"> <view class="card-box" wx:for="{{list}}" wx:key="index">
<view class="card-head"> <view class="card-head">
<view>{{item.startTime}}-{{item.endTime}}</view> <view>{{item.startTime}}-{{item.endTime}}</view>
<view wx:if="{{item.remainNum > 0}}"> <view wx:if="{{item.maxCount <= 0 && item.isInvite}}">本轮时段不可预约</view>
<view wx:elif="{{item.remainNum > 0}}">
<view wx:if="{{item.isInvite}}">本轮时段还可预约<span class="orange-txt">{{item.remainNum}}</span>个客户</view> <view wx:if="{{item.isInvite}}">本轮时段还可预约<span class="orange-txt">{{item.remainNum}}</span>个客户</view>
<view wx:if="{{!item.isInvite}}" class="tip-txt">本轮时段不可预约</view> <view wx:if="{{!item.isInvite}}" class="tip-txt">本轮时段不可预约</view>
</view> </view>
<view wx:else class="tip-txt">本轮时段已约满</view> <view wx:else class="tip-txt">本轮时段已约满</view>
<view wx:if="{{item.maxNum < 0 && item.isInvite}}">本轮时段不可预约</view>
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <view class="content" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
...@@ -35,9 +35,12 @@ ...@@ -35,9 +35,12 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{item.remainNum > 0 && item.isInvite}}" class="content appr-btn" bindtap="handleInvite" data-item="{{item}}">+预约</view> <view wx:if="{{item.maxCount <= 0 && item.isInvite}}" class="card-tip">请联系管理员开通预约工位</view>
<view wx:if="{{item.invitedCount == 0 && !item.isInvite}}" class="card-tip">过去的时间不可预约</view> <view wx:elif="{{item.invitedCount == 0 && !item.isInvite}}" class="card-tip">过去的时间不可预约</view>
<view wx:if="{{item.maxNum < 0 && item.isInvite}}">请联系管理员开通预约工位</view> <view wx:elif="{{item.remainNum > 0}}">
<view wx:if="{{item.isInvite}}" class="content appr-btn" bindtap="handleInvite" data-item="{{item}}">+预约</view>
<view wx:if="{{!item.isInvite}}" class="card-tip">本轮时段不可预约</view>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
......
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
border: 2rpx solid #3582ee3d; border: 2rpx solid #3582ee3d;
border-radius: 8rpx; border-radius: 8rpx;
margin-right: 4rpx; margin-right: 4rpx;
margin-bottom: 20rpx;
} }
.card-box .content:nth-child(3n) { .card-box .content:nth-child(3n) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!