Commit ca17c19c by zhangzhen

订单功能完善

parent 4f23052e
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<view v-if="roomLabelList.length" class="room-label-list"> <view v-if="roomLabelList.length" class="room-label-list">
<view v-for="(item,index) in roomLabelList" :key="index" class="room-label-box" <view v-for="(item,index) in roomLabelList" :key="index" class="room-label-box"
@tap="onChangePackage(index)"> @tap="onChangePackage(index)">
<view class="item" :class="{active: modeIndex===index}"> <view class="item" :class="allDayUseStatus? 'gray': modeIndex===index?'active':''">
<text>{{item.labelName}}</text> <text>{{item.labelName}}</text>
</view> </view>
<view v-if="item.openPack==1" class="pre-icon"> <view v-if="item.openPack==1" class="pre-icon">
...@@ -255,12 +255,12 @@ ...@@ -255,12 +255,12 @@
v-model="checkedDateList" @change="onBindChange"> v-model="checkedDateList" @change="onBindChange">
<picker-view-column> <picker-view-column>
<view class="item" v-for="(item,index) in hourList" :key="index"> <view class="item" v-for="(item,index) in hourList" :key="index">
<text>{{item}}</text> <text class="text-lg text-pink">{{item}}</text>
</view> </view>
</picker-view-column> </picker-view-column>
<picker-view-column> <picker-view-column>
<view class="item" v-for="(item,index) in minuteList" :key="index"> <view class="item" v-for="(item,index) in minuteList" :key="index">
<text>{{item}}</text> <text class="text-lg text-pink">{{item}}</text>
</view> </view>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
...@@ -315,12 +315,15 @@ ...@@ -315,12 +315,15 @@
</view> </view>
</view> </view>
<view class="info"> <view class="info flex-row-center">
<text class="">房间:{{roomInfo.name}} {{roomTypeEnum[roomInfo.roomType]}}</text> <text class="">房间:</text>
<text class="text-pink margin-left text-lg ">{{roomInfo.name}} {{roomTypeEnum[roomInfo.roomType]}}</text>
</view> </view>
<view class="info"> <view class="info flex-row-center">
<text class="">金额: {{Number(computePriceInfo.payFee).toFixed(2)}}</text> <text class="">金额:</text>
<text class="text-pink text-xxl margin-left">{{Number(computePriceInfo.payFee).toFixed(2)}}</text>
<text class="margin-left-sm"></text>
</view> </view>
</view> </view>
<view class="footer-btn-box"> <view class="footer-btn-box">
...@@ -338,15 +341,11 @@ ...@@ -338,15 +341,11 @@
<uni-popup ref="popupMessage" type="dialog"> <uni-popup ref="popupMessage" type="dialog">
<uni-popup-dialog type="warn" mode="base" title="提示" :showClose="false" content="当前条件下无可预约的时段,请手动选择合适的空闲时段" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onCancleTip"></uni-popup-dialog> <uni-popup-dialog type="warn" mode="base" title="提示" :showClose="false" :content="tipErrMsg|| tipContent" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onCancleTip"></uni-popup-dialog>
</uni-popup>
<uni-popup ref="popupMessage2" type="dialog">
<uni-popup-dialog type="warn" mode="base" title="提示" :showClose="false" confirmText="好的" content="所选套餐,可用时长不足,请选择其他日期的套餐" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onCancleTip"></uni-popup-dialog>
</uni-popup> </uni-popup>
<uni-popup ref="popupDialog" type="dialog"> <uni-popup ref="popupDialog" type="dialog">
<uni-popup-dialog type="warn" mode="base" title="提示" content="所选套餐可使用时长不足,点击确认表示接受" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onPackageCheck"></uni-popup-dialog> <uni-popup-dialog type="warn" mode="base" title="提示" content="所选套餐可使用时长不足,请点击确定表示接受" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onPackageCheck"></uni-popup-dialog>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
...@@ -505,6 +504,9 @@ ...@@ -505,6 +504,9 @@
0:"星期日", 0:"星期日",
}, },
allDayUseStatus: false, // 当日无可预约时段,true 无法预约,false 可预约 allDayUseStatus: false, // 当日无可预约时段,true 无法预约,false 可预约
tipContent: "当前条件下无可预约的时段,请手动选择合适的空闲时段",
tipErrMsg: ''
}; };
}, },
filters: { filters: {
...@@ -1163,7 +1165,7 @@ ...@@ -1163,7 +1165,7 @@
}, },
// 开始选择时间 // 开始选择时间
onSelectDate() { onSelectDate() {
if(this.orderType==1 && this.modeIndex >= 0){ if(this.orderType==1 && this.modeIndex >= 0 && !this.allDayUseStatus){
this.hourList = [ this.hourList = [
"00", "00",
"01", "01",
...@@ -1443,7 +1445,7 @@ ...@@ -1443,7 +1445,7 @@
}) })
}, },
onSelectDatePoint(val, i) { onSelectDatePoint(val, i) {
if (this.orderType == 2 || this.modeIndex2>=0) return; if (this.orderType == 2 || this.modeIndex2>=0 || this.allDayUseStatus) return;
if (i >= 24) { if (i >= 24) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
...@@ -1487,20 +1489,19 @@ ...@@ -1487,20 +1489,19 @@
let start = moment(item.timeHour+':00:00').valueOf(); let start = moment(item.timeHour+':00:00').valueOf();
let end = moment(item.timeHour+':59:59').valueOf(); let end = moment(item.timeHour+':59:59').valueOf();
if( end > startStemp && start < endStemp){ if( end > startStemp && start < endStemp){
if(item.status ==1){ if(item.status ==1){
if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){ if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
}else{ }else{
if( moment(item.startHoldTime).valueOf() > startStemp && moment(item.endHoldTime).valueOf() < startStemp){ if( startStemp >= moment(item.startHoldTime).valueOf() && startStemp < moment(item.endHoldTime).valueOf()){
useStatus = true; useStatus = true;
nextStatus = true; nextStatus = true;
} }
if( moment(item.startHoldTime).valueOf() > endStemp && moment(item.endHoldTime).valueOf() < endStemp){ if( endStemp > moment(item.startHoldTime).valueOf() && endStemp <= moment(item.endHoldTime).valueOf()){
useStatus = true useStatus = true;
nextStatus = true; nextStatus = true;
} }
} }
...@@ -1539,6 +1540,8 @@ ...@@ -1539,6 +1540,8 @@
let dateObj = { let dateObj = {
useStatus: false useStatus: false
}; };
this.tipErrMsg = "";
if(params.startDateTime){ if(params.startDateTime){
// 开始和结束时间的毫秒数 // 开始和结束时间的毫秒数
startStamp = moment(params.startDateTime).valueOf(); startStamp = moment(params.startDateTime).valueOf();
...@@ -1589,7 +1592,6 @@ ...@@ -1589,7 +1592,6 @@
}, },
onCancleTip(){ onCancleTip(){
this.$refs.popupMessage.close(); this.$refs.popupMessage.close();
this.$refs.popupMessage2.close();
this.$refs.popupDialog.close(); this.$refs.popupDialog.close();
}, },
// 检查当前小时段是否被全部占用 true 完全占用 false 部分占用 // 检查当前小时段是否被全部占用 true 完全占用 false 部分占用
...@@ -1871,6 +1873,10 @@ ...@@ -1871,6 +1873,10 @@
.item { .item {
padding: 8upx 20upx; padding: 8upx 20upx;
} }
.gray{
background: #c3c3c3;
color: #f5f5f5;
}
.pre-icon{ .pre-icon{
position: absolute; position: absolute;
top: -8upx; top: -8upx;
...@@ -2330,7 +2336,7 @@ ...@@ -2330,7 +2336,7 @@
text{ text{
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #333333; // color: #333333;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment