queryDeparture.vue 7.6 KB
<template>
    <el-container>
        <el-main>
            <el-row class="row-bg">
                <el-col :span="24">
                    <div class="grid-content content">出港航班查询</div>
                </el-col>
            </el-row>
            <!--            搜索区域-->
            <el-row>
                <el-form :label-position="labelPosition" :model="queryDeparture" :rules="rules" ref="queryFlight"
                         label-width="130px" class="demo-ruleForm">
                    <el-col :span="6" >
                        <el-form-item label="承运人:" prop="awcd" label-width="80px">
                            <el-input v-model="queryDeparture.awcd" style="width:190px"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" >
                        <el-form-item label="航班号:" prop="flightNo" label-width="80px">
                            <el-input v-model="queryDeparture.flightNo" style="width:190px"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" >
                        <el-form-item label="航班日期:" prop="flightDate" label-width="90px">
                            <el-date-picker
                                    v-model="queryDeparture.flightDate"
                                    type="date"
                                    style="width:190px"
                                    placeholder="选择日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5" >
                        <el-button type="primary" @click="submitForm('queryDeparture')">查询</el-button>
                    </el-col>
                </el-form>
            </el-row>
            <!--            表单区域-->
            <el-row>
                <el-table
                        :data="tableData"
                        border
                        style="width: 100%;margin-bottom: 10px">
                    <el-table-column
                            fixed="left"
                            label="操作"
                            width="100">
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="primary"
                                    @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                        </template>
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="flightNo"
                            label="航班号"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="flightDate"
                            label="航班日期"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="aircraftNo"
                            label="航空器注册编码"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="departurePort"
                            label="出发港"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="arrivalPort"
                            label="目的港"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="customDistrictNo"
                            label="关区代码"
                            width="80">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="transportflag"
                            label="运输计划"
                            width="150">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="departuredatetime"
                            label="离港时间"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop="statusMsg"
                            label="海关回执"
                            width="150">
                    </el-table-column>
                    <el-table-column
                            fixed
                            prop=""
                            label="报文操作"
                            width="150">
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="success"
                                    @click="handleEdit(scope.$index, scope.row)">查看</el-button>
                        </template>
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="danger"
                                    @click="handleDel(scope.$index, scope.row)">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-row>
            <el-row>
                <div class="block">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="currentPage"
                            :page-sizes="[100, 200, 300, 400]"
                            :page-size="100"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="400">
                    </el-pagination>
                </div>
            </el-row>
        </el-main>
    </el-container>
</template>
<style scoped>
    .grid-content {
        height: 36px;
        line-height: 36px;
    }
    .el-dialog__body{text-align: center}
    .content {
        border-left: 4px #409EFF solid;
        padding-left: 10px;
        background-color: #f9fafc;
        margin-bottom: 2px
    }

    .row-bg{
        background-color: white;
    }

</style>
<script>
    export default {
        data(){
            return{
                queryDeparture:{
                    awcd:undefined,
                    flightNo:undefined,
                    flightDate:undefined,
                },
                rules:{
                    awcd: [
                        {required: true, message: '请输入', trigger: 'blur'}
                    ],
                    flightNo: [
                        {required: true, message: '请输入', trigger: 'blur'}
                    ],
                    flightDate: [
                        {required: true, message: '请选择', trigger: 'change'}
                    ],
                },
                labelPosition:'left',
                currentPage: 4,
                tableData:[]
            }
        },
        methods: {
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            }
        },
    }
</script>