作者 xudada

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	config/index.js
#	package-lock.json
#	package.json
#	src/api/api.js
#	src/api/http.js
#	src/api/log_api.js
#	src/api/perm_api.js
#	src/api/role_api.js
#	src/api/user.js
#	src/main.js
#	src/routes.js

要显示太多修改。

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

@@ -7,13 +7,14 @@ module.exports = { @@ -7,13 +7,14 @@ module.exports = {
7 index: path.resolve(__dirname, '../dist/index.html'), 7 index: path.resolve(__dirname, '../dist/index.html'),
8 assetsRoot: path.resolve(__dirname, '../dist'), 8 assetsRoot: path.resolve(__dirname, '../dist'),
9 assetsSubDirectory: 'static', 9 assetsSubDirectory: 'static',
10 - assetsPublicPath: '/vue-admin/', 10 + assetsPublicPath: './',
11 productionSourceMap: true, 11 productionSourceMap: true,
12 - // Gzip off by default as many popular static hosts such as 12 + // Gzip off by default as many popular static hosts such as2.20202
13 // Surge or Netlify already gzip all static assets for you. 13 // Surge or Netlify already gzip all static assets for you.
14 // Before setting to `true`, make sure to: 14 // Before setting to `true`, make sure to:
15 // npm install --save-dev compression-webpack-plugin 15 // npm install --save-dev compression-webpack-plugin
16 productionGzip: false, 16 productionGzip: false,
  17 +
17 productionGzipExtensions: ['js', 'css'], 18 productionGzipExtensions: ['js', 'css'],
18 // Run the build command with an extra argument to 19 // Run the build command with an extra argument to
19 // View the bundle analyzer report after build finishes: 20 // View the bundle analyzer report after build finishes:
@@ -23,16 +24,17 @@ module.exports = { @@ -23,16 +24,17 @@ module.exports = {
23 }, 24 },
24 dev: { 25 dev: {
25 env: require('./dev.env'), 26 env: require('./dev.env'),
26 - port: 8082, 27 + port: 12020,
27 autoOpenBrowser: true, 28 autoOpenBrowser: true,
28 assetsSubDirectory: 'static', 29 assetsSubDirectory: 'static',
29 assetsPublicPath: '/', 30 assetsPublicPath: '/',
30 proxyTable: { 31 proxyTable: {
31 '/api':{ 32 '/api':{
32 - target: 'http://127.0.0.1:12343',//设置你调用的接口域名和端口号 别忘了加http 33 + // target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
  34 + target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
33 changeOrigin: true, 35 changeOrigin: true,
34 pathRewrite: { 36 pathRewrite: {
35 - '^/api': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可 37 + '^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
36 } 38 }
37 } 39 }
38 }, 40 },
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 - <title>流浪地球项目</title> 6 + <title>易通快速通关申报管理系统</title>
7 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> 7 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
8 </head> 8 </head>
9 9
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 }, 85 },
86 "adler-32": { 86 "adler-32": {
87 "version": "1.2.0", 87 "version": "1.2.0",
88 - "resolved": "https://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz", 88 + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
89 "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", 89 "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
90 "requires": { 90 "requires": {
91 "exit-on-epipe": "~1.0.1", 91 "exit-on-epipe": "~1.0.1",
@@ -975,6 +975,12 @@ @@ -975,6 +975,12 @@
975 "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", 975 "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
976 "dev": true 976 "dev": true
977 }, 977 },
  978 + "babel-plugin-syntax-jsx": {
  979 + "version": "6.18.0",
  980 + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
  981 + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=",
  982 + "dev": true
  983 + },
978 "babel-plugin-syntax-object-rest-spread": { 984 "babel-plugin-syntax-object-rest-spread": {
979 "version": "6.13.0", 985 "version": "6.13.0",
980 "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", 986 "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
@@ -1317,6 +1323,15 @@ @@ -1317,6 +1323,15 @@
1317 "babel-types": "^6.24.1" 1323 "babel-types": "^6.24.1"
1318 } 1324 }
1319 }, 1325 },
  1326 + "babel-plugin-transform-vue-jsx": {
  1327 + "version": "3.7.0",
  1328 + "resolved": "https://registry.npmjs.org/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.7.0.tgz",
  1329 + "integrity": "sha512-W39X07/n3oJMQd8tALBO+440NraGSF//Lo1ydd/9Nme3+QiRGFBb1Q39T9iixh0jZPPbfv3so18tNoIgLatymw==",
  1330 + "dev": true,
  1331 + "requires": {
  1332 + "esutils": "^2.0.2"
  1333 + }
  1334 + },
1320 "babel-polyfill": { 1335 "babel-polyfill": {
1321 "version": "6.26.0", 1336 "version": "6.26.0",
1322 "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", 1337 "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
@@ -2325,7 +2340,7 @@ @@ -2325,7 +2340,7 @@
2325 }, 2340 },
2326 "codepage": { 2341 "codepage": {
2327 "version": "1.14.0", 2342 "version": "1.14.0",
2328 - "resolved": "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz", 2343 + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
2329 "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=", 2344 "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
2330 "requires": { 2345 "requires": {
2331 "commander": "~2.14.1", 2346 "commander": "~2.14.1",
@@ -3227,9 +3242,9 @@ @@ -3227,9 +3242,9 @@
3227 "dev": true 3242 "dev": true
3228 }, 3243 },
3229 "element-ui": { 3244 "element-ui": {
3230 - "version": "2.12.0",  
3231 - "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",  
3232 - "integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=", 3245 + "version": "2.13.0",
  3246 + "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz",
  3247 + "integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==",
3233 "requires": { 3248 "requires": {
3234 "async-validator": "~1.8.1", 3249 "async-validator": "~1.8.1",
3235 "babel-helper-vue-jsx-merge-props": "^2.0.0", 3250 "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -6298,7 +6313,7 @@ @@ -6298,7 +6313,7 @@
6298 }, 6313 },
6299 "normalize-wheel": { 6314 "normalize-wheel": {
6300 "version": "1.0.1", 6315 "version": "1.0.1",
6301 - "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz", 6316 + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
6302 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" 6317 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
6303 }, 6318 },
6304 "npm": { 6319 "npm": {
@@ -10532,7 +10547,7 @@ @@ -10532,7 +10547,7 @@
10532 }, 10547 },
10533 "raw-loader": { 10548 "raw-loader": {
10534 "version": "0.5.1", 10549 "version": "0.5.1",
10535 - "resolved": "https://registry.npm.taobao.org/raw-loader/download/raw-loader-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fraw-loader%2Fdownload%2Fraw-loader-0.5.1.tgz", 10550 + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
10536 "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" 10551 "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
10537 }, 10552 },
10538 "read-pkg": { 10553 "read-pkg": {
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 "dependencies": { 12 "dependencies": {
13 "axios": "^0.19.0", 13 "axios": "^0.19.0",
14 "echarts": "^3.3.2", 14 "echarts": "^3.3.2",
15 - "element-ui": "^2.12.0", 15 + "element-ui": "^2.13.0",
16 "eslint": "^5.14.1", 16 "eslint": "^5.14.1",
17 "file-saver": "^2.0.2", 17 "file-saver": "^2.0.2",
18 "font-awesome": "^4.7.0", 18 "font-awesome": "^4.7.0",
@@ -33,10 +33,13 @@ @@ -33,10 +33,13 @@
33 "autoprefixer": "^6.7.2", 33 "autoprefixer": "^6.7.2",
34 "axios-mock-adapter": "^1.7.1", 34 "axios-mock-adapter": "^1.7.1",
35 "babel-core": "^6.22.1", 35 "babel-core": "^6.22.1",
  36 + "babel-helper-vue-jsx-merge-props": "^2.0.3",
36 "babel-loader": "^6.2.10", 37 "babel-loader": "^6.2.10",
  38 + "babel-plugin-syntax-jsx": "^6.18.0",
37 "babel-plugin-transform-runtime": "^6.22.0", 39 "babel-plugin-transform-runtime": "^6.22.0",
  40 + "babel-plugin-transform-vue-jsx": "^3.7.0",
38 "babel-polyfill": "^6.16.0", 41 "babel-polyfill": "^6.16.0",
39 - "babel-preset-env": "^1.2.1", 42 + "babel-preset-env": "^1.7.0",
40 "babel-preset-es2015": "^6.0.0", 43 "babel-preset-es2015": "^6.0.0",
41 "babel-preset-stage-2": "^6.22.0", 44 "babel-preset-stage-2": "^6.22.0",
42 "babel-register": "^6.22.0", 45 "babel-register": "^6.22.0",
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server-import/nmms/allocat'
  3 +
  4 +
  5 +export const addAllocatImport=params=>{return http.post(`${baseUrl}/addAllocatImport`, params);};
  6 +export const addAllocatArrive=params=>{return http.post(`${baseUrl}/addAllocatArrive`, params);};
  7 +export const QueryData=params=>{return http.get(`${baseUrl}/QueryData`, params);};
  8 +export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};
@@ -5,13 +5,13 @@ import qs from 'qs' @@ -5,13 +5,13 @@ import qs from 'qs'
5 Vue.prototype.$http = axios; 5 Vue.prototype.$http = axios;
6 6
7 7
8 -export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); }; 8 +export const getuserMenus = params => { return axios.get(`USER-CENTER/perm/userMenus`, { params: params }); };
9 9
10 -export const getUserList = params => { return axios.get(`/user/list`, { params: params }); }; 10 +export const getUserList = params => { return axios.get(`/cloud-user-center/user/list`, { params: params }); };
11 11
12 export const getUserListPage = params => { return axios({ 12 export const getUserListPage = params => { return axios({
13 method: 'GET', 13 method: 'GET',
14 - url: `/user/list`, 14 + url: `/cloud-user-center/user/list`,
15 data: params, 15 data: params,
16 headers: { 16 headers: {
17 'Content-Type': 'application/json;charset=UTF-8' 17 'Content-Type': 'application/json;charset=UTF-8'
@@ -21,18 +21,18 @@ export const getUserListPage = params => { return axios({ @@ -21,18 +21,18 @@ export const getUserListPage = params => { return axios({
21 21
22 export const removeUser = params => { return axios({ 22 export const removeUser = params => { return axios({
23 method: 'DELETE', 23 method: 'DELETE',
24 - url: `/user/del`, 24 + url: `/cloud-user-center/user/del`,
25 data: params, 25 data: params,
26 headers: { 26 headers: {
27 'Content-Type': 'application/json;charset=UTF-8' 27 'Content-Type': 'application/json;charset=UTF-8'
28 } 28 }
29 })}; 29 })};
30 30
31 -export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); }; 31 +export const batchRemoveUser = params => { return axios.get(`USER-CENTER/user/batchremove`, { params: params }); };
32 32
33 export const editUser = params => { return axios({ 33 export const editUser = params => { return axios({
34 method: 'PUT', 34 method: 'PUT',
35 - url: `/user/edit`, 35 + url: `/cloud-user-center/user/edit`,
36 data: params, 36 data: params,
37 headers: { 37 headers: {
38 'Content-Type': 'application/json;charset=UTF-8' 38 'Content-Type': 'application/json;charset=UTF-8'
@@ -41,7 +41,7 @@ export const editUser = params => { return axios({ @@ -41,7 +41,7 @@ export const editUser = params => { return axios({
41 41
42 export const addUser = params => { return axios({ 42 export const addUser = params => { return axios({
43 method: 'POST', 43 method: 'POST',
44 - url: `/user/add`, 44 + url: `/cloud-user-center/user/add`,
45 data: params, 45 data: params,
46 headers: { 46 headers: {
47 'Content-Type': 'application/json;charset=UTF-8' 47 'Content-Type': 'application/json;charset=UTF-8'
@@ -50,9 +50,9 @@ export const addUser = params => { return axios({ @@ -50,9 +50,9 @@ export const addUser = params => { return axios({
50 50
51 export const setUserRole = params => { return axios({ 51 export const setUserRole = params => { return axios({
52 method: 'PUT', 52 method: 'PUT',
53 - url: `/user/roleset`, 53 + url: `/cloud-user-center/user/roleset`,
54 data: params, 54 data: params,
55 headers: { 55 headers: {
56 'Content-Type': 'application/json;charset=UTF-8' 56 'Content-Type': 'application/json;charset=UTF-8'
57 } 57 }
58 -})};  
  58 +})};
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -let base = '/hqpt-user-center/company'; 3 +let base = '/cloud-user-center/company';
4 4
5 5
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
1 import http from './http.js' 1 import http from './http.js'
2 -let baseUrl = 'nmms-server/nmms/country' 2 +let baseUrl = 'nmms-server-export/nmms/country'
3 3
4 4
5 export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); }; 5 export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); };
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -let base = '/hqpt-user-center/department'; 3 +let base = '/cloud-user-center/department';
4 4
5 5
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server-export/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-export/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-export/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-export/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-export/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-export/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)};
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -let base = '/hqpt-user-center/group'; 3 +let base = '/cloud-user-center/group';
4 4
5 5
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
@@ -17,19 +17,9 @@ export default { @@ -17,19 +17,9 @@ export default {
17 return axios({ 17 return axios({
18 method: 'GET', 18 method: 'GET',
19 url: url, 19 url: url,
20 - data: params,  
21 - headers: {  
22 - 'Content-Type': 'application/json;charset=UTF-8',  
23 - }  
24 - });  
25 - },  
26 - getUrlEnclode(url, params) {  
27 - return axios({  
28 - method: 'GET',  
29 - url: url,  
30 - data: qs.stringify(params), 20 + params: params,
31 headers: { 21 headers: {
32 - 'Content-Type': 'application/x-www-form-urlencoded', 22 + 'Content-Type': 'application/x-www-form-urlencoded'
33 } 23 }
34 }); 24 });
35 }, 25 },
@@ -56,7 +46,7 @@ export default { @@ -56,7 +46,7 @@ export default {
56 login: data =>{ 46 login: data =>{
57 return axios({ 47 return axios({
58 method: 'POST', // 请求协议 48 method: 'POST', // 请求协议
59 - url: 'user-center/login', // 请求的地址 49 + url: 'cloud-user-center/login', // 请求的地址
60 data: qs.stringify(data), // post 请求的数据 50 data: qs.stringify(data), // post 请求的数据
61 timeout: 30000, // 超时时间, 单位毫秒 51 timeout: 30000, // 超时时间, 单位毫秒
62 headers: { 52 headers: {
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -axios.defaults.baseURL = 'http://localhost:8082/api';  
4 -let base = axios.defaults.baseURL+'USER-CENTER/system/log'; 3 +let base = '/cloud-user-center/system/log';
5 4
6 5
7 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server-import/nmms/mt1201'
  3 +
  4 +export const selectFlightLists = params => { return http.get(`${baseUrl}/selectFlightLists`, params); };
  5 +export const getMt1201List=params=>{return http.get(`${baseUrl}/getMt1201List`, params);};
  6 +export const getFenList=params=>{return http.get(`${baseUrl}/getFenList`, params);};
  7 +export const addMt1201=params=>{return http.post(`${baseUrl}/addMt1201`, params);};
  8 +export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params);};
  9 +
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server-import/nmms/mt5201'
  3 +
  4 +export const getMt5201List=params=>{return http.get(`${baseUrl}/getMt5201List`, params);};
  5 +export const addMt5201=params=>{return http.post(`${baseUrl}/addMt5201`, params);};
  6 +export const ediMt5201=params=>{return http.put(`${baseUrl}/ediMt5201`, params);};
  7 +export const delMt5201 = params => { return http.del(`${baseUrl}/delMt5201`,params)};
  8 +
1 import http from './http.js' 1 import http from './http.js'
2 -let baseUrl = 'nmms-server/nmms/mt1201' 2 +let baseUrl = 'nmms-server-export/nmms/mt1201'
3 3
4 export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); }; 4 export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); };
5 5
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -axios.defaults.baseURL = 'http://localhost:8082/api';  
4 -let base = axios.defaults.baseURL+'USER-CENTER/perm'; 3 +let base = '/cloud-user-center/perm';
5 4
6 5
7 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server-export/nmms/rep'
  4 +
  5 +export const getResponseForParam = params => {
  6 + return http.get(`${baseUrl}/getResponseForParam`, params);
  7 +};
1 import axios from 'axios' 1 import axios from 'axios'
2 2
3 -let base = 'USER-CENTER/role'; 3 +let base = '/cloud-user-center/role';
4 4
5 5
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
@@ -16,7 +16,7 @@ export const remove = params => { return axios({ @@ -16,7 +16,7 @@ export const remove = params => { return axios({
16 })}; 16 })};
17 17
18 //批量删除 18 //批量删除
19 -export const batchRemove = params => { return axios.get(`${base}/user/batchremove`, { params: params }); }; 19 +export const batchRemove = params => { return axios.get(`${base}/batchremove`, { params: params }); };
20 20
21 export const edit = params => { return axios({ 21 export const edit = params => { return axios({
22 method: 'PUT', 22 method: 'PUT',
1 import http from './http.js' 1 import http from './http.js'
2 -let baseUrl = 'user-center/user'  
3 - 2 +let baseUrl = '/cloud-user-center/user'
4 export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; 3 export const getUserList = params => { return http.get(`${baseUrl}/list`, params); };
5 4
6 export const getUserListPage = params => { return http.get(`/user/list`,params) }; 5 export const getUserListPage = params => { return http.get(`/user/list`,params) };
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server-import/nmms/wayDeclaration'
  3 +export const QueryData=params=>{return http.get(`${baseUrl}/Query`, params);};
@@ -29,12 +29,12 @@ export default { @@ -29,12 +29,12 @@ export default {
29 }, 29 },
30 limit: { 30 limit: {
31 type: Number, 31 type: Number,
32 - default: 20 32 + default: 100
33 }, 33 },
34 pageSizes: { 34 pageSizes: {
35 type: Array, 35 type: Array,
36 default() { 36 default() {
37 - return [10, 20, 30, 50] 37 + return [10, 20, 30, 50, 100]
38 } 38 }
39 }, 39 },
40 layout: { 40 layout: {
@@ -92,7 +92,7 @@ export default { @@ -92,7 +92,7 @@ export default {
92 <style scoped> 92 <style scoped>
93 .pagination-container { 93 .pagination-container {
94 background: #fff; 94 background: #fff;
95 - padding: 32px 16px; 95 + /*padding: 32px 16px;*/
96 } 96 }
97 .pagination-container.hidden { 97 .pagination-container.hidden {
98 display: none; 98 display: none;
@@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
8 <i v-if="!scope.row._expanded" class="el-icon-plus"/> 8 <i v-if="!scope.row._expanded" class="el-icon-plus"/>
9 <i v-else class="el-icon-minus"/> 9 <i v-else class="el-icon-minus"/>
10 </span> 10 </span>
11 - <!--{{ scope.$index }}-->  
12 </template> 11 </template>
13 </el-table-column> 12 </el-table-column>
14 <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width"> 13 <el-table-column v-for="(column, index) in columns" v-else :key="column.value" :label="column.text" :width="column.width">
@@ -20,7 +19,6 @@ @@ -20,7 +19,6 @@
20 <i v-if="!scope.row._expanded" class="el-icon-plus"/> 19 <i v-if="!scope.row._expanded" class="el-icon-plus"/>
21 <i v-else class="el-icon-minus"/> 20 <i v-else class="el-icon-minus"/>
22 </span> 21 </span>
23 - {{ scope.row[column.value] }}  
24 </template> 22 </template>
25 </el-table-column> 23 </el-table-column>
26 <slot/> 24 <slot/>
@@ -49,7 +47,7 @@ export default { @@ -49,7 +47,7 @@ export default {
49 evalArgs: Array, 47 evalArgs: Array,
50 expandAll: { 48 expandAll: {
51 type: Boolean, 49 type: Boolean,
52 - default: true 50 + default: false
53 } 51 }
54 }, 52 },
55 computed: { 53 computed: {
@@ -68,11 +66,8 @@ export default { @@ -68,11 +66,8 @@ export default {
68 }, 66 },
69 methods: { 67 methods: {
70 showRow: function(row) { 68 showRow: function(row) {
71 - this.data  
72 - const show = (row.parent ? (row.parent._expanded && row.parent._show) : true)  
73 -// const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)  
74 -// row.row._show = show  
75 - row._show = show 69 + const show = (row.row.parent ? (row.row.parent._expanded && row.row.parent._show) : true)
  70 + row.row._show = show
76 return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;' 71 return show ? 'animation:treeTableShow 1s;-webkit-animation:treeTableShow 1s;' : 'display:none;'
77 }, 72 },
78 // 切换下级是否展开 73 // 切换下级是否展开
1 -import babelpolyfill from 'babel-polyfill' 1 +
2 import Vue from 'vue' 2 import Vue from 'vue'
3 import App from './App' 3 import App from './App'
4 import ElementUI from 'element-ui' 4 import ElementUI from 'element-ui'
@@ -8,14 +8,15 @@ import VueRouter from 'vue-router' @@ -8,14 +8,15 @@ import VueRouter from 'vue-router'
8 import store from './vuex/store' 8 import store from './vuex/store'
9 import Vuex from 'vuex' 9 import Vuex from 'vuex'
10 import axios from 'axios' 10 import axios from 'axios'
11 -//import NProgress from 'nprogress'  
12 -//import 'nprogress/nprogress.css'  
13 import rout from './routes' 11 import rout from './routes'
14 import Mock from './mock' 12 import Mock from './mock'
15 import i18n from './lang' 13 import i18n from './lang'
16 import 'font-awesome/css/font-awesome.min.css' 14 import 'font-awesome/css/font-awesome.min.css'
  15 +
  16 +import * as socketApi from './api/socket'
17 import '@/styles/index.scss' 17 import '@/styles/index.scss'
18 18
  19 +
19 //定义一个全局过滤器实现日期格式化 20 //定义一个全局过滤器实现日期格式化
20 Vue.filter('datefmt',function(input,fmtstring){ 21 Vue.filter('datefmt',function(input,fmtstring){
21 22
@@ -23,7 +24,8 @@ Vue.filter('datefmt',function(input,fmtstring){ @@ -23,7 +24,8 @@ Vue.filter('datefmt',function(input,fmtstring){
23 24
24 }); 25 });
25 26
26 - 27 +// 注册websocket组件到VUE
  28 +Vue.prototype.socketApi = socketApi
27 29
28 Vue.config.productionTip = false 30 Vue.config.productionTip = false
29 Mock.bootstrap(); 31 Mock.bootstrap();
@@ -33,8 +35,8 @@ Vue.use(Vuex) @@ -33,8 +35,8 @@ Vue.use(Vuex)
33 Vue.prototype.$axios = axios; 35 Vue.prototype.$axios = axios;
34 36
35 //NProgress.configure({ showSpinner: false }); 37 //NProgress.configure({ showSpinner: false });
36 -console.log("mainjs:");  
37 -console.log(rout.routes); 38 +// console.log("mainjs:");
  39 +// console.log(rout.routes);
38 const router = new VueRouter({ 40 const router = new VueRouter({
39 routes:rout.routes 41 routes:rout.routes
40 }); 42 });
@@ -61,7 +63,7 @@ router.beforeEach((to, from, next) => { @@ -61,7 +63,7 @@ router.beforeEach((to, from, next) => {
61 } 63 }
62 }); 64 });
63 65
64 -var message = Vue.prototype.$message; 66 +const message = Vue.prototype.$message;
65 axios.defaults.baseURL = '/api'; 67 axios.defaults.baseURL = '/api';
66 axios.interceptors.response.use( 68 axios.interceptors.response.use(
67 res => { 69 res => {
@@ -7,14 +7,47 @@ import Role from './views/nav1/role.vue' @@ -7,14 +7,47 @@ import Role from './views/nav1/role.vue'
7 import Perm from './views/nav1/perm.vue' 7 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 Company from './views/nav1/company.vue'
  11 +import Department from './views/nav1/department.vue'
  12 +import Group from './views/nav1/groupcompany.vue'
  13 +import Process from './views/hqpt/Process.vue'
  14 +import Job from './views/hqpt/Job.vue'
11 // import Form from './views/nav1/Form.vue' 15 // import Form from './views/nav1/Form.vue'
12 16
  17 +
  18 +import OrgManifest from './views/nmms/orgManifest.vue'
  19 +import ExitFlight from './views/nmms/ExitFlight.vue'
  20 +import ExitPre from './views/nmms/ExitPre.vue'
  21 +import ExitTidy from './views/nmms/ExitTidy.vue'
  22 +import ExitArrive from './views/nmms/ExitArrive.vue'
  23 +import ExitManifest from './views/nmms/ExitManifest.vue'
  24 +import ExitLoading from './views/nmms/ExitLoading.vue'
  25 +import ExitFlightDesc from './views/nmms/ExitFlightDesc.vue'
  26 +import LostLoad from './views/lostLoadChange/lostLoading.vue'
  27 +import LostLoadChange from './views/lostLoadChange/lostLoadChange.vue'
  28 +
  29 +import OrigFlightList from './views/nmms_import/OrigFlightList.vue'
  30 +import EnterFlightInfo from './views/nmms_import/EnterFlightInfo.vue'
  31 +import OrigMaster from './views/nmms_import/OrigMaster.vue'
  32 +import EnterTally from './views/nmms_import/EnterFlightTally.vue'
  33 +import TallyMster from './views/nmms_import/TallyMster.vue'
  34 +import Waybill from './views/nmms_import/Waybill.vue'
  35 +import AllocateSearch from './views/nmms_import/AllocateSearch.vue'
  36 +import Importallocation from './views/nmms_import/Importallocation.vue'
  37 +import Allocatearrive from './views/nmms_import/Allocatearrive.vue'
  38 +
13 import User from './views/nav1/user.vue' 39 import User from './views/nav1/user.vue'
14 import Page4 from './views/nav2/Page4.vue' 40 import Page4 from './views/nav2/Page4.vue'
15 import Page5 from './views/nav2/Page5.vue' 41 import Page5 from './views/nav2/Page5.vue'
16 import Page6 from './views/nav3/Page6.vue' 42 import Page6 from './views/nav3/Page6.vue'
17 import echarts from './views/charts/echarts.vue' 43 import echarts from './views/charts/echarts.vue'
  44 +import SecrityInspection from './views/staff/security_inspection.vue'
  45 +import Key from './views/staff/key.vue'
  46 +import Maintain from './views/staff/maintain.vue'
  47 +import ComeCar from './views/staff/come_car.vue'
  48 +import OnDuty from './views/staff/on_duty.vue'
  49 +import WaterStationsPatrol from './views/water/water_stations_patrol.vue'
  50 +import Location from './views/empt/Location.vue'
18 51
19 let routes = [ 52 let routes = [
20 { 53 {
@@ -36,7 +69,7 @@ let routes = [ @@ -36,7 +69,7 @@ let routes = [
36 leaf: true, 69 leaf: true,
37 iconCls: 'el-icon-menu', 70 iconCls: 'el-icon-menu',
38 children: [ 71 children: [
39 - { path: '/main', component: Main, name: '首页'}, 72 + {path: '/main', component: Main, name: '首页'},
40 ] 73 ]
41 }, 74 },
42 // { path: '/test', component: Main }, 75 // { path: '/test', component: Main },
@@ -47,39 +80,102 @@ let routes = [ @@ -47,39 +80,102 @@ let routes = [
47 iconCls: 'el-icon-setting',//图标样式class 80 iconCls: 'el-icon-setting',//图标样式class
48 children: [ 81 children: [
49 { path: '/user', component: User, name: '用户管理' }, 82 { path: '/user', component: User, name: '用户管理' },
50 - { path: '/role', component: Role, name: '角色管理' }, 83 + { path: '/role', component: Role, name: '组织机构' },
51 { path: '/perm', component: Perm, name: '权限管理' }, 84 { path: '/perm', component: Perm, name: '权限管理' },
52 { path: '/log', component: LOG, name: '系统日志' }, 85 { path: '/log', component: LOG, name: '系统日志' },
  86 + { path: '/department', component: Department, name: '部门管理' },
  87 + { path: '/company', component: Company, name: '公司管理'},
  88 + { path: '/group', component: Group, name: '集团管理'}
53 ] 89 ]
54 }, 90 },
55 { 91 {
56 - path: '/agent', 92 + path: '/guestService',
57 component: Home, 93 component: Home,
58 - name: '代理人', 94 + name: '客服系统',
59 iconCls: 'fa fa-id-card-o', 95 iconCls: 'fa fa-id-card-o',
60 children: [ 96 children: [
61 - { path: '/pre', component: PreManifest, name: '预配' },  
62 - { path: '/org', component: OrgManifest, name: '进港' } 97 + { path: '/process', component: Process, name: '工单管理' },
  98 + { path: '/job', component: Job, name: '任务管理' },
  99 + {path: '/pre1', component: PreManifest, name: '预配'},
63 ] 100 ]
64 }, 101 },
65 { 102 {
66 - path: '/', 103 + path: '/output',
67 component: Home, 104 component: Home,
68 - name: '导航二', 105 + name: '出港业务申报',
  106 + iconCls: 'el-icon-collection',
  107 + children: [
  108 + {path: '/flight', component: ExitFlight, name: '出港航班申报'},
  109 + {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
  110 + {path: '/pre', component: ExitPre, name: '出港预配舱单'},
  111 + {path: '/arrive', component: ExitArrive, name: '出港运抵'},
  112 + {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
  113 + {path: '/loading', component: ExitLoading, name: '出港装载'},
  114 + {path: '/tidy', component: ExitTidy, name: '出港理货'}
  115 + ]
  116 + },
  117 + {
  118 + path: '/nmms2',
  119 + component: Home,
  120 + name: '进港业务申报',
69 iconCls: 'fa fa-id-card-o', 121 iconCls: 'fa fa-id-card-o',
70 children: [ 122 children: [
71 - { path: '/page4', component: Page4, name: '页面4' },  
72 - { path: '/page5', component: Page5, name: '页面5' } 123 + { path: '/orig', component: OrigFlightList, name: '进港航班申报' },
  124 + {path:'/waybill',component:Waybill,name:'进港运单申报'},
  125 + {path:'/allocateSearch',component:AllocateSearch,name:'运单分拨申报'},
  126 + { path: '/enter', component: EnterFlightInfo, name: '原始舱单'},
  127 + { path:'/origmaster',component:OrigMaster,name:'进港原始舱单'},
  128 + {path:'/entertall',component:EnterTally,name:'进港理货'},
  129 + {path:'/tallymaster',component:TallyMster,name:'进港理货舱单'},
  130 + {path:'/importallocation',component:Importallocation,name:'进港分拨'},
  131 + {path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'}
73 ] 132 ]
74 }, 133 },
75 { 134 {
76 - path: '/', 135 + path: '/lost',
  136 + component: Home,
  137 + name: '落装改配申报',
  138 + iconCls:'el-icon-goods',
  139 + children:[
  140 + {path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
  141 + {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
  142 +
  143 + ]
  144 + },
  145 + {
  146 + path: '/empt',
  147 + component: Home,
  148 + name: '能源管理',
  149 + iconCls: 'fa fa-id-card-o',
  150 + children: [
  151 + { path: '/location', component: Location, name: '能源缴费' },
  152 + ]
  153 + },
  154 + {
  155 + path: '/satff',
  156 + component: Home,
  157 + name: '生活保障部门',
  158 + iconCls: 'fa fa-id-card-o',
  159 + children: [
  160 + { path: '/security_inspection', component: SecrityInspection, name: '职工公寓安全巡视管理' },
  161 + { path: '/key', component: Key, name: '职工公寓备用钥匙使用登记管理' },
  162 + { path: '/maintain', component: Maintain, name: '职工公寓设施设备维修记录管理' },
  163 + { path: '/come_car', component: ComeCar, name: '职工公寓外来人员车辆登记管理' },
  164 + { path: '/on_duty', component: OnDuty, name: '职工公寓值班巡视记录管理' },
  165 + ]
  166 + },
  167 + {
  168 + path: '/water_heating_chamber',
77 component: Home, 169 component: Home,
78 - name: '导航三', 170 + name: '水暖室',
79 iconCls: 'fa fa-address-card', 171 iconCls: 'fa fa-address-card',
80 - leaf: true,//只有一个节点 172 + // leaf: true,//只有一个节点
81 children: [ 173 children: [
82 - { path: '/page6', component: Page6, name: '导航三' } 174 + { path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
  175 + // { path: '/page6', component: Page6, name: '水质量检测' },
  176 + // { path: '/page6', component: Page6, name: '污水站' },
  177 + // { path: '/page6', component: Page6, name: '一水厂' },
  178 + // { path: '/page6', component: Page6, name: '综合楼空调站' },
83 ] 179 ]
84 }, 180 },
85 { 181 {
@@ -88,13 +184,13 @@ let routes = [ @@ -88,13 +184,13 @@ let routes = [
88 name: 'Charts', 184 name: 'Charts',
89 iconCls: 'fa fa-bar-chart', 185 iconCls: 'fa fa-bar-chart',
90 children: [ 186 children: [
91 - { path: '/echarts', component: echarts, name: 'echarts' } 187 + {path: '/echarts', component: echarts, name: 'echarts'}
92 ] 188 ]
93 }, 189 },
94 { 190 {
95 path: '*', 191 path: '*',
96 hidden: true, 192 hidden: true,
97 - redirect: { path: '/404' } 193 + redirect: {path: '/404'}
98 } 194 }
99 ]; 195 ];
100 let initRouters = routes.concat(); 196 let initRouters = routes.concat();
@@ -105,7 +201,7 @@ let setUserMenus = function (list) { @@ -105,7 +201,7 @@ let setUserMenus = function (list) {
105 * 处理登陆后的账号对应的菜单 201 * 处理登陆后的账号对应的菜单
106 * @param menuList 202 * @param menuList
107 */ 203 */
108 -let handleMenuList = function (router,menu) { 204 +let handleMenuList = function (router, menu) {
109 var _self = this; 205 var _self = this;
110 var routerName = ""; 206 var routerName = "";
111 router.forEach(function (v_router) { 207 router.forEach(function (v_router) {
@@ -118,16 +214,16 @@ let handleMenuList = function (router,menu) { @@ -118,16 +214,16 @@ let handleMenuList = function (router,menu) {
118 214
119 //匹配到继续判断是否子元素,有子元素继续递归 215 //匹配到继续判断是否子元素,有子元素继续递归
120 if (result) { 216 if (result) {
121 - if(v_router.children) {  
122 - _self.handleMenuList(v_router.children,result.children); 217 + if (v_router.children) {
  218 + _self.handleMenuList(v_router.children, result.children);
123 } 219 }
124 //没有则可以移除 220 //没有则可以移除
125 - }else {  
126 - router.splice(router.findIndex(itm => itm.name === routerName ),1); 221 + } else {
  222 + router.splice(router.findIndex(itm => itm.name === routerName), 1);
127 } 223 }
128 }) 224 })
129 }); 225 });
130 } 226 }
131 export default { 227 export default {
132 - routes,setUserMenus,handleMenuList,initRouters 228 + routes, setUserMenus, handleMenuList, initRouters
133 }; 229 };
  1 +/**
  2 +* @Author: jianglei
  3 +* @Date: 2017-10-12 12:06:49
  4 +*/
  5 +'use strict'
  6 +import Vue from 'vue'
  7 +export default function treeToArray(data, expandAll, parent, level, item) {
  8 + const marLTemp = []
  9 + let tmp = []
  10 + Array.from(data).forEach(function(record) {
  11 + if (record._expanded === undefined) {
  12 + Vue.set(record, '_expanded', expandAll)
  13 + }
  14 + let _level = 1
  15 + if (level !== undefined && level !== null) {
  16 + _level = level + 1
  17 + }
  18 + Vue.set(record, '_level', _level)
  19 + // 如果有父元素
  20 + if (parent) {
  21 + Vue.set(record, 'parent', parent)
  22 + // 如果父元素有偏移量,需要计算在this的偏移量中
  23 + // 偏移量还与前面同级元素有关,需要加上前面所有元素的长度和
  24 + if (!marLTemp[_level]) {
  25 + marLTemp[_level] = 0
  26 + }
  27 + Vue.set(record, '_marginLeft', marLTemp[_level] + parent._marginLeft)
  28 + Vue.set(record, '_width', record[item] / parent[item] * parent._width)
  29 + // 在本次计算过偏移量后加上自己长度,以供下一个元素使用
  30 + marLTemp[_level] += record._width
  31 + } else {
  32 + // 如果为根
  33 + // 初始化偏移量存储map
  34 + marLTemp[record.id] = []
  35 + // map中是一个数组,存储的是每级的长度和
  36 + // 初始情况下为0
  37 + marLTemp[record.id][_level] = 0
  38 + Vue.set(record, '_marginLeft', 0)
  39 + Vue.set(record, '_width', 1)
  40 + }
  41 + tmp.push(record)
  42 + if (record.children && record.children.length > 0) {
  43 + const children = treeToArray(record.children, expandAll, record, _level, item)
  44 + tmp = tmp.concat(children)
  45 + }
  46 + })
  47 + return tmp
  48 +}
@@ -35,6 +35,50 @@ export function validAlphabets(str) { @@ -35,6 +35,50 @@ 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\s]+$/
  47 + return reg.test(str)
  48 +}
  49 +
  50 +/**
  51 + * 航班校验
  52 + */
  53 +export function validFlightNo(str) {
  54 + const reg = /^[A-Z0-9]{6,7}$/
  55 + if(!reg.test(str)){
  56 + return false
  57 + }
  58 + const flightNoPre = /^[A-Z]+$/
  59 + if(!flightNoPre.test(str.substring(0,2))){
  60 + return false
  61 + } else {
  62 + return true
  63 + }
  64 +}
  65 +
  66 +/**
  67 + * 主单校验
  68 + */
  69 +export function validAwb(str) {
  70 + const reg = /^[0-9\-]{12}$/
  71 + if(!reg.test(str)){
  72 + return false
  73 + }
  74 + const result = str.split("-")[1]
  75 + const num = (result.substring(0,7)) % 7
  76 + if(num === eval(str.substring(11)) ){
  77 + return true
  78 + } else {
  79 + return false
  80 + }
  81 +}
38 /** 82 /**
39 * validate email 83 * validate email
40 * @param email 84 * @param email
@@ -44,3 +88,14 @@ export function validEmail(email) { @@ -44,3 +88,14 @@ export function validEmail(email) {
44 const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 88 const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
45 return re.test(email) 89 return re.test(email)
46 } 90 }
  91 +
  92 +/**
  93 + *
  94 + * 整数和小数,小数最多两位
  95 + * @param value
  96 + * @returns {boolean}
  97 + */
  98 +export function validatorNum(value) {
  99 + const reg = /^(\d*)+(\.[0-9]{1,2})?$/
  100 + return reg.test(value)
  101 +}
1 <template> 1 <template>
2 - <el-row class="container">  
3 - <el-col :span="24" class="header">  
4 - <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">  
5 - {{collapsed?'':sysName}}  
6 - </el-col>  
7 - <el-col :span="10">  
8 - <div class="tools" @click.prevent="collapse">  
9 - <i class="fa fa-align-justify"></i>  
10 - </div>  
11 - </el-col>  
12 - <el-col :span="4" class="userinfo">  
13 - <el-dropdown trigger="hover">  
14 - <span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span>  
15 - <el-dropdown-menu slot="dropdown">  
16 - <el-dropdown-item>我的消息</el-dropdown-item>  
17 - <el-dropdown-item>设置</el-dropdown-item>  
18 - <el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>  
19 - </el-dropdown-menu>  
20 - </el-dropdown>  
21 - </el-col>  
22 - </el-col>  
23 - <el-col :span="24" class="main">  
24 - <aside :class="collapsed?'menu-collapsed':'menu-expanded'">  
25 - <!--导航菜单-->  
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" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">  
27 - <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">  
28 - <el-submenu :index="index+''" v-if="!item.leaf">  
29 - <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>  
31 - </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>  
33 - </template>  
34 - </el-menu>  
35 - <!--导航菜单-折叠后-->  
36 - <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">  
38 - <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>  
42 - </ul>  
43 - </template>  
44 - <template v-else>  
45 - <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>  
49 - </li>  
50 - </ul>  
51 - </aside>  
52 - <section class="content-container">  
53 - <div class="grid-content bg-purple-light">  
54 - <el-col :span="24" class="breadcrumb-container">  
55 - <strong class="title">{{$route.name}}</strong>  
56 - <el-breadcrumb separator="/" class="breadcrumb-inner">  
57 - <el-breadcrumb-item v-for="item in $route.matched" :key="item.path">  
58 - {{ item.name }}  
59 - </el-breadcrumb-item>  
60 - </el-breadcrumb>  
61 - </el-col>  
62 - <el-col :span="24" class="content-wrapper">  
63 - <transition name="fade" mode="out-in">  
64 - <router-view></router-view>  
65 - </transition>  
66 - </el-col>  
67 - </div>  
68 - </section>  
69 - </el-col>  
70 - </el-row> 2 + <el-row class="container">
  3 + <el-col :span="24" class="header">
  4 + <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
  5 + {{collapsed?'':sysName}}
  6 + </el-col>
  7 + <el-col :span="10">
  8 + <div class="tools" @click.prevent="collapse">
  9 + <i class="fa fa-align-justify"></i>
  10 + </div>
  11 + </el-col>
  12 + <el-col :span="4" class="userinfo">
  13 + <el-dropdown trigger="hover">
  14 + <span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span>
  15 + <el-dropdown-menu slot="dropdown">
  16 + <el-dropdown-item>我的消息</el-dropdown-item>
  17 + <el-dropdown-item>设置</el-dropdown-item>
  18 + <el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
  19 + </el-dropdown-menu>
  20 + </el-dropdown>
  21 + </el-col>
  22 + </el-col>
  23 + <el-col :span="24" class="main">
  24 + <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
  25 + <!--导航菜单-->
  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 + <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
  28 + <el-submenu :index="index+''" v-if="!item.leaf">
  29 + <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>
  31 + </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>
  33 + </template>
  34 + </el-menu>
  35 + <!--导航菜单-折叠后-->
  36 + <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">
  38 + <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>
  42 + </ul>
  43 + </template>
  44 + <template v-else>
  45 + <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>
  49 +</li>
  50 +</ul>
  51 +</aside>
  52 +<section class="content-container">
  53 + <div class="grid-content bg-purple-light">
  54 + <el-col :span="24" class="breadcrumb-container">
  55 + <strong class="title">{{$route.name}}</strong>
  56 + <el-breadcrumb separator="/" class="breadcrumb-inner">
  57 + <el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
  58 + {{ item.name }}
  59 + </el-breadcrumb-item>
  60 + </el-breadcrumb>
  61 + </el-col>
  62 + <el-col :span="24" class="content-wrapper">
  63 + <transition name="fade" mode="out-in">
  64 + <router-view></router-view>
  65 + </transition>
  66 + </el-col>
  67 + </div>
  68 +</section>
  69 +</el-col>
  70 +</el-row>
71 </template> 71 </template>
72 -  
73 72
74 <script> 73 <script>
75 import rt from '../routes' 74 import rt from '../routes'
76 export default { 75 export default {
77 -  
78 - data() {  
79 - return {  
80 - sysName:'后勤管理平台',  
81 - collapsed:false,  
82 - sysUserName: '',  
83 - sysUserAvatar: '',  
84 - form: {  
85 - name: '',  
86 - region: '',  
87 - date1: '',  
88 - date2: '',  
89 - delivery: false,  
90 - type: [],  
91 - resource: '',  
92 - desc: ''  
93 - }  
94 - }  
95 - },  
96 - methods: {  
97 - onSubmit() {  
98 - console.log('submit!');  
99 - },  
100 - handleopen() {  
101 - console.log('handleopen');  
102 - },  
103 - handleclose() {  
104 - console.log('handleclose');  
105 - },  
106 - handleselect: function (a, b) { 76 + data() {
  77 + return {
  78 + sysName:'易通快速通关申报管理系统',
  79 + collapsed:false,
  80 + sysUserName: '',
  81 + sysUserAvatar: '',
  82 + form: {
  83 + name: '',
  84 + region: '',
  85 + date1: '',
  86 + date2: '',
  87 + delivery: false,
  88 + type: [],
  89 + resource: '',
  90 + desc: ''
  91 + }
  92 + }
  93 + },
  94 + methods: {
  95 + onSubmit() {
  96 + console.log('submit!');
  97 + },
  98 + handleopen() {
  99 + console.log('handleopen');
  100 + },
  101 + handleclose() {
  102 + console.log('handleclose');
  103 + },
  104 + handleselect: function (a, b) {
107 console.log('handleselect!'); 105 console.log('handleselect!');
108 - },  
109 - //退出登录  
110 - logout: function () {  
111 - var _this = this;  
112 - this.$confirm('确认退出吗?', '提示', {  
113 - //type: 'warning'  
114 - }).then(() => {  
115 - sessionStorage.removeItem('user'); 106 + },
  107 + //退出登录
  108 + logout: function () {
  109 + var _this = this;
  110 + this.$confirm('确认退出吗?', '提示', {
  111 + //type: 'warning'
  112 + }).then(() => {
  113 + sessionStorage.removeItem('user');
116 sessionStorage.removeItem('menu'); 114 sessionStorage.removeItem('menu');
117 115
118 //退出后初始化原来的路由 116 //退出后初始化原来的路由
119 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); 117 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
120 console.log(sysRoutes); 118 console.log(sysRoutes);
121 - _this.$router.options.routes = sysRoutes; 119 + _this.$router.options.routes = sysRoutes;
122 120
123 - _this.$router.push('/login');  
124 - }).catch(() => { 121 + _this.$router.push('/login');
  122 + }).catch(() => {
125 123
126 - }); 124 + });
127 125
128 126
129 - },  
130 - //折叠导航栏  
131 - collapse:function(){  
132 - this.collapsed=!this.collapsed;  
133 - },  
134 - showMenu(i,status){  
135 - this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none';  
136 - }  
137 - },  
138 - mounted() { 127 + },
  128 + //折叠导航栏
  129 + collapse:function(){
  130 + this.collapsed=!this.collapsed;
  131 + },
  132 + showMenu(i,status){
  133 + this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none';
  134 + }
  135 + },
  136 + mounted() {
139 var _this = this; 137 var _this = this;
140 - var user = sessionStorage.getItem('user');  
141 - if (user) {  
142 - user = JSON.parse(user);  
143 - this.sysUserName = user.username || '';  
144 - this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';  
145 - }  
146 - //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由  
147 - var userRouters = sessionStorage.getItem('menu');  
148 - if (userRouters) { 138 + var user = sessionStorage.getItem('user');
  139 + if (user) {
  140 + user = JSON.parse(user);
  141 + this.sysUserName = user.username || '';
  142 + this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
  143 + }
  144 + //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
  145 + var userRouters = sessionStorage.getItem('menu');
  146 + if (userRouters) {
149 userRouters = JSON.parse(userRouters); 147 userRouters = JSON.parse(userRouters);
150 _this.$router.options.routes = userRouters; 148 _this.$router.options.routes = userRouters;
151 console.log("home:"); 149 console.log("home:");
152 console.log(_this.$router.options.routes); 150 console.log(_this.$router.options.routes);
153 - }  
154 - }  
155 - } 151 + }
  152 + }
  153 + }
156 154
157 </script> 155 </script>
158 156
159 <style scoped lang="scss"> 157 <style scoped lang="scss">
160 - @import '~scss_vars'; 158 + @import '~scss_vars';
161 159
162 - .container {  
163 - position: absolute;  
164 - top: 0px;  
165 - bottom: 0px;  
166 - width: 100%;  
167 - .header {  
168 - height: 60px;  
169 - line-height: 60px;  
170 - background: $color-primary;  
171 - color:#fff;  
172 - .userinfo {  
173 - text-align: right;  
174 - padding-right: 35px;  
175 - float: right;  
176 - .userinfo-inner {  
177 - cursor: pointer;  
178 - color:#fff;  
179 - img {  
180 - width: 40px;  
181 - height: 40px;  
182 - border-radius: 20px;  
183 - margin: 10px 0px 10px 10px;  
184 - float: right;  
185 - }  
186 - }  
187 - }  
188 - .logo {  
189 - //width:230px;  
190 - height:60px;  
191 - font-size: 22px;  
192 - padding-left:20px;  
193 - padding-right:20px;  
194 - border-color: rgba(238,241,146,0.3);  
195 - border-right-width: 1px;  
196 - border-right-style: solid;  
197 - img {  
198 - width: 40px;  
199 - float: left;  
200 - margin: 10px 10px 10px 18px;  
201 - }  
202 - .txt {  
203 - color:#fff;  
204 - }  
205 - }  
206 - .logo-width{  
207 - width:230px;  
208 - }  
209 - .logo-collapse-width{  
210 - width:60px  
211 - }  
212 - .tools{  
213 - padding: 0px 23px;  
214 - width:14px;  
215 - height: 60px;  
216 - line-height: 60px;  
217 - cursor: pointer;  
218 - }  
219 - }  
220 - .main {  
221 - display: flex;  
222 - // background: #324057;  
223 - position: absolute;  
224 - top: 60px;  
225 - bottom: 0px;  
226 - overflow: hidden;  
227 - aside {  
228 - flex:0 0 230px;  
229 - width: 230px;  
230 - // position: absolute;  
231 - // top: 0px;  
232 - // bottom: 0px;  
233 - .el-menu{  
234 - height: 100%;  
235 - }  
236 - .collapsed{  
237 - width:60px;  
238 - .item{  
239 - position: relative;  
240 - }  
241 - .submenu{  
242 - position:absolute;  
243 - top:0px;  
244 - left:60px;  
245 - z-index:99999;  
246 - height:auto;  
247 - display:none;  
248 - } 160 + .container {
  161 + position: absolute;
  162 + top: 0px;
  163 + bottom: 0px;
  164 + width: 100%;
  165 + .header {
  166 + height: 60px;
  167 + line-height: 60px;
  168 + background: $color-primary;
  169 + color:#fff;
  170 + .userinfo {
  171 + text-align: right;
  172 + padding-right: 35px;
  173 + float: right;
  174 + .userinfo-inner {
  175 + cursor: pointer;
  176 + color:#fff;
  177 + img {
  178 + width: 40px;
  179 + height: 40px;
  180 + border-radius: 20px;
  181 + margin: 10px 0px 10px 10px;
  182 + float: right;
  183 + }
  184 + }
  185 + }
  186 + .logo {
  187 + //width:230px;
  188 + height:60px;
  189 + font-size: 22px;
  190 + padding-left:20px;
  191 + padding-right:20px;
  192 + border-color: rgba(238,241,146,0.3);
  193 + border-right-width: 1px;
  194 + border-right-style: solid;
  195 + img {
  196 + width: 40px;
  197 + float: left;
  198 + margin: 10px 10px 10px 18px;
  199 + }
  200 + .txt {
  201 + color:#fff;
  202 + }
  203 + }
  204 + .logo-width{
  205 + width:230px;
  206 + }
  207 + .logo-collapse-width{
  208 + width:60px
  209 + }
  210 + .tools{
  211 + padding: 0px 23px;
  212 + width:14px;
  213 + height: 60px;
  214 + line-height: 60px;
  215 + cursor: pointer;
  216 + }
  217 + }
  218 + .main {
  219 + display: flex;
  220 + // background: #324057;
  221 + position: absolute;
  222 + top: 60px;
  223 + bottom: 0px;
  224 + overflow: hidden;
  225 + aside {
  226 + flex:0 0 230px;
  227 + width: 230px;
  228 + // position: absolute;
  229 + // top: 0px;
  230 + // bottom: 0px;
  231 + .el-menu{
  232 + height: 100%;
  233 + }
  234 + .collapsed{
  235 + width:60px;
  236 + .item{
  237 + position: relative;
  238 + }
  239 + .submenu{
  240 + position:absolute;
  241 + top:0px;
  242 + left:60px;
  243 + z-index:99999;
  244 + height:auto;
  245 + display:none;
  246 + }
249 247
250 - }  
251 - }  
252 - .menu-collapsed{  
253 - flex:0 0 60px;  
254 - width: 60px;  
255 - }  
256 - .menu-expanded{  
257 - flex:0 0 230px;  
258 - width: 230px;  
259 - }  
260 - .menu-expanded ul{  
261 - width: 230px;  
262 - }  
263 - .content-container {  
264 - // background: #f1f2f7;  
265 - flex:1;  
266 - // position: absolute;  
267 - // right: 0px;  
268 - // top: 0px;  
269 - // bottom: 0px;  
270 - // left: 230px;  
271 - overflow-y: scroll;  
272 - padding: 20px;  
273 - .breadcrumb-container {  
274 - //margin-bottom: 15px;  
275 - .title {  
276 - width: 200px;  
277 - float: left;  
278 - color: #475669;  
279 - }  
280 - .breadcrumb-inner {  
281 - float: right;  
282 - }  
283 - }  
284 - .content-wrapper {  
285 - background-color: #fff;  
286 - box-sizing: border-box;  
287 - }  
288 - }  
289 - }  
290 - }  
291 -</style> 248 + }
  249 + }
  250 + .menu-collapsed{
  251 + flex:0 0 60px;
  252 + width: 60px;
  253 + }
  254 + .menu-expanded{
  255 + flex:0 0 230px;
  256 + width: 230px;
  257 + }
  258 + .menu-expanded ul{
  259 + width: 230px;
  260 + }
  261 + .content-container {
  262 + // background: #f1f2f7;
  263 + flex:1;
  264 + // position: absolute;
  265 + // right: 0px;
  266 + // top: 0px;
  267 + // bottom: 0px;
  268 + // left: 230px;
  269 + overflow-y: scroll;
  270 + padding: 20px;
  271 + .breadcrumb-container {
  272 + //margin-bottom: 15px;
  273 + .title {
  274 + width: 200px;
  275 + float: left;
  276 + color: #475669;
  277 + }
  278 + .breadcrumb-inner {
  279 + float: right;
  280 + }
  281 + }
  282 + .content-wrapper {
  283 + background-color: #fff;
  284 + box-sizing: border-box;
  285 + }
  286 + }
  287 + }
  288 + }
  289 +</style>
@@ -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,99 +442,7 @@ export default { @@ -440,99 +442,7 @@ export default {
440 maniWeight: undefined 442 maniWeight: undefined
441 }, 443 },
442 manifestCustoms: ['4604', '4620', '4613'], 444 manifestCustoms: ['4604', '4620', '4613'],
443 - data: [  
444 - {  
445 - id: 0,  
446 - waybillNo: '580-20728399',  
447 - houseWaybillNo: '',  
448 - custom: '4604',  
449 - flight: 'CV9733',  
450 - flightDate: '2019-06-21',  
451 - oriStation: 'LUX',  
452 - desStation: 'CGO',  
453 - maniPiece: 50,  
454 - maniWeight: 21321,  
455 - status: '41301',  
456 - customText: ' 预配舱单主要数据传输成功。',  
457 - customComplate: 25  
458 - },  
459 - {  
460 - id: 1,  
461 - waybillNo: '580-20728396',  
462 - houseWaybillNo: '',  
463 - custom: '4604',  
464 - flight: 'CV9731',  
465 - flightDate: '2019-06-21',  
466 - oriStation: 'LUX',  
467 - desStation: 'CGO',  
468 - maniPiece: 50,  
469 - maniWeight: 21321,  
470 - status: 'wrong',  
471 - customText: ' 预配回执异常 ',  
472 - customComplate: 25,  
473 - children: [  
474 - {  
475 - id: 2,  
476 - waybillNo: '580-20728396',  
477 - houseWaybillNo: 'ADDSS21231',  
478 - custom: '4604',  
479 - flight: 'CV9731',  
480 - flightDate: '2019-06-21',  
481 - oriStation: 'LUX',  
482 - desStation: 'CGO',  
483 - maniPiece: 50,  
484 - maniWeight: 21321,  
485 - status: '10002',  
486 - customText: ' 已暂存',  
487 - customComplate: 0  
488 - },  
489 - {  
490 - id: 3,  
491 - waybillNo: '580-20728396',  
492 - houseWaybillNo: 'SDE3411',  
493 - custom: '4604',  
494 - flight: 'CV9731',  
495 - flightDate: '2019-06-21',  
496 - oriStation: 'LUX',  
497 - desStation: 'CGO',  
498 - maniPiece: 50,  
499 - maniWeight: 21321,  
500 - status: '45103',  
501 - customText: ' 45103 该提(运)单的运抵报告重复申报,海关审核不通过。 关区代码:4604。',  
502 - customComplate: 100  
503 - },  
504 - {  
505 - id: 4,  
506 - waybillNo: '580-20728396',  
507 - houseWaybillNo: 'SDE3411',  
508 - custom: '4604',  
509 - flight: 'CV9731',  
510 - flightDate: '2019-06-21',  
511 - oriStation: 'LUX',  
512 - desStation: 'CGO',  
513 - maniPiece: 50,  
514 - maniWeight: 21321,  
515 - status: '10000',  
516 - customText: ' 已删除 ',  
517 - customComplate: 50  
518 - }  
519 - ]  
520 - },  
521 - {  
522 - id: 4,  
523 - waybillNo: '580-20728391',  
524 - houseWaybillNo: '',  
525 - custom: '4604',  
526 - flight: 'KA740',  
527 - flightDate: '2019-06-29',  
528 - oriStation: 'LUX',  
529 - desStation: 'CGO',  
530 - maniPiece: 50,  
531 - maniWeight: 21321,  
532 - status: '10003',  
533 - customText: ' 已发送预配舱单 '  
534 - }  
535 - ], 445 +
536 pickerOptions: { 446 pickerOptions: {
537 shortcuts: [ 447 shortcuts: [
538 { 448 {
@@ -580,6 +490,10 @@ export default { @@ -580,6 +490,10 @@ export default {
580 } 490 }
581 } 491 }
582 }, 492 },
  493 + created(){
  494 + console.log(this.$route.params.scopeRow)
  495 + this.getList()
  496 + },
583 methods: { 497 methods: {
584 message(row) { 498 message(row) {
585 this.$message.info(row.event) 499 this.$message.info(row.event)
@@ -624,7 +538,369 @@ export default { @@ -624,7 +538,369 @@ export default {
624 row.status = status 538 row.status = status
625 }, 539 },
626 getList() { 540 getList() {
  541 + this.tableData = [
  542 + {
  543 + id: 0,
  544 + waybillNo: '580-20728399',
  545 + houseWaybillNo: '',
  546 + custom: '4604',
  547 + flight: 'CV9733',
  548 + flightDate: '2019-06-21',
  549 + oriStation: 'LUX',
  550 + desStation: 'CGO',
  551 + maniPiece: 50,
  552 + maniWeight: 21321,
  553 + status: '41301',
  554 + customText: ' 预配舱单主要数据传输成功。',
  555 + customComplate: 25
  556 + },
  557 + {
  558 + id: 1,
  559 + waybillNo: '580-20728396',
  560 + houseWaybillNo: '',
  561 + custom: '4604',
  562 + flight: 'CV9731',
  563 + flightDate: '2019-06-21',
  564 + oriStation: 'LUX',
  565 + desStation: 'CGO',
  566 + maniPiece: 50,
  567 + maniWeight: 21321,
  568 + status: 'wrong',
  569 + customText: ' 预配回执异常 ',
  570 + customComplate: 25,
  571 + children: [
  572 + {
  573 + id: 2,
  574 + waybillNo: '580-20728396',
  575 + houseWaybillNo: 'ADDSS21231',
  576 + custom: '4604',
  577 + flight: 'CV9731',
  578 + flightDate: '2019-06-21',
  579 + oriStation: 'LUX',
  580 + desStation: 'CGO',
  581 + maniPiece: 50,
  582 + maniWeight: 21321,
  583 + status: '10002',
  584 + customText: ' 已暂存',
  585 + customComplate: 0
  586 + },
  587 + {
  588 + id: 3,
  589 + waybillNo: '580-20728396',
  590 + houseWaybillNo: 'SDE3411',
  591 + custom: '4604',
  592 + flight: 'CV9731',
  593 + flightDate: '2019-06-21',
  594 + oriStation: 'LUX',
  595 + desStation: 'CGO',
  596 + maniPiece: 50,
  597 + maniWeight: 21321,
  598 + status: '45103',
  599 + customText: ' 45103 该提(运)单的运抵报告重复申报,海关审核不通过。 关区代码:4604。',
  600 + customComplate: 100
  601 + },
  602 + {
  603 + id: 4,
  604 + waybillNo: '580-20728396',
  605 + houseWaybillNo: 'SDE3411',
  606 + custom: '4604',
  607 + flight: 'CV9731',
  608 + flightDate: '2019-06-21',
  609 + oriStation: 'LUX',
  610 + desStation: 'CGO',
  611 + maniPiece: 50,
  612 + maniWeight: 21321,
  613 + status: '10000',
  614 + customText: ' 已删除 ',
  615 + customComplate: 50
  616 + }
  617 + ]
  618 + },
  619 + {
  620 + id: 4,
  621 + waybillNo: '580-20728391',
  622 + houseWaybillNo: '',
  623 + custom: '4604',
  624 + flight: 'KA740',
  625 + flightDate: '2019-06-29',
  626 + oriStation: 'LUX',
  627 + desStation: 'CGO',
  628 + maniPiece: 50,
  629 + maniWeight: 21321,
  630 + status: '10003',
  631 + customText: ' 已发送预配舱单 '
  632 + },
  633 + {
  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
  647 + },
  648 + {
  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
  662 + },
  663 + {
  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
  677 + },
  678 + {
  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
  692 + },
  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
  707 + },
  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
  722 + },
  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
  737 + },
  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
  752 + },
  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
  781 + },
  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
  796 + },
  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
  811 + },
  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
  826 + },
  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
  841 + },
  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>
@@ -16,18 +16,22 @@ @@ -16,18 +16,22 @@
16 </el-col> 16 </el-col>
17 17
18 <!--列表--> 18 <!--列表-->
19 - <el-table :data="roles" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"> 19 + <el-table :data="roles" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"
  20 + default-expand-all
  21 + row-key="roleId"
  22 + border
  23 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
20 <el-table-column type="selection" width="55"> 24 <el-table-column type="selection" width="55">
21 </el-table-column> 25 </el-table-column>
22 <el-table-column type="index" width="60"> 26 <el-table-column type="index" width="60">
23 </el-table-column> 27 </el-table-column>
24 - <el-table-column prop="roleId" label="ID" width="100" sortable>  
25 - </el-table-column> 28 + <!--<el-table-column prop="roleId" label="ID" width="100" sortable>-->
  29 + <!--</el-table-column>-->
26 <el-table-column prop="roleName" label="岗位/角色名称" min-width="200" sortable> 30 <el-table-column prop="roleName" label="岗位/角色名称" min-width="200" sortable>
27 </el-table-column> 31 </el-table-column>
28 - <el-table-column prop="departmentName" label="部门名称" min-width="200" sortable>  
29 - </el-table-column>  
30 - <el-table-column prop="description" label="岗位/角色描述" min-width="200" sortable> 32 + <!--<el-table-column prop="departmentName" label="部门名称" min-width="200" sortable>-->
  33 + <!--</el-table-column>-->
  34 + <el-table-column prop="description" label="描述" min-width="200" sortable>
31 </el-table-column> 35 </el-table-column>
32 <el-table-column label="操作" min-width="260"> 36 <el-table-column label="操作" min-width="260">
33 <template slot-scope="scope"> 37 <template slot-scope="scope">
@@ -37,7 +41,6 @@ @@ -37,7 +41,6 @@
37 </template> 41 </template>
38 </el-table-column> 42 </el-table-column>
39 </el-table> 43 </el-table>
40 -  
41 <!--工具条--> 44 <!--工具条-->
42 <el-col :span="24" class="toolbar"> 45 <el-col :span="24" class="toolbar">
43 <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> 46 <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button>
@@ -168,10 +168,10 @@ @@ -168,10 +168,10 @@
168 <el-form-item label="账号"> 168 <el-form-item label="账号">
169 <span>{{roleEditForm.username}}</span> 169 <span>{{roleEditForm.username}}</span>
170 </el-form-item> 170 </el-form-item>
171 - <el-checkbox-group v-model="roleIds" size="small">  
172 - <el-checkbox-button v-for="role in roles" :label="role.roleId" :key="role.roleId" >{{role.description}}</el-checkbox-button>  
173 - </el-checkbox-group> 171 + <el-tree :data="roles" :props="treeDefaultProps" show-checkbox node-key="roleId" ref="tree">
  172 + </el-tree>
174 </el-form> 173 </el-form>
  174 +
175 <div slot="footer" class="dialog-footer"> 175 <div slot="footer" class="dialog-footer">
176 <el-button @click.native="roleFormVisible = false">取消</el-button> 176 <el-button @click.native="roleFormVisible = false">取消</el-button>
177 <el-button type="primary" @click.native="roleEditSubmit" :loading="addLoading">提交</el-button> 177 <el-button type="primary" @click.native="roleEditSubmit" :loading="addLoading">提交</el-button>
@@ -193,6 +193,10 @@ @@ -193,6 +193,10 @@
193 userName: '', 193 userName: '',
194 realName: '' 194 realName: ''
195 }, 195 },
  196 + treeDefaultProps: {
  197 + children: 'children',
  198 + label: 'roleName',
  199 + },
196 users: [], 200 users: [],
197 total: 0, 201 total: 0,
198 pageNum: 1, 202 pageNum: 1,
  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" v-if="isAdmin" @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,validatorNum} 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 + const validatorNums = (rule, value, callback) => {
  324 + if (!validatorNum(value)) {
  325 + callback("只能输入数字,并且小数位最多两位")
  326 + }
  327 + callback()
  328 + }
  329 + return {
  330 + func: treeToArray,
  331 + total: 1,
  332 + isAdmin: false,
  333 + arriveQuery: {
  334 + pageSize: 1,
  335 + limitSize: 100,
  336 + awba: undefined,
  337 + carrier: undefined,
  338 + flightno: undefined,
  339 + flightdate: undefined,
  340 + originstation: undefined,
  341 + destinationstation: undefined,
  342 + customcode: undefined
  343 + },
  344 + dialogMap: {
  345 + update: '编辑出港运抵',
  346 + create: '添加出港运抵',
  347 + },
  348 + dialogTableVisible: false,
  349 + multipleSelection: [],
  350 + customcodeList: [4604, 4620],
  351 + dialogStatus: undefined,
  352 + awbhStatus: false,
  353 + dialogFormVisible: false,
  354 + listLoading: false,
  355 + arriveRoles: {
  356 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  357 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  358 + goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
  359 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  360 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  361 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  362 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  363 + weight: [{required: true, trigger: 'change', validator: validatorNums}],
  364 + piece: [{required: true, trigger: 'change', validator: validatorNums}],
  365 + },
  366 + arriveData: [],
  367 + detailData: [],
  368 + arriveModel: {
  369 + carrier: undefined,
  370 + flightno: undefined,
  371 + flightdate: undefined,
  372 + originstation: undefined,
  373 + destinationstation: undefined,
  374 + awba: undefined,
  375 + awbh: undefined,
  376 + piece: undefined,
  377 + weight: undefined,
  378 + goodsname: undefined,
  379 + customcode: undefined,
  380 + arrivetime: undefined,
  381 + messageType: 'MT3201'
  382 + }
  383 + }
  384 + },
  385 + created() {
  386 + if (this.$route.params.flightData !== undefined) {
  387 + // 给查询条件赋值
  388 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  389 + this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
  390 + }
  391 +
  392 + this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  393 + this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  394 + this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
  395 + this.arriveQuery.originstation = this.$route.params.flightData.originstation
  396 + this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation
  397 + this.getList()
  398 + }
  399 + let username = JSON.parse(sessionStorage.getItem('user')).username
  400 + if(username === 'admin'){
  401 + this.isAdmin = true
  402 + }
  403 + },
  404 + computed: {
  405 + awba: {
  406 + get: function () {
  407 + return this.arriveQuery.awba
  408 + },
  409 + set: function (val) {
  410 + this.arriveQuery.awba = val.trim()
  411 + }
  412 + },
  413 + awbh: {
  414 + get: function () {
  415 + return this.arriveModel.awbh
  416 + },
  417 + set: function (val) {
  418 + this.arriveModel.awbh = val.toUpperCase().trim()
  419 + }
  420 + },
  421 + carrier: {
  422 + get: function () {
  423 + return this.arriveModel.carrier
  424 + },
  425 + set: function (val) {
  426 + this.arriveModel.carrier = val.toUpperCase().trim()
  427 + }
  428 + },
  429 + goodsname: {
  430 + get: function () {
  431 + return this.arriveModel.goodsname
  432 + },
  433 + set: function (val) {
  434 + this.arriveModel.goodsname = val.toUpperCase().trim()
  435 + }
  436 + },
  437 + flightno: {
  438 + get: function () {
  439 + return this.arriveModel.flightno
  440 + },
  441 + set: function (val) {
  442 + this.arriveModel.flightno = val.toUpperCase().trim()
  443 + }
  444 + },
  445 + originstation: {
  446 + get: function () {
  447 + return this.arriveModel.originstation
  448 + },
  449 + set: function (val) {
  450 + this.arriveModel.originstation = val.toUpperCase().trim()
  451 + }
  452 + },
  453 + destinationstation: {
  454 + get: function () {
  455 + return this.arriveModel.destinationstation
  456 + },
  457 + set: function (val) {
  458 + this.arriveModel.destinationstation = val.toUpperCase().trim()
  459 + }
  460 + }
  461 + },
  462 + methods: {
  463 + getList() {
  464 + this.listLoading = true
  465 + if (this.arriveQuery.awba !== undefined) {
  466 + getMt3201ListForParam(this.arriveQuery).then(res => {
  467 + this.arriveData = res.data.dataList
  468 + this.total = res.data.count
  469 + if (res.data.count > 0) {
  470 + this.arriveQuery.carrier = this.arriveData[0].carrier
  471 + this.arriveQuery.flightno = this.arriveData[0].flightno
  472 + this.arriveQuery.flightdate = this.arriveData[0].flightdate
  473 + this.arriveQuery.originstation = this.arriveData[0].originstation
  474 + this.arriveQuery.destinationstation = this.arriveData[0].destinationstation
  475 + this.arriveQuery.customcode = this.arriveData[0].customcode
  476 + }
  477 + setTimeout(() => {
  478 + this.listLoading = false
  479 + }, 1.5 * 1000)
  480 + })
  481 + } else {
  482 + getMt3201ListForParam(this.arriveQuery).then(res => {
  483 + this.arriveData = res.data.dataList
  484 + this.total = res.data.count
  485 + setTimeout(() => {
  486 + this.listLoading = false
  487 + }, 1.5 * 1000)
  488 + })
  489 + }
  490 +
  491 + },
  492 + handleSerach() {
  493 + this.arriveQuery.carrier = undefined
  494 + this.arriveQuery.flightno = undefined
  495 + this.arriveQuery.originstation = undefined
  496 + this.arriveQuery.flightdate = undefined
  497 + this.arriveQuery.destinationstation = undefined
  498 + this.getList()
  499 + },
  500 + handleSelectionChange(val) {
  501 + this.multipleSelection = val
  502 + },
  503 + // 新增出港运抵
  504 + handelAddArriveInfo() {
  505 + this.restModel()
  506 + // 给model赋值,所使用数据是以单独单号查询数据所得
  507 + this.arriveModel.carrier = this.arriveQuery.carrier
  508 + this.arriveModel.flightdate = this.arriveQuery.flightdate
  509 + this.arriveModel.flightno = this.arriveQuery.flightno
  510 + this.arriveModel.originstation = this.arriveQuery.originstation
  511 + this.arriveModel.destinationstation = this.arriveQuery.destinationstation
  512 + this.arriveModel.customcode = this.arriveQuery.customcode
  513 + this.dialogStatus = 'create'
  514 + this.dialogFormVisible = true
  515 + this.$nextTick(() => {
  516 + this.$refs.arriveFormData.clearValidate()
  517 + })
  518 + },
  519 + createData() {
  520 + this.$refs.arriveFormData.validate(valid => {
  521 + if (valid) {
  522 + addMt3201(this.arriveModel).then(res => {
  523 + if (res.data.count > 0) {
  524 + this.dialogFormVisible = false
  525 + Message.success("出港运抵新增成功")
  526 + this.getList()
  527 + } else {
  528 + Message.error("数据更新失败,请检查数据")
  529 + }
  530 + })
  531 + }
  532 + })
  533 +
  534 + },
  535 +
  536 + // 重置实体
  537 + restModel() {
  538 + this.arriveModel = {
  539 + carrier: undefined,
  540 + flightno: undefined,
  541 + flightdate: undefined,
  542 + originstation: undefined,
  543 + destinationstation: undefined,
  544 + awba: undefined,
  545 + awbh: undefined,
  546 + piece: undefined,
  547 + weight: undefined,
  548 + goodsname: undefined,
  549 + customcode: undefined,
  550 + arrivetime: undefined,
  551 + }
  552 + },
  553 + // 编辑
  554 + handleEdit(row) {
  555 + this.arriveModel = Object.assign({}, row) // copy obj
  556 + this.dialogStatus = 'update'
  557 + this.dialogFormVisible = true
  558 + this.$nextTick(() => {
  559 + this.$refs.arriveFormData.clearValidate()
  560 + })
  561 + },
  562 + updateData() {
  563 + this.$refs.arriveFormData.validate(valid => {
  564 + if (valid) {
  565 + updateMT3201(this.arriveModel).then(res => {
  566 + if (res.data.count > 0) {
  567 + this.dialogFormVisible = false
  568 + Message.success("出港运抵修改成功")
  569 + this.getList()
  570 + } else {
  571 + Message.error("数据更新失败,请检查数据")
  572 + }
  573 + })
  574 + }
  575 +
  576 + })
  577 + },
  578 + //保存并发送
  579 + SaveAndSend() {
  580 +
  581 + },
  582 + // 收发明细
  583 + handleSend(row) {
  584 + const resQuery = {
  585 + carrier: row.carrier,
  586 + flightNo: row.flightno,
  587 + flightDate: row.flightdate,
  588 + awba: row.awba,
  589 + awbh: row.awbh,
  590 + messageType: 'MT3201'
  591 + }
  592 + this.dialogTableVisible = true
  593 + getResponseForParam(resQuery).then(res => {
  594 + this.detailData = res.data
  595 + })
  596 + },
  597 + // 发送舱单报
  598 + handleAwbSend() {
  599 +
  600 + },
  601 + // 发送修改报
  602 + handleAwbEdit() {
  603 +
  604 + },
  605 + //发送删除报
  606 + handleAwbDelete(row) {
  607 + this.$confirm("是否删除", "确认消息", {
  608 + distinguishCancelAndClose: true,
  609 + confirmButtonText: '删除',
  610 + cancelButtonText: '取消'
  611 + }).then(() => {
  612 + deleteByIsDelete(row).then(res => {
  613 + if (res.data.count > 0) {
  614 + this.$message({
  615 + type: 'success',
  616 + message: '删除成功'
  617 + })
  618 + this.getList()
  619 + } else {
  620 + this.$message({
  621 + type: 'danger',
  622 + message: '删除异常,请稍后重试'
  623 + })
  624 + }
  625 + })
  626 + }).catch(action => {
  627 + this.$message({
  628 + type: 'info',
  629 + message: action === 'cancel'
  630 + ? '取消删除'
  631 + : '删除取消'
  632 + })
  633 + })
  634 + },
  635 + //更改状态
  636 + handleAwbStatus(row) {
  637 + this.$confirm("是否发送更改状态", "确认消息", {
  638 + distinguishCancelAndClose: true,
  639 + confirmButtonText: '确认更改',
  640 + cancelButtonText: '取消更改'
  641 + }).then(() => {
  642 + updateStatus(row).then(res => {
  643 + if (res.data.count > 0) {
  644 + this.$message({
  645 + type: 'success',
  646 + message: '当前运单状态已更改'
  647 + })
  648 + this.getList()
  649 + } else {
  650 + this.$message({
  651 + type: 'error',
  652 + message: '状态更改失败,请稍后重试'
  653 + })
  654 + }
  655 + })
  656 +
  657 + }).catch(action => {
  658 + this.$message({
  659 + type: 'info',
  660 + message: action === 'cancel'
  661 + ? '取消状态更改'
  662 + : '状态更改取消'
  663 + })
  664 + })
  665 + },
  666 + // 携数据跳转 新增运抵
  667 + handleAddArrive() {
  668 + const row = {
  669 + 'messageType': 'MT3201'
  670 + }
  671 + this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
  672 + },
  673 + handelBackStep() {
  674 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
  675 + }
  676 +
  677 + }
  678 + }
  679 +
  680 +</script>
  681 +
  682 +<style>
  683 + .grid-content {
  684 + height: 36px;
  685 + line-height: 36px;
  686 + }
  687 +
  688 + .content {
  689 + border-left: 4px #409EFF solid;
  690 + padding-left: 10px;
  691 + background-color: #f9fafc;
  692 + margin-bottom: 2px
  693 + }
  694 +
  695 + .row-bg, .co {
  696 + background-color: white;
  697 + }
  698 +
  699 + .titleSpan {
  700 + font-weight: bold;
  701 + margin-right: 35px;
  702 + }
  703 +
  704 + .el-row {
  705 + margin-top: 10px;
  706 + margin-bottom: 0px;
  707 + }
  708 +
  709 + .btnFoot {
  710 + margin-top: 10px;
  711 + }
  712 +
  713 + .el-table td, .el-table th {
  714 + text-align: center
  715 + }
  716 +
  717 + .el-btn {
  718 + margin-left: 10px;
  719 + display: inline-block;
  720 + }
  721 +</style>
  722 +
  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" v-if="isAdmin" @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="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="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 + </el-col>
  215 + </el-row>
  216 + <el-row>
  217 + <el-col :span="7.5">
  218 + <el-form-item label="特货代码" prop="awbh">
  219 + <el-input v-model="loadingModel.specialgoods"></el-input>
  220 + </el-form-item>
  221 + </el-col>
  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-row>
  228 + </el-form>
  229 + <div slot="footer" class="dialog-footer">
  230 + <el-button @click="dialogFormVisible = false">取消</el-button>
  231 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  232 + <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
  233 + </div>
  234 + </el-dialog>
  235 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  236 + <el-table :data="detailData" border>
  237 + <el-table-column label="操作时间" width="150">
  238 + <template slot-scope="scope">
  239 + {{scope.row.busdate}}
  240 + </template>
  241 + </el-table-column>
  242 + <el-table-column label="航班号" width="80">
  243 + <template slot-scope="scope">
  244 + {{scope.row.carrier}}{{scope.row.flightno}}
  245 + </template>
  246 + </el-table-column>
  247 + <el-table-column label="航班日期" width="100">
  248 + <template slot-scope="scope">
  249 + {{scope.row.flightdate}}
  250 + </template>
  251 + </el-table-column>
  252 + <el-table-column label="件数" width="70">
  253 + <template slot-scope="scope">
  254 + {{scope.row.buspiece}}
  255 + </template>
  256 + </el-table-column>
  257 + <el-table-column label="重量" width="70">
  258 + <template slot-scope="scope">
  259 + {{scope.row.busweight}}
  260 + </template>
  261 + </el-table-column>
  262 + <el-table-column label="回执信息" width="">
  263 + <template slot-scope="scope">
  264 + {{scope.row.cusrestext}}
  265 + </template>
  266 + </el-table-column>
  267 + <el-table-column label="操作人" width="100">
  268 + <template slot-scope="scope">
  269 + {{scope.row.operusername}}
  270 + </template>
  271 + </el-table-column>
  272 + </el-table>
  273 + </el-dialog>
  274 + </div>
  275 + </div>
  276 +</template>
  277 +<script>
  278 + import treeTable from '@/components/TreeTable'
  279 + import treeToArray from '@/utils/customEval'
  280 + import Pagination from '@/components/Pagination'
  281 + import {getMt4201ListForParam, deleteByIsDelete, updateStatus, updateMT4201, addMt4201} from '@/api/exitLoading'
  282 + import {Message} from "element-ui";
  283 + import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
  284 + export default {
  285 + name: "ExitLoading",
  286 + components: {treeTable, Pagination},
  287 + inject: ['reload'],
  288 + data() {
  289 + const validatorAwb = (rule, value, callback) => {
  290 + if (!validAwb(value)) {
  291 + callback("请正确书写主单号")
  292 + }
  293 + callback()
  294 + }
  295 + const validatorAwbh = (rule, value, callback) => {
  296 + if (!validAlphabetsAndNum(value)) {
  297 + callback("只能输入字母和数字")
  298 + }
  299 + callback()
  300 + }
  301 + const validatorAlphabets = (rule, value, callback) => {
  302 + if (!validAlphabets(value)) {
  303 + callback("只能输入字母")
  304 + }
  305 + callback()
  306 + }
  307 + const validAlphabetsSpanceKey = (rule,value,callback) =>{
  308 + if(!validAlphabetsAndSpanceKey(value)){
  309 + callback("只能输入字母、数字、空格")
  310 + }
  311 + callback()
  312 + }
  313 + const validatorNums = (rule, value, callback) => {
  314 + if (!validatorNum(value)) {
  315 + callback("只能输入数字,并且小数位最多两位")
  316 + }
  317 + callback()
  318 + }
  319 + return {
  320 + func: treeToArray,
  321 + total: 1,
  322 + isAdmin:false,
  323 + dialogMap: {
  324 + update: '编辑出港装载',
  325 + create: '添加出港装载',
  326 + },
  327 + customcodeList: [4604, 4620],
  328 + dialogStatus: undefined,
  329 + dialogTableVisible: false,
  330 + dialogFormVisible: false,
  331 + listLoading: false,
  332 + loadingQuery: {
  333 + pageSize: 1,
  334 + limitSize: 100,
  335 + awba: undefined,
  336 + carrier: undefined,
  337 + flightno: undefined,
  338 + flightdate: undefined,
  339 + originstation: undefined,
  340 + destinationstation: undefined,
  341 + customcode: undefined
  342 + },
  343 + loadingRoles: {
  344 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  345 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  346 + goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
  347 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  348 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  349 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  350 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  351 + piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  352 + weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
  353 + customcode:[{required: true, trigger: 'change',message:'不能为空'}]
  354 + },
  355 + loadingData: [],
  356 + detailData: [],
  357 + loadingModel: {
  358 + carrier:undefined,
  359 + flightno: undefined,
  360 + flightdate: undefined,
  361 + originstation: undefined,
  362 + destinationstation: undefined,
  363 + awba: undefined,
  364 + lodingpiece: undefined,
  365 + lodingweight: undefined,
  366 + goodsname: undefined,
  367 + customcode: undefined,
  368 + specialgoods: undefined,
  369 + loadingtime: undefined,
  370 + messageType: 'MT4201',
  371 + awbprice: undefined,
  372 + awbweight: undefined
  373 + }
  374 + }
  375 + },
  376 + created() {
  377 + if (this.$route.params.flightData !== undefined) {
  378 + // 给查询条件赋值
  379 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  380 + this.loadingQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + '-' + this.$route.params.flightData.awba.substring(3)
  381 + }
  382 + this.loadingQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  383 + this.loadingQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  384 + this.loadingQuery.flightdate = this.$route.params.flightData.flightdate
  385 + this.loadingQuery.originstation = this.$route.params.flightData.originstation
  386 + this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation
  387 + this.getList()
  388 + }
  389 + let username = JSON.parse(sessionStorage.getItem('user')).username
  390 + if(username === 'admin'){
  391 + this.isAdmin = true
  392 + }
  393 + },
  394 + computed: {
  395 + carrier: {
  396 + get: function () {
  397 + return this.loadingModel.carrier
  398 + },
  399 + set: function (val) {
  400 + this.loadingModel.carrier = val.toUpperCase().trim()
  401 + }
  402 + },
  403 + goodsname: {
  404 + get: function () {
  405 + return this.loadingModel.goodsname
  406 + },
  407 + set: function (val) {
  408 + this.loadingModel.goodsname = val.toUpperCase().trim()
  409 + }
  410 + },
  411 + flightno: {
  412 + get: function () {
  413 + return this.loadingModel.flightno
  414 + },
  415 + set: function (val) {
  416 + this.loadingModel.flightno = val.toUpperCase().trim()
  417 + }
  418 + },
  419 + originstation: {
  420 + get: function () {
  421 + return this.loadingModel.originstation
  422 + },
  423 + set: function (val) {
  424 + this.loadingModel.originstation = val.toUpperCase().trim()
  425 + }
  426 + },
  427 + destinationstation: {
  428 + get: function () {
  429 + return this.loadingModel.destinationstation
  430 + },
  431 + set: function (val) {
  432 + this.loadingModel.destinationstation = val.toUpperCase().trim()
  433 + }
  434 + }
  435 + },
  436 + methods: {
  437 + getList() {
  438 + this.listLoading = true
  439 + if (this.loadingQuery.awba !== undefined && this.loadingQuery.awba !== '') {
  440 + getMt4201ListForParam(this.loadingQuery).then(res => {
  441 + this.loadingData = res.data.dataList
  442 + this.total = res.data.count
  443 + if (res.data.count > 0) {
  444 + this.loadingQuery.carrier = this.loadingData[0].carrier
  445 + this.loadingQuery.flightno = this.loadingData[0].flightno
  446 + this.loadingQuery.flightdate = this.loadingData[0].flightdate
  447 + this.loadingQuery.originstation = this.loadingData[0].originstation
  448 + this.loadingQuery.destinationstation = this.loadingData[0].destinationstation
  449 + this.loadingQuery.customcode = this.loadingData[0].customcode
  450 + }
  451 + setTimeout(() => {
  452 + this.listLoading = false
  453 + }, 1.5 * 1000)
  454 + })
  455 + } else {
  456 + getMt4201ListForParam(this.loadingQuery).then(res => {
  457 + this.loadingData = res.data.dataList
  458 + this.total = res.data.count
  459 + setTimeout(() => {
  460 + this.listLoading = false
  461 + }, 1.5 * 1000)
  462 + })
  463 + }
  464 +
  465 + },
  466 + // 多选
  467 + handleSelectionChange() {
  468 +
  469 + },
  470 + // 查询
  471 + handleSearch() {
  472 + this.loadingQuery.carrier = undefined
  473 + this.loadingQuery.flightno = undefined
  474 + this.loadingQuery.originstation = undefined
  475 + this.loadingQuery.flightdate = undefined
  476 + this.loadingQuery.destinationstation = undefined
  477 + this.getList()
  478 + },
  479 + // 收发明细
  480 + handleSend() {
  481 + const resQuery = {
  482 + carrier: row.carrier,
  483 + flightNo: row.flightno,
  484 + flightDate: row.flightdate,
  485 + awba: row.awba,
  486 + awbh: row.awbh,
  487 + messageType: 'MT4201'
  488 + }
  489 + this.dialogTableVisible = true
  490 + getResponseForParam(resQuery).then(res => {
  491 + this.detailData = res.data
  492 + })
  493 + },
  494 + // 编辑 弹框
  495 + handleEdit(row) {
  496 + this.loadingModel = Object.assign({}, row)
  497 + console.log(this.loadingModel)
  498 + this.dialogStatus = 'update'
  499 + this.dialogFormVisible = true
  500 + this.$nextTick(() => {
  501 + this.$refs.loadingFormData.clearValidate()
  502 + })
  503 + },
  504 + // 更新数据
  505 + updateData() {
  506 + this.$refs.loadingFormData.validate(valid => {
  507 + if (valid) {
  508 + updateMT4201(this.loadingModel).then(res => {
  509 + if (res.data.count > 0) {
  510 + this.dialogFormVisible = false
  511 + Message.success("数据更新成功")
  512 + this.getList()
  513 + } else {
  514 + Message.error("数据更新失败,请检查数据")
  515 + }
  516 + })
  517 + }
  518 + })
  519 + },
  520 +
  521 + // 发送舱单报
  522 + handleSendAwb() {
  523 +
  524 + },
  525 + // 删除 发送删除报
  526 + handleAwbDelete(row) {
  527 + this.$confirm("是否删除", "确认消息", {
  528 + distinguishCancelAndClose: true,
  529 + confirmButtonText: '删除',
  530 + cancelButtonText: '取消'
  531 + }).then(() => {
  532 + deleteByIsDelete(row).then(res => {
  533 + if (res.data.count > 0) {
  534 + this.$message({
  535 + type: 'success',
  536 + message: '删除成功'
  537 + })
  538 + this.getList()
  539 + } else {
  540 + this.$message({
  541 + type: 'danger',
  542 + message: '删除异常,请稍后重试'
  543 + })
  544 + }
  545 + })
  546 + }).catch(action => {
  547 + this.$message({
  548 + type: 'info',
  549 + message: action === 'cancel'
  550 + ? '取消删除'
  551 + : '删除取消'
  552 + })
  553 + })
  554 + },
  555 + // 更改当前运单发送状态
  556 + handleAwbStatus(row) {
  557 + this.$confirm("是否发送更改状态", "确认消息", {
  558 + distinguishCancelAndClose: true,
  559 + confirmButtonText: '确认更改',
  560 + cancelButtonText: '取消更改'
  561 + }).then(() => {
  562 + updateStatus(row).then(res => {
  563 + if (res.data.count > 0) {
  564 + this.$message({
  565 + type: 'success',
  566 + message: '当前运单状态已更改'
  567 + })
  568 + this.getList()
  569 + } else {
  570 + this.$message({
  571 + type: 'error',
  572 + message: '状态更改失败,请稍后重试'
  573 + })
  574 + }
  575 + })
  576 +
  577 + }).catch(action => {
  578 + this.$message({
  579 + type: 'info',
  580 + message: action === 'cancel'
  581 + ? '取消状态更改'
  582 + : '状态更改取消'
  583 + })
  584 + })
  585 + },
  586 + // 保存并发送
  587 + handleSaveAndSend() {
  588 +
  589 + },
  590 + // 重置实体
  591 + restModel() {
  592 + this.loadingModel = {
  593 + carrier:undefined,
  594 + flightno: undefined,
  595 + flightdate: undefined,
  596 + originstation: undefined,
  597 + destinationstation: undefined,
  598 + awba: undefined,
  599 + lodingpiece: undefined,
  600 + lodingweight: undefined,
  601 + goodsname: undefined,
  602 + customcode: undefined,
  603 + specialgoods: undefined,
  604 + loadingtime: undefined,
  605 + messageType: 'MT4201',
  606 + awbprice: undefined,
  607 + awbweight: undefined
  608 + }
  609 + },
  610 + // 新增出港装载 弹框
  611 + handelAddLoadingInfo() {
  612 + this.restModel()
  613 + // 给model赋值,所使用数据是以单独单号查询数据所得
  614 + this.loadingModel.carrier = this.loadingQuery.carrier
  615 + this.loadingModel.flightdate = this.loadingQuery.flightdate
  616 + this.loadingModel.flightno = this.loadingQuery.flightno
  617 + this.loadingModel.originstation = this.loadingQuery.originstation
  618 + this.loadingModel.destinationstation = this.loadingQuery.destinationstation
  619 + this.loadingModel.customcode = this.loadingQuery.customcode
  620 + this.dialogStatus = 'create'
  621 + this.dialogFormVisible = true
  622 + this.$nextTick(() => {
  623 + this.$refs.loadingFormData.clearValidate()
  624 + })
  625 + },
  626 + // 新增出港装载 请求
  627 + createData() {
  628 + this.$refs.loadingFormData.validate(valid => {
  629 + if (valid) {
  630 + addMt4201(this.loadingModel).then(res => {
  631 + if (res.data.count > 0) {
  632 + this.dialogFormVisible = false
  633 + Message.success("新增出港装载成功")
  634 + this.getList()
  635 + } else {
  636 + Message.error("数据新增失败,请检查数据")
  637 + }
  638 + })
  639 + }
  640 + })
  641 + },
  642 + handleAddLoading() {
  643 + const row = {
  644 + 'messageType': 'MT4201'
  645 + }
  646 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  647 + },
  648 + handelBackStep() {
  649 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
  650 + }
  651 + }
  652 + }
  653 +
  654 +</script>
  655 +<style>
  656 + .grid-content {
  657 + height: 36px;
  658 + line-height: 36px;
  659 + }
  660 +
  661 + .content {
  662 + border-left: 4px #409EFF solid;
  663 + padding-left: 10px;
  664 + background-color: #f9fafc;
  665 + margin-bottom: 2px
  666 + }
  667 +
  668 + .row-bg, .co {
  669 + background-color: white;
  670 + }
  671 +
  672 + .titleSpan {
  673 + font-weight: bold;
  674 + margin-right: 35px;
  675 + }
  676 +
  677 + .el-row {
  678 + margin-top: 10px;
  679 + margin-bottom: 0px;
  680 + }
  681 +
  682 + .btnFoot {
  683 + margin-top: 10px;
  684 + }
  685 +
  686 + .el-table td, .el-table th {
  687 + text-align: center
  688 + }
  689 +
  690 + .el-btn {
  691 + margin-left: 10px;
  692 + display: inline-block;
  693 + }
  694 +</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>