Commit 0a83b361 authored by Morson's avatar Morson

修改预约组件信息

parent 2b16f348
......@@ -7,7 +7,7 @@
<view class="select-date">
<view class="u-flex u-row-between ">
<view class="txt">选择日期</view>
<view class="txt active">2021.04.21</view>
<view class="txt active">{{ dateList[currentDay].day }}</view>
</view>
<view class="u-m-t-30 u-flex u-row-between date-list">
<view :class="{'date-item':true,'active':index===currentDay}"
......@@ -24,7 +24,7 @@
<view class="select-time u-p-t-50">
<view class="u-flex u-row-between">
<view class="txt">选择时间</view>
<view class="txt active">14:00-16:00</view>
<view class="txt active">{{ timeList[currentTime] }}</view>
</view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view @click="timeChange(item,index,timeList)"
......@@ -71,8 +71,8 @@
weekDay: '周三',
day: '21'
}, ],
timeList: ['06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00',
'06:00-08:00', '06:00-08:00', '06:00-08:00'
timeList: ['06:00-08:00', '08:00-10:00', '10:00-12:00', '12:00-14:00', '14:00-16:00', '16:00-18:00',
'18:00-20:00', '20:00-22:00', '22:00-24:00'
]
}
},
......
......@@ -62,7 +62,7 @@
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
<view class="u-m-60">
<button class="btn" @click="submitFrom" :loading="submiting" :disabled="disabledSubmitBtn">确定</button>
<button class="btn" @click="submitFrom" :loading="submiting" :disabled="disabledSubmit">确定</button>
</view>
</view>
</template>
......@@ -114,18 +114,19 @@
}
},
computed: {
disabledSubmitBtn() {
disabledSubmit() {
let self = this
if(self.trace.reasonType == '预约'
&& (self.trace.appointmentDatetime == null || self.trace.appointmentDatetimeRange == ''
|| self.trace.nextTraceDatetime == '')) {
return true
} else if(self.trace.reasonType != '预约'
&& (!self.trace.reasonType || !self.trace.reasonRelegation || !self.trace.reason)) {
return true
debugger
if(self.trace.reasonType
&& (self.trace.reasonType == '报备' || self.trace.reasonType == '改约')){
if(self.trace.reasonRelegation && self.trace.reason
&& self.trace.appointmentDatetimeRange) {
return false
}
}
return false
return true
},
},
async onLoad(e) {
......@@ -322,8 +323,13 @@
&::after{
content:'';
height:0;
border: none;
}
}
button[disabled]:not([type]) {
background: #D1D4D4;
color: #FFFFFF;
}
.btn{
padding:30rpx;
border-radius: 52rpx;
......
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