From f3bd5baa8eb4eb7a896f7312a2e9a7c89a46cef5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 27 八月 2024 09:18:29 +0800
Subject: [PATCH] ll
---
h5/pages/driver/reservedRecord.vue | 95 +++++++++++++++++++++++------------------------
1 files changed, 47 insertions(+), 48 deletions(-)
diff --git a/h5/pages/driver/reservedRecord.vue b/h5/pages/driver/reservedRecord.vue
index f76ba2e..0d19bd6 100644
--- a/h5/pages/driver/reservedRecord.vue
+++ b/h5/pages/driver/reservedRecord.vue
@@ -4,74 +4,77 @@
<view class="box_list">
<view
class="box_list_item"
- v-for="(item, index) in 3"
+ v-for="(item, index) in datalist"
:key="index"
- @click="handleDetail()"
+ @click="handleDetail(item.id)"
>
<view class="box_list_item_head">
- <text>涓佹仼鍑殑鍔冲姟鍏ュ洯鐢宠</text>
- <text class="loading">寰呭鏍�</text>
+ <text>{{item.driverName}}鐨勫叆鍥绾�</text>
+ <text class="loading">{{ statusMap[item.status] }}</text>
</view>
<view class="box_list_item_nr">
<view class="box_list_item_nr_item">
- <text>琚闂汉锛�</text>
- <text>浜轰簨閮�-鐜嬩簹钃�</text>
+ <text>鍚堝悓缂栧彿锛�</text>
+ <text>{{item.contractNum}}</text>
</view>
<view class="box_list_item_nr_item">
- <text>杩涘巶鏃堕棿锛�</text>
- <text>12-12 09:00</text>
+ <text>鍒板満鏃堕棿锛�</text>
+ <text>{{item.arriveDate.slice(5,16)}}</text>
</view>
<view class="box_list_item_nr_item">
- <text>绂诲洯鏃堕棿锛�</text>
- <text>12-12 12:00</text>
+ <text>鍙告満濮撳悕锛�</text>
+ <text>{{item.driverName}}</text>
</view>
<view class="box_list_item_nr_item">
- <text>鏉ヨ浜嬬敱锛�</text>
- <text>涓氬姟鏉ュ線</text>
+ <text>杞﹁締淇℃伅锛�</text>
+ <text>{{item.carCodeFront}}</text>
</view>
<view class="box_list_item_nr_item">
- <text>闅忚杞﹁締锛�</text>
- <text>鐨朅88888</text>
+ <text class="placeholder9">{{item.createDate.slice(0,16)}}鎻愪氦</text>
</view>
</view>
</view>
</view>
- <!-- 閫夋嫨杞﹁締 -->
- <u-picker
- keyName="name"
- closeOnClickOverlay
- @close="isShowCar = false"
- :show="isShowCar"
- :columns="carList"
- @confirm="seletedCar"
- @cancel="isShowCar = false"
- ></u-picker>
- <!-- 鏃ユ湡 -->
- <u-datetime-picker
- :show="isShowDate"
- :minDate="minDate"
- @confirm="confirmDate"
- @cancel="isShowDate = false"
- mode="date"
- ></u-datetime-picker>
</view>
</template>
<script>
+ import { driverApplyRecord } from "@/api"
export default {
data() {
return {
isShowCar: false,
isShowDate: false,
param: {},
- carList: [[{ name: 'aa', value: '11' }]],
- timeList: [{ time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }]
+ page: 1,
+ capacity: 10,
+ total: 0,
+ datalist: [],
+ statusMap: {
+ 0: '寰呭鎵�',
+ 1: '瀹℃壒涓�',
+ 2: '瀹℃壒閫氳繃',
+ 3: '瀹℃壒涓嶉�氳繃',
+ 4: '宸插彇娑�',
+ }
}
},
+ created() {
+ this.getList()
+ },
methods: {
- handleDetail() {
+ getList() {
+ const { page, capacity } = this
+ driverApplyRecord({
+ page, capacity,model: {}
+ }).then(res => {
+ this.datalist = res.data.records
+ this.total = res.data.total
+ })
+ },
+ handleDetail(id) {
uni.navigateTo({
- url: "/pages/driver/reservedDetail"
+ url: `/pages/driver/reservedDetail?id=${id}`
})
},
confirmDate(e) {
@@ -89,6 +92,9 @@
</script>
<style lang="scss">
+ page{
+ background: #f7f7f7;
+ }
.main_app {
background: #f7f7f7;
padding: 0;
@@ -151,7 +157,7 @@
}
}
.box_list_item_nr {
- padding: 30rpx;
+ padding: 30rpx 30rpx 10rpx;
width: 100%;
box-sizing: border-box;
background-color: #ffffff;
@@ -159,18 +165,11 @@
width: 100%;
display: flex;
align-items: center;
- margin-bottom: 20rpx;
+ margin-bottom: 16rpx;
text {
- &:nth-child(1) {
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- }
- &:nth-child(2) {
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- }
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
}
}
}
--
Gitblit v1.9.3