2023-07-03 17:49:29 +08:00
|
|
|
<template>
|
|
|
|
<view class="app">
|
2023-08-18 17:28:11 +08:00
|
|
|
<head-info :navIndex="0"></head-info>
|
2023-07-03 17:49:29 +08:00
|
|
|
<view class="container">
|
|
|
|
<view class="content">
|
|
|
|
<view class="form">
|
2023-07-06 17:08:59 +08:00
|
|
|
<view class="end">
|
2023-07-21 17:28:30 +08:00
|
|
|
<superwei-combox class="input" :candidates="portList" :isJSON="true" keyName="pamName"
|
|
|
|
placeholder="港区" v-model="portName" @input="portInput"
|
|
|
|
@select="portSelect"></superwei-combox>
|
|
|
|
<superwei-combox class="input" :candidates="shipList" :isJSON="true" keyName="vvyName"
|
|
|
|
placeholder="船名/航次" v-model="shipName" @input="shipInput"
|
|
|
|
@select="shipSelect"></superwei-combox>
|
2023-07-06 17:08:59 +08:00
|
|
|
</uni-easyinput>
|
2023-07-21 17:28:30 +08:00
|
|
|
<button class="btn" @click="onSearch">搜索</button>
|
2023-07-06 17:08:59 +08:00
|
|
|
</view>
|
2023-07-03 17:49:29 +08:00
|
|
|
</view>
|
|
|
|
<view class="itemList">
|
2023-07-21 17:28:30 +08:00
|
|
|
<view v-for="(item, index) in ltemList" :key="index" class="item" @click="toDetails(item.spmId)">
|
2023-07-06 17:08:59 +08:00
|
|
|
<view class="title">
|
|
|
|
<view class="name">
|
|
|
|
海王星领袖
|
|
|
|
</view>
|
|
|
|
<view class="status">
|
2023-07-21 17:28:30 +08:00
|
|
|
<text v-if="item.vvyStatus==2" class="green">● 作业中</text>
|
2023-07-06 17:08:59 +08:00
|
|
|
<text v-else>● 已完成</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="table">
|
|
|
|
<view class="row">
|
|
|
|
<view class="nitem">
|
|
|
|
航次: <text>735546</text>
|
|
|
|
</view>
|
|
|
|
<view class="nitem">
|
2023-07-21 17:28:30 +08:00
|
|
|
贸易类型: <text>{{item.tradeType}}</text>
|
2023-07-06 17:08:59 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="row">
|
|
|
|
<view class="nitem">
|
2023-07-21 17:28:30 +08:00
|
|
|
进出口: <text>{{item.importExportFlag}}</text>
|
2023-07-05 10:56:11 +08:00
|
|
|
</view>
|
2023-07-06 17:08:59 +08:00
|
|
|
<view class="nitem">
|
2023-07-21 17:28:30 +08:00
|
|
|
泊位: <text>{{item.actualBerthage}}</text>
|
2023-07-06 17:08:59 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2023-07-03 17:49:29 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import HeadInfo from '@/components/head-info/head-info';
|
2023-07-21 17:28:30 +08:00
|
|
|
import {
|
|
|
|
mapActions
|
|
|
|
} from 'vuex'
|
|
|
|
let timers = null;
|
2023-07-03 17:49:29 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2023-07-21 17:28:30 +08:00
|
|
|
ltemList: [],
|
|
|
|
portName: '',
|
|
|
|
portItem: {},
|
|
|
|
portList: [],
|
|
|
|
shipName: '',
|
|
|
|
shipItem: {},
|
|
|
|
shipList: []
|
2023-07-03 17:49:29 +08:00
|
|
|
}
|
|
|
|
},
|
2023-08-18 17:28:11 +08:00
|
|
|
onLoad() {},
|
2023-07-03 17:49:29 +08:00
|
|
|
components: {
|
|
|
|
HeadInfo
|
|
|
|
},
|
|
|
|
methods: {
|
2023-07-21 17:28:30 +08:00
|
|
|
...mapActions([
|
|
|
|
'majax',
|
|
|
|
'najax'
|
|
|
|
]),
|
|
|
|
portInput(e) {
|
|
|
|
clearTimeout(timers)
|
|
|
|
timers = setTimeout(() => {
|
|
|
|
this.getPort(e)
|
|
|
|
}, 500)
|
|
|
|
},
|
|
|
|
portSelect(e) {
|
|
|
|
this.portItem = e
|
|
|
|
this.shipName = ''
|
|
|
|
this.shipItem = {}
|
|
|
|
},
|
|
|
|
// 获取港口
|
|
|
|
getPort(keyWords) {
|
|
|
|
let data = {}
|
|
|
|
data.pamName = keyWords
|
|
|
|
this.majax({
|
|
|
|
url: this.$local + "/api/miniapp/portAreaManage/getPortArea",
|
|
|
|
params: data,
|
|
|
|
method: 'GET'
|
|
|
|
}).then(res => {
|
|
|
|
this.portList = res.data
|
|
|
|
})
|
|
|
|
// 模拟
|
|
|
|
this.portList = [{
|
|
|
|
potId: 1123,
|
|
|
|
pamName: '测试港口'
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
shipInput(e) {
|
|
|
|
clearTimeout(timers)
|
|
|
|
timers = setTimeout(() => {
|
|
|
|
this.getShip(e)
|
|
|
|
}, 500)
|
|
|
|
},
|
|
|
|
shipSelect(e) {
|
|
|
|
this.shipItem = e
|
|
|
|
},
|
|
|
|
// 获取船舶
|
|
|
|
getShip(keyWords) {
|
|
|
|
console.log(this.portName);
|
|
|
|
let data = {}
|
|
|
|
data.ieType = 'I' // I进口 E出口 暂无法区分
|
|
|
|
data.key = keyWords
|
|
|
|
data.pamId = this.portItem.pamId
|
|
|
|
this.majax({
|
|
|
|
url: this.$local + "/api/shipInstructions/queryByKey",
|
|
|
|
params: data,
|
|
|
|
method: 'GET'
|
|
|
|
}).then(res => {
|
|
|
|
this.shipList = res.data
|
|
|
|
})
|
|
|
|
// 模拟
|
|
|
|
this.shipList = [{
|
|
|
|
vvyId: 1123,
|
|
|
|
vvyName: '测试航次'
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
onSearch() {
|
|
|
|
let data = {}
|
|
|
|
data.tradeType = '外贸' // I进口 E出口 暂无法区分
|
|
|
|
data.vvyId = this.shipItem.vvyId
|
|
|
|
data.pamId = this.portItem.pamId
|
|
|
|
this.majax({
|
|
|
|
url: this.$local + "/api/shipInstructions/queryStowageVoyages",
|
|
|
|
params: data,
|
|
|
|
method: 'GET'
|
|
|
|
}).then(res => {
|
|
|
|
this.ltemList = res.data.records
|
|
|
|
})
|
|
|
|
// 模拟
|
|
|
|
this.ltemList = [{
|
|
|
|
actualBerthage: "一号位置",
|
|
|
|
actualBerthageDesc: "",
|
|
|
|
importExportFlag: "出口",
|
|
|
|
spmId: "spm1112",
|
|
|
|
spmIdDesc: "331122",
|
|
|
|
tradeType: "内贸",
|
|
|
|
vvyId: "11231",
|
|
|
|
vvyName: "海王星领袖",
|
|
|
|
vvyStatus: "2",
|
|
|
|
vvyStatusName: "作业中",
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
toDetails(id) {
|
2023-08-23 17:42:44 +08:00
|
|
|
const newId = encodeURIComponent(JSON.stringify(id));
|
2023-07-06 17:08:59 +08:00
|
|
|
uni.navigateTo({
|
2023-08-23 17:42:44 +08:00
|
|
|
url: '/pages/index/instruct?id=' + newId
|
2023-07-06 17:08:59 +08:00
|
|
|
})
|
2023-07-13 17:21:12 +08:00
|
|
|
},
|
2023-07-03 17:49:29 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2023-07-25 13:20:04 +08:00
|
|
|
<style lang="less">
|
2023-07-03 17:49:29 +08:00
|
|
|
.container {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
flex: 1;
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
.form {
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
2023-07-06 17:08:59 +08:00
|
|
|
.end {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.input {
|
|
|
|
width: 200px;
|
|
|
|
height: 35px;
|
|
|
|
line-height: 35px;
|
|
|
|
padding-left: 10px;
|
2023-08-18 17:28:11 +08:00
|
|
|
margin-right: 15px;
|
2023-07-06 17:08:59 +08:00
|
|
|
}
|
2023-07-21 17:28:30 +08:00
|
|
|
|
|
|
|
.btn {
|
|
|
|
height: 35px;
|
|
|
|
line-height: 35px;
|
|
|
|
margin-left: 20px;
|
|
|
|
}
|
2023-07-03 17:49:29 +08:00
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
|
2023-07-03 17:49:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.itemList {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-start;
|
|
|
|
flex-wrap: wrap;
|
2023-07-06 17:08:59 +08:00
|
|
|
|
2023-07-03 17:49:29 +08:00
|
|
|
.item {
|
|
|
|
width: 32%;
|
|
|
|
margin-top: 15px;
|
|
|
|
margin-right: 2%;
|
2023-07-05 10:56:11 +08:00
|
|
|
height: 160px;
|
2023-07-03 17:49:29 +08:00
|
|
|
border: 1px solid #c9cacb;
|
2023-07-05 10:56:11 +08:00
|
|
|
padding: 22px 15px;
|
2023-07-06 17:08:59 +08:00
|
|
|
|
2023-07-05 10:56:11 +08:00
|
|
|
.title {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-size: 21px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
font-weight: 700;
|
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
|
2023-07-05 10:56:11 +08:00
|
|
|
.status {
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
|
|
|
|
|
2023-07-05 10:56:11 +08:00
|
|
|
.row {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-size: 18px;
|
|
|
|
margin: 10px 0;
|
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
|
|
|
|
2023-07-05 10:56:11 +08:00
|
|
|
}
|
2023-07-03 17:49:29 +08:00
|
|
|
}
|
2023-07-06 17:08:59 +08:00
|
|
|
|
2023-07-03 17:49:29 +08:00
|
|
|
.item:nth-child(3n) {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-13 17:21:12 +08:00
|
|
|
</style>
|