作者 zhangFan

出港业务总体优化,落装改配新增

要显示太多修改。

为保证性能只显示 19 of 19+ 个文件。

import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt3201'
export const getMt3201ListForParam = params => {
return http.get(`${baseUrl}/getMt3201ListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/flight'
export const getFlightListForParam = params => {
return http.get(`${baseUrl}/getFlight`, params);
};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt4201'
export const getMt4201ListForParam = params => {
return http.get(`${baseUrl}/getMt4201ListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/manifest'
export const getManifests = params => {
return http.get(`${baseUrl}/getManifests`, params);
};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt2201'
export const getMt2201ListForParam = params => { return http.get(`${baseUrl}/getMt2201ListForParam`, params)};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params) };
export const updateMT2201 = params => { return http.put(`${baseUrl}/updateMT2201`,params)};
export const addMt2201 = params => { return http.post(`${baseUrl}/addMt2201`,params)};
export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLostLoadChange`, params)};
export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt520x'
export const getMt520XListForParam = params => {
return http.get(`${baseUrl}/getMt520xListForParam`, params);
};
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
... ...
... ... @@ -17,22 +17,12 @@ export default {
return axios({
method: 'GET',
url: url,
data: params,
params: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
}
});
},
getUrlEnclode(url, params) {
return axios({
method: 'GET',
url: url,
data: qs.stringify(params),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
});
},
put(url, params){
return axios({
method: 'PUT',
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/rep'
export const getResponseForParam = params => {
return http.get(`${baseUrl}/getResponseForParam`, params);
};
... ...
... ... @@ -8,6 +8,15 @@ import Perm from './views/nav1/perm.vue'
import LOG from './views/nav1/Log.vue'
import PreManifest from './views/agent/PreManifest.vue'
import OrgManifest from './views/nmms/orgManifest.vue'
import ExitFlight from './views/nmms/ExitFlight.vue'
import ExitPre from './views/nmms/ExitPre.vue'
import ExitTidy from './views/nmms/ExitTidy.vue'
import ExitArrive from './views/nmms/ExitArrive.vue'
import ExitManifest from './views/nmms/ExitManifest.vue'
import ExitLoading from './views/nmms/ExitLoading.vue'
import ExitFlightDesc from './views/nmms/ExitFlightDesc.vue'
import LostLoadChange from './views/lostLoadChange/lostLoadChange.vue'
import LostLoad from './views/lostLoadChange/lostLoading.vue'
// import Form from './views/nav1/Form.vue'
import User from './views/nav1/user.vue'
... ... @@ -36,7 +45,7 @@ let routes = [
leaf: true,
iconCls: 'el-icon-menu',
children: [
{ path: '/main', component: Main, name: '首页'},
{path: '/main', component: Main, name: '首页'},
]
},
// { path: '/test', component: Main },
... ... @@ -46,10 +55,10 @@ let routes = [
name: '系统设置',
iconCls: 'el-icon-setting',//图标样式class
children: [
{ path: '/user', component: User, name: '用户管理' },
{ path: '/role', component: Role, name: '角色管理' },
{ path: '/perm', component: Perm, name: '权限管理' },
{ path: '/log', component: LOG, name: '系统日志' },
{path: '/user', component: User, name: '用户管理'},
{path: '/role', component: Role, name: '角色管理'},
{path: '/perm', component: Perm, name: '权限管理'},
{path: '/log', component: LOG, name: '系统日志'},
]
},
{
... ... @@ -58,8 +67,32 @@ let routes = [
name: '代理人',
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/pre', component: PreManifest, name: '预配' },
{ path: '/org', component: OrgManifest, name: '进港' }
{path: '/pre1', component: PreManifest, name: '预配'},
]
},
{
path: '/output',
component: Home,
name: '出港业务申报',
iconCls: 'el-icon-collection',
children: [
{path: '/flight', component: ExitFlight, name: '出港航班申报'},
{path: '/pre', component: ExitPre, name: '出港预配舱单'},
{path: '/manifest', component: ExitManifest, name: '出港运单申报'},
{path: '/arrive', component: ExitArrive, name: '出港运抵'},
{path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
{path: '/loading', component: ExitLoading, name: '出港装载'},
{path: '/tidy', component: ExitTidy, name: '出港理货'}
]
},
{
path: '/lost',
component: Home,
name: '落装改配申报',
iconCls:'el-icon-goods',
children:[
{path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
// {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
]
},
{
... ... @@ -68,8 +101,8 @@ let routes = [
name: '导航二',
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/page4', component: Page4, name: '页面4' },
{ path: '/page5', component: Page5, name: '页面5' }
{path: '/page4', component: Page4, name: '页面4'},
{path: '/page5', component: Page5, name: '页面5'}
]
},
{
... ... @@ -79,7 +112,7 @@ let routes = [
iconCls: 'fa fa-address-card',
leaf: true,//只有一个节点
children: [
{ path: '/page6', component: Page6, name: '导航三' }
{path: '/page6', component: Page6, name: '导航三'}
]
},
{
... ... @@ -88,13 +121,13 @@ let routes = [
name: 'Charts',
iconCls: 'fa fa-bar-chart',
children: [
{ path: '/echarts', component: echarts, name: 'echarts' }
{path: '/echarts', component: echarts, name: 'echarts'}
]
},
{
path: '*',
hidden: true,
redirect: { path: '/404' }
redirect: {path: '/404'}
}
];
let initRouters = routes.concat();
... ... @@ -105,7 +138,7 @@ let setUserMenus = function (list) {
* 处理登陆后的账号对应的菜单
* @param menuList
*/
let handleMenuList = function (router,menu) {
let handleMenuList = function (router, menu) {
var _self = this;
var routerName = "";
router.forEach(function (v_router) {
... ... @@ -118,16 +151,16 @@ let handleMenuList = function (router,menu) {
//匹配到继续判断是否子元素,有子元素继续递归
if (result) {
if(v_router.children) {
_self.handleMenuList(v_router.children,result.children);
if (v_router.children) {
_self.handleMenuList(v_router.children, result.children);
}
//没有则可以移除
}else {
router.splice(router.findIndex(itm => itm.name === routerName ),1);
} else {
router.splice(router.findIndex(itm => itm.name === routerName), 1);
}
})
});
}
export default {
routes,setUserMenus,handleMenuList,initRouters
routes, setUserMenus, handleMenuList, initRouters
};
... ...
... ... @@ -35,6 +35,18 @@ export function validAlphabets(str) {
return reg.test(str)
}
/* 大小写字母数字*/
export function validAlphabetsAndNum(str) {
const reg = /^[0-9A-Za-z]+$/
return reg.test(str)
}
/* 大小写字母数字空格*/
export function validAlphabetsAndSpanceKey(str) {
const reg = /^[0-9a-zA-Z ]+$/
return reg.test(str)
}
/**
* 航班校验
*/
... ...
<template>
<el-row class="container">
<el-col :span="24" class="header">
<el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
{{collapsed?'':sysName}}
</el-col>
<el-col :span="10">
<div class="tools" @click.prevent="collapse">
<i class="fa fa-align-justify"></i>
</div>
</el-col>
<el-col :span="4" class="userinfo">
<el-dropdown trigger="hover">
<span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>我的消息</el-dropdown-item>
<el-dropdown-item>设置</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-col>
</el-col>
<el-col :span="24" class="main">
<aside :class="collapsed?'menu-collapsed':'menu-expanded'">
<!--导航菜单-->
<el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen" @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed" style="min-width: 230px">
<template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
<el-submenu :index="index+''" v-if="!item.leaf">
<template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
<el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden">{{child.name}}</el-menu-item>
</el-submenu>
<el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i :class="item.iconCls"></i>{{item.children[0].name}}</el-menu-item>
</template>
</el-menu>
<!--导航菜单-折叠后-->
<ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed">
<li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
<template v-if="!item.leaf">
<div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
<ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
<li v-for="child in item.children" v-if="!child.hidden" :key="child.path" class="el-menu-item" style="padding-left: 40px;" :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">{{child.name}}</li>
</ul>
</template>
<template v-else>
<li class="el-submenu">
<div class="el-submenu__title el-menu-item" style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;" :class="$route.path==item.children[0].path?'is-active':''" @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div>
</li>
</template>
</li>
</ul>
</aside>
<section class="content-container">
<div class="grid-content bg-purple-light">
<el-col :span="24" class="breadcrumb-container">
<strong class="title">{{$route.name}}</strong>
<el-breadcrumb separator="/" class="breadcrumb-inner">
<el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
<el-col :span="24" class="content-wrapper">
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
</el-col>
</div>
</section>
</el-col>
</el-row>
<el-row class="container">
<el-col :span="24" class="header">
<el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
{{collapsed?'':sysName}}
</el-col>
<el-col :span="10">
<div class="tools" @click.prevent="collapse">
<i class="fa fa-align-justify"></i>
</div>
</el-col>
<el-col :span="4" class="userinfo">
<el-dropdown trigger="hover">
<span class="el-dropdown-link userinfo-inner"><img
:src="this.sysUserAvatar"/> {{sysUserName}}</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>我的消息</el-dropdown-item>
<el-dropdown-item>设置</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-col>
</el-col>
<el-col :span="24" class="main">
<aside :class="collapsed?'menu-collapsed':'menu-expanded'">
<!--导航菜单-->
<el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen"
@close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed"
style="min-width: 230px">
<template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
<el-submenu :index="index+''" v-if="!item.leaf">
<template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
<el-menu-item v-for="child in item.children" :index="child.path" :key="child.path"
v-if="!child.hidden">{{child.name}}
</el-menu-item>
</el-submenu>
<el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i
:class="item.iconCls"></i>{{item.children[0].name}}
</el-menu-item>
</template>
</el-menu>
<!--导航菜单-折叠后-->
<ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed">
<li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
<template v-if="!item.leaf">
<div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)"
@mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
<ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)"
@mouseout="showMenu(index,false)">
<li v-for="child in item.children" v-if="!child.hidden" :key="child.path"
class="el-menu-item" style="padding-left: 40px;"
:class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">
{{child.name}}
</li>
</ul>
</template>
<template v-else>
<li class="el-submenu">
<div class="el-submenu__title el-menu-item"
style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;"
:class="$route.path==item.children[0].path?'is-active':''"
@click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div>
</li>
</template>
</li>
</ul>
</aside>
<section class="content-container">
<div class="grid-content bg-purple-light">
<el-col :span="24" class="breadcrumb-container">
<strong class="title">{{$route.name}}</strong>
<el-breadcrumb separator="/" class="breadcrumb-inner">
<el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
<el-col :span="24" class="content-wrapper">
<transition name="fade" mode="out-in">
<router-view :key="$route.path +$route.query.t"></router-view>
</transition>
</el-col>
</div>
</section>
</el-col>
</el-row>
</template>
<script>
import rt from '../routes'
export default {
data() {
return {
sysName:'流浪地球管理系统',
collapsed:false,
sysUserName: '',
sysUserAvatar: '',
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
}
}
},
methods: {
onSubmit() {
console.log('submit!');
},
handleopen() {
console.log('handleopen');
},
handleclose() {
console.log('handleclose');
},
handleselect: function (a, b) {
console.log('handleselect!');
},
//退出登录
logout: function () {
var _this = this;
this.$confirm('确认退出吗?', '提示', {
//type: 'warning'
}).then(() => {
sessionStorage.removeItem('user');
provide() {
return {
reload: this.reload
}
},
data() {
return {
sysName: '流浪地球管理系统',
collapsed: false,
sysUserName: '',
sysUserAvatar: '',
isRouterAlive: true,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
}
}
},
methods: {
reload() {
this.$nextTick(function () {
this.$router.push({
path: this.$router.path,
query:{
t: new Date().getTime()
}
})
})
},
onSubmit() {
console.log('submit!');
},
handleopen() {
console.log('handleopen');
},
handleclose() {
console.log('handleclose');
},
handleselect: function (a, b) {
this.reload()
},
//退出登录
logout: function () {
var _this = this;
this.$confirm('确认退出吗?', '提示', {
//type: 'warning'
}).then(() => {
sessionStorage.removeItem('user');
sessionStorage.removeItem('menu');
//退出后初始化原来的路由
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
_this.$router.push('/login');
}).catch(() => {
});
},
//折叠导航栏
collapse:function(){
this.collapsed=!this.collapsed;
},
showMenu(i,status){
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none';
}
},
mounted() {
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
// console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
_this.$router.push('/login');
}).catch(() => {
});
},
//折叠导航栏
collapse: function () {
this.collapsed = !this.collapsed;
},
showMenu(i, status) {
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none';
}
},
mounted() {
var _this = this;
var user = sessionStorage.getItem('user');
if (user) {
user = JSON.parse(user);
this.sysUserName = user.username || '';
this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
}
//操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
var userRouters = sessionStorage.getItem('menu');
if (userRouters) {
var user = sessionStorage.getItem('user');
if (user) {
user = JSON.parse(user);
this.sysUserName = user.username || '';
this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
}
//操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
var userRouters = sessionStorage.getItem('menu');
if (userRouters) {
userRouters = JSON.parse(userRouters);
_this.$router.options.routes = userRouters;
console.log("home:");
console.log(_this.$router.options.routes);
}
}
}
// console.log("home:");
// console.log(_this.$router.options.routes);
}
}
}
</script>
<style scoped lang="scss">
@import '~scss_vars';
.container {
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
color:#fff;
.userinfo {
text-align: right;
padding-right: 35px;
float: right;
.userinfo-inner {
cursor: pointer;
color:#fff;
img {
width: 40px;
height: 40px;
border-radius: 20px;
margin: 10px 0px 10px 10px;
float: right;
}
}
}
.logo {
//width:230px;
height:60px;
font-size: 22px;
padding-left:20px;
padding-right:20px;
border-color: rgba(238,241,146,0.3);
border-right-width: 1px;
border-right-style: solid;
img {
width: 40px;
float: left;
margin: 10px 10px 10px 18px;
}
.txt {
color:#fff;
}
}
.logo-width{
width:230px;
}
.logo-collapse-width{
width:60px
}
.tools{
padding: 0px 23px;
width:14px;
height: 60px;
line-height: 60px;
cursor: pointer;
}
}
.main {
display: flex;
// background: #324057;
position: absolute;
top: 60px;
bottom: 0px;
overflow: hidden;
aside {
flex:0 0 230px;
width: 230px;
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu{
height: 100%;
}
.collapsed{
width:60px;
.item{
position: relative;
}
.submenu{
position:absolute;
top:0px;
left:60px;
z-index:99999;
height:auto;
display:none;
}
}
}
.menu-collapsed{
flex:0 0 60px;
width: 60px;
}
.menu-expanded{
flex:0 0 230px;
width: 230px;
}
.menu-expanded ul{
width: 230px;
}
.content-container {
// background: #f1f2f7;
flex:1;
// position: absolute;
// right: 0px;
// top: 0px;
// bottom: 0px;
// left: 230px;
overflow-y: scroll;
padding: 20px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
width: 200px;
float: left;
color: #475669;
}
.breadcrumb-inner {
float: right;
}
}
.content-wrapper {
background-color: #fff;
box-sizing: border-box;
}
}
}
}
@import '~scss_vars';
.container {
position: absolute;
top: 0px;
bottom: 0px;
width: 100%;
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
color: #fff;
.userinfo {
text-align: right;
padding-right: 35px;
float: right;
.userinfo-inner {
cursor: pointer;
color: #fff;
img {
width: 40px;
height: 40px;
border-radius: 20px;
margin: 10px 0px 10px 10px;
float: right;
}
}
}
.logo {
//width:230px;
height: 60px;
font-size: 22px;
padding-left: 20px;
padding-right: 20px;
border-color: rgba(238, 241, 146, 0.3);
border-right-width: 1px;
border-right-style: solid;
img {
width: 40px;
float: left;
margin: 10px 10px 10px 18px;
}
.txt {
color: #fff;
}
}
.logo-width {
width: 230px;
}
.logo-collapse-width {
width: 60px
}
.tools {
padding: 0px 23px;
width: 14px;
height: 60px;
line-height: 60px;
cursor: pointer;
}
}
.main {
display: flex;
// background: #324057;
position: absolute;
top: 60px;
bottom: 0px;
overflow: hidden;
aside {
flex: 0 0 230px;
width: 230px;
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu {
height: 100%;
}
.collapsed {
width: 60px;
.item {
position: relative;
}
.submenu {
position: absolute;
top: 0px;
left: 60px;
z-index: 99999;
height: auto;
display: none;
}
}
}
.menu-collapsed {
flex: 0 0 60px;
width: 60px;
}
.menu-expanded {
flex: 0 0 230px;
width: 230px;
}
.menu-expanded ul {
width: 230px;
}
.content-container {
// background: #f1f2f7;
flex: 1;
// position: absolute;
// right: 0px;
// top: 0px;
// bottom: 0px;
// left: 230px;
overflow-y: scroll;
padding: 20px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
width: 200px;
float: left;
color: #475669;
}
.breadcrumb-inner {
float: right;
}
}
.content-wrapper {
background-color: #fff;
box-sizing: border-box;
}
}
}
}
</style>
... ...
... ... @@ -9,7 +9,7 @@
<el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button>
</div>
<tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
<tree-table :data="tableData" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
<el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable>
<template slot-scope="scope">
<span>{{ scope.row.waybillNo }}</span>
... ... @@ -79,7 +79,7 @@
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true">
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen>
<el-form ref="" :inline="true" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
<div>
<el-tag type="info" effect="plain">
... ... @@ -402,6 +402,7 @@ export default {
return {
func: treeToArray,
expandAll: true,
fullscreen:true,
total: 1,
resend: true,
loading:false,
... ... @@ -427,6 +428,7 @@ export default {
flightDate: '',
custom: ''
},
tableData:[],
temp: {
id: undefined,
waybillNo: '',
... ... @@ -440,99 +442,7 @@ export default {
maniWeight: undefined
},
manifestCustoms: ['4604', '4620', '4613'],
data: [
{
id: 0,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 1,
waybillNo: '580-20728396',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: 'wrong',
customText: ' 预配回执异常 ',
customComplate: 25,
children: [
{
id: 2,
waybillNo: '580-20728396',
houseWaybillNo: 'ADDSS21231',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10002',
customText: ' 已暂存',
customComplate: 0
},
{
id: 3,
waybillNo: '580-20728396',
houseWaybillNo: 'SDE3411',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '45103',
customText: ' 45103 该提(运)单的运抵报告重复申报,海关审核不通过。 关区代码:4604。',
customComplate: 100
},
{
id: 4,
waybillNo: '580-20728396',
houseWaybillNo: 'SDE3411',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10000',
customText: ' 已删除 ',
customComplate: 50
}
]
},
{
id: 4,
waybillNo: '580-20728391',
houseWaybillNo: '',
custom: '4604',
flight: 'KA740',
flightDate: '2019-06-29',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10003',
customText: ' 已发送预配舱单 '
}
],
pickerOptions: {
shortcuts: [
{
... ... @@ -580,6 +490,10 @@ export default {
}
}
},
created(){
console.log(this.$route.params.scopeRow)
this.getList()
},
methods: {
message(row) {
this.$message.info(row.event)
... ... @@ -624,7 +538,369 @@ export default {
row.status = status
},
getList() {
this.tableData = [
{
id: 0,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 1,
waybillNo: '580-20728396',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: 'wrong',
customText: ' 预配回执异常 ',
customComplate: 25,
children: [
{
id: 2,
waybillNo: '580-20728396',
houseWaybillNo: 'ADDSS21231',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10002',
customText: ' 已暂存',
customComplate: 0
},
{
id: 3,
waybillNo: '580-20728396',
houseWaybillNo: 'SDE3411',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '45103',
customText: ' 45103 该提(运)单的运抵报告重复申报,海关审核不通过。 关区代码:4604。',
customComplate: 100
},
{
id: 4,
waybillNo: '580-20728396',
houseWaybillNo: 'SDE3411',
custom: '4604',
flight: 'CV9731',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10000',
customText: ' 已删除 ',
customComplate: 50
}
]
},
{
id: 4,
waybillNo: '580-20728391',
houseWaybillNo: '',
custom: '4604',
flight: 'KA740',
flightDate: '2019-06-29',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '10003',
customText: ' 已发送预配舱单 '
},
{
id: 5,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 6,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 7,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 8,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 9,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 10,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 11,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 12,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 13,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},{
id: 14,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 15,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 16,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 17,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 18,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 19,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 20,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
},
{
id: 23,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41301',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
}, {
id: 22,
waybillNo: '580-20728399',
houseWaybillNo: '',
custom: '4604',
flight: 'CV9733',
flightDate: '2019-06-21',
oriStation: 'LUX',
desStation: 'CGO',
maniPiece: 50,
maniWeight: 21321,
status: '41300',
customText: ' 预配舱单主要数据传输成功。',
customComplate: 25
}
]
this.total = this.tableData.length
},
handleSelectionChange(val) {
this.multipleSelection = val
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
<el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
</div>
<div class="filter-container">
<el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
<el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
<el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
<el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="warning"
@click="handleUpdateStatus">批量修改状态</el-button>
</div>
<div class="midSpan">
<el-row>
<el-col :span="0.5">
<span style="color: red">注:</span>
</el-col>
<el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
<span>预配舱单</span>
</el-col>
<el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
<span>出港运抵</span>
</el-col>
<el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
<span>出港装载</span>
</el-col>
<el-col :span="1" style="background: #f5ffc0" align="center">
<span>出港理货</span>
</el-col>
</el-row>
</div>
<tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
style="font-size: 13px" border @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column label="航班号" width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center" >
<template slot-scope="scope" >
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
<a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getManifests} from "@/api/exitManifest"
import {getMt520XListForParam} from "@/api/exitTidy";
import {getMt3201ListForParam} from "@/api/exitArrive";
import {getMt4201ListForParam} from "@/api/exitLoading";
export default {
name: "LostLoadChange",
components: {treeTable, Pagination},
inject:['reload'],
data() {
return {
func: treeToArray,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba:undefined,
carrier: undefined,
flightno:undefined,
flightDate: new Date(),
messageType: undefined,
messageStatus: undefined,
customStatus: undefined,
},
manifestData: [],
messageTypeList: [
{label:'预配舱单',value:'MT2201'},
{label:'出港运抵',value:'MT3201'},
{label:'出港装载',value:'MT4201'},
{label:'出港理货',value:'MT5202'}
],
messageStatusList: [
{label:'未发送',value:'01'},
{label:'已发舱单报',value:'02'},
{label:'舱单报退单',value:'05'},
{label:'舱单转人工',value:'06'},
{label:'舱单报申报成功',value:'07'},
{label:'已发舱单删除报',value:'08'},
{label:'舱单删除报退单',value:'09'},
{label:'舱单删除报转人工',value:'10'},
{label:'舱单删除成功',value:'11'},
{label:'已发舱单修改报',value:'12'},
{label:'舱单修改报退单',value:'13'},
{label:'舱单修改报转人工',value:'14'},
{label:'舱单修改报成功',value:'15'},
{label:'海关已存在',value:'16'},
],
customStatusList: [
{label:'普通货物',value:'001'},
{label:'国际转运货物',value:'002'},
{label:'国内转关',value:'003'},
{label:'空箱',value:'004'},
{label:'快件',value:'006'},
]
}
},
methods: {
getList() {
this.listLoading = true
getManifests(this.listQuery).then(res =>{
this.manifestData = res.data.dataList
this.total = res.data.count
setTimeout(() =>{
this.listLoading = false
},1500)
})
},
handleSelectionChange() {
},
handleSearch(){
this.getList()
},
handleUpdateStatus(row){
},
handleUpdate(row){
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT3201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
tableRowClassName({row,index}){
if(row.messageType === 'MT2201'){
return 'MT2201-row'
}
if(row.messageType === 'MT3201'){
return 'MT3201-row'
}
if(row.messageType === 'MT4201'){
return 'MT4201-row'
}
if(row.messageType === 'MT5202'){
return 'MT5202-row'
}
}
}
}
</script>
<style>
.el-table .MT2201-row {
background: oldlace;
}
.el-table .MT3201-row {
background: #f0f9eb;
}
.el-table .MT4201-row {
background: #bce7fd;
}
.el-table .MT5202-row {
background: #f5ffc0;
}
.app-content{
margin-top: 20px;
}
.midSpan{
margin-bottom: 10px;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="主单号"/>
<el-input v-model="listQuery.awbh" clearable style="width: 200px;" class="filter-item" placeholder="分单号"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</div>
<div>
<span style="color: red">注:主分单必须同时为空或者同时不为空</span>
</div>
<tree-table v-loading="listLoading" :data="lostLoadData" :eval-func="func" :expand-all="true"
style="font-size: 12px" border>
<el-table-column label="航班号" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="90px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="落装状态" width="90px" align="center">
<template slot-scope="scope">
<span v-if="scope.row.offload ==='001'">未落装</span>
<span v-if="scope.row.offload ==='002'">已落装</span>
<span v-if="scope.row.offload ==='003'">以落装改配</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.ext5 }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="220px" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="handleLostLoad(scope.row)"
:disabled="scope.row.offload ==='002'">落装申请
</el-button>
<el-button size="mini" type="success" @click="handleLostChange(scope.row)"
:disabled="scope.row.offload ==='003'">落装改配
</el-button>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="lostChangeData" :model="lostChangeModel" :rules="lostChangeRules" label-width="120px">
<el-form-item label="需改配主单号" prop="manifest">
<el-input v-model="lostChangeModel.awba" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="需改配分单号" prop="manifest">
<el-input v-model="lostChangeModel.awbh" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="改配后主单号" prop="manifest">
<el-input v-model="lostChangeModel.manifest" style="width: 300px"></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="dialogStatus==='create'?createData():updateData()">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt2201ListForParam, getLostLoadChange, saveLostChange, saveLostLoad} from "@/api/exitPre";
import {Message} from 'element-ui'
export default {
name: "LostLoad",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
return {
func: treeToArray,
preTableStatus: true,
lostTableStatus: false,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
awbh: undefined,
},
dialogFormVisible: false,
dialogStatus: undefined,
dialogMap: {
create: '发送落装改配'
},
lostLoadData: [],
lostChangeModel:{
uuid: undefined,
awba: undefined,
awbh: undefined,
manifest: undefined
},
lostChangeRules:{}
}
},
methods: {
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awbh !== undefined &&
this.listQuery.awba !== '' && this.listQuery.awbh !== '') {
getLostLoadChange(this.listQuery).then(res => {
this.lostLoadData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
this.listQuery.awba = undefined
this.listQuery.awbh = undefined
getMt2201ListForParam(this.listQuery).then(res => {
this.lostLoadData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
}
},
handleSearch() {
this.getList()
},
handleLostLoad(row) {
console.log(row)
this.$confirm("是否发送落装申请", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认发送',
cancelButtonText: '取消发送'
}).then(() => {
delete row.parent
delete row.children
saveLostLoad(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: res.data.respMessage
})
this.getList()
} else {
this.$message({
type: 'error',
message: res.data.respMessage
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消发送'
: '发送取消'
})
})
},
handleLostChange(row) {
this.lostChangeModel = {
uuid: undefined,
awba: undefined,
awbh: undefined,
manifest: undefined
}
const preModel = Object.assign({},row)
this.lostChangeModel.awba = preModel.awba
this.lostChangeModel.awbh = preModel.awbh
this.lostChangeModel.uuid = preModel.uuid
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(()=>{
this.$refs.lostChangeData.clearValidate()
})
},
createData(){
saveLostChange(this.lostChangeModel).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.dialogFormVisible = false
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
}
}
}
</script>
<style>
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.arriveQuery.carrier}}{{this.arriveQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.arriveQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.arriveQuery.originstation}}-{{this.arriveQuery.destinationstation}}</span>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">出港运抵查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="awba" placeholder="请输入主单号"></el-input>
</div>
</el-col>
<div class="grid-content el-btn">
<el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
<el-button v-if="arriveQuery.flightno ===undefined && arriveData.length<1"
type="primary" size="mini"
@click="handleAddArrive">新增运抵
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content" style="margin-top: 6px">出港运抵明细</div>
</el-col>
</el-row>
</div>
<el-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="航班号" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
</template>
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.awbh}}</span>
</template>
</el-table-column>
<el-table-column label="运抵件数" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.piece}}</span>
</template>
</el-table-column>
<el-table-column label="运抵重量" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="100" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
</el-table-column>
<el-table-column label="运抵时间" width="140" align="center">
<template slot-scope="scope">
<span>{{scope.row.arrivetime}}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
</el-button>
<el-button size="mini" type="danger" @click="handleAwbDelete(scope.row)">发删除报</el-button>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">修改状态
</el-button>
</template>
</el-table-column>
</el-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0"
@click="handelAddArriveInfo">新增出港运抵
</el-button>
<el-button type="primary" size="mini" v-if="arriveModel.flightno !== undefined || arriveData.length>0"
@click="handelBackStep">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="arriveQuery.pageSize"
:limit.sync="arriveQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="arriveFormData" :model="arriveModel" :rules="arriveRoles" label-position="right"
label-width="90px">
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="arriveModel.awba"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="分单号" prop="awbh">
<el-input v-model="awbh"></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker v-model="arriveModel.flightdate" value-format="yyyy-MM-dd" type="date"
placeholder="请输入"
:disabled="dialogFormVisible === 'update'"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation"
:disabled="dialogFormVisible === 'update'"></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>货物信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="运抵件数" prop="piece">
<el-input v-model.number="arriveModel.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运抵重量" prop="weight">
<el-input v-model.number="arriveModel.weight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运抵时间" prop="arrivetime">
<el-date-picker v-model="arriveModel.arrivetime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请输入"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="arriveModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="SaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt3201ListForParam, deleteByIsDelete, updateStatus, updateMT3201, addMt3201} from '@/api/exitArrive'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey} from "@/utils/validate";
import {getResponseForParam} from '@/api/responseDetail'
export default {
name: "ExitArrive",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
callback("只能输入字母、数字、空格")
}
callback()
}
return {
func: treeToArray,
total: 1,
arriveQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
},
dialogMap: {
update: '编辑出港运抵',
create: '添加出港运抵',
},
dialogTableVisible: false,
multipleSelection: [],
customcodeList: [4604, 4620],
dialogStatus: undefined,
awbhStatus: false,
dialogFormVisible: false,
listLoading: false,
arriveRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
},
arriveData: [],
detailData: [],
arriveModel: {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
messageType: 'MT3201'
}
}
},
created() {
if (this.$route.params.flightData !== undefined) {
// 给查询条件赋值
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
this.arriveQuery.originstation = this.$route.params.flightData.originstation
this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation
this.getList()
}
},
computed: {
awba: {
get: function () {
return this.arriveQuery.awba
},
set: function (val) {
this.arriveQuery.awba = val.trim()
}
},
awbh: {
get: function () {
return this.arriveModel.awbh
},
set: function (val) {
this.arriveModel.awbh = val.toUpperCase().trim()
}
},
carrier: {
get: function () {
return this.arriveModel.carrier
},
set: function (val) {
this.arriveModel.carrier = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.arriveModel.goodsname
},
set: function (val) {
this.arriveModel.goodsname = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.arriveModel.flightno
},
set: function (val) {
this.arriveModel.flightno = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.arriveModel.originstation
},
set: function (val) {
this.arriveModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.arriveModel.destinationstation
},
set: function (val) {
this.arriveModel.destinationstation = val.toUpperCase().trim()
}
}
},
methods: {
getList() {
this.listLoading = true
if (this.arriveQuery.awba !== undefined) {
getMt3201ListForParam(this.arriveQuery).then(res => {
this.arriveData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.arriveQuery.carrier = this.arriveData[0].carrier
this.arriveQuery.flightno = this.arriveData[0].flightno
this.arriveQuery.flightdate = this.arriveData[0].flightdate
this.arriveQuery.originstation = this.arriveData[0].originstation
this.arriveQuery.destinationstation = this.arriveData[0].destinationstation
this.arriveQuery.customcode = this.arriveData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
} else {
getMt3201ListForParam(this.arriveQuery).then(res => {
this.arriveData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
}
},
handleSerach() {
this.arriveQuery.carrier = undefined
this.arriveQuery.flightno = undefined
this.arriveQuery.originstation = undefined
this.arriveQuery.flightdate = undefined
this.arriveQuery.destinationstation = undefined
this.getList()
},
handleSelectionChange(val) {
this.multipleSelection = val
},
// 新增出港运抵
handelAddArriveInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.arriveModel.carrier = this.arriveQuery.carrier
this.arriveModel.flightdate = this.arriveQuery.flightdate
this.arriveModel.flightno = this.arriveQuery.flightno
this.arriveModel.originstation = this.arriveQuery.originstation
this.arriveModel.destinationstation = this.arriveQuery.destinationstation
this.arriveModel.customcode = this.arriveQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
},
createData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
addMt3201(this.arriveModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("出港运抵新增成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
// 重置实体
restModel() {
this.arriveModel = {
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
awbh: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
}
},
// 编辑
handleEdit(row) {
this.arriveModel = Object.assign({}, row) // copy obj
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
},
updateData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
updateMT3201(this.arriveModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("出港运抵修改成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
//保存并发送
SaveAndSend() {
},
// 收发明细
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT3201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// 发送舱单报
handleAwbSend() {
},
// 发送修改报
handleAwbEdit() {
},
//发送删除报
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
//更改状态
handleAwbStatus(row) {
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
// 携数据跳转 新增运抵
handleAddArrive() {
const row = {
'messageType': 'MT3201'
}
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
}
}
}
</script>
<style>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titleSpan {
font-weight: bold;
margin-right: 35px;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
.el-table td, .el-table th {
text-align: center
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
</style>
... ...
<template>
<div class="app-content">
<!--<div class="app-container">-->
<div class="filter-container">
<el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" clearable type="date" style="width: 270px;"
placeholder="航班日期"
class="filter-item" value-format="yyyy-MM-dd"></el-date-picker>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
</div>
<el-table :data="flightData" stripe style="font-size: 14px" border>
<el-table-column label="航班号" width="280px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="280px" align="center">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.flightDate }}</span>
</template>
</el-table-column>
<el-table-column label="始发站" width="280px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="280px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button>
<el-button type="primary" size="mini" @click="handleTidy(scope.row)">出港理货</el-button>
<el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
<el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import {getFlightListForParam} from '@/api/exitFlight'
export default {
name: "ExitFlight",
components: {Pagination},
inject: ['reload'],
data() {
return {
total: 1,
listQuery: {
pageSize: 1,
limitSize: 10,
flightNo: undefined,
flightDate: undefined
},
flightData: [],
}
},
created(){
this.getList()
},
methods: {
getList() {
getFlightListForParam(this.listQuery).then(res =>{
this.flightData = res.data.dataList
this.total = res.data.count
})
},
handleSearch() {
this.getList()
},
handleLoading(row) {
row.messageType = 'MT4201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleTidy(row) {
row.messageType = 'MT5201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handleArrive(row) {
row.messageType = 'MT3201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handlePre(row) {
row.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
}
}
</script>
<style scoped>
.app-content{
margin-top: 20px;
}
</style>
... ...
<template>
<el-container>
<el-main>
<el-row>
<el-col :span="24">
<div class="grid-content"><p>请输入航班信息:</p></div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content"><h1>Please Enter The Flight Information:</h1></div>
</el-col>
</el-row>
<el-row type="flex" class="row-bg" justify="center">
<el-col :span="4">
<el-input placeholder="必填" v-model="flightno">
<template slot="prepend">航班号</template>
</el-input>
</el-col>
<el-col :span="4">
<el-date-picker
v-model="flight.flightdate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-col>
<el-col :span="4">
<el-input placeholder="必填" v-model="originstation">
<template slot="prepend">始发站</template>
</el-input>
</el-col>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="必填" v-model="destinationstation">
<template slot="prepend">目的站</template>
</el-input>
</el-col>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="可为空" v-model="awba">
<template slot="prepend">主单号</template>
</el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="4" :offset="10">
<div class="grid-content">
<el-button type="primary" @click="nstep">下一步</el-button>
</div>
</el-col>
</el-row>
</el-main>
</el-container>
</template>
<script>
import {Message} from "element-ui";
export default {
name: 'ExitFlightDesc',
data() {
return {
flight: {
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
messageType:undefined
},
btnStatus: true
};
},
created() {
if (this.$route.params.scopeRow !== undefined) {
if(this.$route.params.scopeRow.carrier === undefined){
this.flight.flightno = this.$route.params.scopeRow.flightno
} else {
this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno
}
this.flight.flightdate = this.$route.params.scopeRow.flightdate
this.flight.originstation = this.$route.params.scopeRow.originstation
this.flight.destinationstation = this.$route.params.scopeRow.destinationstation
this.flight.messageType = this.$route.params.scopeRow.messageType
if(this.$route.params.scopeRow.awba !== undefined){
this.flight.awba = this.$route.params.scopeRow.awba.replace('-','')
}
}
},
computed:{
flightno : {
get: function () {
return this.flight.flightno
},
set: function(val){
this.flight.flightno = val.toUpperCase().trim()
}
},
originstation :{
get: function () {
return this.flight.originstation
},
set: function(val){
this.flight.originstation = val.toUpperCase().trim()
}
},
destinationstation :{
get: function () {
return this.flight.destinationstation
},
set: function(val){
this.flight.destinationstation = val.toUpperCase().trim()
}
},
awba :{
get: function () {
return this.flight.awba
},
set: function(val){
this.flight.awba = val.trim()
}
}
},
methods: {
nstep() {
if (this.flight.flightno !== undefined && this.flight.flightno !==''&&
this.flight.flightdate !== undefined &&this.flight.flightdate !== '' &&
this.flight.destinationstation !== undefined && this.flight.destinationstation !==''&&
this.flight.originstation !== undefined && this.flight.originstation !=='') {
if(this.flight.awba !== '' && this.flight.awba !== undefined){
const manifest = this.flight.awba;
const reg = /^[0-9]{11}$/
if(!reg.test(manifest)){
Message.error("主单号只支持数字并且最多11位")
return
}
const num = (manifest.substring(3,10)) % 7
if(num !== eval(manifest.substring(10))){
Message.error("主单号不符合模7校验")
return
}
} else {
this.flight.awba = undefined
}
if(this.flight.messageType ==="MT5201"){
this.$router.push({name: '出港理货', params: {flightData: this.flight}});
}
if(this.flight.messageType ==="MT4201"){
this.$router.push({name: '出港装载', params: {flightData: this.flight}});
}
if(this.flight.messageType ==="MT3201"){
this.$router.push({name:'出港运抵',params:{flightData: this.flight}})
}
if(this.flight.messageType ==="MT2201"){
this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}})
}
} else {
Message.warning("请将航班信息填写完整")
}
}
}
};
</script>
<style scoped>
.el-container {
text-align: center
}
.el-main {
margin: 0 auto;
height: 400px;
}
p {
font-size: 25px;
font-weight: bold;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div>
<div>
<el-row class="row-bg">
<el-col :span="24">
<div class="grid-content content">航班信息</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.loadingQuery.carrier}}{{this.loadingQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.loadingQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.loadingQuery.originstation}}-{{this.loadingQuery.destinationstation}}</span>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content">进港舱单查询</div>
</el-col>
<el-col :span="24">
<div class="grid-content co">
<el-col :span="1">
<div class="grid-content"></div>
</el-col>
<el-col :span="22">
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input>
</div>
</el-col>
<div class="el-btn">
<el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
<el-button v-if="loadingModel.flightno === undefined && loadingData.length <1"
type="primary" size="mini" @click="handleAddLoading">新增装载
</el-button>
</div>
</div>
</el-col>
</div>
</el-col>
<el-col :span="24">
<div class="grid-content content" style="margin-top: 6px">出港装载明细</div>
</el-col>
</el-row>
<tree-table v-loading="listLoading" :data="loadingData" :eval-func="func" :expand-all="true" stripe
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column label="运单号" width="160" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
</el-table-column>
<el-table-column label="运载件数" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.lodingpiece}}</span>
</template>
</el-table-column>
<el-table-column label="运载重量" width="70" align="center">
<template slot-scope="scope">
<span>{{scope.row.lodingweight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
</el-table-column>
<el-table-column label="装载时间" width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.loadingtime}}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑主单
</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
</el-button>
<el-button size="mini" type="danger" @click="handleAwbDelete(scope.row)">发删除报</el-button>
<el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
:disabled="scope.row.status ==='00'">更改状态
</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini"
v-if="loadingModel.flightno !== undefined || loadingData.length >0"
@click="handelAddLoadingInfo">新增出港装载
</el-button>
<el-button type="primary" size="mini" v-if="loadingModel.flightno !== undefined || loadingData.length>0"
@click="handelBackStep">返回</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="loadingFormData" :model="loadingModel" :rules="loadingRoles" label-position="right"
label-width="90px">
<div class="grid-content content">
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="loadingModel.awba"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="flightno">
<el-input v-model="destinationstation" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker v-model="loadingModel.flightdate" value-format="yyyy-MM-dd" type="date"
placeholder="请输入" :disabled="dialogStatus ==='update'"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
<span>货物信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="装载件数" prop="piece">
<el-input v-model.number="loadingModel.lodingpiece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载重量" prop="weight">
<el-input v-model.number="loadingModel.lodingweight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载时间" prop="loadingtime">
<el-date-picker v-model="loadingModel.loadingtime" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="请输入"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="price">
<el-input v-model.number="loadingModel.awbprice"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="weight">
<el-input v-model.number="loadingModel.awbweight"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="loadingModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="特货代码" prop="awbh">
<el-input v-model="loadingModel.specialgoods"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
</el-table-column>
<el-table-column label="航班号" width="80">
<template slot-scope="scope">
{{scope.row.carrier}}{{scope.row.flightno}}
</template>
</el-table-column>
<el-table-column label="航班日期" width="100">
<template slot-scope="scope">
{{scope.row.flightdate}}
</template>
</el-table-column>
<el-table-column label="件数" width="70">
<template slot-scope="scope">
{{scope.row.buspiece}}
</template>
</el-table-column>
<el-table-column label="重量" width="70">
<template slot-scope="scope">
{{scope.row.busweight}}
</template>
</el-table-column>
<el-table-column label="回执信息" width="">
<template slot-scope="scope">
{{scope.row.cusrestext}}
</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt4201ListForParam, deleteByIsDelete, updateStatus, updateMT4201, addMt4201} from '@/api/exitLoading'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey} from "@/utils/validate"
export default {
name: "ExitLoading",
components: {treeTable, Pagination},
inject: ['reload'],
data() {
const validatorAwb = (rule, value, callback) => {
if (!validAwb(value)) {
callback("请正确书写主单号")
}
callback()
}
const validatorAwbh = (rule, value, callback) => {
if (!validAlphabetsAndNum(value)) {
callback("只能输入字母和数字")
}
callback()
}
const validatorAlphabets = (rule, value, callback) => {
if (!validAlphabets(value)) {
callback("只能输入字母")
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
callback("只能输入字母、数字、空格")
}
callback()
}
return {
func: treeToArray,
total: 1,
dialogMap: {
update: '编辑出港装载',
create: '添加出港装载',
},
customcodeList: [4604, 4620],
dialogStatus: undefined,
dialogTableVisible: false,
dialogFormVisible: false,
listLoading: false,
loadingQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
},
loadingRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
customcode:[{required: true, trigger: 'change',message:'不能为空'}]
},
loadingData: [],
detailData: [],
loadingModel: {
carrier:undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
lodingpiece: undefined,
lodingweight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
}
},
created() {
if (this.$route.params.flightData !== undefined) {
// 给查询条件赋值
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.loadingQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + '-' + this.$route.params.flightData.awba.substring(3)
}
this.loadingQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.loadingQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.loadingQuery.flightdate = this.$route.params.flightData.flightdate
this.loadingQuery.originstation = this.$route.params.flightData.originstation
this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation
this.getList()
}
},
computed: {
carrier: {
get: function () {
return this.loadingModel.carrier
},
set: function (val) {
this.loadingModel.carrier = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.loadingModel.goodsname
},
set: function (val) {
this.loadingModel.goodsname = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.loadingModel.flightno
},
set: function (val) {
this.loadingModel.flightno = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.loadingModel.originstation
},
set: function (val) {
this.loadingModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.loadingModel.destinationstation
},
set: function (val) {
this.loadingModel.destinationstation = val.toUpperCase().trim()
}
}
},
methods: {
getList() {
this.listLoading = true
if (this.loadingQuery.awba !== undefined && this.loadingQuery.awba !== '') {
getMt4201ListForParam(this.loadingQuery).then(res => {
this.loadingData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.loadingQuery.carrier = this.loadingData[0].carrier
this.loadingQuery.flightno = this.loadingData[0].flightno
this.loadingQuery.flightdate = this.loadingData[0].flightdate
this.loadingQuery.originstation = this.loadingData[0].originstation
this.loadingQuery.destinationstation = this.loadingData[0].destinationstation
this.loadingQuery.customcode = this.loadingData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
} else {
getMt4201ListForParam(this.loadingQuery).then(res => {
this.loadingData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
}
},
// 多选
handleSelectionChange() {
},
// 查询
handleSearch() {
this.loadingQuery.carrier = undefined
this.loadingQuery.flightno = undefined
this.loadingQuery.originstation = undefined
this.loadingQuery.flightdate = undefined
this.loadingQuery.destinationstation = undefined
this.getList()
},
// 收发明细
handleSend() {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT4201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
console.log(this.loadingModel)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.loadingFormData.clearValidate()
})
},
// 更新数据
updateData() {
this.$refs.loadingFormData.validate(valid => {
if (valid) {
updateMT4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("数据更新成功")
this.getList()
} else {
Message.error("数据更新失败,请检查数据")
}
})
}
})
},
// 发送舱单报
handleSendAwb() {
},
// 删除 发送删除报
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '删除',
cancelButtonText: '取消'
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
type: 'danger',
message: '删除异常,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消删除'
: '删除取消'
})
})
},
// 更改当前运单发送状态
handleAwbStatus(row) {
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
}).catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? '取消状态更改'
: '状态更改取消'
})
})
},
// 保存并发送
handleSaveAndSend() {
},
// 重置实体
restModel() {
this.loadingModel = {
carrier:undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
awba: undefined,
lodingpiece: undefined,
lodingweight: undefined,
goodsname: undefined,
customcode: undefined,
specialgoods: undefined,
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
},
// 新增出港装载 弹框
handelAddLoadingInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.loadingModel.carrier = this.loadingQuery.carrier
this.loadingModel.flightdate = this.loadingQuery.flightdate
this.loadingModel.flightno = this.loadingQuery.flightno
this.loadingModel.originstation = this.loadingQuery.originstation
this.loadingModel.destinationstation = this.loadingQuery.destinationstation
this.loadingModel.customcode = this.loadingQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.loadingFormData.clearValidate()
})
},
// 新增出港装载 请求
createData() {
this.$refs.loadingFormData.validate(valid => {
if (valid) {
addMt4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
Message.success("新增出港装载成功")
this.getList()
} else {
Message.error("数据新增失败,请检查数据")
}
})
}
})
},
handleAddLoading() {
const row = {
'messageType': 'MT4201'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
}
}
}
</script>
<style>
.grid-content {
height: 36px;
line-height: 36px;
}
.content {
border-left: 4px #409EFF solid;
padding-left: 10px;
background-color: #f9fafc;
margin-bottom: 2px
}
.row-bg, .co {
background-color: white;
}
.titleSpan {
font-weight: bold;
margin-right: 35px;
}
.el-row {
margin-top: 10px;
margin-bottom: 0px;
}
.btnFoot {
margin-top: 10px;
}
.el-table td, .el-table th {
text-align: center
}
.el-btn {
margin-left: 10px;
display: inline-block;
}
</style>
... ...
<template>
<!--<div class="app-container">-->
<div class="app-content">
<div class="filter-container">
<el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
<el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
</div>
<div class="filter-container">
<el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
<el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
<el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
<el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="warning"
@click="handleUpdateStatus">批量修改状态</el-button>
</div>
<div class="midSpan">
<el-row>
<el-col :span="0.5">
<span style="color: red">注:</span>
</el-col>
<el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
<span>预配舱单</span>
</el-col>
<el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
<span>出港运抵</span>
</el-col>
<el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
<span>出港装载</span>
</el-col>
<el-col :span="1" style="background: #f5ffc0" align="center">
<span>出港理货</span>
</el-col>
</el-row>
</div>
<tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
style="font-size: 13px" border @selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
<el-table-column label="航班号" width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="航段" width="100px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="主单号" width="120px" align="center" >
<template slot-scope="scope" >
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<el-table-column label="关区" width="60px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customcode }}</span>
</template>
</el-table-column>
<el-table-column label="时间" width="150px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="90px" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status ==='01'">未发送</span>
<span v-if="scope.row.status ==='02'">已发舱单报</span>
<span v-if="scope.row.status ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
<span v-if="scope.row.status ==='08'">已发舱单删除报</span>
<span v-if="scope.row.status ==='09'">舱单删除报退单</span>
<span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
<span v-if="scope.row.status ==='11'">舱单删除成功</span>
<span v-if="scope.row.status ==='12'">已发舱单修改报</span>
<span v-if="scope.row.status ==='13'">舱单修改报退单</span>
<span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
<span v-if="scope.row.status ==='15'">舱单修改报成功</span>
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column label="回执内容" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
<a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
<a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
@pagination="getList"/>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getManifests} from "@/api/exitManifest"
import {getMt520XListForParam} from "@/api/exitTidy";
import {getMt3201ListForParam} from "@/api/exitArrive";
import {getMt4201ListForParam} from "@/api/exitLoading";
export default {
name: "ExitManifest",
components: {treeTable, Pagination},
inject:['reload'],
data() {
return {
func: treeToArray,
total: 1,
listLoading: false,
listQuery: {
pageSize: 1,
limitSize: 100,
awba:undefined,
carrier: undefined,
flightno:undefined,
flightDate: new Date(),
messageType: undefined,
messageStatus: undefined,
customStatus: undefined,
},
manifestData: [],
messageTypeList: [
{label:'预配舱单',value:'MT2201'},
{label:'出港运抵',value:'MT3201'},
{label:'出港装载',value:'MT4201'},
{label:'出港理货',value:'MT5202'}
],
messageStatusList: [
{label:'未发送',value:'01'},
{label:'已发舱单报',value:'02'},
{label:'舱单报退单',value:'05'},
{label:'舱单转人工',value:'06'},
{label:'舱单报申报成功',value:'07'},
{label:'已发舱单删除报',value:'08'},
{label:'舱单删除报退单',value:'09'},
{label:'舱单删除报转人工',value:'10'},
{label:'舱单删除成功',value:'11'},
{label:'已发舱单修改报',value:'12'},
{label:'舱单修改报退单',value:'13'},
{label:'舱单修改报转人工',value:'14'},
{label:'舱单修改报成功',value:'15'},
{label:'海关已存在',value:'16'},
],
customStatusList: [
{label:'普通货物',value:'001'},
{label:'国际转运货物',value:'002'},
{label:'国内转关',value:'003'},
{label:'空箱',value:'004'},
{label:'快件',value:'006'},
]
}
},
methods: {
getList() {
this.listLoading = true
getManifests(this.listQuery).then(res =>{
this.manifestData = res.data.dataList
this.total = res.data.count
setTimeout(() =>{
this.listLoading = false
},1500)
})
},
handleSelectionChange() {
},
handleSearch(){
this.getList()
},
handleUpdateStatus(row){
},
handleUpdate(row){
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT3201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
tableRowClassName({row,index}){
if(row.messageType === 'MT2201'){
return 'MT2201-row'
}
if(row.messageType === 'MT3201'){
return 'MT3201-row'
}
if(row.messageType === 'MT4201'){
return 'MT4201-row'
}
if(row.messageType === 'MT5202'){
return 'MT5202-row'
}
}
}
}
</script>
<style>
.el-table .MT2201-row {
background: oldlace;
}
.el-table .MT3201-row {
background: #f0f9eb;
}
.el-table .MT4201-row {
background: #bce7fd;
}
.el-table .MT5202-row {
background: #f5ffc0;
}
.app-content{
margin-top: 20px;
}
.midSpan{
margin-bottom: 10px;
}
</style>
... ...