审查视图

src/views/nmms/ExitFlight.vue 4.9 KB
1 2
<template>
    <div class="app-content">
王勇 authored
3
        <!--<div class="app-container">-->
4 5 6 7 8 9 10 11 12
        <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>
王勇 authored
13
            <el-table-column label="航班号" width="180px" align="center">
14 15 16 17
                <template slot-scope="scope">
                    <span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
                </template>
            </el-table-column>
王勇 authored
18
            <el-table-column label="航班日期" width="190px" align="center">
19 20 21 22 23
                <template slot-scope="scope">
                    <i class="el-icon-time"></i>
                    <span>{{ scope.row.flightDate }}</span>
                </template>
            </el-table-column>
王勇 authored
24
            <el-table-column label="始发站" width="160px" align="center">
25 26 27 28
                <template slot-scope="scope">
                    <span>{{ scope.row.originstation }}</span>
                </template>
            </el-table-column>
王勇 authored
29
            <el-table-column label="目的站" width="160px" align="center">
30 31 32 33
                <template slot-scope="scope">
                    <span>{{ scope.row.destinationstation }}</span>
                </template>
            </el-table-column>
王勇 authored
34
            <el-table-column label="操作" width="400px" align="center" fixed="right">
35
                <template slot-scope="scope">
36 37
                    <el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
                    <el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
38 39 40 41 42 43 44 45 46 47 48 49 50
                    <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'
王勇 authored
51
52 53 54 55 56 57 58 59 60 61
    export default {
        name: "ExitFlight",
        components: {Pagination},
        inject: ['reload'],
        data() {
            return {
                total: 1,
                listQuery: {
                    pageSize: 1,
                    limitSize: 10,
王勇 authored
62
                    flightNo: '',
63 64 65 66 67
                    flightDate: undefined
                },
                flightData: [],
            }
        },
王勇 authored
68 69
        created() {
            this.getList()
70 71
        },
        methods: {
王勇 authored
72 73 74 75
            /*设置默认航班时间*/
            getdatatime() {
                this.listQuery.flightDate = new Date();
            },
76
            getList() {
王勇 authored
77
                getFlightListForParam(this.listQuery).then(res => {
78 79 80 81 82 83 84 85 86
                    this.flightData = res.data.dataList
                    this.total = res.data.count
                })
            },
            handleSearch() {
                this.getList()
            },
            handleLoading(row) {
                row.messageType = 'MT4201'
87 88
                row.flightdate = row.flightDate
                row.flightno = row.flightNo
89 90 91
                this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
            },
            handleTidy(row) {
92
                row.messageType = 'MT5202'
93 94
                row.flightdate = row.flightDate
                row.flightno = row.flightNo
95 96 97 98
                this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
            },
            handleArrive(row) {
                row.messageType = 'MT3201'
99 100
                row.flightdate = row.flightDate
                row.flightno = row.flightNo
101 102 103 104
                this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
            },
            handlePre(row) {
                row.messageType = 'MT2201'
105 106
                row.flightdate = row.flightDate
                row.flightno = row.flightNo
107 108
                this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
            }
王勇 authored
109 110 111 112 113
        },
        // 页面加载完毕后触发的事件
        mounted() {
            var vm = this;
            vm.getdatatime();
114 115 116 117 118
        }
    }

</script>
<style scoped>
王勇 authored
119
    .app-content {
120 121 122
        margin-top: 20px;
    }
</style>