作者 zhangFan

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

要显示太多修改。

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

  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt3201'
  4 +
  5 +export const getMt3201ListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt3201ListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
  13 +
  14 +export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/flight'
  4 +
  5 +export const getFlightListForParam = params => {
  6 + return http.get(`${baseUrl}/getFlight`, params);
  7 +};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt4201'
  4 +
  5 +export const getMt4201ListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt4201ListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
  13 +
  14 +export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/manifest'
  4 +
  5 +export const getManifests = params => {
  6 + return http.get(`${baseUrl}/getManifests`, params);
  7 +};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt2201'
  4 +
  5 +export const getMt2201ListForParam = params => { return http.get(`${baseUrl}/getMt2201ListForParam`, params)};
  6 +
  7 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  8 +
  9 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params) };
  10 +
  11 +export const updateMT2201 = params => { return http.put(`${baseUrl}/updateMT2201`,params)};
  12 +
  13 +export const addMt2201 = params => { return http.post(`${baseUrl}/addMt2201`,params)};
  14 +
  15 +export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLostLoadChange`, params)};
  16 +
  17 +export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
  18 +
  19 +export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt520x'
  4 +
  5 +export const getMt520XListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt520xListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
  13 +
  14 +export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
@@ -17,22 +17,12 @@ export default { @@ -17,22 +17,12 @@ export default {
17 return axios({ 17 return axios({
18 method: 'GET', 18 method: 'GET',
19 url: url, 19 url: url,
20 - data: params, 20 + params: params,
21 headers: { 21 headers: {
22 'Content-Type': 'application/json;charset=UTF-8', 22 'Content-Type': 'application/json;charset=UTF-8',
23 } 23 }
24 }); 24 });
25 }, 25 },
26 - getUrlEnclode(url, params) {  
27 - return axios({  
28 - method: 'GET',  
29 - url: url,  
30 - data: qs.stringify(params),  
31 - headers: {  
32 - 'Content-Type': 'application/x-www-form-urlencoded',  
33 - }  
34 - });  
35 - },  
36 put(url, params){ 26 put(url, params){
37 return axios({ 27 return axios({
38 method: 'PUT', 28 method: 'PUT',
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/rep'
  4 +
  5 +export const getResponseForParam = params => {
  6 + return http.get(`${baseUrl}/getResponseForParam`, params);
  7 +};
@@ -8,6 +8,15 @@ import Perm from './views/nav1/perm.vue' @@ -8,6 +8,15 @@ import Perm from './views/nav1/perm.vue'
8 import LOG from './views/nav1/Log.vue' 8 import LOG from './views/nav1/Log.vue'
9 import PreManifest from './views/agent/PreManifest.vue' 9 import PreManifest from './views/agent/PreManifest.vue'
10 import OrgManifest from './views/nmms/orgManifest.vue' 10 import OrgManifest from './views/nmms/orgManifest.vue'
  11 +import ExitFlight from './views/nmms/ExitFlight.vue'
  12 +import ExitPre from './views/nmms/ExitPre.vue'
  13 +import ExitTidy from './views/nmms/ExitTidy.vue'
  14 +import ExitArrive from './views/nmms/ExitArrive.vue'
  15 +import ExitManifest from './views/nmms/ExitManifest.vue'
  16 +import ExitLoading from './views/nmms/ExitLoading.vue'
  17 +import ExitFlightDesc from './views/nmms/ExitFlightDesc.vue'
  18 +import LostLoadChange from './views/lostLoadChange/lostLoadChange.vue'
  19 +import LostLoad from './views/lostLoadChange/lostLoading.vue'
11 // import Form from './views/nav1/Form.vue' 20 // import Form from './views/nav1/Form.vue'
12 21
13 import User from './views/nav1/user.vue' 22 import User from './views/nav1/user.vue'
@@ -36,7 +45,7 @@ let routes = [ @@ -36,7 +45,7 @@ let routes = [
36 leaf: true, 45 leaf: true,
37 iconCls: 'el-icon-menu', 46 iconCls: 'el-icon-menu',
38 children: [ 47 children: [
39 - { path: '/main', component: Main, name: '首页'}, 48 + {path: '/main', component: Main, name: '首页'},
40 ] 49 ]
41 }, 50 },
42 // { path: '/test', component: Main }, 51 // { path: '/test', component: Main },
@@ -46,10 +55,10 @@ let routes = [ @@ -46,10 +55,10 @@ let routes = [
46 name: '系统设置', 55 name: '系统设置',
47 iconCls: 'el-icon-setting',//图标样式class 56 iconCls: 'el-icon-setting',//图标样式class
48 children: [ 57 children: [
49 - { path: '/user', component: User, name: '用户管理' },  
50 - { path: '/role', component: Role, name: '角色管理' },  
51 - { path: '/perm', component: Perm, name: '权限管理' },  
52 - { path: '/log', component: LOG, name: '系统日志' }, 58 + {path: '/user', component: User, name: '用户管理'},
  59 + {path: '/role', component: Role, name: '角色管理'},
  60 + {path: '/perm', component: Perm, name: '权限管理'},
  61 + {path: '/log', component: LOG, name: '系统日志'},
53 ] 62 ]
54 }, 63 },
55 { 64 {
@@ -58,8 +67,32 @@ let routes = [ @@ -58,8 +67,32 @@ let routes = [
58 name: '代理人', 67 name: '代理人',
59 iconCls: 'fa fa-id-card-o', 68 iconCls: 'fa fa-id-card-o',
60 children: [ 69 children: [
61 - { path: '/pre', component: PreManifest, name: '预配' },  
62 - { path: '/org', component: OrgManifest, name: '进港' } 70 + {path: '/pre1', component: PreManifest, name: '预配'},
  71 + ]
  72 + },
  73 + {
  74 + path: '/output',
  75 + component: Home,
  76 + name: '出港业务申报',
  77 + iconCls: 'el-icon-collection',
  78 + children: [
  79 + {path: '/flight', component: ExitFlight, name: '出港航班申报'},
  80 + {path: '/pre', component: ExitPre, name: '出港预配舱单'},
  81 + {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
  82 + {path: '/arrive', component: ExitArrive, name: '出港运抵'},
  83 + {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
  84 + {path: '/loading', component: ExitLoading, name: '出港装载'},
  85 + {path: '/tidy', component: ExitTidy, name: '出港理货'}
  86 + ]
  87 + },
  88 + {
  89 + path: '/lost',
  90 + component: Home,
  91 + name: '落装改配申报',
  92 + iconCls:'el-icon-goods',
  93 + children:[
  94 + {path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
  95 + // {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
63 ] 96 ]
64 }, 97 },
65 { 98 {
@@ -68,8 +101,8 @@ let routes = [ @@ -68,8 +101,8 @@ let routes = [
68 name: '导航二', 101 name: '导航二',
69 iconCls: 'fa fa-id-card-o', 102 iconCls: 'fa fa-id-card-o',
70 children: [ 103 children: [
71 - { path: '/page4', component: Page4, name: '页面4' },  
72 - { path: '/page5', component: Page5, name: '页面5' } 104 + {path: '/page4', component: Page4, name: '页面4'},
  105 + {path: '/page5', component: Page5, name: '页面5'}
73 ] 106 ]
74 }, 107 },
75 { 108 {
@@ -79,7 +112,7 @@ let routes = [ @@ -79,7 +112,7 @@ let routes = [
79 iconCls: 'fa fa-address-card', 112 iconCls: 'fa fa-address-card',
80 leaf: true,//只有一个节点 113 leaf: true,//只有一个节点
81 children: [ 114 children: [
82 - { path: '/page6', component: Page6, name: '导航三' } 115 + {path: '/page6', component: Page6, name: '导航三'}
83 ] 116 ]
84 }, 117 },
85 { 118 {
@@ -88,13 +121,13 @@ let routes = [ @@ -88,13 +121,13 @@ let routes = [
88 name: 'Charts', 121 name: 'Charts',
89 iconCls: 'fa fa-bar-chart', 122 iconCls: 'fa fa-bar-chart',
90 children: [ 123 children: [
91 - { path: '/echarts', component: echarts, name: 'echarts' } 124 + {path: '/echarts', component: echarts, name: 'echarts'}
92 ] 125 ]
93 }, 126 },
94 { 127 {
95 path: '*', 128 path: '*',
96 hidden: true, 129 hidden: true,
97 - redirect: { path: '/404' } 130 + redirect: {path: '/404'}
98 } 131 }
99 ]; 132 ];
100 let initRouters = routes.concat(); 133 let initRouters = routes.concat();
@@ -105,7 +138,7 @@ let setUserMenus = function (list) { @@ -105,7 +138,7 @@ let setUserMenus = function (list) {
105 * 处理登陆后的账号对应的菜单 138 * 处理登陆后的账号对应的菜单
106 * @param menuList 139 * @param menuList
107 */ 140 */
108 -let handleMenuList = function (router,menu) { 141 +let handleMenuList = function (router, menu) {
109 var _self = this; 142 var _self = this;
110 var routerName = ""; 143 var routerName = "";
111 router.forEach(function (v_router) { 144 router.forEach(function (v_router) {
@@ -118,16 +151,16 @@ let handleMenuList = function (router,menu) { @@ -118,16 +151,16 @@ let handleMenuList = function (router,menu) {
118 151
119 //匹配到继续判断是否子元素,有子元素继续递归 152 //匹配到继续判断是否子元素,有子元素继续递归
120 if (result) { 153 if (result) {
121 - if(v_router.children) {  
122 - _self.handleMenuList(v_router.children,result.children); 154 + if (v_router.children) {
  155 + _self.handleMenuList(v_router.children, result.children);
123 } 156 }
124 //没有则可以移除 157 //没有则可以移除
125 - }else {  
126 - router.splice(router.findIndex(itm => itm.name === routerName ),1); 158 + } else {
  159 + router.splice(router.findIndex(itm => itm.name === routerName), 1);
127 } 160 }
128 }) 161 })
129 }); 162 });
130 } 163 }
131 export default { 164 export default {
132 - routes,setUserMenus,handleMenuList,initRouters 165 + routes, setUserMenus, handleMenuList, initRouters
133 }; 166 };
@@ -35,6 +35,18 @@ export function validAlphabets(str) { @@ -35,6 +35,18 @@ export function validAlphabets(str) {
35 return reg.test(str) 35 return reg.test(str)
36 } 36 }
37 37
  38 +/* 大小写字母数字*/
  39 +export function validAlphabetsAndNum(str) {
  40 + const reg = /^[0-9A-Za-z]+$/
  41 + return reg.test(str)
  42 +}
  43 +
  44 +/* 大小写字母数字空格*/
  45 +export function validAlphabetsAndSpanceKey(str) {
  46 + const reg = /^[0-9a-zA-Z ]+$/
  47 + return reg.test(str)
  48 +}
  49 +
38 /** 50 /**
39 * 航班校验 51 * 航班校验
40 */ 52 */
@@ -11,7 +11,8 @@ @@ -11,7 +11,8 @@
11 </el-col> 11 </el-col>
12 <el-col :span="4" class="userinfo"> 12 <el-col :span="4" class="userinfo">
13 <el-dropdown trigger="hover"> 13 <el-dropdown trigger="hover">
14 - <span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span> 14 + <span class="el-dropdown-link userinfo-inner"><img
  15 + :src="this.sysUserAvatar"/> {{sysUserName}}</span>
15 <el-dropdown-menu slot="dropdown"> 16 <el-dropdown-menu slot="dropdown">
16 <el-dropdown-item>我的消息</el-dropdown-item> 17 <el-dropdown-item>我的消息</el-dropdown-item>
17 <el-dropdown-item>设置</el-dropdown-item> 18 <el-dropdown-item>设置</el-dropdown-item>
@@ -23,33 +24,48 @@ @@ -23,33 +24,48 @@
23 <el-col :span="24" class="main"> 24 <el-col :span="24" class="main">
24 <aside :class="collapsed?'menu-collapsed':'menu-expanded'"> 25 <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
25 <!--导航菜单--> 26 <!--导航菜单-->
26 - <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"> 27 + <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen"
  28 + @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed"
  29 + style="min-width: 230px">
27 <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden"> 30 <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
28 <el-submenu :index="index+''" v-if="!item.leaf"> 31 <el-submenu :index="index+''" v-if="!item.leaf">
29 <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template> 32 <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
30 - <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden">{{child.name}}</el-menu-item> 33 + <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path"
  34 + v-if="!child.hidden">{{child.name}}
  35 + </el-menu-item>
31 </el-submenu> 36 </el-submenu>
32 - <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> 37 + <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i
  38 + :class="item.iconCls"></i>{{item.children[0].name}}
  39 + </el-menu-item>
33 </template> 40 </template>
34 </el-menu> 41 </el-menu>
35 <!--导航菜单-折叠后--> 42 <!--导航菜单-折叠后-->
36 <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed"> 43 <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed">
37 <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item"> 44 <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
38 <template v-if="!item.leaf"> 45 <template v-if="!item.leaf">
39 - <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>  
40 - <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">  
41 - <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> 46 + <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)"
  47 + @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
  48 + <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)"
  49 + @mouseout="showMenu(index,false)">
  50 + <li v-for="child in item.children" v-if="!child.hidden" :key="child.path"
  51 + class="el-menu-item" style="padding-left: 40px;"
  52 + :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">
  53 + {{child.name}}
  54 + </li>
42 </ul> 55 </ul>
43 </template> 56 </template>
44 <template v-else> 57 <template v-else>
45 <li class="el-submenu"> 58 <li class="el-submenu">
46 - <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>  
47 - </li>  
48 - </template> 59 + <div class="el-submenu__title el-menu-item"
  60 + style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;"
  61 + :class="$route.path==item.children[0].path?'is-active':''"
  62 + @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div>
49 </li> 63 </li>
50 - </ul>  
51 - </aside>  
52 - <section class="content-container"> 64 +</template>
  65 +</li>
  66 +</ul>
  67 +</aside>
  68 +<section class="content-container">
53 <div class="grid-content bg-purple-light"> 69 <div class="grid-content bg-purple-light">
54 <el-col :span="24" class="breadcrumb-container"> 70 <el-col :span="24" class="breadcrumb-container">
55 <strong class="title">{{$route.name}}</strong> 71 <strong class="title">{{$route.name}}</strong>
@@ -61,25 +77,32 @@ @@ -61,25 +77,32 @@
61 </el-col> 77 </el-col>
62 <el-col :span="24" class="content-wrapper"> 78 <el-col :span="24" class="content-wrapper">
63 <transition name="fade" mode="out-in"> 79 <transition name="fade" mode="out-in">
64 - <router-view></router-view> 80 + <router-view :key="$route.path +$route.query.t"></router-view>
65 </transition> 81 </transition>
66 </el-col> 82 </el-col>
67 </div> 83 </div>
68 - </section>  
69 - </el-col>  
70 - </el-row> 84 +</section>
  85 +</el-col>
  86 +</el-row>
71 </template> 87 </template>
72 88
73 <script> 89 <script>
74 import rt from '../routes' 90 import rt from '../routes'
  91 +
75 export default { 92 export default {
76 93
  94 + provide() {
  95 + return {
  96 + reload: this.reload
  97 + }
  98 + },
77 data() { 99 data() {
78 return { 100 return {
79 - sysName:'流浪地球管理系统',  
80 - collapsed:false, 101 + sysName: '流浪地球管理系统',
  102 + collapsed: false,
81 sysUserName: '', 103 sysUserName: '',
82 sysUserAvatar: '', 104 sysUserAvatar: '',
  105 + isRouterAlive: true,
83 form: { 106 form: {
84 name: '', 107 name: '',
85 region: '', 108 region: '',
@@ -93,6 +116,16 @@ @@ -93,6 +116,16 @@
93 } 116 }
94 }, 117 },
95 methods: { 118 methods: {
  119 + reload() {
  120 + this.$nextTick(function () {
  121 + this.$router.push({
  122 + path: this.$router.path,
  123 + query:{
  124 + t: new Date().getTime()
  125 + }
  126 + })
  127 + })
  128 + },
96 onSubmit() { 129 onSubmit() {
97 console.log('submit!'); 130 console.log('submit!');
98 }, 131 },
@@ -103,7 +136,7 @@ @@ -103,7 +136,7 @@
103 console.log('handleclose'); 136 console.log('handleclose');
104 }, 137 },
105 handleselect: function (a, b) { 138 handleselect: function (a, b) {
106 - console.log('handleselect!'); 139 + this.reload()
107 }, 140 },
108 //退出登录 141 //退出登录
109 logout: function () { 142 logout: function () {
@@ -116,7 +149,7 @@ @@ -116,7 +149,7 @@
116 149
117 //退出后初始化原来的路由 150 //退出后初始化原来的路由
118 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); 151 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
119 - console.log(sysRoutes); 152 + // console.log(sysRoutes);
120 _this.$router.options.routes = sysRoutes; 153 _this.$router.options.routes = sysRoutes;
121 154
122 _this.$router.push('/login'); 155 _this.$router.push('/login');
@@ -127,11 +160,11 @@ @@ -127,11 +160,11 @@
127 160
128 }, 161 },
129 //折叠导航栏 162 //折叠导航栏
130 - collapse:function(){  
131 - this.collapsed=!this.collapsed; 163 + collapse: function () {
  164 + this.collapsed = !this.collapsed;
132 }, 165 },
133 - showMenu(i,status){  
134 - this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none'; 166 + showMenu(i, status) {
  167 + this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none';
135 } 168 }
136 }, 169 },
137 mounted() { 170 mounted() {
@@ -147,8 +180,8 @@ @@ -147,8 +180,8 @@
147 if (userRouters) { 180 if (userRouters) {
148 userRouters = JSON.parse(userRouters); 181 userRouters = JSON.parse(userRouters);
149 _this.$router.options.routes = userRouters; 182 _this.$router.options.routes = userRouters;
150 - console.log("home:");  
151 - console.log(_this.$router.options.routes); 183 + // console.log("home:");
  184 + // console.log(_this.$router.options.routes);
152 } 185 }
153 } 186 }
154 } 187 }
@@ -163,18 +196,22 @@ @@ -163,18 +196,22 @@
163 top: 0px; 196 top: 0px;
164 bottom: 0px; 197 bottom: 0px;
165 width: 100%; 198 width: 100%;
  199 +
166 .header { 200 .header {
167 height: 60px; 201 height: 60px;
168 line-height: 60px; 202 line-height: 60px;
169 background: $color-primary; 203 background: $color-primary;
170 - color:#fff; 204 + color: #fff;
  205 +
171 .userinfo { 206 .userinfo {
172 text-align: right; 207 text-align: right;
173 padding-right: 35px; 208 padding-right: 35px;
174 float: right; 209 float: right;
  210 +
175 .userinfo-inner { 211 .userinfo-inner {
176 cursor: pointer; 212 cursor: pointer;
177 - color:#fff; 213 + color: #fff;
  214 +
178 img { 215 img {
179 width: 40px; 216 width: 40px;
180 height: 40px; 217 height: 40px;
@@ -184,38 +221,45 @@ @@ -184,38 +221,45 @@
184 } 221 }
185 } 222 }
186 } 223 }
  224 +
187 .logo { 225 .logo {
188 //width:230px; 226 //width:230px;
189 - height:60px; 227 + height: 60px;
190 font-size: 22px; 228 font-size: 22px;
191 - padding-left:20px;  
192 - padding-right:20px;  
193 - border-color: rgba(238,241,146,0.3); 229 + padding-left: 20px;
  230 + padding-right: 20px;
  231 + border-color: rgba(238, 241, 146, 0.3);
194 border-right-width: 1px; 232 border-right-width: 1px;
195 border-right-style: solid; 233 border-right-style: solid;
  234 +
196 img { 235 img {
197 width: 40px; 236 width: 40px;
198 float: left; 237 float: left;
199 margin: 10px 10px 10px 18px; 238 margin: 10px 10px 10px 18px;
200 } 239 }
  240 +
201 .txt { 241 .txt {
202 - color:#fff; 242 + color: #fff;
203 } 243 }
204 } 244 }
205 - .logo-width{  
206 - width:230px; 245 +
  246 + .logo-width {
  247 + width: 230px;
207 } 248 }
208 - .logo-collapse-width{  
209 - width:60px 249 +
  250 + .logo-collapse-width {
  251 + width: 60px
210 } 252 }
211 - .tools{ 253 +
  254 + .tools {
212 padding: 0px 23px; 255 padding: 0px 23px;
213 - width:14px; 256 + width: 14px;
214 height: 60px; 257 height: 60px;
215 line-height: 60px; 258 line-height: 60px;
216 cursor: pointer; 259 cursor: pointer;
217 } 260 }
218 } 261 }
  262 +
219 .main { 263 .main {
220 display: flex; 264 display: flex;
221 // background: #324057; 265 // background: #324057;
@@ -223,45 +267,53 @@ @@ -223,45 +267,53 @@
223 top: 60px; 267 top: 60px;
224 bottom: 0px; 268 bottom: 0px;
225 overflow: hidden; 269 overflow: hidden;
  270 +
226 aside { 271 aside {
227 - flex:0 0 230px; 272 + flex: 0 0 230px;
228 width: 230px; 273 width: 230px;
229 // position: absolute; 274 // position: absolute;
230 // top: 0px; 275 // top: 0px;
231 // bottom: 0px; 276 // bottom: 0px;
232 - .el-menu{ 277 + .el-menu {
233 height: 100%; 278 height: 100%;
234 } 279 }
235 - .collapsed{  
236 - width:60px;  
237 - .item{ 280 +
  281 + .collapsed {
  282 + width: 60px;
  283 +
  284 + .item {
238 position: relative; 285 position: relative;
239 } 286 }
240 - .submenu{  
241 - position:absolute;  
242 - top:0px;  
243 - left:60px;  
244 - z-index:99999;  
245 - height:auto;  
246 - display:none; 287 +
  288 + .submenu {
  289 + position: absolute;
  290 + top: 0px;
  291 + left: 60px;
  292 + z-index: 99999;
  293 + height: auto;
  294 + display: none;
247 } 295 }
248 296
249 } 297 }
250 } 298 }
251 - .menu-collapsed{  
252 - flex:0 0 60px; 299 +
  300 + .menu-collapsed {
  301 + flex: 0 0 60px;
253 width: 60px; 302 width: 60px;
254 } 303 }
255 - .menu-expanded{  
256 - flex:0 0 230px; 304 +
  305 + .menu-expanded {
  306 + flex: 0 0 230px;
257 width: 230px; 307 width: 230px;
258 } 308 }
259 - .menu-expanded ul{ 309 +
  310 + .menu-expanded ul {
260 width: 230px; 311 width: 230px;
261 } 312 }
  313 +
262 .content-container { 314 .content-container {
263 // background: #f1f2f7; 315 // background: #f1f2f7;
264 - flex:1; 316 + flex: 1;
265 // position: absolute; 317 // position: absolute;
266 // right: 0px; 318 // right: 0px;
267 // top: 0px; 319 // top: 0px;
@@ -269,6 +321,7 @@ @@ -269,6 +321,7 @@
269 // left: 230px; 321 // left: 230px;
270 overflow-y: scroll; 322 overflow-y: scroll;
271 padding: 20px; 323 padding: 20px;
  324 +
272 .breadcrumb-container { 325 .breadcrumb-container {
273 //margin-bottom: 15px; 326 //margin-bottom: 15px;
274 .title { 327 .title {
@@ -276,10 +329,12 @@ @@ -276,10 +329,12 @@
276 float: left; 329 float: left;
277 color: #475669; 330 color: #475669;
278 } 331 }
  332 +
279 .breadcrumb-inner { 333 .breadcrumb-inner {
280 float: right; 334 float: right;
281 } 335 }
282 } 336 }
  337 +
283 .content-wrapper { 338 .content-wrapper {
284 background-color: #fff; 339 background-color: #fff;
285 box-sizing: border-box; 340 box-sizing: border-box;
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button> 9 <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button>
10 <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button> 10 <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button>
11 </div> 11 </div>
12 - <tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange"> 12 + <tree-table :data="tableData" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
13 <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable> 13 <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable>
14 <template slot-scope="scope"> 14 <template slot-scope="scope">
15 <span>{{ scope.row.waybillNo }}</span> 15 <span>{{ scope.row.waybillNo }}</span>
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 </tree-table> 79 </tree-table>
80 <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> 80 <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
81 81
82 - <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true"> 82 + <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen>
83 <el-form ref="" :inline="true" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px"> 83 <el-form ref="" :inline="true" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
84 <div> 84 <div>
85 <el-tag type="info" effect="plain"> 85 <el-tag type="info" effect="plain">
@@ -402,6 +402,7 @@ export default { @@ -402,6 +402,7 @@ export default {
402 return { 402 return {
403 func: treeToArray, 403 func: treeToArray,
404 expandAll: true, 404 expandAll: true,
  405 + fullscreen:true,
405 total: 1, 406 total: 1,
406 resend: true, 407 resend: true,
407 loading:false, 408 loading:false,
@@ -427,6 +428,7 @@ export default { @@ -427,6 +428,7 @@ export default {
427 flightDate: '', 428 flightDate: '',
428 custom: '' 429 custom: ''
429 }, 430 },
  431 + tableData:[],
430 temp: { 432 temp: {
431 id: undefined, 433 id: undefined,
432 waybillNo: '', 434 waybillNo: '',
@@ -440,7 +442,103 @@ export default { @@ -440,7 +442,103 @@ export default {
440 maniWeight: undefined 442 maniWeight: undefined
441 }, 443 },
442 manifestCustoms: ['4604', '4620', '4613'], 444 manifestCustoms: ['4604', '4620', '4613'],
443 - data: [ 445 +
  446 + pickerOptions: {
  447 + shortcuts: [
  448 + {
  449 + text: '今天',
  450 + onClick(picker) {
  451 + picker.$emit('pick', new Date())
  452 + }
  453 + },
  454 + {
  455 + text: '昨天',
  456 + onClick(picker) {
  457 + const date = new Date()
  458 + date.setTime(date.getTime() - 3600 * 1000 * 24)
  459 + picker.$emit('pick', date)
  460 + }
  461 + },
  462 + {
  463 + text: '明天',
  464 + onClick(picker) {
  465 + const date = new Date()
  466 + date.setTime(date.getTime() + 3600 * 1000 * 24)
  467 + picker.$emit('pick', date)
  468 + }
  469 + },
  470 + {
  471 + text: '一周前',
  472 + onClick(picker) {
  473 + const date = new Date()
  474 + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  475 + picker.$emit('pick', date)
  476 + }
  477 + }
  478 + ]
  479 + },
  480 + args: [null, null, 'timeLine'],
  481 + rules: {
  482 + maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
  483 + maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
  484 + desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
  485 + oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
  486 + flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
  487 + flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
  488 + custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
  489 + waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
  490 + }
  491 + }
  492 + },
  493 + created(){
  494 + console.log(this.$route.params.scopeRow)
  495 + this.getList()
  496 + },
  497 + methods: {
  498 + message(row) {
  499 + this.$message.info(row.event)
  500 + },
  501 + sortChange(data) {
  502 + const { prop, order } = data
  503 + if (prop === 'id') {
  504 + this.sortByID(order)
  505 + }
  506 + },
  507 + sortByID(order) {
  508 + if (order === 'ascending') {
  509 + this.listQuery.sort = '+id'
  510 + } else {
  511 + this.listQuery.sort = '-id'
  512 + }
  513 + this.handleFilter()
  514 + },
  515 + handleFilter(){
  516 +
  517 + },
  518 + handleSwitch(row){
  519 +
  520 + },
  521 + handleDownload(){
  522 + this.downloadLoading = true
  523 + },
  524 + handleUpdate(row) {
  525 + this.temp = Object.assign({}, row) // copy obj
  526 + this.temp.timestamp = new Date(this.temp.timestamp)
  527 + this.dialogStatus = 'update'
  528 + this.dialogFormVisible = true
  529 + this.$nextTick(() => {
  530 + this.$refs[''].clearValidate()
  531 + })
  532 + },
  533 + handleModifyStatus(row, status) {
  534 + this.$message({
  535 + message: '操作成功',
  536 + type: 'success'
  537 + })
  538 + row.status = status
  539 + },
  540 + getList() {
  541 + this.tableData = [
444 { 542 {
445 id: 0, 543 id: 0,
446 waybillNo: '580-20728399', 544 waybillNo: '580-20728399',
@@ -531,100 +629,278 @@ export default { @@ -531,100 +629,278 @@ export default {
531 maniWeight: 21321, 629 maniWeight: 21321,
532 status: '10003', 630 status: '10003',
533 customText: ' 已发送预配舱单 ' 631 customText: ' 已发送预配舱单 '
534 - }  
535 - ],  
536 - pickerOptions: {  
537 - shortcuts: [ 632 + },
538 { 633 {
539 - text: '今天',  
540 - onClick(picker) {  
541 - picker.$emit('pick', new Date())  
542 - } 634 + id: 5,
  635 + waybillNo: '580-20728399',
  636 + houseWaybillNo: '',
  637 + custom: '4604',
  638 + flight: 'CV9733',
  639 + flightDate: '2019-06-21',
  640 + oriStation: 'LUX',
  641 + desStation: 'CGO',
  642 + maniPiece: 50,
  643 + maniWeight: 21321,
  644 + status: '41301',
  645 + customText: ' 预配舱单主要数据传输成功。',
  646 + customComplate: 25
543 }, 647 },
544 { 648 {
545 - text: '昨天',  
546 - onClick(picker) {  
547 - const date = new Date()  
548 - date.setTime(date.getTime() - 3600 * 1000 * 24)  
549 - picker.$emit('pick', date)  
550 - } 649 + id: 6,
  650 + waybillNo: '580-20728399',
  651 + houseWaybillNo: '',
  652 + custom: '4604',
  653 + flight: 'CV9733',
  654 + flightDate: '2019-06-21',
  655 + oriStation: 'LUX',
  656 + desStation: 'CGO',
  657 + maniPiece: 50,
  658 + maniWeight: 21321,
  659 + status: '41301',
  660 + customText: ' 预配舱单主要数据传输成功。',
  661 + customComplate: 25
551 }, 662 },
552 { 663 {
553 - text: '明天',  
554 - onClick(picker) {  
555 - const date = new Date()  
556 - date.setTime(date.getTime() + 3600 * 1000 * 24)  
557 - picker.$emit('pick', date)  
558 - } 664 + id: 7,
  665 + waybillNo: '580-20728399',
  666 + houseWaybillNo: '',
  667 + custom: '4604',
  668 + flight: 'CV9733',
  669 + flightDate: '2019-06-21',
  670 + oriStation: 'LUX',
  671 + desStation: 'CGO',
  672 + maniPiece: 50,
  673 + maniWeight: 21321,
  674 + status: '41301',
  675 + customText: ' 预配舱单主要数据传输成功。',
  676 + customComplate: 25
559 }, 677 },
560 { 678 {
561 - text: '一周前',  
562 - onClick(picker) {  
563 - const date = new Date()  
564 - date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)  
565 - picker.$emit('pick', date)  
566 - }  
567 - }  
568 - ] 679 + id: 8,
  680 + waybillNo: '580-20728399',
  681 + houseWaybillNo: '',
  682 + custom: '4604',
  683 + flight: 'CV9733',
  684 + flightDate: '2019-06-21',
  685 + oriStation: 'LUX',
  686 + desStation: 'CGO',
  687 + maniPiece: 50,
  688 + maniWeight: 21321,
  689 + status: '41301',
  690 + customText: ' 预配舱单主要数据传输成功。',
  691 + customComplate: 25
569 }, 692 },
570 - args: [null, null, 'timeLine'],  
571 - rules: {  
572 - maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],  
573 - maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],  
574 - desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],  
575 - oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],  
576 - flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],  
577 - flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],  
578 - custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],  
579 - waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]  
580 - }  
581 - } 693 + {
  694 + id: 9,
  695 + waybillNo: '580-20728399',
  696 + houseWaybillNo: '',
  697 + custom: '4604',
  698 + flight: 'CV9733',
  699 + flightDate: '2019-06-21',
  700 + oriStation: 'LUX',
  701 + desStation: 'CGO',
  702 + maniPiece: 50,
  703 + maniWeight: 21321,
  704 + status: '41301',
  705 + customText: ' 预配舱单主要数据传输成功。',
  706 + customComplate: 25
582 }, 707 },
583 - methods: {  
584 - message(row) {  
585 - this.$message.info(row.event) 708 + {
  709 + id: 10,
  710 + waybillNo: '580-20728399',
  711 + houseWaybillNo: '',
  712 + custom: '4604',
  713 + flight: 'CV9733',
  714 + flightDate: '2019-06-21',
  715 + oriStation: 'LUX',
  716 + desStation: 'CGO',
  717 + maniPiece: 50,
  718 + maniWeight: 21321,
  719 + status: '41301',
  720 + customText: ' 预配舱单主要数据传输成功。',
  721 + customComplate: 25
586 }, 722 },
587 - sortChange(data) {  
588 - const { prop, order } = data  
589 - if (prop === 'id') {  
590 - this.sortByID(order)  
591 - } 723 + {
  724 + id: 11,
  725 + waybillNo: '580-20728399',
  726 + houseWaybillNo: '',
  727 + custom: '4604',
  728 + flight: 'CV9733',
  729 + flightDate: '2019-06-21',
  730 + oriStation: 'LUX',
  731 + desStation: 'CGO',
  732 + maniPiece: 50,
  733 + maniWeight: 21321,
  734 + status: '41301',
  735 + customText: ' 预配舱单主要数据传输成功。',
  736 + customComplate: 25
592 }, 737 },
593 - sortByID(order) {  
594 - if (order === 'ascending') {  
595 - this.listQuery.sort = '+id'  
596 - } else {  
597 - this.listQuery.sort = '-id'  
598 - }  
599 - this.handleFilter() 738 + {
  739 + id: 12,
  740 + waybillNo: '580-20728399',
  741 + houseWaybillNo: '',
  742 + custom: '4604',
  743 + flight: 'CV9733',
  744 + flightDate: '2019-06-21',
  745 + oriStation: 'LUX',
  746 + desStation: 'CGO',
  747 + maniPiece: 50,
  748 + maniWeight: 21321,
  749 + status: '41301',
  750 + customText: ' 预配舱单主要数据传输成功。',
  751 + customComplate: 25
600 }, 752 },
601 - handleFilter(){  
602 - 753 + {
  754 + id: 13,
  755 + waybillNo: '580-20728399',
  756 + houseWaybillNo: '',
  757 + custom: '4604',
  758 + flight: 'CV9733',
  759 + flightDate: '2019-06-21',
  760 + oriStation: 'LUX',
  761 + desStation: 'CGO',
  762 + maniPiece: 50,
  763 + maniWeight: 21321,
  764 + status: '41301',
  765 + customText: ' 预配舱单主要数据传输成功。',
  766 + customComplate: 25
  767 + },{
  768 + id: 14,
  769 + waybillNo: '580-20728399',
  770 + houseWaybillNo: '',
  771 + custom: '4604',
  772 + flight: 'CV9733',
  773 + flightDate: '2019-06-21',
  774 + oriStation: 'LUX',
  775 + desStation: 'CGO',
  776 + maniPiece: 50,
  777 + maniWeight: 21321,
  778 + status: '41301',
  779 + customText: ' 预配舱单主要数据传输成功。',
  780 + customComplate: 25
603 }, 781 },
604 - handleSwitch(row){  
605 - 782 + {
  783 + id: 15,
  784 + waybillNo: '580-20728399',
  785 + houseWaybillNo: '',
  786 + custom: '4604',
  787 + flight: 'CV9733',
  788 + flightDate: '2019-06-21',
  789 + oriStation: 'LUX',
  790 + desStation: 'CGO',
  791 + maniPiece: 50,
  792 + maniWeight: 21321,
  793 + status: '41301',
  794 + customText: ' 预配舱单主要数据传输成功。',
  795 + customComplate: 25
606 }, 796 },
607 - handleDownload(){  
608 - this.downloadLoading = true 797 + {
  798 + id: 16,
  799 + waybillNo: '580-20728399',
  800 + houseWaybillNo: '',
  801 + custom: '4604',
  802 + flight: 'CV9733',
  803 + flightDate: '2019-06-21',
  804 + oriStation: 'LUX',
  805 + desStation: 'CGO',
  806 + maniPiece: 50,
  807 + maniWeight: 21321,
  808 + status: '41301',
  809 + customText: ' 预配舱单主要数据传输成功。',
  810 + customComplate: 25
609 }, 811 },
610 - handleUpdate(row) {  
611 - this.temp = Object.assign({}, row) // copy obj  
612 - this.temp.timestamp = new Date(this.temp.timestamp)  
613 - this.dialogStatus = 'update'  
614 - this.dialogFormVisible = true  
615 - this.$nextTick(() => {  
616 - this.$refs[''].clearValidate()  
617 - }) 812 + {
  813 + id: 17,
  814 + waybillNo: '580-20728399',
  815 + houseWaybillNo: '',
  816 + custom: '4604',
  817 + flight: 'CV9733',
  818 + flightDate: '2019-06-21',
  819 + oriStation: 'LUX',
  820 + desStation: 'CGO',
  821 + maniPiece: 50,
  822 + maniWeight: 21321,
  823 + status: '41301',
  824 + customText: ' 预配舱单主要数据传输成功。',
  825 + customComplate: 25
618 }, 826 },
619 - handleModifyStatus(row, status) {  
620 - this.$message({  
621 - message: '操作成功',  
622 - type: 'success'  
623 - })  
624 - row.status = status 827 + {
  828 + id: 18,
  829 + waybillNo: '580-20728399',
  830 + houseWaybillNo: '',
  831 + custom: '4604',
  832 + flight: 'CV9733',
  833 + flightDate: '2019-06-21',
  834 + oriStation: 'LUX',
  835 + desStation: 'CGO',
  836 + maniPiece: 50,
  837 + maniWeight: 21321,
  838 + status: '41301',
  839 + customText: ' 预配舱单主要数据传输成功。',
  840 + customComplate: 25
625 }, 841 },
626 - getList() { 842 + {
  843 + id: 19,
  844 + waybillNo: '580-20728399',
  845 + houseWaybillNo: '',
  846 + custom: '4604',
  847 + flight: 'CV9733',
  848 + flightDate: '2019-06-21',
  849 + oriStation: 'LUX',
  850 + desStation: 'CGO',
  851 + maniPiece: 50,
  852 + maniWeight: 21321,
  853 + status: '41301',
  854 + customText: ' 预配舱单主要数据传输成功。',
  855 + customComplate: 25
  856 + },
  857 + {
  858 + id: 20,
  859 + waybillNo: '580-20728399',
  860 + houseWaybillNo: '',
  861 + custom: '4604',
  862 + flight: 'CV9733',
  863 + flightDate: '2019-06-21',
  864 + oriStation: 'LUX',
  865 + desStation: 'CGO',
  866 + maniPiece: 50,
  867 + maniWeight: 21321,
  868 + status: '41301',
  869 + customText: ' 预配舱单主要数据传输成功。',
  870 + customComplate: 25
  871 + },
  872 + {
  873 + id: 23,
  874 + waybillNo: '580-20728399',
  875 + houseWaybillNo: '',
  876 + custom: '4604',
  877 + flight: 'CV9733',
  878 + flightDate: '2019-06-21',
  879 + oriStation: 'LUX',
  880 + desStation: 'CGO',
  881 + maniPiece: 50,
  882 + maniWeight: 21321,
  883 + status: '41301',
  884 + customText: ' 预配舱单主要数据传输成功。',
  885 + customComplate: 25
  886 + }, {
  887 + id: 22,
  888 + waybillNo: '580-20728399',
  889 + houseWaybillNo: '',
  890 + custom: '4604',
  891 + flight: 'CV9733',
  892 + flightDate: '2019-06-21',
  893 + oriStation: 'LUX',
  894 + desStation: 'CGO',
  895 + maniPiece: 50,
  896 + maniWeight: 21321,
  897 + status: '41300',
  898 + customText: ' 预配舱单主要数据传输成功。',
  899 + customComplate: 25
  900 + }
627 901
  902 + ]
  903 + this.total = this.tableData.length
628 }, 904 },
629 handleSelectionChange(val) { 905 handleSelectionChange(val) {
630 this.multipleSelection = val 906 this.multipleSelection = val
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div class="app-content">
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
  6 + <el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
  7 + <el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
  8 + <el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
  9 + value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
  10 + </div>
  11 + <div class="filter-container">
  12 + <el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
  13 + <el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  14 + </el-select>
  15 + <el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
  16 + <el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  17 + </el-select>
  18 + <el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
  19 + <el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  20 + </el-select>
  21 + <el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
  22 + <el-button class="filter-item" style="margin-left: 10px;" type="warning"
  23 + @click="handleUpdateStatus">批量修改状态</el-button>
  24 + </div>
  25 + <div class="midSpan">
  26 + <el-row>
  27 + <el-col :span="0.5">
  28 + <span style="color: red">注:</span>
  29 + </el-col>
  30 + <el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
  31 + <span>预配舱单</span>
  32 + </el-col>
  33 + <el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
  34 + <span>出港运抵</span>
  35 + </el-col>
  36 + <el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
  37 + <span>出港装载</span>
  38 + </el-col>
  39 + <el-col :span="1" style="background: #f5ffc0" align="center">
  40 + <span>出港理货</span>
  41 + </el-col>
  42 + </el-row>
  43 + </div>
  44 + <tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
  45 + style="font-size: 13px" border @selection-change="handleSelectionChange"
  46 + :row-class-name="tableRowClassName">
  47 + <el-table-column label="航班号" width="80px" align="center">
  48 + <template slot-scope="scope">
  49 + <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
  50 + </template>
  51 + </el-table-column>
  52 + <el-table-column label="航班日期" width="100px" align="center">
  53 + <template slot-scope="scope">
  54 + <span>{{ scope.row.flightdate }}</span>
  55 + </template>
  56 + </el-table-column>
  57 + <el-table-column label="航段" width="100px" align="center">
  58 + <template slot-scope="scope">
  59 + <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="主单号" width="120px" align="center" >
  63 + <template slot-scope="scope" >
  64 + <span>{{ scope.row.awba }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="分单号" width="150px" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{ scope.row.awbh }}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="件数" width="60px" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{ scope.row.piece }}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="重量" width="60px" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{ scope.row.weight }}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="关区" width="60px" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{ scope.row.customcode }}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="时间" width="150px" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{ scope.row.actime }}</span>
  90 + </template>
  91 + </el-table-column>
  92 + <el-table-column label="状态" width="90px" align="center">
  93 + <template slot-scope="scope">
  94 + <span v-if="scope.row.status ==='01'">未发送</span>
  95 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  96 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  97 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  98 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  99 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  100 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  101 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  102 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  103 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  104 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  105 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  106 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  107 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  108 + </template>
  109 + </el-table-column>
  110 + <el-table-column label="回执内容" align="center" show-overflow-tooltip>
  111 + <template slot-scope="scope">
  112 + <span>{{ scope.row.customText }}</span>
  113 + <!--<div>-->
  114 + <!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
  115 + <!--</div>-->
  116 + </template>
  117 + </el-table-column>
  118 + <el-table-column label="操作" width="180px" align="center">
  119 + <template slot-scope="scope">
  120 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
  121 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
  122 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
  123 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
  124 + <a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
  125 + </template>
  126 + </el-table-column>
  127 + </tree-table>
  128 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  129 + @pagination="getList"/>
  130 + </div>
  131 +</template>
  132 +<script>
  133 + import treeTable from '@/components/TreeTable'
  134 + import treeToArray from '@/utils/customEval'
  135 + import Pagination from '@/components/Pagination'
  136 + import {getManifests} from "@/api/exitManifest"
  137 +
  138 + import {getMt520XListForParam} from "@/api/exitTidy";
  139 + import {getMt3201ListForParam} from "@/api/exitArrive";
  140 + import {getMt4201ListForParam} from "@/api/exitLoading";
  141 +
  142 + export default {
  143 + name: "LostLoadChange",
  144 + components: {treeTable, Pagination},
  145 + inject:['reload'],
  146 + data() {
  147 + return {
  148 + func: treeToArray,
  149 + total: 1,
  150 + listLoading: false,
  151 + listQuery: {
  152 + pageSize: 1,
  153 + limitSize: 100,
  154 + awba:undefined,
  155 + carrier: undefined,
  156 + flightno:undefined,
  157 + flightDate: new Date(),
  158 + messageType: undefined,
  159 + messageStatus: undefined,
  160 + customStatus: undefined,
  161 + },
  162 + manifestData: [],
  163 + messageTypeList: [
  164 + {label:'预配舱单',value:'MT2201'},
  165 + {label:'出港运抵',value:'MT3201'},
  166 + {label:'出港装载',value:'MT4201'},
  167 + {label:'出港理货',value:'MT5202'}
  168 + ],
  169 + messageStatusList: [
  170 + {label:'未发送',value:'01'},
  171 + {label:'已发舱单报',value:'02'},
  172 + {label:'舱单报退单',value:'05'},
  173 + {label:'舱单转人工',value:'06'},
  174 + {label:'舱单报申报成功',value:'07'},
  175 + {label:'已发舱单删除报',value:'08'},
  176 + {label:'舱单删除报退单',value:'09'},
  177 + {label:'舱单删除报转人工',value:'10'},
  178 + {label:'舱单删除成功',value:'11'},
  179 + {label:'已发舱单修改报',value:'12'},
  180 + {label:'舱单修改报退单',value:'13'},
  181 + {label:'舱单修改报转人工',value:'14'},
  182 + {label:'舱单修改报成功',value:'15'},
  183 + {label:'海关已存在',value:'16'},
  184 + ],
  185 + customStatusList: [
  186 + {label:'普通货物',value:'001'},
  187 + {label:'国际转运货物',value:'002'},
  188 + {label:'国内转关',value:'003'},
  189 + {label:'空箱',value:'004'},
  190 + {label:'快件',value:'006'},
  191 + ]
  192 + }
  193 + },
  194 + methods: {
  195 + getList() {
  196 + this.listLoading = true
  197 + getManifests(this.listQuery).then(res =>{
  198 + this.manifestData = res.data.dataList
  199 + this.total = res.data.count
  200 + setTimeout(() =>{
  201 + this.listLoading = false
  202 + },1500)
  203 + })
  204 + },
  205 + handleSelectionChange() {
  206 +
  207 + },
  208 + handleSearch(){
  209 + this.getList()
  210 + },
  211 + handleUpdateStatus(row){
  212 +
  213 + },
  214 + handleUpdate(row){
  215 + if(row.messageType === 'MT2201'){
  216 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  217 + }
  218 + if(row.messageType === 'MT3201'){
  219 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  220 + }
  221 + if(row.messageType === 'MT4201'){
  222 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  223 + }
  224 + if(row.messageType === 'MT5201'){
  225 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  226 + }
  227 + },
  228 + tableRowClassName({row,index}){
  229 + if(row.messageType === 'MT2201'){
  230 + return 'MT2201-row'
  231 + }
  232 + if(row.messageType === 'MT3201'){
  233 + return 'MT3201-row'
  234 + }
  235 + if(row.messageType === 'MT4201'){
  236 + return 'MT4201-row'
  237 + }
  238 + if(row.messageType === 'MT5202'){
  239 + return 'MT5202-row'
  240 + }
  241 + }
  242 + }
  243 + }
  244 +
  245 +</script>
  246 +<style>
  247 + .el-table .MT2201-row {
  248 + background: oldlace;
  249 + }
  250 +
  251 + .el-table .MT3201-row {
  252 + background: #f0f9eb;
  253 + }
  254 +
  255 + .el-table .MT4201-row {
  256 + background: #bce7fd;
  257 + }
  258 +
  259 + .el-table .MT5202-row {
  260 + background: #f5ffc0;
  261 + }
  262 + .app-content{
  263 + margin-top: 20px;
  264 + }
  265 + .midSpan{
  266 + margin-bottom: 10px;
  267 + }
  268 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div class="app-content">
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="主单号"/>
  6 + <el-input v-model="listQuery.awbh" clearable style="width: 200px;" class="filter-item" placeholder="分单号"/>
  7 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
  8 + </div>
  9 + <div>
  10 + <span style="color: red">注:主分单必须同时为空或者同时不为空</span>
  11 + </div>
  12 + <tree-table v-loading="listLoading" :data="lostLoadData" :eval-func="func" :expand-all="true"
  13 + style="font-size: 12px" border>
  14 + <el-table-column label="航班号" width="70px" align="center">
  15 + <template slot-scope="scope">
  16 + <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
  17 + </template>
  18 + </el-table-column>
  19 + <el-table-column label="航班日期" width="100px" align="center">
  20 + <template slot-scope="scope">
  21 + <span>{{ scope.row.flightdate }}</span>
  22 + </template>
  23 + </el-table-column>
  24 + <el-table-column label="航段" width="90px" align="center">
  25 + <template slot-scope="scope">
  26 + <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
  27 + </template>
  28 + </el-table-column>
  29 + <el-table-column label="主单号" width="120px" align="center">
  30 + <template slot-scope="scope">
  31 + <span>{{ scope.row.awba }}</span>
  32 + </template>
  33 + </el-table-column>
  34 + <el-table-column label="分单号" width="150px" align="center">
  35 + <template slot-scope="scope">
  36 + <span>{{ scope.row.awbh }}</span>
  37 + </template>
  38 + </el-table-column>
  39 + <el-table-column label="件数" width="60px" align="center">
  40 + <template slot-scope="scope">
  41 + <span>{{ scope.row.piece }}</span>
  42 + </template>
  43 + </el-table-column>
  44 + <el-table-column label="重量" width="60px" align="center">
  45 + <template slot-scope="scope">
  46 + <span>{{ scope.row.weight }}</span>
  47 + </template>
  48 + </el-table-column>
  49 + <el-table-column label="关区" width="60px" align="center">
  50 + <template slot-scope="scope">
  51 + <span>{{ scope.row.customcode }}</span>
  52 + </template>
  53 + </el-table-column>
  54 + <el-table-column label="时间" width="150px" align="center">
  55 + <template slot-scope="scope">
  56 + <span>{{ scope.row.actime }}</span>
  57 + </template>
  58 + </el-table-column>
  59 + <el-table-column label="落装状态" width="90px" align="center">
  60 + <template slot-scope="scope">
  61 + <span v-if="scope.row.offload ==='001'">未落装</span>
  62 + <span v-if="scope.row.offload ==='002'">已落装</span>
  63 + <span v-if="scope.row.offload ==='003'">以落装改配</span>
  64 + </template>
  65 + </el-table-column>
  66 + <el-table-column label="状态" width="90px" align="center">
  67 + <template slot-scope="scope">
  68 + <span v-if="scope.row.status ==='01'">未发送</span>
  69 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  70 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  71 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  72 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  73 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  74 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  75 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  76 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  77 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  78 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  79 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  80 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  81 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  82 + </template>
  83 + </el-table-column>
  84 + <el-table-column label="回执内容" align="center" show-overflow-tooltip>
  85 + <template slot-scope="scope">
  86 + <span>{{ scope.row.ext5 }}</span>
  87 + </template>
  88 + </el-table-column>
  89 + <el-table-column label="操作" width="220px" align="center">
  90 + <template slot-scope="scope">
  91 + <el-button size="mini" type="primary" @click="handleLostLoad(scope.row)"
  92 + :disabled="scope.row.offload ==='002'">落装申请
  93 + </el-button>
  94 + <el-button size="mini" type="success" @click="handleLostChange(scope.row)"
  95 + :disabled="scope.row.offload ==='003'">落装改配
  96 + </el-button>
  97 + </template>
  98 + </el-table-column>
  99 + </tree-table>
  100 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  101 + @pagination="getList"/>
  102 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
  103 + <el-form ref="lostChangeData" :model="lostChangeModel" :rules="lostChangeRules" label-width="120px">
  104 + <el-form-item label="需改配主单号" prop="manifest">
  105 + <el-input v-model="lostChangeModel.awba" style="width: 300px"></el-input>
  106 + </el-form-item>
  107 + <el-form-item label="需改配分单号" prop="manifest">
  108 + <el-input v-model="lostChangeModel.awbh" style="width: 300px"></el-input>
  109 + </el-form-item>
  110 + <el-form-item label="改配后主单号" prop="manifest">
  111 + <el-input v-model="lostChangeModel.manifest" style="width: 300px"></el-input>
  112 + </el-form-item>
  113 + </el-form>
  114 + <div slot="footer" class="dialog-footer">
  115 + <el-button @click="dialogFormVisible = false">取消</el-button>
  116 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  117 + </div>
  118 + </el-dialog>
  119 + </div>
  120 +
  121 +</template>
  122 +<script>
  123 + import treeTable from '@/components/TreeTable'
  124 + import treeToArray from '@/utils/customEval'
  125 + import Pagination from '@/components/Pagination'
  126 + import {getMt2201ListForParam, getLostLoadChange, saveLostChange, saveLostLoad} from "@/api/exitPre";
  127 + import {Message} from 'element-ui'
  128 + export default {
  129 + name: "LostLoad",
  130 + components: {treeTable, Pagination},
  131 + inject: ['reload'],
  132 + data() {
  133 + return {
  134 + func: treeToArray,
  135 + preTableStatus: true,
  136 + lostTableStatus: false,
  137 + total: 1,
  138 + listLoading: false,
  139 + listQuery: {
  140 + pageSize: 1,
  141 + limitSize: 100,
  142 + awba: undefined,
  143 + awbh: undefined,
  144 + },
  145 + dialogFormVisible: false,
  146 + dialogStatus: undefined,
  147 + dialogMap: {
  148 + create: '发送落装改配'
  149 + },
  150 + lostLoadData: [],
  151 + lostChangeModel:{
  152 + uuid: undefined,
  153 + awba: undefined,
  154 + awbh: undefined,
  155 + manifest: undefined
  156 + },
  157 + lostChangeRules:{}
  158 + }
  159 + },
  160 + methods: {
  161 + getList() {
  162 + this.listLoading = true
  163 + if (this.listQuery.awba !== undefined && this.listQuery.awbh !== undefined &&
  164 + this.listQuery.awba !== '' && this.listQuery.awbh !== '') {
  165 + getLostLoadChange(this.listQuery).then(res => {
  166 + this.lostLoadData = res.data.dataList
  167 + this.total = res.data.count
  168 + setTimeout(() => {
  169 + this.listLoading = false
  170 + }, 1500)
  171 + })
  172 + } else {
  173 + this.listQuery.awba = undefined
  174 + this.listQuery.awbh = undefined
  175 + getMt2201ListForParam(this.listQuery).then(res => {
  176 + this.lostLoadData = res.data.dataList
  177 + this.total = res.data.count
  178 + setTimeout(() => {
  179 + this.listLoading = false
  180 + }, 1500)
  181 + })
  182 + }
  183 + },
  184 + handleSearch() {
  185 + this.getList()
  186 + },
  187 + handleLostLoad(row) {
  188 + console.log(row)
  189 + this.$confirm("是否发送落装申请", "确认消息", {
  190 + distinguishCancelAndClose: true,
  191 + confirmButtonText: '确认发送',
  192 + cancelButtonText: '取消发送'
  193 + }).then(() => {
  194 + delete row.parent
  195 + delete row.children
  196 + saveLostLoad(row).then(res => {
  197 + if (res.data.count > 0) {
  198 + this.$message({
  199 + type: 'success',
  200 + message: res.data.respMessage
  201 + })
  202 + this.getList()
  203 + } else {
  204 + this.$message({
  205 + type: 'error',
  206 + message: res.data.respMessage
  207 + })
  208 + }
  209 + })
  210 +
  211 + }).catch(action => {
  212 + this.$message({
  213 + type: 'info',
  214 + message: action === 'cancel'
  215 + ? '取消发送'
  216 + : '发送取消'
  217 + })
  218 + })
  219 + },
  220 + handleLostChange(row) {
  221 + this.lostChangeModel = {
  222 + uuid: undefined,
  223 + awba: undefined,
  224 + awbh: undefined,
  225 + manifest: undefined
  226 + }
  227 + const preModel = Object.assign({},row)
  228 + this.lostChangeModel.awba = preModel.awba
  229 + this.lostChangeModel.awbh = preModel.awbh
  230 + this.lostChangeModel.uuid = preModel.uuid
  231 + this.dialogStatus = 'create'
  232 + this.dialogFormVisible = true
  233 + this.$nextTick(()=>{
  234 + this.$refs.lostChangeData.clearValidate()
  235 + })
  236 + },
  237 + createData(){
  238 + saveLostChange(this.lostChangeModel).then(res =>{
  239 + if(res.data.count >0){
  240 + Message.success(res.data.respMessage)
  241 + this.dialogFormVisible = false
  242 + this.getList()
  243 + } else {
  244 + Message.error(res.data.respMessage)
  245 + }
  246 + })
  247 + }
  248 + }
  249 + }
  250 +
  251 +</script>
  252 +<style>
  253 +
  254 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div>
  4 + <div>
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span class="titleSpan">航班号:{{this.arriveQuery.carrier}}{{this.arriveQuery.flightno}}</span>
  17 + <span class="titleSpan">航班日期:{{this.arriveQuery.flightdate}}</span>
  18 + <span class="titleSpan">航段:{{this.arriveQuery.originstation}}-{{this.arriveQuery.destinationstation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">出港运抵查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="4">
  34 + <div class="grid-content">
  35 + <el-input v-model="awba" placeholder="请输入主单号"></el-input>
  36 + </div>
  37 + </el-col>
  38 + <div class="grid-content el-btn">
  39 + <el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
  40 + <el-button v-if="arriveQuery.flightno ===undefined && arriveData.length<1"
  41 + type="primary" size="mini"
  42 + @click="handleAddArrive">新增运抵
  43 + </el-button>
  44 + </div>
  45 + </div>
  46 + </el-col>
  47 + </div>
  48 + </el-col>
  49 + <el-col :span="24">
  50 + <div class="grid-content content" style="margin-top: 6px">出港运抵明细</div>
  51 + </el-col>
  52 + </el-row>
  53 + </div>
  54 + <el-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
  55 + style="font-size: 12px" border @selection-change="handleSelectionChange">
  56 + <el-table-column type="selection" width="55" align="center"></el-table-column>
  57 + <el-table-column label="航班号" width="70" align="center">
  58 + <template slot-scope="scope">
  59 + <span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="运单号" width="120" align="center">
  63 + <template slot-scope="scope">
  64 + <span>{{scope.row.awba}}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="分单号" width="120" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{scope.row.awbh}}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="运抵件数" width="70" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{scope.row.piece}}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="运抵重量" width="70" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{scope.row.weight}}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="货物描述" width="100" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{scope.row.goodsname}}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="运抵时间" width="140" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{scope.row.arrivetime}}</span>
  90 + </template>
  91 + </el-table-column>
  92 + <el-table-column label="状态" width="100" align="center">
  93 + <template slot-scope="scope">
  94 + <span v-if="scope.row.status ==='01'">未发送</span>
  95 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  96 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  97 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  98 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  99 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  100 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  101 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  102 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  103 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  104 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  105 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  106 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  107 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  108 + </template>
  109 + </el-table-column>
  110 + <el-table-column prop="receipt" label="回执信息" width="180" align="center">
  111 + <template slot-scope="scope">
  112 + <span>{{scope.row.ext5}}</span>
  113 + </template>
  114 + </el-table-column>
  115 + <el-table-column prop="operation" label="操作" align="center">
  116 + <template slot-scope="scope">
  117 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  118 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
  119 + <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
  120 + :disabled="scope.row.status !=='00'">发送舱单报
  121 + </el-button>
  122 + <el-button size="mini" type="danger" @click="handleAwbDelete(scope.row)">发删除报</el-button>
  123 +
  124 + <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
  125 + :disabled="scope.row.status ==='00'">修改状态
  126 + </el-button>
  127 + </template>
  128 + </el-table-column>
  129 + </el-table>
  130 + <div class="btnFoot">
  131 + <el-row>
  132 + <el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0"
  133 + @click="handelAddArriveInfo">新增出港运抵
  134 + </el-button>
  135 + <el-button type="primary" size="mini" v-if="arriveModel.flightno !== undefined || arriveData.length>0"
  136 + @click="handelBackStep">返回
  137 + </el-button>
  138 + </el-row>
  139 + </div>
  140 + <pagination v-show="total>0" :total="total" :page.sync="arriveQuery.pageSize"
  141 + :limit.sync="arriveQuery.limitSize"
  142 + @pagination="getList"/>
  143 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
  144 + <el-form ref="arriveFormData" :model="arriveModel" :rules="arriveRoles" label-position="right"
  145 + label-width="90px">
  146 + <div class="grid-content content">
  147 + <span>航班信息</span>
  148 + </div>
  149 + <el-row>
  150 + <el-col :span="7.5">
  151 + <el-form-item label="主单号" prop="awba">
  152 + <el-input v-model="arriveModel.awba"></el-input>
  153 + </el-form-item>
  154 + </el-col>
  155 + <el-col :span="7.5">
  156 + <el-form-item label="分单号" prop="awbh">
  157 + <el-input v-model="awbh"></el-input>
  158 + </el-form-item>
  159 + </el-col>
  160 + </el-row>
  161 + <div class="grid-content content">
  162 + <span>航班信息</span>
  163 + </div>
  164 + <el-row>
  165 + <el-col :span="7.5">
  166 + <el-form-item label="承运人" prop="carrier">
  167 + <el-input v-model="carrier"
  168 + :disabled="dialogFormVisible === 'update'"></el-input>
  169 + </el-form-item>
  170 + </el-col>
  171 + <el-col :span="7.5">
  172 + <el-form-item label="航班号" prop="flightno">
  173 + <el-input v-model="flightno"
  174 + :disabled="dialogFormVisible === 'update'"></el-input>
  175 + </el-form-item>
  176 + </el-col>
  177 + <el-col :span="7.5">
  178 + <el-form-item label="航班日期" prop="flightdate">
  179 + <el-date-picker v-model="arriveModel.flightdate" value-format="yyyy-MM-dd" type="date"
  180 + placeholder="请输入"
  181 + :disabled="dialogFormVisible === 'update'"></el-date-picker>
  182 + </el-form-item>
  183 + </el-col>
  184 + </el-row>
  185 + <el-row>
  186 + <el-col :span="7.5">
  187 + <el-form-item label="起始站" prop="originstation">
  188 + <el-input v-model="originstation"
  189 + :disabled="dialogFormVisible === 'update'"></el-input>
  190 + </el-form-item>
  191 + </el-col>
  192 + <el-col :span="7.5">
  193 + <el-form-item label="目的站" prop="destinationstation">
  194 + <el-input v-model="destinationstation"
  195 + :disabled="dialogFormVisible === 'update'"></el-input>
  196 + </el-form-item>
  197 + </el-col>
  198 + </el-row>
  199 + <div class="grid-content content">
  200 + <span>货物信息</span>
  201 + </div>
  202 + <el-row>
  203 + <el-col :span="7.5">
  204 + <el-form-item label="运抵件数" prop="piece">
  205 + <el-input v-model.number="arriveModel.piece"></el-input>
  206 + </el-form-item>
  207 + </el-col>
  208 + <el-col :span="7.5">
  209 + <el-form-item label="运抵重量" prop="weight">
  210 + <el-input v-model.number="arriveModel.weight"></el-input>
  211 + </el-form-item>
  212 + </el-col>
  213 + <el-col :span="7.5">
  214 + <el-form-item label="运抵时间" prop="arrivetime">
  215 + <el-date-picker v-model="arriveModel.arrivetime" value-format="yyyy-MM-dd HH:mm:ss"
  216 + type="datetime"
  217 + placeholder="请输入"></el-date-picker>
  218 + </el-form-item>
  219 + </el-col>
  220 + </el-row>
  221 + <el-row>
  222 + <el-col :span="7.5">
  223 + <el-form-item label="货物描述" prop="goodsname">
  224 + <el-input v-model="goodsname" placeholder="请输入"></el-input>
  225 + </el-form-item>
  226 + </el-col>
  227 + <el-col :span="7.5">
  228 + <el-form-item label="海关关区" prop="customcode">
  229 + <el-select v-model="arriveModel.customcode">
  230 + <el-option v-for="item in customcodeList " :key="item" :label="item"
  231 + :value="item"></el-option>
  232 + </el-select>
  233 + </el-form-item>
  234 + </el-col>
  235 + </el-row>
  236 + </el-form>
  237 + <div slot="footer" class="dialog-footer">
  238 + <el-button @click="dialogFormVisible = false">取消</el-button>
  239 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  240 + <el-button type="success" @click="SaveAndSend">保存并发送</el-button>
  241 + </div>
  242 + </el-dialog>
  243 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  244 + <el-table :data="detailData" border>
  245 + <el-table-column label="操作时间" width="150">
  246 + <template slot-scope="scope">
  247 + {{scope.row.busdate}}
  248 + </template>
  249 + </el-table-column>
  250 + <el-table-column label="航班号" width="80">
  251 + <template slot-scope="scope">
  252 + {{scope.row.carrier}}{{scope.row.flightno}}
  253 + </template>
  254 + </el-table-column>
  255 + <el-table-column label="航班日期" width="100">
  256 + <template slot-scope="scope">
  257 + {{scope.row.flightdate}}
  258 + </template>
  259 + </el-table-column>
  260 + <el-table-column label="件数" width="70">
  261 + <template slot-scope="scope">
  262 + {{scope.row.buspiece}}
  263 + </template>
  264 + </el-table-column>
  265 + <el-table-column label="重量" width="70">
  266 + <template slot-scope="scope">
  267 + {{scope.row.busweight}}
  268 + </template>
  269 + </el-table-column>
  270 + <el-table-column label="回执信息" width="">
  271 + <template slot-scope="scope">
  272 + {{scope.row.cusrestext}}
  273 + </template>
  274 + </el-table-column>
  275 + <el-table-column label="操作人" width="100">
  276 + <template slot-scope="scope">
  277 + {{scope.row.operusername}}
  278 + </template>
  279 + </el-table-column>
  280 + </el-table>
  281 + </el-dialog>
  282 + </div>
  283 +</template>
  284 +<script>
  285 + import treeTable from '@/components/TreeTable'
  286 + import treeToArray from '@/utils/customEval'
  287 + import Pagination from '@/components/Pagination'
  288 +
  289 + import {getMt3201ListForParam, deleteByIsDelete, updateStatus, updateMT3201, addMt3201} from '@/api/exitArrive'
  290 + import {Message} from "element-ui";
  291 + import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey} from "@/utils/validate";
  292 + import {getResponseForParam} from '@/api/responseDetail'
  293 +
  294 + export default {
  295 + name: "ExitArrive",
  296 + components: {treeTable, Pagination},
  297 + inject: ['reload'],
  298 + data() {
  299 + const validatorAwb = (rule, value, callback) => {
  300 + if (!validAwb(value)) {
  301 + callback("请正确书写主单号")
  302 + }
  303 + callback()
  304 + }
  305 + const validatorAwbh = (rule, value, callback) => {
  306 + if (!validAlphabetsAndNum(value)) {
  307 + callback("只能输入字母和数字")
  308 + }
  309 + callback()
  310 + }
  311 + const validatorAlphabets = (rule, value, callback) => {
  312 + if (!validAlphabets(value)) {
  313 + callback("只能输入字母")
  314 + }
  315 + callback()
  316 + }
  317 + const validAlphabetsSpanceKey = (rule,value,callback) =>{
  318 + if(!validAlphabetsAndSpanceKey(value)){
  319 + callback("只能输入字母、数字、空格")
  320 + }
  321 + callback()
  322 + }
  323 + return {
  324 + func: treeToArray,
  325 + total: 1,
  326 + arriveQuery: {
  327 + pageSize: 1,
  328 + limitSize: 100,
  329 + awba: undefined,
  330 + carrier: undefined,
  331 + flightno: undefined,
  332 + flightdate: undefined,
  333 + originstation: undefined,
  334 + destinationstation: undefined,
  335 + customcode: undefined
  336 + },
  337 + dialogMap: {
  338 + update: '编辑出港运抵',
  339 + create: '添加出港运抵',
  340 + },
  341 + dialogTableVisible: false,
  342 + multipleSelection: [],
  343 + customcodeList: [4604, 4620],
  344 + dialogStatus: undefined,
  345 + awbhStatus: false,
  346 + dialogFormVisible: false,
  347 + listLoading: false,
  348 + arriveRoles: {
  349 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  350 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  351 + goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
  352 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  353 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  354 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  355 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  356 + piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  357 + weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  358 + },
  359 + arriveData: [],
  360 + detailData: [],
  361 + arriveModel: {
  362 + carrier: undefined,
  363 + flightno: undefined,
  364 + flightdate: undefined,
  365 + originstation: undefined,
  366 + destinationstation: undefined,
  367 + awba: undefined,
  368 + awbh: undefined,
  369 + piece: undefined,
  370 + weight: undefined,
  371 + goodsname: undefined,
  372 + customcode: undefined,
  373 + arrivetime: undefined,
  374 + messageType: 'MT3201'
  375 + }
  376 + }
  377 + },
  378 + created() {
  379 + if (this.$route.params.flightData !== undefined) {
  380 + // 给查询条件赋值
  381 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  382 + this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
  383 + }
  384 +
  385 + this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  386 + this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  387 + this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
  388 + this.arriveQuery.originstation = this.$route.params.flightData.originstation
  389 + this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation
  390 + this.getList()
  391 + }
  392 + },
  393 + computed: {
  394 + awba: {
  395 + get: function () {
  396 + return this.arriveQuery.awba
  397 + },
  398 + set: function (val) {
  399 + this.arriveQuery.awba = val.trim()
  400 + }
  401 + },
  402 + awbh: {
  403 + get: function () {
  404 + return this.arriveModel.awbh
  405 + },
  406 + set: function (val) {
  407 + this.arriveModel.awbh = val.toUpperCase().trim()
  408 + }
  409 + },
  410 + carrier: {
  411 + get: function () {
  412 + return this.arriveModel.carrier
  413 + },
  414 + set: function (val) {
  415 + this.arriveModel.carrier = val.toUpperCase().trim()
  416 + }
  417 + },
  418 + goodsname: {
  419 + get: function () {
  420 + return this.arriveModel.goodsname
  421 + },
  422 + set: function (val) {
  423 + this.arriveModel.goodsname = val.toUpperCase().trim()
  424 + }
  425 + },
  426 + flightno: {
  427 + get: function () {
  428 + return this.arriveModel.flightno
  429 + },
  430 + set: function (val) {
  431 + this.arriveModel.flightno = val.toUpperCase().trim()
  432 + }
  433 + },
  434 + originstation: {
  435 + get: function () {
  436 + return this.arriveModel.originstation
  437 + },
  438 + set: function (val) {
  439 + this.arriveModel.originstation = val.toUpperCase().trim()
  440 + }
  441 + },
  442 + destinationstation: {
  443 + get: function () {
  444 + return this.arriveModel.destinationstation
  445 + },
  446 + set: function (val) {
  447 + this.arriveModel.destinationstation = val.toUpperCase().trim()
  448 + }
  449 + }
  450 + },
  451 + methods: {
  452 + getList() {
  453 + this.listLoading = true
  454 + if (this.arriveQuery.awba !== undefined) {
  455 + getMt3201ListForParam(this.arriveQuery).then(res => {
  456 + this.arriveData = res.data.dataList
  457 + this.total = res.data.count
  458 + if (res.data.count > 0) {
  459 + this.arriveQuery.carrier = this.arriveData[0].carrier
  460 + this.arriveQuery.flightno = this.arriveData[0].flightno
  461 + this.arriveQuery.flightdate = this.arriveData[0].flightdate
  462 + this.arriveQuery.originstation = this.arriveData[0].originstation
  463 + this.arriveQuery.destinationstation = this.arriveData[0].destinationstation
  464 + this.arriveQuery.customcode = this.arriveData[0].customcode
  465 + }
  466 + setTimeout(() => {
  467 + this.listLoading = false
  468 + }, 1.5 * 1000)
  469 + })
  470 + } else {
  471 + getMt3201ListForParam(this.arriveQuery).then(res => {
  472 + this.arriveData = res.data.dataList
  473 + this.total = res.data.count
  474 + setTimeout(() => {
  475 + this.listLoading = false
  476 + }, 1.5 * 1000)
  477 + })
  478 + }
  479 +
  480 + },
  481 + handleSerach() {
  482 + this.arriveQuery.carrier = undefined
  483 + this.arriveQuery.flightno = undefined
  484 + this.arriveQuery.originstation = undefined
  485 + this.arriveQuery.flightdate = undefined
  486 + this.arriveQuery.destinationstation = undefined
  487 + this.getList()
  488 + },
  489 + handleSelectionChange(val) {
  490 + this.multipleSelection = val
  491 + },
  492 + // 新增出港运抵
  493 + handelAddArriveInfo() {
  494 + this.restModel()
  495 + // 给model赋值,所使用数据是以单独单号查询数据所得
  496 + this.arriveModel.carrier = this.arriveQuery.carrier
  497 + this.arriveModel.flightdate = this.arriveQuery.flightdate
  498 + this.arriveModel.flightno = this.arriveQuery.flightno
  499 + this.arriveModel.originstation = this.arriveQuery.originstation
  500 + this.arriveModel.destinationstation = this.arriveQuery.destinationstation
  501 + this.arriveModel.customcode = this.arriveQuery.customcode
  502 + this.dialogStatus = 'create'
  503 + this.dialogFormVisible = true
  504 + this.$nextTick(() => {
  505 + this.$refs.arriveFormData.clearValidate()
  506 + })
  507 + },
  508 + createData() {
  509 + this.$refs.arriveFormData.validate(valid => {
  510 + if (valid) {
  511 + addMt3201(this.arriveModel).then(res => {
  512 + if (res.data.count > 0) {
  513 + this.dialogFormVisible = false
  514 + Message.success("出港运抵新增成功")
  515 + this.getList()
  516 + } else {
  517 + Message.error("数据更新失败,请检查数据")
  518 + }
  519 + })
  520 + }
  521 + })
  522 +
  523 + },
  524 +
  525 + // 重置实体
  526 + restModel() {
  527 + this.arriveModel = {
  528 + carrier: undefined,
  529 + flightno: undefined,
  530 + flightdate: undefined,
  531 + originstation: undefined,
  532 + destinationstation: undefined,
  533 + awba: undefined,
  534 + awbh: undefined,
  535 + piece: undefined,
  536 + weight: undefined,
  537 + goodsname: undefined,
  538 + customcode: undefined,
  539 + arrivetime: undefined,
  540 + }
  541 + },
  542 + // 编辑
  543 + handleEdit(row) {
  544 + this.arriveModel = Object.assign({}, row) // copy obj
  545 + this.dialogStatus = 'update'
  546 + this.dialogFormVisible = true
  547 + this.$nextTick(() => {
  548 + this.$refs.arriveFormData.clearValidate()
  549 + })
  550 + },
  551 + updateData() {
  552 + this.$refs.arriveFormData.validate(valid => {
  553 + if (valid) {
  554 + updateMT3201(this.arriveModel).then(res => {
  555 + if (res.data.count > 0) {
  556 + this.dialogFormVisible = false
  557 + Message.success("出港运抵修改成功")
  558 + this.getList()
  559 + } else {
  560 + Message.error("数据更新失败,请检查数据")
  561 + }
  562 + })
  563 + }
  564 +
  565 + })
  566 + },
  567 + //保存并发送
  568 + SaveAndSend() {
  569 +
  570 + },
  571 + // 收发明细
  572 + handleSend(row) {
  573 + const resQuery = {
  574 + carrier: row.carrier,
  575 + flightNo: row.flightno,
  576 + flightDate: row.flightdate,
  577 + awba: row.awba,
  578 + awbh: row.awbh,
  579 + messageType: 'MT3201'
  580 + }
  581 + this.dialogTableVisible = true
  582 + getResponseForParam(resQuery).then(res => {
  583 + this.detailData = res.data
  584 + })
  585 + },
  586 + // 发送舱单报
  587 + handleAwbSend() {
  588 +
  589 + },
  590 + // 发送修改报
  591 + handleAwbEdit() {
  592 +
  593 + },
  594 + //发送删除报
  595 + handleAwbDelete(row) {
  596 + this.$confirm("是否删除", "确认消息", {
  597 + distinguishCancelAndClose: true,
  598 + confirmButtonText: '删除',
  599 + cancelButtonText: '取消'
  600 + }).then(() => {
  601 + deleteByIsDelete(row).then(res => {
  602 + if (res.data.count > 0) {
  603 + this.$message({
  604 + type: 'success',
  605 + message: '删除成功'
  606 + })
  607 + this.getList()
  608 + } else {
  609 + this.$message({
  610 + type: 'danger',
  611 + message: '删除异常,请稍后重试'
  612 + })
  613 + }
  614 + })
  615 + }).catch(action => {
  616 + this.$message({
  617 + type: 'info',
  618 + message: action === 'cancel'
  619 + ? '取消删除'
  620 + : '删除取消'
  621 + })
  622 + })
  623 + },
  624 + //更改状态
  625 + handleAwbStatus(row) {
  626 + this.$confirm("是否发送更改状态", "确认消息", {
  627 + distinguishCancelAndClose: true,
  628 + confirmButtonText: '确认更改',
  629 + cancelButtonText: '取消更改'
  630 + }).then(() => {
  631 + updateStatus(row).then(res => {
  632 + if (res.data.count > 0) {
  633 + this.$message({
  634 + type: 'success',
  635 + message: '当前运单状态已更改'
  636 + })
  637 + this.getList()
  638 + } else {
  639 + this.$message({
  640 + type: 'error',
  641 + message: '状态更改失败,请稍后重试'
  642 + })
  643 + }
  644 + })
  645 +
  646 + }).catch(action => {
  647 + this.$message({
  648 + type: 'info',
  649 + message: action === 'cancel'
  650 + ? '取消状态更改'
  651 + : '状态更改取消'
  652 + })
  653 + })
  654 + },
  655 + // 携数据跳转 新增运抵
  656 + handleAddArrive() {
  657 + const row = {
  658 + 'messageType': 'MT3201'
  659 + }
  660 + this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
  661 + },
  662 + handelBackStep() {
  663 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
  664 + }
  665 +
  666 + }
  667 + }
  668 +
  669 +</script>
  670 +
  671 +<style>
  672 + .grid-content {
  673 + height: 36px;
  674 + line-height: 36px;
  675 + }
  676 +
  677 + .content {
  678 + border-left: 4px #409EFF solid;
  679 + padding-left: 10px;
  680 + background-color: #f9fafc;
  681 + margin-bottom: 2px
  682 + }
  683 +
  684 + .row-bg, .co {
  685 + background-color: white;
  686 + }
  687 +
  688 + .titleSpan {
  689 + font-weight: bold;
  690 + margin-right: 35px;
  691 + }
  692 +
  693 + .el-row {
  694 + margin-top: 10px;
  695 + margin-bottom: 0px;
  696 + }
  697 +
  698 + .btnFoot {
  699 + margin-top: 10px;
  700 + }
  701 +
  702 + .el-table td, .el-table th {
  703 + text-align: center
  704 + }
  705 +
  706 + .el-btn {
  707 + margin-left: 10px;
  708 + display: inline-block;
  709 + }
  710 +</style>
  711 +
  1 +<template>
  2 + <div class="app-content">
  3 + <!--<div class="app-container">-->
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
  6 + placeholder="航班号"/>
  7 + <el-date-picker v-model="listQuery.flightDate" clearable type="date" style="width: 270px;"
  8 + placeholder="航班日期"
  9 + class="filter-item" value-format="yyyy-MM-dd"></el-date-picker>
  10 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
  11 + </div>
  12 + <el-table :data="flightData" stripe style="font-size: 14px" border>
  13 + <el-table-column label="航班号" width="280px" align="center">
  14 + <template slot-scope="scope">
  15 + <span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
  16 + </template>
  17 + </el-table-column>
  18 + <el-table-column label="航班日期" width="280px" align="center">
  19 + <template slot-scope="scope">
  20 + <i class="el-icon-time"></i>
  21 + <span>{{ scope.row.flightDate }}</span>
  22 + </template>
  23 + </el-table-column>
  24 + <el-table-column label="始发站" width="280px" align="center">
  25 + <template slot-scope="scope">
  26 + <span>{{ scope.row.originstation }}</span>
  27 + </template>
  28 + </el-table-column>
  29 + <el-table-column label="目的站" width="280px" align="center">
  30 + <template slot-scope="scope">
  31 + <span>{{ scope.row.destinationstation }}</span>
  32 + </template>
  33 + </el-table-column>
  34 + <el-table-column label="操作" align="center">
  35 + <template slot-scope="scope">
  36 + <el-button type="primary" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button>
  37 + <el-button type="primary" size="mini" @click="handleTidy(scope.row)">出港理货</el-button>
  38 + <el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
  39 + <el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
  40 + </template>
  41 + </el-table-column>
  42 + </el-table>
  43 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  44 + @pagination="getList"/>
  45 + </div>
  46 +
  47 +</template>
  48 +<script>
  49 + import Pagination from '@/components/Pagination'
  50 + import {getFlightListForParam} from '@/api/exitFlight'
  51 + export default {
  52 + name: "ExitFlight",
  53 + components: {Pagination},
  54 + inject: ['reload'],
  55 + data() {
  56 + return {
  57 + total: 1,
  58 + listQuery: {
  59 + pageSize: 1,
  60 + limitSize: 10,
  61 + flightNo: undefined,
  62 + flightDate: undefined
  63 + },
  64 + flightData: [],
  65 + }
  66 + },
  67 + created(){
  68 + this.getList()
  69 + },
  70 + methods: {
  71 + getList() {
  72 + getFlightListForParam(this.listQuery).then(res =>{
  73 + this.flightData = res.data.dataList
  74 + this.total = res.data.count
  75 + })
  76 + },
  77 + handleSearch() {
  78 + this.getList()
  79 + },
  80 + handleLoading(row) {
  81 + row.messageType = 'MT4201'
  82 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  83 + },
  84 + handleTidy(row) {
  85 + row.messageType = 'MT5201'
  86 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  87 + },
  88 + handleArrive(row) {
  89 + row.messageType = 'MT3201'
  90 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  91 + },
  92 + handlePre(row) {
  93 + row.messageType = 'MT2201'
  94 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  95 + }
  96 + }
  97 + }
  98 +
  99 +</script>
  100 +<style scoped>
  101 + .app-content{
  102 + margin-top: 20px;
  103 + }
  104 +</style>
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <el-row>
  5 + <el-col :span="24">
  6 + <div class="grid-content"><p>请输入航班信息:</p></div>
  7 + </el-col>
  8 + </el-row>
  9 + <el-row>
  10 + <el-col :span="24">
  11 + <div class="grid-content"><h1>Please Enter The Flight Information:</h1></div>
  12 + </el-col>
  13 + </el-row>
  14 + <el-row type="flex" class="row-bg" justify="center">
  15 + <el-col :span="4">
  16 + <el-input placeholder="必填" v-model="flightno">
  17 + <template slot="prepend">航班号</template>
  18 + </el-input>
  19 + </el-col>
  20 + <el-col :span="4">
  21 + <el-date-picker
  22 + v-model="flight.flightdate"
  23 + type="date"
  24 + value-format="yyyy-MM-dd"
  25 + placeholder="选择日期">
  26 + </el-date-picker>
  27 + </el-col>
  28 + <el-col :span="4">
  29 + <el-input placeholder="必填" v-model="originstation">
  30 + <template slot="prepend">始发站</template>
  31 + </el-input>
  32 + </el-col>
  33 + <el-col :span="4" style="margin-left: 20px">
  34 + <el-input placeholder="必填" v-model="destinationstation">
  35 + <template slot="prepend">目的站</template>
  36 + </el-input>
  37 + </el-col>
  38 + <el-col :span="4" style="margin-left: 20px">
  39 + <el-input placeholder="可为空" v-model="awba">
  40 + <template slot="prepend">主单号</template>
  41 + </el-input>
  42 + </el-col>
  43 + </el-row>
  44 + <el-row>
  45 + <el-col :span="4" :offset="10">
  46 + <div class="grid-content">
  47 + <el-button type="primary" @click="nstep">下一步</el-button>
  48 + </div>
  49 + </el-col>
  50 + </el-row>
  51 + </el-main>
  52 + </el-container>
  53 +</template>
  54 +
  55 +
  56 +<script>
  57 + import {Message} from "element-ui";
  58 +
  59 + export default {
  60 + name: 'ExitFlightDesc',
  61 + data() {
  62 + return {
  63 + flight: {
  64 + flightno: undefined,
  65 + flightdate: undefined,
  66 + originstation: undefined,
  67 + destinationstation: undefined,
  68 + awba: undefined,
  69 + messageType:undefined
  70 + },
  71 + btnStatus: true
  72 + };
  73 + },
  74 + created() {
  75 + if (this.$route.params.scopeRow !== undefined) {
  76 + if(this.$route.params.scopeRow.carrier === undefined){
  77 + this.flight.flightno = this.$route.params.scopeRow.flightno
  78 + } else {
  79 + this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno
  80 + }
  81 + this.flight.flightdate = this.$route.params.scopeRow.flightdate
  82 + this.flight.originstation = this.$route.params.scopeRow.originstation
  83 + this.flight.destinationstation = this.$route.params.scopeRow.destinationstation
  84 + this.flight.messageType = this.$route.params.scopeRow.messageType
  85 + if(this.$route.params.scopeRow.awba !== undefined){
  86 + this.flight.awba = this.$route.params.scopeRow.awba.replace('-','')
  87 + }
  88 +
  89 + }
  90 + },
  91 + computed:{
  92 + flightno : {
  93 + get: function () {
  94 + return this.flight.flightno
  95 + },
  96 + set: function(val){
  97 + this.flight.flightno = val.toUpperCase().trim()
  98 + }
  99 + },
  100 + originstation :{
  101 + get: function () {
  102 + return this.flight.originstation
  103 + },
  104 + set: function(val){
  105 + this.flight.originstation = val.toUpperCase().trim()
  106 + }
  107 + },
  108 + destinationstation :{
  109 + get: function () {
  110 + return this.flight.destinationstation
  111 + },
  112 + set: function(val){
  113 + this.flight.destinationstation = val.toUpperCase().trim()
  114 + }
  115 + },
  116 + awba :{
  117 + get: function () {
  118 + return this.flight.awba
  119 + },
  120 + set: function(val){
  121 + this.flight.awba = val.trim()
  122 + }
  123 + }
  124 + },
  125 + methods: {
  126 + nstep() {
  127 + if (this.flight.flightno !== undefined && this.flight.flightno !==''&&
  128 + this.flight.flightdate !== undefined &&this.flight.flightdate !== '' &&
  129 + this.flight.destinationstation !== undefined && this.flight.destinationstation !==''&&
  130 + this.flight.originstation !== undefined && this.flight.originstation !=='') {
  131 + if(this.flight.awba !== '' && this.flight.awba !== undefined){
  132 + const manifest = this.flight.awba;
  133 + const reg = /^[0-9]{11}$/
  134 + if(!reg.test(manifest)){
  135 + Message.error("主单号只支持数字并且最多11位")
  136 + return
  137 + }
  138 + const num = (manifest.substring(3,10)) % 7
  139 + if(num !== eval(manifest.substring(10))){
  140 + Message.error("主单号不符合模7校验")
  141 + return
  142 + }
  143 + } else {
  144 + this.flight.awba = undefined
  145 + }
  146 +
  147 + if(this.flight.messageType ==="MT5201"){
  148 + this.$router.push({name: '出港理货', params: {flightData: this.flight}});
  149 + }
  150 + if(this.flight.messageType ==="MT4201"){
  151 + this.$router.push({name: '出港装载', params: {flightData: this.flight}});
  152 + }
  153 + if(this.flight.messageType ==="MT3201"){
  154 + this.$router.push({name:'出港运抵',params:{flightData: this.flight}})
  155 + }
  156 + if(this.flight.messageType ==="MT2201"){
  157 + this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}})
  158 + }
  159 + } else {
  160 + Message.warning("请将航班信息填写完整")
  161 + }
  162 +
  163 + }
  164 + }
  165 + };
  166 +</script>
  167 +<style scoped>
  168 + .el-container {
  169 + text-align: center
  170 + }
  171 +
  172 + .el-main {
  173 + margin: 0 auto;
  174 + height: 400px;
  175 + }
  176 +
  177 + p {
  178 + font-size: 25px;
  179 + font-weight: bold;
  180 + }
  181 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div>
  4 + <div>
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span class="titleSpan">航班号:{{this.loadingQuery.carrier}}{{this.loadingQuery.flightno}}</span>
  17 + <span class="titleSpan">航班日期:{{this.loadingQuery.flightdate}}</span>
  18 + <span class="titleSpan">航段:{{this.loadingQuery.originstation}}-{{this.loadingQuery.destinationstation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">进港舱单查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="4">
  34 + <div class="grid-content">
  35 + <el-input v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input>
  36 + </div>
  37 + </el-col>
  38 + <div class="el-btn">
  39 + <el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
  40 + <el-button v-if="loadingModel.flightno === undefined && loadingData.length <1"
  41 + type="primary" size="mini" @click="handleAddLoading">新增装载
  42 + </el-button>
  43 + </div>
  44 + </div>
  45 + </el-col>
  46 + </div>
  47 + </el-col>
  48 + <el-col :span="24">
  49 + <div class="grid-content content" style="margin-top: 6px">出港装载明细</div>
  50 + </el-col>
  51 + </el-row>
  52 + <tree-table v-loading="listLoading" :data="loadingData" :eval-func="func" :expand-all="true" stripe
  53 + style="font-size: 12px" border @selection-change="handleSelectionChange">
  54 + <el-table-column label="运单号" width="160" align="center">
  55 + <template slot-scope="scope">
  56 + <span>{{scope.row.awba}}</span>
  57 + </template>
  58 + </el-table-column>
  59 + <el-table-column label="运载件数" width="70" align="center">
  60 + <template slot-scope="scope">
  61 + <span>{{scope.row.lodingpiece}}</span>
  62 + </template>
  63 + </el-table-column>
  64 + <el-table-column label="运载重量" width="70" align="center">
  65 + <template slot-scope="scope">
  66 + <span>{{scope.row.lodingweight}}</span>
  67 + </template>
  68 + </el-table-column>
  69 + <el-table-column label="货物描述" width="120" align="center">
  70 + <template slot-scope="scope">
  71 + <span>{{scope.row.goodsname}}</span>
  72 + </template>
  73 + </el-table-column>
  74 + <el-table-column label="装载时间" width="150" align="center">
  75 + <template slot-scope="scope">
  76 + <span>{{scope.row.loadingtime}}</span>
  77 + </template>
  78 + </el-table-column>
  79 + <el-table-column label="状态" width="100" align="center">
  80 + <template slot-scope="scope">
  81 + <span v-if="scope.row.status ==='01'">未发送</span>
  82 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  83 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  84 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  85 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  86 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  87 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  88 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  89 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  90 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  91 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  92 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  93 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  94 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  95 + </template>
  96 + </el-table-column>
  97 + <el-table-column prop="receipt" label="回执信息" width="180" align="center">
  98 + <template slot-scope="scope">
  99 + <span>{{scope.row.ext5}}</span>
  100 + </template>
  101 + </el-table-column>
  102 + <el-table-column prop="operation" label="操作" align="center">
  103 + <template slot-scope="scope">
  104 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  105 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑主单
  106 + </el-button>
  107 + <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
  108 + :disabled="scope.row.status !=='00'">发送舱单报
  109 + </el-button>
  110 + <el-button size="mini" type="danger" @click="handleAwbDelete(scope.row)">发删除报</el-button>
  111 + <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
  112 + :disabled="scope.row.status ==='00'">更改状态
  113 + </el-button>
  114 + </template>
  115 + </el-table-column>
  116 + </tree-table>
  117 + <div class="btnFoot">
  118 + <el-row>
  119 + <el-button type="primary" size="mini"
  120 + v-if="loadingModel.flightno !== undefined || loadingData.length >0"
  121 + @click="handelAddLoadingInfo">新增出港装载
  122 + </el-button>
  123 + <el-button type="primary" size="mini" v-if="loadingModel.flightno !== undefined || loadingData.length>0"
  124 + @click="handelBackStep">返回</el-button>
  125 + </el-row>
  126 + </div>
  127 + <pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
  128 + @pagination="getList"/>
  129 +
  130 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
  131 + <el-form ref="loadingFormData" :model="loadingModel" :rules="loadingRoles" label-position="right"
  132 + label-width="90px">
  133 + <div class="grid-content content">
  134 + <span>航班信息</span>
  135 + </div>
  136 + <el-row>
  137 + <el-col :span="7.5">
  138 + <el-form-item label="主单号" prop="awba">
  139 + <el-input v-model="loadingModel.awba"></el-input>
  140 + </el-form-item>
  141 + </el-col>
  142 + <el-col :span="7.5">
  143 + <el-form-item label="承运人" prop="carrier">
  144 + <el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>
  145 + </el-form-item>
  146 + </el-col>
  147 + <el-col :span="7.5">
  148 + <el-form-item label="航班号" prop="flightno">
  149 + <el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input>
  150 + </el-form-item>
  151 + </el-col>
  152 +
  153 + </el-row>
  154 + <el-row>
  155 +
  156 + <el-col :span="7.5">
  157 + <el-form-item label="起始站" prop="originstation">
  158 + <el-input v-model="originstation"
  159 + :disabled="dialogStatus ==='update'"></el-input>
  160 + </el-form-item>
  161 + </el-col>
  162 + <el-col :span="7.5">
  163 + <el-form-item label="目的站" prop="flightno">
  164 + <el-input v-model="destinationstation" :disabled="dialogStatus ==='update'"></el-input>
  165 + </el-form-item>
  166 + </el-col>
  167 + <el-col :span="7.5">
  168 + <el-form-item label="航班日期" prop="flightdate">
  169 + <el-date-picker v-model="loadingModel.flightdate" value-format="yyyy-MM-dd" type="date"
  170 + placeholder="请输入" :disabled="dialogStatus ==='update'"></el-date-picker>
  171 + </el-form-item>
  172 + </el-col>
  173 + </el-row>
  174 + <div class="grid-content content">
  175 + <span>货物信息</span>
  176 + </div>
  177 + <el-row>
  178 + <el-col :span="7.5">
  179 + <el-form-item label="装载件数" prop="piece">
  180 + <el-input v-model.number="loadingModel.lodingpiece"></el-input>
  181 + </el-form-item>
  182 + </el-col>
  183 + <el-col :span="7.5">
  184 + <el-form-item label="装载重量" prop="weight">
  185 + <el-input v-model.number="loadingModel.lodingweight"></el-input>
  186 + </el-form-item>
  187 + </el-col>
  188 + <el-col :span="7.5">
  189 + <el-form-item label="装载时间" prop="loadingtime">
  190 + <el-date-picker v-model="loadingModel.loadingtime" value-format="yyyy-MM-dd HH:mm:ss"
  191 + type="datetime"
  192 + placeholder="请输入"></el-date-picker>
  193 + </el-form-item>
  194 + </el-col>
  195 + </el-row>
  196 + <el-row>
  197 + <el-col :span="7.5">
  198 + <el-form-item label="运单件数" prop="price">
  199 + <el-input v-model.number="loadingModel.awbprice"></el-input>
  200 + </el-form-item>
  201 + </el-col>
  202 + <el-col :span="7.5">
  203 + <el-form-item label="运单重量" prop="weight">
  204 + <el-input v-model.number="loadingModel.awbweight"></el-input>
  205 + </el-form-item>
  206 + </el-col>
  207 + <el-col :span="7.5">
  208 + <el-form-item label="海关关区" prop="customcode">
  209 + <el-select v-model="loadingModel.customcode">
  210 + <el-option v-for="item in customcodeList " :key="item" :label="item"
  211 + :value="item"></el-option>
  212 + </el-select>
  213 + </el-form-item>
  214 +
  215 + </el-col>
  216 + </el-row>
  217 + <el-row>
  218 + <el-col :span="7.5">
  219 + <el-form-item label="特货代码" prop="awbh">
  220 + <el-input v-model="loadingModel.specialgoods"></el-input>
  221 + </el-form-item>
  222 + </el-col>
  223 + <el-col :span="7.5">
  224 + <el-form-item label="货物描述" prop="goodsname">
  225 + <el-input v-model="goodsname" placeholder="请输入"></el-input>
  226 + </el-form-item>
  227 + </el-col>
  228 + </el-row>
  229 + </el-form>
  230 + <div slot="footer" class="dialog-footer">
  231 + <el-button @click="dialogFormVisible = false">取消</el-button>
  232 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  233 + <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
  234 + </div>
  235 + </el-dialog>
  236 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  237 + <el-table :data="detailData" border>
  238 + <el-table-column label="操作时间" width="150">
  239 + <template slot-scope="scope">
  240 + {{scope.row.busdate}}
  241 + </template>
  242 + </el-table-column>
  243 + <el-table-column label="航班号" width="80">
  244 + <template slot-scope="scope">
  245 + {{scope.row.carrier}}{{scope.row.flightno}}
  246 + </template>
  247 + </el-table-column>
  248 + <el-table-column label="航班日期" width="100">
  249 + <template slot-scope="scope">
  250 + {{scope.row.flightdate}}
  251 + </template>
  252 + </el-table-column>
  253 + <el-table-column label="件数" width="70">
  254 + <template slot-scope="scope">
  255 + {{scope.row.buspiece}}
  256 + </template>
  257 + </el-table-column>
  258 + <el-table-column label="重量" width="70">
  259 + <template slot-scope="scope">
  260 + {{scope.row.busweight}}
  261 + </template>
  262 + </el-table-column>
  263 + <el-table-column label="回执信息" width="">
  264 + <template slot-scope="scope">
  265 + {{scope.row.cusrestext}}
  266 + </template>
  267 + </el-table-column>
  268 + <el-table-column label="操作人" width="100">
  269 + <template slot-scope="scope">
  270 + {{scope.row.operusername}}
  271 + </template>
  272 + </el-table-column>
  273 + </el-table>
  274 + </el-dialog>
  275 + </div>
  276 + </div>
  277 +</template>
  278 +<script>
  279 + import treeTable from '@/components/TreeTable'
  280 + import treeToArray from '@/utils/customEval'
  281 + import Pagination from '@/components/Pagination'
  282 + import {getMt4201ListForParam, deleteByIsDelete, updateStatus, updateMT4201, addMt4201} from '@/api/exitLoading'
  283 + import {Message} from "element-ui";
  284 + import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey} from "@/utils/validate"
  285 + export default {
  286 + name: "ExitLoading",
  287 + components: {treeTable, Pagination},
  288 + inject: ['reload'],
  289 + data() {
  290 + const validatorAwb = (rule, value, callback) => {
  291 + if (!validAwb(value)) {
  292 + callback("请正确书写主单号")
  293 + }
  294 + callback()
  295 + }
  296 + const validatorAwbh = (rule, value, callback) => {
  297 + if (!validAlphabetsAndNum(value)) {
  298 + callback("只能输入字母和数字")
  299 + }
  300 + callback()
  301 + }
  302 + const validatorAlphabets = (rule, value, callback) => {
  303 + if (!validAlphabets(value)) {
  304 + callback("只能输入字母")
  305 + }
  306 + callback()
  307 + }
  308 + const validAlphabetsSpanceKey = (rule,value,callback) =>{
  309 + if(!validAlphabetsAndSpanceKey(value)){
  310 + callback("只能输入字母、数字、空格")
  311 + }
  312 + callback()
  313 + }
  314 + return {
  315 + func: treeToArray,
  316 + total: 1,
  317 + dialogMap: {
  318 + update: '编辑出港装载',
  319 + create: '添加出港装载',
  320 + },
  321 + customcodeList: [4604, 4620],
  322 + dialogStatus: undefined,
  323 + dialogTableVisible: false,
  324 + dialogFormVisible: false,
  325 + listLoading: false,
  326 + loadingQuery: {
  327 + pageSize: 1,
  328 + limitSize: 100,
  329 + awba: undefined,
  330 + carrier: undefined,
  331 + flightno: undefined,
  332 + flightdate: undefined,
  333 + originstation: undefined,
  334 + destinationstation: undefined,
  335 + customcode: undefined
  336 + },
  337 + loadingRoles: {
  338 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  339 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  340 + goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
  341 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  342 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  343 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  344 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  345 + piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  346 + weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  347 + customcode:[{required: true, trigger: 'change',message:'不能为空'}]
  348 + },
  349 + loadingData: [],
  350 + detailData: [],
  351 + loadingModel: {
  352 + carrier:undefined,
  353 + flightno: undefined,
  354 + flightdate: undefined,
  355 + originstation: undefined,
  356 + destinationstation: undefined,
  357 + awba: undefined,
  358 + lodingpiece: undefined,
  359 + lodingweight: undefined,
  360 + goodsname: undefined,
  361 + customcode: undefined,
  362 + specialgoods: undefined,
  363 + loadingtime: undefined,
  364 + messageType: 'MT4201',
  365 + awbprice: undefined,
  366 + awbweight: undefined
  367 + }
  368 + }
  369 + },
  370 + created() {
  371 + if (this.$route.params.flightData !== undefined) {
  372 + // 给查询条件赋值
  373 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  374 + this.loadingQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + '-' + this.$route.params.flightData.awba.substring(3)
  375 + }
  376 + this.loadingQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  377 + this.loadingQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  378 + this.loadingQuery.flightdate = this.$route.params.flightData.flightdate
  379 + this.loadingQuery.originstation = this.$route.params.flightData.originstation
  380 + this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation
  381 + this.getList()
  382 + }
  383 + },
  384 + computed: {
  385 + carrier: {
  386 + get: function () {
  387 + return this.loadingModel.carrier
  388 + },
  389 + set: function (val) {
  390 + this.loadingModel.carrier = val.toUpperCase().trim()
  391 + }
  392 + },
  393 + goodsname: {
  394 + get: function () {
  395 + return this.loadingModel.goodsname
  396 + },
  397 + set: function (val) {
  398 + this.loadingModel.goodsname = val.toUpperCase().trim()
  399 + }
  400 + },
  401 + flightno: {
  402 + get: function () {
  403 + return this.loadingModel.flightno
  404 + },
  405 + set: function (val) {
  406 + this.loadingModel.flightno = val.toUpperCase().trim()
  407 + }
  408 + },
  409 + originstation: {
  410 + get: function () {
  411 + return this.loadingModel.originstation
  412 + },
  413 + set: function (val) {
  414 + this.loadingModel.originstation = val.toUpperCase().trim()
  415 + }
  416 + },
  417 + destinationstation: {
  418 + get: function () {
  419 + return this.loadingModel.destinationstation
  420 + },
  421 + set: function (val) {
  422 + this.loadingModel.destinationstation = val.toUpperCase().trim()
  423 + }
  424 + }
  425 + },
  426 + methods: {
  427 + getList() {
  428 + this.listLoading = true
  429 + if (this.loadingQuery.awba !== undefined && this.loadingQuery.awba !== '') {
  430 + getMt4201ListForParam(this.loadingQuery).then(res => {
  431 + this.loadingData = res.data.dataList
  432 + this.total = res.data.count
  433 + if (res.data.count > 0) {
  434 + this.loadingQuery.carrier = this.loadingData[0].carrier
  435 + this.loadingQuery.flightno = this.loadingData[0].flightno
  436 + this.loadingQuery.flightdate = this.loadingData[0].flightdate
  437 + this.loadingQuery.originstation = this.loadingData[0].originstation
  438 + this.loadingQuery.destinationstation = this.loadingData[0].destinationstation
  439 + this.loadingQuery.customcode = this.loadingData[0].customcode
  440 + }
  441 + setTimeout(() => {
  442 + this.listLoading = false
  443 + }, 1.5 * 1000)
  444 + })
  445 + } else {
  446 + getMt4201ListForParam(this.loadingQuery).then(res => {
  447 + this.loadingData = res.data.dataList
  448 + this.total = res.data.count
  449 + setTimeout(() => {
  450 + this.listLoading = false
  451 + }, 1.5 * 1000)
  452 + })
  453 + }
  454 +
  455 + },
  456 + // 多选
  457 + handleSelectionChange() {
  458 +
  459 + },
  460 + // 查询
  461 + handleSearch() {
  462 + this.loadingQuery.carrier = undefined
  463 + this.loadingQuery.flightno = undefined
  464 + this.loadingQuery.originstation = undefined
  465 + this.loadingQuery.flightdate = undefined
  466 + this.loadingQuery.destinationstation = undefined
  467 + this.getList()
  468 + },
  469 + // 收发明细
  470 + handleSend() {
  471 + const resQuery = {
  472 + carrier: row.carrier,
  473 + flightNo: row.flightno,
  474 + flightDate: row.flightdate,
  475 + awba: row.awba,
  476 + awbh: row.awbh,
  477 + messageType: 'MT4201'
  478 + }
  479 + this.dialogTableVisible = true
  480 + getResponseForParam(resQuery).then(res => {
  481 + this.detailData = res.data
  482 + })
  483 + },
  484 + // 编辑 弹框
  485 + handleEdit(row) {
  486 + this.loadingModel = Object.assign({}, row)
  487 + console.log(this.loadingModel)
  488 + this.dialogStatus = 'update'
  489 + this.dialogFormVisible = true
  490 + this.$nextTick(() => {
  491 + this.$refs.loadingFormData.clearValidate()
  492 + })
  493 + },
  494 + // 更新数据
  495 + updateData() {
  496 + this.$refs.loadingFormData.validate(valid => {
  497 + if (valid) {
  498 + updateMT4201(this.loadingModel).then(res => {
  499 + if (res.data.count > 0) {
  500 + this.dialogFormVisible = false
  501 + Message.success("数据更新成功")
  502 + this.getList()
  503 + } else {
  504 + Message.error("数据更新失败,请检查数据")
  505 + }
  506 + })
  507 + }
  508 + })
  509 + },
  510 +
  511 + // 发送舱单报
  512 + handleSendAwb() {
  513 +
  514 + },
  515 + // 删除 发送删除报
  516 + handleAwbDelete(row) {
  517 + this.$confirm("是否删除", "确认消息", {
  518 + distinguishCancelAndClose: true,
  519 + confirmButtonText: '删除',
  520 + cancelButtonText: '取消'
  521 + }).then(() => {
  522 + deleteByIsDelete(row).then(res => {
  523 + if (res.data.count > 0) {
  524 + this.$message({
  525 + type: 'success',
  526 + message: '删除成功'
  527 + })
  528 + this.getList()
  529 + } else {
  530 + this.$message({
  531 + type: 'danger',
  532 + message: '删除异常,请稍后重试'
  533 + })
  534 + }
  535 + })
  536 + }).catch(action => {
  537 + this.$message({
  538 + type: 'info',
  539 + message: action === 'cancel'
  540 + ? '取消删除'
  541 + : '删除取消'
  542 + })
  543 + })
  544 + },
  545 + // 更改当前运单发送状态
  546 + handleAwbStatus(row) {
  547 + this.$confirm("是否发送更改状态", "确认消息", {
  548 + distinguishCancelAndClose: true,
  549 + confirmButtonText: '确认更改',
  550 + cancelButtonText: '取消更改'
  551 + }).then(() => {
  552 + updateStatus(row).then(res => {
  553 + if (res.data.count > 0) {
  554 + this.$message({
  555 + type: 'success',
  556 + message: '当前运单状态已更改'
  557 + })
  558 + this.getList()
  559 + } else {
  560 + this.$message({
  561 + type: 'error',
  562 + message: '状态更改失败,请稍后重试'
  563 + })
  564 + }
  565 + })
  566 +
  567 + }).catch(action => {
  568 + this.$message({
  569 + type: 'info',
  570 + message: action === 'cancel'
  571 + ? '取消状态更改'
  572 + : '状态更改取消'
  573 + })
  574 + })
  575 + },
  576 + // 保存并发送
  577 + handleSaveAndSend() {
  578 +
  579 + },
  580 + // 重置实体
  581 + restModel() {
  582 + this.loadingModel = {
  583 + carrier:undefined,
  584 + flightno: undefined,
  585 + flightdate: undefined,
  586 + originstation: undefined,
  587 + destinationstation: undefined,
  588 + awba: undefined,
  589 + lodingpiece: undefined,
  590 + lodingweight: undefined,
  591 + goodsname: undefined,
  592 + customcode: undefined,
  593 + specialgoods: undefined,
  594 + loadingtime: undefined,
  595 + messageType: 'MT4201',
  596 + awbprice: undefined,
  597 + awbweight: undefined
  598 + }
  599 + },
  600 + // 新增出港装载 弹框
  601 + handelAddLoadingInfo() {
  602 + this.restModel()
  603 + // 给model赋值,所使用数据是以单独单号查询数据所得
  604 + this.loadingModel.carrier = this.loadingQuery.carrier
  605 + this.loadingModel.flightdate = this.loadingQuery.flightdate
  606 + this.loadingModel.flightno = this.loadingQuery.flightno
  607 + this.loadingModel.originstation = this.loadingQuery.originstation
  608 + this.loadingModel.destinationstation = this.loadingQuery.destinationstation
  609 + this.loadingModel.customcode = this.loadingQuery.customcode
  610 + this.dialogStatus = 'create'
  611 + this.dialogFormVisible = true
  612 + this.$nextTick(() => {
  613 + this.$refs.loadingFormData.clearValidate()
  614 + })
  615 + },
  616 + // 新增出港装载 请求
  617 + createData() {
  618 + this.$refs.loadingFormData.validate(valid => {
  619 + if (valid) {
  620 + addMt4201(this.loadingModel).then(res => {
  621 + if (res.data.count > 0) {
  622 + this.dialogFormVisible = false
  623 + Message.success("新增出港装载成功")
  624 + this.getList()
  625 + } else {
  626 + Message.error("数据新增失败,请检查数据")
  627 + }
  628 + })
  629 + }
  630 + })
  631 + },
  632 + handleAddLoading() {
  633 + const row = {
  634 + 'messageType': 'MT4201'
  635 + }
  636 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  637 + },
  638 + handelBackStep() {
  639 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
  640 + }
  641 + }
  642 + }
  643 +
  644 +</script>
  645 +<style>
  646 + .grid-content {
  647 + height: 36px;
  648 + line-height: 36px;
  649 + }
  650 +
  651 + .content {
  652 + border-left: 4px #409EFF solid;
  653 + padding-left: 10px;
  654 + background-color: #f9fafc;
  655 + margin-bottom: 2px
  656 + }
  657 +
  658 + .row-bg, .co {
  659 + background-color: white;
  660 + }
  661 +
  662 + .titleSpan {
  663 + font-weight: bold;
  664 + margin-right: 35px;
  665 + }
  666 +
  667 + .el-row {
  668 + margin-top: 10px;
  669 + margin-bottom: 0px;
  670 + }
  671 +
  672 + .btnFoot {
  673 + margin-top: 10px;
  674 + }
  675 +
  676 + .el-table td, .el-table th {
  677 + text-align: center
  678 + }
  679 +
  680 + .el-btn {
  681 + margin-left: 10px;
  682 + display: inline-block;
  683 + }
  684 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div class="app-content">
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
  6 + <el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
  7 + <el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
  8 + <el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
  9 + value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
  10 + </div>
  11 + <div class="filter-container">
  12 + <el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
  13 + <el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  14 + </el-select>
  15 + <el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
  16 + <el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  17 + </el-select>
  18 + <el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
  19 + <el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  20 + </el-select>
  21 + <el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
  22 + <el-button class="filter-item" style="margin-left: 10px;" type="warning"
  23 + @click="handleUpdateStatus">批量修改状态</el-button>
  24 + </div>
  25 + <div class="midSpan">
  26 + <el-row>
  27 + <el-col :span="0.5">
  28 + <span style="color: red">注:</span>
  29 + </el-col>
  30 + <el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
  31 + <span>预配舱单</span>
  32 + </el-col>
  33 + <el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
  34 + <span>出港运抵</span>
  35 + </el-col>
  36 + <el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
  37 + <span>出港装载</span>
  38 + </el-col>
  39 + <el-col :span="1" style="background: #f5ffc0" align="center">
  40 + <span>出港理货</span>
  41 + </el-col>
  42 + </el-row>
  43 + </div>
  44 + <tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
  45 + style="font-size: 13px" border @selection-change="handleSelectionChange"
  46 + :row-class-name="tableRowClassName">
  47 + <el-table-column label="航班号" width="80px" align="center">
  48 + <template slot-scope="scope">
  49 + <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
  50 + </template>
  51 + </el-table-column>
  52 + <el-table-column label="航班日期" width="100px" align="center">
  53 + <template slot-scope="scope">
  54 + <span>{{ scope.row.flightdate }}</span>
  55 + </template>
  56 + </el-table-column>
  57 + <el-table-column label="航段" width="100px" align="center">
  58 + <template slot-scope="scope">
  59 + <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="主单号" width="120px" align="center" >
  63 + <template slot-scope="scope" >
  64 + <span>{{ scope.row.awba }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="分单号" width="150px" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{ scope.row.awbh }}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="件数" width="60px" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{ scope.row.piece }}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="重量" width="60px" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{ scope.row.weight }}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="关区" width="60px" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{ scope.row.customcode }}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="时间" width="150px" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{ scope.row.actime }}</span>
  90 + </template>
  91 + </el-table-column>
  92 + <el-table-column label="状态" width="90px" align="center">
  93 + <template slot-scope="scope">
  94 + <span v-if="scope.row.status ==='01'">未发送</span>
  95 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  96 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  97 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  98 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  99 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  100 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  101 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  102 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  103 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  104 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  105 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  106 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  107 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  108 + </template>
  109 + </el-table-column>
  110 + <el-table-column label="回执内容" align="center" show-overflow-tooltip>
  111 + <template slot-scope="scope">
  112 + <span>{{ scope.row.customText }}</span>
  113 + <!--<div>-->
  114 + <!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
  115 + <!--</div>-->
  116 + </template>
  117 + </el-table-column>
  118 + <el-table-column label="操作" width="180px" align="center">
  119 + <template slot-scope="scope">
  120 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
  121 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
  122 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
  123 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
  124 + <a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
  125 + </template>
  126 + </el-table-column>
  127 + </tree-table>
  128 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  129 + @pagination="getList"/>
  130 + </div>
  131 +</template>
  132 +<script>
  133 + import treeTable from '@/components/TreeTable'
  134 + import treeToArray from '@/utils/customEval'
  135 + import Pagination from '@/components/Pagination'
  136 + import {getManifests} from "@/api/exitManifest"
  137 +
  138 + import {getMt520XListForParam} from "@/api/exitTidy";
  139 + import {getMt3201ListForParam} from "@/api/exitArrive";
  140 + import {getMt4201ListForParam} from "@/api/exitLoading";
  141 +
  142 + export default {
  143 + name: "ExitManifest",
  144 + components: {treeTable, Pagination},
  145 + inject:['reload'],
  146 + data() {
  147 + return {
  148 + func: treeToArray,
  149 + total: 1,
  150 + listLoading: false,
  151 + listQuery: {
  152 + pageSize: 1,
  153 + limitSize: 100,
  154 + awba:undefined,
  155 + carrier: undefined,
  156 + flightno:undefined,
  157 + flightDate: new Date(),
  158 + messageType: undefined,
  159 + messageStatus: undefined,
  160 + customStatus: undefined,
  161 + },
  162 + manifestData: [],
  163 + messageTypeList: [
  164 + {label:'预配舱单',value:'MT2201'},
  165 + {label:'出港运抵',value:'MT3201'},
  166 + {label:'出港装载',value:'MT4201'},
  167 + {label:'出港理货',value:'MT5202'}
  168 + ],
  169 + messageStatusList: [
  170 + {label:'未发送',value:'01'},
  171 + {label:'已发舱单报',value:'02'},
  172 + {label:'舱单报退单',value:'05'},
  173 + {label:'舱单转人工',value:'06'},
  174 + {label:'舱单报申报成功',value:'07'},
  175 + {label:'已发舱单删除报',value:'08'},
  176 + {label:'舱单删除报退单',value:'09'},
  177 + {label:'舱单删除报转人工',value:'10'},
  178 + {label:'舱单删除成功',value:'11'},
  179 + {label:'已发舱单修改报',value:'12'},
  180 + {label:'舱单修改报退单',value:'13'},
  181 + {label:'舱单修改报转人工',value:'14'},
  182 + {label:'舱单修改报成功',value:'15'},
  183 + {label:'海关已存在',value:'16'},
  184 + ],
  185 + customStatusList: [
  186 + {label:'普通货物',value:'001'},
  187 + {label:'国际转运货物',value:'002'},
  188 + {label:'国内转关',value:'003'},
  189 + {label:'空箱',value:'004'},
  190 + {label:'快件',value:'006'},
  191 + ]
  192 + }
  193 + },
  194 + methods: {
  195 + getList() {
  196 + this.listLoading = true
  197 + getManifests(this.listQuery).then(res =>{
  198 + this.manifestData = res.data.dataList
  199 + this.total = res.data.count
  200 + setTimeout(() =>{
  201 + this.listLoading = false
  202 + },1500)
  203 + })
  204 + },
  205 + handleSelectionChange() {
  206 +
  207 + },
  208 + handleSearch(){
  209 + this.getList()
  210 + },
  211 + handleUpdateStatus(row){
  212 +
  213 + },
  214 + handleUpdate(row){
  215 + if(row.messageType === 'MT2201'){
  216 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  217 + }
  218 + if(row.messageType === 'MT3201'){
  219 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  220 + }
  221 + if(row.messageType === 'MT4201'){
  222 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  223 + }
  224 + if(row.messageType === 'MT5201'){
  225 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  226 + }
  227 + },
  228 + tableRowClassName({row,index}){
  229 + if(row.messageType === 'MT2201'){
  230 + return 'MT2201-row'
  231 + }
  232 + if(row.messageType === 'MT3201'){
  233 + return 'MT3201-row'
  234 + }
  235 + if(row.messageType === 'MT4201'){
  236 + return 'MT4201-row'
  237 + }
  238 + if(row.messageType === 'MT5202'){
  239 + return 'MT5202-row'
  240 + }
  241 + }
  242 + }
  243 + }
  244 +
  245 +</script>
  246 +<style>
  247 + .el-table .MT2201-row {
  248 + background: oldlace;
  249 + }
  250 +
  251 + .el-table .MT3201-row {
  252 + background: #f0f9eb;
  253 + }
  254 +
  255 + .el-table .MT4201-row {
  256 + background: #bce7fd;
  257 + }
  258 +
  259 + .el-table .MT5202-row {
  260 + background: #f5ffc0;
  261 + }
  262 + .app-content{
  263 + margin-top: 20px;
  264 + }
  265 + .midSpan{
  266 + margin-bottom: 10px;
  267 + }
  268 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div>
  4 + <div>
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span class="titleSpan">航班号:{{this.listQuery.carrier}}{{this.listQuery.flightNo}}</span>
  17 + <span class="titleSpan">航班日期:{{this.listQuery.flightDate}}</span>
  18 + <span class="titleSpan">航段:{{this.listQuery.originStation}}-{{this.listQuery.destinationStation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">预配舱单查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="4">
  34 + <div class="grid-content">
  35 + <el-input v-model="listQuery.awba" placeholder="请输入主单号"></el-input>
  36 + </div>
  37 + </el-col>
  38 + <div class="grid-content el-btn">
  39 + <el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
  40 + <el-button v-if="preModel.flightno === undefined && preData.length<1" type="primary"
  41 + size="mini"
  42 + @click="handleAddpre">新增预配舱单
  43 + </el-button>
  44 + </div>
  45 + </div>
  46 + </el-col>
  47 + </div>
  48 + </el-col>
  49 + <el-col :span="24">
  50 + <div class="grid-content content" style="margin-top: 6px">预配舱单明细</div>
  51 + </el-col>
  52 + </el-row>
  53 + </div>
  54 +
  55 + <tree-table :data="preData" stripe style="font-size: 12px" :eval-func="func" :expand-all="true" border
  56 + @selection-change="handleSelectionChange" v-loading="listLoading">
  57 + <el-table-column label="航班信息" width="90" align="center">
  58 + <template slot-scope="scope">
  59 + <p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>
  60 + <p class="tableInline">{{scope.row.flightdate}}</p>
  61 + <p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>
  62 + </template>
  63 + </el-table-column>
  64 + <el-table-column label="运单号" width="120" align="center">
  65 + <template slot-scope="scope">
  66 + <p class="tableInline">{{scope.row.awba}}</p>
  67 + <p class="tableInline" v-if="scope.row.awbh !==null">{{scope.row.awbh}}</p>
  68 + </template>
  69 + </el-table-column>
  70 + <el-table-column label="运单件数/重量" width="100" align="center">
  71 + <template slot-scope="scope">
  72 + {{scope.row.piece}}
  73 + </template>
  74 + </el-table-column>
  75 + <el-table-column label="预配件数/重量" width="100" align="center">
  76 + <template slot-scope="scope">
  77 + {{scope.row.weight}}
  78 + </template>
  79 + </el-table-column>
  80 + <el-table-column label="货物描述" width="120" align="center">
  81 + <template slot-scope="scope">
  82 + {{scope.row.goodsname}}
  83 + </template>
  84 + </el-table-column>
  85 + <el-table-column label="配载时间" width="140" align="center">
  86 + <template slot-scope="scope">
  87 + {{scope.row.actime}}
  88 + </template>
  89 + </el-table-column>
  90 + <el-table-column label="代理人代码" width="120" align="center">
  91 + <template slot-scope="scope">
  92 + {{scope.row.status}}
  93 + </template>
  94 + </el-table-column>
  95 + <el-table-column label="状态" width="100" align="center">
  96 + <template slot-scope="scope">
  97 + <span v-if="scope.row.status ==='01'">未发送</span>
  98 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  99 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  100 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  101 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  102 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  103 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  104 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  105 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  106 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  107 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  108 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  109 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  110 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  111 + </template>
  112 + </el-table-column>
  113 + <el-table-column prop="receipt" label="回执信息" align="center">
  114 + <template slot-scope="scope">
  115 + {{scope.row.ext5}}
  116 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  117 + </template>
  118 + </el-table-column>
  119 + <el-table-column label="操作" width="300">
  120 + <template slot-scope="scope">
  121 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
  122 + <el-button size="mini" type="success" v-if="scope.row.awbh ===null"
  123 + @click="handleAddAwbh(scope.row)">新增分单
  124 + </el-button>
  125 + <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
  126 + :disabled="scope.row.status !== '01'">发舱单报
  127 + </el-button>
  128 + <p></p>
  129 + <el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</el-button>
  130 +
  131 + <el-button size="mini" type="danger" @click="handleAwbDelete(scope.row)">发删除报</el-button>
  132 + <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
  133 + :disabled="scope.row.status === '01'">更改状态
  134 + </el-button>
  135 +
  136 +
  137 + </template>
  138 + </el-table-column>
  139 + </tree-table>
  140 + <div class="btnFoot">
  141 + <el-row>
  142 + <el-button type="primary" size="mini"
  143 + @click="handleAddpreInfo">新增预配舱单
  144 + </el-button>
  145 + <el-button type="primary" size="mini" @click="handelBackStep"
  146 + v-if="preModel.flightno !== undefined || preData.length >0">返回
  147 + </el-button>
  148 + </el-row>
  149 + </div>
  150 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  151 + @pagination="getList"/>
  152 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%">
  153 + <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
  154 + label-width="120px" class="el-dialog-div">
  155 + <div class="grid-content content">
  156 + 运单信息
  157 + </div>
  158 + <el-row>
  159 + <el-col :span="7.5">
  160 + <el-form-item label="主单号" prop="awba">
  161 + <el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
  162 + </el-form-item>
  163 + </el-col>
  164 + <el-col :span="7.5" v-if="dialogStatus === 'addAwbh'">
  165 + <el-form-item label="分单号">
  166 + <el-input v-model="awbh" clearable/>
  167 + </el-form-item>
  168 + </el-col>
  169 + </el-row>
  170 + <div class="grid-content content">
  171 + 航班信息
  172 + </div>
  173 + <el-row>
  174 + <el-col :span="7.5">
  175 + <el-form-item label="承运人" prop="carrier">
  176 + <el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/>
  177 + </el-form-item>
  178 + </el-col>
  179 + <el-col :span="7.5">
  180 + <el-form-item label="航班号" prop="flightno">
  181 + <el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/>
  182 + </el-form-item>
  183 + </el-col>
  184 + <el-col :span="7.5">
  185 + <el-form-item label="航班日期" prop="flightdate">
  186 + <el-date-picker :disabled="dialogStatus === 'addAwbh'"
  187 + value-format="yyyy-MM-dd"
  188 + v-model="preModel.flightdate" align="right"
  189 + type="date" placeholder="请输入航班日期" clearable/>
  190 + </el-form-item>
  191 + </el-col>
  192 +
  193 + </el-row>
  194 + <el-row>
  195 + <el-col :span="7.5">
  196 + <el-form-item label="起始站" prop="originstation">
  197 + <el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
  198 + </el-form-item>
  199 + </el-col>
  200 + <el-col :span="7.5">
  201 + <el-form-item label="目的站" prop="destinationstation">
  202 + <el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
  203 + </el-form-item>
  204 + </el-col>
  205 + </el-row>
  206 + <div class="grid-content content">
  207 + 货物信息
  208 + </div>
  209 +
  210 + <el-row>
  211 + <el-col :span="7.5">
  212 + <el-form-item label="运单件数" prop="piece">
  213 + <el-input v-model.number="preModel.awbinfo.pcs" clearable/>
  214 + </el-form-item>
  215 + </el-col>
  216 + <el-col :span="7.5">
  217 + <el-form-item label="运单重量" prop="weight">
  218 + <el-input v-model.number="preModel.awbinfo.weight" clearable/>
  219 + </el-form-item>
  220 + </el-col>
  221 + <el-col :span="7.5">
  222 + <el-form-item label="货物描述" prop="goodsname">
  223 + <el-input v-model="goodsname" clearable/>
  224 + </el-form-item>
  225 + </el-col>
  226 + </el-row>
  227 + <el-row>
  228 + <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
  229 + <el-form-item label="预配件数" prop="piece">
  230 + <el-input v-model.number="preModel.piece" clearable/>
  231 + </el-form-item>
  232 + </el-col>
  233 + <el-col :span="8" v-if="dialogStatus ==='addAwbh'">
  234 + <el-col :span="13">
  235 + <el-form-item label="预配件数" prop="piece">
  236 + <el-input v-model.number="preModel.piece" clearable/>
  237 + </el-form-item>
  238 + </el-col>
  239 + <el-col :span="8">
  240 + <span>剩余件数:{{awbPiece}}</span>
  241 + </el-col>
  242 + </el-col>
  243 + <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
  244 + <el-form-item label="预配重量" prop="weight">
  245 + <el-input v-model.number="preModel.weight" clearable/>
  246 + </el-form-item>
  247 + </el-col>
  248 + <el-col :span="8" v-if="dialogStatus ==='addAwbh'">
  249 + <el-col :span="13">
  250 + <el-form-item label="预配重量" prop="weight">
  251 + <el-input v-model.number="preModel.weight" clearable/>
  252 + </el-form-item>
  253 + </el-col>
  254 + <el-col :span="8">
  255 + <span>剩余重量:{{awbWeight}}</span>
  256 + </el-col>
  257 + </el-col>
  258 +
  259 + <el-col :span="7.5">
  260 + <el-form-item label="预配时间" prop="pretime">
  261 + <el-date-picker value-format="yyyy-MM-dd HH:mm:ss"
  262 + v-model="preModel.actime" align="right"
  263 + type="date" placeholder="请选择"/>
  264 + </el-form-item>
  265 + </el-col>
  266 + </el-row>
  267 + <el-row>
  268 + <el-col :span="7.5">
  269 + <el-form-item label="关区代码" prop="customcode">
  270 + <el-select v-model="preModel.customcode" class="filter-item" placeholder="请选择关区代码"
  271 + :disabled="dialogStatus === 'addAwbh'">
  272 + <el-option v-for="item in customcodeList" :key="item.value" :label="item.label"
  273 + :value="item.value"></el-option>
  274 + </el-select>
  275 + </el-form-item>
  276 + </el-col>
  277 + <el-col :span="7.5">
  278 + <el-form-item label="海关状态" prop="ex5">
  279 + <el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型">
  280 + <el-option v-for="item in customTypes" :key="item.value" :label="item.label"
  281 + :value="item.value"/>
  282 + </el-select>
  283 + </el-form-item>
  284 + </el-col>
  285 + <el-col :span="7.5">
  286 + <el-form-item label="付费方式" prop="awbinfo.collected">
  287 + <el-select v-model="preModel.awbinfo.collected" class="filter-item" placeholder="付费方式">
  288 + <el-option
  289 + v-for="item in payTypes"
  290 + :key="item.value"
  291 + :label="item.label"
  292 + :value="item.value"/>
  293 + </el-select>
  294 + </el-form-item>
  295 + </el-col>
  296 + </el-row>
  297 + <el-row>
  298 +
  299 + <el-col :span="7.5">
  300 + <el-form-item label="卸货地" prop="">
  301 + <el-input v-model="specopeid" clearable/>
  302 + </el-form-item>
  303 + </el-col>
  304 + <el-col :span="7.5">
  305 + <el-form-item label="代理人代码" prop="">
  306 + <el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
  307 + </el-form-item>
  308 + </el-col>
  309 + <el-col :span="7.5">
  310 + <el-form-item label="代理人名称" prop="">
  311 + <el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
  312 + </el-form-item>
  313 + </el-col>
  314 + </el-row>
  315 + <el-row>
  316 +
  317 + </el-row>
  318 + <div class="grid-content content">
  319 + 发货人信息
  320 + </div>
  321 + <el-row>
  322 + <el-col :span="7.5">
  323 + <el-form-item label="发货人名称" prop="awbinfo.shprname">
  324 + <el-input v-model="shprname" clearable/>
  325 + </el-form-item>
  326 + </el-col>
  327 + <el-col :span="7.5">
  328 + <el-form-item label="地址" prop="awbinfo.shpraddress">
  329 + <el-input v-model="shpraddress" clearable/>
  330 + </el-form-item>
  331 + </el-col>
  332 + <el-col :span="7.5">
  333 + <el-form-item label="城市代码">
  334 + <el-input v-model="preModel.awbinfo.shpcitycode" clearable/>
  335 + </el-form-item>
  336 + </el-col>
  337 + </el-row>
  338 + <el-row>
  339 + <el-col :span="7.5">
  340 + <el-form-item label="电话" prop="awbinfo.shprtel">
  341 + <el-input v-model="preModel.awbinfo.shprtel" clearable/>
  342 + </el-form-item>
  343 + </el-col>
  344 + <el-col :span="7.5">
  345 + <el-form-item label="传真">
  346 + <el-input v-model="preModel.awbinfo.shprmobiletype" clearable/>
  347 + </el-form-item>
  348 + </el-col>
  349 + <el-col :span="7.5">
  350 + <el-form-item label="发货人AEO编码" prop="awbinfo.shpaeocode">
  351 + <el-input v-model="shpaeocode" clearable/>
  352 + </el-form-item>
  353 + </el-col>
  354 + </el-row>
  355 + <el-row>
  356 + <el-col :span="7.5">
  357 + <el-form-item label="国家代码" prop="awbinfo.shprcountyr">
  358 + <el-select
  359 + :remote-method="remoteMethod"
  360 + :loading="listLoading"
  361 + v-model="shprcountyr"
  362 + filterable
  363 + remote
  364 + placeholder="请选择" clearable>
  365 + <el-option
  366 + v-for="item in countryOption"
  367 + :key="item.value"
  368 + :label="item.value"
  369 + :value="item.value">
  370 + <span style="float: left">{{ item.label }}</span>
  371 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  372 + </el-option>
  373 + </el-select>
  374 + </el-form-item>
  375 + </el-col>
  376 + <!--<el-col :span="7.5">-->
  377 + <!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
  378 + <!--<el-select-->
  379 + <!--v-model="shpcomidpre"-->
  380 + <!--filterable-->
  381 + <!--placeholder="请选择企业代码类型" style="width: 200px;">-->
  382 + <!--<el-option-->
  383 + <!--v-for="item in shpCompnyTypeOption"-->
  384 + <!--:key="item.value"-->
  385 + <!--:label="item.label"-->
  386 + <!--:value="item.value"/>-->
  387 + <!--</el-select>-->
  388 + <!--</el-form-item>-->
  389 + <!--</el-col>-->
  390 + <!--<el-col :span="7.5">-->
  391 + <!--<el-form-item prop="awbinfo.shpcomidpno" label-width="10px">-->
  392 + <!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
  393 + <!--</el-form-item>-->
  394 + <!--</el-col>-->
  395 + </el-row>
  396 + <div class="grid-content content">
  397 + 收货人信息
  398 + </div>
  399 + <el-row>
  400 + <el-col :span="7.5">
  401 + <el-form-item label="收货人名称" prop="awbinfo.cnsnname">
  402 + <el-input v-model="cnsnname" clearable/>
  403 + </el-form-item>
  404 + </el-col>
  405 + <el-col :span="7.5">
  406 + <el-form-item label="地址" prop="awbinfo.cnsnaddress">
  407 + <el-input v-model="cnsnaddress" clearable/>
  408 + </el-form-item>
  409 + </el-col>
  410 + <el-col :span="7.5">
  411 + <el-form-item label="城市代码">
  412 + <el-input v-model="preModel.awbinfo.cnscitycode" clearable/>
  413 + </el-form-item>
  414 + </el-col>
  415 + </el-row>
  416 + <el-row>
  417 + <el-col :span="7.5">
  418 + <el-form-item label="电话" prop="awbinfo.cnsntel">
  419 + <el-input v-model="preModel.awbinfo.cnsntel" clearable/>
  420 + </el-form-item>
  421 + </el-col>
  422 + <el-col :span="7.5">
  423 + <el-form-item label="传真">
  424 + <el-input v-model="preModel.awbinfo.cnsrmobiletype" clearable/>
  425 + </el-form-item>
  426 + </el-col>
  427 + <el-col :span="7.5">
  428 + <el-form-item label="收货人AEO编码" prop="awbinfo.cnsaeocode">
  429 + <el-input v-model="cnsaeocode" clearable/>
  430 + </el-form-item>
  431 + </el-col>
  432 + </el-row>
  433 + <el-row>
  434 + <el-col :span="7.5">
  435 + <el-form-item label="国家代码" prop="awbinfo.cnscountyr">
  436 + <el-select
  437 + :remote-method="remoteMethod"
  438 + :listLoading="listLoading"
  439 + v-model="cnscountyr"
  440 + filterable
  441 + remote
  442 + placeholder="请选择" clearable>
  443 + <el-option
  444 + v-for="item in countryOption"
  445 + :key="item.value"
  446 + :label="item.value"
  447 + :value="item.value">
  448 + <span style="float: left">{{ item.label }}</span>
  449 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  450 + </el-option>
  451 + </el-select>
  452 + </el-form-item>
  453 + </el-col>
  454 + <el-col :span="7.5">
  455 + <el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
  456 + <el-input v-model="cnsrctcname" clearable/>
  457 + </el-form-item>
  458 + </el-col>
  459 + <el-col :span="7.5">
  460 + <el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
  461 + <el-input v-model="preModel.awbinfo.cnsrctctel" clearable/>
  462 + </el-form-item>
  463 + </el-col>
  464 + <!--<el-col :span="7.5">-->
  465 + <!--<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">-->
  466 + <!--<el-select-->
  467 + <!--v-model="cnscomidpre"-->
  468 + <!--filterable-->
  469 + <!--placeholder="请选择企业代码类型" style="width: 200px;">-->
  470 + <!--<el-option-->
  471 + <!--v-for="item in shpCompnyTypeOption"-->
  472 + <!--:key="item.value"-->
  473 + <!--:label="item.label"-->
  474 + <!--:value="item.value"/>-->
  475 + <!--</el-select>-->
  476 + <!--</el-form-item>-->
  477 + <!--</el-col>-->
  478 + <!--<el-col :span="7.5">-->
  479 + <!--<el-form-item prop="awbinfo.cnscomidno" label-width="10px">-->
  480 + <!--<el-input v-model="cnscomidno" placeholder="企业代码"/>-->
  481 + <!--</el-form-item>-->
  482 + <!--</el-col>-->
  483 + </el-row>
  484 + </el-form>
  485 + <div slot="footer" class="dialog-footer">
  486 + <el-button @click="dialogFormVisible = false">取消</el-button>
  487 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  488 + <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
  489 + </div>
  490 + </el-dialog>
  491 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  492 + <el-table :data="detailData" border>
  493 + <el-table-column label="操作时间" width="150">
  494 + <template slot-scope="scope">
  495 + {{scope.row.busdate}}
  496 + </template>
  497 + </el-table-column>
  498 + <el-table-column label="航班号" width="80">
  499 + <template slot-scope="scope">
  500 + {{scope.row.carrier}}{{scope.row.flightno}}
  501 + </template>
  502 + </el-table-column>
  503 + <el-table-column label="航班日期" width="100">
  504 + <template slot-scope="scope">
  505 + {{scope.row.flightdate}}
  506 + </template>
  507 + </el-table-column>
  508 + <el-table-column label="件数" width="70">
  509 + <template slot-scope="scope">
  510 + {{scope.row.buspiece}}
  511 + </template>
  512 + </el-table-column>
  513 + <el-table-column label="重量" width="70">
  514 + <template slot-scope="scope">
  515 + {{scope.row.busweight}}
  516 + </template>
  517 + </el-table-column>
  518 + <el-table-column label="回执信息" width="">
  519 + <template slot-scope="scope">
  520 + {{scope.row.cusrestext}}
  521 + </template>
  522 + </el-table-column>
  523 + <el-table-column label="操作人" width="100">
  524 + <template slot-scope="scope">
  525 + {{scope.row.operusername}}
  526 + </template>
  527 + </el-table-column>
  528 + </el-table>
  529 + </el-dialog>
  530 + </div>
  531 +</template>
  532 +<script>
  533 + import treeTable from '@/components/TreeTable'
  534 + import treeToArray from '@/utils/customEval'
  535 + import Pagination from '@/components/Pagination'
  536 +
  537 + import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
  538 + import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre'
  539 + import {Message} from "element-ui";
  540 + import {getResponseForParam} from '@/api/responseDetail'
  541 + import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey} from "@/utils/validate"
  542 +
  543 + export default {
  544 + name: "ExitPre",
  545 + components: {treeTable, Pagination},
  546 + inject: ['reload'],
  547 + data() {
  548 + const validatorAwb = (rule, value, callback) => {
  549 + if (!validAwb(value)) {
  550 + callback("请正确书写主单号")
  551 + }
  552 + callback()
  553 + }
  554 + const validatorAwbh = (rule, value, callback) => {
  555 + if (!validAlphabetsAndNum(value)) {
  556 + callback("只能输入字母和数字")
  557 + }
  558 + callback()
  559 + }
  560 + const validatorAlphabets = (rule, value, callback) => {
  561 + if (!validAlphabets(value)) {
  562 + callback("只能输入字母")
  563 + }
  564 + callback()
  565 + }
  566 + const validAlphabetsSpanceKey = (rule, value, callback) => {
  567 + if (!validAlphabetsAndSpanceKey(value)) {
  568 + callback("只能输入字母、数字、空格")
  569 + }
  570 + callback()
  571 + }
  572 + return {
  573 + func: treeToArray,
  574 + total: 1,
  575 + listQuery: {
  576 + pageSize: 1,
  577 + limitSize: 100,
  578 + awba: undefined,
  579 + carrier: undefined,
  580 + flightNo: undefined,
  581 + flightDate: undefined,
  582 + originStation: undefined,
  583 + destinationStation: undefined
  584 + },
  585 + dialogMap: {
  586 + update: '编辑预配舱单',
  587 + create: '添加预配舱单',
  588 + addAwbh: '添加分单'
  589 + },
  590 + customTypes: [
  591 + {label: '普通货物', value: '001'},
  592 + {label: '国际转运货物', value: '002'},
  593 + {label: '国内转关', value: '003'},
  594 + {label: '空箱', value: '004'},
  595 + {label: '快件', value: '005'}],
  596 + payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
  597 + splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
  598 + customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}],
  599 + dialogStatus: undefined,
  600 + dialogTableVisible: false,
  601 + listLoading: false,
  602 + disabledStatus: false,
  603 + dialogFormVisible: false,
  604 + countryOption: [],
  605 + countryList: [],
  606 + countryResultList: [],
  607 + awbPiece: undefined,
  608 + awbWeight: undefined,
  609 + preRoles: {
  610 + weight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'change'}],
  611 + piece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'change'}],
  612 + destinationstation: [{required: true, message: '运单目的地必须输入', trigger: 'change'}],
  613 + originstation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}],
  614 + flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
  615 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  616 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  617 + pretime: [{required: true, trigger: 'blur', message: '预配时间不能为空'}],
  618 + customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
  619 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  620 + 'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
  621 + goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
  622 + ex5: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
  623 + 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
  624 + 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
  625 + 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
  626 + 'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
  627 + 'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  628 + 'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
  629 + 'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
  630 + 'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
  631 + 'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  632 + },
  633 + preModel: {
  634 + awba: undefined,
  635 + awbh: undefined,
  636 + customcode: undefined,
  637 + flightno: undefined,
  638 + carrier: undefined,
  639 + flightdate: undefined,
  640 + originstation: undefined,
  641 + destinationstation: undefined,
  642 + piece: undefined,
  643 + weight: undefined,
  644 + actime: undefined,
  645 + goodsname: undefined,
  646 + splitcode: undefined,
  647 + uldType: undefined,
  648 + uldNo: undefined,
  649 + status: undefined,
  650 + ex5: undefined,
  651 + awbinfo: {
  652 + pcs: undefined,
  653 + weight: undefined,
  654 + specopeid: undefined,
  655 + shprname: undefined,
  656 + shprmobiletype: undefined,
  657 + shprtel: undefined,
  658 + shpraddress: undefined,
  659 + shprcountyr: undefined,
  660 + shpcomidpre: undefined,
  661 + shpaeocode: undefined,
  662 + shpcomidpno: undefined,
  663 + shpcitycode: undefined,
  664 + shpcustomerid: undefined,
  665 + cnsnname: undefined,
  666 + cnsrmobiletype: undefined,
  667 + cnsntel: undefined,
  668 + cnsnaddress: undefined,
  669 + cnscountyr: undefined,
  670 + cnsrctcname: undefined,
  671 + cnsaeocode: undefined,
  672 + cnsrctctel: undefined,
  673 + cnscitycode: undefined,
  674 + cargonm: undefined,
  675 + sairportid: undefined,
  676 + dest1city: undefined,
  677 + by1: undefined,
  678 + dest1: undefined,
  679 + by2: undefined,
  680 + dest2: undefined,
  681 + by3: undefined,
  682 + dest3: undefined,
  683 + eairportid: undefined,
  684 + csgcustomerid: undefined,
  685 + collected: '0',
  686 + awbtype: undefined
  687 + }
  688 + },
  689 + preData: [],
  690 + detailData: []
  691 + }
  692 + },
  693 + mounted() {
  694 + // 延迟加载,否则会出错
  695 + setTimeout(() => {
  696 + this.countryResultList = this.countryList.map(item => {
  697 + return {value: item.countryCode, label: item.countryNameCn}
  698 + })
  699 + }, 1000)
  700 + },
  701 + created() {
  702 + if (this.$route.params.flightData !== undefined) {
  703 + this.listQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  704 + this.listQuery.flightNo = this.$route.params.flightData.flightno.substring(2)
  705 + this.listQuery.flightDate = this.$route.params.flightData.flightdate
  706 + this.listQuery.originStation = this.$route.params.flightData.originstation
  707 + this.listQuery.destinationStation = this.$route.params.flightData.destinationstation
  708 + this.listQuery.awba = this.$route.params.flightData.awba
  709 + this.getList()
  710 + }
  711 + this.getCountryList()
  712 + },
  713 + computed: {
  714 + awba: {
  715 + get: function () {
  716 + return this.preModel.awba
  717 + },
  718 + set: function (val) {
  719 + if (val.length == 3) {
  720 + val = val + "-"
  721 + }
  722 + this.preModel.awba = val.trim()
  723 + }
  724 + },
  725 + awbh: {
  726 + get: function () {
  727 + return this.preModel.awbh
  728 + },
  729 + set: function (val) {
  730 + this.preModel.awbh = val.toUpperCase().trim()
  731 + }
  732 + },
  733 + flightno: {
  734 + get: function () {
  735 + return this.preModel.flightno
  736 + },
  737 + set: function (val) {
  738 + this.preModel.flightno = val.toUpperCase().trim()
  739 + }
  740 + },
  741 + carrier: {
  742 + get: function () {
  743 + return this.preModel.carrier
  744 + },
  745 + set: function (val) {
  746 + this.preModel.carrier = val.toUpperCase().trim()
  747 + }
  748 + },
  749 + originstation: {
  750 + get: function () {
  751 + return this.preModel.originstation
  752 + },
  753 + set: function (val) {
  754 + this.preModel.originstation = val.toUpperCase().trim()
  755 + }
  756 + },
  757 + destinationstation: {
  758 + get: function () {
  759 + return this.preModel.destinationstation
  760 + },
  761 + set: function (val) {
  762 + this.preModel.destinationstation = val.toUpperCase().trim()
  763 + }
  764 + },
  765 +
  766 + goodsname: {
  767 + get: function () {
  768 + return this.preModel.goodsname
  769 + },
  770 + set: function (val) {
  771 + this.preModel.goodsname = val.toUpperCase().trim()
  772 + }
  773 + },
  774 + specopeid: {
  775 + get: function () {
  776 + return this.preModel.awbinfo.specopeid
  777 + },
  778 + set: function (val) {
  779 + this.preModel.awbinfo.specopeid = val.toUpperCase().trim()
  780 + }
  781 + },
  782 + shprname: {
  783 + get: function () {
  784 + return this.preModel.awbinfo.shprname
  785 + },
  786 + set: function (val) {
  787 + this.preModel.awbinfo.shprname = val.toUpperCase().trim()
  788 + }
  789 + },
  790 + shpraddress: {
  791 + get: function () {
  792 + return this.preModel.awbinfo.shpraddress
  793 + },
  794 + set: function (val) {
  795 + this.preModel.awbinfo.shpraddress = val.toUpperCase().trim()
  796 + }
  797 + },
  798 + shprcountyr: {
  799 + get: function () {
  800 + return this.preModel.awbinfo.shprcountyr
  801 + },
  802 + set: function (val) {
  803 + this.preModel.awbinfo.shprcountyr = val.toUpperCase().trim()
  804 + }
  805 + },
  806 + shpaeocode: {
  807 + get: function () {
  808 + return this.preModel.awbinfo.shpaeocode
  809 + },
  810 + set: function (val) {
  811 + this.preModel.awbinfo.shpaeocode = val.toUpperCase().trim()
  812 + }
  813 + },
  814 + cnsnname: {
  815 + get: function () {
  816 + return this.preModel.awbinfo.cnsnname
  817 + },
  818 + set: function (val) {
  819 + this.preModel.awbinfo.cnsnname = val.toUpperCase().trim()
  820 + }
  821 + },
  822 + cnsnaddress: {
  823 + get: function () {
  824 + return this.preModel.awbinfo.cnsnaddress
  825 + },
  826 + set: function (val) {
  827 + this.preModel.awbinfo.cnsnaddress = val.toUpperCase().trim()
  828 + }
  829 + },
  830 + cnscountyr: {
  831 + get: function () {
  832 + return this.preModel.awbinfo.cnscountyr
  833 + },
  834 + set: function (val) {
  835 + this.preModel.awbinfo.cnscountyr = val.toUpperCase().trim()
  836 + }
  837 + },
  838 + cnsrctcname: {
  839 + get: function () {
  840 + return this.preModel.awbinfo.cnsrctcname
  841 + },
  842 + set: function (val) {
  843 + this.preModel.awbinfo.cnsrctcname = val.toUpperCase().trim()
  844 + }
  845 + },
  846 + cnsaeocode: {
  847 + get: function () {
  848 + return this.preModel.awbinfo.cnsaeocode
  849 + },
  850 + set: function (val) {
  851 + this.preModel.awbinfo.cnsaeocode = val.toUpperCase().trim()
  852 + }
  853 + },
  854 + sairportid: {
  855 + get: function () {
  856 + return this.preModel.awbinfo.sairportid
  857 + },
  858 + set: function (val) {
  859 + this.preModel.awbinfo.sairportid = val.toUpperCase().trim()
  860 + }
  861 + },
  862 + by1: {
  863 + get: function () {
  864 + return this.preModel.awbinfo.by1
  865 + },
  866 + set: function (val) {
  867 + this.preModel.awbinfo.by1 = val.toUpperCase().trim()
  868 + }
  869 + },
  870 + dest1: {
  871 + get: function () {
  872 + return this.preModel.awbinfo.dest1
  873 + },
  874 + set: function (val) {
  875 + this.preModel.awbinfo.dest1 = val.toUpperCase().trim()
  876 + }
  877 + },
  878 + by2: {
  879 + get: function () {
  880 + return this.preModel.awbinfo.by2
  881 + },
  882 + set: function (val) {
  883 + this.preModel.awbinfo.by2 = val.toUpperCase().trim()
  884 + }
  885 + },
  886 + dest2: {
  887 + get: function () {
  888 + return this.preModel.awbinfo.dest2
  889 + },
  890 + set: function (val) {
  891 + this.preModel.awbinfo.dest2 = val.toUpperCase().trim()
  892 + }
  893 + },
  894 + by3: {
  895 + get: function () {
  896 + return this.preModel.awbinfo.by3
  897 + },
  898 + set: function (val) {
  899 + this.preModel.awbinfo.by3 = val.toUpperCase().trim()
  900 + }
  901 + },
  902 + dest3: {
  903 + get: function () {
  904 + return this.preModel.awbinfo.dest3
  905 + },
  906 + set: function (val) {
  907 + this.preModel.awbinfo.dest3 = val.toUpperCase().trim()
  908 + }
  909 + },
  910 + eairportid: {
  911 + get: function () {
  912 + return this.preModel.awbinfo.eairportid
  913 + },
  914 + set: function (val) {
  915 + this.preModel.awbinfo.eairportid = val.toUpperCase().trim()
  916 + }
  917 + }
  918 + },
  919 + methods: {
  920 + // >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
  921 + getList() {
  922 + this.listLoading = true
  923 + if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
  924 + getMt2201ListForParam(this.listQuery).then(res => {
  925 + this.preData = res.data.dataList
  926 + this.total = res.data.count
  927 + if (res.data.count > 0) {
  928 + this.listQuery.carrier = this.preData[0].carrier
  929 + this.listQuery.flightNo = this.preData[0].flightno
  930 + this.listQuery.flightDate = this.preData[0].flightdate
  931 + this.listQuery.originStation = this.preData[0].originstation
  932 + this.listQuery.destinationStation = this.preData[0].destinationstation
  933 + this.listQuery.customcode = this.preData[0].customcode
  934 + }
  935 + setTimeout(() => {
  936 + this.listLoading = false
  937 + }, 1500)
  938 + })
  939 + } else {
  940 + getMt2201ListForParam(this.listQuery).then(res => {
  941 + this.preData = res.data.dataList
  942 + this.total = res.data.count
  943 + setTimeout(() => {
  944 + this.listLoading = false
  945 + }, 1500)
  946 + })
  947 + }
  948 +
  949 + },
  950 + // >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
  951 + restModel() {
  952 + this.preModel = {
  953 + awba: undefined,
  954 + awbh: undefined,
  955 + customcode: undefined,
  956 + flightno: undefined,
  957 + carrier: undefined,
  958 + flightdate: undefined,
  959 + originstation: undefined,
  960 + destinationstation: undefined,
  961 + piece: undefined,
  962 + weight: undefined,
  963 + goodsname: undefined,
  964 + splitcode: undefined,
  965 + uldType: undefined,
  966 + uldNo: undefined,
  967 + status: undefined,
  968 + ex5: undefined,
  969 + awbinfo: {
  970 + pcs: undefined,
  971 + weight: undefined,
  972 + specopeid: undefined,
  973 + shprname: undefined,
  974 + shprmobiletype: undefined,
  975 + shprtel: undefined,
  976 + shpraddress: undefined,
  977 + shprcountyr: undefined,
  978 + shpcomidpre: undefined,
  979 + shpaeocode: undefined,
  980 + shpcomidpno: undefined,
  981 + shpcitycode: undefined,
  982 + shpcustomerid: undefined,
  983 + cnsnname: undefined,
  984 + cnsrmobiletype: undefined,
  985 + cnsntel: undefined,
  986 + cnsnaddress: undefined,
  987 + cnscountyr: undefined,
  988 + cnscomidpre: undefined,
  989 + cnscomidno: undefined,
  990 + cnsrctcname: undefined,
  991 + cnsaeocode: undefined,
  992 + cnsrctctel: undefined,
  993 + cnscitycode: undefined,
  994 + cargonm: undefined,
  995 + sairportid: undefined,
  996 + dest1city: undefined,
  997 + by1: undefined,
  998 + dest1: undefined,
  999 + by2: undefined,
  1000 + dest2: undefined,
  1001 + by3: undefined,
  1002 + dest3: undefined,
  1003 + eairportid: undefined,
  1004 + csgcustomerid: undefined,
  1005 + collected: '0',
  1006 + }
  1007 + }
  1008 + },
  1009 + // >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
  1010 + handleAddpreInfo() {
  1011 + this.restModel()
  1012 + this.preModel.carrier = this.listQuery.carrier
  1013 + this.preModel.flightno = this.listQuery.flightno
  1014 + this.preModel.flightdate = this.listQuery.flightdate
  1015 + this.preModel.originstation = this.listQuery.originstation
  1016 + this.preModel.destinationstation = this.listQuery.carrier
  1017 + this.preModel.customcode = this.listQuery.customcode
  1018 + this.dialogStatus = 'create'
  1019 + this.dialogFormVisible = true
  1020 + this.$nextTick(() => {
  1021 + this.$refs.preFormData.clearValidate()
  1022 + })
  1023 + },
  1024 + createData() {
  1025 + this.$refs.preFormData.validate(valid => {
  1026 + if (valid) {
  1027 + updateMT2201(this.preModel).then(res => {
  1028 + if (res.data.count > 0) {
  1029 + Message.success("新增成功")
  1030 + this.dialogFormVisible = false
  1031 + this.getList()
  1032 + } else {
  1033 + Message.error("新增失败,请检查数据")
  1034 + }
  1035 + })
  1036 + }
  1037 + })
  1038 + },
  1039 + // >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<
  1040 + handleSelectionChange() {
  1041 +
  1042 + },
  1043 + // >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
  1044 + handleSerach() {
  1045 + this.listQuery.carrier = undefined
  1046 + this.listQuery.flightno = undefined
  1047 + this.listQuery.originstation = undefined
  1048 + this.listQuery.flightdate = undefined
  1049 + this.listQuery.destinationstation = undefined
  1050 + this.getList()
  1051 + },
  1052 + // >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
  1053 + handleSend(row) {
  1054 + const resQuery = {
  1055 + carrier: row.carrier,
  1056 + flightNo: row.flightno,
  1057 + flightDate: row.flightdate,
  1058 + awba: row.awba,
  1059 + awbh: row.awbh,
  1060 + messageType: 'MT2201'
  1061 + }
  1062 + this.dialogTableVisible = true
  1063 + getResponseForParam(resQuery).then(res => {
  1064 + this.detailData = res.data
  1065 + })
  1066 + },
  1067 + // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
  1068 + handleAwbSend() {
  1069 +
  1070 + },
  1071 + // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
  1072 + handleEdit(row) {
  1073 + this.preModel = Object.assign({}, row)
  1074 + this.dialogStatus = 'update'
  1075 + this.dialogFormVisible = true
  1076 + this.$nextTick(() => {
  1077 + this.$refs.preFormData.clearValidate()
  1078 + })
  1079 + },
  1080 + updateData() {
  1081 + this.$refs.preFormData.validate(valid => {
  1082 + if (valid) {
  1083 + delete this.preModel.parent
  1084 + delete this.preModel.children
  1085 + updateMT2201(this.preModel).then(res => {
  1086 + if (res.data.count > 0) {
  1087 + Message.success("修改成功")
  1088 + this.dialogFormVisible = false
  1089 + this.getList()
  1090 + } else {
  1091 + Message.error("修改失败,请检查数据")
  1092 + }
  1093 + })
  1094 + }
  1095 + })
  1096 + },
  1097 + // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
  1098 + handleAwbEdit() {
  1099 +
  1100 + },
  1101 + // >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
  1102 + handleSaveAndSend() {
  1103 +
  1104 + },
  1105 + // >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
  1106 + handleAwbDelete(row) {
  1107 + delete row.parent
  1108 + delete row.children
  1109 + this.$confirm("是否删除", "确认消息", {
  1110 + distinguishCancelAndClose: true,
  1111 + confirmButtonText: '删除',
  1112 + cancelButtonText: '取消'
  1113 + }).then(() => {
  1114 + deleteByIsDelete(row).then(res => {
  1115 + if (res.data.count > 0) {
  1116 + this.$message({
  1117 + type: 'success',
  1118 + message: '删除成功'
  1119 + })
  1120 + this.getList()
  1121 + } else {
  1122 + this.$message({
  1123 + type: 'danger',
  1124 + message: '删除异常,请稍后重试'
  1125 + })
  1126 + }
  1127 + })
  1128 + }).catch(action => {
  1129 + this.$message({
  1130 + type: 'info',
  1131 + message: action === 'cancel'
  1132 + ? '取消删除'
  1133 + : '删除取消'
  1134 + })
  1135 + })
  1136 + },
  1137 + // >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
  1138 + handleAwbStatus(row) {
  1139 + delete row.parent
  1140 + delete row.children
  1141 + this.$confirm("是否发送更改状态", "确认消息", {
  1142 + distinguishCancelAndClose: true,
  1143 + confirmButtonText: '确认更改',
  1144 + cancelButtonText: '取消更改'
  1145 + }).then(() => {
  1146 + updateStatus(row).then(res => {
  1147 + if (res.data.count > 0) {
  1148 + this.$message({
  1149 + type: 'success',
  1150 + message: '当前运单状态已更改'
  1151 + })
  1152 + this.getList()
  1153 + } else {
  1154 + this.$message({
  1155 + type: 'error',
  1156 + message: '状态更改失败,请稍后重试'
  1157 + })
  1158 + }
  1159 + })
  1160 +
  1161 + }).catch(action => {
  1162 + this.$message({
  1163 + type: 'info',
  1164 + message: action === 'cancel'
  1165 + ? '取消状态更改'
  1166 + : '状态更改取消'
  1167 + })
  1168 + })
  1169 + },
  1170 + // >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
  1171 + handleAddAwbh(row) {
  1172 + this.restModel()
  1173 + const template = Object.assign({}, row) // copy obj
  1174 + this.preModel.awba = template.awba
  1175 + this.preModel.flightdate = template.flightdate
  1176 + this.preModel.flightno = template.flightno
  1177 + this.preModel.destinationstation = template.destinationstation
  1178 + this.preModel.customcode = template.customcode
  1179 + this.preModel.carrier = template.carrier
  1180 + this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr
  1181 + this.preModel.originstation = template.originstation
  1182 + this.preModel.awbinfo.collected = template.awbinfo.collected
  1183 + this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
  1184 + this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
  1185 + this.preModel.awbinfo.ex5 = template.awbinfo.ex5
  1186 + this.listQuery.awba = template.awba
  1187 + this.listQuery.flightDate = template.flightdate
  1188 + this.listQuery.flightNo = template.flightno
  1189 + this.listQuery.originStation = template.originstation
  1190 + this.listQuery.destinationStation = template.destinationstation
  1191 + this.listQuery.customcode = template.customcode
  1192 + this.listQuery.carrier = template.carrier
  1193 + getMt2201ListForParam(this.listQuery).then(res => {
  1194 + this.awbPiece = 0
  1195 + this.awbWeight = 0
  1196 + let residuePiece = 0
  1197 + let residueWeight = 0
  1198 + const childrenList = res.data.dataList[0].children
  1199 + if (childrenList.length < 1) {
  1200 + this.awbPiece = res.data.dataList[0].piece
  1201 + this.awbWeight = res.data.dataList[0].weight
  1202 + } else {
  1203 + for (var i = 0; i < childrenList.length; i++) {
  1204 + residuePiece += childrenList[i].piece
  1205 + residueWeight += childrenList[i].weight
  1206 + }
  1207 + this.awbPiece =res.data.dataList[0].piece- residuePiece
  1208 + this.awbWeight = res.data.dataList[0].weight- residueWeight
  1209 + }
  1210 + })
  1211 + this.dialogStatus = 'addAwbh'
  1212 + this.dialogFormVisible = true
  1213 + this.$nextTick(() => {
  1214 + this.$refs.preFormData.clearValidate()
  1215 + })
  1216 + },
  1217 +
  1218 + //获取城市列表
  1219 + getCountryList() {
  1220 + getCountry().then(res => {
  1221 + this.countryList = res.data.dataList
  1222 + })
  1223 + },
  1224 + remoteMethod(query) {
  1225 + if (query !== '') {
  1226 + this.listLoading = true
  1227 + setTimeout(() => {
  1228 + this.listLoading = false
  1229 + this.countryOption = this.countryResultList.filter(item => {
  1230 + return item.value.toUpperCase().trim()
  1231 + .indexOf(query.toUpperCase()) > -1
  1232 + })
  1233 + }, 200)
  1234 + // if (query.length > 1) {
  1235 + // this.selectCountry.countryCode = query
  1236 + // getByCountryCode(this.selectCountry).then(res => {
  1237 + // this.shpCompnyList = res.data.dataList
  1238 + // this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
  1239 + // console.log(item)
  1240 + // return {value: item.enterpriseCode, label: item.enterpriseCode}
  1241 + // })
  1242 + // })
  1243 + // }
  1244 + } else {
  1245 + this.countryOption = []
  1246 + }
  1247 +
  1248 +
  1249 + },
  1250 + handleAddpre() {
  1251 + const row = {
  1252 + 'messageType': 'MT2201'
  1253 + }
  1254 + this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
  1255 + },
  1256 +
  1257 + handelBackStep() {
  1258 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
  1259 + }
  1260 + }
  1261 + }
  1262 +
  1263 +</script>
  1264 +<style>
  1265 + .grid-content {
  1266 + height: 36px;
  1267 + line-height: 36px;
  1268 + }
  1269 +
  1270 + .content {
  1271 + border-left: 4px #409EFF solid;
  1272 + padding-left: 10px;
  1273 + background-color: #f9fafc;
  1274 + margin-bottom: 2px
  1275 + }
  1276 +
  1277 + .row-bg, .co {
  1278 + background-color: white;
  1279 + }
  1280 +
  1281 + .titlespan {
  1282 + font-weight: bold;
  1283 + margin-right: 35px;
  1284 + }
  1285 +
  1286 + .el-row {
  1287 + margin-top: 10px;
  1288 + margin-bottom: 0px;
  1289 + }
  1290 +
  1291 + .btnFoot {
  1292 + margin-top: 10px;
  1293 + }
  1294 +
  1295 + .el-btn {
  1296 + margin-left: 10px;
  1297 + display: inline-block;
  1298 + }
  1299 +
  1300 + .el-dialog-div {
  1301 + height: 60vh;
  1302 + overflow: auto;
  1303 + }
  1304 +
  1305 + .tableInline {
  1306 + line-height: 8px;
  1307 + }
  1308 +</style>