审查视图

src/views/airtransport/queryRouteaircraft.vue 13.1 KB
小范 authored
1 2 3 4 5 6 7 8 9 10
<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>
小范 authored
11
                <el-form :label-position="labelPosition" :model="queryRouteaircraft"  ref="queryRouteaircraft"
小范 authored
12
                         label-width="130px" class="demo-ruleForm">
小范 authored
13
                    <el-col :span="8" style="margin-left: 10px">
小范 authored
14 15 16 17 18 19 20 21 22 23
                        <el-form-item label="航空器所有人代码:" prop="airwayCode" label-width="130px">
                            <el-input v-model="queryRouteaircraft.airwayCode" style="width:190px"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8" >
                        <el-form-item label="航空器注册号:" prop="aircraftNo" label-width="110px">
                            <el-input v-model="queryRouteaircraft.aircraftNo" style="width:190px"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6" >
小范 authored
24
                        <el-button type="primary" @click="submitForm('queryRouteaircraft')">查询</el-button>
小范 authored
25 26 27 28 29 30 31 32
                    </el-col>
                </el-form>
            </el-row>
            <!--            表单区域-->
            <el-row>
                <el-table
                        :data="tableData"
                        border
小范 authored
33
                        height="500"
小范 authored
34
                        v-loading="tableloading"
小范 authored
35 36 37 38 39 40 41 42 43 44 45 46 47 48
                        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
                            prop=ownerCo"
小范 authored
49
                            label="航空器所有人代码">
小范 authored
50 51 52
                    </el-table-column>
                    <el-table-column
                            prop="airwayNameEn"
小范 authored
53
                            label="所有人英文名称">
小范 authored
54 55 56
                    </el-table-column>
                    <el-table-column
                            prop="airwayNameCn"
小范 authored
57
                            label="所有人中文名称">
小范 authored
58 59 60
                    </el-table-column>
                    <el-table-column
                            prop="aircraftNo"
小范 authored
61
                            label="航空器注册编号">
小范 authored
62 63 64
                    </el-table-column>
                    <el-table-column
                            prop="certNo"
小范 authored
65
                            label="国际证书编号">
小范 authored
66 67 68
                    </el-table-column>
                    <el-table-column
                            prop="owner"
小范 authored
69
                            label="航空器所有人">
小范 authored
70 71 72
                    </el-table-column>
                    <el-table-column
                            prop="areoNationality"
小范 authored
73
                            label="国籍">
小范 authored
74 75 76
                    </el-table-column>
                    <el-table-column
                            prop="areoModel"
小范 authored
77
                            label="机型">
小范 authored
78 79 80
                    </el-table-column>
                    <el-table-column
                            prop="deliverDate"
小范 authored
81
                            label="交付日期">
小范 authored
82 83 84
                    </el-table-column>
                    <el-table-column
                            prop="statusMsg"
小范 authored
85
                            label="海关回执">
小范 authored
86 87 88
                    </el-table-column>
                    <el-table-column
                            prop="supervisoryProperty"
小范 authored
89
                            label="所有权监管">
小范 authored
90 91
                    </el-table-column>
                    <el-table-column
小范 authored
92
                            fixed="right"
小范 authored
93 94
                            prop=""
                            label="报文操作"
小范 authored
95
                            width="400">
小范 authored
96 97 98
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
小范 authored
99 100
                                    type="primary"
                                    @click="selectDetail(scope.$index,scope.row)">查看回执</el-button>
小范 authored
101 102
                            <el-button
                                    size="mini"
小范 authored
103
                                    type="success"
104
                                    @click="change(scope.$index, scope.row)">变更申请</el-button>
小范 authored
105 106 107
                            <el-button
                                    size="mini"
                                    type="warning"
108
                                    @click="cancle(scope.$index, scope.row)">撤销申请</el-button>
小范 authored
109 110
                            <el-button
                                    size="mini"
小范 authored
111 112 113 114 115 116 117 118 119 120 121 122
                                    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"
小范 authored
123 124
                            :page-sizes="[10, 20, 30, 40]"
                            :page-size="pageSize"
小范 authored
125
                            layout="total, sizes, prev, pager, next, jumper"
小范 authored
126
                            :total="total">
小范 authored
127 128 129
                    </el-pagination>
                </div>
            </el-row>
