pad-app/pages/shipWork/index.vue

301 lines
7.0 KiB
Vue
Raw Normal View History

2023-07-05 10:56:11 +08:00
<template>
<view class="app">
<head-info></head-info>
<view class="container">
<side-bar path='3'></side-bar>
<view class="content">
<view class="form">
<view class="select">
2023-07-13 16:46:06 +08:00
<uni-data-select v-model="pamValue" :localdata="pamList" @change="pamChange"
placeholder="请选择港口">
2023-07-05 10:56:11 +08:00
</uni-data-select>
</view>
2023-07-13 16:46:06 +08:00
<view class="select">
<uni-data-select v-model="shipValue" :localdata="shipList" @change="shipChange"
placeholder="请选择船名航次">
</uni-data-select>
2023-07-06 17:08:59 +08:00
</view>
2023-07-13 16:46:06 +08:00
<van-button type="default" @click="search"></van-button>
2023-07-05 10:56:11 +08:00
</view>
<view class="itemList">
2023-07-13 11:18:17 +08:00
<view v-for="(item, index) in ltemList" :key="index" class="item" @click="toGo">
2023-07-05 10:56:11 +08:00
<view class="title">
<view class="name">
2023-07-13 16:46:06 +08:00
{{item.spmName}}
2023-07-05 10:56:11 +08:00
</view>
</view>
2023-07-06 17:08:59 +08:00
<view class="table">
<view class="row">
<view class="nitem">
2023-07-13 16:46:06 +08:00
进口航次: <text>{{item.inVvyName}}</text>
2023-07-06 17:08:59 +08:00
</view>
<view class="nitem">
2023-07-13 16:46:06 +08:00
进口贸易类型: <text>{{item.inTradeTypeName}}</text>
2023-07-06 17:08:59 +08:00
</view>
</view>
<view class="row">
<view class="nitem">
2023-07-13 16:46:06 +08:00
出口航次: <text>{{item.outVvyName}}</text>
2023-07-06 17:08:59 +08:00
</view>
<view class="nitem">
2023-07-13 16:46:06 +08:00
出口贸易类型: <text>{{item.outTradeTypeName}}</text>
2023-07-06 17:08:59 +08:00
</view>
</view>
<view class="row">
<view class="nitem">
2023-07-13 16:46:06 +08:00
计划泊位: <text>{{item.planBerthageName}}</text>
2023-07-06 17:08:59 +08:00
</view>
<view class="nitem">
2023-07-13 16:46:06 +08:00
实际泊位: <text>{{item.actualBerthageName}}</text>
2023-07-06 17:08:59 +08:00
</view>
</view>
<view class="row">
2023-07-13 16:46:06 +08:00
<view class="nitem">
<text>{{item.uploadStatusDesc}}</text>
<text>{{item.uploadTime}}</text>
</view>
<!-- <view class="nitem" v-if="item==1">
2023-07-06 17:08:59 +08:00
<text class="green"></text> 已下载
<text>2023/09/21 12:00</text>
</view>
<view class="nitem" v-if="item==2">
<text></text> 未下载
</view>
<view class="nitem" v-if="item==1">
<text class="green"></text> 已上传
<text>2023/09/21 12:00</text>
</view>
<view class="nitem" v-if="item==2">
<text></text> 未上传
2023-07-13 16:46:06 +08:00
</view> -->
2023-07-06 17:08:59 +08:00
</view>
<view class="footer">
2023-07-13 16:46:06 +08:00
<view class="fitem" @click="download(item)">
2023-07-06 17:08:59 +08:00
下载
2023-07-05 10:56:11 +08:00
</view>
2023-07-13 16:46:06 +08:00
<view class="fitem" @click="upload">
2023-07-06 17:08:59 +08:00
上传
2023-07-05 10:56:11 +08:00
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info';
export default {
data() {
return {
2023-07-13 16:46:06 +08:00
// 港口
pamValue: "",
pamList: [],
// 船名航次
shipValue: '',
shipList: [],
ltemList: [],
2023-07-05 10:56:11 +08:00
}
},
onLoad() {
},
components: {
SideBar,
2023-07-13 16:46:06 +08:00
HeadInfo,
},
mounted() {
this.getPam();
this.getShip();
2023-07-05 10:56:11 +08:00
},
methods: {
2023-07-13 16:46:06 +08:00
// 获取船的数据
initData() {
uni.request({
url: this.$local + '/api/shipOperate/select?pamId=' + this.pamValue + "&vvyId=" + this
.shipValue,
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode === 200) {
this.ltemList = res.data.data.records
}
}
})
},
// 获取港区下拉数据
getPam() {
uni.request({
url: this.$local + '/api/shipOperate/queryPortArea',
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode === 200) {
let arr = res.data.data;
arr.forEach((v, index) => {
this.pamList.push({
text: v.pamName,
value: v.pamId
})
})
}
}
})
},
// 获取船名航次下拉数据
getShip() {
uni.request({
url: this.$local + '/api/shipOperate/queryShipmentVoyageData?key=阳',
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode === 200) {
// this.shipList = res.data.data
let arr = res.data.data;
arr.forEach((v, index) => {
this.shipList.push({
text: v.spmName,
value: v.vvyId
})
})
}
}
})
},
// 港区下拉
pamChange(event) {},
// 船名航次下拉
shipChange(e) {},
// 点击搜索
search() {
this.initData()
2023-07-05 10:56:11 +08:00
},
2023-07-13 16:46:06 +08:00
// 点击下载
download(item) {
let ids = [item.outVvyName, item.inVvyName]
console.log(ids)
uni.request({
url: this.$local + '/api/shipOperate/download?vvyIds=' + ids,
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode === 200) {}
}
})
},
// 点击上传
upload() {},
2023-07-13 11:18:17 +08:00
toGo() {
uni.navigateTo({
url: `/pages/shipWork/documentList`
})
}
2023-07-05 10:56:11 +08:00
}
};
</script>
2023-07-13 16:46:06 +08:00
<style lang="less" scoped>
2023-07-05 10:56:11 +08:00
.container {
background-color: #f5f6fa;
display: flex;
2023-07-13 16:46:06 +08:00
min-height: calc(100vh - 44px - 40px);
2023-07-05 10:56:11 +08:00
}
.content {
padding: 20px;
2023-07-13 16:46:06 +08:00
min-height: calc(100vh - 44px - 40px);
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.form {
display: flex;
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.select {
2023-07-13 16:46:06 +08:00
width: 200px;
margin-right: 20px;
2023-07-05 10:56:11 +08:00
}
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.input {
width: 200px;
height: 35px;
line-height: 35px;
margin-left: 15px;
}
2023-07-13 16:46:06 +08:00
/deep/.van-button {
height: 35px;
line-height: 35px;
}
2023-07-05 10:56:11 +08:00
}
.itemList {
width: 100%;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
.item {
2023-07-06 17:08:59 +08:00
width: 49%;
2023-07-05 10:56:11 +08:00
margin-top: 15px;
2023-07-06 17:08:59 +08:00
margin-right: 2%;
2023-07-05 10:56:11 +08:00
border: 1px solid #c9cacb;
.title {
display: flex;
justify-content: space-between;
font-size: 21px;
2023-07-06 17:08:59 +08:00
padding: 10px 20px;
2023-07-05 10:56:11 +08:00
font-weight: 700;
}
.row {
display: flex;
justify-content: space-between;
font-size: 18px;
2023-07-06 17:08:59 +08:00
padding: 10px 20px;
2023-07-05 10:56:11 +08:00
2023-07-06 17:08:59 +08:00
.nitem {
width: 46%;
.text {
color: #929292;
}
2023-07-05 10:56:11 +08:00
}
}
2023-07-06 17:08:59 +08:00
.footer {
display: flex;
justify-content: space-between;
height: 60px;
line-height: 60px;
font-size: 21px;
background-color: #f7f9fa;
color: #8d8f8f;
.fitem {
width: 50%;
text-align: center;
}
}
2023-07-05 10:56:11 +08:00
}
.item:nth-child(2n) {
margin-right: 0;
}
}
}
2023-07-13 11:18:17 +08:00
</style>