<template>
|
<view class="container">
|
<!-- 标题栏 -->
|
<u-navbar :placeholder="true" bgColor="#409effc1" :titleStyle="{ color: '#fff'}" title="被指派行程">
|
<view slot="left" class="u-nav-slot" @click="leftClick">
|
<u-icon color="#fff" name="list" size="28"></u-icon>
|
</view>
|
</u-navbar>
|
|
<!-- 行程列表-可下拉滚动 -->
|
<scroll-view class="task-scroll" scroll-y="true" style="height: calc(100vh - 120rpx);">
|
<view class="task-item" v-for="(item, index) in taskList" :key="index" @click="historyClick(item)">
|
<view class="task-field">
|
<view class="field-label">调度单号</view>
|
<view class="field-value">{{ item.dispatchNo }}</view>
|
</view>
|
<view class="task-field">
|
<view class="field-label">运输工具号码</view>
|
<view class="field-value">{{ item.licensePlate }}</view>
|
</view>
|
<view class="task-field">
|
<view class="field-label">路线</view>
|
<view class="field-value">{{ item.transportLine }}</view>
|
</view>
|
<view class="task-field">
|
<view class="field-label">客户</view>
|
<view class="field-value">{{ item.customerName }}</view>
|
</view>
|
<view class="task-field">
|
<view class="field-label">当前状态</view>
|
<view class="field-value status">{{ item.statusStr }}</view>
|
</view>
|
<view class="task-field">
|
<view class="field-label">要求最晚发车时间</view>
|
<view class="field-value">{{ item.latestDeparture }}</view>
|
</view>
|
</view>
|
</scroll-view>
|
|
<!-- 底部操作栏 -->
|
<view class="bottom-bar">
|
<u-button class="bottom-btn" @click="goToURL" text="历史调度单"></u-button>
|
<!-- <view class="bottom-btn">垫付列表</view> -->
|
<u-button class="bottom-btn" @click="goToURLDF" text="垫付列表"></u-button>
|
|
</view>
|
|
|
<u-popup :zIndex="1000" :overlayZIndex="999" :show="show" mode="left" @close="close">
|
<view style="width: 250px">
|
<view class="logo-info">
|
<image src="/static/oss.png" style="width: 120px;height: 120px"></image>
|
<h3 class="company">智慧物流调度平台</h3>
|
</view>
|
<text class="lout" @click="goToUrl('/pages/login/index')">退出登录</text>
|
</view>
|
|
</u-popup>
|
|
</view>
|
</template>
|
|
<script>
|
|
import { getSsignedItineraryList } from "@/common/beReferred";
|
|
export default {
|
data() {
|
return {
|
taskList: [
|
|
],
|
show:false,
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
getList() {
|
|
|
|
getSsignedItineraryList().then((res1) => {
|
console.log(res1);
|
this.taskList = res1 || [];
|
// uni.$u.toast(res.message);
|
})
|
},
|
goToURL() {
|
setTimeout(function () {
|
uni.$u.route('/pages/history/index');
|
}, 1000)
|
|
},
|
goToURLDF() {
|
setTimeout(function () {
|
uni.$u.route('/pages/paymentList/index?name='+'垫付列表'+'&router='+'pages/beReferred/index');
|
}, 1000)
|
|
},
|
historyClick(item) {
|
// wx.navigateTo({
|
// url: '/pages/examine/index?id=' + item.dispatchId+'&name='+'上传行程'+'&router='+'pages/beReferred/index'
|
// });
|
|
if( ['待甩挂', '待接挂'].includes(item.statusStr) ){
|
uni.$u.route('/pages/transportation/index?id=' + item.dispatchId+'&name='+'上传行程'+'&router='+'pages/beReferred/index'+'&statusStr='+item.statusStr);
|
}else {
|
wx.navigateTo({
|
url: '/pages/examine/index?id=' + item.dispatchId+'&name='+'上传行程'+'&router='+'pages/beReferred/index'
|
});
|
}
|
},
|
leftClick(){
|
this.show = true;
|
},
|
goToUrl(){
|
this.show = false;
|
this.$u.vuex('sso_user_token',undefined);
|
uni.reLaunch({
|
url: '/pages/login/index'
|
})
|
},
|
close(){
|
this.show = false;
|
}
|
|
}
|
};
|
</script>
|
|
|
|
<style scoped>
|
.container {
|
display: flex;
|
flex-direction: column;
|
height: 100vh;
|
background-color: #f7f7f7;
|
/* 给底部固定栏预留空间,避免内容被遮挡 */
|
padding-bottom: 100rpx;
|
box-sizing: border-box;
|
}
|
|
/* 标题栏 */
|
.title-bar {
|
height: 80rpx;
|
line-height: 80rpx;
|
text-align: center;
|
font-size: 32rpx;
|
font-weight: 500;
|
background-color: #fff;
|
border-bottom: 1rpx solid #eee;
|
z-index: 10;
|
/* 确保标题栏在滚动区上层 */
|
}
|
|
/* 行程滚动区域 */
|
.task-scroll {
|
flex: 1;
|
padding: 20rpx;
|
box-sizing: border-box;
|
z-index: 1;
|
/* 滚动区层级低于标题栏和底部栏 */
|
}
|
|
/* 行程项、字段样式保持不变 */
|
.task-item {
|
background-color: #fff;
|
border-radius: 12rpx;
|
padding: 30rpx;
|
margin-bottom: 20rpx;
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
}
|
|
.task-field {
|
display: flex;
|
margin-bottom: 20rpx;
|
}
|
|
.field-label {
|
width: 180rpx;
|
color: #666;
|
font-size: 28rpx;
|
}
|
|
.field-value {
|
flex: 1;
|
color: #333;
|
font-size: 28rpx;
|
}
|
|
.status {
|
color: #ff6b6b;
|
font-weight: 500;
|
}
|
|
/* 底部操作栏-关键修改:固定定位 */
|
.bottom-bar {
|
/* 固定在屏幕底部,不随滚动移动 */
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
right: 0;
|
display: flex;
|
height: 100rpx;
|
border-top: 1rpx solid #eee;
|
background-color: #fff;
|
/* 顶部阴影,区分内容区和底部栏 */
|
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
z-index: 999;
|
/* 确保在所有内容上层 */
|
}
|
|
.bottom-btn {
|
flex: 1;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-size: 28rpx;
|
color: #333;
|
border-right: 1rpx solid #eee;
|
}
|
|
.bottom-btn:last-child {
|
border-right: none;
|
}
|
|
|
.logo-info {
|
text-align: center;
|
position: absolute;
|
left: 50%;
|
top: 15%;
|
width: 100%;
|
transform: translateX(-50%);
|
|
|
}
|
.company {
|
font-size: 18px;
|
color: #5d6680;
|
font-weight: 500;
|
}
|
|
.user {
|
line-height: 40px;
|
color: #a2a2a2;
|
font-size: 14px;
|
}
|
|
|
.lout {
|
position: absolute;
|
bottom: 65px;
|
left: 50%;
|
transform: translateX(-50%);
|
color: #f0ae2d;
|
}
|
|
</style>
|