作者 小范

新增在港动态页面

@@ -11,9 +11,16 @@ let baseUrlSchedule = 'air-server-transport/transport/schedule' @@ -11,9 +11,16 @@ let baseUrlSchedule = 'air-server-transport/transport/schedule'
11 let baseUrlLongtimeplan = 'air-server-transport/transport/longtimeplan' 11 let baseUrlLongtimeplan = 'air-server-transport/transport/longtimeplan'
12 let baseUrlBillperson = 'air-server-transport/transport/billperson' 12 let baseUrlBillperson = 'air-server-transport/transport/billperson'
13 let baseUrlResultMsg = 'air-server-transport/transport/returnmsg' 13 let baseUrlResultMsg = 'air-server-transport/transport/returnmsg'
  14 +let baseUrlDynamics = 'air-server-transport/transport/aircraftStaying'
14 15
15 16
16 - 17 +//在港动态
  18 +//增删改
  19 +export const addAircraftStaying = params => { return http.post(`${baseUrlDynamics}/addAircraftStaying`, params); };
  20 +//查
  21 +export const selectAircraftStaying = params => { return http.get(`${baseUrlDynamics}/selectAircraftStaying`, params); };
  22 +//申报
  23 +export const sendAircraftStaying = params => { return http.post(`${baseUrlDynamics}/sendAircraftStaying`, params); };
17 24
18 25
19 //航线申报 26 //航线申报
@@ -96,7 +103,10 @@ export const selectPrediction=params=>{return http.get(`${baseUrlPrediction}/sel @@ -96,7 +103,10 @@ export const selectPrediction=params=>{return http.get(`${baseUrlPrediction}/sel
96 //新增方法 103 //新增方法
97 export const addConfirm = params => { return http.post(`${baseUrlConfirm}/addConfirm`, params); }; 104 export const addConfirm = params => { return http.post(`${baseUrlConfirm}/addConfirm`, params); };
98 //保存并发送 105 //保存并发送
99 -export const sendConfirmIn = params => { return http.post(`${baseUrlPrediction}/sendConfirmIn`, params); }; 106 +export const sendConfirmIn = params => { return http.post(`${baseUrlConfirm}/sendConfirmIn`, params); };
  107 +// 修改
  108 +
  109 +
100 //删除方法 110 //删除方法
101 export const editConfirm=params=>{return http.put(`${baseUrlConfirm}/editConfirm`, params);}; 111 export const editConfirm=params=>{return http.put(`${baseUrlConfirm}/editConfirm`, params);};
102 //查询列表 112 //查询列表
@@ -92,6 +92,8 @@ import queryFlightConfigure from './views/airtransport/queryFlightConfigure.vue' @@ -92,6 +92,8 @@ import queryFlightConfigure from './views/airtransport/queryFlightConfigure.vue'
92 import Consigner from './views/consigner/consigner.vue' 92 import Consigner from './views/consigner/consigner.vue'
93 import Consignee from './views/consigner/consignee.vue' 93 import Consignee from './views/consigner/consignee.vue'
94 import Security from './views/security/security.vue' 94 import Security from './views/security/security.vue'
  95 +import dynamics from './views/airtransport/dynamics.vue'
  96 +
95 97
96 98
97 // 场站管理 99 // 场站管理
@@ -408,7 +410,15 @@ let routes = [ @@ -408,7 +410,15 @@ let routes = [
408 {path:'/queryFlightConfigure',component:queryFlightConfigure,name:'航班配置查询'}, 410 {path:'/queryFlightConfigure',component:queryFlightConfigure,name:'航班配置查询'},
409 ] 411 ]
410 }, 412 },
411 - 413 + {
  414 + path: '/at',
  415 + component: Home,
  416 + name: '在港动态',
  417 + iconCls:'el-icon-goods',
  418 + children:[
  419 + {path:'/dynamics',component:dynamics,name:'在港动态信息'},
  420 + ]
  421 + },
