ExitFlight.vue
5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<template>
<div class="app-content">
<!--<div class="app-container">-->
<div class="filter-container" style="margin-top: 50px">
<el-input v-model="listQuery.flightNo" clearable style="width: 270px;margin-right: 10px" class="filter-item"
placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" clearable type="date" style="width: 270px;margin-right: 50px"
placeholder="航班日期"
class="filter-item" value-format="yyyy-MM-dd"></el-date-picker>
<el-button type="warning" style="width:150px" icon="el-icon-search" @click="handleSearch">查  询</el-button>
</div>
<el-table :data="flightData" v-loading="listLoading" stripe
style="border-radius: 10px 10px 0px 0px;line-height: 25px;" stripe
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" border>
<el-table-column label="航班号" width="200px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="250px" align="center">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="始发站" width="200px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="200px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
<el-button type="success" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
<el-button type="warning" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button>
<el-button type="danger" size="mini" @click="handleTidy(scope.row)">出港理货</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import {getFlightListForParam} from '@/api/exitFlight'
export default {
name: "ExitFlight",
components: {Pagination},
inject: ['reload'],
data() {
return {
listLoading: false,
total: 1,
listQuery: {
pageSize: 1,
limitSize: 10,
flightNo: '',
flightDate: undefined
},
flightData: [],
}
},
created() {
this.getList()
},
methods: {
/*设置默认航班时间*/
getdatatime() {
this.listQuery.flightDate = new Date();
},
getList() {
this.listLoading = true;
getFlightListForParam(this.listQuery).then(res => {
this.flightData = res.data.data.list
this.total = res.data.data.total
this.listLoading = false;
})
},
handleSearch() {
this.getList()
},
handleLoading(row) {
row.messageType = 'MT4201'
row.flightdate = row.flightdate
row.flightno = row.flightno
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleTidy(row) {
row.messageType = 'MT5202'
row.flightdate = row.flightdate
row.flightno = row.flightno
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleArrive(row) {
row.messageType = 'MT3201'
row.flightdate = row.flightdate
row.flightno = row.flightno
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handlePre(row) {
row.messageType = 'MT2201'
row.flightdate = row.flightdate
row.flightno = row.flightno
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
// 页面加载完毕后触发的事件
mounted() {
var vm = this;
vm.getdatatime();
}
}
</script>
<style scoped>
.app-content {
margin-top: 20px;
}
</style>