作者 zhangFan

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

要显示太多修改。

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

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)
}
/**
* 航班校验
*/
... ...
... ... @@ -11,7 +11,8 @@
</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>
<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>
... ... @@ -23,33 +24,48 @@
<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">
<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-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>
<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>
<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>
<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>
</ul>
</aside>
<section class="content-container">
</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>
... ... @@ -61,25 +77,32 @@
</el-col>
<el-col :span="24" class="content-wrapper">
<transition name="fade" mode="out-in">
<router-view></router-view>
<router-view :key="$route.path +$route.query.t"></router-view>
</transition>
</el-col>
</div>
</section>
</el-col>
</el-row>
</section>
</el-col>
</el-row>
</template>
<script>
import rt from '../routes'
export default {
provide() {
return {
reload: this.reload
}
},
data() {
return {
sysName:'流浪地球管理系统',
collapsed:false,
sysName: '流浪地球管理系统',
collapsed: false,
sysUserName: '',
sysUserAvatar: '',
isRouterAlive: true,
form: {
name: '',
region: '',
... ... @@ -93,6 +116,16 @@
}
},
methods: {
reload() {
this.$nextTick(function () {
this.$router.push({
path: this.$router.path,
query:{
t: new Date().getTime()
}
})
})
},
onSubmit() {
console.log('submit!');
},
... ... @@ -103,7 +136,7 @@
console.log('handleclose');
},
handleselect: function (a, b) {
console.log('handleselect!');
this.reload()
},
//退出登录
logout: function () {
... ... @@ -116,7 +149,7 @@
//退出后初始化原来的路由
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
console.log(sysRoutes);
// console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
_this.$router.push('/login');
... ... @@ -127,11 +160,11 @@
},
//折叠导航栏
collapse:function(){
this.collapsed=!this.collapsed;
collapse: function () {
this.collapsed = !this.collapsed;
},
showMenu(i,status){
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none';
showMenu(i, status) {
this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none';
}
},
mounted() {
... ... @@ -147,8 +180,8 @@
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);
}
}
}
... ... @@ -163,18 +196,22 @@
top: 0px;
bottom: 0px;
width: 100%;
.header {
height: 60px;
line-height: 60px;
background: $color-primary;
color:#fff;
color: #fff;
.userinfo {
text-align: right;
padding-right: 35px;
float: right;
.userinfo-inner {
cursor: pointer;
color:#fff;
color: #fff;
img {
width: 40px;
height: 40px;
... ... @@ -184,38 +221,45 @@
}
}
}
.logo {
//width:230px;
height:60px;
height: 60px;
font-size: 22px;
padding-left:20px;
padding-right:20px;
border-color: rgba(238,241,146,0.3);
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;
color: #fff;
}
}
.logo-width{
width:230px;
.logo-width {
width: 230px;
}
.logo-collapse-width{
width:60px
.logo-collapse-width {
width: 60px
}
.tools{
.tools {
padding: 0px 23px;
width:14px;
width: 14px;
height: 60px;
line-height: 60px;
cursor: pointer;
}
}
.main {
display: flex;
// background: #324057;
... ... @@ -223,45 +267,53 @@
top: 60px;
bottom: 0px;
overflow: hidden;
aside {
flex:0 0 230px;
flex: 0 0 230px;
width: 230px;
// position: absolute;
// top: 0px;
// bottom: 0px;
.el-menu{
.el-menu {
height: 100%;
}
.collapsed{
width:60px;
.item{
.collapsed {
width: 60px;
.item {
position: relative;
}
.submenu{
position:absolute;
top:0px;
left:60px;
z-index:99999;
height:auto;
display:none;
.submenu {
position: absolute;
top: 0px;
left: 60px;
z-index: 99999;
height: auto;
display: none;
}
}
}
.menu-collapsed{
flex:0 0 60px;
.menu-collapsed {
flex: 0 0 60px;
width: 60px;
}
.menu-expanded{
flex:0 0 230px;
.menu-expanded {
flex: 0 0 230px;
width: 230px;
}
.menu-expanded ul{
.menu-expanded ul {
width: 230px;
}
.content-container {
// background: #f1f2f7;
flex:1;
flex: 1;
// position: absolute;
// right: 0px;
// top: 0px;
... ... @@ -269,6 +321,7 @@
// left: 230px;
overflow-y: scroll;
padding: 20px;
.breadcrumb-container {
//margin-bottom: 15px;
.title {
... ... @@ -276,10 +329,12 @@
float: left;
color: #475669;
}
.breadcrumb-inner {
float: right;
}
}
.content-wrapper {
background-color: #fff;
box-sizing: border-box;
... ...
... ... @@ -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,7 +442,103 @@ export default {
maniWeight: undefined
},
manifestCustoms: ['4604', '4620', '4613'],
data: [
pickerOptions: {
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
args: [null, null, 'timeLine'],
rules: {
maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
}
}
},
created(){
console.log(this.$route.params.scopeRow)
this.getList()
},
methods: {
message(row) {
this.$message.info(row.event)
},
sortChange(data) {
const { prop, order } = data
if (prop === 'id') {
this.sortByID(order)
}
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleFilter()
},
handleFilter(){
},
handleSwitch(row){
},
handleDownload(){
this.downloadLoading = true
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs[''].clearValidate()
})
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
type: 'success'
})
row.status = status
},
getList() {
this.tableData = [
{
id: 0,
waybillNo: '580-20728399',
... ... @@ -531,100 +629,278 @@ export default {
maniWeight: 21321,
status: '10003',
customText: ' 已发送预配舱单 '
}
],
pickerOptions: {
shortcuts: [
},
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
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
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
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
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
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
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
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
},
args: [null, null, 'timeLine'],
rules: {
maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
}
}
{
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
},
methods: {
message(row) {
this.$message.info(row.event)
{
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
},
sortChange(data) {
const { prop, order } = data
if (prop === 'id') {
this.sortByID(order)
}
{
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
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleFilter()
{
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
},
handleFilter(){
{
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
},
handleSwitch(row){
{
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
},
handleDownload(){
this.downloadLoading = true
{
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
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs[''].clearValidate()
})
{
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
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
type: 'success'
})
row.status = status
{
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
},
getList() {
{
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>
... ...
<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.listQuery.carrier}}{{this.listQuery.flightNo}}</span>
<span class="titleSpan">航班日期:{{this.listQuery.flightDate}}</span>
<span class="titleSpan">航段:{{this.listQuery.originStation}}-{{this.listQuery.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="listQuery.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="preModel.flightno === undefined && preData.length<1" type="primary"
size="mini"
@click="handleAddpre">新增预配舱单
</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>
<tree-table :data="preData" stripe style="font-size: 12px" :eval-func="func" :expand-all="true" border
@selection-change="handleSelectionChange" v-loading="listLoading">
<el-table-column label="航班信息" width="90" align="center">
<template slot-scope="scope">
<p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>
<p class="tableInline">{{scope.row.flightdate}}</p>
<p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>
</template>
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<template slot-scope="scope">
<p class="tableInline">{{scope.row.awba}}</p>
<p class="tableInline" v-if="scope.row.awbh !==null">{{scope.row.awbh}}</p>
</template>
</el-table-column>
<el-table-column label="运单件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.piece}}
</template>
</el-table-column>
<el-table-column label="预配件数/重量" width="100" align="center">
<template slot-scope="scope">
{{scope.row.weight}}
</template>
</el-table-column>
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
{{scope.row.goodsname}}
</template>
</el-table-column>
<el-table-column label="配载时间" width="140" align="center">
<template slot-scope="scope">
{{scope.row.actime}}
</template>
</el-table-column>
<el-table-column label="代理人代码" width="120" align="center">
<template slot-scope="scope">
{{scope.row.status}}
</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="回执信息" align="center">
<template slot-scope="scope">
{{scope.row.ext5}}
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="success" v-if="scope.row.awbh ===null"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !== '01'">发舱单报
</el-button>
<p></p>
<el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</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 === '01'">更改状态
</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini"
@click="handleAddpreInfo">新增预配舱单
</el-button>
<el-button type="primary" size="mini" @click="handelBackStep"
v-if="preModel.flightno !== undefined || preData.length >0">返回
</el-button>
</el-row>
</div>
<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" width="60%">
<el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
label-width="120px" class="el-dialog-div">
<div class="grid-content content">
运单信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5" v-if="dialogStatus === 'addAwbh'">
<el-form-item label="分单号">
<el-input v-model="awbh" clearable/>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
航班信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="航班日期" prop="flightdate">
<el-date-picker :disabled="dialogStatus === 'addAwbh'"
value-format="yyyy-MM-dd"
v-model="preModel.flightdate" align="right"
type="date" placeholder="请输入航班日期" clearable/>
</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 === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
</el-form-item>
</el-col>
</el-row>
<div class="grid-content content">
货物信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="运单件数" prop="piece">
<el-input v-model.number="preModel.awbinfo.pcs" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="运单重量" prop="weight">
<el-input v-model.number="preModel.awbinfo.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
<el-form-item label="预配件数" prop="piece">
<el-input v-model.number="preModel.piece" clearable/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="dialogStatus ==='addAwbh'">
<el-col :span="13">
<el-form-item label="预配件数" prop="piece">
<el-input v-model.number="preModel.piece" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<span>剩余件数:{{awbPiece}}</span>
</el-col>
</el-col>
<el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
<el-form-item label="预配重量" prop="weight">
<el-input v-model.number="preModel.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="dialogStatus ==='addAwbh'">
<el-col :span="13">
<el-form-item label="预配重量" prop="weight">
<el-input v-model.number="preModel.weight" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<span>剩余重量:{{awbWeight}}</span>
</el-col>
</el-col>
<el-col :span="7.5">
<el-form-item label="预配时间" prop="pretime">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss"
v-model="preModel.actime" align="right"
type="date" placeholder="请选择"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="关区代码" prop="customcode">
<el-select v-model="preModel.customcode" class="filter-item" placeholder="请选择关区代码"
:disabled="dialogStatus === 'addAwbh'">
<el-option v-for="item in customcodeList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关状态" prop="ex5">
<el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型">
<el-option v-for="item in customTypes" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="付费方式" prop="awbinfo.collected">
<el-select v-model="preModel.awbinfo.collected" class="filter-item" placeholder="付费方式">
<el-option
v-for="item in payTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="卸货地" prop="">
<el-input v-model="specopeid" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="代理人代码" prop="">
<el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="代理人名称" prop="">
<el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
<div class="grid-content content">
发货人信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="发货人名称" prop="awbinfo.shprname">
<el-input v-model="shprname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="地址" prop="awbinfo.shpraddress">
<el-input v-model="shpraddress" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="城市代码">
<el-input v-model="preModel.awbinfo.shpcitycode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="电话" prop="awbinfo.shprtel">
<el-input v-model="preModel.awbinfo.shprtel" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="传真">
<el-input v-model="preModel.awbinfo.shprmobiletype" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="发货人AEO编码" prop="awbinfo.shpaeocode">
<el-input v-model="shpaeocode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select
:remote-method="remoteMethod"
:loading="listLoading"
v-model="shprcountyr"
filterable
remote
placeholder="请选择" clearable>
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--<el-col :span="7.5">-->
<!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
<!--<el-select-->
<!--v-model="shpcomidpre"-->
<!--filterable-->
<!--placeholder="请选择企业代码类型" style="width: 200px;">-->
<!--<el-option-->
<!--v-for="item in shpCompnyTypeOption"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="7.5">-->
<!--<el-form-item prop="awbinfo.shpcomidpno" label-width="10px">-->
<!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<div class="grid-content content">
收货人信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="收货人名称" prop="awbinfo.cnsnname">
<el-input v-model="cnsnname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="地址" prop="awbinfo.cnsnaddress">
<el-input v-model="cnsnaddress" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="城市代码">
<el-input v-model="preModel.awbinfo.cnscitycode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="电话" prop="awbinfo.cnsntel">
<el-input v-model="preModel.awbinfo.cnsntel" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="传真">
<el-input v-model="preModel.awbinfo.cnsrmobiletype" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="收货人AEO编码" prop="awbinfo.cnsaeocode">
<el-input v-model="cnsaeocode" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="国家代码" prop="awbinfo.cnscountyr">
<el-select
:remote-method="remoteMethod"
:listLoading="listLoading"
v-model="cnscountyr"
filterable
remote
placeholder="请选择" clearable>
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.value"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
<el-input v-model="cnsrctcname" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
<el-input v-model="preModel.awbinfo.cnsrctctel" clearable/>
</el-form-item>
</el-col>
<!--<el-col :span="7.5">-->
<!--<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">-->
<!--<el-select-->
<!--v-model="cnscomidpre"-->
<!--filterable-->
<!--placeholder="请选择企业代码类型" style="width: 200px;">-->
<!--<el-option-->
<!--v-for="item in shpCompnyTypeOption"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="7.5">-->
<!--<el-form-item prop="awbinfo.cnscomidno" label-width="10px">-->
<!--<el-input v-model="cnscomidno" placeholder="企业代码"/>-->
<!--</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>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey} from "@/utils/validate"
export default {
name: "ExitPre",
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,
listQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightNo: undefined,
flightDate: undefined,
originStation: undefined,
destinationStation: undefined
},
dialogMap: {
update: '编辑预配舱单',
create: '添加预配舱单',
addAwbh: '添加分单'
},
customTypes: [
{label: '普通货物', value: '001'},
{label: '国际转运货物', value: '002'},
{label: '国内转关', value: '003'},
{label: '空箱', value: '004'},
{label: '快件', value: '005'}],
payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}],
dialogStatus: undefined,
dialogTableVisible: false,
listLoading: false,
disabledStatus: false,
dialogFormVisible: false,
countryOption: [],
countryList: [],
countryResultList: [],
awbPiece: undefined,
awbWeight: undefined,
preRoles: {
weight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'change'}],
piece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'change'}],
destinationstation: [{required: true, message: '运单目的地必须输入', trigger: 'change'}],
originstation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}],
flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
pretime: [{required: true, trigger: 'blur', message: '预配时间不能为空'}],
customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
ex5: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
},
preModel: {
awba: undefined,
awbh: undefined,
customcode: undefined,
flightno: undefined,
carrier: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
actime: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
ex5: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpaeocode: undefined,
shpcomidpno: undefined,
shpcitycode: undefined,
shpcustomerid: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnsrctcname: undefined,
cnsaeocode: undefined,
cnsrctctel: undefined,
cnscitycode: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0',
awbtype: undefined
}
},
preData: [],
detailData: []
}
},
mounted() {
// 延迟加载,否则会出错
setTimeout(() => {
this.countryResultList = this.countryList.map(item => {
return {value: item.countryCode, label: item.countryNameCn}
})
}, 1000)
},
created() {
if (this.$route.params.flightData !== undefined) {
this.listQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.listQuery.flightNo = this.$route.params.flightData.flightno.substring(2)
this.listQuery.flightDate = this.$route.params.flightData.flightdate
this.listQuery.originStation = this.$route.params.flightData.originstation
this.listQuery.destinationStation = this.$route.params.flightData.destinationstation
this.listQuery.awba = this.$route.params.flightData.awba
this.getList()
}
this.getCountryList()
},
computed: {
awba: {
get: function () {
return this.preModel.awba
},
set: function (val) {
if (val.length == 3) {
val = val + "-"
}
this.preModel.awba = val.trim()
}
},
awbh: {
get: function () {
return this.preModel.awbh
},
set: function (val) {
this.preModel.awbh = val.toUpperCase().trim()
}
},
flightno: {
get: function () {
return this.preModel.flightno
},
set: function (val) {
this.preModel.flightno = val.toUpperCase().trim()
}
},
carrier: {
get: function () {
return this.preModel.carrier
},
set: function (val) {
this.preModel.carrier = val.toUpperCase().trim()
}
},
originstation: {
get: function () {
return this.preModel.originstation
},
set: function (val) {
this.preModel.originstation = val.toUpperCase().trim()
}
},
destinationstation: {
get: function () {
return this.preModel.destinationstation
},
set: function (val) {
this.preModel.destinationstation = val.toUpperCase().trim()
}
},
goodsname: {
get: function () {
return this.preModel.goodsname
},
set: function (val) {
this.preModel.goodsname = val.toUpperCase().trim()
}
},
specopeid: {
get: function () {
return this.preModel.awbinfo.specopeid
},
set: function (val) {
this.preModel.awbinfo.specopeid = val.toUpperCase().trim()
}
},
shprname: {
get: function () {
return this.preModel.awbinfo.shprname
},
set: function (val) {
this.preModel.awbinfo.shprname = val.toUpperCase().trim()
}
},
shpraddress: {
get: function () {
return this.preModel.awbinfo.shpraddress
},
set: function (val) {
this.preModel.awbinfo.shpraddress = val.toUpperCase().trim()
}
},
shprcountyr: {
get: function () {
return this.preModel.awbinfo.shprcountyr
},
set: function (val) {
this.preModel.awbinfo.shprcountyr = val.toUpperCase().trim()
}
},
shpaeocode: {
get: function () {
return this.preModel.awbinfo.shpaeocode
},
set: function (val) {
this.preModel.awbinfo.shpaeocode = val.toUpperCase().trim()
}
},
cnsnname: {
get: function () {
return this.preModel.awbinfo.cnsnname
},
set: function (val) {
this.preModel.awbinfo.cnsnname = val.toUpperCase().trim()
}
},
cnsnaddress: {
get: function () {
return this.preModel.awbinfo.cnsnaddress
},
set: function (val) {
this.preModel.awbinfo.cnsnaddress = val.toUpperCase().trim()
}
},
cnscountyr: {
get: function () {
return this.preModel.awbinfo.cnscountyr
},
set: function (val) {
this.preModel.awbinfo.cnscountyr = val.toUpperCase().trim()
}
},
cnsrctcname: {
get: function () {
return this.preModel.awbinfo.cnsrctcname
},
set: function (val) {
this.preModel.awbinfo.cnsrctcname = val.toUpperCase().trim()
}
},
cnsaeocode: {
get: function () {
return this.preModel.awbinfo.cnsaeocode
},
set: function (val) {
this.preModel.awbinfo.cnsaeocode = val.toUpperCase().trim()
}
},
sairportid: {
get: function () {
return this.preModel.awbinfo.sairportid
},
set: function (val) {
this.preModel.awbinfo.sairportid = val.toUpperCase().trim()
}
},
by1: {
get: function () {
return this.preModel.awbinfo.by1
},
set: function (val) {
this.preModel.awbinfo.by1 = val.toUpperCase().trim()
}
},
dest1: {
get: function () {
return this.preModel.awbinfo.dest1
},
set: function (val) {
this.preModel.awbinfo.dest1 = val.toUpperCase().trim()
}
},
by2: {
get: function () {
return this.preModel.awbinfo.by2
},
set: function (val) {
this.preModel.awbinfo.by2 = val.toUpperCase().trim()
}
},
dest2: {
get: function () {
return this.preModel.awbinfo.dest2
},
set: function (val) {
this.preModel.awbinfo.dest2 = val.toUpperCase().trim()
}
},
by3: {
get: function () {
return this.preModel.awbinfo.by3
},
set: function (val) {
this.preModel.awbinfo.by3 = val.toUpperCase().trim()
}
},
dest3: {
get: function () {
return this.preModel.awbinfo.dest3
},
set: function (val) {
this.preModel.awbinfo.dest3 = val.toUpperCase().trim()
}
},
eairportid: {
get: function () {
return this.preModel.awbinfo.eairportid
},
set: function (val) {
this.preModel.awbinfo.eairportid = val.toUpperCase().trim()
}
}
},
methods: {
// >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
getMt2201ListForParam(this.listQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.listQuery.carrier = this.preData[0].carrier
this.listQuery.flightNo = this.preData[0].flightno
this.listQuery.flightDate = this.preData[0].flightdate
this.listQuery.originStation = this.preData[0].originstation
this.listQuery.destinationStation = this.preData[0].destinationstation
this.listQuery.customcode = this.preData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
getMt2201ListForParam(this.listQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
}, 1500)
})
}
},
// >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
restModel() {
this.preModel = {
awba: undefined,
awbh: undefined,
customcode: undefined,
flightno: undefined,
carrier: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
ex5: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre: undefined,
shpaeocode: undefined,
shpcomidpno: undefined,
shpcitycode: undefined,
shpcustomerid: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsaeocode: undefined,
cnsrctctel: undefined,
cnscitycode: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0',
}
}
},
// >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
handleAddpreInfo() {
this.restModel()
this.preModel.carrier = this.listQuery.carrier
this.preModel.flightno = this.listQuery.flightno
this.preModel.flightdate = this.listQuery.flightdate
this.preModel.originstation = this.listQuery.originstation
this.preModel.destinationstation = this.listQuery.carrier
this.preModel.customcode = this.listQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
createData() {
this.$refs.preFormData.validate(valid => {
if (valid) {
updateMT2201(this.preModel).then(res => {
if (res.data.count > 0) {
Message.success("新增成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("新增失败,请检查数据")
}
})
}
})
},
// >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<
handleSelectionChange() {
},
// >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
handleSerach() {
this.listQuery.carrier = undefined
this.listQuery.flightno = undefined
this.listQuery.originstation = undefined
this.listQuery.flightdate = undefined
this.listQuery.destinationstation = undefined
this.getList()
},
// >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT2201'
}
this.dialogTableVisible = true
getResponseForParam(resQuery).then(res => {
this.detailData = res.data
})
},
// >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
handleAwbSend() {
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
this.preModel = Object.assign({}, row)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
updateData() {
this.$refs.preFormData.validate(valid => {
if (valid) {
delete this.preModel.parent
delete this.preModel.children
updateMT2201(this.preModel).then(res => {
if (res.data.count > 0) {
Message.success("修改成功")
this.dialogFormVisible = false
this.getList()
} else {
Message.error("修改失败,请检查数据")
}
})
}
})
},
// >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
handleAwbEdit() {
},
// >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
handleSaveAndSend() {
},
// >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
handleAwbDelete(row) {
delete row.parent
delete row.children
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) {
delete row.parent
delete row.children
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'
? '取消状态更改'
: '状态更改取消'
})
})
},
// >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
handleAddAwbh(row) {
this.restModel()
const template = Object.assign({}, row) // copy obj
this.preModel.awba = template.awba
this.preModel.flightdate = template.flightdate
this.preModel.flightno = template.flightno
this.preModel.destinationstation = template.destinationstation
this.preModel.customcode = template.customcode
this.preModel.carrier = template.carrier
this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr
this.preModel.originstation = template.originstation
this.preModel.awbinfo.collected = template.awbinfo.collected
this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
this.preModel.awbinfo.ex5 = template.awbinfo.ex5
this.listQuery.awba = template.awba
this.listQuery.flightDate = template.flightdate
this.listQuery.flightNo = template.flightno
this.listQuery.originStation = template.originstation
this.listQuery.destinationStation = template.destinationstation
this.listQuery.customcode = template.customcode
this.listQuery.carrier = template.carrier
getMt2201ListForParam(this.listQuery).then(res => {
this.awbPiece = 0
this.awbWeight = 0
let residuePiece = 0
let residueWeight = 0
const childrenList = res.data.dataList[0].children
if (childrenList.length < 1) {
this.awbPiece = res.data.dataList[0].piece
this.awbWeight = res.data.dataList[0].weight
} else {
for (var i = 0; i < childrenList.length; i++) {
residuePiece += childrenList[i].piece
residueWeight += childrenList[i].weight
}
this.awbPiece =res.data.dataList[0].piece- residuePiece
this.awbWeight = res.data.dataList[0].weight- residueWeight
}
})
this.dialogStatus = 'addAwbh'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
//获取城市列表
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
})
},
remoteMethod(query) {
if (query !== '') {
this.listLoading = true
setTimeout(() => {
this.listLoading = false
this.countryOption = this.countryResultList.filter(item => {
return item.value.toUpperCase().trim()
.indexOf(query.toUpperCase()) > -1
})
}, 200)
// if (query.length > 1) {
// this.selectCountry.countryCode = query
// getByCountryCode(this.selectCountry).then(res => {
// this.shpCompnyList = res.data.dataList
// this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
// console.log(item)
// return {value: item.enterpriseCode, label: item.enterpriseCode}
// })
// })
// }
} else {
this.countryOption = []
}
},
handleAddpre() {
const row = {
'messageType': 'MT2201'
}
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
}
}
}
</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-btn {
margin-left: 10px;
display: inline-block;
}
.el-dialog-div {
height: 60vh;
overflow: auto;
}
.tableInline {
line-height: 8px;
}
</style>
... ...