审查视图

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

</script>
<style scoped>
王勇 authored
124
    .app-content {
125 126 127
        margin-top: 20px;
    }
</style>