作者 朱兆平

Merge branch 'nmms' of 118.31.66.166:zp260/vue_cli

# 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
#	src/views/Home.vue
合并新舱单
@@ -30,8 +30,8 @@ module.exports = { @@ -30,8 +30,8 @@ module.exports = {
30 assetsPublicPath: '/', 30 assetsPublicPath: '/',
31 proxyTable: { 31 proxyTable: {
32 '/api':{ 32 '/api':{
33 - target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http  
34 - // target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http 33 + // target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
  34 + target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
35 changeOrigin: true, 35 changeOrigin: true,
36 pathRewrite: { 36 pathRewrite: {
37 '^/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’即可
@@ -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.npmjs.org/adler-32/-/adler-32-1.2.0.tgz", 88 + "resolved": "https://registry.npm.taobao.org/adler-32/download/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",
@@ -613,8 +613,8 @@ @@ -613,8 +613,8 @@
613 }, 613 },
614 "async-validator": { 614 "async-validator": {
615 "version": "1.8.5", 615 "version": "1.8.5",
616 - "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",  
617 - "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==", 616 + "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
  617 + "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
618 "requires": { 618 "requires": {
619 "babel-runtime": "6.x" 619 "babel-runtime": "6.x"
620 } 620 }
@@ -896,8 +896,8 @@ @@ -896,8 +896,8 @@
896 }, 896 },
897 "babel-helper-vue-jsx-merge-props": { 897 "babel-helper-vue-jsx-merge-props": {
898 "version": "2.0.3", 898 "version": "2.0.3",
899 - "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",  
900 - "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" 899 + "resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
  900 + "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
901 }, 901 },
902 "babel-helpers": { 902 "babel-helpers": {
903 "version": "6.24.1", 903 "version": "6.24.1",
@@ -2340,7 +2340,7 @@ @@ -2340,7 +2340,7 @@
2340 }, 2340 },
2341 "codepage": { 2341 "codepage": {
2342 "version": "1.14.0", 2342 "version": "1.14.0",
2343 - "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz", 2343 + "resolved": "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz",
2344 "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=", 2344 "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
2345 "requires": { 2345 "requires": {
2346 "commander": "~2.14.1", 2346 "commander": "~2.14.1",
@@ -2976,8 +2976,8 @@ @@ -2976,8 +2976,8 @@
2976 }, 2976 },
2977 "deepmerge": { 2977 "deepmerge": {
2978 "version": "1.5.2", 2978 "version": "1.5.2",
2979 - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",  
2980 - "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" 2979 + "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1570547201087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz",
  2980 + "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
2981 }, 2981 },
2982 "define-property": { 2982 "define-property": {
2983 "version": "2.0.2", 2983 "version": "2.0.2",
@@ -3242,9 +3242,15 @@ @@ -3242,9 +3242,15 @@
3242 "dev": true 3242 "dev": true
3243 }, 3243 },
3244 "element-ui": { 3244 "element-ui": {
  3245 +<<<<<<< HEAD
3245 "version": "2.13.0", 3246 "version": "2.13.0",
3246 "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz", 3247 "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz",
3247 "integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==", 3248 "integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==",
  3249 +=======
  3250 + "version": "2.12.0",
  3251 + "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",
  3252 + "integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=",
  3253 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
3248 "requires": { 3254 "requires": {
3249 "async-validator": "~1.8.1", 3255 "async-validator": "~1.8.1",
3250 "babel-helper-vue-jsx-merge-props": "^2.0.0", 3256 "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -6313,7 +6319,11 @@ @@ -6313,7 +6319,11 @@
6313 }, 6319 },
6314 "normalize-wheel": { 6320 "normalize-wheel": {
6315 "version": "1.0.1", 6321 "version": "1.0.1",
  6322 +<<<<<<< HEAD
6316 "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", 6323 "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
  6324 +=======
  6325 + "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
  6326 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
6317 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" 6327 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
6318 }, 6328 },
6319 "npm": { 6329 "npm": {
@@ -10547,7 +10557,7 @@ @@ -10547,7 +10557,7 @@
10547 }, 10557 },
10548 "raw-loader": { 10558 "raw-loader": {
10549 "version": "0.5.1", 10559 "version": "0.5.1",
10550 - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", 10560 + "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",
10551 "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=" 10561 "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
10552 }, 10562 },
10553 "read-pkg": { 10563 "read-pkg": {
@@ -11142,8 +11152,13 @@ @@ -11142,8 +11152,13 @@
11142 }, 11152 },
11143 "resize-observer-polyfill": { 11153 "resize-observer-polyfill": {
11144 "version": "1.5.1", 11154 "version": "1.5.1",
  11155 +<<<<<<< HEAD
11145 "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", 11156 "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
11146 "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" 11157 "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
  11158 +=======
  11159 + "resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz",
  11160 + "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
  11161 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
11147 }, 11162 },
11148 "resolve": { 11163 "resolve": {
11149 "version": "1.12.0", 11164 "version": "1.12.0",
@@ -12061,8 +12076,8 @@ @@ -12061,8 +12076,8 @@
12061 }, 12076 },
12062 "throttle-debounce": { 12077 "throttle-debounce": {
12063 "version": "1.1.0", 12078 "version": "1.1.0",
12064 - "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",  
12065 - "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==" 12079 + "resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
  12080 + "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
12066 }, 12081 },
12067 "through": { 12082 "through": {
12068 "version": "2.3.8", 12083 "version": "2.3.8",
@@ -12,7 +12,11 @@ @@ -12,7 +12,11 @@
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 +<<<<<<< HEAD
15 "element-ui": "^2.13.0", 16 "element-ui": "^2.13.0",
  17 +=======
  18 + "element-ui": "^2.12.0",
  19 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
16 "eslint": "^5.14.1", 20 "eslint": "^5.14.1",
17 "file-saver": "^2.0.2", 21 "file-saver": "^2.0.2",
18 "font-awesome": "^4.7.0", 22 "font-awesome": "^4.7.0",
@@ -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(`/cloud-user-center/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: `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: `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: `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: `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,7 +50,7 @@ export const addUser = params => { return axios({ @@ -50,7 +50,7 @@ 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: `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'
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server/nmms/country'
  3 +
  4 +
  5 +export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); };
  6 +
  7 +export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
  8 +
  9 +export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt3201'
  4 +
  5 +export const getMt3201ListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt3201ListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
  13 +
  14 +export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/flight'
  4 +
  5 +export const getFlightListForParam = params => {
  6 + return http.get(`${baseUrl}/getFlight`, params);
  7 +};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt4201'
  4 +
  5 +export const getMt4201ListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt4201ListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
  13 +
  14 +export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/manifest'
  4 +
  5 +export const getManifests = params => {
  6 + return http.get(`${baseUrl}/getManifests`, params);
  7 +};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt2201'
  4 +
  5 +export const getMt2201ListForParam = params => { return http.get(`${baseUrl}/getMt2201ListForParam`, params)};
  6 +
  7 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  8 +
  9 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params) };
  10 +
  11 +export const updateMT2201 = params => { return http.put(`${baseUrl}/updateMt2201`,params)};
  12 +
  13 +export const addMt2201 = params => { return http.post(`${baseUrl}/addMt2201`,params)};
  14 +
  15 +export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLostLoadChange`, params)};
  16 +
  17 +export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
  18 +
  19 +export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/mt520x'
  4 +
  5 +export const getMt520XListForParam = params => {
  6 + return http.get(`${baseUrl}/getMt520xListForParam`, params);
  7 +};
  8 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  9 +
  10 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, params)};
  11 +
  12 +export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
  13 +
  14 +export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
1 import axios from 'axios' 1 import axios from 'axios'
2 2
  3 +<<<<<<< HEAD
3 let base = '/cloud-user-center/system/log'; 4 let base = '/cloud-user-center/system/log';
  5 +=======
  6 +axios.defaults.baseURL = 'http://localhost:8082/api';
  7 +let base = axios.defaults.baseURL+'USER-CENTER/system/log';
  8 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
4 9
5 10
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 11 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
  1 +import http from './http.js'
  2 +let baseUrl = 'nmms-server/nmms/mt1201'
  3 +
  4 +export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); };
  5 +
  6 +export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
  7 +
  8 +export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, { params: params }); };
  9 +
  10 +export const updateMT1201 = params => { return http.put(`${baseUrl}/updateMT1201`,params)};
  11 +
  12 +export const addMt1201 = params => { return http.post(`${baseUrl}/addMt1201`,params)};
  13 +
  14 +
1 import axios from 'axios' 1 import axios from 'axios'
2 2
  3 +<<<<<<< HEAD
3 let base = '/cloud-user-center/perm'; 4 let base = '/cloud-user-center/perm';
  5 +=======
  6 +axios.defaults.baseURL = 'http://localhost:8082/api';
  7 +let base = axios.defaults.baseURL+'USER-CENTER/perm';
  8 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
4 9
5 10
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 11 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server/nmms/rep'
  4 +
  5 +export const getResponseForParam = params => {
  6 + return http.get(`${baseUrl}/getResponseForParam`, params);
  7 +};
1 import axios from 'axios' 1 import axios from 'axios'
2 2
  3 +<<<<<<< HEAD
3 let base = '/cloud-user-center/role'; 4 let base = '/cloud-user-center/role';
  5 +=======
  6 +let base = 'USER-CENTER/role';
  7 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
4 8
5 9
6 export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; 10 export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
1 import http from './http.js' 1 import http from './http.js'
  2 +<<<<<<< HEAD
2 let baseUrl = '/cloud-user-center/user' 3 let baseUrl = '/cloud-user-center/user'
  4 +=======
  5 +let baseUrl = 'user-center/user'
  6 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
3 7
4 export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; 8 export const getUserList = params => { return http.get(`${baseUrl}/list`, params); };
5 9
@@ -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;
1 <template> 1 <template>
2 <el-table :data="formatData" :row-style="showRow" v-bind="$attrs"> 2 <el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
3 - <el-table-column type="selection" width="30" align="center"/>  
4 - <el-table-column v-if="columns.length===0" width="30" align="center"> 3 + <el-table-column type="selection" width="50" align="center"></el-table-column>
  4 + <el-table-column v-if="columns.length===0" width="55" align="center">
5 <template slot-scope="scope"> 5 <template slot-scope="scope">
6 <span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/> 6 <span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
7 <span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)"> 7 <span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
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 1
2 import Vue from 'vue' 2 import Vue from 'vue'
3 import App from './App' 3 import App from './App'
  4 +<<<<<<< HEAD
  5 +=======
  6 +import ElementUI from 'element-ui'
  7 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
4 import 'element-ui/lib/theme-chalk/index.css' 8 import 'element-ui/lib/theme-chalk/index.css'
5 //import './assets/theme/theme-green/index.css' 9 //import './assets/theme/theme-green/index.css'
6 import VueRouter from 'vue-router' 10 import VueRouter from 'vue-router'
@@ -11,9 +15,13 @@ import rout from './routes' @@ -11,9 +15,13 @@ import rout from './routes'
11 import Mock from './mock' 15 import Mock from './mock'
12 import i18n from './lang' 16 import i18n from './lang'
13 import 'font-awesome/css/font-awesome.min.css' 17 import 'font-awesome/css/font-awesome.min.css'
  18 +<<<<<<< HEAD
14 import ElementUI from 'element-ui' 19 import ElementUI from 'element-ui'
15 20
16 import * as socketApi from './api/socket' 21 import * as socketApi from './api/socket'
  22 +=======
  23 +import '@/styles/index.scss'
  24 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
17 25
18 //定义一个全局过滤器实现日期格式化 26 //定义一个全局过滤器实现日期格式化
19 Vue.filter('datefmt',function(input,fmtstring){ 27 Vue.filter('datefmt',function(input,fmtstring){
@@ -33,8 +41,8 @@ Vue.use(Vuex) @@ -33,8 +41,8 @@ Vue.use(Vuex)
33 Vue.prototype.$axios = axios; 41 Vue.prototype.$axios = axios;
34 42
35 //NProgress.configure({ showSpinner: false }); 43 //NProgress.configure({ showSpinner: false });
36 -console.log("mainjs:");  
37 -console.log(rout.routes); 44 +// console.log("mainjs:");
  45 +// console.log(rout.routes);
38 const router = new VueRouter({ 46 const router = new VueRouter({
39 routes:rout.routes 47 routes:rout.routes
40 }); 48 });
@@ -61,7 +69,7 @@ router.beforeEach((to, from, next) => { @@ -61,7 +69,7 @@ router.beforeEach((to, from, next) => {
61 } 69 }
62 }); 70 });
63 71
64 -var message = Vue.prototype.$message; 72 +const message = Vue.prototype.$message;
65 axios.defaults.baseURL = '/api'; 73 axios.defaults.baseURL = '/api';
66 axios.interceptors.response.use( 74 axios.interceptors.response.use(
67 res => { 75 res => {
@@ -7,12 +7,26 @@ import Role from './views/nav1/role.vue' @@ -7,12 +7,26 @@ 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 +<<<<<<< HEAD
10 import Company from './views/nav1/company.vue' 11 import Company from './views/nav1/company.vue'
11 import Department from './views/nav1/department.vue' 12 import Department from './views/nav1/department.vue'
12 import Group from './views/nav1/groupcompany.vue' 13 import Group from './views/nav1/groupcompany.vue'
13 import Process from './views/hqpt/Process.vue' 14 import Process from './views/hqpt/Process.vue'
14 import Job from './views/hqpt/Job.vue' 15 import Job from './views/hqpt/Job.vue'
15 // import Form from './views/nav1/Form.vue' 16 // import Form from './views/nav1/Form.vue'
  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 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
16 30
17 import User from './views/nav1/user.vue' 31 import User from './views/nav1/user.vue'
18 import Page4 from './views/nav2/Page4.vue' 32 import Page4 from './views/nav2/Page4.vue'
@@ -47,7 +61,7 @@ let routes = [ @@ -47,7 +61,7 @@ let routes = [
47 leaf: true, 61 leaf: true,
48 iconCls: 'el-icon-menu', 62 iconCls: 'el-icon-menu',
49 children: [ 63 children: [
50 - { path: '/main', component: Main, name: '首页'}, 64 + {path: '/main', component: Main, name: '首页'},
51 ] 65 ]
52 }, 66 },
53 // { path: '/test', component: Main }, 67 // { path: '/test', component: Main },
@@ -57,6 +71,7 @@ let routes = [ @@ -57,6 +71,7 @@ let routes = [
57 name: '系统设置', 71 name: '系统设置',
58 iconCls: 'el-icon-setting',//图标样式class 72 iconCls: 'el-icon-setting',//图标样式class
59 children: [ 73 children: [
  74 +<<<<<<< HEAD
60 { path: '/user', component: User, name: '用户管理' }, 75 { path: '/user', component: User, name: '用户管理' },
61 { path: '/role', component: Role, name: '岗位管理' }, 76 { path: '/role', component: Role, name: '岗位管理' },
62 { path: '/perm', component: Perm, name: '权限管理' }, 77 { path: '/perm', component: Perm, name: '权限管理' },
@@ -64,6 +79,12 @@ let routes = [ @@ -64,6 +79,12 @@ let routes = [
64 { path: '/department', component: Department, name: '部门管理' }, 79 { path: '/department', component: Department, name: '部门管理' },
65 { path: '/company', component: Company, name: '公司管理'}, 80 { path: '/company', component: Company, name: '公司管理'},
66 { path: '/group', component: Group, name: '集团管理'} 81 { path: '/group', component: Group, name: '集团管理'}
  82 +=======
  83 + {path: '/user', component: User, name: '用户管理'},
  84 + {path: '/role', component: Role, name: '角色管理'},
  85 + {path: '/perm', component: Perm, name: '权限管理'},
  86 + {path: '/log', component: LOG, name: '系统日志'},
  87 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
67 ] 88 ]
68 }, 89 },
69 { 90 {
@@ -72,8 +93,37 @@ let routes = [ @@ -72,8 +93,37 @@ let routes = [
72 name: '客服系统', 93 name: '客服系统',
73 iconCls: 'fa fa-id-card-o', 94 iconCls: 'fa fa-id-card-o',
74 children: [ 95 children: [
  96 +<<<<<<< HEAD
75 { path: '/process', component: Process, name: '工单管理' }, 97 { path: '/process', component: Process, name: '工单管理' },
76 { path: '/job', component: Job, name: '任务管理' } 98 { path: '/job', component: Job, name: '任务管理' }
  99 +=======
  100 + {path: '/pre1', component: PreManifest, name: '预配'},
  101 + ]
  102 + },
  103 + {
  104 + path: '/output',
  105 + component: Home,
  106 + name: '出港业务申报',
  107 + iconCls: 'el-icon-collection',
  108 + children: [
  109 + {path: '/flight', component: ExitFlight, name: '出港航班申报'},
  110 + {path: '/manifest', component: ExitManifest, name: '出港运单申报'},
  111 + {path: '/pre', component: ExitPre, name: '出港预配舱单'},
  112 + {path: '/arrive', component: ExitArrive, name: '出港运抵'},
  113 + {path: '/loadingView', component: ExitFlightDesc, name: '出港航班信息'},
  114 + {path: '/loading', component: ExitLoading, name: '出港装载'},
  115 + {path: '/tidy', component: ExitTidy, name: '出港理货'}
  116 + ]
  117 + },
  118 + {
  119 + path: '/lost',
  120 + component: Home,
  121 + name: '落装改配申报',
  122 + iconCls:'el-icon-goods',
  123 + children:[
  124 + {path:'/lostLoad',component:LostLoad,name:'落装业务申报'},
  125 + // {path:'/lostLoadChange',component:LostLoadChange,name:'改配业务申报'}
  126 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
77 ] 127 ]
78 }, 128 },
79 { 129 {
@@ -82,7 +132,12 @@ let routes = [ @@ -82,7 +132,12 @@ let routes = [
82 name: '能源管理', 132 name: '能源管理',
83 iconCls: 'fa fa-id-card-o', 133 iconCls: 'fa fa-id-card-o',
84 children: [ 134 children: [
  135 +<<<<<<< HEAD
85 { path: '/location', component: Location, name: '能源缴费' }, 136 { path: '/location', component: Location, name: '能源缴费' },
  137 +=======
  138 + {path: '/page4', component: Page4, name: '页面4'},
  139 + {path: '/page5', component: Page5, name: '页面5'}
  140 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
86 ] 141 ]
87 }, 142 },
88 { 143 {
@@ -105,12 +160,16 @@ let routes = [ @@ -105,12 +160,16 @@ let routes = [
105 iconCls: 'fa fa-address-card', 160 iconCls: 'fa fa-address-card',
106 // leaf: true,//只有一个节点 161 // leaf: true,//只有一个节点
107 children: [ 162 children: [
  163 +<<<<<<< HEAD
108 164
109 { path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' }, 165 { path: '/water_stations_patrol', component: WaterStationsPatrol, name: '二水厂-水站巡视记录单管理' },
110 // { path: '/page6', component: Page6, name: '水质量检测' }, 166 // { path: '/page6', component: Page6, name: '水质量检测' },
111 // { path: '/page6', component: Page6, name: '污水站' }, 167 // { path: '/page6', component: Page6, name: '污水站' },
112 // { path: '/page6', component: Page6, name: '一水厂' }, 168 // { path: '/page6', component: Page6, name: '一水厂' },
113 // { path: '/page6', component: Page6, name: '综合楼空调站' }, 169 // { path: '/page6', component: Page6, name: '综合楼空调站' },
  170 +=======
  171 + {path: '/page6', component: Page6, name: '导航三'}
  172 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
114 ] 173 ]
115 }, 174 },
116 { 175 {
@@ -119,13 +178,13 @@ let routes = [ @@ -119,13 +178,13 @@ let routes = [
119 name: 'Charts', 178 name: 'Charts',
120 iconCls: 'fa fa-bar-chart', 179 iconCls: 'fa fa-bar-chart',
121 children: [ 180 children: [
122 - { path: '/echarts', component: echarts, name: 'echarts' } 181 + {path: '/echarts', component: echarts, name: 'echarts'}
123 ] 182 ]
124 }, 183 },
125 { 184 {
126 path: '*', 185 path: '*',
127 hidden: true, 186 hidden: true,
128 - redirect: { path: '/404' } 187 + redirect: {path: '/404'}
129 } 188 }
130 ]; 189 ];
131 let initRouters = routes.concat(); 190 let initRouters = routes.concat();
@@ -136,7 +195,7 @@ let setUserMenus = function (list) { @@ -136,7 +195,7 @@ let setUserMenus = function (list) {
136 * 处理登陆后的账号对应的菜单 195 * 处理登陆后的账号对应的菜单
137 * @param menuList 196 * @param menuList
138 */ 197 */
139 -let handleMenuList = function (router,menu) { 198 +let handleMenuList = function (router, menu) {
140 var _self = this; 199 var _self = this;
141 var routerName = ""; 200 var routerName = "";
142 router.forEach(function (v_router) { 201 router.forEach(function (v_router) {
@@ -149,16 +208,16 @@ let handleMenuList = function (router,menu) { @@ -149,16 +208,16 @@ let handleMenuList = function (router,menu) {
149 208
150 //匹配到继续判断是否子元素,有子元素继续递归 209 //匹配到继续判断是否子元素,有子元素继续递归
151 if (result) { 210 if (result) {
152 - if(v_router.children) {  
153 - _self.handleMenuList(v_router.children,result.children); 211 + if (v_router.children) {
  212 + _self.handleMenuList(v_router.children, result.children);
154 } 213 }
155 //没有则可以移除 214 //没有则可以移除
156 - }else {  
157 - router.splice(router.findIndex(itm => itm.name === routerName ),1); 215 + } else {
  216 + router.splice(router.findIndex(itm => itm.name === routerName), 1);
158 } 217 }
159 }) 218 })
160 }); 219 });
161 } 220 }
162 export default { 221 export default {
163 - routes,setUserMenus,handleMenuList,initRouters 222 + routes, setUserMenus, handleMenuList, initRouters
164 }; 223 };
  1 +@import './variables.scss';
  2 +
  3 +@mixin colorBtn($color) {
  4 + background: $color;
  5 +
  6 + &:hover {
  7 + color: $color;
  8 +
  9 + &:before,
  10 + &:after {
  11 + background: $color;
  12 + }
  13 + }
  14 +}
  15 +
  16 +.blue-btn {
  17 + @include colorBtn($blue)
  18 +}
  19 +
  20 +.light-blue-btn {
  21 + @include colorBtn($light-blue)
  22 +}
  23 +
  24 +.red-btn {
  25 + @include colorBtn($red)
  26 +}
  27 +
  28 +.pink-btn {
  29 + @include colorBtn($pink)
  30 +}
  31 +
  32 +.green-btn {
  33 + @include colorBtn($green)
  34 +}
  35 +
  36 +.tiffany-btn {
  37 + @include colorBtn($tiffany)
  38 +}
  39 +
  40 +.yellow-btn {
  41 + @include colorBtn($yellow)
  42 +}
  43 +
  44 +.pan-btn {
  45 + font-size: 14px;
  46 + color: #fff;
  47 + padding: 14px 36px;
  48 + border-radius: 8px;
  49 + border: none;
  50 + outline: none;
  51 + transition: 600ms ease all;
  52 + position: relative;
  53 + display: inline-block;
  54 +
  55 + &:hover {
  56 + background: #fff;
  57 +
  58 + &:before,
  59 + &:after {
  60 + width: 100%;
  61 + transition: 600ms ease all;
  62 + }
  63 + }
  64 +
  65 + &:before,
  66 + &:after {
  67 + content: '';
  68 + position: absolute;
  69 + top: 0;
  70 + right: 0;
  71 + height: 2px;
  72 + width: 0;
  73 + transition: 400ms ease all;
  74 + }
  75 +
  76 + &::after {
  77 + right: inherit;
  78 + top: inherit;
  79 + left: 0;
  80 + bottom: 0;
  81 + }
  82 +}
  83 +
  84 +.custom-button {
  85 + display: inline-block;
  86 + line-height: 1;
  87 + white-space: nowrap;
  88 + cursor: pointer;
  89 + background: #fff;
  90 + color: #fff;
  91 + -webkit-appearance: none;
  92 + text-align: center;
  93 + box-sizing: border-box;
  94 + outline: 0;
  95 + margin: 0;
  96 + padding: 10px 15px;
  97 + font-size: 14px;
  98 + border-radius: 4px;
  99 +}
  1 +//覆盖一些element-ui样式
  2 +
  3 +.el-breadcrumb__inner,
  4 +.el-breadcrumb__inner a {
  5 + font-weight: 400 !important;
  6 +}
  7 +
  8 +.el-upload {
  9 + input[type="file"] {
  10 + display: none !important;
  11 + }
  12 +}
  13 +
  14 +.el-upload__input {
  15 + display: none;
  16 +}
  17 +
  18 +.cell {
  19 + .el-tag {
  20 + margin-right: 0px;
  21 + }
  22 +}
  23 +
  24 +.small-padding {
  25 + .cell {
  26 + padding-left: 5px;
  27 + padding-right: 5px;
  28 + }
  29 +}
  30 +
  31 +.fixed-width {
  32 + .el-button--mini {
  33 + padding: 7px 10px;
  34 + width: 60px;
  35 + }
  36 +}
  37 +
  38 +.status-col {
  39 + .cell {
  40 + padding: 0 10px;
  41 + text-align: center;
  42 +
  43 + .el-tag {
  44 + margin-right: 0px;
  45 + }
  46 + }
  47 +}
  48 +
  49 +//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
  50 +.el-dialog {
  51 + transform: none;
  52 + left: 0;
  53 + position: relative;
  54 + margin: 0 auto;
  55 +}
  56 +
  57 +//文章页textarea修改样式
  58 +.article-textarea {
  59 + textarea {
  60 + padding-right: 40px;
  61 + resize: none;
  62 + border: none;
  63 + border-radius: 0px;
  64 + border-bottom: 1px solid #bfcbd9;
  65 + }
  66 +}
  67 +
  68 +//element ui upload
  69 +.upload-container {
  70 + .el-upload {
  71 + width: 100%;
  72 +
  73 + .el-upload-dragger {
  74 + width: 100%;
  75 + height: 200px;
  76 + }
  77 + }
  78 +}
  79 +
  80 +//dropdown
  81 +.el-dropdown-menu {
  82 + a {
  83 + display: block
  84 + }
  85 +}
  1 +@import './variables.scss';
  2 +@import './mixin.scss';
  3 +@import './transition.scss';
  4 +@import './element-ui.scss';
  5 +@import './sidebar.scss';
  6 +@import './btn.scss';
  7 +
  8 +body {
  9 + height: 100%;
  10 + -moz-osx-font-smoothing: grayscale;
  11 + -webkit-font-smoothing: antialiased;
  12 + text-rendering: optimizeLegibility;
  13 + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  14 +}
  15 +
  16 +label {
  17 + font-weight: 700;
  18 +}
  19 +
  20 +html {
  21 + height: 100%;
  22 + box-sizing: border-box;
  23 +}
  24 +
  25 +#app {
  26 + height: 100%;
  27 +}
  28 +
  29 +*,
  30 +*:before,
  31 +*:after {
  32 + box-sizing: inherit;
  33 +}
  34 +
  35 +.no-padding {
  36 + padding: 0px !important;
  37 +}
  38 +
  39 +.padding-content {
  40 + padding: 4px 0;
  41 +}
  42 +
  43 +a:focus,
  44 +a:active {
  45 + outline: none;
  46 +}
  47 +
  48 +a,
  49 +a:focus,
  50 +a:hover {
  51 + cursor: pointer;
  52 + color: inherit;
  53 + text-decoration: none;
  54 +}
  55 +
  56 +div:focus {
  57 + outline: none;
  58 +}
  59 +
  60 +.fr {
  61 + float: right;
  62 +}
  63 +
  64 +.fl {
  65 + float: left;
  66 +}
  67 +
  68 +.pr-5 {
  69 + padding-right: 5px;
  70 +}
  71 +
  72 +.pl-5 {
  73 + padding-left: 5px;
  74 +}
  75 +
  76 +.block {
  77 + display: block;
  78 +}
  79 +
  80 +.pointer {
  81 + cursor: pointer;
  82 +}
  83 +
  84 +.inlineBlock {
  85 + display: block;
  86 +}
  87 +
  88 +.clearfix {
  89 + &:after {
  90 + visibility: hidden;
  91 + display: block;
  92 + font-size: 0;
  93 + content: " ";
  94 + clear: both;
  95 + height: 0;
  96 + }
  97 +}
  98 +
  99 +code {
  100 + background: #eef1f6;
  101 + padding: 15px 16px;
  102 + margin-bottom: 20px;
  103 + display: block;
  104 + line-height: 36px;
  105 + font-size: 15px;
  106 + font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  107 +
  108 + a {
  109 + color: #337ab7;
  110 + cursor: pointer;
  111 +
  112 + &:hover {
  113 + color: rgb(32, 160, 255);
  114 + }
  115 + }
  116 +}
  117 +
  118 +.warn-content {
  119 + background: rgba(66, 185, 131, .1);
  120 + border-radius: 2px;
  121 + padding: 16px;
  122 + padding: 1rem;
  123 + line-height: 1.6rem;
  124 + word-spacing: .05rem;
  125 +
  126 + a {
  127 + color: #42b983;
  128 + font-weight: 600;
  129 + }
  130 +}
  131 +
  132 +//main-container全局样式
  133 +.app-container {
  134 + padding: 20px;
  135 +}
  136 +
  137 +.components-container {
  138 + margin: 30px 50px;
  139 + position: relative;
  140 +}
  141 +
  142 +.pagination-container {
  143 + margin-top: 30px;
  144 +}
  145 +
  146 +.text-center {
  147 + text-align: center
  148 +}
  149 +
  150 +.sub-navbar {
  151 + height: 50px;
  152 + line-height: 50px;
  153 + position: relative;
  154 + width: 100%;
  155 + text-align: right;
  156 + padding-right: 20px;
  157 + transition: 600ms ease position;
  158 + background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
  159 +
  160 + .subtitle {
  161 + font-size: 20px;
  162 + color: #fff;
  163 + }
  164 +
  165 + &.draft {
  166 + background: #d0d0d0;
  167 + }
  168 +
  169 + &.deleted {
  170 + background: #d0d0d0;
  171 + }
  172 +}
  173 +
  174 +.link-type,
  175 +.link-type:focus {
  176 + color: #337ab7;
  177 + cursor: pointer;
  178 +
  179 + &:hover {
  180 + color: rgb(32, 160, 255);
  181 + }
  182 +}
  183 +
  184 +.filter-container {
  185 + padding-bottom: 10px;
  186 +
  187 + .filter-item {
  188 + display: inline-block;
  189 + vertical-align: middle;
  190 + margin-bottom: 10px;
  191 + }
  192 +}
  193 +
  194 +//refine vue-multiselect plugin
  195 +.multiselect {
  196 + line-height: 16px;
  197 +}
  198 +
  199 +.multiselect--active {
  200 + z-index: 1000 !important;
  201 +}
  1 +@mixin clearfix {
  2 + &:after {
  3 + content: "";
  4 + display: table;
  5 + clear: both;
  6 + }
  7 +}
  8 +
  9 +@mixin scrollBar {
  10 + &::-webkit-scrollbar-track-piece {
  11 + background: #d3dce6;
  12 + }
  13 +
  14 + &::-webkit-scrollbar {
  15 + width: 6px;
  16 + }
  17 +
  18 + &::-webkit-scrollbar-thumb {
  19 + background: #99a9bf;
  20 + border-radius: 20px;
  21 + }
  22 +}
  23 +
  24 +@mixin relative {
  25 + position: relative;
  26 + width: 100%;
  27 + height: 100%;
  28 +}
  29 +
  30 +@mixin pct($pct) {
  31 + width: #{$pct};
  32 + position: relative;
  33 + margin: 0 auto;
  34 +}
  35 +
  36 +@mixin triangle($width, $height, $color, $direction) {
  37 + $width: $width/2;
  38 + $color-border-style: $height solid $color;
  39 + $transparent-border-style: $width solid transparent;
  40 + height: 0;
  41 + width: 0;
  42 +
  43 + @if $direction==up {
  44 + border-bottom: $color-border-style;
  45 + border-left: $transparent-border-style;
  46 + border-right: $transparent-border-style;
  47 + }
  48 +
  49 + @else if $direction==right {
  50 + border-left: $color-border-style;
  51 + border-top: $transparent-border-style;
  52 + border-bottom: $transparent-border-style;
  53 + }
  54 +
  55 + @else if $direction==down {
  56 + border-top: $color-border-style;
  57 + border-left: $transparent-border-style;
  58 + border-right: $transparent-border-style;
  59 + }
  60 +
  61 + @else if $direction==left {
  62 + border-right: $color-border-style;
  63 + border-top: $transparent-border-style;
  64 + border-bottom: $transparent-border-style;
  65 + }
  66 +}
  1 +#app {
  2 +
  3 + // 主体区域 Main container
  4 + .main-container {
  5 + min-height: 100%;
  6 + transition: margin-left .28s;
  7 + margin-left: $sideBarWidth;
  8 + position: relative;
  9 + }
  10 +
  11 + // 侧边栏 Sidebar container
  12 + .sidebar-container {
  13 + transition: width 0.28s;
  14 + width: $sideBarWidth !important;
  15 + height: 100%;
  16 + position: fixed;
  17 + font-size: 0px;
  18 + top: 0;
  19 + bottom: 0;
  20 + left: 0;
  21 + z-index: 1001;
  22 + overflow: hidden;
  23 +
  24 + //reset element-ui css
  25 + .horizontal-collapse-transition {
  26 + transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  27 + }
  28 +
  29 + .scrollbar-wrapper {
  30 + overflow-x: hidden !important;
  31 +
  32 + .el-scrollbar__view {
  33 + height: 100%;
  34 + }
  35 + }
  36 +
  37 + .el-scrollbar__bar.is-vertical {
  38 + right: 0px;
  39 + }
  40 +
  41 + .is-horizontal {
  42 + display: none;
  43 + }
  44 +
  45 + a {
  46 + display: inline-block;
  47 + width: 100%;
  48 + overflow: hidden;
  49 + }
  50 +
  51 + .svg-icon {
  52 + margin-right: 16px;
  53 + }
  54 +
  55 + .el-menu {
  56 + border: none;
  57 + height: 100%;
  58 + width: 100% !important;
  59 + }
  60 +
  61 + // menu hover
  62 + .submenu-title-noDropdown,
  63 + .el-submenu__title {
  64 + &:hover {
  65 + background-color: $menuHover !important;
  66 + }
  67 + }
  68 +
  69 + .is-active>.el-submenu__title {
  70 + color: $subMenuActiveText !important;
  71 + }
  72 +
  73 + & .nest-menu .el-submenu>.el-submenu__title,
  74 + & .el-submenu .el-menu-item {
  75 + min-width: $sideBarWidth !important;
  76 + background-color: $subMenuBg !important;
  77 +
  78 + &:hover {
  79 + background-color: $subMenuHover !important;
  80 + }
  81 + }
  82 + }
  83 +
  84 + .hideSidebar {
  85 + .sidebar-container {
  86 + width: 36px !important;
  87 + }
  88 +
  89 + .main-container {
  90 + margin-left: 36px;
  91 + }
  92 +
  93 + .submenu-title-noDropdown {
  94 + padding-left: 10px !important;
  95 + position: relative;
  96 +
  97 + .el-tooltip {
  98 + padding: 0 10px !important;
  99 + }
  100 + }
  101 +
  102 + .el-submenu {
  103 + overflow: hidden;
  104 +
  105 + &>.el-submenu__title {
  106 + padding-left: 10px !important;
  107 +
  108 + .el-submenu__icon-arrow {
  109 + display: none;
  110 + }
  111 + }
  112 + }
  113 +
  114 + .el-menu--collapse {
  115 + .el-submenu {
  116 + &>.el-submenu__title {
  117 + &>span {
  118 + height: 0;
  119 + width: 0;
  120 + overflow: hidden;
  121 + visibility: hidden;
  122 + display: inline-block;
  123 + }
  124 + }
  125 + }
  126 + }
  127 + }
  128 +
  129 + .el-menu--collapse .el-menu .el-submenu {
  130 + min-width: $sideBarWidth !important;
  131 + }
  132 +
  133 + // 适配移动端, Mobile responsive
  134 + .mobile {
  135 + .main-container {
  136 + margin-left: 0px;
  137 + }
  138 +
  139 + .sidebar-container {
  140 + transition: transform .28s;
  141 + width: $sideBarWidth !important;
  142 + }
  143 +
  144 + &.hideSidebar {
  145 + .sidebar-container {
  146 + pointer-events: none;
  147 + transition-duration: 0.3s;
  148 + transform: translate3d(-$sideBarWidth, 0, 0);
  149 + }
  150 + }
  151 + }
  152 +
  153 + .withoutAnimation {
  154 +
  155 + .main-container,
  156 + .sidebar-container {
  157 + transition: none;
  158 + }
  159 + }
  160 +}
  161 +
  162 +// when menu collapsed
  163 +.el-menu--vertical {
  164 + &>.el-menu {
  165 + .svg-icon {
  166 + margin-right: 16px;
  167 + }
  168 + }
  169 +
  170 + .nest-menu .el-submenu>.el-submenu__title,
  171 + .el-menu-item {
  172 + &:hover {
  173 + // you can use $subMenuHover
  174 + background-color: $menuHover !important;
  175 + }
  176 + }
  177 +
  178 + // the scroll bar appears when the subMenu is too long
  179 + >.el-menu--popup {
  180 + max-height: 100vh;
  181 + overflow-y: auto;
  182 +
  183 + &::-webkit-scrollbar-track-piece {
  184 + background: #d3dce6;
  185 + }
  186 +
  187 + &::-webkit-scrollbar {
  188 + width: 6px;
  189 + }
  190 +
  191 + &::-webkit-scrollbar-thumb {
  192 + background: #99a9bf;
  193 + border-radius: 20px;
  194 + }
  195 + }
  196 +}
  1 +//globl transition css
  2 +
  3 +/*fade*/
  4 +.fade-enter-active,
  5 +.fade-leave-active {
  6 + transition: opacity 0.28s;
  7 +}
  8 +
  9 +.fade-enter,
  10 +.fade-leave-active {
  11 + opacity: 0;
  12 +}
  13 +
  14 +/*fade-transform*/
  15 +.fade-transform-leave-active,
  16 +.fade-transform-enter-active {
  17 + transition: all .5s;
  18 +}
  19 +
  20 +.fade-transform-enter {
  21 + opacity: 0;
  22 + transform: translateX(-30px);
  23 +}
  24 +
  25 +.fade-transform-leave-to {
  26 + opacity: 0;
  27 + transform: translateX(30px);
  28 +}
  29 +
  30 +/*breadcrumb transition*/
  31 +.breadcrumb-enter-active,
  32 +.breadcrumb-leave-active {
  33 + transition: all .5s;
  34 +}
  35 +
  36 +.breadcrumb-enter,
  37 +.breadcrumb-leave-active {
  38 + opacity: 0;
  39 + transform: translateX(20px);
  40 +}
  41 +
  42 +.breadcrumb-move {
  43 + transition: all .5s;
  44 +}
  45 +
  46 +.breadcrumb-leave-active {
  47 + position: absolute;
  48 +}
  1 +// base color
  2 +$blue:#324157;
  3 +$light-blue:#3A71A8;
  4 +$red:#C03639;
  5 +$pink: #E65D6E;
  6 +$green: #30B08F;
  7 +$tiffany: #4AB7BD;
  8 +$yellow:#FEC171;
  9 +$panGreen: #30B08F;
  10 +
  11 +//sidebar
  12 +$menuText:#bfcbd9;
  13 +$menuActiveText:#409EFF;
  14 +$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
  15 +
  16 +$menuBg:#304156;
  17 +$menuHover:#263445;
  18 +
  19 +$subMenuBg:#1f2d3d;
  20 +$subMenuHover:#001528;
  21 +
  22 +$sideBarWidth: 180px;
  23 +
  24 +// the :export directive is the magic sauce for webpack
  25 +:export {
  26 + menuText: $menuText;
  27 + menuActiveText: $menuActiveText;
  28 + subMenuActiveText: $subMenuActiveText;
  29 + menuBg: $menuBg;
  30 + menuHover: $menuHover;
  31 + subMenuBg: $subMenuBg;
  32 + subMenuHover: $subMenuHover;
  33 + sideBarWidth: $sideBarWidth;
  34 +}
@@ -8,7 +8,7 @@ const type = [{ @@ -8,7 +8,7 @@ const type = [{
8 value: 'CN', 8 value: 'CN',
9 label: 'PASSPORT' 9 label: 'PASSPORT'
10 }, { 10 }, {
11 - value: 'CN', 11 + value: 'US',
12 label: 'OC' 12 label: 'OC'
13 }, { 13 }, {
14 value: 'CN', 14 value: 'CN',
@@ -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 +<<<<<<< HEAD
2 <el-row class="container"> 3 <el-row class="container">
3 <el-col :span="24" class="header"> 4 <el-col :span="24" class="header">
4 <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'"> 5 <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
@@ -68,12 +69,101 @@ @@ -68,12 +69,101 @@
68 </section> 69 </section>
69 </el-col> 70 </el-col>
70 </el-row> 71 </el-row>
  72 +=======
  73 + <el-row class="container">
  74 + <el-col :span="24" class="header">
  75 + <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
  76 + {{collapsed?'':sysName}}
  77 + </el-col>
  78 + <el-col :span="10">
  79 + <div class="tools" @click.prevent="collapse">
  80 + <i class="fa fa-align-justify"></i>
  81 + </div>
  82 + </el-col>
  83 + <el-col :span="4" class="userinfo">
  84 + <el-dropdown trigger="hover">
  85 + <span class="el-dropdown-link userinfo-inner"><img
  86 + :src="this.sysUserAvatar"/> {{sysUserName}}</span>
  87 + <el-dropdown-menu slot="dropdown">
  88 + <el-dropdown-item>我的消息</el-dropdown-item>
  89 + <el-dropdown-item>设置</el-dropdown-item>
  90 + <el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
  91 + </el-dropdown-menu>
  92 + </el-dropdown>
  93 + </el-col>
  94 + </el-col>
  95 + <el-col :span="24" class="main">
  96 + <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
  97 + <!--导航菜单-->
  98 + <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen"
  99 + @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed"
  100 + style="min-width: 230px">
  101 + <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
  102 + <el-submenu :index="index+''" v-if="!item.leaf">
  103 + <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
  104 + <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path"
  105 + v-if="!child.hidden">{{child.name}}
  106 + </el-menu-item>
  107 + </el-submenu>
  108 + <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i
  109 + :class="item.iconCls"></i>{{item.children[0].name}}
  110 + </el-menu-item>
  111 + </template>
  112 + </el-menu>
  113 + <!--导航菜单-折叠后-->
  114 + <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed">
  115 + <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
  116 + <template v-if="!item.leaf">
  117 + <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)"
  118 + @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
  119 + <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)"
  120 + @mouseout="showMenu(index,false)">
  121 + <li v-for="child in item.children" v-if="!child.hidden" :key="child.path"
  122 + class="el-menu-item" style="padding-left: 40px;"
  123 + :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">
  124 + {{child.name}}
  125 + </li>
  126 + </ul>
  127 + </template>
  128 + <template v-else>
  129 + <li class="el-submenu">
  130 + <div class="el-submenu__title el-menu-item"
  131 + style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;"
  132 + :class="$route.path==item.children[0].path?'is-active':''"
  133 + @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div>
  134 + </li>
  135 +</template>
  136 +</li>
  137 +</ul>
  138 +</aside>
  139 +<section class="content-container">
  140 + <div class="grid-content bg-purple-light">
  141 + <el-col :span="24" class="breadcrumb-container">
  142 + <strong class="title">{{$route.name}}</strong>
  143 + <el-breadcrumb separator="/" class="breadcrumb-inner">
  144 + <el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
  145 + {{ item.name }}
  146 + </el-breadcrumb-item>
  147 + </el-breadcrumb>
  148 + </el-col>
  149 + <el-col :span="24" class="content-wrapper">
  150 + <transition name="fade" mode="out-in">
  151 + <router-view :key="$route.path +$route.query.t"></router-view>
  152 + </transition>
  153 + </el-col>
  154 + </div>
  155 +</section>
  156 +</el-col>
  157 +</el-row>
  158 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
71 </template> 159 </template>
72 160
73 161
74 <script> 162 <script>
75 import rt from '../routes' 163 import rt from '../routes'
  164 +
76 export default { 165 export default {
  166 +<<<<<<< HEAD
77 data() { 167 data() {
78 return { 168 return {
79 sysName:'后勤管理平台', 169 sysName:'后勤管理平台',
@@ -112,11 +202,68 @@ @@ -112,11 +202,68 @@
112 //type: 'warning' 202 //type: 'warning'
113 }).then(() => { 203 }).then(() => {
114 sessionStorage.removeItem('user'); 204 sessionStorage.removeItem('user');
  205 +=======
  206 +
  207 + provide() {
  208 + return {
  209 + reload: this.reload
  210 + }
  211 + },
  212 + data() {
  213 + return {
  214 + sysName: '流浪地球管理系统',
  215 + collapsed: false,
  216 + sysUserName: '',
  217 + sysUserAvatar: '',
  218 + isRouterAlive: true,
  219 + form: {
  220 + name: '',
  221 + region: '',
  222 + date1: '',
  223 + date2: '',
  224 + delivery: false,
  225 + type: [],
  226 + resource: '',
  227 + desc: ''
  228 + }
  229 + }
  230 + },
  231 + methods: {
  232 + reload() {
  233 + this.$nextTick(function () {
  234 + this.$router.push({
  235 + path: this.$router.path,
  236 + query:{
  237 + t: new Date().getTime()
  238 + }
  239 + })
  240 + })
  241 + },
  242 + onSubmit() {
  243 + console.log('submit!');
  244 + },
  245 + handleopen() {
  246 + console.log('handleopen');
  247 + },
  248 + handleclose() {
  249 + console.log('handleclose');
  250 + },
  251 + handleselect: function (a, b) {
  252 + this.reload()
  253 + },
  254 + //退出登录
  255 + logout: function () {
  256 + var _this = this;
  257 + this.$confirm('确认退出吗?', '提示', {
  258 + //type: 'warning'
  259 + }).then(() => {
  260 + sessionStorage.removeItem('user');
  261 +>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
115 sessionStorage.removeItem('menu'); 262 sessionStorage.removeItem('menu');
116 263
117 //退出后初始化原来的路由 264 //退出后初始化原来的路由
118 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); 265 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
119 - console.log(sysRoutes); 266 + // console.log(sysRoutes);
120 _this.$router.options.routes = sysRoutes; 267 _this.$router.options.routes = sysRoutes;
121 268
122 _this.$router.push('/login'); 269 _this.$router.push('/login');
@@ -127,11 +274,11 @@ @@ -127,11 +274,11 @@
127 274
128 }, 275 },
129 //折叠导航栏 276 //折叠导航栏
130 - collapse:function(){  
131 - this.collapsed=!this.collapsed; 277 + collapse: function () {
  278 + this.collapsed = !this.collapsed;
132 }, 279 },
133 - showMenu(i,status){  
134 - this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none'; 280 + showMenu(i, status) {
  281 + this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none';
135 } 282 }
136 }, 283 },
137 mounted() { 284 mounted() {
@@ -147,8 +294,8 @@ @@ -147,8 +294,8 @@
147 if (userRouters) { 294 if (userRouters) {
148 userRouters = JSON.parse(userRouters); 295 userRouters = JSON.parse(userRouters);
149 _this.$router.options.routes = userRouters; 296 _this.$router.options.routes = userRouters;
150 - console.log("home:");  
151 - console.log(_this.$router.options.routes); 297 + // console.log("home:");
  298 + // console.log(_this.$router.options.routes);
152 } 299 }
153 } 300 }
154 } 301 }
@@ -163,18 +310,22 @@ @@ -163,18 +310,22 @@
163 top: 0px; 310 top: 0px;
164 bottom: 0px; 311 bottom: 0px;
165 width: 100%; 312 width: 100%;
  313 +
166 .header { 314 .header {
167 height: 60px; 315 height: 60px;
168 line-height: 60px; 316 line-height: 60px;
169 background: $color-primary; 317 background: $color-primary;
170 - color:#fff; 318 + color: #fff;
  319 +
171 .userinfo { 320 .userinfo {
172 text-align: right; 321 text-align: right;
173 padding-right: 35px; 322 padding-right: 35px;
174 float: right; 323 float: right;
  324 +
175 .userinfo-inner { 325 .userinfo-inner {
176 cursor: pointer; 326 cursor: pointer;
177 - color:#fff; 327 + color: #fff;
  328 +
178 img { 329 img {
179 width: 40px; 330 width: 40px;
180 height: 40px; 331 height: 40px;
@@ -184,38 +335,45 @@ @@ -184,38 +335,45 @@
184 } 335 }
185 } 336 }
186 } 337 }
  338 +
187 .logo { 339 .logo {
188 //width:230px; 340 //width:230px;
189 - height:60px; 341 + height: 60px;
190 font-size: 22px; 342 font-size: 22px;
191 - padding-left:20px;  
192 - padding-right:20px;  
193 - border-color: rgba(238,241,146,0.3); 343 + padding-left: 20px;
  344 + padding-right: 20px;
  345 + border-color: rgba(238, 241, 146, 0.3);
194 border-right-width: 1px; 346 border-right-width: 1px;
195 border-right-style: solid; 347 border-right-style: solid;
  348 +
196 img { 349 img {
197 width: 40px; 350 width: 40px;
198 float: left; 351 float: left;
199 margin: 10px 10px 10px 18px; 352 margin: 10px 10px 10px 18px;
200 } 353 }
  354 +
201 .txt { 355 .txt {
202 - color:#fff; 356 + color: #fff;
203 } 357 }
204 } 358 }
205 - .logo-width{  
206 - width:230px; 359 +
  360 + .logo-width {
  361 + width: 230px;
207 } 362 }
208 - .logo-collapse-width{  
209 - width:60px 363 +
  364 + .logo-collapse-width {
  365 + width: 60px
210 } 366 }
211 - .tools{ 367 +
  368 + .tools {
212 padding: 0px 23px; 369 padding: 0px 23px;
213 - width:14px; 370 + width: 14px;
214 height: 60px; 371 height: 60px;
215 line-height: 60px; 372 line-height: 60px;
216 cursor: pointer; 373 cursor: pointer;
217 } 374 }
218 } 375 }
  376 +
219 .main { 377 .main {
220 display: flex; 378 display: flex;
221 // background: #324057; 379 // background: #324057;
@@ -223,45 +381,53 @@ @@ -223,45 +381,53 @@
223 top: 60px; 381 top: 60px;
224 bottom: 0px; 382 bottom: 0px;
225 overflow: hidden; 383 overflow: hidden;
  384 +
226 aside { 385 aside {
227 - flex:0 0 230px; 386 + flex: 0 0 230px;
228 width: 230px; 387 width: 230px;
229 // position: absolute; 388 // position: absolute;
230 // top: 0px; 389 // top: 0px;
231 // bottom: 0px; 390 // bottom: 0px;
232 - .el-menu{ 391 + .el-menu {
233 height: 100%; 392 height: 100%;
234 } 393 }
235 - .collapsed{  
236 - width:60px;  
237 - .item{ 394 +
  395 + .collapsed {
  396 + width: 60px;
  397 +
  398 + .item {
238 position: relative; 399 position: relative;
239 } 400 }
240 - .submenu{  
241 - position:absolute;  
242 - top:0px;  
243 - left:60px;  
244 - z-index:99999;  
245 - height:auto;  
246 - display:none; 401 +
  402 + .submenu {
  403 + position: absolute;
  404 + top: 0px;
  405 + left: 60px;
  406 + z-index: 99999;
  407 + height: auto;
  408 + display: none;
247 } 409 }
248 410
249 } 411 }
250 } 412 }
251 - .menu-collapsed{  
252 - flex:0 0 60px; 413 +
  414 + .menu-collapsed {
  415 + flex: 0 0 60px;
253 width: 60px; 416 width: 60px;
254 } 417 }
255 - .menu-expanded{  
256 - flex:0 0 230px; 418 +
  419 + .menu-expanded {
  420 + flex: 0 0 230px;
257 width: 230px; 421 width: 230px;
258 } 422 }
259 - .menu-expanded ul{ 423 +
  424 + .menu-expanded ul {
260 width: 230px; 425 width: 230px;
261 } 426 }
  427 +
262 .content-container { 428 .content-container {
263 // background: #f1f2f7; 429 // background: #f1f2f7;
264 - flex:1; 430 + flex: 1;
265 // position: absolute; 431 // position: absolute;
266 // right: 0px; 432 // right: 0px;
267 // top: 0px; 433 // top: 0px;
@@ -269,6 +435,7 @@ @@ -269,6 +435,7 @@
269 // left: 230px; 435 // left: 230px;
270 overflow-y: scroll; 436 overflow-y: scroll;
271 padding: 20px; 437 padding: 20px;
  438 +
272 .breadcrumb-container { 439 .breadcrumb-container {
273 //margin-bottom: 15px; 440 //margin-bottom: 15px;
274 .title { 441 .title {
@@ -276,10 +443,12 @@ @@ -276,10 +443,12 @@
276 float: left; 443 float: left;
277 color: #475669; 444 color: #475669;
278 } 445 }
  446 +
279 .breadcrumb-inner { 447 .breadcrumb-inner {
280 float: right; 448 float: right;
281 } 449 }
282 } 450 }
  451 +
283 .content-wrapper { 452 .content-wrapper {
284 background-color: #fff; 453 background-color: #fff;
285 box-sizing: border-box; 454 box-sizing: border-box;
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button> 9 <el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</el-button>
10 <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button> 10 <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message" @click="handleCreate">批量发送</el-button>
11 </div> 11 </div>
12 - <tree-table :data="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange"> 12 + <tree-table :data="tableData" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe style="font-size: 13px" border @selection-change="handleSelectionChange">
13 <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable> 13 <el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable>
14 <template slot-scope="scope"> 14 <template slot-scope="scope">
15 <span>{{ scope.row.waybillNo }}</span> 15 <span>{{ scope.row.waybillNo }}</span>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 </el-table-column> 27 </el-table-column>
28 <el-table-column label="航班日期" width="100px" align="center" sortable> 28 <el-table-column label="航班日期" width="100px" align="center" sortable>
29 <template slot-scope="scope"> 29 <template slot-scope="scope">
30 - <span>{{ scope.row.flightDate | parseTime('{y}-{m}-{d}') }}</span> 30 + <span>{{ scope.row.flightDate }}</span>
31 </template> 31 </template>
32 </el-table-column> 32 </el-table-column>
33 <el-table-column label="起始站" width="60px" align="center"> 33 <el-table-column label="起始站" width="60px" align="center">
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 </div> 63 </div>
64 </template> 64 </template>
65 </el-table-column> 65 </el-table-column>
66 - <el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width"> 66 + <el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width" >
67 <template slot-scope="scope"> 67 <template slot-scope="scope">
68 <el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button> 68 <el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>
69 <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button> 69 <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button>
@@ -79,8 +79,8 @@ @@ -79,8 +79,8 @@
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">  
83 - <el-form ref="" :inline="true" label-position="left" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px"> 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">
84 <div> 84 <div>
85 <el-tag type="info" effect="plain"> 85 <el-tag type="info" effect="plain">
86 航班信息 86 航班信息
@@ -350,17 +350,16 @@ @@ -350,17 +350,16 @@
350 Auth: Lei.j1ang 350 Auth: Lei.j1ang
351 Created: 2018/1/19-14:54 351 Created: 2018/1/19-14:54
352 */ 352 */
353 -import { fetchList } from '@/api/article' 353 +
354 import treeTable from '@/components/TreeTable' 354 import treeTable from '@/components/TreeTable'
355 -import treeToArray from './customEval' 355 +import treeToArray from '@/utils/customEval'
356 import Pagination from '@/components/Pagination' 356 import Pagination from '@/components/Pagination'
357 import waves from '@/directive/waves' // Waves directive 357 import waves from '@/directive/waves' // Waves directive
358 import country from '@/utils/country.js' 358 import country from '@/utils/country.js'
359 import companyType from '@/utils/companyType.js' 359 import companyType from '@/utils/companyType.js'
360 import dangerGoods from '@/utils/dangerGoods.js' 360 import dangerGoods from '@/utils/dangerGoods.js'
361 import goodsPackage from '@/utils/goodsPackage.js' 361 import goodsPackage from '@/utils/goodsPackage.js'
362 -import excel from '@/vendor/Export2Excel'  
363 -import { parseTime } from '@/utils' 362 +
364 const calendarTypeOptions = [ 363 const calendarTypeOptions = [
365 { key: 'CN', display_name: 'China' }, 364 { key: 'CN', display_name: 'China' },
366 { key: 'US', display_name: 'USA' }, 365 { key: 'US', display_name: 'USA' },
@@ -403,11 +402,12 @@ export default { @@ -403,11 +402,12 @@ export default {
403 return { 402 return {
404 func: treeToArray, 403 func: treeToArray,
405 expandAll: true, 404 expandAll: true,
  405 + fullscreen:true,
406 total: 1, 406 total: 1,
407 resend: true, 407 resend: true,
408 - listLoading: false,  
409 - downloadLoading: false,  
410 - loading: false, 408 + loading:false,
  409 + listLoading: true,
  410 + downloadLoading:false,
411 multipleSelection: [], 411 multipleSelection: [],
412 dialogFormVisible: false, 412 dialogFormVisible: false,
413 dialogStatus: '', 413 dialogStatus: '',
@@ -428,6 +428,7 @@ export default { @@ -428,6 +428,7 @@ export default {
428 flightDate: '', 428 flightDate: '',
429 custom: '' 429 custom: ''
430 }, 430 },
  431 + tableData:[],
431 temp: { 432 temp: {
432 id: undefined, 433 id: undefined,
433 waybillNo: '', 434 waybillNo: '',
@@ -441,7 +442,103 @@ export default { @@ -441,7 +442,103 @@ export default {
441 maniWeight: undefined 442 maniWeight: undefined
442 }, 443 },
443 manifestCustoms: ['4604', '4620', '4613'], 444 manifestCustoms: ['4604', '4620', '4613'],
444 - data: [ 445 +
  446 + pickerOptions: {
  447 + shortcuts: [
  448 + {
  449 + text: '今天',
  450 + onClick(picker) {
  451 + picker.$emit('pick', new Date())
  452 + }
  453 + },
  454 + {
  455 + text: '昨天',
  456 + onClick(picker) {
  457 + const date = new Date()
  458 + date.setTime(date.getTime() - 3600 * 1000 * 24)
  459 + picker.$emit('pick', date)
  460 + }
  461 + },
  462 + {
  463 + text: '明天',
  464 + onClick(picker) {
  465 + const date = new Date()
  466 + date.setTime(date.getTime() + 3600 * 1000 * 24)
  467 + picker.$emit('pick', date)
  468 + }
  469 + },
  470 + {
  471 + text: '一周前',
  472 + onClick(picker) {
  473 + const date = new Date()
  474 + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  475 + picker.$emit('pick', date)
  476 + }
  477 + }
  478 + ]
  479 + },
  480 + args: [null, null, 'timeLine'],
  481 + rules: {
  482 + maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
  483 + maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
  484 + desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
  485 + oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
  486 + flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
  487 + flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
  488 + custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
  489 + waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
  490 + }
  491 + }
  492 + },
  493 + created(){
  494 + console.log(this.$route.params.scopeRow)
  495 + this.getList()
  496 + },
  497 + methods: {
  498 + message(row) {
  499 + this.$message.info(row.event)
  500 + },
  501 + sortChange(data) {
  502 + const { prop, order } = data
  503 + if (prop === 'id') {
  504 + this.sortByID(order)
  505 + }
  506 + },
  507 + sortByID(order) {
  508 + if (order === 'ascending') {
  509 + this.listQuery.sort = '+id'
  510 + } else {
  511 + this.listQuery.sort = '-id'
  512 + }
  513 + this.handleFilter()
  514 + },
  515 + handleFilter(){
  516 +
  517 + },
  518 + handleSwitch(row){
  519 +
  520 + },
  521 + handleDownload(){
  522 + this.downloadLoading = true
  523 + },
  524 + handleUpdate(row) {
  525 + this.temp = Object.assign({}, row) // copy obj
  526 + this.temp.timestamp = new Date(this.temp.timestamp)
  527 + this.dialogStatus = 'update'
  528 + this.dialogFormVisible = true
  529 + this.$nextTick(() => {
  530 + this.$refs[''].clearValidate()
  531 + })
  532 + },
  533 + handleModifyStatus(row, status) {
  534 + this.$message({
  535 + message: '操作成功',
  536 + type: 'success'
  537 + })
  538 + row.status = status
  539 + },
  540 + getList() {
  541 + this.tableData = [
445 { 542 {
446 id: 0, 543 id: 0,
447 waybillNo: '580-20728399', 544 waybillNo: '580-20728399',
@@ -520,7 +617,7 @@ export default { @@ -520,7 +617,7 @@ export default {
520 ] 617 ]
521 }, 618 },
522 { 619 {
523 - id: 5, 620 + id: 4,
524 waybillNo: '580-20728391', 621 waybillNo: '580-20728391',
525 houseWaybillNo: '', 622 houseWaybillNo: '',
526 custom: '4604', 623 custom: '4604',
@@ -532,104 +629,278 @@ export default { @@ -532,104 +629,278 @@ export default {
532 maniWeight: 21321, 629 maniWeight: 21321,
533 status: '10003', 630 status: '10003',
534 customText: ' 已发送预配舱单 ' 631 customText: ' 已发送预配舱单 '
535 - }  
536 - ],  
537 - pickerOptions: {  
538 - shortcuts: [ 632 + },
539 { 633 {
540 - text: '今天',  
541 - onClick(picker) {  
542 - picker.$emit('pick', new Date())  
543 - } 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
544 }, 647 },
545 { 648 {
546 - text: '昨天',  
547 - onClick(picker) {  
548 - const date = new Date()  
549 - date.setTime(date.getTime() - 3600 * 1000 * 24)  
550 - picker.$emit('pick', date)  
551 - } 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
552 }, 662 },
553 { 663 {
554 - text: '明天',  
555 - onClick(picker) {  
556 - const date = new Date()  
557 - date.setTime(date.getTime() + 3600 * 1000 * 24)  
558 - picker.$emit('pick', date)  
559 - } 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
560 }, 677 },
561 { 678 {
562 - text: '一周前',  
563 - onClick(picker) {  
564 - const date = new Date()  
565 - date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)  
566 - picker.$emit('pick', date)  
567 - }  
568 - }  
569 - ] 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
570 }, 692 },
571 - args: [null, null, 'timeLine'],  
572 - rules: {  
573 - maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],  
574 - maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],  
575 - desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],  
576 - oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],  
577 - flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],  
578 - flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],  
579 - custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],  
580 - waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]  
581 - }  
582 - } 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
583 }, 707 },
584 - methods: {  
585 - message(row) {  
586 - this.$message.info(row.event) 708 + {
  709 + id: 10,
  710 + waybillNo: '580-20728399',
  711 + houseWaybillNo: '',
  712 + custom: '4604',
  713 + flight: 'CV9733',
  714 + flightDate: '2019-06-21',
  715 + oriStation: 'LUX',
  716 + desStation: 'CGO',
  717 + maniPiece: 50,
  718 + maniWeight: 21321,
  719 + status: '41301',
  720 + customText: ' 预配舱单主要数据传输成功。',
  721 + customComplate: 25
587 }, 722 },
588 - sortChange(data) {  
589 - const { prop, order } = data  
590 - if (prop === 'id') {  
591 - this.sortByID(order)  
592 - } 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
593 }, 737 },
594 - sortByID(order) {  
595 - if (order === 'ascending') {  
596 - this.listQuery.sort = '+id'  
597 - } else {  
598 - this.listQuery.sort = '-id'  
599 - }  
600 - this.handleFilter() 738 + {
  739 + id: 12,
  740 + waybillNo: '580-20728399',
  741 + houseWaybillNo: '',
  742 + custom: '4604',
  743 + flight: 'CV9733',
  744 + flightDate: '2019-06-21',
  745 + oriStation: 'LUX',
  746 + desStation: 'CGO',
  747 + maniPiece: 50,
  748 + maniWeight: 21321,
  749 + status: '41301',
  750 + customText: ' 预配舱单主要数据传输成功。',
  751 + customComplate: 25
601 }, 752 },
602 - handleUpdate(row) {  
603 - this.temp = Object.assign({}, row) // copy obj  
604 - this.temp.timestamp = new Date(this.temp.timestamp)  
605 - this.dialogStatus = 'update'  
606 - this.dialogFormVisible = true  
607 - this.$nextTick(() => {  
608 - this.$refs[''].clearValidate()  
609 - }) 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
610 }, 781 },
611 - handleFilter() {  
612 - this.listQuery.page = 1  
613 - this.getList() 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
614 }, 796 },
615 - handleModifyStatus(row, status) {  
616 - this.$message({  
617 - message: '操作成功',  
618 - type: 'success'  
619 - })  
620 - row.status = status 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
621 }, 811 },
622 - getList() {  
623 - this.listLoading = true  
624 - fetchList(this.listQuery).then(response => {  
625 - this.list = response.data.items  
626 - this.total = response.data.total 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
628 - // Just to simulate the time of the request  
629 - setTimeout(() => {  
630 - this.listLoading = false  
631 - }, 1.5 * 1000)  
632 - }) 902 + ]
  903 + this.total = this.tableData.length
633 }, 904 },
634 handleSelectionChange(val) { 905 handleSelectionChange(val) {
635 this.multipleSelection = val 906 this.multipleSelection = val
@@ -656,18 +927,6 @@ export default { @@ -656,18 +927,6 @@ export default {
656 this.$refs[''].clearValidate() 927 this.$refs[''].clearValidate()
657 }) 928 })
658 }, 929 },
659 - handleDownload() {  
660 - this.downloadLoading = true  
661 - const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']  
662 - const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']  
663 - const data = this.formatJson(filterVal, this.list)  
664 - excel.export_json_to_excel({  
665 - header: tHeader,  
666 - data,  
667 - filename: 'table-list'  
668 - })  
669 - this.downloadLoading = false  
670 - },  
671 remoteMethod(query) { 930 remoteMethod(query) {
672 if (query !== '') { 931 if (query !== '') {
673 this.loading = true 932 this.loading = true
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div class="app-content">
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
  6 + <el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
  7 + <el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
  8 + <el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
  9 + value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
  10 + </div>
  11 + <div class="filter-container">
  12 + <el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
  13 + <el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  14 + </el-select>
  15 + <el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
  16 + <el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  17 + </el-select>
  18 + <el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
  19 + <el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
  20 + </el-select>
  21 + <el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
  22 + <el-button class="filter-item" style="margin-left: 10px;" type="warning"
  23 + @click="handleUpdateStatus">批量修改状态</el-button>
  24 + </div>
  25 + <div class="midSpan">
  26 + <el-row>
  27 + <el-col :span="0.5">
  28 + <span style="color: red">注:</span>
  29 + </el-col>
  30 + <el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
  31 + <span>预配舱单</span>
  32 + </el-col>
  33 + <el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
  34 + <span>出港运抵</span>
  35 + </el-col>
  36 + <el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
  37 + <span>出港装载</span>
  38 + </el-col>
  39 + <el-col :span="1" style="background: #f5ffc0" align="center">
  40 + <span>出港理货</span>
  41 + </el-col>
  42 + </el-row>
  43 + </div>
  44 + <tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
  45 + style="font-size: 13px" border @selection-change="handleSelectionChange"
  46 + :row-class-name="tableRowClassName">
  47 + <el-table-column label="航班号" width="80px" align="center">
  48 + <template slot-scope="scope">
  49 + <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
  50 + </template>
  51 + </el-table-column>
  52 + <el-table-column label="航班日期" width="100px" align="center">
  53 + <template slot-scope="scope">
  54 + <span>{{ scope.row.flightdate }}</span>
  55 + </template>
  56 + </el-table-column>
  57 + <el-table-column label="航段" width="100px" align="center">
  58 + <template slot-scope="scope">
  59 + <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="主单号" width="120px" align="center" >
  63 + <template slot-scope="scope" >
  64 + <span>{{ scope.row.awba }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="分单号" width="150px" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{ scope.row.awbh }}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="件数" width="60px" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{ scope.row.piece }}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="重量" width="60px" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{ scope.row.weight }}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="关区" width="60px" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{ scope.row.customcode }}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="时间" width="150px" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{ scope.row.actime }}</span>
  90 + </template>
  91 + </el-table-column>
  92 + <el-table-column label="状态" width="90px" align="center">
  93 + <template slot-scope="scope">
  94 + <span v-if="scope.row.status ==='01'">未发送</span>
  95 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  96 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  97 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  98 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  99 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  100 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  101 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  102 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  103 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  104 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  105 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  106 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  107 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  108 + </template>
  109 + </el-table-column>
  110 + <el-table-column label="回执内容" align="center" show-overflow-tooltip>
  111 + <template slot-scope="scope">
  112 + <span>{{ scope.row.customText }}</span>
  113 + <!--<div>-->
  114 + <!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
  115 + <!--</div>-->
  116 + </template>
  117 + </el-table-column>
  118 + <el-table-column label="操作" width="180px" align="center">
  119 + <template slot-scope="scope">
  120 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
  121 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
  122 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
  123 + <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
  124 + <a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
  125 + </template>
  126 + </el-table-column>
  127 + </tree-table>
  128 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  129 + @pagination="getList"/>
  130 + </div>
  131 +</template>
  132 +<script>
  133 + import treeTable from '@/components/TreeTable'
  134 + import treeToArray from '@/utils/customEval'
  135 + import Pagination from '@/components/Pagination'
  136 + import {getManifests} from "@/api/exitManifest"
  137 +
  138 + import {getMt520XListForParam} from "@/api/exitTidy";
  139 + import {getMt3201ListForParam} from "@/api/exitArrive";
  140 + import {getMt4201ListForParam} from "@/api/exitLoading";
  141 +
  142 + export default {
  143 + name: "LostLoadChange",
  144 + components: {treeTable, Pagination},
  145 + inject:['reload'],
  146 + data() {
  147 + return {
  148 + func: treeToArray,
  149 + total: 1,
  150 + listLoading: false,
  151 + listQuery: {
  152 + pageSize: 1,
  153 + limitSize: 100,
  154 + awba:undefined,
  155 + carrier: undefined,
  156 + flightno:undefined,
  157 + flightDate: new Date(),
  158 + messageType: undefined,
  159 + messageStatus: undefined,
  160 + customStatus: undefined,
  161 + },
  162 + manifestData: [],
  163 + messageTypeList: [
  164 + {label:'预配舱单',value:'MT2201'},
  165 + {label:'出港运抵',value:'MT3201'},
  166 + {label:'出港装载',value:'MT4201'},
  167 + {label:'出港理货',value:'MT5202'}
  168 + ],
  169 + messageStatusList: [
  170 + {label:'未发送',value:'01'},
  171 + {label:'已发舱单报',value:'02'},
  172 + {label:'舱单报退单',value:'05'},
  173 + {label:'舱单转人工',value:'06'},
  174 + {label:'舱单报申报成功',value:'07'},
  175 + {label:'已发舱单删除报',value:'08'},
  176 + {label:'舱单删除报退单',value:'09'},
  177 + {label:'舱单删除报转人工',value:'10'},
  178 + {label:'舱单删除成功',value:'11'},
  179 + {label:'已发舱单修改报',value:'12'},
  180 + {label:'舱单修改报退单',value:'13'},
  181 + {label:'舱单修改报转人工',value:'14'},
  182 + {label:'舱单修改报成功',value:'15'},
  183 + {label:'海关已存在',value:'16'},
  184 + ],
  185 + customStatusList: [
  186 + {label:'普通货物',value:'001'},
  187 + {label:'国际转运货物',value:'002'},
  188 + {label:'国内转关',value:'003'},
  189 + {label:'空箱',value:'004'},
  190 + {label:'快件',value:'006'},
  191 + ]
  192 + }
  193 + },
  194 + methods: {
  195 + getList() {
  196 + this.listLoading = true
  197 + getManifests(this.listQuery).then(res =>{
  198 + this.manifestData = res.data.dataList
  199 + this.total = res.data.count
  200 + setTimeout(() =>{
  201 + this.listLoading = false
  202 + },1500)
  203 + })
  204 + },
  205 + handleSelectionChange() {
  206 +
  207 + },
  208 + handleSearch(){
  209 + this.getList()
  210 + },
  211 + handleUpdateStatus(row){
  212 +
  213 + },
  214 + handleUpdate(row){
  215 + if(row.messageType === 'MT2201'){
  216 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  217 + }
  218 + if(row.messageType === 'MT3201'){
  219 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  220 + }
  221 + if(row.messageType === 'MT4201'){
  222 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  223 + }
  224 + if(row.messageType === 'MT5201'){
  225 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  226 + }
  227 + },
  228 + tableRowClassName({row,index}){
  229 + if(row.messageType === 'MT2201'){
  230 + return 'MT2201-row'
  231 + }
  232 + if(row.messageType === 'MT3201'){
  233 + return 'MT3201-row'
  234 + }
  235 + if(row.messageType === 'MT4201'){
  236 + return 'MT4201-row'
  237 + }
  238 + if(row.messageType === 'MT5202'){
  239 + return 'MT5202-row'
  240 + }
  241 + }
  242 + }
  243 + }
  244 +
  245 +</script>
  246 +<style>
  247 + .el-table .MT2201-row {
  248 + background: oldlace;
  249 + }
  250 +
  251 + .el-table .MT3201-row {
  252 + background: #f0f9eb;
  253 + }
  254 +
  255 + .el-table .MT4201-row {
  256 + background: #bce7fd;
  257 + }
  258 +
  259 + .el-table .MT5202-row {
  260 + background: #f5ffc0;
  261 + }
  262 + .app-content{
  263 + margin-top: 20px;
  264 + }
  265 + .midSpan{
  266 + margin-bottom: 10px;
  267 + }
  268 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div class="app-content">
  4 + <div class="filter-container">
  5 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="主单号"/>
  6 + <el-input v-model="listQuery.awbh" clearable style="width: 200px;" class="filter-item" placeholder="分单号"/>
  7 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
  8 + </div>
  9 + <div>
  10 + <span style="color: red">注:主分单必须同时为空或者同时不为空</span>
  11 + </div>
  12 + <tree-table v-loading="listLoading" :data="lostLoadData" :eval-func="func" :expand-all="true"
  13 + style="font-size: 12px" border>
  14 + <el-table-column label="航班号" width="70px" align="center">
  15 + <template slot-scope="scope">
  16 + <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
  17 + </template>
  18 + </el-table-column>
  19 + <el-table-column label="航班日期" width="100px" align="center">
  20 + <template slot-scope="scope">
  21 + <span>{{ scope.row.flightdate }}</span>
  22 + </template>
  23 + </el-table-column>
  24 + <el-table-column label="航段" width="90px" align="center">
  25 + <template slot-scope="scope">
  26 + <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
  27 + </template>
  28 + </el-table-column>
  29 + <el-table-column label="主单号" width="120px" align="center">
  30 + <template slot-scope="scope">
  31 + <span>{{ scope.row.awba }}</span>
  32 + </template>
  33 + </el-table-column>
  34 + <el-table-column label="分单号" width="150px" align="center">
  35 + <template slot-scope="scope">
  36 + <span>{{ scope.row.awbh }}</span>
  37 + </template>
  38 + </el-table-column>
  39 + <el-table-column label="件数" width="60px" align="center">
  40 + <template slot-scope="scope">
  41 + <span>{{ scope.row.piece }}</span>
  42 + </template>
  43 + </el-table-column>
  44 + <el-table-column label="重量" width="60px" align="center">
  45 + <template slot-scope="scope">
  46 + <span>{{ scope.row.weight }}</span>
  47 + </template>
  48 + </el-table-column>
  49 + <el-table-column label="关区" width="60px" align="center">
  50 + <template slot-scope="scope">
  51 + <span>{{ scope.row.customcode }}</span>
  52 + </template>
  53 + </el-table-column>
  54 + <el-table-column label="时间" width="150px" align="center">
  55 + <template slot-scope="scope">
  56 + <span>{{ scope.row.actime }}</span>
  57 + </template>
  58 + </el-table-column>
  59 + <el-table-column label="落装状态" width="90px" align="center">
  60 + <template slot-scope="scope">
  61 + <span v-if="scope.row.offload ==='001'">未落装</span>
  62 + <span v-if="scope.row.offload ==='002'">已落装</span>
  63 + <span v-if="scope.row.offload ==='003'">已落装改配</span>
  64 + </template>
  65 + </el-table-column>
  66 + <el-table-column label="状态" width="90px" align="center">
  67 + <template slot-scope="scope">
  68 + <span v-if="scope.row.status ==='01'">未发送</span>
  69 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  70 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  71 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  72 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  73 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  74 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  75 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  76 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  77 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  78 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  79 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  80 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  81 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  82 + </template>
  83 + </el-table-column>
  84 + <el-table-column label="回执内容" align="center" show-overflow-tooltip>
  85 + <template slot-scope="scope">
  86 + <span>{{ scope.row.ext5 }}</span>
  87 + </template>
  88 + </el-table-column>
  89 + <el-table-column label="操作" width="220px" align="center">
  90 + <template slot-scope="scope">
  91 + <el-button size="mini" type="primary" @click="handleLostLoad(scope.row)"
  92 + :disabled="scope.row.offload ==='002'">落装申请
  93 + </el-button>
  94 + <el-button size="mini" type="success" @click="handleLostChange(scope.row)"
  95 + :disabled="scope.row.offload ==='003'">落装改配
  96 + </el-button>
  97 + </template>
  98 + </el-table-column>
  99 + </tree-table>
  100 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  101 + @pagination="getList"/>
  102 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible">
  103 + <el-form ref="lostChangeData" :model="lostChangeModel" :rules="lostChangeRules" label-width="120px">
  104 + <el-form-item label="需改配主单号" prop="manifest">
  105 + <el-input v-model="lostChangeModel.awba" style="width: 300px"></el-input>
  106 + </el-form-item>
  107 + <el-form-item label="需改配分单号" prop="manifest">
  108 + <el-input v-model="lostChangeModel.awbh" style="width: 300px"></el-input>
  109 + </el-form-item>
  110 + <el-form-item label="改配后主单号" prop="manifest">
  111 + <el-input v-model="lostChangeModel.manifest" style="width: 300px"></el-input>
  112 + </el-form-item>
  113 + </el-form>
  114 + <div slot="footer" class="dialog-footer">
  115 + <el-button @click="dialogFormVisible = false">取消</el-button>
  116 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  117 + </div>
  118 + </el-dialog>
  119 + </div>
  120 +
  121 +</template>
  122 +<script>
  123 + import treeTable from '@/components/TreeTable'
  124 + import treeToArray from '@/utils/customEval'
  125 + import Pagination from '@/components/Pagination'
  126 + import {getMt2201ListForParam, getLostLoadChange, saveLostChange, saveLostLoad} from "@/api/exitPre";
  127 + import {Message} from 'element-ui'
  128 + export default {
  129 + name: "LostLoad",
  130 + components: {treeTable, Pagination},
  131 + inject: ['reload'],
  132 + data() {
  133 + return {
  134 + func: treeToArray,
  135 + preTableStatus: true,
  136 + lostTableStatus: false,
  137 + total: 1,
  138 + listLoading: false,
  139 + listQuery: {
  140 + pageSize: 1,
  141 + limitSize: 100,
  142 + awba: undefined,
  143 + awbh: undefined,
  144 + },
  145 + dialogFormVisible: false,
  146 + dialogStatus: undefined,
  147 + dialogMap: {
  148 + create: '发送落装改配'
  149 + },
  150 + lostLoadData: [],
  151 + lostChangeModel:{
  152 + uuid: undefined,
  153 + awba: undefined,
  154 + awbh: undefined,
  155 + manifest: undefined
  156 + },
  157 + lostChangeRules:{}
  158 + }
  159 + },
  160 + methods: {
  161 + getList() {
  162 + this.listLoading = true
  163 + if (this.listQuery.awba !== undefined && this.listQuery.awbh !== undefined &&
  164 + this.listQuery.awba !== '' && this.listQuery.awbh !== '') {
  165 + getLostLoadChange(this.listQuery).then(res => {
  166 + this.lostLoadData = res.data.dataList
  167 + this.total = res.data.count
  168 + setTimeout(() => {
  169 + this.listLoading = false
  170 + }, 1500)
  171 + })
  172 + } else {
  173 + this.listQuery.awba = undefined
  174 + this.listQuery.awbh = undefined
  175 + getMt2201ListForParam(this.listQuery).then(res => {
  176 + this.lostLoadData = res.data.dataList
  177 + this.total = res.data.count
  178 + setTimeout(() => {
  179 + this.listLoading = false
  180 + }, 1500)
  181 + })
  182 + }
  183 + },
  184 + handleSearch() {
  185 + this.getList()
  186 + },
  187 + handleLostLoad(row) {
  188 + console.log(row)
  189 + this.$confirm("是否发送落装申请", "确认消息", {
  190 + distinguishCancelAndClose: true,
  191 + confirmButtonText: '确认发送',
  192 + cancelButtonText: '取消发送'
  193 + }).then(() => {
  194 + delete row.parent
  195 + delete row.children
  196 + saveLostLoad(row).then(res => {
  197 + if (res.data.count > 0) {
  198 + this.$message({
  199 + type: 'success',
  200 + message: res.data.respMessage
  201 + })
  202 + this.getList()
  203 + } else {
  204 + this.$message({
  205 + type: 'error',
  206 + message: res.data.respMessage
  207 + })
  208 + }
  209 + })
  210 +
  211 + }).catch(action => {
  212 + this.$message({
  213 + type: 'info',
  214 + message: action === 'cancel'
  215 + ? '取消发送'
  216 + : '发送取消'
  217 + })
  218 + })
  219 + },
  220 + handleLostChange(row) {
  221 + this.lostChangeModel = {
  222 + uuid: undefined,
  223 + awba: undefined,
  224 + awbh: undefined,
  225 + manifest: undefined
  226 + }
  227 + const preModel = Object.assign({},row)
  228 + this.lostChangeModel.awba = preModel.awba
  229 + this.lostChangeModel.awbh = preModel.awbh
  230 + this.lostChangeModel.uuid = preModel.uuid
  231 + this.dialogStatus = 'create'
  232 + this.dialogFormVisible = true
  233 + this.$nextTick(()=>{
  234 + this.$refs.lostChangeData.clearValidate()
  235 + })
  236 + },
  237 + createData(){
  238 + saveLostChange(this.lostChangeModel).then(res =>{
  239 + if(res.data.count >0){
  240 + Message.success(res.data.respMessage)
  241 + this.dialogFormVisible = false
  242 + this.getList()
  243 + } else {
  244 + Message.error(res.data.respMessage)
  245 + }
  246 + })
  247 + }
  248 + }
  249 + }
  250 +
  251 +</script>
  252 +<style>
  253 +
  254 +</style>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div>
  4 + <div>
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span class="titleSpan">航班号:{{this.arriveQuery.carrier}}{{this.arriveQuery.flightno}}</span>
  17 + <span class="titleSpan">航班日期:{{this.arriveQuery.flightdate}}</span>
  18 + <span class="titleSpan">航段:{{this.arriveQuery.originstation}}-{{this.arriveQuery.destinationstation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">出港运抵查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="4">
  34 + <div class="grid-content">
  35 + <el-input v-model="awba" placeholder="请输入主单号"></el-input>
  36 + </div>
  37 + </el-col>
  38 + <div class="grid-content el-btn">
  39 + <el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
  40 + <el-button v-if="arriveQuery.flightno ===undefined && arriveData.length<1"
  41 + type="primary" size="mini"
  42 + @click="handleAddArrive">新增运抵
  43 + </el-button>
  44 + </div>
  45 + </div>
  46 + </el-col>
  47 + </div>
  48 + </el-col>
  49 + <el-col :span="24">
  50 + <div class="grid-content content" style="margin-top: 6px">出港运抵明细</div>
  51 + </el-col>
  52 + </el-row>
  53 + </div>
  54 + <el-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
  55 + style="font-size: 12px" border @selection-change="handleSelectionChange">
  56 + <el-table-column type="selection" width="55" align="center"></el-table-column>
  57 + <el-table-column label="航班号" width="70" align="center">
  58 + <template slot-scope="scope">
  59 + <span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column label="运单号" width="120" align="center">
  63 + <template slot-scope="scope">
  64 + <span>{{scope.row.awba}}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="分单号" width="120" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{scope.row.awbh}}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="运抵件数" width="70" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{scope.row.piece}}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="运抵重量" width="70" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{scope.row.weight}}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="货物描述" width="100" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{scope.row.goodsname}}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="运抵时间" width="140" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{scope.row.arrivetime}}</span>
  90 + </template>
  91 + </el-table-column>
  92 + <el-table-column label="状态" width="100" align="center">
  93 + <template slot-scope="scope">
  94 + <span v-if="scope.row.status ==='01'">未发送</span>
  95 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  96 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  97 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  98 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  99 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  100 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  101 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  102 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  103 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  104 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  105 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  106 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  107 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  108 + </template>
  109 + </el-table-column>
  110 + <el-table-column prop="receipt" label="回执信息" width="180" align="center">
  111 + <template slot-scope="scope">
  112 + <span>{{scope.row.ext5}}</span>
  113 + </template>
  114 + </el-table-column>
  115 + <el-table-column prop="operation" label="操作" align="center">
  116 + <template slot-scope="scope">
  117 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  118 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
  119 + <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
  120 + :disabled="scope.row.status !=='00'">发送舱单报
  121 + </el-button>
  122 + <el-button size="mini" type="danger" 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>
  1 +<template>
  2 + <!--<div class="app-container">-->
  3 + <div>
  4 + <div>
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span class="titleSpan">航班号:{{this.listQuery.carrier}}{{this.listQuery.flightNo}}</span>
  17 + <span class="titleSpan">航班日期:{{this.listQuery.flightDate}}</span>
  18 + <span class="titleSpan">航段:{{this.listQuery.originStation}}-{{this.listQuery.destinationStation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">预配舱单查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="4">
  34 + <div class="grid-content">
  35 + <el-input v-model="listQuery.awba" placeholder="请输入主单号" clearable></el-input>
  36 + </div>
  37 + </el-col>
  38 + <div class="grid-content el-btn">
  39 + <el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
  40 + <el-button v-if="preModel.flightno === undefined && preData.length<1" type="primary"
  41 + size="mini"
  42 + @click="handleAddpre">新增预配舱单
  43 + </el-button>
  44 + </div>
  45 + </div>
  46 + </el-col>
  47 + </div>
  48 + </el-col>
  49 + <el-col :span="24">
  50 + <div class="grid-content content" style="margin-top: 6px">预配舱单明细</div>
  51 + </el-col>
  52 + </el-row>
  53 + </div>
  54 +
  55 + <tree-table :data="preData" stripe style="font-size: 12px" :eval-func="func" :expand-all="true" border
  56 + @selection-change="handleSelectionChange" v-loading="listLoading">
  57 + <el-table-column label="航班信息" width="90" align="center">
  58 + <template slot-scope="scope">
  59 + <p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>
  60 + <p class="tableInline">{{scope.row.flightdate}}</p>
  61 + <p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>
  62 + </template>
  63 + </el-table-column>
  64 + <el-table-column label="运单号" width="120" align="center">
  65 + <template slot-scope="scope">
  66 + <p class="tableInline">{{scope.row.awba}}</p>
  67 + <p class="tableInline" v-if="scope.row.awbh !==null">{{scope.row.awbh}}</p>
  68 + </template>
  69 + </el-table-column>
  70 + <el-table-column label="运单件数/重量" width="100" align="center">
  71 + <template slot-scope="scope">
  72 + {{scope.row.piece}}
  73 + </template>
  74 + </el-table-column>
  75 + <el-table-column label="预配件数/重量" width="100" align="center">
  76 + <template slot-scope="scope">
  77 + {{scope.row.weight}}
  78 + </template>
  79 + </el-table-column>
  80 + <el-table-column label="货物描述" width="120" align="center">
  81 + <template slot-scope="scope">
  82 + {{scope.row.goodsname}}
  83 + </template>
  84 + </el-table-column>
  85 + <el-table-column label="配载时间" width="140" align="center">
  86 + <template slot-scope="scope">
  87 + {{scope.row.actime}}
  88 + </template>
  89 + </el-table-column>
  90 + <el-table-column label="代理人代码" width="120" align="center">
  91 + <template slot-scope="scope">
  92 + {{scope.row.status}}
  93 + </template>
  94 + </el-table-column>
  95 + <el-table-column label="状态" width="100" align="center">
  96 + <template slot-scope="scope">
  97 + <span v-if="scope.row.status ==='01'">未发送</span>
  98 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  99 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  100 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  101 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  102 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  103 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  104 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  105 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  106 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  107 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  108 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  109 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  110 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  111 + </template>
  112 + </el-table-column>
  113 + <el-table-column prop="receipt" label="回执信息" align="center">
  114 + <template slot-scope="scope">
  115 + {{scope.row.ext5}}
  116 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  117 + </template>
  118 + </el-table-column>
  119 + <el-table-column label="操作" width="300">
  120 + <template slot-scope="scope">
  121 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
  122 + <el-button size="mini" type="success" v-if="scope.row.awbh ===null"
  123 + @click="handleAddAwbh(scope.row)">新增分单
  124 + </el-button>
  125 + <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
  126 + :disabled="scope.row.status !== '01'">发舱单报
  127 + </el-button>
  128 + <p></p>
  129 + <el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</el-button>
  130 +
  131 + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
  132 + <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
  133 + :disabled="scope.row.status === '01'">更改状态
  134 + </el-button>
  135 + </template>
  136 + </el-table-column>
  137 + </tree-table>
  138 + <div class="btnFoot">
  139 + <el-row>
  140 + <el-button type="primary" size="mini" v-if="preData.flightno !== undefined || preData.length> 0"
  141 + @click="handleAddpreInfo">新增预配舱单
  142 + </el-button>
  143 + <el-button type="primary" size="mini" @click="handelBackStep"
  144 + v-if="preModel.flightno !== undefined || preData.length >0">返回
  145 + </el-button>
  146 + </el-row>
  147 + </div>
  148 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
  149 + @pagination="getList"/>
  150 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%">
  151 + <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
  152 + label-width="120px" class="el-dialog-div">
  153 + <div class="grid-content content">
  154 + 运单信息
  155 + </div>
  156 + <el-row>
  157 + <el-col :span="7.5">
  158 + <el-form-item label="主单号" prop="awba">
  159 + <el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
  160 + </el-form-item>
  161 + </el-col>
  162 + <el-col :span="7.5" v-if="dialogStatus === 'addAwbh'">
  163 + <el-form-item label="分单号" prop="awbh">
  164 + <el-input v-model="awbh" clearable/>
  165 + </el-form-item>
  166 + </el-col>
  167 + </el-row>
  168 + <div class="grid-content content">
  169 + 航班信息
  170 + </div>
  171 + <el-row>
  172 + <el-col :span="7.5">
  173 + <el-form-item label="承运人" prop="carrier">
  174 + <el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/>
  175 + </el-form-item>
  176 + </el-col>
  177 + <el-col :span="7.5">
  178 + <el-form-item label="航班号" prop="flightno">
  179 + <el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/>
  180 + </el-form-item>
  181 + </el-col>
  182 + <el-col :span="7.5">
  183 + <el-form-item label="航班日期" prop="flightdate">
  184 + <el-date-picker :disabled="dialogStatus === 'addAwbh'"
  185 + value-format="yyyy-MM-dd"
  186 + v-model="preModel.flightdate" align="right"
  187 + type="date" placeholder="请输入航班日期" clearable/>
  188 + </el-form-item>
  189 + </el-col>
  190 +
  191 + </el-row>
  192 + <el-row>
  193 + <el-col :span="7.5">
  194 + <el-form-item label="起始站" prop="originstation">
  195 + <el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
  196 + </el-form-item>
  197 + </el-col>
  198 + <el-col :span="7.5">
  199 + <el-form-item label="目的站" prop="destinationstation">
  200 + <el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
  201 + </el-form-item>
  202 + </el-col>
  203 + </el-row>
  204 + <div class="grid-content content">
  205 + 航程信息
  206 + </div>
  207 + <div>
  208 + <el-row>
  209 + <el-col :span="7.5">
  210 + <el-form-item label="承运人" prop="carrier">
  211 + <el-input v-model="carrier" disabled clearable/>
  212 + </el-form-item>
  213 + </el-col>
  214 + <el-col :span="7.5">
  215 + <el-form-item label="到达航站" prop="destinationstation">
  216 + <el-input v-model="destinationstation" disabled clearable/>
  217 + </el-form-item>
  218 + </el-col>
  219 + </el-row>
  220 + <el-row>
  221 + <el-col :span="7.5">
  222 + <el-form-item label="承运人1">
  223 + <el-input v-model="by1" clearable/>
  224 + </el-form-item>
  225 + </el-col>
  226 + <el-col :span="7.5">
  227 + <el-form-item label="到达航站1">
  228 + <el-input v-model="dest1" clearable></el-input>
  229 + </el-form-item>
  230 + </el-col>
  231 + </el-row>
  232 + <el-row>
  233 + <el-col :span="7.5">
  234 + <el-form-item label="承运人2">
  235 + <el-input v-model="by2" clearable/>
  236 + </el-form-item>
  237 + </el-col>
  238 + <el-col :span="7.5">
  239 + <el-form-item label="到达航站2">
  240 + <el-input v-model="dest2" clearable/>
  241 + </el-form-item>
  242 + </el-col>
  243 +
  244 + </el-row>
  245 + </div>
  246 + <div class="grid-content content">
  247 + 货物信息
  248 + </div>
  249 + <el-row>
  250 + <el-col :span="7.5">
  251 + <el-form-item label="运单件数" prop="awbinfo.pcs">
  252 + <el-input v-model="preModel.awbinfo.pcs" clearable/>
  253 + </el-form-item>
  254 + </el-col>
  255 + <el-col :span="7.5">
  256 + <el-form-item label="运单重量" prop="awbinfo.weight">
  257 + <el-input v-model="preModel.awbinfo.weight" clearable/>
  258 + </el-form-item>
  259 + </el-col>
  260 + <el-col :span="7.5">
  261 + <el-form-item label="货物描述" prop="goodsname">
  262 + <el-input v-model="goodsname" clearable/>
  263 + </el-form-item>
  264 + </el-col>
  265 + </el-row>
  266 + <el-row>
  267 + <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
  268 + <el-form-item label="预配件数" prop="piece">
  269 + <el-input v-model="preModel.piece" clearable/>
  270 + </el-form-item>
  271 + </el-col>
  272 + <el-col :span="8" v-if="dialogStatus ==='addAwbh'">
  273 + <el-col :span="13">
  274 + <el-form-item label="预配件数" prop="piece">
  275 + <el-input v-model="preModel.piece" clearable/>
  276 + </el-form-item>
  277 + </el-col>
  278 + <el-col :span="8">
  279 + <span>剩余件数:{{awbPiece}}</span>
  280 + </el-col>
  281 + </el-col>
  282 + <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'">
  283 + <el-form-item label="预配重量" prop="weight">
  284 + <el-input v-model="preModel.weight" clearable/>
  285 + </el-form-item>
  286 + </el-col>
  287 + <el-col :span="8" v-if="dialogStatus ==='addAwbh'">
  288 + <el-col :span="13">
  289 + <el-form-item label="预配重量" prop="weight">
  290 + <el-input v-model="preModel.weight" clearable/>
  291 + </el-form-item>
  292 + </el-col>
  293 + <el-col :span="8">
  294 + <span>剩余重量:{{awbWeight}}</span>
  295 + </el-col>
  296 + </el-col>
  297 +
  298 + <el-col :span="7.5">
  299 + <el-form-item label="预配时间" prop="actime">
  300 + <el-date-picker value-format="yyyy-MM-dd HH:mm:ss"
  301 + v-model="preModel.actime" align="right"
  302 + type="datetime" placeholder="请选择"/>
  303 + </el-form-item>
  304 + </el-col>
  305 + </el-row>
  306 + <el-row>
  307 + <el-col :span="7.5">
  308 + <el-form-item label="关区代码" prop="customcode">
  309 + <el-select v-model="preModel.customcode" class="filter-item" placeholder="请选择关区代码"
  310 + :disabled="dialogStatus === 'addAwbh'">
  311 + <el-option v-for="item in customcodeList" :key="item.value" :label="item.label"
  312 + :value="item.value"></el-option>
  313 + </el-select>
  314 + </el-form-item>
  315 + </el-col>
  316 + <el-col :span="7.5">
  317 + <el-form-item label="海关状态">
  318 + <el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型">
  319 + <el-option v-for="item in customTypes" :key="item.value" :label="item.label"
  320 + :value="item.value"/>
  321 + </el-select>
  322 + </el-form-item>
  323 + </el-col>
  324 + <el-col :span="7.5">
  325 + <el-form-item label="付费方式" prop="awbinfo.collected">
  326 + <el-select v-model="preModel.awbinfo.collected" class="filter-item" placeholder="付费方式">
  327 + <el-option
  328 + v-for="item in payTypes"
  329 + :key="item.value"
  330 + :label="item.label"
  331 + :value="item.value"/>
  332 + </el-select>
  333 + </el-form-item>
  334 + </el-col>
  335 + </el-row>
  336 + <el-row>
  337 +
  338 + <el-col :span="7.5">
  339 + <el-form-item label="卸货地" prop="">
  340 + <el-input v-model="specopeid" clearable/>
  341 + </el-form-item>
  342 + </el-col>
  343 + <el-col :span="7.5">
  344 + <el-form-item label="代理人代码" prop="">
  345 + <el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
  346 + </el-form-item>
  347 + </el-col>
  348 + <el-col :span="7.5">
  349 + <el-form-item label="代理人名称" prop="">
  350 + <el-input v-model="preModel.awbinfo.shpcustomerid" clearable/>
  351 + </el-form-item>
  352 + </el-col>
  353 + </el-row>
  354 + <el-row>
  355 +
  356 + </el-row>
  357 + <div class="grid-content content">
  358 + 发货人信息
  359 + </div>
  360 + <el-row>
  361 + <el-col :span="7.5">
  362 + <el-form-item label="发货人名称" prop="awbinfo.shprname">
  363 + <el-input v-model="shprname" clearable/>
  364 + </el-form-item>
  365 + </el-col>
  366 + <el-col :span="7.5">
  367 + <el-form-item label="地址" prop="awbinfo.shpraddress">
  368 + <el-input v-model="shpraddress" clearable/>
  369 + </el-form-item>
  370 + </el-col>
  371 + <el-col :span="7.5">
  372 + <el-form-item label="城市代码">
  373 + <el-input v-model="scityid" maxlength="5" clearable/>
  374 + </el-form-item>
  375 + </el-col>
  376 + </el-row>
  377 + <el-row>
  378 + <el-col :span="7.5">
  379 + <el-form-item label="电话" prop="awbinfo.shprtel">
  380 + <el-input v-model="preModel.awbinfo.shprtel" clearable/>
  381 + </el-form-item>
  382 + </el-col>
  383 + <el-col :span="7.5">
  384 + <el-form-item label="传真">
  385 + <el-input v-model="preModel.awbinfo.shprmobiletype" clearable/>
  386 + </el-form-item>
  387 + </el-col>
  388 + <el-col :span="7.5">
  389 + <el-form-item label="发货人AEO编码" prop="awbinfo.shpaeocode">
  390 + <el-input v-model="shpaeocode" clearable/>
  391 + </el-form-item>
  392 + </el-col>
  393 + </el-row>
  394 + <el-row>
  395 + <el-col :span="7.5">
  396 + <el-form-item label="国家代码" prop="awbinfo.shprcountyr">
  397 + <el-select
  398 + :remote-method="remoteMethod"
  399 + :loading="listLoading"
  400 + v-model="shprcountyr"
  401 + filterable
  402 + remote
  403 + placeholder="请选择" clearable>
  404 + <el-option
  405 + v-for="item in countryOption"
  406 + :key="item.value"
  407 + :label="item.value"
  408 + :value="item.value">
  409 + <span style="float: left">{{ item.label }}</span>
  410 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  411 + </el-option>
  412 + </el-select>
  413 + </el-form-item>
  414 + </el-col>
  415 + <!--<el-col :span="7.5">-->
  416 + <!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
  417 + <!--<el-select-->
  418 + <!--v-model="shpcomidpre"-->
  419 + <!--filterable-->
  420 + <!--placeholder="请选择企业代码类型" style="width: 200px;">-->
  421 + <!--<el-option-->
  422 + <!--v-for="item in shpCompnyTypeOption"-->
  423 + <!--:key="item.value"-->
  424 + <!--:label="item.label"-->
  425 + <!--:value="item.value"/>-->
  426 + <!--</el-select>-->
  427 + <!--</el-form-item>-->
  428 + <!--</el-col>-->
  429 + <!--<el-col :span="7.5">-->
  430 + <!--<el-form-item prop="awbinfo.shpcomidpno" label-width="10px">-->
  431 + <!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
  432 + <!--</el-form-item>-->
  433 + <!--</el-col>-->
  434 + </el-row>
  435 + <div class="grid-content content">
  436 + 收货人信息
  437 + </div>
  438 + <el-row>
  439 + <el-col :span="7.5">
  440 + <el-form-item label="收货人名称" prop="awbinfo.cnsnname">
  441 + <el-input v-model="cnsnname" clearable/>
  442 + </el-form-item>
  443 + </el-col>
  444 + <el-col :span="7.5">
  445 + <el-form-item label="地址" prop="awbinfo.cnsnaddress">
  446 + <el-input v-model="cnsnaddress" clearable/>
  447 + </el-form-item>
  448 + </el-col>
  449 + <el-col :span="7.5">
  450 + <el-form-item label="城市代码">
  451 + <el-input v-model="ecityid" clearable maxlength="5"/>
  452 + </el-form-item>
  453 + </el-col>
  454 + </el-row>
  455 + <el-row>
  456 + <el-col :span="7.5">
  457 + <el-form-item label="电话" prop="awbinfo.cnsntel">
  458 + <el-input v-model="preModel.awbinfo.cnsntel" clearable/>
  459 + </el-form-item>
  460 + </el-col>
  461 + <el-col :span="7.5">
  462 + <el-form-item label="传真">
  463 + <el-input v-model="preModel.awbinfo.cnsrmobiletype" clearable/>
  464 + </el-form-item>
  465 + </el-col>
  466 + <el-col :span="7.5">
  467 + <el-form-item label="收货人AEO编码" prop="awbinfo.cnsaeocode">
  468 + <el-input v-model="cnsaeocode" clearable/>
  469 + </el-form-item>
  470 + </el-col>
  471 + </el-row>
  472 + <el-row>
  473 + <el-col :span="7.5">
  474 + <el-form-item label="国家代码" prop="awbinfo.cnscountyr">
  475 + <el-select
  476 + :remote-method="remoteMethod"
  477 + :listLoading="listLoading"
  478 + v-model="cnscountyr"
  479 + filterable
  480 + remote
  481 + placeholder="请选择" clearable>
  482 + <el-option
  483 + v-for="item in countryOption"
  484 + :key="item.value"
  485 + :label="item.value"
  486 + :value="item.value">
  487 + <span style="float: left">{{ item.label }}</span>
  488 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  489 + </el-option>
  490 + </el-select>
  491 + </el-form-item>
  492 + </el-col>
  493 + <el-col :span="7.5">
  494 + <el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
  495 + <el-input v-model="cnsrctcname" clearable/>
  496 + </el-form-item>
  497 + </el-col>
  498 + <el-col :span="7.5">
  499 + <el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
  500 + <el-input v-model="preModel.awbinfo.cnsrctctel" clearable/>
  501 + </el-form-item>
  502 + </el-col>
  503 + <!--<el-col :span="7.5">-->
  504 + <!--<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">-->
  505 + <!--<el-select-->
  506 + <!--v-model="cnscomidpre"-->
  507 + <!--filterable-->
  508 + <!--placeholder="请选择企业代码类型" style="width: 200px;">-->
  509 + <!--<el-option-->
  510 + <!--v-for="item in shpCompnyTypeOption"-->
  511 + <!--:key="item.value"-->
  512 + <!--:label="item.label"-->
  513 + <!--:value="item.value"/>-->
  514 + <!--</el-select>-->
  515 + <!--</el-form-item>-->
  516 + <!--</el-col>-->
  517 + <!--<el-col :span="7.5">-->
  518 + <!--<el-form-item prop="awbinfo.cnscomidno" label-width="10px">-->
  519 + <!--<el-input v-model="cnscomidno" placeholder="企业代码"/>-->
  520 + <!--</el-form-item>-->
  521 + <!--</el-col>-->
  522 + </el-row>
  523 + </el-form>
  524 + <div slot="footer" class="dialog-footer">
  525 + <el-button @click="dialogFormVisible = false">取消</el-button>
  526 + <el-button type="primary" @click="dialogStatus !=='create'? createData():updateData()">保存</el-button>
  527 + <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
  528 + </div>
  529 + </el-dialog>
  530 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  531 + <el-table :data="detailData" border>
  532 + <el-table-column label="操作时间" width="150">
  533 + <template slot-scope="scope">
  534 + {{scope.row.busdate}}
  535 + </template>
  536 + </el-table-column>
  537 + <el-table-column label="航班号" width="80">
  538 + <template slot-scope="scope">
  539 + {{scope.row.carrier}}{{scope.row.flightno}}
  540 + </template>
  541 + </el-table-column>
  542 + <el-table-column label="航班日期" width="100">
  543 + <template slot-scope="scope">
  544 + {{scope.row.flightdate}}
  545 + </template>
  546 + </el-table-column>
  547 + <el-table-column label="件数" width="70">
  548 + <template slot-scope="scope">
  549 + {{scope.row.buspiece}}
  550 + </template>
  551 + </el-table-column>
  552 + <el-table-column label="重量" width="70">
  553 + <template slot-scope="scope">
  554 + {{scope.row.busweight}}
  555 + </template>
  556 + </el-table-column>
  557 + <el-table-column label="回执信息" width="">
  558 + <template slot-scope="scope">
  559 + {{scope.row.cusrestext}}
  560 + </template>
  561 + </el-table-column>
  562 + <el-table-column label="操作人" width="100">
  563 + <template slot-scope="scope">
  564 + {{scope.row.operusername}}
  565 + </template>
  566 + </el-table-column>
  567 + </el-table>
  568 + </el-dialog>
  569 + </div>
  570 +</template>
  571 +<script>
  572 + import treeTable from '@/components/TreeTable'
  573 + import treeToArray from '@/utils/customEval'
  574 + import Pagination from '@/components/Pagination'
  575 +
  576 + import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
  577 + import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre'
  578 + import {Message} from "element-ui";
  579 + import {getResponseForParam} from '@/api/responseDetail'
  580 + import {
  581 + validAwb,
  582 + validAlphabets,
  583 + validAlphabetsAndNum,
  584 + validAlphabetsAndSpanceKey,
  585 + validatorNum
  586 + } from "@/utils/validate"
  587 +
  588 + export default {
  589 + name: "ExitPre",
  590 + components: {treeTable, Pagination},
  591 + inject: ['reload'],
  592 + data() {
  593 + const validatorAwb = (rule, value, callback) => {
  594 + if (!validAwb(value)) {
  595 + callback("请正确书写主单号")
  596 + }
  597 + callback()
  598 + }
  599 + const validatorAwbh = (rule, value, callback) => {
  600 + if (!validAlphabetsAndNum(value)) {
  601 + callback("只能输入字母和数字")
  602 + }
  603 + callback()
  604 + }
  605 + const validatorAlphabets = (rule, value, callback) => {
  606 + if (!validAlphabets(value)) {
  607 + callback("只能输入字母")
  608 + }
  609 + callback()
  610 + }
  611 + const validAlphabetsSpanceKey = (rule, value, callback) => {
  612 + if (!validAlphabetsAndSpanceKey(value)) {
  613 + callback("只能输入字母、数字、空格")
  614 + }
  615 + callback()
  616 + }
  617 + const validatorNums = (rule, value, callback) => {
  618 + if (!validatorNum(value)) {
  619 + callback("只能输入数字,并且小数位最多两位")
  620 + }
  621 + callback()
  622 + }
  623 + return {
  624 + func: treeToArray,
  625 + total: 1,
  626 + isAdmin:false,
  627 + listQuery: {
  628 + pageSize: 1,
  629 + limitSize: 100,
  630 + awba: undefined,
  631 + carrier: undefined,
  632 + flightNo: undefined,
  633 + flightDate: undefined,
  634 + originStation: undefined,
  635 + destinationStation: undefined
  636 + },
  637 + dialogMap: {
  638 + update: '编辑预配舱单',
  639 + create: '添加预配舱单',
  640 + addAwbh: '添加分单'
  641 + },
  642 + customTypes: [
  643 + {label: '普通货物', value: '001'},
  644 + {label: '国际转运货物', value: '002'},
  645 + {label: '国内转关', value: '003'},
  646 + {label: '空箱', value: '004'},
  647 + {label: '快件', value: '005'}],
  648 + payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
  649 + splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
  650 + customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}],
  651 + dialogStatus: undefined,
  652 + dialogTableVisible: false,
  653 + listLoading: false,
  654 + disabledStatus: false,
  655 + dialogFormVisible: false,
  656 + countryOption: [],
  657 + countryList: [],
  658 + countryResultList: [],
  659 + awbPiece: undefined,
  660 + awbWeight: undefined,
  661 + preRoles: {
  662 + weight: [{required: true, trigger: 'change', validator: validatorNums}],
  663 + piece: [{required: true, trigger: 'change', validator: validatorNums}],
  664 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  665 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  666 + flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
  667 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  668 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  669 + actime: [{required: true, trigger: 'blur', message: '预配时间不能为空'}],
  670 + customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
  671 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  672 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  673 + 'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
  674 + goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
  675 + ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}],
  676 + 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
  677 + 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
  678 + 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
  679 + 'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
  680 + 'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  681 + 'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
  682 + 'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
  683 + 'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
  684 + 'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  685 + 'awbinfo.weight': [{required: true, trigger: 'change', validator: validatorNums}],
  686 + 'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}],
  687 + },
  688 + preModel: {
  689 + awba: undefined,
  690 + awbh: undefined,
  691 + customcode: undefined,
  692 + flightno: undefined,
  693 + carrier: undefined,
  694 + flightdate: undefined,
  695 + originstation: undefined,
  696 + destinationstation: undefined,
  697 + piece: undefined,
  698 + weight: undefined,
  699 + actime: undefined,
  700 + goodsname: undefined,
  701 + splitcode: undefined,
  702 + uldType: undefined,
  703 + uldNo: undefined,
  704 + status: undefined,
  705 + ex5: undefined,
  706 + awbinfo: {
  707 + pcs: undefined,
  708 + weight: undefined,
  709 + scityid: undefined,
  710 + ecityid: undefined,
  711 + specopeid: undefined,
  712 + shprname: undefined,
  713 + shprmobiletype: undefined,
  714 + shprtel: undefined,
  715 + shpraddress: undefined,
  716 + shprcountyr: undefined,
  717 + shpcomidpre: undefined,
  718 + shpaeocode: undefined,
  719 + shpcomidpno: undefined,
  720 + shpcitycode: undefined,
  721 + shpcustomerid: undefined,
  722 + cnsnname: undefined,
  723 + cnsrmobiletype: undefined,
  724 + cnsntel: undefined,
  725 + cnsnaddress: undefined,
  726 + cnscountyr: undefined,
  727 + cnsrctcname: undefined,
  728 + cnsaeocode: undefined,
  729 + cnsrctctel: undefined,
  730 + cnscitycode: undefined,
  731 + cargonm: undefined,
  732 + sairportid: undefined,
  733 + dest1city: undefined,
  734 + by1: undefined,
  735 + dest1: undefined,
  736 + by2: undefined,
  737 + dest2: undefined,
  738 + by3: undefined,
  739 + dest3: undefined,
  740 + eairportid: undefined,
  741 + csgcustomerid: undefined,
  742 + collected: '0',
  743 + awbtype: undefined
  744 + }
  745 + },
  746 + preData: [],
  747 + detailData: []
  748 + }
  749 + },
  750 + mounted() {
  751 + // 延迟加载,否则会出错
  752 + setTimeout(() => {
  753 + this.countryResultList = this.countryList.map(item => {
  754 + return {value: item.countryCode, label: item.countryNameCn}
  755 + })
  756 + }, 1000)
  757 + },
  758 + created() {
  759 + if (this.$route.params.flightData !== undefined) {
  760 + this.listQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  761 + this.listQuery.flightNo = this.$route.params.flightData.flightno.substring(2)
  762 + this.listQuery.flightDate = this.$route.params.flightData.flightdate
  763 + this.listQuery.originStation = this.$route.params.flightData.originstation
  764 + this.listQuery.destinationStation = this.$route.params.flightData.destinationstation
  765 + this.listQuery.awba = this.$route.params.flightData.awba
  766 + this.getList()
  767 + }
  768 + this.getCountryList()
  769 + let username = JSON.parse(sessionStorage.getItem('user')).username
  770 + if(username === 'admin'){
  771 + this.isAdmin = true
  772 + }
  773 + },
  774 + computed: {
  775 + awba: {
  776 + get: function () {
  777 + return this.preModel.awba
  778 + },
  779 + set: function (val) {
  780 + if (val.length == 3) {
  781 + val = val + "-"
  782 + }
  783 + this.preModel.awba = val.trim()
  784 + }
  785 + },
  786 + awbh: {
  787 + get: function () {
  788 + return this.preModel.awbh
  789 + },
  790 + set: function (val) {
  791 + this.preModel.awbh = val.toUpperCase().trim()
  792 + }
  793 + },
  794 + flightno: {
  795 + get: function () {
  796 + return this.preModel.flightno
  797 + },
  798 + set: function (val) {
  799 + this.preModel.flightno = val.toUpperCase().trim()
  800 + }
  801 + },
  802 + carrier: {
  803 + get: function () {
  804 + return this.preModel.carrier
  805 + },
  806 + set: function (val) {
  807 + this.preModel.carrier = val.toUpperCase().trim()
  808 + }
  809 + },
  810 + originstation: {
  811 + get: function () {
  812 + return this.preModel.originstation
  813 + },
  814 + set: function (val) {
  815 + this.preModel.originstation = val.toUpperCase().trim()
  816 + }
  817 + },
  818 + destinationstation: {
  819 + get: function () {
  820 + return this.preModel.destinationstation
  821 + },
  822 + set: function (val) {
  823 + this.preModel.destinationstation = val.toUpperCase().trim()
  824 + }
  825 + },
  826 +
  827 + goodsname: {
  828 + get: function () {
  829 + return this.preModel.goodsname
  830 + },
  831 + set: function (val) {
  832 + this.preModel.goodsname = val.toUpperCase()
  833 + }
  834 + },
  835 + specopeid: {
  836 + get: function () {
  837 + return this.preModel.awbinfo.specopeid
  838 + },
  839 + set: function (val) {
  840 + this.preModel.awbinfo.specopeid = val.toUpperCase().trim()
  841 + }
  842 + },
  843 + shprname: {
  844 + get: function () {
  845 + return this.preModel.awbinfo.shprname
  846 + },
  847 + set: function (val) {
  848 + this.preModel.awbinfo.shprname = val.toUpperCase()
  849 + }
  850 + },
  851 + shpraddress: {
  852 + get: function () {
  853 + return this.preModel.awbinfo.shpraddress
  854 + },
  855 + set: function (val) {
  856 + this.preModel.awbinfo.shpraddress = val.toUpperCase()
  857 + }
  858 + },
  859 + shprcountyr: {
  860 + get: function () {
  861 + return this.preModel.awbinfo.shprcountyr
  862 + },
  863 + set: function (val) {
  864 + this.preModel.awbinfo.shprcountyr = val.toUpperCase().trim()
  865 + }
  866 + },
  867 + shpaeocode: {
  868 + get: function () {
  869 + return this.preModel.awbinfo.shpaeocode
  870 + },
  871 + set: function (val) {
  872 + this.preModel.awbinfo.shpaeocode = val.toUpperCase()
  873 + }
  874 + },
  875 + scityid: {
  876 + get: function () {
  877 + return this.preModel.awbinfo.scityid
  878 + },
  879 + set: function (val) {
  880 + this.preModel.awbinfo.scityid = val.toUpperCase().trim()
  881 + }
  882 + },
  883 + ecityid: {
  884 + get: function () {
  885 + return this.preModel.awbinfo.ecityid
  886 + },
  887 + set: function (val) {
  888 + this.preModel.awbinfo.ecityid = val.toUpperCase().trim()
  889 + }
  890 + },
  891 + cnsnname: {
  892 + get: function () {
  893 + return this.preModel.awbinfo.cnsnname
  894 + },
  895 + set: function (val) {
  896 + this.preModel.awbinfo.cnsnname = val.toUpperCase()
  897 + }
  898 + },
  899 + cnsnaddress: {
  900 + get: function () {
  901 + return this.preModel.awbinfo.cnsnaddress
  902 + },
  903 + set: function (val) {
  904 + this.preModel.awbinfo.cnsnaddress = val.toUpperCase()
  905 + }
  906 + },
  907 + cnscountyr: {
  908 + get: function () {
  909 + return this.preModel.awbinfo.cnscountyr
  910 + },
  911 + set: function (val) {
  912 + this.preModel.awbinfo.cnscountyr = val.toUpperCase()
  913 + }
  914 + },
  915 + cnsrctcname: {
  916 + get: function () {
  917 + return this.preModel.awbinfo.cnsrctcname
  918 + },
  919 + set: function (val) {
  920 + this.preModel.awbinfo.cnsrctcname = val.toUpperCase().trim()
  921 + }
  922 + },
  923 + cnsaeocode: {
  924 + get: function () {
  925 + return this.preModel.awbinfo.cnsaeocode
  926 + },
  927 + set: function (val) {
  928 + this.preModel.awbinfo.cnsaeocode = val.toUpperCase().trim()
  929 + }
  930 + },
  931 + by1: {
  932 + get: function () {
  933 + return this.preModel.awbinfo.by1
  934 + },
  935 + set: function (val) {
  936 + this.preModel.awbinfo.by1 = val.toUpperCase().trim()
  937 + }
  938 + },
  939 + dest1: {
  940 + get: function () {
  941 + return this.preModel.awbinfo.dest1
  942 + },
  943 + set: function (val) {
  944 + this.preModel.awbinfo.dest1 = val.toUpperCase().trim()
  945 + }
  946 + },
  947 + by2: {
  948 + get: function () {
  949 + return this.preModel.awbinfo.by2
  950 + },
  951 + set: function (val) {
  952 + this.preModel.awbinfo.by2 = val.toUpperCase().trim()
  953 + }
  954 + },
  955 + dest2: {
  956 + get: function () {
  957 + return this.preModel.awbinfo.dest2
  958 + },
  959 + set: function (val) {
  960 + this.preModel.awbinfo.dest2 = val.toUpperCase().trim()
  961 + }
  962 + },
  963 + by3: {
  964 + get: function () {
  965 + return this.preModel.awbinfo.by3
  966 + },
  967 + set: function (val) {
  968 + this.preModel.awbinfo.by3 = val.toUpperCase().trim()
  969 + }
  970 + },
  971 + dest3: {
  972 + get: function () {
  973 + return this.preModel.awbinfo.dest3
  974 + },
  975 + set: function (val) {
  976 + this.preModel.awbinfo.dest3 = val.toUpperCase().trim()
  977 + }
  978 + },
  979 + },
  980 + methods: {
  981 + // >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
  982 + getList() {
  983 + this.listLoading = true
  984 + if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
  985 + getMt2201ListForParam(this.listQuery).then(res => {
  986 + this.preData = res.data.dataList
  987 + this.total = res.data.count
  988 + if (res.data.count > 0) {
  989 + this.listQuery.carrier = this.preData[0].carrier
  990 + this.listQuery.flightNo = this.preData[0].flightno
  991 + this.listQuery.flightDate = this.preData[0].flightdate
  992 + this.listQuery.originStation = this.preData[0].originstation
  993 + this.listQuery.destinationStation = this.preData[0].destinationstation
  994 + this.listQuery.customcode = this.preData[0].customcode
  995 + }
  996 + setTimeout(() => {
  997 + this.listLoading = false
  998 + }, 1500)
  999 + })
  1000 + } else {
  1001 + getMt2201ListForParam(this.listQuery).then(res => {
  1002 + this.preData = res.data.dataList
  1003 + this.total = res.data.count
  1004 + setTimeout(() => {
  1005 + this.listLoading = false
  1006 + }, 1500)
  1007 + })
  1008 + }
  1009 +
  1010 + },
  1011 + // >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
  1012 + restModel() {
  1013 + this.preModel = {
  1014 + awba: undefined,
  1015 + awbh: undefined,
  1016 + customcode: undefined,
  1017 + flightno: undefined,
  1018 + carrier: undefined,
  1019 + flightdate: undefined,
  1020 + originstation: undefined,
  1021 + destinationstation: undefined,
  1022 + piece: undefined,
  1023 + weight: undefined,
  1024 + goodsname: undefined,
  1025 + splitcode: undefined,
  1026 + uldType: undefined,
  1027 + uldNo: undefined,
  1028 + status: undefined,
  1029 + ex5: undefined,
  1030 + awbinfo: {
  1031 + pcs: undefined,
  1032 + weight: undefined,
  1033 + specopeid: undefined,
  1034 + scityid: undefined,
  1035 + ecityid: undefined,
  1036 + shprname: undefined,
  1037 + shprmobiletype: undefined,
  1038 + shprtel: undefined,
  1039 + shpraddress: undefined,
  1040 + shprcountyr: undefined,
  1041 + shpcomidpre: undefined,
  1042 + shpaeocode: undefined,
  1043 + shpcomidpno: undefined,
  1044 + shpcitycode: undefined,
  1045 + shpcustomerid: undefined,
  1046 + cnsnname: undefined,
  1047 + cnsrmobiletype: undefined,
  1048 + cnsntel: undefined,
  1049 + cnsnaddress: undefined,
  1050 + cnscountyr: undefined,
  1051 + cnscomidpre: undefined,
  1052 + cnscomidno: undefined,
  1053 + cnsrctcname: undefined,
  1054 + cnsaeocode: undefined,
  1055 + cnsrctctel: undefined,
  1056 + cnscitycode: undefined,
  1057 + cargonm: undefined,
  1058 + sairportid: undefined,
  1059 + dest1city: undefined,
  1060 + by1: undefined,
  1061 + dest1: undefined,
  1062 + by2: undefined,
  1063 + dest2: undefined,
  1064 + by3: undefined,
  1065 + dest3: undefined,
  1066 + eairportid: undefined,
  1067 + csgcustomerid: undefined,
  1068 + collected: '0',
  1069 + }
  1070 + }
  1071 + },
  1072 + // >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
  1073 + handleAddpreInfo() {
  1074 + this.restModel()
  1075 + this.preModel.carrier = this.listQuery.carrier
  1076 + this.preModel.flightno = this.listQuery.flightno
  1077 + this.preModel.flightdate = this.listQuery.flightdate
  1078 + this.preModel.originstation = this.listQuery.originstation
  1079 + this.preModel.destinationstation = this.listQuery.carrier
  1080 + this.preModel.customcode = this.listQuery.customcode
  1081 + this.dialogStatus = 'create'
  1082 + this.dialogFormVisible = true
  1083 + this.$nextTick(() => {
  1084 + this.$refs.preFormData.clearValidate()
  1085 + })
  1086 + },
  1087 + createData() {
  1088 + this.$refs.preFormData.validate(valid => {
  1089 + if (valid) {
  1090 + addMt2201(this.preModel).then(res => {
  1091 + if (res.data.count > 0) {
  1092 + Message.success("新增成功")
  1093 + this.dialogFormVisible = false
  1094 + this.getList()
  1095 + } else {
  1096 + Message.error("新增失败,请检查数据")
  1097 + }
  1098 + })
  1099 + }
  1100 + })
  1101 + },
  1102 + // >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<
  1103 + handleSelectionChange() {
  1104 +
  1105 + },
  1106 + // >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
  1107 + handleSerach() {
  1108 + this.listQuery.carrier = undefined
  1109 + this.listQuery.flightno = undefined
  1110 + this.listQuery.originstation = undefined
  1111 + this.listQuery.flightdate = undefined
  1112 + this.listQuery.destinationstation = undefined
  1113 + this.getList()
  1114 + },
  1115 + // >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
  1116 + handleSend(row) {
  1117 + const resQuery = {
  1118 + carrier: row.carrier,
  1119 + flightNo: row.flightno,
  1120 + flightDate: row.flightdate,
  1121 + awba: row.awba,
  1122 + awbh: row.awbh,
  1123 + messageType: 'MT2201'
  1124 + }
  1125 + this.dialogTableVisible = true
  1126 + getResponseForParam(resQuery).then(res => {
  1127 + this.detailData = res.data
  1128 + })
  1129 + },
  1130 + // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
  1131 + handleAwbSend() {
  1132 +
  1133 + },
  1134 + // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
  1135 + handleEdit(row) {
  1136 + this.preModel = Object.assign({}, row)
  1137 + this.dialogStatus = 'update'
  1138 + this.dialogFormVisible = true
  1139 + this.$nextTick(() => {
  1140 + this.$refs.preFormData.clearValidate()
  1141 + })
  1142 + },
  1143 + updateData() {
  1144 + this.$refs.preFormData.validate(valid => {
  1145 + if (valid) {
  1146 + delete this.preModel.parent
  1147 + delete this.preModel.children
  1148 + updateMT2201(this.preModel).then(res => {
  1149 + if (res.data.count > 0) {
  1150 + Message.success("修改成功")
  1151 + this.dialogFormVisible = false
  1152 + this.getList()
  1153 + } else {
  1154 + Message.error("修改失败,请检查数据")
  1155 + }
  1156 + })
  1157 + }
  1158 + })
  1159 + },
  1160 + // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
  1161 + handleAwbEdit() {
  1162 +
  1163 + },
  1164 + // >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
  1165 + handleSaveAndSend() {
  1166 +
  1167 + },
  1168 + // >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
  1169 + handleAwbDelete(row) {
  1170 + delete row.parent
  1171 + delete row.children
  1172 + this.$confirm("是否删除", "确认消息", {
  1173 + distinguishCancelAndClose: true,
  1174 + confirmButtonText: '删除',
  1175 + cancelButtonText: '取消'
  1176 + }).then(() => {
  1177 + deleteByIsDelete(row).then(res => {
  1178 + if (res.data.count > 0) {
  1179 + this.$message({
  1180 + type: 'success',
  1181 + message: '删除成功'
  1182 + })
  1183 + this.getList()
  1184 + } else {
  1185 + this.$message({
  1186 + type: 'danger',
  1187 + message: '删除异常,请稍后重试'
  1188 + })
  1189 + }
  1190 + })
  1191 + }).catch(action => {
  1192 + this.$message({
  1193 + type: 'info',
  1194 + message: action === 'cancel'
  1195 + ? '取消删除'
  1196 + : '删除取消'
  1197 + })
  1198 + })
  1199 + },
  1200 + // >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
  1201 + handleAwbStatus(row) {
  1202 + delete row.parent
  1203 + delete row.children
  1204 + this.$confirm("是否发送更改状态", "确认消息", {
  1205 + distinguishCancelAndClose: true,
  1206 + confirmButtonText: '确认更改',
  1207 + cancelButtonText: '取消更改'
  1208 + }).then(() => {
  1209 + updateStatus(row).then(res => {
  1210 + if (res.data.count > 0) {
  1211 + this.$message({
  1212 + type: 'success',
  1213 + message: '当前运单状态已更改'
  1214 + })
  1215 + this.getList()
  1216 + } else {
  1217 + this.$message({
  1218 + type: 'error',
  1219 + message: '状态更改失败,请稍后重试'
  1220 + })
  1221 + }
  1222 + })
  1223 +
  1224 + }).catch(action => {
  1225 + this.$message({
  1226 + type: 'info',
  1227 + message: action === 'cancel'
  1228 + ? '取消状态更改'
  1229 + : '状态更改取消'
  1230 + })
  1231 + })
  1232 + },
  1233 + // >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
  1234 + handleAddAwbh(row) {
  1235 + this.restModel()
  1236 + const template = Object.assign({}, row) // copy obj
  1237 + this.preModel.awba = template.awba
  1238 + this.preModel.flightdate = template.flightdate
  1239 + this.preModel.flightno = template.flightno
  1240 + this.preModel.destinationstation = template.destinationstation
  1241 + this.preModel.customcode = template.customcode
  1242 + this.preModel.carrier = template.carrier
  1243 + this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr
  1244 + this.preModel.originstation = template.originstation
  1245 + this.preModel.awbinfo.collected = template.awbinfo.collected
  1246 + this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
  1247 + this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
  1248 + this.preModel.awbinfo.ex5 = template.awbinfo.ex5
  1249 + this.listQuery.awba = template.awba
  1250 + this.listQuery.flightDate = template.flightdate
  1251 + this.listQuery.flightNo = template.flightno
  1252 + this.listQuery.originStation = template.originstation
  1253 + this.listQuery.destinationStation = template.destinationstation
  1254 + this.listQuery.customcode = template.customcode
  1255 + this.listQuery.carrier = template.carrier
  1256 + getMt2201ListForParam(this.listQuery).then(res => {
  1257 + this.awbPiece = 0
  1258 + this.awbWeight = 0
  1259 + let residuePiece = 0
  1260 + let residueWeight = 0
  1261 + const childrenList = res.data.dataList[0].children
  1262 + if (childrenList.length < 1) {
  1263 + this.awbPiece = res.data.dataList[0].piece
  1264 + this.awbWeight = res.data.dataList[0].weight
  1265 + } else {
  1266 + for (var i = 0; i < childrenList.length; i++) {
  1267 + residuePiece += childrenList[i].piece
  1268 + residueWeight += childrenList[i].weight
  1269 + }
  1270 + this.awbPiece = res.data.dataList[0].piece - residuePiece
  1271 + this.awbWeight = res.data.dataList[0].weight - residueWeight
  1272 + }
  1273 + })
  1274 + this.dialogStatus = 'addAwbh'
  1275 + this.dialogFormVisible = true
  1276 + this.$nextTick(() => {
  1277 + this.$refs.preFormData.clearValidate()
  1278 + })
  1279 + },
  1280 +
  1281 + //获取城市列表
  1282 + getCountryList() {
  1283 + getCountry().then(res => {
  1284 + this.countryList = res.data.dataList
  1285 + })
  1286 + },
  1287 + remoteMethod(query) {
  1288 + if (query !== '') {
  1289 + this.listLoading = true
  1290 + setTimeout(() => {
  1291 + this.listLoading = false
  1292 + this.countryOption = this.countryResultList.filter(item => {
  1293 + return item.value.toUpperCase().trim()
  1294 + .indexOf(query.toUpperCase()) > -1
  1295 + })
  1296 + }, 200)
  1297 + // if (query.length > 1) {
  1298 + // this.selectCountry.countryCode = query
  1299 + // getByCountryCode(this.selectCountry).then(res => {
  1300 + // this.shpCompnyList = res.data.dataList
  1301 + // this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
  1302 + // console.log(item)
  1303 + // return {value: item.enterpriseCode, label: item.enterpriseCode}
  1304 + // })
  1305 + // })
  1306 + // }
  1307 + } else {
  1308 + this.countryOption = []
  1309 + }
  1310 +
  1311 +
  1312 + },
  1313 + handleAddpre() {
  1314 + const row = {
  1315 + 'messageType': 'MT2201'
  1316 + }
  1317 + this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
  1318 + },
  1319 +
  1320 + handelBackStep() {
  1321 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
  1322 + }
  1323 + }
  1324 + }
  1325 +
  1326 +</script>
  1327 +<style>
  1328 + .grid-content {
  1329 + height: 36px;
  1330 + line-height: 36px;
  1331 + }
  1332 +
  1333 + .content {
  1334 + border-left: 4px #409EFF solid;
  1335 + padding-left: 10px;
  1336 + background-color: #f9fafc;
  1337 + margin-bottom: 2px
  1338 + }
  1339 +
  1340 + .row-bg, .co {
  1341 + background-color: white;
  1342 + }
  1343 +
  1344 + .titlespan {
  1345 + font-weight: bold;
  1346 + margin-right: 35px;
  1347 + }
  1348 +
  1349 + .el-row {
  1350 + margin-top: 10px;
  1351 + margin-bottom: 0px;
  1352 + }
  1353 +
  1354 + .btnFoot {
  1355 + margin-top: 10px;
  1356 + }
  1357 +
  1358 + .el-btn {
  1359 + margin-left: 10px;
  1360 + display: inline-block;
  1361 + }
  1362 +
  1363 + .el-dialog-div {
  1364 + height: 60vh;
  1365 + overflow: auto;
  1366 + }
  1367 +
  1368 + .tableInline {
  1369 + line-height: 8px;
  1370 + }
  1371 +</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.tidyQuery.carrier}}{{this.tidyQuery.flightno}}</span>
  17 + <span class="titleSpan">航班日期:{{this.tidyQuery.flightdate}}</span>
  18 + <span class="titleSpan">航段:{{this.tidyQuery.originstation}}-{{this.tidyQuery.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="tidyQuery.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="tidyQuery.flightno === undefined && tidyData.length <1"
  41 + type="primary" size="mini"
  42 + @click="handleAddTidy">新增理货
  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 + <tree-table v-loading="listLoading" :data="tidyData" :eval-func="func" :expand-all="true" stripe
  55 + style="font-size: 12px" border @selection-change="handleSelectionChange">
  56 + <el-table-column label="运单号" width="110" align="center">
  57 + <template slot-scope="scope">
  58 + <span>{{scope.row.awba}}</span>
  59 + </template>
  60 + </el-table-column>
  61 + <el-table-column label="运单号" width="120" align="center">
  62 + <template slot-scope="scope">
  63 + <span>{{scope.row.awbh}}</span>
  64 + </template>
  65 + </el-table-column>
  66 + <el-table-column label="运单件数/重量" width="100" align="center">
  67 + <template slot-scope="scope">
  68 + <span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>
  69 + </template>
  70 + </el-table-column>
  71 + <el-table-column label="理货件数/重量" width="100" align="center">
  72 + <template slot-scope="scope">
  73 + <span>{{scope.row.piece}} / {{scope.row.weight}}</span>
  74 + </template>
  75 + </el-table-column>
  76 + <el-table-column label="装载开始/结束时间" width="260" align="center">
  77 + <template slot-scope="scope">
  78 + <span>{{scope.row.starttime}} - {{scope.row.endtime}}</span>
  79 + </template>
  80 + </el-table-column>
  81 + <el-table-column label="状态" width="100" align="center">
  82 + <template slot-scope="scope">
  83 + <span v-if="scope.row.status ==='01'">未发送</span>
  84 + <span v-if="scope.row.status ==='02'">已发舱单报</span>
  85 + <span v-if="scope.row.status ==='05'">舱单报退单</span>
  86 + <span v-if="scope.row.status ==='06'">舱单转人工</span>
  87 + <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  88 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
  89 + <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
  90 + <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
  91 + <span v-if="scope.row.status ==='11'">舱单删除成功</span>
  92 + <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
  93 + <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
  94 + <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
  95 + <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
  96 + <span v-if="scope.row.status ==='16'">海关已存在</span>
  97 + </template>
  98 + </el-table-column>
  99 + <el-table-column prop="receipt" label="回执信息" width="180" align="center">
  100 + <template slot-scope="scope">
  101 + <span>{{scope.row.ext5}}</span>
  102 + </template>
  103 + </el-table-column>
  104 + <el-table-column prop="operation" label="操作" show-overflow-tooltip align="center">
  105 + <template slot-scope="scope">
  106 +
  107 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  108 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
  109 + <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
  110 + :disabled="scope.row.status !=='00'">发舱单报
  111 + </el-button>
  112 + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
  113 +
  114 + <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
  115 + :disabled="scope.row.status ==='00'">更改状态
  116 + </el-button>
  117 + <el-button size="mini" type="primary" v-if="scope.row.awbh ===null"
  118 + @click="handleAddAwbh(scope.row)">新增分单
  119 + </el-button>
  120 + </template>
  121 + </el-table-column>
  122 + </tree-table>
  123 + <div class="btnFoot">
  124 + <el-row>
  125 + <el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
  126 + @click="handelAddTidyInfo">新增出港理货
  127 + </el-button>
  128 + <el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
  129 + @click="handelBackStep">返回
  130 + </el-button>
  131 + </el-row>
  132 + </div>
  133 + <pagination v-show="total>0" :total="total" :page.sync="tidyQuery.pageSize" :limit.sync="tidyQuery.limitSize"
  134 + @pagination="getList"/>
  135 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" style="width: 110%">
  136 + <el-form ref="tidyFormData" :model="tidyModel" :rules="tidyRoles" label-position="right"
  137 + label-width="120px">
  138 + <el-row>
  139 + <div class="grid-content content">
  140 + <span>航班信息</span>
  141 + </div>
  142 + </el-row>
  143 +
  144 + <el-row>
  145 + <el-col :span="7.5">
  146 + <el-form-item label="主单号" prop="awba">
  147 + <el-input v-model="tidyModel.awba" :disabled="dialogStatus === 'update'"></el-input>
  148 + </el-form-item>
  149 + </el-col>
  150 + <el-col :span="7.5">
  151 + <el-form-item label="分单号" prop="awbh">
  152 + <el-input v-model="awbh" :disabled="dialogStatus === 'addAwbh'"></el-input>
  153 + </el-form-item>
  154 + </el-col>
  155 + </el-row>
  156 + <el-row>
  157 + <el-col :span="7.5">
  158 + <el-form-item label="承运人" prop="carrier">
  159 + <el-input v-model="carrier" :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="flightno" :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="tidyModel.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 + <el-row>
  175 + <el-col :span="7.5">
  176 + <el-form-item label="起始站" prop="originstation">
  177 + <el-input v-model="originstation"
  178 + :disabled="dialogStatus === 'update'"></el-input>
  179 + </el-form-item>
  180 + </el-col>
  181 + <el-col :span="7.5">
  182 + <el-form-item label="目的站" prop="destinationstation">
  183 + <el-input v-model="destinationstation"
  184 + :disabled="dialogStatus === 'update'"></el-input>
  185 + </el-form-item>
  186 + </el-col>
  187 +
  188 + </el-row>
  189 + <div class="grid-content content">
  190 + <span>货物信息</span>
  191 + </div>
  192 +
  193 + <el-row>
  194 + <el-col :span="7.5">
  195 + <el-form-item label="运单件数" prop="price">
  196 + <el-input v-model="tidyModel.awbprice"></el-input>
  197 + </el-form-item>
  198 + </el-col>
  199 + <el-col :span="7.5">
  200 + <el-form-item label="运单重量" prop="weight">
  201 + <el-input v-model="tidyModel.awbweight"></el-input>
  202 + </el-form-item>
  203 + </el-col>
  204 + <el-col :span="7.5">
  205 + <el-col :span="7.5">
  206 + <el-form-item label="装载开始时间" prop="endtime">
  207 + <el-date-picker v-model="tidyModel.starttime" value-format="yyyy-MM-dd HH:mm:ss"
  208 + type="datetime"
  209 + placeholder="请输入"></el-date-picker>
  210 + </el-form-item>
  211 + </el-col>
  212 + </el-col>
  213 + </el-row>
  214 + <el-row>
  215 + <el-col :span="7.5">
  216 + <el-form-item label="装载件数" prop="piece">
  217 + <el-input v-model="tidyModel.piece"></el-input>
  218 + </el-form-item>
  219 + </el-col>
  220 + <el-col :span="7.5">
  221 + <el-form-item label="装载重量" prop="weight">
  222 + <el-input v-model="tidyModel.weight"></el-input>
  223 + </el-form-item>
  224 + </el-col>
  225 + <el-col :span="7.5">
  226 + <el-form-item label="装载结束时间" prop="endtime">
  227 + <el-date-picker v-model="tidyModel.endtime" value-format="yyyy-MM-dd HH:mm:ss"
  228 + type="datetime"
  229 + placeholder="请输入"></el-date-picker>
  230 + </el-form-item>
  231 + </el-col>
  232 + </el-row>
  233 + <el-row>
  234 + <el-col :span="7.5">
  235 + <el-form-item label="货物描述" prop="goodsname">
  236 + <el-input v-model="goodsname" placeholder="请输入"></el-input>
  237 + </el-form-item>
  238 + </el-col>
  239 + <el-col :span="7.5">
  240 + <el-form-item label="海关关区" prop="customcode">
  241 + <el-select v-model="tidyModel.customcode">
  242 + <el-option v-for="item in customcodeList " :key="item" :label="item"
  243 + :value="item"></el-option>
  244 + </el-select>
  245 + </el-form-item>
  246 + </el-col>
  247 + </el-row>
  248 + </el-form>
  249 + <div slot="footer" class="dialog-footer">
  250 + <el-button @click="dialogFormVisible = false">取消</el-button>
  251 + <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
  252 + <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
  253 + </div>
  254 + </el-dialog>
  255 + <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
  256 + <el-table :data="detailData" border>
  257 + <el-table-column label="操作时间" width="150">
  258 + <template slot-scope="scope">
  259 + {{scope.row.busdate}}
  260 + </template>
  261 + </el-table-column>
  262 + <el-table-column label="航班号" width="80">
  263 + <template slot-scope="scope">
  264 + {{scope.row.carrier}}{{scope.row.flightno}}
  265 + </template>
  266 + </el-table-column>
  267 + <el-table-column label="航班日期" width="100">
  268 + <template slot-scope="scope">
  269 + {{scope.row.flightdate}}
  270 + </template>
  271 + </el-table-column>
  272 + <el-table-column label="件数" width="70">
  273 + <template slot-scope="scope">
  274 + {{scope.row.buspiece}}
  275 + </template>
  276 + </el-table-column>
  277 + <el-table-column label="重量" width="70">
  278 + <template slot-scope="scope">
  279 + {{scope.row.busweight}}
  280 + </template>
  281 + </el-table-column>
  282 + <el-table-column label="回执信息" width="">
  283 + <template slot-scope="scope">
  284 + {{scope.row.cusrestext}}
  285 + </template>
  286 + </el-table-column>
  287 + <el-table-column label="操作人" width="100">
  288 + <template slot-scope="scope">
  289 + {{scope.row.operusername}}
  290 + </template>
  291 + </el-table-column>
  292 + </el-table>
  293 + </el-dialog>
  294 +
  295 + </div>
  296 +</template>
  297 +<script>
  298 + import treeTable from '@/components/TreeTable'
  299 + import treeToArray from '@/utils/customEval'
  300 + import Pagination from '@/components/Pagination'
  301 +
  302 + import {getMt520XListForParam, deleteByIsDelete, updateStatus, updateMt520X, addMt520X} from '@/api/exitTidy'
  303 + import {Message} from "element-ui";
  304 + import {getResponseForParam} from '@/api/responseDetail'
  305 + import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
  306 +
  307 + export default {
  308 + name: "ExitTidy",
  309 + components: {treeTable, Pagination},
  310 + inject: ['reload'],
  311 + data() {
  312 + const validatorAwb = (rule, value, callback) => {
  313 + if (!validAwb(value)) {
  314 + callback("请正确书写主单号")
  315 + }
  316 + callback()
  317 + }
  318 + const validatorAwbh = (rule, value, callback) => {
  319 + if (!validAlphabetsAndNum(value)) {
  320 + callback("只能输入字母和数字")
  321 + }
  322 + callback()
  323 + }
  324 + const validatorAlphabets = (rule, value, callback) => {
  325 + if (!validAlphabets(value)) {
  326 + callback("只能输入字母")
  327 + }
  328 + callback()
  329 + }
  330 + const validAlphabetsSpanceKey = (rule, value, callback) => {
  331 + if (!validAlphabetsAndSpanceKey(value)) {
  332 + callback("只能输入字母、数字、空格")
  333 + }
  334 + callback()
  335 + }
  336 + const validatorNums = (rule, value, callback) => {
  337 + if (!validatorNum(value)) {
  338 + callback("只能输入数字,并且小数位最多两位")
  339 + }
  340 + callback()
  341 + }
  342 + return {
  343 + func: treeToArray,
  344 + total: 1,
  345 + isAdmin:false,
  346 + dialogMap: {
  347 + update: '编辑出港理货',
  348 + create: '添加出港理货',
  349 + addAwbh: '添加分单理货'
  350 + },
  351 + customcodeList: [4604, 4620],
  352 + tidyQuery: {
  353 + pageSize: 1,
  354 + limitSize: 100,
  355 + awba: undefined,
  356 + carrier: undefined,
  357 + flightno: undefined,
  358 + flightdate: undefined,
  359 + originstation: undefined,
  360 + destinationstation: undefined,
  361 + customcode: undefined
  362 + },
  363 + tidyRoles: {
  364 + awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
  365 + awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  366 + goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
  367 + carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  368 + flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  369 + originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  370 + destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
  371 + weight: [{required: true, trigger: 'change', validator: validatorNums}],
  372 + piece: [{required: true, trigger: 'change', validator: validatorNums}],
  373 + },
  374 + tidyData: [],
  375 + detailData: [],
  376 + dialogTableVisible: false,
  377 + dialogStatus: undefined,
  378 + disabledStatus: false,
  379 + listLoading: false,
  380 + dialogFormVisible: false,
  381 + tidyModel: {
  382 + carrier: undefined,
  383 + flightno: undefined,
  384 + flightdate: undefined,
  385 + originstation: undefined,
  386 + destinationstation: undefined,
  387 + awba: undefined,
  388 + awbh: undefined,
  389 + piece: undefined,
  390 + weight: undefined,
  391 + goodsname: undefined,
  392 + customcode: undefined,
  393 + specialgoods: undefined,
  394 + starttime: undefined,
  395 + endtime: undefined,
  396 + awbpiece: undefined,
  397 + awbweight: undefined,
  398 + rcfdep: 'MT5202',
  399 + }
  400 + }
  401 + },
  402 + created() {
  403 + if (this.$route.params.flightData !== undefined) {
  404 + this.tidyQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  405 + this.tidyQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  406 + this.tidyQuery.flightdate = this.$route.params.flightData.flightdate
  407 + this.tidyQuery.originstation = this.$route.params.flightData.originstation
  408 + this.tidyQuery.destinationstation = this.$route.params.flightData.destinationstation
  409 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  410 + this.tidyQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
  411 + }
  412 + this.getList()
  413 + }
  414 + let username = JSON.parse(sessionStorage.getItem('user')).username
  415 + if(username === 'admin'){
  416 + this.isAdmin = true
  417 + }
  418 + },
  419 + watch: {
  420 + 'tidyModel.endtime': function (newValue, oldValue) {
  421 + let startData = new Date(this.tidyModel.starttime)
  422 + let endDate = new Date(newValue)
  423 + if (startData.getTime() > endDate.getTime()) {
  424 + this.tidyModel.endtime = undefined
  425 + Message.error("理货结束时间不得早于开始时间")
  426 + }
  427 + },
  428 + 'tidyModel.starttime': function (newValue, oldValue) {
  429 + let startData = new Date(newValue)
  430 + let endDate = new Date(this.tidyModel.endtime)
  431 + if (startData.getTime() > endDate.getTime()) {
  432 + this.tidyModel.starttime = undefined
  433 + Message.error("理货开始时间不得晚于结束时间")
  434 + }
  435 + }
  436 + },
  437 + computed: {
  438 + awbh: {
  439 + get: function () {
  440 + return this.tidyModel.awbh
  441 + },
  442 + set: function (val) {
  443 + this.tidyModel.awbh = val.toUpperCase().trim()
  444 + }
  445 + },
  446 + goodsname: {
  447 + get: function () {
  448 + return this.tidyModel.goodsname
  449 + },
  450 + set: function (val) {
  451 + this.tidyModel.goodsname = val.toUpperCase()
  452 + }
  453 + },
  454 + carrier: {
  455 + get: function () {
  456 + return this.tidyModel.carrier
  457 + },
  458 + set: function (val) {
  459 + this.tidyModel.carrier = val.toUpperCase().trim()
  460 + }
  461 + },
  462 + flightno: {
  463 + get: function () {
  464 + return this.tidyModel.flightno
  465 + },
  466 + set: function (val) {
  467 + this.tidyModel.flightno = val.toUpperCase().trim()
  468 + }
  469 + },
  470 + originstation: {
  471 + get: function () {
  472 + return this.tidyModel.originstation
  473 + },
  474 + set: function (val) {
  475 + this.tidyModel.originstation = val.toUpperCase().trim()
  476 + }
  477 + },
  478 + destinationstation: {
  479 + get: function () {
  480 + return this.tidyModel.destinationstation
  481 + },
  482 + set: function (val) {
  483 + this.tidyModel.destinationstation = val.toUpperCase().trim()
  484 + }
  485 + },
  486 + },
  487 + methods: {
  488 + // 查询出港理货列表
  489 + getList() {
  490 + this.listLoading = true
  491 + //根据是否有主单号 来给查询条件赋值
  492 + if (this.tidyQuery.awba != undefined && this.tidyQuery.awba != '') {
  493 + getMt520XListForParam(this.tidyQuery).then(res => {
  494 + this.tidyData = res.data.dataList
  495 + this.total = res.data.count
  496 + if (res.data.count > 0) {
  497 + this.tidyQuery.carrier = this.tidyData[0].carrier
  498 + this.tidyQuery.flightno = this.tidyData[0].flightno
  499 + this.tidyQuery.flightdate = this.tidyData[0].flightdate
  500 + this.tidyQuery.originstation = this.tidyData[0].originstation
  501 + this.tidyQuery.destinationstation = this.tidyData[0].destinationstation
  502 + this.tidyQuery.customcode = this.tidyData[0].customcode
  503 + }
  504 + setTimeout(() => {
  505 + this.listLoading = false
  506 + }, 1500)
  507 + })
  508 + } else {
  509 + getMt520XListForParam(this.tidyQuery).then(res => {
  510 + this.tidyData = res.data.dataList
  511 + this.total = res.data.count
  512 + setTimeout(() => {
  513 + this.listLoading = false
  514 + }, 1500)
  515 + })
  516 + }
  517 +
  518 + },
  519 + // 多选
  520 + handleSelectionChange() {
  521 +
  522 + },
  523 + // 搜索
  524 + handleSerach() {
  525 + this.tidyQuery.carrier = undefined
  526 + this.tidyQuery.flightno = undefined
  527 + this.tidyQuery.originstation = undefined
  528 + this.tidyQuery.flightdate = undefined
  529 + this.tidyQuery.destinationstation = undefined
  530 + this.getList()
  531 + },
  532 + // 收发明细
  533 + handleSend(row) {
  534 + const resQuery = {
  535 + carrier: row.carrier,
  536 + flightNo: row.flightno,
  537 + flightDate: row.flightdate,
  538 + awba: row.awba,
  539 + awbh: row.awbh,
  540 + messageType: 'MT5202'
  541 + }
  542 + this.dialogTableVisible = true
  543 + getResponseForParam(resQuery).then(res => {
  544 + this.detailData = res.data
  545 + })
  546 + },
  547 +
  548 + //发送舱单报
  549 + handleAwbSend(row) {
  550 +
  551 + },
  552 + //新增分单理货
  553 + handleAddAwbh(row) {
  554 + this.tidyModel.carrier = row.carrier
  555 + this.tidyModel.awba = row.awba
  556 + this.tidyModel.flightdate = row.flightdate
  557 + this.tidyModel.flightno = row.flightno
  558 + this.tidyModel.originstation = row.originstation
  559 + this.tidyModel.destinationstation = row.destinationstation
  560 + this.tidyModel.customcode = row.customcode
  561 + this.dialogStatus = 'addAwbh'
  562 + this.dialogFormVisible = true
  563 + this.$nextTick(() => {
  564 + this.$refs.tidyFormData.clearValidate()
  565 + })
  566 + },
  567 + // 删除当前运单
  568 + handleAwbDelete(row) {
  569 + delete row.parent
  570 + delete row.children
  571 + this.$confirm("是否删除", "确认消息", {
  572 + distinguishCancelAndClose: true,
  573 + confirmButtonText: '删除',
  574 + cancelButtonText: '取消'
  575 + }).then(() => {
  576 + deleteByIsDelete(row).then(res => {
  577 + if (res.data.count > 0) {
  578 + this.$message({
  579 + type: 'success',
  580 + message: '删除成功'
  581 + })
  582 + this.getList()
  583 + } else {
  584 + this.$message({
  585 + type: 'error',
  586 + message: '删除异常,请稍后重试'
  587 + })
  588 + }
  589 + })
  590 + }).catch(action => {
  591 + this.$message({
  592 + type: 'info',
  593 + message: action === 'cancel'
  594 + ? '取消删除'
  595 + : '删除取消'
  596 + })
  597 + })
  598 +
  599 + },
  600 + // 更新运单为可发送状态
  601 + handleAwbStatus(row) {
  602 + delete row.parent
  603 + delete row.children
  604 + this.$confirm("是否发送更改状态", "确认消息", {
  605 + distinguishCancelAndClose: true,
  606 + confirmButtonText: '确认更改',
  607 + cancelButtonText: '取消更改'
  608 + }).then(() => {
  609 + updateStatus(row).then(res => {
  610 + if (res.data.count > 0) {
  611 + this.$message({
  612 + type: 'success',
  613 + message: '当前运单状态已更改'
  614 + })
  615 + this.getList()
  616 + } else {
  617 + this.$message({
  618 + type: 'error',
  619 + message: '更新失败,请稍后重试'
  620 + })
  621 + }
  622 + })
  623 + }).catch(action => {
  624 + this.$message({
  625 + type: 'info',
  626 + message: action === 'cancel'
  627 + ? '取消状态更改'
  628 + : '取消状态更改'
  629 + })
  630 + })
  631 +
  632 + },
  633 + // 重置实体 并赋值refdep为出港理货MT5202
  634 + restModel() {
  635 + this.tidyModel = {
  636 + carrier: undefined,
  637 + flightno: undefined,
  638 + flightdate: undefined,
  639 + originstation: undefined,
  640 + destinationstation: undefined,
  641 + awba: undefined,
  642 + awbh: undefined,
  643 + piece: undefined,
  644 + weight: undefined,
  645 + goodsname: undefined,
  646 + customcode: undefined,
  647 + specialgoods: undefined,
  648 + starttime: undefined,
  649 + endtime: undefined,
  650 + awbpiece: undefined,
  651 + awbweight: undefined,
  652 + rcfdep: 'MT5202',
  653 + }
  654 + },
  655 + // 新增出港理货弹框
  656 + handelAddTidyInfo() {
  657 + this.restModel()
  658 + // 给model赋值,所使用数据是以单独单号查询数据所得
  659 + this.tidyModel.carrier = this.tidyQuery.carrier
  660 + this.tidyModel.flightdate = this.tidyQuery.flightdate
  661 + this.tidyModel.flightno = this.tidyQuery.flightno
  662 + this.tidyModel.originstation = this.tidyQuery.originstation
  663 + this.tidyModel.destinationstation = this.tidyQuery.destinationstation
  664 + this.tidyModel.customcode = this.tidyQuery.customcode
  665 + this.dialogStatus = 'create'
  666 + this.dialogFormVisible = true
  667 + this.$nextTick(() => {
  668 + this.$refs.tidyFormData.clearValidate()
  669 + })
  670 + },
  671 + // 新增出港理货请求
  672 + createData() {
  673 + this.$refs.tidyFormData.validate(valid => {
  674 + if (valid) {
  675 + addMt520X(this.tidyModel).then(res => {
  676 + if (res.data.count > 0) {
  677 + Message.success("出港理货新增成功")
  678 + this.dialogFormVisible = false
  679 + this.getList()
  680 + } else {
  681 + Message.error("出港理货新增失败,请检查数据")
  682 + }
  683 + })
  684 + }
  685 + })
  686 + },
  687 + // 更新出港理货弹框
  688 + handleEdit(row) {
  689 + this.tidyModel = Object.assign({}, row)
  690 + this.dialogStatus = 'update'
  691 + this.dialogFormVisible = true
  692 + this.$nextTick(() => {
  693 + this.$refs.tidyFormData.clearValidate()
  694 + })
  695 + },
  696 + // 更新出港理货请求
  697 + updateData() {
  698 + this.$refs.tidyFormData.validate(valid => {
  699 + if (valid) {
  700 + delete this.tidyModel.parent
  701 + delete this.tidyModel.children
  702 + updateMt520X(this.tidyModel).then(res => {
  703 + console.log(res.data)
  704 + if (res.data.count > 0) {
  705 + Message.success("出港理货更新成功")
  706 + this.dialogFormVisible = false
  707 + this.getList()
  708 + } else {
  709 + Message.error("出港理货更新失败,请检查数据")
  710 + }
  711 + })
  712 + }
  713 + })
  714 + },
  715 + // 保存并发送
  716 + handleSaveAndSend() {
  717 +
  718 + },
  719 + // 新增理货弹框
  720 + handleAddTidy() {
  721 + const row = {
  722 + 'messageType': 'MT5201'
  723 + }
  724 + this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
  725 + },
  726 + // 返回
  727 + handelBackStep() {
  728 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}})
  729 + }
  730 + }
  731 + }
  732 +
  733 +</script>
  734 +<style scoped>
  735 + .grid-content {
  736 + height: 36px;
  737 + line-height: 36px;
  738 + }
  739 +
  740 + .content {
  741 + border-left: 4px #409EFF solid;
  742 + padding-left: 10px;
  743 + background-color: #f9fafc;
  744 + margin-bottom: 2px
  745 + }
  746 +
  747 + .row-bg, .co {
  748 + background-color: white;
  749 + }
  750 +
  751 + .titleSpan {
  752 + font-weight: bold;
  753 + margin-right: 35px;
  754 + }
  755 +
  756 + .el-btn {
  757 + margin-left: 10px;
  758 + display: inline-block;
  759 + }
  760 +
  761 + .el-row {
  762 + margin-top: 10px;
  763 + margin-bottom: 0px;
  764 + }
  765 +
  766 + .btnFoot {
  767 + margin-top: 10px;
  768 + }
  769 +</style>
  1 +<template>
  2 + <div class="app-container">
  3 + <div class="filter-container">
  4 + <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
  5 + <el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
  6 + <el-date-picker v-model="listQuery.flightdate" clearable type="date" style="width: 200px;" placeholder="航班日期"
  7 + value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
  8 +
  9 + <el-select v-model="listQuery.customcode" clearable style="width: 200px;" class="filter-item" placeholder="请选择关区代码">
  10 + <el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"></el-option>
  11 + </el-select>
  12 + <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">{{
  13 + $t('table.search') }}
  14 + </el-button>
  15 + <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit"
  16 + @click="handleCreate">{{ $t('table.add') }}
  17 + </el-button>
  18 + <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message"
  19 + @click="handleDelList">批量发送
  20 + </el-button>
  21 + </div>
  22 + <tree-table :data="orgData" :eval-func="func" :expand-all="expandAll" stripe
  23 + style="font-size: 12px" border @selection-change="handleSelectionChange">
  24 + <el-table-column label="主单号" width="130px" align="center">
  25 + <template slot-scope="scope">
  26 + <span>{{ scope.row.awba }}</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.awbh }}</span>
  32 + </template>
  33 + </el-table-column>
  34 + <el-table-column label="航班号" width="90px" align="center">
  35 + <template slot-scope="scope">
  36 + <span>{{ scope.row.flightno }}</span>
  37 + </template>
  38 + </el-table-column>
  39 + <el-table-column label="航班日期" width="120px" align="center">
  40 + <template slot-scope="scope">
  41 + <span>{{ scope.row.flightdate }}</span>
  42 + </template>
  43 + </el-table-column>
  44 + <el-table-column label="起始站" width="70px" align="center">
  45 + <template slot-scope="scope">
  46 + <span>{{ scope.row.originstation }}</span>
  47 + </template>
  48 + </el-table-column>
  49 + <el-table-column label="目的站" width="70px" align="center">
  50 + <template slot-scope="scope">
  51 + <span>{{ scope.row.destinationstation }}</span>
  52 + </template>
  53 + </el-table-column>
  54 + <el-table-column label="件数" width="70px" align="center">
  55 + <template slot-scope="scope">
  56 + <span>{{ scope.row.piece }}</span>
  57 + </template>
  58 + </el-table-column>
  59 + <el-table-column label="重量" width="70px" align="center">
  60 + <template slot-scope="scope">
  61 + <span>{{ scope.row.weight }}</span>
  62 + </template>
  63 + </el-table-column>
  64 + <!--<el-table-column :label="$t('table.status')" width="90px" sortable>-->
  65 + <!--<template slot-scope="scope">-->
  66 + <!--<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>-->
  67 + <!--</template>-->
  68 + <!--</el-table-column>-->
  69 + <el-table-column label="回执内容" align="center">
  70 + <template slot-scope="scope">
  71 + <span>{{ scope.row.customText }}</span>
  72 + <!--<div>-->
  73 + <!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
  74 + <!--</div>-->
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column :label="$t('table.actions')" width="500px" align="center">
  78 + <template slot-scope="scope">
  79 + <el-button type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
  80 + <el-button size="mini" type="success" @click="handleSend(scope.row)">发送</el-button>
  81 + <el-button size="mini" @click="handleFeedBack(scope.row)">客服反馈</el-button>
  82 + <el-button size="mini" type="danger" @click="handleDel(scope.$index,scope.row)">删除</el-button>
  83 + <el-button size="mini" type="warning" @click="handleSwitch(scope.row)">更改状态</el-button>
  84 + <el-button size="mini" type="primary" v-if="scope.row.awbh ===null" @click="handleAddAwbh(scope.row)">新增分单</el-button>
  85 + <!--<el-button size="mini" type="primary" @click="handleRedirct(scope.row)">跳转测试</el-button>-->
  86 + </template>
  87 + </el-table-column>
  88 + </tree-table>
  89 + <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"
  90 + @pagination="getList"/>
  91 +
  92 + <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
  93 + <el-form ref="formData" :inline="true" :rules="rules" :model="temp" label-width="110px"
  94 + style="font-size: 13px" class="el-dialog-div">
  95 + <div class="tags">
  96 + <el-tag type="info" effect="plain">
  97 + 航班信息
  98 + </el-tag>
  99 + </div>
  100 + <div class="row-bg">
  101 + <el-row>
  102 + <el-col :span="10">
  103 + <el-form-item label="航班号" prop="flightno">
  104 + <el-input :disabled="dialogStatus !== 'create'" v-model="flightno"/>
  105 + </el-form-item>
  106 + </el-col>
  107 + <el-col :span="10">
  108 + <el-form-item label="航班日期" prop="flightdate">
  109 + <el-date-picker :disabled="dialogStatus !== 'create'" :picker-options="pickerOptions"
  110 + value-format="yyyy-MM-dd"
  111 + v-model="temp.flightdate" align="right"
  112 + type="date" placeholder="请输入航班日期" style="width: 87%"/>
  113 + </el-form-item>
  114 + </el-col>
  115 + </el-row>
  116 + <el-row>
  117 + <el-col :span="10">
  118 + <el-form-item label="起始站" prop="originstation">
  119 + <el-input :disabled="dialogStatus !== 'create'" v-model="originstation"/>
  120 + </el-form-item>
  121 + </el-col>
  122 + <el-col :span="10">
  123 + <el-form-item label="目的站" prop="destinationstation">
  124 + <el-input :disabled="dialogStatus !== 'create'" v-model="destinationstation"/>
  125 + </el-form-item>
  126 + </el-col>
  127 + </el-row>
  128 + <el-row>
  129 + <el-col :span="10">
  130 + <el-form-item label="是否分批" prop="splitcode">
  131 + <el-select v-model="temp.splitcode" class="filter-item" placeholder="请选择是否分批"
  132 + style="width: 93%">
  133 + <el-option v-for="item in splitcodes" :key="item.value" :label="item.value"
  134 + :value="item.value">
  135 + <span>{{item.label}}</span>
  136 + </el-option>
  137 + </el-select>
  138 + </el-form-item>
  139 + </el-col>
  140 + </el-row>
  141 + </div>
  142 +
  143 + <div class="tags">
  144 + <el-tag type="info" effect="plain">
  145 + 航程信息
  146 + </el-tag>
  147 + </div>
  148 + <div class="row-bg">
  149 + <el-row>
  150 + <el-col :span="10">
  151 + <el-form-item label="起始航站" prop="awbinfo.sairportid">
  152 + <el-input v-model="sairportid"/>
  153 + </el-form-item>
  154 + </el-col>
  155 + <el-col :span="10">
  156 + <el-form-item label="目的地" prop="destinationstation">
  157 + <el-input v-model="destinationstation"/>
  158 + </el-form-item>
  159 + </el-col>
  160 +
  161 + </el-row>
  162 + <el-row>
  163 + <el-row>
  164 + <el-col :span="10">
  165 + <el-form-item label="承运人" prop="carrier">
  166 + <el-input v-model="carrier"/>
  167 + </el-form-item>
  168 + </el-col>
  169 + <el-col :span="10">
  170 + <el-form-item label="到达航站" prop="awbinfo.eairportid">
  171 + <el-input v-model="eairportid"/>
  172 + </el-form-item>
  173 + </el-col>
  174 +
  175 + </el-row>
  176 + <el-col :span="10">
  177 + <el-form-item label="承运人1" >
  178 + <el-input v-model="by1"/>
  179 + </el-form-item>
  180 + </el-col>
  181 + <el-col :span="10">
  182 + <el-form-item label="到达航站1">
  183 + <el-input v-model="dest1"></el-input>
  184 + </el-form-item>
  185 + </el-col>
  186 +
  187 + </el-row>
  188 + <el-row>
  189 + <el-col :span="10">
  190 + <el-form-item label="承运人2">
  191 + <el-input v-model="by2"/>
  192 + </el-form-item>
  193 + </el-col>
  194 + <el-col :span="10">
  195 + <el-form-item label="到达航站2">
  196 + <el-input v-model="dest2"/>
  197 + </el-form-item>
  198 + </el-col>
  199 +
  200 + </el-row>
  201 +
  202 + </div>
  203 + <div class="tags">
  204 + <el-tag type="info" effect="plain">
  205 + 运单信息
  206 + </el-tag>
  207 + </div>
  208 + <div class="row-bg">
  209 + <el-row>
  210 + <el-col :span="10">
  211 + <el-form-item label="主单号" prop="awba">
  212 + <el-input :disabled="dialogStatus !== 'create'" v-model="awba"/>
  213 + </el-form-item>
  214 + </el-col>
  215 +
  216 + <el-col :span="10">
  217 + <el-form-item label="分单号">
  218 + <el-input :disabled="dialogStatus !== 'addAwh'" v-model="awbh"/>
  219 + </el-form-item>
  220 + </el-col>
  221 + </el-row>
  222 +
  223 + <el-row>
  224 + <el-col :span="10">
  225 + <el-form-item label="舱单件数" prop="piece">
  226 + <el-input v-model.number="temp.piece"/>
  227 + </el-form-item>
  228 + </el-col>
  229 + <el-col :span="10">
  230 + <el-form-item label="舱单重量" prop="weight">
  231 + <el-input v-model.number="temp.weight"/>
  232 + </el-form-item>
  233 + </el-col>
  234 + </el-row>
  235 + <el-row>
  236 + <el-col :span="10">
  237 + <el-form-item label="关区代码" prop="customcode">
  238 + <el-select v-model="temp.customcode" class="filter-item" placeholder="请选择关区代码"
  239 + style="width: 93%">
  240 + <el-option v-for="item in manifestCustoms" :key="item" :label="item"
  241 + :value="item"></el-option>
  242 + </el-select>
  243 + </el-form-item>
  244 + </el-col>
  245 + <el-col :span="10">
  246 + <el-form-item label="海关状态" prop="ex5">
  247 + <el-select v-model="temp.ex5" class="filter-item" placeholder="请录入货物类型"
  248 + style="width: 93%">
  249 + <el-option v-for="item in customTypes" :key="item" :label="item" :value="item"/>
  250 + </el-select>
  251 + </el-form-item>
  252 + </el-col>
  253 + </el-row>
  254 + <el-row>
  255 + <el-col :span="10">
  256 + <el-form-item label="付费方式" prop="awbinfo.collected">
  257 + <el-select v-model="temp.awbinfo.collected" class="filter-item" placeholder="付费方式"
  258 + style="width: 93%">
  259 + <el-option
  260 + v-for="item in payTypes"
  261 + :key="item.value"
  262 + :label="item.label"
  263 + :value="item.value"/>
  264 + </el-select>
  265 + </el-form-item>
  266 + </el-col>
  267 + <el-col :span="10">
  268 + <el-form-item label="特货代码">
  269 + <el-input v-model="specopeid"/>
  270 + </el-form-item>
  271 + </el-col>
  272 + </el-row>
  273 + <el-row>
  274 + <el-col :span="10">
  275 + <el-form-item label="货物描述" prop="goodsname">
  276 + <el-input v-model="goodsname"/>
  277 + </el-form-item>
  278 + </el-col>
  279 + </el-row>
  280 + </div>
  281 + <div class="tags">
  282 + <el-tag type="info" effect="plain">
  283 + 发货人信息
  284 + </el-tag>
  285 + </div>
  286 + <div class="row-bg">
  287 + <el-row>
  288 + <el-col :span="10">
  289 + <el-form-item label="发货人名称" prop="awbinfo.shprname">
  290 + <el-input v-model="shprname"/>
  291 + </el-form-item>
  292 + </el-col>
  293 + <el-col :span="10">
  294 + <el-form-item label="地址" prop="awbinfo.shpraddress">
  295 + <el-input v-model="shpraddress"/>
  296 + </el-form-item>
  297 + </el-col>
  298 + </el-row>
  299 + <el-row>
  300 + <el-col :span="10">
  301 + <el-form-item label="电话" prop="awbinfo.shprtel">
  302 + <el-input v-model="temp.awbinfo.shprtel"/>
  303 + </el-form-item>
  304 + </el-col>
  305 + <el-col :span="10">
  306 + <el-form-item label="传真">
  307 + <el-input v-model="temp.awbinfo.shprmobiletype"/>
  308 + </el-form-item>
  309 + </el-col>
  310 + </el-row>
  311 + <el-row>
  312 + <el-col :span="10">
  313 + <el-form-item label="国家代码" prop="awbinfo.shprcountyr">
  314 + <el-select
  315 + :remote-method="remoteMethod"
  316 + :loading="loading"
  317 + v-model="shprcountyr"
  318 + filterable
  319 + remote
  320 + placeholder="请选择" style="width: 93%;">
  321 + <el-option
  322 + v-for="item in countryOption"
  323 + :key="item.value"
  324 + :label="item.value"
  325 + :value="item.value">
  326 + <span style="float: left">{{ item.label }}</span>
  327 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  328 + </el-option>
  329 + </el-select>
  330 + </el-form-item>
  331 + </el-col>
  332 + <!--<el-col :span="14">-->
  333 + <!--<el-col :span="16">-->
  334 + <!--<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">-->
  335 + <!--<el-select-->
  336 + <!--v-model="shpcomidpre"-->
  337 + <!--filterable-->
  338 + <!--placeholder="请选择企业代码类型">-->
  339 + <!--<el-option-->
  340 + <!--v-for="item in shpCompnyTypeOption"-->
  341 + <!--:key="item.value"-->
  342 + <!--:label="item.label"-->
  343 + <!--:value="item.value"/>-->
  344 + <!--</el-select>-->
  345 + <!--</el-form-item>-->
  346 + <!--</el-col>-->
  347 + <!--<el-col :span="7">-->
  348 + <!--<el-form-item prop="awbinfo.shpcomidpno">-->
  349 + <!--<el-input v-model="shpcomidpno" placeholder="企业代码"/>-->
  350 + <!--</el-form-item>-->
  351 + <!--</el-col>-->
  352 + <!--</el-col>-->
  353 + </el-row>
  354 + </div>
  355 + <div class="tags">
  356 + <el-tag type="info" effect="plain">
  357 + 收货人信息
  358 + </el-tag>
  359 + </div>
  360 +
  361 + <div class="row-bg">
  362 + <el-row>
  363 + <el-col :span="10">
  364 + <el-form-item label="收货人名称" prop="awbinfo.cnsnname">
  365 + <el-input v-model="cnsnname"/>
  366 + </el-form-item>
  367 + </el-col>
  368 + <el-col :span="10">
  369 + <el-form-item label="地址" prop="awbinfo.cnsnaddress">
  370 + <el-input v-model="cnsnaddress"/>
  371 + </el-form-item>
  372 + </el-col>
  373 + </el-row>
  374 + <el-row>
  375 + <el-col :span="10">
  376 + <el-form-item label="电话" prop="awbinfo.cnsntel">
  377 + <el-input v-model="temp.awbinfo.cnsntel"/>
  378 + </el-form-item>
  379 + </el-col>
  380 + <el-col :span="10">
  381 + <el-form-item label="传真">
  382 + <el-input v-model="temp.awbinfo.cnsrmobiletype"/>
  383 + </el-form-item>
  384 + </el-col>
  385 + </el-row>
  386 + <el-row>
  387 + <el-col :span="10">
  388 + <el-form-item label="国家代码" prop="awbinfo.cnscountyr">
  389 + <el-select
  390 + :remote-method="remoteMethod"
  391 + :loading="loading"
  392 + v-model="cnscountyr"
  393 + filterable
  394 + remote
  395 + placeholder="请选择" style="width: 93%;">
  396 + <el-option
  397 + v-for="item in countryOption"
  398 + :key="item.value"
  399 + :label="item.value"
  400 + :value="item.value">
  401 + <span style="float: left">{{ item.label }}</span>
  402 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
  403 + </el-option>
  404 + </el-select>
  405 + </el-form-item>
  406 + </el-col>
  407 + <!--<el-col :span="14">
  408 + <el-col :span="16">
  409 + <el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">
  410 + <el-select
  411 + v-model="cnscomidpre"
  412 + filterable
  413 + placeholder="请选择企业代码类型">
  414 + <el-option
  415 + v-for="item in shpCompnyTypeOption"
  416 + :key="item.value"
  417 + :label="item.label"
  418 + :value="item.value"/>
  419 + </el-select>
  420 + </el-form-item>
  421 + </el-col>
  422 + <el-col :span="7">
  423 + <el-form-item prop="awbinfo.cnscomidno">
  424 + <el-input v-model="cnscomidno" placeholder="企业代码"/>
  425 + </el-form-item>
  426 + </el-col>
  427 + </el-col>-->
  428 + </el-row>
  429 + <el-row>
  430 + <el-col :span="10">
  431 + <el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
  432 + <el-input v-model="cnsrctcname"/>
  433 + </el-form-item>
  434 + </el-col>
  435 + <el-col :span="10">
  436 + <el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
  437 + <el-input v-model="temp.awbinfo.cnsrctctel"/>
  438 + </el-form-item>
  439 + </el-col>
  440 + </el-row>
  441 + </div>
  442 + </el-form>
  443 +
  444 + <div slot="footer" class="dialog-footer">
  445 + <el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button>
  446 + <el-button type="primary" @click="dialogStatus==='update'?createData():updateData()">{{
  447 + $t('table.confirm') }}
  448 + </el-button>
  449 + </div>
  450 + </el-dialog>
  451 + </div>
  452 +</template>
  453 +
  454 +<script>
  455 + import treeTable from '@/components/TreeTable'
  456 + import treeToArray from '@/utils/customEval'
  457 + import Pagination from '@/components/Pagination'
  458 + import waves from '@/directive/waves' // Waves directive
  459 + import country from '@/utils/country.js'
  460 +
  461 + import dangerGoods from '@/utils/dangerGoods.js'
  462 + import goodsPackage from '@/utils/goodsPackage.js'
  463 + import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
  464 +
  465 + import {addMt1201, updateMT1201, updateStatus, deleteByIsDelete, getMt1201ListForParam} from '@/api/orgManifest'
  466 + import {Message} from "element-ui";
  467 +
  468 + import {validAwb, validFlightNo} from '@/utils/validate'
  469 +
  470 + export default {
  471 + name: 'OrgManifest',
  472 + components: {treeTable, Pagination},
  473 + directives: {waves},
  474 + filters: {
  475 + statusFilter(status) {
  476 + const statusMap = {
  477 + 10003: '',
  478 + 41301: 'success',
  479 + 10002: 'info',
  480 + 10000: 'danger',
  481 + 45103: 'warning',
  482 + wrong: 'exception'
  483 + }
  484 + return statusMap[status]
  485 + },
  486 + typeFilter(type) {
  487 + return calendarTypeKeyValue[type]
  488 + }
  489 + },
  490 + data() {
  491 + const validatorAwb = (rule, value, callback) =>{
  492 + if(!validAwb(value)){
  493 + callback("请正确书写主单号")
  494 + }
  495 + callback()
  496 + }
  497 + const validatorFlightno = (rule, value, callback) =>{
  498 + if(!validFlightNo(value)){
  499 + callback("请正确书写航班号")
  500 + }
  501 + callback()
  502 + }
  503 + return {
  504 + func: treeToArray,
  505 + expandAll:true,
  506 + total: 0,
  507 + loading: false,
  508 + listLoading: false,
  509 + downloadLoading: false,
  510 + multipleSelection: [],
  511 + dialogFormVisible: false,
  512 + dialogStatus: '',
  513 + countryOption: [],
  514 + shpCompnyTypeOption: [],
  515 + textMap: {
  516 + update: '编辑',
  517 + create: '添加',
  518 + addAwbh:'新增分单'
  519 + },
  520 + listQuery: {
  521 + pageSize: 1,
  522 + limitSize: 20,
  523 + awba: undefined,
  524 + flightno: undefined,
  525 + flightdate: undefined,
  526 + customcode: undefined
  527 + },
  528 + //实体对象声明最好使用undefined,后台不会更改数据库默认值
  529 + temp: {
  530 + awba: undefined,
  531 + awbh: undefined,
  532 + customcode: undefined,
  533 + flightno: undefined,
  534 + carrier: undefined,
  535 + flightdate: undefined,
  536 + originstation: undefined,
  537 + destinationstation: undefined,
  538 + piece: undefined,
  539 + weight: undefined,
  540 + goodsname: undefined,
  541 + splitcode: undefined,
  542 + uldType: undefined,
  543 + uldNo: undefined,
  544 + status: undefined,
  545 + ex5:undefined,
  546 + awbinfo: {
  547 + specopeid: undefined,
  548 + shprname: undefined,
  549 + shprmobiletype: undefined,
  550 + shprtel: undefined,
  551 + shpraddress: undefined,
  552 + shprcountyr: undefined,
  553 + shpcomidpre: undefined,
  554 + shpcomidpno: undefined,
  555 + shpcustomerid: undefined,
  556 + cnsnname: undefined,
  557 + cnsrmobiletype: undefined,
  558 + cnsntel: undefined,
  559 + cnsnaddress: undefined,
  560 + cnscountyr: undefined,
  561 + cnscomidpre: undefined,
  562 + cnscomidno: undefined,
  563 + cnsrctcname: undefined,
  564 + cnsrctctel: undefined,
  565 + cargonm: undefined,
  566 + sairportid: undefined,
  567 + dest1city: undefined,
  568 + by1: undefined,
  569 + dest1: undefined,
  570 + by2: undefined,
  571 + dest2: undefined,
  572 + by3: undefined,
  573 + dest3: undefined,
  574 + eairportid: undefined,
  575 + csgcustomerid: undefined,
  576 + collected: '0'
  577 + }
  578 + },
  579 + manifestCustoms: ['4604', '4620', '4613'],
  580 + customTypes: ['普通货物', '国际转运货物', '国内转关', '空箱', '快件'],
  581 + payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
  582 + splitcodes:[{label: '是', value: 'T'}, {label: '否', value: 'P'}],
  583 + orgData: [],
  584 + countryList: [],
  585 + countryResultList: [],
  586 + shpCompnyList: [],
  587 + pickerOptions: {
  588 + shortcuts: [
  589 + {
  590 + text: '今天',
  591 + onClick(picker) {
  592 + picker.$emit('pick', new Date())
  593 + }
  594 + },
  595 + {
  596 + text: '昨天',
  597 + onClick(picker) {
  598 + const date = new Date()
  599 + date.setTime(date.getTime() - 3600 * 1000 * 24)
  600 + picker.$emit('pick', date)
  601 + }
  602 + },
  603 + {
  604 + text: '明天',
  605 + onClick(picker) {
  606 + const date = new Date()
  607 + date.setTime(date.getTime() + 3600 * 1000 * 24)
  608 + picker.$emit('pick', date)
  609 + }
  610 + },
  611 + {
  612 + text: '一周前',
  613 + onClick(picker) {
  614 + const date = new Date()
  615 + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  616 + picker.$emit('pick', date)
  617 + }
  618 + }
  619 + ]
  620 + },
  621 + args: [null, null, 'timeLine'],
  622 + selectCountry: {
  623 + countryNameCn: undefined,
  624 + countryCode: undefined
  625 + },
  626 + rules: {
  627 + weight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'change'}],
  628 + piece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'change'}],
  629 + destinationstation: [{required: true, message: '运单目的地必须输入', trigger: 'change'}],
  630 + originstation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}],
  631 + flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
  632 + flightno: [{required: true, trigger: 'blur', validator: validatorFlightno}],
  633 + carrier: [{required: true, trigger: 'blur', message: '承运人不能为空'}],
  634 + customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
  635 + awba: [{required: true, trigger:'blur', validator: validatorAwb}],
  636 + 'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
  637 + goodsname: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
  638 + ex5: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
  639 + 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
  640 + 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
  641 + 'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
  642 + 'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  643 + 'awbinfo.shpcomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
  644 + 'awbinfo.shpcomidpno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
  645 + 'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
  646 + 'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
  647 + 'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
  648 + 'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  649 + 'awbinfo.cnscomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
  650 + 'awbinfo.cnscomidno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
  651 +
  652 + }
  653 + }
  654 + },
  655 + created() {
  656 + this.getList()
  657 + this.getCountryList()
  658 + },
  659 + mounted() {
  660 + // 延迟加载,否则会出错
  661 + setTimeout(() => {
  662 + this.countryResultList = this.countryList.map(item => {
  663 + return {value: item.countryCode, label: item.countryNameCn}
  664 + })
  665 + }, 1000)
  666 + },
  667 + computed: {
  668 + awba: {
  669 + get: function () {
  670 + return this.temp.awba
  671 + },
  672 + set: function (val) {
  673 + if(val.length==3){
  674 + val = val+"-"
  675 + }
  676 + this.temp.awba = val.trim()
  677 + }
  678 + },
  679 + awbh: {
  680 + get: function () {
  681 + return this.temp.awbh
  682 + },
  683 + set: function (val) {
  684 + this.temp.awbh = val.toUpperCase().trim()
  685 + }
  686 + },
  687 + flightno: {
  688 + get: function () {
  689 + return this.temp.flightno
  690 + },
  691 + set: function (val) {
  692 + this.temp.flightno = val.toUpperCase().trim()
  693 + }
  694 + },
  695 + carrier:{
  696 + get: function () {
  697 + return this.temp.carrier
  698 + },
  699 + set: function (val) {
  700 + this.temp.carrier = val.toUpperCase().trim()
  701 + }
  702 + },
  703 + originstation: {
  704 + get: function () {
  705 + return this.temp.originstation
  706 + },
  707 + set: function (val) {
  708 + this.temp.originstation = val.toUpperCase().trim()
  709 + }
  710 + },
  711 + destinationstation: {
  712 + get: function () {
  713 + return this.temp.destinationstation
  714 + },
  715 + set: function (val) {
  716 + this.temp.destinationstation = val.toUpperCase().trim()
  717 + }
  718 + },
  719 +
  720 + goodsname: {
  721 + get: function () {
  722 + return this.temp.goodsname
  723 + },
  724 + set: function (val) {
  725 + this.temp.goodsname = val.toUpperCase().trim()
  726 + }
  727 + },
  728 + specopeid: {
  729 + get: function () {
  730 + return this.temp.awbinfo.specopeid
  731 + },
  732 + set: function (val) {
  733 + this.temp.awbinfo.specopeid = val.toUpperCase().trim()
  734 + }
  735 + },
  736 + shprname: {
  737 + get: function () {
  738 + return this.temp.awbinfo.shprname
  739 + },
  740 + set: function (val) {
  741 + this.temp.awbinfo.shprname = val.toUpperCase().trim()
  742 + }
  743 + },
  744 + shpraddress: {
  745 + get: function () {
  746 + return this.temp.awbinfo.shpraddress
  747 + },
  748 + set: function (val) {
  749 + this.temp.awbinfo.shpraddress = val.toUpperCase().trim()
  750 + }
  751 + },
  752 + shprcountyr: {
  753 + get: function () {
  754 + return this.temp.awbinfo.shprcountyr
  755 + },
  756 + set: function (val) {
  757 + this.temp.awbinfo.shprcountyr = val.toUpperCase().trim()
  758 + }
  759 + },
  760 + shpcomidpre: {
  761 + get: function () {
  762 + return this.temp.awbinfo.shpcomidpre
  763 + },
  764 + set: function (val) {
  765 + this.temp.awbinfo.shpcomidpre = val.toUpperCase().trim()
  766 + }
  767 + },
  768 + shpcomidpno: {
  769 + get: function () {
  770 + return this.temp.awbinfo.shpcomidpno
  771 + },
  772 + set: function (val) {
  773 + this.temp.awbinfo.shpcomidpno = val.toUpperCase().trim()
  774 + }
  775 + },
  776 + cnsnname: {
  777 + get: function () {
  778 + return this.temp.awbinfo.cnsnname
  779 + },
  780 + set: function (val) {
  781 + this.temp.awbinfo.cnsnname = val.toUpperCase().trim()
  782 + }
  783 + },
  784 + cnsnaddress: {
  785 + get: function () {
  786 + return this.temp.awbinfo.cnsnaddress
  787 + },
  788 + set: function (val) {
  789 + this.temp.awbinfo.cnsnaddress = val.toUpperCase().trim()
  790 + }
  791 + },
  792 + cnscountyr: {
  793 + get: function () {
  794 + return this.temp.awbinfo.cnscountyr
  795 + },
  796 + set: function (val) {
  797 + this.temp.awbinfo.cnscountyr = val.toUpperCase().trim()
  798 + }
  799 + },
  800 + cnscomidno: {
  801 + get: function () {
  802 + return this.temp.awbinfo.cnscomidno
  803 + },
  804 + set: function (val) {
  805 + this.temp.awbinfo.cnscomidno = val.toUpperCase().trim()
  806 + }
  807 + },
  808 + cnsrctcname: {
  809 + get: function () {
  810 + return this.temp.awbinfo.cnsrctcname
  811 + },
  812 + set: function (val) {
  813 + this.temp.awbinfo.cnsrctcname = val.toUpperCase().trim()
  814 + }
  815 + },
  816 + sairportid: {
  817 + get: function () {
  818 + return this.temp.awbinfo.sairportid
  819 + },
  820 + set: function (val) {
  821 + this.temp.awbinfo.sairportid = val.toUpperCase().trim()
  822 + }
  823 + },
  824 + by1: {
  825 + get: function () {
  826 + return this.temp.awbinfo.by1
  827 + },
  828 + set: function (val) {
  829 + this.temp.awbinfo.by1 = val.toUpperCase().trim()
  830 + }
  831 + },
  832 + dest1: {
  833 + get: function () {
  834 + return this.temp.awbinfo.dest1
  835 + },
  836 + set: function (val) {
  837 + this.temp.awbinfo.dest1 = val.toUpperCase().trim()
  838 + }
  839 + },
  840 + by2: {
  841 + get: function () {
  842 + return this.temp.awbinfo.by2
  843 + },
  844 + set: function (val) {
  845 + this.temp.awbinfo.by2 = val.toUpperCase().trim()
  846 + }
  847 + },
  848 + dest2: {
  849 + get: function () {
  850 + return this.temp.awbinfo.dest2
  851 + },
  852 + set: function (val) {
  853 + this.temp.awbinfo.dest2 = val.toUpperCase().trim()
  854 + }
  855 + },
  856 + by3: {
  857 + get: function () {
  858 + return this.temp.awbinfo.by3
  859 + },
  860 + set: function (val) {
  861 + this.temp.awbinfo.by3 = val.toUpperCase().trim()
  862 + }
  863 + },
  864 + dest3: {
  865 + get: function () {
  866 + return this.temp.awbinfo.dest3
  867 + },
  868 + set: function (val) {
  869 + this.temp.awbinfo.dest3 = val.toUpperCase().trim()
  870 + }
  871 + },
  872 + eairportid: {
  873 + get: function () {
  874 + return this.temp.awbinfo.eairportid
  875 + },
  876 + set: function (val) {
  877 + this.temp.awbinfo.eairportid = val.toUpperCase().trim()
  878 + }
  879 + },
  880 + cnscomidpre: {
  881 + get: function () {
  882 + return this.temp.awbinfo.cnscomidpre
  883 + },
  884 + set: function (val) {
  885 + this.temp.awbinfo.cnscomidpre = val.toUpperCase().trim()
  886 + }
  887 + }
  888 + },
  889 + watch: {
  890 + 'temp.awbinfo.cnscountyr': function (newValue, oldValue) {
  891 + if (newValue != null && newValue != '') {
  892 + this.selectCountry.countryCode = newValue
  893 + getByCountryCode(this.selectCountry).then(res => {
  894 + this.temp.awbinfo.cnscomidpre = res.data.dataList[0].enterpriseCode
  895 + })
  896 + }
  897 + },
  898 + 'temp.awbinfo.shprcountyr': function (newValue, oldValue) {
  899 + if (newValue != null && newValue != '') {
  900 + this.selectCountry.countryCode = newValue
  901 + getByCountryCode(this.selectCountry).then(res => {
  902 + this.temp.awbinfo.shpcomidpre = res.data.dataList[0].enterpriseCode
  903 + })
  904 + }
  905 + }
  906 + },
  907 + methods: {
  908 + // >>>>>>>>>>>>>>>>页面加载运行<<<<<<<<<<<<<<<<<<
  909 + //获取MT1201列表
  910 + getList() {
  911 + getMt1201ListForParam(this.listQuery).then(res => {
  912 + this.total = res.data.count
  913 + this.orgData = res.data.dataList
  914 + setTimeout(() => {
  915 + this.listLoading = false
  916 + }, 1.5 * 1000)
  917 + })
  918 + },
  919 + //获取城市列表
  920 + getCountryList() {
  921 + getCountry().then(res => {
  922 + this.countryList = res.data.dataList
  923 + })
  924 + },
  925 + // >>>>>>>>>>>>>>>>页面加载运行<<<<<<<<<<<<<<<<<<
  926 +
  927 +
  928 + message(row) {
  929 + this.$message.info(row.event)
  930 + },
  931 +
  932 +
  933 + sortChange(data) {
  934 + const {prop, order} = data
  935 + if (prop === 'id') {
  936 + this.sortByID(order)
  937 + }
  938 + },
  939 + sortByID(order) {
  940 + if (order === 'ascending') {
  941 + this.listQuery.sort = '+id'
  942 + } else {
  943 + this.listQuery.sort = '-id'
  944 + }
  945 + this.handleSearch()
  946 + },
  947 + handleDownload() {
  948 +
  949 + },
  950 +
  951 + // >>>>>>>>>>>>>>>>批量删除<<<<<<<<<<<<<<<<<<
  952 + handleSelectionChange(val) {
  953 + this.multipleSelection = val
  954 + },
  955 + handleDelList() {
  956 + const val = this.multipleSelection
  957 + if (val) {
  958 + val.forEach((val, index) => {
  959 +
  960 + })
  961 + }
  962 + },
  963 +
  964 + // >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
  965 + handleSearch() {
  966 + this.getList()
  967 + },
  968 +
  969 + // >>>>>>>>>>>>>>>>更新数据<<<<<<<<<<<<<<<<<<
  970 + handleUpdate(row) {
  971 + this.temp = Object.assign({}, row) // copy obj
  972 + this.dialogStatus = 'update'
  973 + this.dialogFormVisible = true
  974 + this.$nextTick(() => {
  975 + this.$refs.formData.clearValidate()
  976 + })
  977 + },
  978 + updateData() {
  979 + this.$refs.formData.validate(valid => {
  980 + if (valid) {
  981 + updateMT1201(this.temp).then(res => {
  982 + if (res.data.count > 0) {
  983 + this.dialogFormVisible = false
  984 + this.getList()
  985 + Message.success(res.data.respMessage)
  986 + } else {
  987 + Message.success("数据异常清稍后重试")
  988 + }
  989 + })
  990 + }
  991 + })
  992 + },
  993 +
  994 + // >>>>>>>>>>>>>>>>客服反馈<<<<<<<<<<<<<<<<<<
  995 + handleFeedBack(row) {
  996 + this.$message({
  997 + message: '操作成功,请前往微信查看',
  998 + type: 'success'
  999 + })
  1000 + },
  1001 +
  1002 + // >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
  1003 + resetTemp() {
  1004 + this.temp = {
  1005 + awba: undefined,
  1006 + awbh: undefined,
  1007 + customcode: undefined,
  1008 + customcode: undefined,
  1009 + carrier: undefined,
  1010 + flightno: undefined,
  1011 + flightdate: undefined,
  1012 + originstation: undefined,
  1013 + destinationstation: undefined,
  1014 + piece: undefined,
  1015 + weight: undefined,
  1016 + goodsname: undefined,
  1017 + splitcode: undefined,
  1018 + awbinfo: {
  1019 + specopeid: undefined,
  1020 + shprname: undefined,
  1021 + shprmobiletype: undefined,
  1022 + shprtel: undefined,
  1023 + shpraddress: undefined,
  1024 + shprcountyr: undefined,
  1025 + shpcomidpre: undefined,
  1026 + shpcomidpno: undefined,
  1027 + cnsnname: undefined,
  1028 + cnsrmobiletype: undefined,
  1029 + cnsntel: undefined,
  1030 + cnsnaddress: undefined,
  1031 + cnscountyr: undefined,
  1032 + cnscomidpre: undefined,
  1033 + cnscomidno: undefined,
  1034 + cnsrctcname: undefined,
  1035 + cnsrctctel: undefined,
  1036 + cargonm: undefined,
  1037 + sairportid: undefined,
  1038 + dest1city: undefined,
  1039 + by1: undefined,
  1040 + dest1: undefined,
  1041 + by2: undefined,
  1042 + dest2: undefined,
  1043 + by3: undefined,
  1044 + dest3: undefined,
  1045 + eairportid: undefined,
  1046 + csgcustomerid: undefined,
  1047 + collected: '0'
  1048 + }
  1049 + }
  1050 + },
  1051 +
  1052 + // >>>>>>>>>>>>>>>>新增数据<<<<<<<<<<<<<<<<<<
  1053 + handleCreate() {
  1054 + this.resetTemp()
  1055 + this.dialogStatus = 'create'
  1056 + this.dialogFormVisible = true
  1057 + this.$nextTick(() => {
  1058 + this.$refs.formData.clearValidate()
  1059 + })
  1060 + },
  1061 + createData() {
  1062 + this.$refs.formData.validate(valid => {
  1063 + if (valid) {
  1064 + addMt1201(this.temp).then(res => {
  1065 + if (res.data.count > 0) {
  1066 + this.dialogFormVisible = false
  1067 + this.getList()
  1068 + Message.success(res.data.respMessage)
  1069 + } else {
  1070 + Message.success("数据异常清稍后重试")
  1071 + }
  1072 + })
  1073 +
  1074 + }
  1075 + })
  1076 + },
  1077 +
  1078 + // >>>>>>>>>>>>>>>>下拉远程搜索<<<<<<<<<<<<<<<<<<
  1079 + remoteMethod(query) {
  1080 + if (query !== '') {
  1081 + this.loading = true
  1082 + setTimeout(() => {
  1083 + this.loading = false
  1084 + this.countryOption = this.countryResultList.filter(item => {
  1085 + return item.value.toUpperCase().trim()
  1086 + .indexOf(query.toUpperCase()) > -1
  1087 + })
  1088 + }, 200)
  1089 + if (query.length > 1) {
  1090 + this.selectCountry.countryCode = query
  1091 + getByCountryCode(this.selectCountry).then(res => {
  1092 + this.shpCompnyList = res.data.dataList
  1093 + this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
  1094 + return {value: item.enterpriseCode, label: item.enterpriseCode}
  1095 + })
  1096 + })
  1097 + }
  1098 +
  1099 + } else {
  1100 + this.countryOption = []
  1101 + }
  1102 +
  1103 +
  1104 +
  1105 + },
  1106 +
  1107 + // >>>>>>>>>>>>>>>>更新发送状态<<<<<<<<<<<<<<<<<<
  1108 + handleSwitch(row) {
  1109 + this.$confirm("是否发送更改状态", "确认消息", {
  1110 + distinguishCancelAndClose: true,
  1111 + confirmButtonText: '确认更改',
  1112 + cancelButtonText: '取消更改'
  1113 + }).then(() => {
  1114 + this.$message({
  1115 + type: 'success',
  1116 + message: '状态更改成功'
  1117 + })
  1118 + }).catch(action => {
  1119 + this.$message({
  1120 + type: 'info',
  1121 + message: action === 'cancel'
  1122 + ? '取消状态更改'
  1123 + : '停留在当前页面'
  1124 + })
  1125 + })
  1126 + },
  1127 +
  1128 + // >>>>>>>>>>>>>>>>删除<<<<<<<<<<<<<<<<<<
  1129 + handleDel(index, row) {
  1130 + this.$confirm("是否删除", "确认消息", {
  1131 + distinguishCancelAndClose: true,
  1132 + confirmButtonText: '删除',
  1133 + cancelButtonText: '取消'
  1134 + }).then(() => {
  1135 + deleteByIsDelete(row).then(res => {
  1136 + if (res.data.count > 0) {
  1137 + this.$message({
  1138 + type: 'success',
  1139 + message: '删除成功'
  1140 + })
  1141 + this.orgData.splice(index, 1)
  1142 + } else {
  1143 + this.$message({
  1144 + type: 'danger',
  1145 + message: '删除异常,请稍后重试'
  1146 + })
  1147 + }
  1148 + })
  1149 + }).catch(action => {
  1150 + this.$message({
  1151 + type: 'info',
  1152 + message: action === 'cancel'
  1153 + ? '取消删除'
  1154 + : '停留在当前页面'
  1155 + })
  1156 + })
  1157 +
  1158 + },
  1159 +
  1160 + // >>>>>>>>>>>>>>>>发送<<<<<<<<<<<<<<<<<<
  1161 + handleSend(row) {
  1162 + console.log(row)
  1163 + },
  1164 + // >>>>>>>>>>>>>>>>新增分单<<<<<<<<<<<<<<<<<<
  1165 + handleAddAwbh(row){
  1166 + const template = Object.assign({}, row) // copy obj
  1167 + console.log(template)
  1168 + this.temp.awba = template.awba
  1169 + this.temp.flightdate = template.flightdate
  1170 + this.temp.flightno = template.flightno
  1171 + this.temp.destinationstation = template.destinationstation
  1172 + this.temp.customcode = template.customcode
  1173 + this.temp.carrier = template.carrier
  1174 + this.temp.awbinfo.shprcountyr = template.awbinfo.shprcountyr
  1175 + this.temp.originstation = template.originstation
  1176 + this.temp.goodsname = template.goodsname
  1177 + this.temp.awbinfo.collected = template.awbinfo.collected
  1178 + this.temp.awbinfo.sairportid = template.awbinfo.sairportid
  1179 + this.temp.awbinfo.eairportid = template.awbinfo.eairportid
  1180 + this.temp.awbinfo.ex5 = template.awbinfo.ex5
  1181 +
  1182 + this.dialogStatus = 'addAwh'
  1183 + this.dialogFormVisible = true
  1184 + this.$nextTick(() => {
  1185 + this.$refs.formData.clearValidate()
  1186 + })
  1187 + },
  1188 +
  1189 + handleRedirct(row){
  1190 + this.$router.push({name:'预配',params:{scopeRow: row}})
  1191 + }
  1192 +
  1193 + }
  1194 + }
  1195 +</script>
  1196 +<style scoped>
  1197 + .row-bg {
  1198 + padding: 10px 0;
  1199 + background-color: #f9fafc;
  1200 + }
  1201 +
  1202 + .remark textarea {
  1203 + width: 575px;
  1204 + }
  1205 +
  1206 + .el-dialog-div {
  1207 + height: 60vh;
  1208 + overflow: auto;
  1209 + }
  1210 +
  1211 + .tags {
  1212 + margin-top: 10px;
  1213 + margin-bottom: 10px;
  1214 + }
  1215 +
  1216 + .disabledClass {
  1217 + }
  1218 +
  1219 +</style>
  1220 +