ll
liukangdong
2024-08-29 986118de12da6830ffb0c86af8e70567352c9bb9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<template>
  <view class="main_app">
    <!--  -->
    <view class="box_list">
      <view
        class="box_list_item"
        v-for="(item, index) in datalist"
        :key="index"
        @click="handleDetail(item.id)"
      >
        <view class="box_list_item_head">
          <text>{{item.driverName}}的入园预约</text>
          <text class="loading" :class="{red: item.status == 3}">{{ statusMap[item.status] }}</text>
        </view>
        <view class="box_list_item_nr">
          <view class="box_list_item_nr_item">
            <text>合同编号:</text>
            <text>{{item.contractNum}}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>到场时间:</text>
            <text>{{item.arriveDate.slice(5,16)}}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>司机姓名:</text>
            <text>{{item.driverName}}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text>车辆信息:</text>
            <text>{{item.carCodeFront}}</text>
          </view>
          <view class="box_list_item_nr_item">
            <text class="placeholder9">{{item.createDate.slice(0,16)}}提交</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
 
<script>
    import { driverApplyRecord } from "@/api"
export default {
  data() {
    return {
      isShowCar: false,
      isShowDate: false,
      param: {},
            page: 1,
            capacity: 10,
            total: 0,
            datalist: [],
            statusMap: {
                0: '待审批',
                1: '审批中',
                2: '已通过',
                3: '已拒绝',
                4: '已取消',
            }
    }
  },
    created() {
        this.getList()
    },
  methods: {
        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?id=${id}`
      })
    },
    confirmDate(e) {
      console.log(e.value)
      this.param.aa = dayjs(e.value).format('YYYY-MM-DD')
      this.isShowDate = false
    },
    seletedCar(e) {
      console.log(e.value)
      this.param.aa = dayjs(e.value).format('YYYY-MM-DD')
      this.isShowDate = false
    }
  }
};
</script>
 
<style lang="scss">
    page{
        background: #f7f7f7;
    }
.main_app {
  background: #f7f7f7;
  padding: 0;
}
.app_header {
  display: flex;
  align-items: center;
  margin: 0 -15rpx;
  background-color: #fff;
  .item {
    width: 360rpx;
    height: 72rpx;
    margin: 15rpx;
    padding: 0 30rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: center;
  }
}
.box_list {
  width: 100%;
  padding: 30rpx;
  box-sizing: border-box;
  .box_list_item {
    width: 100%;
    margin-bottom: 20rpx;
    &:last-child {
      margin: 0 !important;
    }
    .box_list_item_head {
      width: 100%;
      height: 100rpx;
      padding: 0 30rpx;
      box-sizing: border-box;
      background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
      border-radius: 8rpx 8rpx 0rpx 0rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .loading {
        color: #4c99a8;
      }
      .success {
        color: #03c68f;
      }
      .error {
        color: #e0312a;
      }
      text {
        &:nth-child(1) {
          font-size: 32rpx;
          font-weight: 600;
          color: #222222;
        }
        &:nth-child(2) {
          font-size: 26rpx;
          font-weight: 400;
        }
      }
    }
    .box_list_item_nr {
      padding: 30rpx 30rpx 10rpx;
      width: 100%;
      box-sizing: border-box;
      background-color: #ffffff;
      .box_list_item_nr_item {
        width: 100%;
        display: flex;
        align-items: center;
        margin-bottom: 16rpx;
        text {
          font-size: 26rpx;
          font-weight: 400;
          color: #666666;
        }
      }
    }
  }
}
</style>