小范 authored
130 131 132 133 134 135 136 137 138 139
            <!--查看回执弹框-->
            <el-dialog title="回执明细" :visible.sync="dialogTableVisible">
                <el-table :data="gridData">
                    <el-table-column property="sendtime" label="操作时间" ></el-table-column>
                    <el-table-column property="createBy" label="操作人" ></el-table-column>
                    <el-table-column property="flightNo" label="航班号"></el-table-column>
                    <el-table-column property="flightDate" label="航班日期" ></el-table-column>
                    <el-table-column property="receiptContent" label="回执内容" ></el-table-column>
                </el-table>
            </el-dialog>
小范 authored
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
        </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>
162 163 164 165 166 167 168 169
    import {
        editAirLineAircraft,
        selectAirLineAircraft,
        selectReturnMsg,
        cancleAirLineAircraft,
        changeAirLineAircraft,
        changeAircraft, cancleAircraft
    } from "../../api/transport";
小范 authored
170
小范 authored
171 172 173 174
    export default {
        data(){
            return{
                queryRouteaircraft:{
小范 authored
175
                    airwayCode:undefined,
小范 authored
176 177 178
                    aircraftNo:undefined,
                },
                labelPosition:'left',
小范 authored
179 180 181 182
                currentPage: 1,
                pageSize:10,
                total:0,
                tableData:[],
小范 authored
183 184 185
                tableloading:false,
                gridData:[],
                dialogTableVisible: false,
小范 authored
186 187 188
            }
        },
        methods: {
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
            //更改申请
            change(index, row) {
                this.$confirm('变更申请, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    changeAirLineAircraft(row).then(res => {
                        let response = res.data;
                        if (response.code == '200') {
                            this.$message({
                                type: 'success',
                                message: '变更申请成功'
                            });
                            this.submitForm();
                        } else {
                            this.$message({
                                type: 'info',
                                message: '变更申请失败'
                            });
                        }
                    });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消变更申请'
                    });
                });
            },
            //撤销申请
            cancle(index, row) {
                this.$confirm('撤销申请, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    cancleAirLineAircraft(row).then(res => {
                        let response = res.data;
                        if (response.code == '200') {
                            this.$message({
                                type: 'success',
                                message: '撤销申请成功'
                            });
                            this.submitForm();
                        } else {
                            this.$message({
                                type: 'info',
                                message: '撤销申请失败'
                            });
                        }
                    });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消撤销申请'
                    });
                });
            },
小范 authored
247 248 249 250 251 252 253 254 255 256 257
            //查询回执列表
            selectDetail(index,row){
                this.gridData=[];
                this.dialogTableVisible=true;
                let params={messageid:row.messageid};
                selectReturnMsg(params).then(res=>{
                    let response=res.data.data;
                    console.log(response)
                    this.gridData=response;
                });
            },
小范 authored
258
            //分页
小范 authored
259
            handleSizeChange(val) {
小范 authored
260
                this.pageSize=val;
小范 authored
261 262
            },
            handleCurrentChange(val) {
小范 authored
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
                this.currentPage=val;
                this.submitForm();
            },
            //获取航线航空器列表
            submitForm() {
                let params = {
                    currentPage: this.currentPage, pageSize: this.pageSize, airwayCode: this.queryRouteaircraft.airwayCode,
                    aircraftNo: this.queryRouteaircraft.aircraftNo
                };
                this.tableloading = true;
                selectAirLineAircraft(params).then(res => {
                    let response = res.data.data;
                    this.tableData = response.list;
                    this.tableloading = false;
                    this.total = response.total;
                });
            },
            //列表删除功能
            handleDel(index, row) {
                this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    editAirLineAircraft(row).then(res => {
                        let response = res.data;
                        if (response.code == '200') {
                            this.$message({
                                type: 'info',
                                message: '删除成功'
                            });
                            this.submitForm();
                        } else {
                            this.$message({
                                type: 'info',
                                message: '删除失败'
                            });
                        }
                    });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    });
                });
            },
            //获取默认值
            defaultData() {
小范 authored
311 312 313 314
                Object.assign(this.queryRouteaircraft, this.$route.query);

                // this.airwayCode = JSON.parse(this.$route.query.airwayCode);
                // this.aircraftNo = JSON.parse(this.$route.query.aircraftNo);
小范 authored
315 316 317 318 319 320
            },
            //编辑航线航空器
            handleEdit(index,row){
                this.$router.push({path:'/routeaircraft',query: row})
            },
小范 authored
321 322 323 324 325 326
        },
//渲染方法
        mounted(){
            this.defaultData();
            this.submitForm();
        }
小范 authored
327 328
    }
</script>