|
|
<template>
|
|
|
<div>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="4">
|
|
|
<el-input
|
|
|
placeholder="航空器注册编号"
|
|
|
v-model="query.aircraftNo"
|
|
|
size="medium"
|
|
|
clearable>
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-input
|
|
|
placeholder="进出境航班号"
|
|
|
v-model="query.flightNo"
|
|
|
size="medium"
|
|
|
clearable>
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<div class="block">
|
|
|
<el-date-picker
|
|
|
v-model="flightdate"
|
|
|
type="daterange"
|
|
|
:picker-options="pickerOptions"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
size="medium"
|
|
|
align="right">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-select v-model="query.customDistrictNo"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
remote
|
|
|
:remote-method="getCustomCode"
|
|
|
size="medium"
|
|
|
:loading="loading" placeholder="海关关区">
|
|
|
<el-option
|
|
|
v-for="item in customcodes"
|
|
|
:key="item.customcode"
|
|
|
:label="item.customcode"
|
|
|
:value="item.customcode">
|
|
|
<span style="float: left">{{ item.customcode }}</span>
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.customname }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="4">
|
|
|
<el-select v-model="query.accessFlag" size="medium" placeholder="请选择">
|
|
|
<el-option label="进境" value="0"></el-option>
|
|
|
<el-option label="出境" value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-select v-model="query.yqtype" size="medium" placeholder="请选择">
|
|
|
<el-option label="预报" value="Y"></el-option>
|
|
|
<el-option label="确报" value="Q"></el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="2">
|
|
|
<el-button size="medium" type="primary" @click="selectList" plain>查询</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="2">
|
|
|
<el-button size="medium" type="success" @click="addForm()" plain>新增</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
border
|
|
|
style="width: 100%">
|
|
|
<el-table-column
|
|
|
fixed="left"
|
|
|
label="信息操作"
|
|
|
width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="messageid"
|
|
|
label="编号"
|
|
|
width="240">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="aircraftNo"
|
|
|
label="航空器注册编号"
|
|
|
width="110">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="flightNo"
|
|
|
label="进出境航班号"
|
|
|
width="120">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="flightDate"
|
|
|
label="航班日期"
|
|
|
width="120">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="进出类型"
|
|
|
width="120">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.accessFlag === '0' ? '进境' : '出境' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="申报类型"
|
|
|
width="120">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.yqtype === 'Y' ? '预报' : '确报' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="进出境时间"
|
|
|
width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.accessFlag === '0'">{{ scope.row.arrivaldatetime }}</span>
|
|
|
<span v-else>{{ scope.row.departuredatetime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="arrivalPort"
|
|
|
label="目的港"
|
|
|
width="120">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="statusMsg"
|
|
|
label="海关状态"
|
|
|
width="120">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
width="220">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="returnlist(scope.row)" type="text" size="small">查看</el-button>
|
|
|
<el-button @click="sendpre(scope.row,2)" type="text" size="small">申报</el-button>
|
|
|
<el-button @click="sendpre(scope.row,5)" type="text" size="small">修改</el-button>
|
|
|
<el-button @click="sendpre(scope.row,3)" type="text" size="small">删除</el-button>
|
|
|
<el-button @click="cancleSB(scope.row)" type="text" size="small">取消</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<div class="block">
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="query.pageNum"
|
|
|
:page-sizes="[100, 200, 300, 400]"
|
|
|
:page-size="query.pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-dialog
|
|
|
:title="'预确报信息'+textMap[dialogStatus]"
|
|
|
:visible.sync="dialogVisible"
|
|
|
width="80%"
|
|
|
center>
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="130px">
|
|
|
<el-divider content-position="left"><span style="color: #1d8ce0">报给单位</span></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="海关关区" prop="customDistrictNo">
|
|
|
<el-select v-model="form.customDistrictNo"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
remote
|
|
|
:remote-method="getCustomCode2"
|
|
|
:loading="loading" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in customcodes2"
|
|
|
:key="item.customcode"
|
|
|
:label="item.customcode"
|
|
|
:value="item.customcode">
|
|
|
<span style="float: left">{{ item.customcode }}</span>
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.customname }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="进出类型" prop="accessFlag">
|
|
|
<el-select v-model="form.accessFlag" placeholder="请选择">
|
|
|
<el-option label="进境" value="0"></el-option>
|
|
|
<el-option label="出境" value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="申报类型" prop="yqtype">
|
|
|
<el-select v-model="form.yqtype" placeholder="请选择">
|
|
|
<el-option label="预报" value="Y"></el-option>
|
|
|
<el-option label="确报" value="Q"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><span style="color: #1d8ce0">航空器信息</span></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="航空器注册编号" prop="aircraftno">
|
|
|
<el-input v-model="form.aircraftNo"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="注册海关关区" prop="costomcode">
|
|
|
<el-select v-model="form.costomcode"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
remote
|
|
|
:remote-method="getCustomCode3"
|
|
|
:loading="loading" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in customcodes3"
|
|
|
:key="item.customcode"
|
|
|
:label="item.customcode"
|
|
|
:value="item.customcode">
|
|
|
<span style="float: left">{{ item.customcode }}</span>
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.customname }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="航空器备案类型" prop="aircrafttype">
|
|
|
<el-select v-model="form.aircrafttype" placeholder="请选择">
|
|
|
<el-option label="通用航空器" value="1"></el-option>
|
|
|
<el-option label="航线航空器" value="2"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><span style="color: #1d8ce0">航班信息</span></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="进出境航班号" prop="flightNo">
|
|
|
<el-input v-model="form.flightNo"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="航班日期" prop="flightDate" style="width: 100%;">
|
|
|
<div class="block">
|
|
|
<el-date-picker
|
|
|
v-model="form.flightDate"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
|
style="width: 100%;"
|
|
|
></el-date-picker>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="停机位" prop="stayid">
|
|
|
<el-input v-model="form.stayid"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="出发港" prop="departurePort" style="width: 100%;">
|
|
|
<el-select v-model="form.departurePort"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
remote
|
|
|
:remote-method="getAirportCode"
|
|
|
:loading="loading" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in airportcodes"
|
|
|
:key="item.airportid"
|
|
|
:label="item.airportid"
|
|
|
:value="item.airportid">
|
|
|
<span style="float: left">{{ item.airportid }}</span>
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.airportname}}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="目的港" prop="arrivalPort" style="width: 100%;">
|
|
|
<el-select v-model="form.arrivalPort"
|
|
|
filterable
|
|
|
allow-create
|
|
|
default-first-option
|
|
|
remote
|
|
|
:remote-method="getAirportCode2"
|
|
|
:loading="loading" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in airportcodes2"
|
|
|
:key="item.airportid"
|
|
|
:label="item.airportid"
|
|
|
:value="item.airportid">
|
|
|
<span style="float: left">{{ item.airportid }}</span>
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.airportname}}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="出境时间" prop="departuredatetime" style="width: 100%;">
|
|
|
<el-date-picker
|
|
|
v-model="form.departuredatetime"
|
|
|
type="datetime"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="yyyy-MM-dd HH:mm:ss"
|
|
|
style="width: 100%;">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="进境时间" prop="arrivaldatetime" style="width: 100%;">
|
|
|
<el-date-picker
|
|
|
v-model="form.arrivaldatetime"
|
|
|
type="datetime"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="yyyy-MM-dd HH:mm:ss"
|
|
|
style="width: 100%;">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider content-position="left"><span style="color: #1d8ce0">海关备注</span></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="海关备注">
|
|
|
<el-input v-model="form.meno"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-divider></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12" :offset="6">
|
|
|
<el-form-item>
|
|
|
<el-button @click="dialogVisible=false">取消</el-button>
|
|
|
<el-button type="primary" @click="dialogStatus==='create'?createData('form'):updateData('form')">暂存</el-button>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-dialog
|
|
|
title="回执列表"
|
|
|
:visible.sync="returnVisible"
|
|
|
width="55%"
|
|
|
:before-close="handleClose">
|
|
|
<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>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-dialog title="航班取消申报" :visible.sync="dialogFormVisible">
|
|
|
<el-form :model="cancleForm">
|
|
|
<el-form-item label="取消原因" label-width="130px">
|
|
|
<el-input v-model="cancleForm.content" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="sendpre">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
selectByairportcode,
|
|
|
selectBycustomcode,
|
|
|
selectPreList,
|
|
|
insertSelectivePre,
|
|
|
updateByPrimaryKeySelectivePre, selectReturnMsgList, canclePre
|
|
|
} from "../../api/transport/transport2.0";
|
|
|
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
|
cancleForm:{
|
|
|
content:''
|
|
|
},
|
|
|
dialogFormVisible:false,
|
|
|
textMap:{
|
|
|
update: '编辑',
|
|
|
create: '新增'
|
|
|
},
|
|
|
dialogStatus:'',
|
|
|
dialogVisible:false,
|
|
|
form: {
|
|
|
uuid: '', // 唯一标识符
|
|
|
awcd: '', // 不知道具体含义,根据业务需求填充
|
|
|
aircraftNo: '', // 飞机编号
|
|
|
flightNo: '', // 航班号
|
|
|
flightDate: '', // 航班日期
|
|
|
departurePort: '', // 出发港
|
|
|
arrivalPort: '', // 到达港
|
|
|
departuredatetime: '', // 出发日期时间
|
|
|
departuredate: '', // 出发日期
|
|
|
stayid: '', // 停留ID
|
|
|
departureconveyancefacility: '', // 出发运输设施
|
|
|
arrivalconveyancefacility: '', // 到达运输设施
|
|
|
arrivaldatetime: '', // 到达日期时间
|
|
|
arrivaldate: '', // 到达日期
|
|
|
dischargecompleteddatetime: '', // 卸载完成日期时间
|
|
|
transportflag: '', // 运输标志
|
|
|
customDistrictNo: '', // 海关区号
|
|
|
cancelFlag: '', // 取消标志
|
|
|
accessFlag: '0', // 访问标志
|
|
|
meno: '', // 备注
|
|
|
createTime: '', // 创建时间
|
|
|
createBy: '', // 创建人
|
|
|
updateTime: '', // 更新时间
|
|
|
updateBy: '', // 更新人
|
|
|
isDelete: '0', // 是否删除
|
|
|
status: '', // 状态
|
|
|
statusMsg: '', // 状态信息
|
|
|
messageid: '', // 消息ID
|
|
|
yqtype: 'Y', // 不知道具体含义,根据业务需求填充
|
|
|
costomcode:'',
|
|
|
aircrafttype:'1'
|
|
|
},
|
|
|
tableData:[],
|
|
|
total:0,
|
|
|
query:{
|
|
|
aircraftNo:'',
|
|
|
flightNo:'',
|
|
|
starttime:'',
|
|
|
endtime:'',
|
|
|
customDistrictNo:'',
|
|
|
accessFlag:'',
|
|
|
yqtype:'',
|
|
|
pageNum:0,
|
|
|
pageSize:10
|
|
|
},
|
|
|
customcodes:[],
|
|
|
customcodes2:[],
|
|
|
customcodes3:[],
|
|
|
airportcodes:[],
|
|
|
airportcodes2:[],
|
|
|
loading:false,
|
|
|
flightdate:['2024-12-22','2024-12-25'],
|
|
|
pickerOptions: {
|
|
|
shortcuts: [{
|
|
|
text: '最近一周',
|
|
|
onClick(picker) {
|
|
|
const end = new Date();
|
|
|
const start = new Date();
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
}
|
|
|
}, {
|
|
|
text: '最近一个月',
|
|
|
onClick(picker) {
|
|
|
const end = new Date();
|
|
|
const start = new Date();
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
}
|
|
|
}, {
|
|
|
text: '最近三个月',
|
|
|
onClick(picker) {
|
|
|
const end = new Date();
|
|
|
const start = new Date();
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
rules:{
|
|
|
aircraftNo: [
|
|
|
{ required: true, message: '航空注册器编号不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
flightNo: [
|
|
|
{ required: true, message: '航班号不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
flightDate: [
|
|
|
{ required: true, message: '航班日期不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
customDistrictNo: [
|
|
|
{ required: true, message: '海关关区不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
costomcode: [
|
|
|
{ required: true, message: '海关关区不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
aircrafttype: [
|
|
|
{ required: true, message: '航空器备案类型不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
stayid: [
|
|
|
{ required: true, message: '停机位不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
departurePort: [
|
|
|
{ required: true, message: '出发港不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
arrivalPort: [
|
|
|
{ required: true, message: '目的港不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
departuredatetime: [
|
|
|
{ required: true, message: '出境不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
arrivaldatetime: [
|
|
|
{ required: true, message: '进境不可为空', trigger: 'blur' }
|
|
|
],
|
|
|
},
|
|
|
returnVisible:false,
|
|
|
gridData:[],
|
|
|
row2:undefined
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
cancleSB(row){
|
|
|
this.dialogFormVisible=true;
|
|
|
this.row2=row;
|
|
|
|
|
|
},
|
|
|
sendpre(){
|
|
|
this.row2.content=this.cancleForm.content;
|
|
|
const params = {
|
|
|
row: this.row2,
|
|
|
FunctionCode: 2
|
|
|
};
|
|
|
canclePre(params).then(res =>{
|
|
|
let response=res.data;
|
|
|
if(response.code=='200'){
|
|
|
this.dialogFormVisible=false;
|
|
|
this.selectList();
|
|
|
this.$message.success(response.msg)
|
|
|
}else{
|
|
|
this.$message.error(response.msg)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.returnVisible=false;
|
|
|
},
|
|
|
//查询回执列表
|
|
|
returnlist(row){
|
|
|
this.gridData=[];
|
|
|
let params={messageid:row.messageid};
|
|
|
selectReturnMsgList(params).then(res=>{
|
|
|
let response=res.data.data;
|
|
|
this.gridData=response;
|
|
|
});
|
|
|
this.returnVisible=true;
|
|
|
},
|
|
|
createData(formName){
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
insertSelectivePre(this.form).then(res =>{
|
|
|
let response=res.data;
|
|
|
if(response.code=='200'){
|
|
|
this.dialogVisible=false;
|
|
|
this.$message.success(response.msg);
|
|
|
this.selectList();
|
|
|
}else{
|
|
|
this.$message.error(response.msg)
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
updateData(formName){
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.form.departuredatetime=this.form.arrivaldatetime;
|
|
|
this.form.departureAirport=this.form.arrivalAirport;
|
|
|
updateByPrimaryKeySelectivePre(this.form).then(res =>{
|
|
|
let response=res.data;
|
|
|
if(response.code=='200'){
|
|
|
this.dialogVisible=false;
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
this.$message.success(response.msg);
|
|
|
this.getList();
|
|
|
}else{
|
|
|
this.$message.error(response.msg)
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//获取关区代码
|
|
|
getCustomCode:function(query){
|
|
|
this.customcodes=[];
|
|
|
let params={customcode:query};
|
|
|
this.loading = true;
|
|
|
selectBycustomcode(params).then(res =>{
|
|
|
if (res !== '') {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
this.customcodes=res.data.data;
|
|
|
}, 200);
|
|
|
} else {
|
|
|
this.customcodes = [];
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
//获取关区代码
|
|
|
getCustomCode2:function(query){
|
|
|
this.customcodes2=[];
|
|
|
let params={customcode:query};
|
|
|
this.loading = true;
|
|
|
selectBycustomcode(params).then(res =>{
|
|
|
if (res !== '') {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
this.customcodes2=res.data.data;
|
|
|
}, 200);
|
|
|
} else {
|
|
|
this.customcodes2 = [];
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
//获取关区代码
|
|
|
getCustomCode3:function(query){
|
|
|
this.customcodes3=[];
|
|
|
let params={customcode:query};
|
|
|
this.loading = true;
|
|
|
selectBycustomcode(params).then(res =>{
|
|
|
if (res !== '') {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
this.customcodes3=res.data.data;
|
|
|
}, 200);
|
|
|
} else {
|
|
|
this.customcodes3 = [];
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
//获取机场代码
|
|
|
getAirportCode:function(query){
|
|
|
this.airportcodes=[];
|
|
|
let params={airportid:query};
|
|
|
this.loading = true;
|
|
|
selectByairportcode(params).then(res =>{
|
|
|
if (res !== '') {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
this.airportcodes=res.data.data;
|
|
|
}, 200);
|
|
|
} else {
|
|
|
this.airportcodes = [];
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
//获取机场代码
|
|
|
getAirportCode2:function(query){
|
|
|
this.airportcodes2=[];
|
|
|
let params={airportid:query};
|
|
|
this.loading = true;
|
|
|
selectByairportcode(params).then(res =>{
|
|
|
if (res !== '') {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false;
|
|
|
this.airportcodes2=res.data.data;
|
|
|
}, 200);
|
|
|
} else {
|
|
|
this.airportcodes2 = [];
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
selectList(){
|
|
|
if(this.flightdate !== null && this.flightdate !== ""){
|
|
|
this.query.starttime = this.flightdate[0];
|
|
|
this.query.endtime = this.flightdate[1];
|
|
|
}else{
|
|
|
return this.$message.error('请选取时间区间')
|
|
|
}
|
|
|
this.loading = true;
|
|
|
selectPreList(this.query).then((response) => {
|
|
|
const res = response.data
|
|
|
if (res.code !== '200') {
|
|
|
this.loading = false;
|
|
|
return this.$message.error('获取消息收发记录,失败!')
|
|
|
}
|
|
|
// 获取列表数据
|
|
|
this.tableData = res.data.list
|
|
|
// 获取列表的总记录数
|
|
|
this.total = res.data.total
|
|
|
this.loading = false;
|
|
|
this.$message.success('获取消息收发记录,成功!');
|
|
|
}).catch(error => {
|
|
|
// 关闭加载
|
|
|
this.$message.error(error.toString())
|
|
|
})
|
|
|
},
|
|
|
//新增
|
|
|
addForm(){
|
|
|
this.dialogVisible=true;
|
|
|
this.dialogStatus='create';
|
|
|
},
|
|
|
handleClick(row){
|
|
|
this.dialogVisible=true;
|
|
|
this.dialogStatus='update';
|
|
|
this.form=row;
|
|
|
},
|
|
|
//分页
|
|
|
handleSizeChange(val) {
|
|
|
this.query.pageSize=val;
|
|
|
this.selectList();
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.query.pageNum=val;
|
|
|
this.selectList();
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
</script> |
...
|
...
|
|