|
|
@@ -70,6 +70,17 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 预约截止时间区域 -->
|
|
|
+ <view class="box">
|
|
|
+ <view class="left">预约截止时间</view>
|
|
|
+ <picker style="width: 40%;" @change="bindPickerChange($event, 7)" mode="time" :value="info.yy_end">
|
|
|
+ <view :class="['right', info.yy_end != 0 ? '' : 'unSelect']">
|
|
|
+ {{ info.yy_end != 0 ? info.yy_end : '请选择' }}
|
|
|
+ <view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 路线区域 -->
|
|
|
<view class="box">
|
|
|
<view class="left">路线</view>
|
|
|
@@ -82,11 +93,11 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 终点站区域 -->
|
|
|
+ <!-- 站点区域 -->
|
|
|
<view class="box">
|
|
|
- <view class="left">终点站</view>
|
|
|
+ <view class="left">站点</view>
|
|
|
|
|
|
- <picker style="width: 60%;" @change="bindPickerChange($event, 3)" :range="endList" range-key="route_end">
|
|
|
+ <picker style="width: 80%;" @change="bindPickerChange($event, 3)" :range="endList" range-key="route_end">
|
|
|
<view :class="['right', info.route_end ? '' : 'unSelect']">
|
|
|
{{ info.route_end ? info.route_end : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
@@ -111,7 +122,16 @@
|
|
|
|
|
|
<!-- 人员名单区域 -->
|
|
|
<view class="list">
|
|
|
- <view class="list-title" v-if="info.user_num != 0">人员名单({{ info.user_num }}/{{ info.contain }})</view>
|
|
|
+ <view class="list-title" v-if="info.user_num != 0">
|
|
|
+ <!-- 人员名单({{ info.user_num }}/{{ info.contain }}) -->
|
|
|
+ <view class="list-title-left">人员名单({{ typeList[result_state].text }}{{ listData.length }}人)</view>
|
|
|
+ <picker style="width: 38%;" :range="typeList" range-key="text" @change="bindPickerChange($event, 6)">
|
|
|
+ <view class="list-title-right">
|
|
|
+ {{ typeList[result_state].text }}
|
|
|
+ <view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
+ </view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
<view class="list-item" v-for="(item, index) in listData" :key="index">
|
|
|
<view class="item-img"><img src="../../static/man.png" /></view>
|
|
|
<view class="item-info">
|
|
|
@@ -123,7 +143,14 @@
|
|
|
<span>{{ item.yy_time }}</span>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item-type"><img src="../../static/subscribe.png" /></view>
|
|
|
+ <view v-if="item.yy_state === '1'" class="item-type"><img src="../../static/subscribe.png" /></view>
|
|
|
+ <view v-else class="item-type"><img src="../../static/pass2.png" /></view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 无数据时展示的区域 -->
|
|
|
+ <view class="list-nodata" v-if="listData.length == 0">
|
|
|
+ <img src="../../static/no-bus.png" />
|
|
|
+ <view>暂无数据</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -149,8 +176,9 @@ onLoad(options => {
|
|
|
} else {
|
|
|
info.value = JSON.parse(options.info)
|
|
|
// console.log(info.value)
|
|
|
+ idRef.value = info.value.id
|
|
|
// 获取人员列表
|
|
|
- getData(info.value)
|
|
|
+ getData()
|
|
|
// 获取路线数组
|
|
|
getPathList()
|
|
|
// 获取终点站列表
|
|
|
@@ -182,6 +210,9 @@ onLoad(options => {
|
|
|
// 带过来的预约详情数据
|
|
|
const info = ref({})
|
|
|
|
|
|
+// 参数id
|
|
|
+const idRef = ref(null)
|
|
|
+
|
|
|
// 车牌号绑定数据
|
|
|
const form = ref({
|
|
|
selectValue: '',
|
|
|
@@ -207,6 +238,26 @@ const listData = ref([])
|
|
|
const time_early = ref(null)
|
|
|
// 发车时间推迟多少分钟可以扫码
|
|
|
const time_late = ref(null)
|
|
|
+// 发车前多少分钟截止预约
|
|
|
+const time_yy_end = ref(null)
|
|
|
+
|
|
|
+// 人员名单筛选状态
|
|
|
+const result_state = ref(0)
|
|
|
+
|
|
|
+const typeList = ref([
|
|
|
+ {
|
|
|
+ text: '全部',
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '已预约未上车',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '已上车',
|
|
|
+ value: 2
|
|
|
+ }
|
|
|
+])
|
|
|
|
|
|
// 获取路线数组请求
|
|
|
const getPathList = async () => {
|
|
|
@@ -246,17 +297,12 @@ const getBusList = async () => {
|
|
|
}
|
|
|
|
|
|
// 获取人员名单请求
|
|
|
-const getData = async value => {
|
|
|
- const { route, route_end, yy_date, ci_time, car_number } = value
|
|
|
-
|
|
|
+const getData = async () => {
|
|
|
const res = await myRequest({
|
|
|
url: '/appqueryAppointeds.action',
|
|
|
data: {
|
|
|
- route,
|
|
|
- route_end,
|
|
|
- yy_date,
|
|
|
- ci_time,
|
|
|
- car_number
|
|
|
+ id: idRef.value,
|
|
|
+ result_state: result_state.value
|
|
|
}
|
|
|
})
|
|
|
// console.log(res)
|
|
|
@@ -309,6 +355,13 @@ const handleSave = () => {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!info.value.yy_end) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择预约截止时间',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!info.value.route) {
|
|
|
uni.showToast({
|
|
|
title: '请选择路线',
|
|
|
@@ -338,7 +391,7 @@ const handleSave = () => {
|
|
|
// 保存请求
|
|
|
const handleSaveRequest = () => {
|
|
|
// console.log(info.value)
|
|
|
- const { id, car_number, ci_time, route, route_end, contain, sm_start, sm_end } = info.value
|
|
|
+ const { id, car_number, ci_time, route, route_end, contain, sm_start, sm_end, yy_end } = info.value
|
|
|
|
|
|
uni.request({
|
|
|
url: '/carstop/carbook/scheupdate.action',
|
|
|
@@ -351,7 +404,8 @@ const handleSaveRequest = () => {
|
|
|
route_end,
|
|
|
contain,
|
|
|
sm_start,
|
|
|
- sm_end
|
|
|
+ sm_end,
|
|
|
+ yy_end
|
|
|
},
|
|
|
success: res => {
|
|
|
if (res.data.code == 200) {
|
|
|
@@ -418,6 +472,7 @@ const getTimeConfig = async () => {
|
|
|
// console.log(res)
|
|
|
time_early.value = res.sm_end
|
|
|
time_late.value = res.sm_start
|
|
|
+ time_yy_end.value = res.yy_end
|
|
|
}
|
|
|
|
|
|
// 下拉框选择时的回调
|
|
|
@@ -431,6 +486,7 @@ const bindPickerChange = (e, type) => {
|
|
|
info.value.ci_time = e.detail.value
|
|
|
info.value.sm_start = time_change(info.value.ci_time, time_early.value * -1)
|
|
|
info.value.sm_end = time_change(info.value.ci_time, time_late.value)
|
|
|
+ info.value.yy_end = time_change(info.value.ci_time, time_yy_end.value * -1)
|
|
|
} else if (type == 2) {
|
|
|
info.value.route = pathList.value[e.detail.value].route
|
|
|
getEndList()
|
|
|
@@ -441,6 +497,11 @@ const bindPickerChange = (e, type) => {
|
|
|
info.value.sm_start = e.detail.value
|
|
|
} else if (type == 5) {
|
|
|
info.value.sm_end = e.detail.value
|
|
|
+ } else if (type == 6) {
|
|
|
+ result_state.value = e.detail.value
|
|
|
+ getData()
|
|
|
+ } else if (type == 7) {
|
|
|
+ info.value.yy_end = e.detail.value
|
|
|
}
|
|
|
}
|
|
|
// 获取当前时间 hh:mm
|
|
|
@@ -548,9 +609,34 @@ const getCurrentTime = () => {
|
|
|
padding: 13rpx 30rpx;
|
|
|
|
|
|
.list-title {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 20rpx;
|
|
|
height: 41rpx;
|
|
|
color: #999999;
|
|
|
font-size: 28rpx;
|
|
|
+
|
|
|
+ .list-title-left {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-title-right {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ color: #000;
|
|
|
+
|
|
|
+ .right-img {
|
|
|
+ margin-left: 27rpx;
|
|
|
+ margin-top: -5rpx;
|
|
|
+ width: 17rpx;
|
|
|
+ height: 12rpx;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.list-item {
|
|
|
@@ -618,6 +704,17 @@ const getCurrentTime = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .list-nodata {
|
|
|
+ padding: 50rpx 0;
|
|
|
+ background-color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 500rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|