作者 xudada

单证申报

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 selectPrePlanConfig = params => { return http.post(`${baseUrl}/selectPrePlanConfig`, 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); };
... ...
... ... @@ -214,6 +214,7 @@ 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'
let routes = [
{
... ... @@ -784,7 +785,8 @@ let routes = [
iconCls:'el-icon-goods',
children:[
{path:'/gongtui',component:gongtui,name:'供退物料申报'},
{path:'/zaigang',component:zaigang,name:'在港动态申报'}
{path:'/zaigang',component:zaigang,name:'在港动态申报'},
{path:'/danzheng',component:danzheng,name:'单证申报'}
]
},
... ...
<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"
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
} from "../../api/transport/transport2.0";
import {selectCountry, selectCreden} from "../../api/transport";
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:{
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>
... ...
... ... @@ -20,19 +20,20 @@
<el-col :span="8">
<div class="block">
<el-date-picker
v-model="query.flightdate"
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" plain>查询</el-button>
<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>
... ... @@ -44,7 +45,15 @@
border
style="width: 100%">
<el-table-column
fixed
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">
... ... @@ -67,21 +76,22 @@
<el-table-column
prop="flightdate"
label="航班日期"
width="200">
width="100">
</el-table-column>
<el-table-column
prop="status"
prop="statusmsg"
label="海关状态"
width="120">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="140">
width="200">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
<el-button type="text" size="small">编辑</el-button>
<el-button type="text" size="small">删除</el-button>
<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>
... ... @@ -91,11 +101,11 @@
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:current-page="query.pageNum"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
:page-size="query.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
:total="total">
</el-pagination>
</div>
</el-row>
... ... @@ -104,11 +114,11 @@
:visible.sync="dialogVisible"
width="80%"
center>
<el-form :model="form" label-width="130px">
<el-divider content-position="left">报给单位</el-divider>
<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="海关关区">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="form.customcode"
filterable
allow-create
... ... @@ -128,52 +138,99 @@
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">航空器信息</el-divider>
<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-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-input v-model="form.registeredcustom"></el-input>
<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-input v-model="form.aircrafttype"></el-input>
<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">在港申报信息</el-divider>
<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-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="航班日期">
<el-input v-model="form.flightdate"></el-input>
<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="停靠港">
<el-input v-model="form.callport"></el-input>
<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="停机位">
<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">备注信息</el-divider>
<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-input v-model="form.reasons"></el-input>
<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">
... ... @@ -187,26 +244,47 @@
<el-col :span="12" :offset="6">
<el-form-item>
<el-button @click="dialogVisible=false">取消</el-button>
<el-button type="primary">暂存</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} from "../../api/transport/transport2.0";
import {selectBycustomcode,selectByairportcode,selectLists,insertSelective,updateByPrimaryKeySelective,
selectReturnMsgList,sendAircraftstaying} from "../../api/transport/transport2.0";
export default {
data(){
return{
returnVisible:false,
query:{
aircraftno:'',
flightno:'',
flightdate:''
flightdate:'',
starttime:'',
endtime:'',
pageNum:0,
pageSize:10
},
customcodes:[],
customcodes2:[],
airportcodes:[],
form:{
uuid:'',
customcode:'',
... ... @@ -224,6 +302,26 @@
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:{
... ... @@ -231,6 +329,9 @@
create: '新增'
},
dialogStatus:'',
loading:false,
flightdate:'',
total:0,
pickerOptions: {
shortcuts: [{
text: '最近一周',
... ... @@ -258,17 +359,120 @@
}
}]
},
tableData: [{
messageid: 'CN_CAM006_1P2_460470678920X20211028075151',
aircraftno: 'N345UP',
flightno: '5X174',
callport: 'CGO',
flightdate: '2024-11-15',
status: '01'
}]
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=[];
... ... @@ -286,20 +490,43 @@
});
},
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) {
console.log(row);
},
//分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.query.pageSize=val;
this.selectList();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.query.pageNum=val;
this.selectList();
}
}
}
... ...