ExitFlight.vue
4.9 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
<template>
<div class="app-content">
<!--<div class="app-container">-->
<div class="filter-container">
<el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" clearable type="date" style="width: 270px;"
placeholder="航班日期"
class="filter-item" value-format="yyyy-MM-dd"></el-date-picker>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</div>
<el-table :data="flightData" stripe style="font-size: 14px" border>
<el-table-column label="航班号" width="180px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="190px" 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="160px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="160px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="400px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
<el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
<el-button type="primary" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button>
<el-button type="primary" 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 {
total: 1,
listQuery: {
pageSize: 1,
limitSize: 10,
flightNo: '',
flightDate: undefined
},
flightData: [],
}
},
created() {
this.getList()
},
methods: {
/*设置默认航班时间*/
getdatatime() {
this.listQuery.flightDate = new Date();
},
getList() {
getFlightListForParam(this.listQuery).then(res => {
this.flightData = res.data.dataList
this.total = res.data.count
})
},
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>