<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>
|