412 // { 422 // {
413 // path: '/express-system', 423 // path: '/express-system',
414 // component: Home, 424 // component: Home,
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <el-row class="row-bg">
  5 + <el-col :span="24">
  6 + <div class="grid-content content">在港动态</div>
  7 + </el-col>
  8 + </el-row>
  9 + <!-- 搜索区域-->
  10 + <el-row>
  11 + <el-form :inline="true" :model="queryForm" class="demo-form-inline">
  12 + <el-col :span="7">
  13 + <el-form-item label="航空器注册编号">
  14 + <el-input v-model="queryForm.aircraftno" size="small" style="width: 140px" placeholder="请输入" />
  15 + </el-form-item>
  16 + </el-col>
  17 + <el-col :span="6">
  18 + <el-form-item label="航班号">
  19 + <el-input v-model="queryForm.flightno" size="small" style="width: 140px" placeholder="请输入" />
  20 + </el-form-item>
  21 + </el-col>
  22 + <el-col :span="6">
  23 + <el-form-item label="航班日期">
  24 + <el-date-picker
  25 + v-model="queryForm. flightdate"
  26 + type="date" size="small"
  27 + value-format="yyyyMMdd"
  28 + format="yyyyMMdd"
  29 + style="width:140px"
  30 + placeholder="选择日期">
  31 + </el-date-picker>
  32 + </el-form-item>
  33 + </el-col>
  34 +
  35 + <el-col :span="5">
  36 + <el-form-item>
  37 + <el-button size="small" type="primary" @click="transList">查询</el-button>
  38 + <el-button size="small" type="success" @click="trans_toAddDialog">新增</el-button>
  39 +
  40 + </el-form-item>
  41 + </el-col>
  42 + </el-form>
  43 + </el-row>
  44 + <!-- 表单区域-->
  45 + <el-row>
  46 + <el-col :span="24">
  47 + <div class="grid-content content">在港动态信息</div>
  48 + </el-col>
  49 + </el-row>
  50 + <el-row>
  51 + <el-table
  52 + :data="tableData"
  53 + border
  54 + size="small"
  55 + style="width: 100%"
  56 + :header-cell-style="{textAlign: 'center'}"
  57 + :cell-style="{ textAlign: 'center' }"
  58 + >
  59 + <el-table-column
  60 + fixed
  61 + prop="aircraftno"
  62 + label="航空器注册编号"
  63 + width="120"
  64 + />
  65 + <el-table-column
  66 + prop="flightno"
  67 + label="航班号"
  68 + width="140"
  69 + >
  70 + </el-table-column>
  71 + <el-table-column
  72 + prop="flightdate"
  73 + label="航班日期"
  74 + width="120"
  75 + />
  76 + <el-table-column
  77 + prop="flightno"
  78 + label="海关关区"
  79 + width="120"
  80 + />
  81 + <el-table-column
  82 + prop="customcode"
  83 + label="注册海关关区"
  84 + width="120"
  85 + />
  86 + <el-table-column
  87 + prop="registeredcustom"
  88 + label="航空器备案类型"
  89 + width="120"
  90 + />
  91 + <el-table-column
  92 + prop="callport"
  93 + label="停靠港"
  94 + width="120"
  95 + >
  96 + </el-table-column>
  97 + <el-table-column
  98 + prop="callarea"
  99 + label="停机位"
  100 + width="120"
  101 + >
  102 + </el-table-column>
  103 + <el-table-column
  104 + prop="reasons"
  105 + label="滞留原因"
  106 + width="120"
  107 + >
  108 + </el-table-column>
  109 + <el-table-column
  110 + prop="remark"
  111 + label="海关备注"
  112 + width="120"
  113 + >
  114 + </el-table-column>
  115 + <el-table-column
  116 + fixed="right"
  117 + label="操作"
  118 + width="250"
  119 + >
  120 + <template slot-scope="scope">
  121 + <el-button style="margin-top: 10px" type="primary" size="mini" @click="trans_toEditDialog(scope.$index,scope.row)">编辑</el-button>
  122 + <el-button type="success" size="mini" @click="trans_send(scope.$index,scope.row)">申报</el-button>
  123 + <el-button type="danger" size="mini" @click="trans_remove(scope.$index,scope.row)">删除</el-button>
  124 + </template>
  125 + </el-table-column>
  126 + </el-table>
  127 + <!--分页区域-->
  128 + <div class="block" style="margin-top: 10px">
  129 + <el-pagination
  130 + :current-page="queryForm.pageNum"
  131 + :page-sizes="[10, 50, 100, 500]"
  132 + :page-size="queryForm.pageSize"
  133 + layout="total, sizes, prev, pager, next, jumper"
  134 + :total="total"
  135 + @size-change="handleSizeChange"
  136 + @current-change="handleCurrentChange"
  137 + />
  138 + </div>
  139 + </el-row>
  140 + <!-- 新增、修改 弹框-->
  141 + <el-row>
  142 + <el-dialog
  143 + :title="dialogMap[dialogStatus]"
  144 + :visible.sync="trans_dialog.addDialog"
  145 + style="margin-top: -50px"
  146 + text-align="center"
  147 + width="80%"
  148 + @close="trans_addDialogClosed"
  149 + >
  150 + <el-form ref="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" style="margin-top: -20px;label:right" :rules="rules" >
  151 + <el-row>
  152 + <el-col :span="24">
  153 + <div class="grid-content content">报给单位</div>
  154 + </el-col>
  155 + </el-row>
  156 + <el-col :span="6">
  157 + <el-form-item label="海关关区" prop="customcode">
  158 + <el-input v-model="form.customcode" size="small" style="width: 140px" placeholder="" />
  159 + </el-form-item>
  160 + </el-col>
  161 + <el-row>
  162 + <el-col :span="24">
  163 + <div class="grid-content content">航空器信息</div>
  164 + </el-col>
  165 + </el-row>
  166 + <el-col :span="6">
  167 + <el-form-item label="航空器注册号" prop="aircraftno">
  168 + <el-input v-model="form.aircraftno" size="small" style="width: 140px" placeholder="" />
  169 + </el-form-item>
  170 + </el-col>
  171 + <el-col :span="6">
  172 + <el-form-item label="注册海关关区" prop="registeredcustom">
  173 + <el-input v-model="form.registeredcustom" size="small" style="width: 140px" placeholder="" />
  174 + </el-form-item>
  175 + </el-col>
  176 + <el-col :span="6">
  177 + <el-form-item label="航空器类型" prop="aircrafttype">
  178 + <el-input v-model="form.aircrafttype" size="small" style="width: 140px" placeholder="" />
  179 + </el-form-item>
  180 + </el-col>
  181 + <el-row>
  182 + <el-col :span="24">
  183 + <div class="grid-content content">在港申报信息</div>
  184 + </el-col>
  185 + </el-row>
  186 + <el-col :span="6">
  187 + <el-form-item label="航班号" prop="flightno">
  188 + <el-input v-model="form.flightno" size="small" style="width: 140px" placeholder="" />
  189 + </el-form-item>
  190 + </el-col>
  191 + <el-col :span="6">
  192 + <el-form-item label="航班日期" prop="flightdate">
  193 + <el-date-picker
  194 + v-model="form.flightdate"
  195 + value-format="yyyyMMdd"
  196 + format="yyyyMMdd" size="small" type="date" placeholder="选择日期" style="width: 140px;" />
  197 + </el-form-item>
  198 + </el-col>
  199 + <el-col :span="6">
  200 + <el-form-item label="停靠港" prop="callport">
  201 + <el-input v-model="form.callport" size="small" style="width: 140px" placeholder="" />
  202 + </el-form-item>
  203 + </el-col>
  204 + <el-col :span="6">
  205 + <el-form-item label="停机位" prop="callarea">
  206 + <el-input v-model="form.callarea" size="small" style="width: 140px" placeholder="" />
  207 + </el-form-item>
  208 + </el-col>
  209 + <el-row>
  210 + <el-col :span="24">
  211 + <div class="grid-content content">备注信息</div>
  212 + </el-col>
  213 + </el-row>
  214 + <el-col :span="24">
  215 + <el-form-item label="滞留原因" prop="reasons">
  216 + <el-input
  217 + v-model="form.reasons"
  218 + type="textarea"
  219 + :rows="2" size="small" style="width:440px"
  220 + placeholder="请输入内容"
  221 + />
  222 + </el-form-item>
  223 + </el-col>
  224 + <el-col :span="24">
  225 + <el-form-item label="海关备注" prop="remark">
  226 + <el-input
  227 + v-model="form.remark"
  228 + type="textarea"
  229 + :rows="2" size="small" style="width:440px"
  230 + placeholder="请输入内容"
  231 + />
  232 + </el-form-item>
  233 + </el-col>
  234 + <el-row>
  235 + <el-col :span="24">
  236 + <el-form-item>
  237 + <el-button size="small" style="margin-left: 500px;width: 100px" type="info" @click="trans_dialog.addDialog = false">取消</el-button>
  238 + <el-button type="primary" size="small" style="margin-left: 20px;width: 100px" @click="dialogStatus==='create'?trans_add():trans_edit()">提交</el-button>
  239 + </el-form-item>
  240 + </el-col>
  241 + </el-row>
  242 +
  243 + </el-form>
  244 + </el-dialog>
  245 + </el-row>
  246 + </el-main>
  247 + </el-container>
  248 +
  249 +</template>
  250 +
  251 +<script>
  252 + import {addAircraftStaying, selectAircraftStaying, sendAircraftStaying} from "../../api/transport";
  253 +
  254 + export default {
  255 + name: "dynamics" ,
  256 + data() {
  257 + return {
  258 + queryForm: {
  259 + aircraftno: '',
  260 + flightno: '',
  261 + flightdate: '',
  262 + pageNum: 1,
  263 + pageSize: 10
  264 + },
  265 + total: 0,
  266 + tableData:[
  267 + ],
  268 + dialogMap: {
  269 + update: '编辑',
  270 + create: '新增'
  271 + },
  272 + dialogStatus: 'create',
  273 + trans_dialog: {
  274 + // 添加对话框
  275 + addDialog: false,
  276 + // 编辑对话框
  277 + editDialog: false
  278 + },
  279 + form:{
  280 + aircraftno: '',
  281 + customcode: '',
  282 + registeredcustom: '',
  283 + aircrafttype: '',
  284 + flightno: '',
  285 + flightdate: '',
  286 + callport: '',
  287 + callarea: '',
  288 + reasons: '',
  289 + remark: '',
  290 + },
  291 + rules: {
  292 + }
  293 +
  294 + }
  295 + },
  296 + mounted() {
  297 + this.transList();
  298 + },
  299 + methods: {
  300 + // 类型转换
  301 + // formatStatus: function(row, column) {
  302 + // return row.status == 0 ? '未审核' : row.status == 1 ? '审核通过' : '审核不通过'
  303 + // },
  304 + handleSizeChange(val) {
  305 + this.formInline.pageSize = val
  306 + this.transList()
  307 + },
  308 + handleCurrentChange(val) {
  309 + this.formInline.pageNum = val
  310 + this.transList()
  311 + },
  312 + // 获取消息标签列表
  313 + transList() {
  314 + const _this = this
  315 + selectAircraftStaying(this.queryForm).then((response) => {
  316 + const res = response.data
  317 + if (res.code !== '200') {
  318 + return _this.$message.error('获取消息收发记录,失败!')
  319 + }
  320 + // 获取列表数据
  321 + _this.tableData = res.data.list
  322 + // 获取列表的总记录数
  323 + _this.total = res.data.total
  324 + _this.$message.success('获取消息收发记录,成功!')
  325 + }).catch(error => {
  326 + // 关闭加载
  327 + _this.$message.error(error.toString())
  328 + })
  329 + },
  330 + // 删除
  331 + trans_remove(index, row) {
  332 + // 弹框询问是否删除?
  333 + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
  334 + confirmButtonText: '确定删除',
  335 + cancelButtonText: '取消',
  336 + type: 'warning'
  337 + }
  338 + ).then(() => {
  339 + row.isdelete=1;
  340 + addAircraftStaying(row).then((response) => {
  341 + console.log(row)
  342 + const res = response.data
  343 + if (res.code !== '200') {
  344 + return this.$message.error(res.msg)
  345 + }
  346 + this.$message.success(res.msg)
  347 + // 隐藏对话框
  348 + this.trans_dialog.addDialog = false
  349 + // 刷新列表
  350 + this.transList()
  351 + }).catch(error => {
  352 + this.$message.error(res.msg)
  353 + })
  354 + }).catch(() => {
  355 + })
  356 + },
  357 + // 打开新增
  358 + trans_toAddDialog() {
  359 + this.dialogStatus = 'create'
  360 + this.trans_dialog.addDialog = true
  361 + },
  362 +
  363 + // 新增功能
  364 + trans_add() { // 进行表单的预验证
  365 + this.$refs.form.validate(valid => {
  366 + // 未通过,表单预校验
  367 + if (!valid) return
  368 + addAircraftStaying(this.form).then((response) => {
  369 + const res = response.data
  370 + // 添加失败
  371 + if (res.code !== '200') {
  372 + // 关闭加载
  373 + return this.$message.error(res.msg)
  374 + }
  375 + // 添加,成功
  376 + this.$message.success(res.msg)
  377 + // 隐藏对话框
  378 + this.trans_dialog.addDialog = false
  379 + // 刷新列表
  380 + this.transList()
  381 + }).catch(error => {
  382 + this.$message.error(error.toString())
  383 + })
  384 + })
  385 + },
  386 + // 打开编辑
  387 + trans_toEditDialog(index, row) {
  388 + this.trans_dialog.addDialog = true
  389 + this.dialogStatus = 'update'
  390 + this.$nextTick(() => {
  391 + this.form = Object.assign({}, row)
  392 + })
  393 + },
  394 + // 编辑功能
  395 + trans_edit() {
  396 + // 进行表单的预验证
  397 + this.$refs.form.validate(valid => {
  398 + // 未通过,表单预校验
  399 + if (!valid) return
  400 + addAircraftStaying(this.form).then((response) => {
  401 + const res = response.data
  402 + if (res.code !== '200') {
  403 + return this.$message.error(res.msg)
  404 + }
  405 + this.$message.success(res.msg)
  406 + // 隐藏对话框
  407 + this.trans_dialog.addDialog = false
  408 + // 刷新列表
  409 + this.transList()
  410 + }).catch(error => {
  411 + this.$message.error(error.toString())
  412 + })
  413 + })
  414 + },
  415 + // 申报
  416 + trans_send(index, row) {
  417 + sendAircraftStaying(row).then((response) => {
  418 + const res = response.data
  419 + if (res.code !== '200') {
  420 + return this.$message.error(res.msg);
  421 + }
  422 + this.$message.success('申报成功!');
  423 + this.transList();
  424 + }).catch(error => {
  425 + this.$message.error(error.toString());
  426 + });
  427 + },
  428 + // 关闭对话框
  429 + trans_addDialogClosed() {
  430 + // 重置对话框
  431 + this.$refs.form.resetFields()
  432 + }
  433 + }
  434 +
  435 +
  436 +
  437 + }
  438 +</script>
  439 +
  440 +<style scoped>
  441 + .grid-content {
  442 + height: 36px;
  443 + line-height: 36px;
  444 + }
  445 + .el-dialog__body{text-align: center}
  446 + .content {
  447 + border-left: 4px #409EFF solid;
  448 + padding-left: 10px;
  449 + background-color: #f9fafc;
  450 + margin-bottom: 2px
  451 + }
  452 +
  453 + .row-bg{
  454 + background-color: white;
  455 + }
  456 +</style>