作者 xudada

Merge branch 'flightplan2.0'

# Conflicts:
#	src/routes.js
#	src/views/nav3/Way.vue
... ... @@ -32,6 +32,9 @@ export const addTeleAddr = params => {return axios.post(`${base1}/teleaddr/addTe
export const delTeleAddr = params => {return http.get(`${base1}/teleaddr/delTeleAddr`, params);};
export const ediTeleAddr = params => {return axios.post(`${base1}/teleaddr/ediTeleAddr`, params);};
export const selectLists = params => {return http.get(`${base1}/teleaddr/selectLists`, params);};
//结算统计
export const selectStatistics = params => {return http.get(`${base1}/efre/selectStatistics`, params);};
... ...
import http from "../http";
let baseUrl = 'air-server-transport'
let baseUrlResultMsg = 'air-server-transport/transport/returnmsg'
//查询海关代码,机场代码
export const selectBycustomcode = params => { return http.get(`${baseUrl}/transport/customcode/selectBycustomcode`, params); };
export const selectByairportcode = params => { return http.get(`${baseUrl}/transport/airportcode/selectByairportcode`, params); };
//在港动态信息
export const insertSelective = params => { return http.post(`${baseUrl}/transport/aircraftStaying/insertSelective`, params); };
export const updateByPrimaryKeySelective = params => { return http.post(`${baseUrl}/transport/aircraftStaying/updateByPrimaryKeySelective`, params); };
export const selectLists = params => { return http.get(`${baseUrl}/transport/aircraftStaying/selectLists`, params); };
export const sendAircraftstaying = params => { return http.post(`${baseUrl}/transport/aircraftStaying/sendAircraftstaying`, params); };
//查询回执列表
export const selectReturnMsgList=params=>{return http.get(`${baseUrlResultMsg}/selectReturnMsg`, params);};
//单证申报
export const selectBillLists = params => { return http.get(`${baseUrl}/transport/bill/selectBillLists`, params); };
export const insertSelectiveBill = params => { return http.post(`${baseUrl}/transport/bill/insertSelectiveBill`, params); };
export const updateByPrimaryKeySelectiveBill = params => { return http.post(`${baseUrl}/transport/bill/updateByPrimaryKeySelectiveBill`, params); };
export const sendBillSdeclare = params => { return http.post(`${baseUrl}/transport/bill/sendBillSdeclare`, params); };
export const batchJZImport = params => { return http.postExcelData(`${baseUrl}/transport/bill/batchJZImport`, params); };
//预确报申报
export const selectPreList = params => { return http.get(`${baseUrl}/transport/prediction/selectList`, params); };
export const insertSelectivePre = params => { return http.post(`${baseUrl}/transport/prediction/insertSelective`, params); };
export const updateByPrimaryKeySelectivePre = params => { return http.post(`${baseUrl}/transport/prediction/updateByPrimaryKeySelective`, params); };
export const sendPrediction = params => { return http.post(`${baseUrl}/transport/prediction/sendPrediction`, params); };
export const canclePre = params => { return http.post(`${baseUrl}/transport/prediction/canclePre`, params); };
... ...
... ... @@ -189,6 +189,7 @@ import TeleAddr from "./views/nav3/TeleAddr.vue";
//朱总让做的网页在线客服
import Webdialog from './views/bus/Webdialog.vue'
import C6Way from './views/nav3/C6Way.vue'
import DBstatistics from './views/nav3/statistics.vue'
//转运申请
import Transport from './views/nav4/Transport.vue'
... ... @@ -210,6 +211,12 @@ import ManagerWaybill from "./views/exportorder/ManagerWaybill.vue";
import ZhiDan from './views/zhidan/zhidan.vue'
import Rate from './views/zhidan/rate.vue'
//运输工具2.0
import zaigang from './views/airtransport/zaigang.vue'
import gongtui from './views/airtransport/gongtui.vue'
import danzheng from './views/airtransport/danzheng.vue'
import yqdeclare from './views/airtransport/yqdeclare.vue'
// 邮件风控
import MailRisk from './views/mail_risk/index.vue'
... ... @@ -279,6 +286,7 @@ let routes = [
{path: '/Webdialog', component: Webdialog, name: '在线客服'},
{path: '/TeleAddr', component: TeleAddr, name: '电报地址'},
{path: '/C6Way', component: C6Way, name: 'C6货运单'},
{path: '/DBstatistics', component: DBstatistics, name: '结算统计'},
]
},
{
... ... @@ -675,11 +683,11 @@ let routes = [
{
path: '/at',
component: HomeNew,
name: '在港动态',
name: '在港申报',
iconCls:'el-icon-goods',
children:[
{path:'/dynamics',component:dynamics,name:'在港动态信息'},
{path:'/matter',component:matter,name:'物料申报管理'}
{path:'/dynamics',component:dynamics,name:'在港动态申报'},
{path:'/matter',component:matter,name:'供退物料申报'}
]
},
{
... ... @@ -783,6 +791,18 @@ let routes = [
{ path: '/page6', component: Page6, name: '综合楼空调站' },
]
},
{
path: '/zg',
component: HomeNew,
name: '在港申报2.0',
iconCls:'el-icon-goods',
children:[
{path:'/gongtui',component:gongtui,name:'供退物料申报'},
{path:'/zaigang',component:zaigang,name:'在港动态申报'},
{path:'/danzheng',component:danzheng,name:'单证申报'},
{path:'/yqdeclare',component:yqdeclare,name:'预确报申报'}
]
},
{
path: '*',
... ...
... ... @@ -282,7 +282,6 @@
this.loading = true;
selectCountry(params).then(res =>{
if (res!=null) {
console.log(res.data.data)
setTimeout(() => {
this.loading = false;
this.countryOptions=res.data.data;
... ... @@ -300,7 +299,6 @@
this.loading = true;
selectCreden(params).then(res =>{
if (res!=null) {
console.log(res.data.data)
setTimeout(() => {
this.loading = false;
this.certOptions=res.data.data;
... ... @@ -318,8 +316,9 @@
addAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryAircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo}});
}else{
this.msg=response.msg;
... ... @@ -338,17 +337,16 @@
this.aircraft.createBy=loginUserInfo.username
sendAircraft(this.aircraft).then(res=>{
let response=res.data;
console.log(response);
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryAircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
console.log('error submit!!');
return false;
}
});
... ... @@ -368,7 +366,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -241,15 +241,15 @@
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.arrival)
addPrediction(this.arrival).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
// this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryArrival',query:{flightNo:this.arrival.flightNo,flightDate:this.arrival.flightDate}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
}
);
... ... @@ -292,7 +292,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -641,8 +641,9 @@ background-color: white;
addBillPerson(this.billperson).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg);
this.transList()
//document.getElementById("send").disabled=true;
let sy=this.type="2";
... ... @@ -771,15 +772,16 @@ background-color: white;
addBill(this.bill).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$message.success(response.msg)
//this.centerDialogVisible=true;
//this.msg=response.msg;
// this.$router.push({path:'/queryBill',query:{aircraftNo:this.bill.aircraftNo,flightNo:this.bill.flightNo,
// flightDate:this.bill.flightDate}});
//document.getElementById("add").disabled=true;
let st=this.status="2";
this.btDeleStatusFormater(st);
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -797,10 +799,11 @@ background-color: white;
sendBill(this.bill).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryBill',query:{aircraftNo:this.bill.aircraftNo,flightNo:this.bill.flightNo,
flightDate:this.bill.flightDate}});
this.$message.success(response.msg)
//document.getElementById("add").disabled=true;
// let st=this.status="2";
// this.btDeleStatusFormater(st);
... ... @@ -865,7 +868,7 @@ background-color: white;
return uuid;
},
},
mounted(){
activated(){
this.defaultData();
//this.transList();
// this.getCreden();
... ...
... ... @@ -11,19 +11,19 @@
<el-form :label-position="labelPosition" :model="queryConfigure" :rules="rules" ref="queryFlight"
label-width="130px" class="demo-ruleForm">
<el-row>
<el-col :span="5" style="margin-right: 70px">
<el-col :span="5">
<el-form-item label="承运人" prop="carrier" label-width="70px">
<el-input v-model="queryConfigure.carrier" style="width:120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="5" style="margin-right: 70px">
<el-col :span="5">
<el-form-item label="航班号" prop="flightno" label-width="70px">
<el-input v-model="queryConfigure.flightno" style="width:120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-button type="primary" icon="el-icon-search" @click="submitForm()">查询</el-button>
<el-button type="success" icon="el-icon-edit" @click="addForm()">新增</el-button>
<el-button type="primary" @click="submitForm()">查询</el-button>
<el-button type="success" @click="addForm()">新增</el-button>
</el-col>
</el-row>
... ... @@ -36,28 +36,19 @@
:data="tableData"
border
v-loading="tableloading" style="margin-bottom: 20px;margin-top: 20px">
<el-table-column
<!--<el-table-column
prop="carrier"
label="承运人">
</el-table-column>
</el-table-column>-->
<el-table-column
prop="flightno"
label="航班号">
</el-table-column>
<el-table-column
prop="customscode"
label="申报关区">
</el-table-column>
<el-table-column
prop="aircraftcode"
label="航空注册器编号">
</el-table-column>
<el-table-column
prop="aircrafttype"
label="航空器备案类型"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="originstation"
label="航班起始站">
</el-table-column>
... ... @@ -66,12 +57,37 @@
label="航班目的站">
</el-table-column>
<el-table-column
prop="customscode"
label="申报关区">
</el-table-column>
<el-table-column
label="配置类型">
<template slot-scope="scope">
<span v-if="scope.row.type ==='2'">入境</span>
<span v-if="scope.row.type ==='1'">出境</span>
</template>
</el-table-column>
<!--<el-table-column
prop="aircrafttype"
label="航空器备案类型"
show-overflow-tooltip>
</el-table-column>-->
<!--<el-table-column
prop="configstarttime"
label="配置生效时间">
</el-table-column>
<el-table-column
prop="configendtime"
label="配置生效生效到期日">
</el-table-column>-->
<el-table-column
prop="entrytime"
label="入境时间">
</el-table-column>
<el-table-column
prop="departuretime"
label="出境时间">
</el-table-column>
<el-table-column
label="配置状态">
... ... @@ -80,14 +96,8 @@
<span v-if="scope.row.configstatus ==='1'">生效</span>
</template>
</el-table-column>
<el-table-column
label="配置类型">
<template slot-scope="scope">
<span v-if="scope.row.type ==='2'">入境</span>
<span v-if="scope.row.type ==='1'">出境</span>
</template>
</el-table-column>
<el-table-column
<!--<el-table-column
prop="userid"
label="创建人">
</el-table-column>
... ... @@ -98,16 +108,9 @@
<el-table-column
prop="updatedate"
label="配置更新时间">
</el-table-column>
<el-table-column
prop="entrytime"
label="入境时间">
</el-table-column>
<el-table-column
prop="departuretime"
label="出境时间">
</el-table-column>
<el-table-column
</el-table-column>-->
<!--<el-table-column
prop="stayid"
label="停机位">
</el-table-column>
... ... @@ -122,12 +125,12 @@
<el-table-column
prop="remark"
label="配置规则备注">
</el-table-column>
</el-table-column>-->
<el-table-column
fixed="right"
prop=""
label="报文操作"
width="280">
label="信息操作"
width="180">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -187,8 +190,10 @@
<el-row>
<el-col :span="6">
<el-form-item label="航空器备案类型" prop="aircrafttype" label-width="140px">
<el-input v-model="configure_editForm.aircrafttype"
></el-input>
<el-select v-model="configure_editForm.aircrafttype" placeholder="请选择">
<el-option label="通用航空器" value="1"></el-option>
<el-option label="航线航空器" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
... ... @@ -203,27 +208,27 @@
maxLength='3'></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="配置生效时间" prop="configstarttime" label-width="130px">
<el-date-picker
v-model="configure_editForm.configstarttime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="6">
<el-form-item label="配置生效到期日" prop="configendtime" label-width="140px">
<el-date-picker
v-model="configure_editForm.configendtime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
:picker-options="pickerOptions">
</el-date-picker>
... ... @@ -247,12 +252,12 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="创建人" prop="userid" label-width="130px">
<el-input v-model="configure_editForm.userid"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
</el-col>-->
<!--<el-col :span="6">
<el-form-item label="创建时间" prop="creatdate" label-width="130px">
<el-date-picker
v-model="configure_editForm.creatdate"
... ... @@ -277,15 +282,15 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="6">
<el-form-item label="入境时间" prop="entrytime" label-width="130px">
<el-date-picker
v-model="configure_editForm.entrytime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width:100%">
</el-date-picker>
</el-form-item>
... ... @@ -296,8 +301,8 @@
v-model="configure_editForm.departuretime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width:100%">
</el-date-picker>
</el-form-item>
... ... @@ -308,7 +313,7 @@
<el-input v-model="configure_editForm.stayid"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="定时任务配置时间规则" prop="crontask" label-width="130px">
<el-input v-model="configure_editForm.crontask"></el-input>
</el-form-item>
... ... @@ -322,7 +327,7 @@
<el-form-item label="配置规则备注" prop="remark" label-width="130px">
<el-input v-model="configure_editForm.remark"></el-input>
</el-form-item>
</el-col>
</el-col>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="configure_dialog.addDialog = false" size="small">取 消</el-button>
... ... @@ -396,13 +401,13 @@
flightno: '',
customscode: '',
aircraftcode: '',
aircrafttype: '',
aircrafttype: '1',
originstation: '',
destinationstation: '',
configstarttime: '',
configendtime: '',
configstatus: '',
type: '',
configstatus: '1',
type: '2',
userid: '',
creatdate: '',
updatedate: '',
... ... @@ -421,9 +426,6 @@
flightno: [
{ required: true, message: '请输入', trigger: 'change' }
],
configstarttime: [
{ required: true, message: '请输入', trigger: 'change' }
],
configendtime: [
{ required: true, message: '请输入', trigger: 'change' }
],
... ... @@ -433,12 +435,6 @@
type: [
{ required: true, message: '请输入', trigger: 'change' }
],
creatdate: [
{ required: true, message: '请输入', trigger: 'change' }
],
updatedate: [
{ required: true, message: '请输入', trigger: 'change' }
],
entrytime: [
{ required: true, message: '请输入', trigger: 'change' }
],
... ... @@ -460,9 +456,6 @@
destinationstation: [
{ required: true, message: '请输入', trigger: 'change' }
],
userid: [
{ required: true, message: '请输入', trigger: 'change' }
],
stayid: [
{ required: true, message: '请输入', trigger: 'change' }
],
... ... @@ -487,7 +480,6 @@
const _this = this
selectExact(this.queryConfigure).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
... ...
... ... @@ -93,7 +93,7 @@
configure:{
username:loginUserInfo.username,
flightNo:undefined,
ietype:'0',
ietype:'1',
reamrk:undefined,
// accessFlag:'1',
country:'',
... ... @@ -138,16 +138,15 @@
if (valid) {
this.configure.createBy=loginUserInfo.username
this.configure.username=loginUserInfo.username
console.log(this.configure.flightNo)
addSchedule(this.configure).then(res=>{
let response=res.data;
console.log(response)
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryConfigure',query:{flightNo:this.configure.flightNo}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -167,7 +166,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -218,11 +218,12 @@
addConfirm(this.confirmatory).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryConfirmatory',query:{flightNo:this.confirmatory.flightNo,flightDate:this.confirmatory.flightDate}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -235,17 +236,16 @@
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.confirmatory)
this.confirmatory.createBy=loginUserInfo.username
sendConfirmIn(this.confirmatory).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryConfirmatory',query:{flightNo:this.confirmatory.flightNo,flightDate:this.confirmatory.flightDate}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -265,7 +265,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
<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="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-col :span="2">
<el-upload
class="upload-demo"
action=""
:before-upload="beforeUpload"
:http-request="uploadFile"
:show-file-list="false">
<el-button size="medium" type="success" plain>导入</el-button>
</el-upload>
</el-col>
</el-row>
<el-row :gutter="10">
<el-table
:data="tableData"
style="width: 100%"
row-key="uuid"
:expand-row-keys="expandedRowKeys"
border
stripe>
<el-table-column
align="center"
fixed="left"
label="信息操作"
width="80">
<template slot-scope="scope">
<el-button @click="ediForm(scope.row)" type="text" size="small">编辑</el-button>
</template>
</el-table-column>
<el-table-column type="expand" label="详细信息">
<template v-slot:default="{ row }">
<el-table
:data="row.billpersonList"
style="width: 70%;margin-left: 75px;margin-top: 10px"
row-key="autoId"
stripe
border
>
<el-table-column prop="name" label="姓名" />
<el-table-column width="80" prop="gender" label="性别">
<template slot-scope="scope">
{{ scope.row.gender === 'M' ? '男' : '女' }}
</template>
</el-table-column>
<el-table-column width="80" prop="nationality" label="国籍" />
<el-table-column label="职务">
<template slot-scope="scope">
{{ {
'1': '航线机长',
'2': '副驾驶',
'3': '乘务长',
'4': '安全员',
'5': '乘务员',
'6': '机械师',
'7': '随行人员',
'8': '工程师',
'9': '装载员',
'10': '押运员',
'11': '其它随机人员'
}[scope.row.gareer] || scope.row.gareer }}
</template>
</el-table-column>
<el-table-column prop="certType" :formatter="formatType" label="证件类型" />
<el-table-column prop="ceterNo" label="证件号" />
</el-table>
</template>
</el-table-column>
<el-table-column
prop="messageid"
label="编号"
width="320">
</el-table-column>
<el-table-column
prop="aircraftNo"
label="航空器注册编号"
width="100">
</el-table-column>
<el-table-column
prop="arrivalno"
label="海关关区"
width="100">
</el-table-column>
<el-table-column
prop="flightNo"
label="进境(港)航班号"
width="120">
</el-table-column>
<el-table-column
prop="flightDate"
label="航班日期"
width="100">
</el-table-column>
<el-table-column
label="进出类型"
width="100">
<template slot-scope="scope">
{{ scope.row.accessFlag === 'D' ? '出港' : '进港' }}
</template>
</el-table-column>
<el-table-column
prop="arrivaldatetime"
label="出入(境)时间"
width="140">
</el-table-column>
<el-table-column
prop="statusMsg"
label="海关状态"
width="120">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="200">
<template slot-scope="scope">
<el-button @click="returnlist(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="sendstying(scope.row,2)" type="text" size="small">申报</el-button>
<el-button @click="sendstying(scope.row,5)" type="text" size="small">修改</el-button>
<el-button @click="sendstying(scope.row,3)" 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 :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 :gutter="10">
<el-dialog
:title="'单证信息'+textMap[dialogStatus]"
:visible.sync="dialogVisible"
width="80%"
center>
<el-form :model="form" :rules="rules" ref="form" label-width="130px">
<el-row :gutter="10">
<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="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"
type="datetime"
value-format="yyyy-MM-dd"
placeholder="yyyy-MM-dd"
style="width: 100%;">
</el-date-picker>
</div>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="进出标识" prop="accessFlag">
<el-select v-model="form.accessFlag">
<el-option label="进港" value="A"></el-option>
<el-option label="出港" value="D"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="进出港口" prop="arrivalAirport">
<el-select v-model="form.arrivalAirport"
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="arrivalno">
<el-select v-model="form.arrivalno"
filterable
allow-create
default-first-option
remote
:remote-method="getCustomCode"
: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-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-col :span="6">
<el-form-item label="机组人数" prop="aircrewSum">
<el-input v-model="form.aircrewSum"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :guter="10">
<el-col :span="6">
<el-form-item label="国际旅客人数" prop="interPassengerSum">
<el-input v-model="form.interPassengerSum"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国际行李件数" prop="interBaggageNum">
<el-input v-model="form.interBaggageNum"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货邮件数" prop="goodsNum">
<el-input v-model="form.goodsNum"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货邮重量(千克)" prop="goodsQuantity">
<el-input v-model="form.goodsQuantity"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :guter="10">
<el-col :span="6">
<el-form-item label="是否有健康异常" prop="remark">
<el-select v-model="form.remark">
<el-option label="是" value="T"></el-option>
<el-option label="否" value="F"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否发现病媒生物" prop="remark1">
<el-select v-model="form.remark2">
<el-option label="是" value="T"></el-option>
<el-option label="否" value="F"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否发现外来有害生物" prop="remark2">
<el-select v-model="form.remark2">
<el-option label="是" value="T"></el-option>
<el-option label="否" value="F"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否有有效灭蚊证明" prop="remark3">
<el-select v-model="form.remark3">
<el-option label="是" value="T"></el-option>
<el-option label="否" value="F"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :guter="10">
<el-col :span="18">
<el-form-item label="备注">
<el-input v-model="form.meno"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="">
<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-divider content-position="left"><span style="color: #1d8ce0">机组人员信息</span>
<el-divider direction="vertical"></el-divider>
<el-button type="primary" @click="addBillperson">新增机组人员</el-button>
<el-divider direction="vertical"></el-divider></el-divider>
<el-table
:data="tableChldren"
style="width: 80%;margin-left: 75px;margin-top: 10px"
row-key="autoId"
stripe
border>
<el-table-column prop="name" label="姓名" />
<el-table-column width="80" prop="gender" label="性别">
<template slot-scope="scope">
{{ scope.row.gender === 'M' ? '男' : '女' }}
</template>
</el-table-column>
<el-table-column width="80" prop="nationality" label="国籍" />
<el-table-column label="职务">
<template slot-scope="scope">
{{ {
'1': '航线机长',
'2': '副驾驶',
'3': '乘务长',
'4': '安全员',
'5': '乘务员',
'6': '机械师',
'7': '随行人员',
'8': '工程师',
'9': '装载员',
'10': '押运员',
'11': '其它随机人员'
}[scope.row.gareer] || scope.row.gareer }}
</template>
</el-table-column>
<el-table-column prop="certType" :formatter="formatType" label="证件类型" />
<el-table-column prop="ceterNo" label="证件号" />
<el-table-column
fixed="right"
label="操作"
width="50">
<template slot-scope="scope">
<el-button @click.native.prevent="deleteRow(scope.$index, tableChldren)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="机组人员添加" :visible.sync="dialogFormVisible" width="70%"
center>
<el-form :model="billperson" :rules="rules" ref="billperson" label-width="100px">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="姓名" prop="name">
<el-input v-model="billperson.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="性别" prop="gender">
<el-select v-model="billperson.gender">
<el-option label="男" value="M"></el-option>
<el-option label="女" value="F"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国籍" prop="nationality">
<el-select v-model="billperson.nationality"
filterable
@click.native="getCountry"
@change="selectChange"
default-first-option
:loading="loading" placeholder="请选择"
style="text-transform:uppercase">
<el-option
v-for="item in countryOptions"
:key="item.countryid"
:label="item.countryid+'-'+item.countrydescchn"
:value="item.countryid">
<span style="float: left">{{ item.countryid }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.countrydescchn }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="职务" prop="gareer">
<el-select v-model="billperson.gareer" placeholder="请选择">
<el-option label="1-航线机长" value="1"></el-option>
<el-option label="2-副驾驶" value="2"></el-option>
<el-option label="3-乘务长" value="3"></el-option>
<el-option label="4-安全员" value="4"></el-option>
<el-option label="5-乘务员" value="5"></el-option>
<el-option label="6-机械师" value="6"></el-option>
<el-option label="7-随行人员" value="7"></el-option>
<el-option label="8-工程师" value="8"></el-option>
<el-option label="9-装载员" value="9"></el-option>
<el-option label="10-押运员" value="10"></el-option>
<el-option label="11-其它随机人员" value="11"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件类型" prop="certType">
<el-select v-model="billperson.certType"
filterable
@click.native="getCreden"
:loading="loading" placeholder="请选择">
<el-option
v-for="item in certOptions"
:key="item.serialno"
:label="item.serialno+'-'+item.credenname"
:value="item.serialno">
<span style="float: left">{{ item.serialno }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.credenname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件号码" prop="ceterNo">
<el-input v-model="billperson.ceterNo" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="备注" prop="meno">
<el-input v-model="billperson.meno" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" @click="addRow('billperson')">添加</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</el-row>
</div>
</template>
<script>
import {
insertSelectiveBill,
selectBillLists,
selectByairportcode,
selectBycustomcode,
selectReturnMsgList, sendBillSdeclare, updateByPrimaryKeySelectiveBill,batchJZImport
} from "../../api/transport/transport2.0";
import {selectCountry, selectCreden} from "../../api/transport";
import {importExcel} from "../../api/consigner/exportOrder";
export default{
data(){
return{
certOptions:[],
countryOptions:[],
countryid:'',
dialogFormVisible:false,
tableChldren:[],
dialogVisible: false,
dialogStatus:'',
textMap:{
update: '编辑',
create: '新增'
},
tableData:[],
expandedRowKeys: [],
query:{
aircraftNo:'',
flightNo:'',
starttime:'',
endtime:'',
pageNum:0,
pageSize:10,
},
form: {
uuid: '',
aircraftNo: '',
flightNo: '',
flightDate: '', // Use JavaScript Date object
accessFlag: 'A',
departureAirport: '',
departuredatetime: '', // Use JavaScript Date object
departureno: '',
arrivalAirport: '',
arrivaldatetime: '', // Use JavaScript Date object
arrivalno: '',
aircrewSum: 0,
interPassengerSum: 0,
localePassengerSum: 0,
interBaggageNum: 0,
localeBaggageNum: 0,
goodsNum: 0,
goodsQuantity: 0,
cargoBillNum: 0,
passengerPage: 0,
aircrewBillNum: 0,
aircrewCargoBillNum: 0,
arrivalPosition: '',
bussinessType: '',
messageid: '',
status: '',
statusMsg: '',
meno: '',
createTime: '', // Use JavaScript Date object
createBy: '',
updateTime: '', // Use JavaScript Date object
updateBy: '',
isDelete: '',
remark: 'F',
remark1: 'F',
remark2: 'F',
remark3: 'F',
billpersonList: [] // Array of objects that represent the AIR_BILLPERSON model
},
billperson: {
autoId: '',
name: '',
gender: '',
gareer: '', // Note: This might be a typo in the original Java class. It should probably be "career".
nationality: '',
certType: '',
ceterNo: '', // Note: This might also be a typo. It should probably be "centerNo" or "certNo".
createTime: '', // Use JavaScript Date object
createBy: '',
updateTime: '', // Use JavaScript Date object
updateBy: '',
meno: '',
isDelete: '0',
billsId: ''
},
flightdate:['2021-11-17', '2024-12-24'],
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]);
}
}]
},
total:0,
returnVisible:false,
gridData:[],
customcodes:[],
airportcodes:[],
loading:false,
rules: {
aircraftNo: [
{ required: true, message: '航空注册器编号不可为空', trigger: 'blur' }
],
flightNo: [
{ required: true, message: '航班号不可为空', trigger: 'blur' }
],
flightDate: [
{ required: true, message: '航班日期不可为空', trigger: 'blur' }
],
arrivalAirport: [
{ required: true, message: '进出港口不可为空', trigger: 'blur' }
],
arrivalno: [
{ required: true, message: '海关关区不可为空', trigger: 'blur' }
],
arrivaldatetime: [
{ required: true, message: '进出境时间不可为空', trigger: 'blur' }
],
aircrewSum: [
{ required: true, message: '机组人数不可为空', trigger: 'blur' }
],
interPassengerSum: [
{ required: true, message: '国际旅客不可为空', trigger: 'blur' }
],
interBaggageNum: [
{ required: true, message: '国际行李件数不可为空', trigger: 'blur' }
],
name: [
{ required: true, message: '机组人员姓名不可为空', trigger: 'blur' }
],
nationality: [
{ required: true, message: '机组人员国籍不可为空', trigger: 'blur' }
],
gender: [
{ required: true, message: '机组人员性别不可为空', trigger: 'blur' }
],
gareer: [
{ required: true, message: '机组人员职务不可为空', trigger: 'blur' }
],
certType: [
{ required: true, message: '机组人员类型不可为空', trigger: 'blur' }
],
ceterNo: [
{ required: true, message: '机组人员证件号不可为空', trigger: 'blur' }
],
},
}
},
methods:{
//导入订单excel
beforeUpload(file) {
// 检查文件类型
const isExcel = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type === 'application/vnd.ms-excel';
if (!isExcel) {
this.$message.error('上传文件只能是 Excel 格式!');
return false; // 取消文件上传
}
return true; // 允许上传
},
uploadFile({ file, onSuccess, onError }){
// 生成 FormData 对象
const formData = new FormData();
formData.append('file', file);
batchJZImport(formData).then((response) => {
const res = response.data
if (res.code !== '200') {
return this.$message.error(res.msg);
}
this.$message.success(res.msg);
this.selectList();
onSuccess(response.data); // 调用 onSuccess 回调通知上传成功
}).catch(error => {
// 关闭加载
this.$message.error(error.toString())
onError(error); // 调用 onError 回调通知上传失败
})
},
addBillperson(){
this.dialogFormVisible = true;
},
addRow(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
const newMember = {
autoId: this.tableChldren.length > 0 ? this.tableChldren[this.tableChldren.length - 1].autoId + 1 : 1,
name: this.billperson.name,
gender: this.billperson.gender,
nationality: this.billperson.nationality,
gareer: this.billperson.gareer,
certType: this.billperson.certType,
ceterNo: this.billperson.ceterNo,
meno:this.billperson.meno,
createTime: '', // Use JavaScript Date object
createBy: '',
updateTime: '', // Use JavaScript Date object
updateBy: '',
isDelete: '0',
billsId: ''
};
this.tableChldren.push(newMember);
this.resetForm();
this.dialogFormVisible = false;
} else {
return false;
}
});
},
resetForm() {
this.billperson.name = '';
this.billperson.gender = '';
this.billperson.nationality = '';
this.billperson.gareer = '';
this.billperson.certType = '';
this.billperson.ceterNo = '';
},
deleteRow(index, rows) {
rows.splice(index, 1);
},
//暂存新增
createData(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.form.departuredatetime=this.form.arrivaldatetime;
this.form.departureAirport=this.form.arrivalAirport;
insertSelectiveBill(this.form).then(res =>{
let response=res.data;
if(response.code=='200'){
this.dialogVisible=false;
this.$message.success(response.msg);
this.getList();
}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;
updateByPrimaryKeySelectiveBill(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;
}
});
},
selectList(){
if(this.flightdate !== null && this.flightdate !== ""){
this.query.starttime = this.flightdate[0];
this.query.endtime = this.flightdate[1];
}else{
return this.$message.error('请选取时间区间')
}
selectBillLists(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.expandedRowKeys = this.tableData.map(item => item.uuid);
// 获取列表的总记录数
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';
this.form={
uuid: '',
aircraftNo: '',
flightNo: '',
flightDate: '', // Use JavaScript Date object
accessFlag: 'A',
departureAirport: '',
departuredatetime: '', // Use JavaScript Date object
departureno: '',
arrivalAirport: '',
arrivaldatetime: '', // Use JavaScript Date object
arrivalno: '',
aircrewSum: 0,
interPassengerSum: 0,
localePassengerSum: 0,
interBaggageNum: 0,
localeBaggageNum: 0,
goodsNum: 0,
goodsQuantity: 0,
cargoBillNum: 0,
passengerPage: 0,
aircrewBillNum: 0,
aircrewCargoBillNum: 0,
arrivalPosition: '',
bussinessType: '',
messageid: '',
status: '',
statusMsg: '',
meno: '',
createTime: '', // Use JavaScript Date object
createBy: '',
updateTime: '', // Use JavaScript Date object
updateBy: '',
isDelete: '',
remark: 'F',
remark1: 'F',
remark2: 'F',
remark3: 'F',
billpersonList: [] // Array of objects that represent the AIR_BILLPERSON model
};
this.tableChldren=this.form.billpersonList;
},
ediForm(row){
this.dialogVisible=true;
this.dialogStatus='update';
this.form=row;
this.tableChldren=row.billpersonList;
},
sendstying(row,FunctionCode){
const params = {
row: row,
FunctionCode: FunctionCode
};
sendBillSdeclare(params).then(res =>{
let response=res.data;
if(response.code=='200'){
this.selectList();
this.$message.success(response.msg)
}else{
this.$message.error(response.msg)
}
});
},
formatType: function(row,column){
return row.certType=='06'?'一次有效台湾居民来往大陆通行证':row.certType=='11'?'外交护照':row.certType=='12'?'公务护照'
:row.certType=='13'?'因公普通护照':row.certType=='14'?'普通护照':row.certType=='15'?'中华人民共和国旅行证'
:row.certType=='16'?'五年有效台湾居民往来大陆通行证':row.certType=='17'?'海员证':row.certType=='20'?'中华人民共和国出入境通行证'
:row.certType=='21'?'前往港澳通行证(16页,多次有效)':row.certType=='22'?'前往港澳通行证(8页,一次有效)'
:row.certType=='23'?'前往港澳通行证':row.certType=='24'?'港澳同胞回乡证或港澳居民来往内地通行证'
:row.certType=='25'?'大陆居民来往台湾通行证':row.certType=='30'?'外国人出入境通行证':row.certType=='38'?'中华人民共和国回国证明'
:row.certType=='70'?'香港特别行政区护照':row.certType=='71'?'澳门特别行政区护照'
:row.certType=='72'?'因公往来香港澳门特别行政区通行证(官员)'
:row.certType=='73'?'因公往来香港澳门特别行政区通行证(普通)':row.certType=='74'?'中华人民共和国居民身份证':row.certType=='75'?'其他证件'
:row.certType=='98'?'其他因私证件(包括联合国通行证等)'
:row.certType=='99'?'其他因私证件(包括难民证等)':'';
},
handleSizeChange(val) {
this.query.pageSize=val;
this.selectList();
},
handleCurrentChange(val) {
this.query.pageNum=val;
this.selectList();
},
//查询回执列表
returnlist(row){
this.gridData=[];
let params={messageid:row.messageid};
selectReturnMsgList(params).then(res=>{
let response=res.data.data;
this.gridData=response;
});
this.returnVisible=true;
},
handleClose() {
this.returnVisible=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 = [];
}
});
},
//获取机场代码
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 = [];
}
});
},
/*获取国籍*/
getCountry:function(query){
this.countryOptions=[];
let params={countryid:query};
this.loading = true;
selectCountry(params).then(res =>{
if (res!=null) {
console.log(res.data.data)
setTimeout(() => {
this.loading = false;
this.countryOptions=res.data.data;
}, 200);
} else {
this.countryOptions = [];
}
});
},
selectChange:function(val){
console.log(val)
this.$emit('tellFarther',val);
},
/*获取证件*/
getCreden:function(query){
this.certOptions=[];
let params={serialno:query};
this.loading = true;
selectCreden(params).then(res =>{
if (res!=null) {
console.log(res.data.data)
setTimeout(() => {
this.loading = false;
this.certOptions=res.data.data;
}, 200);
} else {
this.certOptions = [];
}
});
},
},
mounted() {
this.expandedRowKeys = this.tableData.map(item => item.uuid);
}
}
</script>
... ...
... ... @@ -195,11 +195,12 @@
addConfirm(this.declare).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryDeclare',query:{flightNo:this.declare.flightNo,flightDate:this.declare.flightDate}});
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -216,11 +217,12 @@
sendConfirmOut(this.declare).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryDeclare',query:{flightNo:this.declare.flightNo,flightDate:this.declare.flightDate}});
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -240,7 +242,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -216,11 +216,13 @@
addPrediction(this.departure).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryDeparture',query:{flightNo:this.departure.flightNo,flightDate:this.departure.flightDate}});
}else{
this.msg=response.msg;
//this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -238,11 +240,12 @@
sendPredictionOut(this.departure).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryDeparture',query:{flightNo:this.departure.flightNo,flightDate:this.departure.flightDate}});
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -262,7 +265,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -240,7 +240,7 @@
<el-col :span="24">
<el-form-item>
<el-button size="small" style="margin-left: 500px;width: 100px" type="info" @click="trans_dialog.addDialog = false">取消</el-button>
<el-button type="primary" size="small" style="margin-left: 20px;width: 100px" @click="dialogStatus==='create'?trans_add():trans_edit()">提交</el-button>
<el-button type="primary" size="small" style="margin-left: 20px;width: 100px" @click="dialogStatus==='create'?trans_add('form'):trans_edit('form')">提交</el-button>
</el-form-item>
</el-col>
</el-row>
... ... @@ -392,8 +392,8 @@
},
// 新增功能
trans_add() { // 进行表单的预验证
this.$refs.form.validate(valid => {
trans_add(formName) { // 进行表单的预验证
this.$refs[formName].validate((valid) => {
// 未通过,表单预校验
if (!valid) return
addAircraftStaying(this.form).then((response) => {
... ... @@ -423,9 +423,9 @@
})
},
// 编辑功能
trans_edit() {
trans_edit(formName) {
// 进行表单的预验证
this.$refs.form.validate(valid => {
this.$refs[formName].validate((valid) => {
// 未通过,表单预校验
if (!valid) return
addAircraftStaying(this.form).then((response) => {
... ...
... ... @@ -435,13 +435,15 @@
addFlight(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryFlights',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate}});
this.centerDialogVisible=false;
//this.centerDialogVisible=false;
this.$message.success(response.msg)
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -457,13 +459,15 @@
sendFlight(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryFlights',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate}});
this.centerDialogVisible=false;
//this.centerDialogVisible=false;
this.$message.success(response.msg)
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -505,7 +509,7 @@
}
},
//渲染方法
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -257,9 +257,10 @@
addFlightPlan(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryFlightplan',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate,aircraftNo:this.flight.aircraftNo}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
}
... ... @@ -277,9 +278,10 @@
sendFlightPlan(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
// this.msg=response.msg;
this.$router.push({path:'/queryFlightplan',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate,aircraftNo:this.flight.aircraftNo}});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
}
... ... @@ -304,7 +306,7 @@
},
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
<template>
<el-row :gutter="20">
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
<el-col :span="6"><div class="grid-content bg-purple"></div></el-col>
</el-row>
</template>
<script>
export default {
data(){
return{
}
},
methods:{}
}
</script>
... ...
... ... @@ -14,8 +14,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="进出标识" prop="ietype" label-width="120px">
<el-select v-model="outConfigure.ietype" placeholder="" style="display:inline">
<el-form-item label="进出标识" prop="ieType" label-width="120px">
<el-select v-model="outConfigure.ieType" placeholder="" style="display:inline">
<el-option v-for="item in linesTypes" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
... ... @@ -78,7 +78,7 @@
outConfigure:{
username:loginUserInfo.username,
flightNo:undefined,
ietype:'1',
ieType:'2',
reamrk:undefined,
// accessFlag:'2',
createBy:loginUserInfo.username,
... ... @@ -88,7 +88,7 @@
flightNo: [
{required: true, message: '请输入', trigger: 'blur'}
],
ietype: [
ieType: [
{required: true, message: '请选择', trigger: 'change'}
],
},
... ... @@ -113,11 +113,12 @@
addSchedule(this.outConfigure).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.success(response.msg)
this.$router.push({path:'/queryFlightConfigure',query:{flightNo:this.outConfigure.flightNo}});
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -137,7 +138,7 @@
return e.replace(/[^a-zA-Z0-9.-]/g,'').toUpperCase();
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -159,7 +159,6 @@
let params={messageid:row.messageid};
selectReturnMsg(params).then(res=>{
let response=res.data.data;
console.log(response)
this.gridData=response;
});
},
... ... @@ -174,7 +173,7 @@
//获取进港航班配置查询列表
submitForm() {
let params = {
pageNum: this.pageNum, pageSize: this.pageSize, flightNo: this.queryConfigure.flightNo,ieType:'0'
pageNum: this.pageNum, pageSize: this.pageSize, flightNo: this.queryConfigure.flightNo,ieType:'2'
};
this.tableloading = true;
selectSchedule(params).then(res => {
... ...
... ... @@ -45,7 +45,7 @@
label="用户名">
</el-table-column>
<el-table-column
prop="flightno"
prop="flightNo"
label="航班号">
</el-table-column>
<el-table-column
... ... @@ -180,6 +180,7 @@
selectSchedule(params).then(res => {
let response = res.data.data;
this.tableData = response.list;
console.log(response)
this.tableloading = false;
this.total = response.total;
});
... ...
... ... @@ -11,19 +11,19 @@
<el-form :label-position="labelPosition" :model="queryConfigure" :rules="rules" ref="queryFlight"
label-width="130px" class="demo-ruleForm">
<el-row>
<el-col :span="5" style="margin-right: 70px">
<el-col :span="5">
<el-form-item label="承运人" prop="awcd" label-width="70px">
<el-input v-model="queryConfigure.awcd" style="width:120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="5" style="margin-right: 70px">
<el-col :span="5">
<el-form-item label="航班号" prop="flightNo" label-width="70px">
<el-input v-model="queryConfigure.flightNo" style="width:120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-button type="primary" icon="el-icon-search" @click="submitForm()">查询</el-button>
<el-button type="success" icon="el-icon-edit" @click="addForm()">新增</el-button>
<el-button type="primary" @click="submitForm()">查询</el-button>
<el-button type="success" @click="addForm()">新增</el-button>
</el-col>
</el-row>
... ... @@ -36,32 +36,19 @@
:data="tableData"
border
v-loading="tableloading" style="margin-bottom: 20px;margin-top: 20px">
<el-table-column
<!--<el-table-column
prop="awcd"
label="承运人">
</el-table-column>
</el-table-column>-->
<el-table-column
prop="flightNo"
label="航班号">
</el-table-column>
<el-table-column
prop="customscode"
label="申报关区">
</el-table-column>
<el-table-column
prop="aircraftNo"
label="航空注册器编号">
</el-table-column>
<el-table-column
prop="transportflag"
label="航空器备案类型"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="aircraftstand"
label="停机位">
</el-table-column>
<el-table-column
prop="departurePort"
label="航班起始站">
</el-table-column>
... ... @@ -70,16 +57,37 @@
label="航班目的站">
</el-table-column>
<el-table-column
prop="customscode"
label="申报关区">
</el-table-column>
<el-table-column
label="配置类型">
<template slot-scope="scope">
<span v-if="scope.row.type ==='2'">入境</span>
<span v-if="scope.row.type ==='1'">出境</span>
</template>
</el-table-column>
<!--<el-table-column
prop="transportflag"
label="航空器备案类型"
show-overflow-tooltip>
</el-table-column>-->
<!--<el-table-column
prop="aircraftstand"
label="停机位">
</el-table-column>-->
<el-table-column
prop="departuredatetime"
label="预计出境时间">
</el-table-column>
<el-table-column
prop="arrivaldatetime"
label="预计入境时间">
</el-table-column><el-table-column
</el-table-column>
<!--<el-table-column
prop="validtime"
label="配置生效到期日">
</el-table-column>
</el-table-column>-->
<el-table-column
label="配置状态">
<template slot-scope="scope">
... ... @@ -87,14 +95,8 @@
<span v-if="scope.row.status ==='1'">生效</span>
</template>
</el-table-column>
<el-table-column
label="配置类型">
<template slot-scope="scope">
<span v-if="scope.row.type ==='2'">入境</span>
<span v-if="scope.row.type ==='1'">出境</span>
</template>
</el-table-column>
<el-table-column
<!--<el-table-column
prop="userid"
label="创建人">
</el-table-column>
... ... @@ -109,12 +111,12 @@
<el-table-column
prop="meno"
label="备注">
</el-table-column>
</el-table-column>-->
<el-table-column
fixed="right"
prop=""
label="报文操作"
width="280">
label="信息操作"
width="180">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -174,9 +176,12 @@
<el-row>
<el-col :span="6">
<el-form-item label="航空器备案类型" prop="transportflag" label-width="140px">
<el-input v-model="configure_addForm.transportflag"
></el-input>
<el-select v-model="configure_addForm.transportflag" placeholder="请选择">
<el-option label="通用航空器" value="1"></el-option>
<el-option label="航线航空器" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="停机位" prop="aircraftstand" label-width="120px">
... ... @@ -201,8 +206,8 @@
v-model="configure_addForm.departuredatetime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width:100%">
</el-date-picker>
</el-form-item>
... ... @@ -213,8 +218,8 @@
v-model="configure_addForm.arrivaldatetime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width:100%">
</el-date-picker>
</el-form-item>
... ... @@ -225,18 +230,18 @@
v-model="configure_addForm.validtime"
type="datetime"
placeholder="选择日期时间"
value-format="yyyyMMddhhmmss"
format="yyyyMMddhhmmss"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="创建人" prop="userid" label-width="120px">
<el-input v-model="configure_addForm.userid"></el-input>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="6">
<el-form-item label="配置类型" prop="type" label-width="120px">
... ... @@ -256,7 +261,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="创建时间" prop="creatdate" label-width="120px">
<el-date-picker
v-model="configure_addForm.creatdate"
... ... @@ -281,9 +286,7 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-col>-->
<el-col :span="12">
<el-form-item label="星期日期" prop="schedule.options" label-width="120px">
<el-select v-model="configure_addForm.schedule.options" multiple placeholder="请选择(可多选)" style="width: 100%">
... ... @@ -296,11 +299,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="meno" label-width="120px">
<el-input v-model="configure_addForm.meno"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
... ... @@ -377,15 +375,15 @@
flightNo:'',
customscode:'',
aircraftNo:'',
transportflag:'',
transportflag:'1',
aircraftstand:'',
departurePort:'',
arrivalPort:'',
departuredatetime:'',
arrivaldatetime:'',
validtime:'',
status:'',
type:'',
status:'1',
type:'2',
userid:'',
creatdate:'',
updatedate:'',
... ... @@ -454,21 +452,12 @@
validtime: [
{ required: true, message: '请输入', trigger: 'change' }
],
userid: [
{ required: true, message: '请输入', trigger: 'change' }
],
type: [
{ required: true, message: '请输入', trigger: 'change' }
],
status: [
{ required: true, message: '请输入', trigger: 'change' }
],
creatdate: [
{ required: true, message: '请输入', trigger: 'change' }
],
updatedate: [
{ required: true, message: '请输入', trigger: 'change' }
],
'schedule.options': [
{ required: true, message: '请输入', trigger: 'change' }
],
... ... @@ -490,7 +479,6 @@
const _this = this
selectPrePlanConfig(this.queryConfigure).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
... ... @@ -519,7 +507,6 @@
this.$refs.configure_addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return
console.log(this.configure_addForm);
addPrePlanConfig(this.configure_addForm).then((response) => {
const res = response.data
// 添加失败
... ... @@ -541,7 +528,6 @@
// 打开编辑
handleEdit(index, row) {
this.configure_addForm = Object.assign({}, row);
console.log(this.configure_addForm)
this.configure_addForm.schedule.options=[];
for(var obj in row.schedulelist){
console.log(this.configure_addForm.schedule.options.push(row.schedulelist[obj]['weekday']))
... ...
... ... @@ -109,7 +109,7 @@
</el-col>
<el-col :span="8" style="margin-left: 120px">
<el-button type="primary" @click="submitForm('airline')">保 存</el-button>
<el-button type="success">保存并发送</el-button>
<!--<el-button type="success">保存并发送</el-button>-->
</el-col>
</el-form>
</el-row>
... ... @@ -296,13 +296,15 @@
addRoute(this.airline).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryRoute',query:{serialNo:this.airline.serialNo}});
this.centerDialogVisible=false;
//this.centerDialogVisible=false;
this.$message.success(response.msg)
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -346,7 +348,7 @@
},
//渲染方法
mounted(){
activated(){
this.defaultData();
}
}
... ...
... ... @@ -279,11 +279,12 @@
addAirLineAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryRouteaircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo},});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -300,11 +301,12 @@
sendAirLineAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
//this.centerDialogVisible=true;
//this.msg=response.msg;
this.$router.push({path:'/queryRouteaircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo},});
this.$message.success(response.msg)
}else{
this.msg=response.msg;
this.$message.error(response.msg)
}
});
} else {
... ... @@ -325,7 +327,7 @@
}
},
mounted(){
activated(){
this.defaultData();
}
}
... ...
<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="canclesendpre">确 定</el-button>
</div>
</el-dialog>
</el-row>
</div>
</template>
<script>
import {
selectByairportcode,
selectBycustomcode,
selectPreList,
insertSelectivePre,
updateByPrimaryKeySelectivePre, selectReturnMsgList, canclePre,sendPrediction
} 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',
content:''
},
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;
},
canclesendpre(row,FunctionCode){
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)
}
});
},
sendpre(row,FunctionCode){
//this.row2.content=this.cancleForm.content;
const params = {
row: row,
FunctionCode: FunctionCode
};
sendPrediction(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>
... ...
<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="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
align="center"
fixed="left"
label="信息操作"
width="80">
<template slot-scope="scope">
<el-button @click="ediForm(scope.row)" type="text" size="small">编辑</el-button>
</template>
</el-table-column>
<el-table-column
prop="messageid"
label="编号"
width="320">
</el-table-column>
<el-table-column
prop="aircraftno"
label="航空器注册编号"
width="120">
</el-table-column>
<el-table-column
prop="flightno"
label="进境(港)航班号"
width="120">
</el-table-column>
<el-table-column
prop="callport"
label="停靠港"
width="120">
</el-table-column>
<el-table-column
prop="flightdate"
label="航班日期"
width="100">
</el-table-column>
<el-table-column
prop="statusmsg"
label="海关状态"
width="120">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="200">
<template slot-scope="scope">
<el-button @click="returnlist(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="sendstying(scope.row,2)" type="text" size="small">申报</el-button>
<el-button @click="sendstying(scope.row,5)" type="text" size="small">修改</el-button>
<el-button @click="sendstying(scope.row,3)" 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-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="customcode">
<el-select v-model="form.customcode"
filterable
allow-create
default-first-option
remote
:remote-method="getCustomCode"
: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-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="注册海关关区">
<el-select v-model="form.registeredcustom"
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="航空器备案类型">
<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="callport" style="width: 100%;">
<el-select v-model="form.callport"
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="callarea">
<el-input v-model="form.callarea"></el-input>
</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="滞留原因">
<el-select v-model="form.reasons" placeholder="请选择">
<el-option label="移泊" value="1"></el-option>
<el-option label="待命" value="2"></el-option>
<el-option label="维修" value="3"></el-option>
<el-option label="其它" value="4"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关备注">
<el-input v-model="form.remark"></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-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>
</div>
</template>
<script>
import {selectBycustomcode,selectByairportcode,selectLists,insertSelective,updateByPrimaryKeySelective,
selectReturnMsgList,sendAircraftstaying} from "../../api/transport/transport2.0";
export default {
data(){
return{
returnVisible:false,
query:{
aircraftno:'',
flightno:'',
flightdate:'',
starttime:'',
endtime:'',
pageNum:0,
pageSize:10
},
customcodes:[],
customcodes2:[],
airportcodes:[],
form:{
uuid:'',
customcode:'',
aircraftno:'',
registeredcustom:'',
aircrafttype:'',
flightno:'',
flightdate:'',
callport:'',
callarea:'',
reasons:'',
remark:'',
userid:'',
status:'',
statusmsg:'',
messageid:''
},
rules: {
customcode: [
{ required: true, message: '海关关区不可为空', trigger: 'blur' }
],
aircraftno: [
{ required: true, message: '航空器注册编号不可为空', trigger: 'blur' }
],
flightno: [
{ required: true, message: '进境(港)航班号不可为空', trigger: 'blur' }
],
flightdate: [
{ required: true, message: '航班日期不可为空', trigger: 'blur' }
],
callport: [
{ required: true, message: '停靠港不可为空', trigger: 'blur' }
],
callarea: [
{ required: true, message: '停机位不可为空', trigger: 'blur' }
]
},
dialogVisible: false,
currentPage4: 4,
textMap:{
update: '编辑',
create: '新增'
},
dialogStatus:'',
loading:false,
flightdate:'',
total:0,
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]);
}
}]
},
tableData: [],
gridData:[]
}
},
methods:{
sendstying(row,FunctionCode){
const params = {
row: row,
FunctionCode: FunctionCode
};
sendAircraftstaying(params).then(res =>{
let response=res.data;
if(response.code=='200'){
this.selectList();
this.$message.success(response.msg)
}else{
this.$message.error(response.msg)
}
});
},
//查询回执列表
returnlist(row){
this.gridData=[];
let params={messageid:row.messageid};
selectReturnMsgList(params).then(res=>{
let response=res.data.data;
this.gridData=response;
});
this.returnVisible=true;
},
handleClose() {
this.returnVisible=false;
},
//暂存新增
createData(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
insertSelective(this.form).then(res =>{
let response=res.data;
if(response.code=='200'){
this.dialogVisible=false;
this.$message.success(response.msg)
}else{
this.$message.error(response.msg)
}
});
} else {
return false;
}
});
},
//暂存更新
updateData(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
updateByPrimaryKeySelective(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)
}else{
this.$message.error(response.msg)
}
});
} else {
return false;
}
});
},
//查询列表
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;
selectLists(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())
})
},
//获取机场代码
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 = [];
}
});
},
//获取关区代码
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 = [];
}
});
},
//新增
addForm(){
this.dialogVisible=true;
this.dialogStatus='create';
},
//编辑
ediForm(row){
this.dialogVisible=true;
this.dialogStatus='update';
this.form=row;
},
handleClick(row) {
},
//分页
handleSizeChange(val) {
this.query.pageSize=val;
this.selectList();
},
handleCurrentChange(val) {
this.query.pageNum=val;
this.selectList();
}
}
}
</script>
... ...
... ... @@ -2189,7 +2189,7 @@ Handling Information
quantity_density:'',
quantity_picecs:'',
//体积
quantity_volume:'0',
quantity_volume:'0.0',
quantity_volume_code:'MC',
quantity_weight:'',
quantity_weight_code:'K',
... ... @@ -3142,7 +3142,7 @@ Handling Information
this.form.cer.cer_signature=this.fileContent.O34;
this.form.isu.isu_signature=this.fileContent.AF38;
this.dimension_textarea=this.fileContent.AF23;
this.convertAndCalculateVolume();
//this.convertAndCalculateVolume();
this.form.isu.isu_day_mounth_year=this.formattedDate();
}else{
... ... @@ -3176,7 +3176,7 @@ Handling Information
X38: X38,
AF38: cleanString(AF38),
};
this.convertAndCalculateVolume();
//this.convertAndCalculateVolume();
this.form.bill.waybillNum=this.fileContent.AF1;
this.form.cvd.cvd_currency_code=this.fileContent.S16;
this.form.rtg.destinationAirport=this.fileContent.A16;
... ... @@ -3197,7 +3197,6 @@ Handling Information
this.dimension_textarea=this.fileContent.AF23;
this.form.isu.isu_day_mounth_year=this.formattedDate();
}
} else {
... ... @@ -3205,6 +3204,7 @@ Handling Information
}
};
reader.readAsArrayBuffer(files);
this.convertAndCalculateVolume();
},
formattedDate() {
// 格式化日期为 yyyy-MM-dd
... ...
<template>
<div>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="">
<div class="block">
<el-date-picker
size="medium"
v-model="value2"
type="datetimerange"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right">
</el-date-picker>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" size="medium" @click="onSubmit">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" size="medium" @click="exportToExcel">导出</el-button>
</el-form-item>
</el-form>
<div style="margin-bottom: 10px"><span style="color: red">总计: {{ totalItems }} 主单: {{ emptyAwbhCount }} 分单: {{ nonEmptyAwbhCount }}</span></div>
<div>
<el-table
size="medium"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop="awba"
label="主单号"
width="180">
</el-table-column>
<el-table-column
prop="awbh"
label="分单号"
width="180">
</el-table-column>
<el-table-column
prop="billtype"
label="单证类型">
</el-table-column>
<el-table-column
prop="costs"
label="应结费用">
</el-table-column>
<el-table-column
prop="flightdate"
label="航班日期">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import {
selectStatistics
} from '../../api/remote_interface/byont_import';
import XLSX from 'xlsx';
import { saveAs } from 'file-saver';
import moment from 'moment';
export default {
data() {
return {
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]);
}
}]
},
value2: '',
tableData: [],
query:{
starttime:'',
endtime:''
},
formInline:{},
columns: [
{ prop: 'awba', label: '主单号' },
{ prop: 'awbh', label: '分单号' },
{ prop: 'billtype', label: '单证类型' },
{ prop: 'costs', label: '应结费用' },
{ prop: 'flightdate', label: '航班日期' }
]
};
},
computed: {
totalItems() {
return this.tableData.length;
},
emptyAwbhCount() {
return this.tableData.filter(item => !item.awbh).length;
},
nonEmptyAwbhCount() {
return this.tableData.filter(item => item.awbh).length;
}
},
methods:{
onSubmit(){
if(this.value2 !== null && this.value2 !== ""){
this.query.starttime = this.value2[0];
this.query.endtime = this.value2[1];
}else{
return this.$message.error('请选取时间段!')
}
selectStatistics(this.query).then((response) => {
const res = response.data
if (res.code !== '200') {
return this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
this.tableData = res.data;
this.$message.success('获取消息收发记录,成功!');
}).catch(error => {
// 关闭加载
this.$message.error(error.toString())
})
},
exportToExcel() {
// 创建一个新的工作簿
const wb = XLSX.utils.book_new();
// 创建一个自定义的头部数组,按照 columns 中的顺序和 label
const header = this.columns.map(col => col.label);
// 将 tableData 转换成二维数组,并添加到 worksheet 中
const data = this.tableData.map(row =>
this.columns.map(col => {
// 如果是 costs 列,则转换为数值
if (col.prop === 'costs') {
return parseFloat(row[col.prop]) || 0; // 确保无效值转换为0
}
return row[col.prop];
})
);
// 使用 XLSX.utils.aoa_to_sheet 创建工作表,指定头部
const ws = XLSX.utils.aoa_to_sheet([header, ...data]);
// 指定每一列的数据类型
const columnTypes = this.columns.map(col => ({
t: col.prop === 'costs' ? 'n' : 's' // 'n' for number, 's' for string
}));
// 更新工作表中的单元格类型
for (let i = 1; i <= data.length; i++) { // 从1开始,因为第0行是标题
const cellRef = XLSX.utils.encode_cell({ c: this.columns.findIndex(col => col.prop === 'costs'), r: i });
ws[cellRef].t = 'n'; // 设置单元格类型为数值
}
// 添加 worksheet 到 workbook
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
// 生成 Excel 文件并下载
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
const blob = new Blob([wbout], { type: 'application/octet-stream' });
// 计算明天的日期
const tomorrow = moment().add(1, 'days').format('M月D日');
// 使用 file-saver 保存文件,并使用明天的日期作为文件名
saveAs(blob, `${tomorrow}航班结算统计.xlsx`);
}
}
};
</script>
... ...