You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

323 lines
7.4 KiB
Vue

2 years ago
<template>
2 years ago
<AddMoveTrace v-if="ViewType" @close='ChangeViewType' />
2 years ago
<scroll-view scroll-y="true" class="Main" v-else @scrolltolower="scrolltolower">
2 years ago
<view class="HeaderSearch">
<uni-icons class='HeaderIcon' type="search"></uni-icons>
<input class="HeaderInput" placeholder="输入历史提单号或备注快速搜索" />
</view>
2 years ago
<view class="MainUnit" v-for="item in form" :key="item">
2 years ago
<view class="UnitFirst">
<view class="UnitFirstLeft">
2 years ago
<view class="BZ">
<text class="BZtext">备注</text>
2 years ago
</view>
2 years ago
<text class="BZdetails">尚未备注</text>
2 years ago
</view>
</view>
<view class="UnitSecond">
2 years ago
<text class="UnitSecondText">提单号:<text class="UnitSecondTextSpan">{{item.MBLNO}}</text></text>
2 years ago
<text class="UnitSecondText">+订阅目的港数据</text>
2 years ago
</view>
<view class="UnitThird">
2 years ago
<view class="UnitThirdView">
<i class="iconfont icon-yunshu" :class="item.StaTiXiang=='N'||!item.StaTiXiang?'Ntype':'YType'"></i>
<text class="UnitThirdViewText">提箱</text>
2 years ago
</view>
2 years ago
<text class="UnitThirdText">······</text>
<view class="UnitThirdView" >
<i class="iconfont icon-yunshu" :class="item.StaFanChange=='N'||!item.StaFanChange?'Ntype':'YType'"></i>
2 years ago
<text class="UnitThirdViewText">返场</text>
2 years ago
</view>
2 years ago
<text class="UnitThirdText">······</text>
<view class="UnitThirdView">
<i class="iconfont icon-yunshu" :class="item.StaCangDan=='N'||!item.StaCangDan?'Ntype':'YType'"></i>
2 years ago
<text class="UnitThirdViewText">舱单生效</text>
2 years ago
</view>
2 years ago
<text class="UnitThirdText">······</text>
<view class="UnitThirdView">
<i class="iconfont icon-yunshu" :class="item.StaTiDan=='N'||!item.StaTiDan?'Ntype':'YType'"></i>
2 years ago
<text class="UnitThirdViewText">报关</text>
2 years ago
</view>
2 years ago
<text class="UnitThirdText">······</text>
<view class="UnitThirdView">
<i class="iconfont icon-yunshu" :class="item.StaZhuangZai=='N'||!item.StaZhuangZai?'Ntype':'YType'"></i>
2 years ago
<text class="UnitThirdViewText">装载放行</text>
2 years ago
</view>
2 years ago
<text class="UnitThirdText">······</text>
<view class="UnitThirdView">
<i class="iconfont icon-yunshu" :class="item.StaMaTouFangXing=='N'||!item.StaMaTouFangXing?'Ntype':'YType'"></i>
2 years ago
<text class="UnitThirdViewText">码放</text>
2 years ago
</view>
</view>
<view class="UnitFourth">
2 years ago
<text class="UnitFourthText">船舶:<text class='UnitFourthTextSpan'>{{item.VESSEL}}</text></text>
<text class="UnitFourthText UnitFourthTextTime">ETD:<text
class='UnitFourthTextSpan'>{{FormatTiem(item.ETD)}}</text></text>
2 years ago
</view>
<view class="UnitFifth">
2 years ago
<view class="UnitFifthView">
<text class="UnitFifthViewText">预计到港</text>
<text class="UnitFifthViewText">实际到港</text>
<text class="UnitFifthViewText">预计离港</text>
<text class="UnitFifthViewText">实际离岗</text>
2 years ago
</view>
2 years ago
<view class="UnitFifthView">
2 years ago
<text class="UnitFifthViewText">{{FormatTiem(item.ETA)}}</text>
<text class="UnitFifthViewText">{{FormatTiem(item.ATA)}}</text>
<text class="UnitFifthViewText">{{FormatTiem(item.ETD)}}</text>
<text class="UnitFifthViewText">{{FormatTiem(item.ATD)}}</text>
2 years ago
</view>
</view>
</view>
<view class="AddBox" @click="ClickAdd">
+新增运踪
</view>
2 years ago
</scroll-view>
2 years ago
2 years ago
</template>
<script>
2 years ago
import {
ListData
} from '../../../common/js/api/homePage/moveTrace.js'
2 years ago
import {
FormatTiem
} from './time.js'
2 years ago
import AddMoveTrace from './AddMoveTrace.vue'
2 years ago
export default {
2 years ago
components: {
AddMoveTrace
},
2 years ago
data() {
return {
2 years ago
FormatTiem,
2 years ago
ViewType: false,
2 years ago
form: [],
GetData: {
"offset": 0,
"limit": 10,
}
2 years ago
}
},
2 years ago
mounted() {
2 years ago
this.FnGetData()
2 years ago
},
2 years ago
methods: {
2 years ago
time(timestamp) {
// let data=Number(timestamp)
// console.log(123213);
// timestamp.toString()
// return data
},
FnGetData() {
ListData(this.GetData).then(res => {
this.form = [...this.form, ...res.DataList]
}).catch(err => {
this.form = [...this.form, ...err.DataList]
})
console.log(this.form, this.form.length);
},
scrolltolower() {
++this.GetData.offset
this.FnGetData()
},
2 years ago
ChangeViewType() {
this.ViewType = false
2 years ago
},
ClickAdd() {
this.ViewType = !this.ViewType
}
2 years ago
}
}
</script>
2 years ago
<style lang="scss" scoped>
.Main {
background: #f2f2f2;
2 years ago
height: calc(100% - 175rpx);
padding: 1rem 1rem;
padding-bottom: 0;
box-sizing: border-box;
2 years ago
overflow: auto;
2 years ago
.HeaderSearch {
padding: .5rem;
display: flex;
align-items: center;
background: #fff;
border-radius: 5rpx;
.HeaderIcon {
margin-right: .5rem;
}
.HeaderInput {
flex: 1;
}
}
.MainUnit {
margin-top: 1rem;
background: #FFF;
padding-bottom: .2rem;
.UnitFirst {
2 years ago
2 years ago
background: #e7eafb;
padding: 16rpx 32rpx;
.UnitFirstLeft {
2 years ago
display: flex;
justify-content: space-between;
.BZ {
2 years ago
margin-right: 16rpx;
background: #465499;
transform: skewX(-24deg);
display: inline-block;
2 years ago
.BZtext {
2 years ago
color: #fff;
padding: 3rpx 15rpx;
display: inline-block;
transform: skewX(24deg);
}
}
}
2 years ago
.BZdetails {
2 years ago
color: #4e5999;
}
}
.UnitSecond {
display: flex;
justify-content: space-between;
padding: 16rpx 32rpx;
border-bottom: 1rpx solid #e6e6e6;
2 years ago
>.UnitSecondText {
2 years ago
&:first-child {
color: #9d9d9d;
2 years ago
.UnitSecondTextSpan {
2 years ago
color: #000;
font-weight: 700;
}
}
&:last-child {
color: #5873f5;
}
}
}
2 years ago
2 years ago
.UnitThird {
display: flex;
padding: 1rem .5rem;
2 years ago
.UnitThirdView {
2 years ago
width: 2.5rem;
display: flex;
flex-direction: column;
i {
width: 2.5rem;
height: 2.5rem;
text-align: center;
line-height: 2.5rem;
background: #53a8ff;
border-radius: 50%;
color: #fff;
&.Ntype{
background: #c9c9c9;
}
2 years ago
}
2 years ago
.UnitThirdViewText {
2 years ago
text-align: center;
font-size: .6rem;
margin-top: .4rem;
}
}
2 years ago
.UnitThirdText {
2 years ago
flex: 1;
height: 2.5rem;
line-height: 2.5rem;
text-align: center;
color: #c9c9c9;
}
}
.UnitFourth {
display: flex;
justify-content: space-between;
padding: 16rpx 32rpx;
border-bottom: 1rpx solid #e6e6e6;
2 years ago
.UnitFourthText {
min-width: 60%;
2 years ago
color: #9d9d9d;
&.UnitFourthTextTime {
min-width: 40%;
.UnitFourthTextSpan {
width: auto;
}
}
2 years ago
2 years ago
.UnitFourthTextSpan {
line-height: .8rem;
2 years ago
color: #000;
font-weight: 700;
width: 10rem;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
2 years ago
}
}
}
.UnitFifth {
2 years ago
.UnitFifthView {
2 years ago
display: flex;
2 years ago
.UnitFifthViewText {
2 years ago
flex: 10;
text-align: center;
border-left: 1rpx solid #e6e6e6;
border-bottom: 1rpx solid #e6e6e6;
font-size: .9rem;
padding: .2rem 0;
&:first-child {
border-left: none;
}
}
&:last-child {
color: #57b450;
}
}
}
}
.AddBox {
position: fixed;
left: 50%;
2 years ago
bottom: 165rpx;
2 years ago
transform: translate(-50%, 0);
width: 30%;
height: 2.2rem;
background: #fff;
border-radius: .8rem;
text-align: center;
line-height: 2.2rem;
box-shadow: 0px 0px 12px #aeadad;
}
}
2 years ago
</style>