审查视图

src/views/airtransport/queryConfigure.vue 9.0 KB
小范 authored
1 2 3 4 5 6 7 8 9
<template>
    <el-container>
        <el-main>
            <el-row class="row-bg">
                <el-col :span="24">
                    <div class="grid-content content">进港航班配置查询</div>
                </el-col>
            </el-row>
            <!--            搜索区域-->
小范 authored
10
            <el-row style="padding-top: 20px">
小范 authored
11
                <el-form :label-position="labelPosition" :model="queryConfigure"  ref="queryFlight"
小范 authored
12 13
                         label-width="130px" class="demo-ruleForm">
小范 authored
14
                    <el-col :span="8"   style="margin-right: 170px">
小范 authored
15 16 17 18 19
                        <el-form-item label="航班号:" prop="flightNo" label-width="80px">
                            <el-input v-model="queryConfigure.flightNo" style="width:190px"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5" >
小范 authored
20
                        <el-button type="primary" @click="submitForm()">查询</el-button>
小范 authored
21 22 23 24 25 26 27 28
                    </el-col>
                </el-form>
            </el-row>
            <!--            表单区域-->
            <el-row>
                <el-table
                        :data="tableData"
                        border
小范 authored
29
                        height="500"
小范 authored
30
                        v-loading="tableloading"
小范 authored
31
                        style="margin-bottom: 20px;margin-top: 10px">
小范 authored
32 33 34 35 36 37 38 39 40 41 42 43 44
                    <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="username"
小范 authored
45
                            label="用户名">
小范 authored
46 47
                    </el-table-column>
                    <el-table-column
小范 authored
48
                            prop="flightNo"
小范 authored
49
                            label="航班号">
小范 authored
50 51
                    </el-table-column>
                    <el-table-column
小范 authored
52
                            prop="ieType"
小范 authored
53
                            label="进出港">
小范 authored
54 55 56
                    </el-table-column>
                    <el-table-column
                            prop="createby"
小范 authored
57
                            label="创建人">
小范 authored
58 59 60 61
                    </el-table-column>
                    <el-table-column
                            prop="createtime"
                            label="创建时间"
小范 authored
62
                            width="130">
小范 authored
63 64 65
                    </el-table-column>
                    <el-table-column
                            prop="updateby"
小范 authored
66
                            label="更新人">
小范 authored
67 68 69 70
                    </el-table-column>
                    <el-table-column
                            prop="updatetime"
                            label="更新时间"
小范 authored
71
                            width="130">
小范 authored
72 73
                    </el-table-column>
                    <el-table-column
小范 authored
74
                            fixed="right"
小范 authored
75 76
                            prop=""
                            label="报文操作"
小范 authored
77
                            width="200">
小范 authored
78
                        <template slot-scope="scope">
79 80 81 82
<!--                            <el-button-->
<!--                                    size="mini"-->
<!--                                    type="primary"-->
<!--                                    @click="selectDetail(scope.$index,scope.row)">查看回执</el-button>-->
小范 authored
83 84 85 86 87 88 89 90 91 92 93 94 95
                            <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"
96
                            :current-page="pageNum"
小范 authored
97 98
                            :page-sizes="[10, 20, 30, 40]"
                            :page-size="pageSize"
小范 authored
99
                            layout="total, sizes, prev, pager, next, jumper"
小范 authored
100
                            :total="total">
小范 authored
101 102 103
                    </el-pagination>
                </div>
            </el-row>
小范 authored
104 105 106 107 108 109 110 111 112 113
            <!--查看回执弹框-->
            <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
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
        </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>
小范 authored
136
    import {editSchedule, selectReturnMsg, selectSchedule} from "../../api/transport";
小范 authored
137
小范 authored
138 139 140 141 142 143 144
    export default {
        data(){
            return{
                queryConfigure:{
                    flightNo:undefined,
                },
                labelPosition:'left',
145
                pageNum: 1,
小范 authored
146 147 148
                pageSize:10,
                total:0,
                tableloading:false,
小范 authored
149 150 151
                tableData:[],
                gridData:[],
                dialogTableVisible: false,
小范 authored
152 153 154
            }
        },
        methods: {
小范 authored
155 156 157 158 159 160 161 162 163 164 165
            //查询回执列表
            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
166
            //分页
小范 authored
167
            handleSizeChange(val) {
小范 authored
168
                this.pageSize=val;
小范 authored
169 170
            },
            handleCurrentChange(val) {
171
                this.pageNum=val;
小范 authored
172 173 174 175 176
                this.submitForm();
            },
            //获取进港航班配置查询列表
            submitForm() {
                let params = {
小范 authored
177
                    pageNum: this.pageNum, pageSize: this.pageSize, flightNo: this.queryConfigure.flightNo,ieType:'0'
小范 authored
178 179 180 181 182 183 184 185 186 187 188 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
                };
                this.tableloading = true;
                selectSchedule(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(() => {
                    editSchedule(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
218 219 220
                Object.assign(this.queryConfigure, this.$route.query);

                // this.flightNo = JSON.parse(this.$route.query.flightNo);
小范 authored
221 222 223 224 225
            },
            //编辑进港航班配置
            handleEdit(index,row){
                this.$router.push({path:'/configure',query: row})
            },
小范 authored
226
        },
小范 authored
227 228 229 230 231
        //渲染方法
        mounted(){
            this.defaultData();
            this.submitForm();
        }
小范 authored
232
    }
小范 authored
233
</script>