zhangback
2025-12-18 37701165fd783da4c2878d72b4bae52687836479
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
<template>
  <view class="container">
    <!-- 标题栏 -->
    <Nav title="历史调度单" customBack="pages/beReferred/index" customType="navigateBack"></Nav>
    <!-- 历史调度单列表-可下拉滚动 -->
    <scroll-view class="history-scroll" scroll-y="true" style="height: calc(100vh - 80rpx);">
      <view class="history-item" v-for="(item, index) in historyList" @click="historyClick(item)" :key="index">
        <view class="item-field">
          <view class="field-label">调度单号</view>
          <view class="field-value">{{ item.dispatchNo }}</view>
        </view>
        <view class="item-field">
          <view class="field-label">运输工具号码</view>
          <view class="field-value">{{ item.licensePlate }}</view>
        </view>
        <view class="item-field">
          <view class="field-label">路线</view>
          <view class="field-value">{{ item.transportLine }}</view>
        </view>
        <view class="item-field">
          <view class="field-label">客户</view>
          <view class="field-value">{{ item.customerName }}</view>
        </view>
        <view class="item-field">
          <view class="field-label">完成时间</view>
          <view class="field-value">{{ item.okTime }}</view>
        </view>
      </view>
    </scroll-view>
  </view>
</template>
 
<script>
 
import { getAssignedItineraryLogList } from "@/common/history";
export default {
  data() {
    return {
      historyList: [
 
      ]
    };
  },
  created() {
    this.getList();
  },
  methods: {
    historyClick(item) {
      wx.navigateTo({
        url: '/pages/examine/index?id=' + item.dispatchId + '&name=' + '查看行程历史' + '&router=' + 'pages/history/index'
      });
    },
    getList() {
      getAssignedItineraryLogList().then((res) => {
        this.historyList = res;
        
 
        // uni.$u.toast(res.message);
      })
    },
  },
};
</script>
 
<style scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f7f7f7;
}
 
/* 标题栏 */
.title-bar {
  height: 80rpx;
  line-height: 80rpx;
  text-align: center;
  font-size: 32rpx;
  font-weight: 500;
  background-color: #fff;
  border-bottom: 1rpx solid #ccc;
  /* 标题栏底部边框 */
}
 
/* 历史调度单滚动区域 */
.history-scroll {
  flex: 1;
  padding: 20rpx;
  box-sizing: border-box;
}
 
/* 历史调度单项 */
.history-item {
  background-color: #fff;
  border: 1rpx solid #ccc;
  /* 每个条目边框 */
  border-radius: 6rpx;
  padding: 20rpx;
  margin-bottom: 20rpx;
}
 
/* 字段行 */
.item-field {
  display: flex;
  margin-bottom: 16rpx;
}
 
/* 字段标签 */
.field-label {
  width: 170rpx;
  color: #666;
  font-size: 28rpx;
}
 
/* 字段值 */
.field-value {
  flex: 1;
  color: #333;
  font-size: 28rpx;
}
</style>