作者 xudada

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	config/index.js
#	src/api/user.js
#	src/views/Home.vue

要显示太多修改。

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

@@ -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://localhost: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’即可
@@ -1610,6 +1610,11 @@ @@ -1610,6 +1610,11 @@
1610 } 1610 }
1611 } 1611 }
1612 }, 1612 },
  1613 + "base64-arraybuffer": {
  1614 + "version": "0.2.0",
  1615 + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
  1616 + "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
  1617 + },
1613 "base64-js": { 1618 "base64-js": {
1614 "version": "1.3.1", 1619 "version": "1.3.1",
1615 "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", 1620 "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
@@ -1972,9 +1977,9 @@ @@ -1972,9 +1977,9 @@
1972 } 1977 }
1973 }, 1978 },
1974 "cfb": { 1979 "cfb": {
1975 - "version": "1.1.3",  
1976 - "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.3.tgz",  
1977 - "integrity": "sha512-joXBW0nMuwV9no7UTMiyVJnQL6XIU3ThXVjFUDHgl9MpILPOomyfaGqC290VELZ48bbQKZXnQ81UT5HouTxHsw==", 1980 + "version": "1.1.4",
  1981 + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.4.tgz",
  1982 + "integrity": "sha512-rwFkl3aFO3f+ljR27YINwC0x8vPjyiEVbYbrTCKzspEf7Q++3THdfHVgJYNUbxNcupJECrLX+L40Mjm9hm/Bgw==",
1978 "requires": { 1983 "requires": {
1979 "adler-32": "~1.2.0", 1984 "adler-32": "~1.2.0",
1980 "commander": "^2.16.0", 1985 "commander": "^2.16.0",
@@ -2754,6 +2759,14 @@ @@ -2754,6 +2759,14 @@
2754 "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", 2759 "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
2755 "dev": true 2760 "dev": true
2756 }, 2761 },
  2762 + "css-line-break": {
  2763 + "version": "1.1.1",
  2764 + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz",
  2765 + "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==",
  2766 + "requires": {
  2767 + "base64-arraybuffer": "^0.2.0"
  2768 + }
  2769 + },
2757 "css-loader": { 2770 "css-loader": {
2758 "version": "0.26.4", 2771 "version": "0.26.4",
2759 "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.26.4.tgz", 2772 "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.26.4.tgz",
@@ -5017,6 +5030,14 @@ @@ -5017,6 +5030,14 @@
5017 "toposort": "^1.0.0" 5030 "toposort": "^1.0.0"
5018 } 5031 }
5019 }, 5032 },
  5033 + "html2canvas": {
  5034 + "version": "1.0.0-rc.5",
  5035 + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.5.tgz",
  5036 + "integrity": "sha512-DtNqPxJNXPoTajs+lVQzGS1SULRI4GQaROeU5R41xH8acffHukxRh/NBVcTBsfCkJSkLq91rih5TpbEwUP9yWA==",
  5037 + "requires": {
  5038 + "css-line-break": "1.1.1"
  5039 + }
  5040 + },
5020 "htmlparser2": { 5041 "htmlparser2": {
5021 "version": "3.10.1", 5042 "version": "3.10.1",
5022 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", 5043 "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
@@ -6313,7 +6334,7 @@ @@ -6313,7 +6334,7 @@
6313 }, 6334 },
6314 "normalize-wheel": { 6335 "normalize-wheel": {
6315 "version": "1.0.1", 6336 "version": "1.0.1",
6316 - "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", 6337 + "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
6317 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" 6338 "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
6318 }, 6339 },
6319 "npm": { 6340 "npm": {
@@ -11769,9 +11790,9 @@ @@ -11769,9 +11790,9 @@
11769 "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" 11790 "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
11770 }, 11791 },
11771 "ssf": { 11792 "ssf": {
11772 - "version": "0.10.2",  
11773 - "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.2.tgz",  
11774 - "integrity": "sha512-rDhAPm9WyIsY8eZEKyE8Qsotb3j/wBdvMWBUsOhJdfhKGLfQidRjiBUV0y/MkyCLiXQ38FG6LWW/VYUtqlIDZQ==", 11793 + "version": "0.10.3",
  11794 + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.10.3.tgz",
  11795 + "integrity": "sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==",
11775 "requires": { 11796 "requires": {
11776 "frac": "~1.1.2" 11797 "frac": "~1.1.2"
11777 } 11798 }
@@ -13105,6 +13126,11 @@ @@ -13105,6 +13126,11 @@
13105 "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", 13126 "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
13106 "dev": true 13127 "dev": true
13107 }, 13128 },
  13129 + "wmf": {
  13130 + "version": "1.0.2",
  13131 + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
  13132 + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
  13133 + },
13108 "wordwrap": { 13134 "wordwrap": {
13109 "version": "1.0.0", 13135 "version": "1.0.0",
13110 "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 13136 "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
@@ -13180,17 +13206,18 @@ @@ -13180,17 +13206,18 @@
13180 } 13206 }
13181 }, 13207 },
13182 "xlsx": { 13208 "xlsx": {
13183 - "version": "0.15.1",  
13184 - "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.15.1.tgz",  
13185 - "integrity": "sha512-z+o4+QPMc32EPboLCzJAz94o0Zyy+8jrmWTsVpfzwknFln9qDO6/HN1KrGGVC4//sGA7dh4R3HA4fhbGIKCDOA==", 13209 + "version": "0.15.6",
  13210 + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.15.6.tgz",
  13211 + "integrity": "sha512-7vD9eutyLs65iDjNFimVN+gk/oDkfkCgpQUjdE82QgzJCrBHC4bGPH7fzKVyy0UPp3gyFVQTQEFJaWaAvZCShQ==",
13186 "requires": { 13212 "requires": {
13187 "adler-32": "~1.2.0", 13213 "adler-32": "~1.2.0",
13188 - "cfb": "^1.1.3", 13214 + "cfb": "^1.1.4",
13189 "codepage": "~1.14.0", 13215 "codepage": "~1.14.0",
13190 "commander": "~2.17.1", 13216 "commander": "~2.17.1",
13191 "crc-32": "~1.2.0", 13217 "crc-32": "~1.2.0",
13192 "exit-on-epipe": "~1.0.1", 13218 "exit-on-epipe": "~1.0.1",
13193 - "ssf": "~0.10.2" 13219 + "ssf": "~0.10.3",
  13220 + "wmf": "~1.0.1"
13194 } 13221 }
13195 }, 13222 },
13196 "xtend": { 13223 "xtend": {
@@ -16,8 +16,10 @@ @@ -16,8 +16,10 @@
16 "eslint": "^5.14.1", 16 "eslint": "^5.14.1",
17 "file-saver": "^2.0.2", 17 "file-saver": "^2.0.2",
18 "font-awesome": "^4.7.0", 18 "font-awesome": "^4.7.0",
  19 + "html2canvas": "^1.0.0-rc.5",
19 "install": "^0.12.2", 20 "install": "^0.12.2",
20 "js-cookie": "^2.2.1", 21 "js-cookie": "^2.2.1",
  22 + "jspdf": "^1.5.3",
21 "jszip": "^3.2.2", 23 "jszip": "^3.2.2",
22 "moment": "^2.24.0", 24 "moment": "^2.24.0",
23 "npm": "^6.8.0", 25 "npm": "^6.8.0",
@@ -27,7 +29,7 @@ @@ -27,7 +29,7 @@
27 "vue-i18n": "^8.14.0", 29 "vue-i18n": "^8.14.0",
28 "vue-router": "^2.3.0", 30 "vue-router": "^2.3.0",
29 "vuex": "^2.0.0-rc.6", 31 "vuex": "^2.0.0-rc.6",
30 - "xlsx": "^0.15.1" 32 + "xlsx": "^0.15.6"
31 }, 33 },
32 "devDependencies": { 34 "devDependencies": {
33 "autoprefixer": "^6.7.2", 35 "autoprefixer": "^6.7.2",
@@ -5,4 +5,9 @@ let baseUrl = 'nmms-server-import/nmms/allocat' @@ -5,4 +5,9 @@ let baseUrl = 'nmms-server-import/nmms/allocat'
5 export const addAllocatImport=params=>{return http.post(`${baseUrl}/addAllocatImport`, params);}; 5 export const addAllocatImport=params=>{return http.post(`${baseUrl}/addAllocatImport`, params);};
6 export const addAllocatArrive=params=>{return http.post(`${baseUrl}/addAllocatArrive`, params);}; 6 export const addAllocatArrive=params=>{return http.post(`${baseUrl}/addAllocatArrive`, params);};
7 export const QueryData=params=>{return http.get(`${baseUrl}/QueryData`, params);}; 7 export const QueryData=params=>{return http.get(`${baseUrl}/QueryData`, params);};
8 -export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};  
  8 +export const ediAllocat=params=>{return http.put(`${baseUrl}/ediAllocat`, params);};
  9 +
  10 +export const sendCreateMt6202=params=>{return http.post(`${baseUrl}/sendCreateMt6202`, params);};
  11 +export const sendRemoveMt6202=params=>{return http.post(`${baseUrl}/sendRemoveMt6202`, params);};
  12 +export const sendCreateMt3202=params=>{return http.post(`${baseUrl}/sendCreateMt3202`, params);};
  13 +export const sendRemoveMt3202=params=>{return http.post(`${baseUrl}/sendRemoveMt3202`, params);};
  1 +import http from './http.js'
  2 +
  3 +let baseUrl = 'nmms-server-import/nmms/rep'
  4 +//添加回执明细
  5 +export const addResponse=params=>{return http.post(`${baseUrl}/InsertResponse`, params);};
  6 +//查询回执明细列表
  7 +export const selectResponseList=params=>{return http.post(`${baseUrl}/selectResponseList`, params);};
@@ -7,3 +7,7 @@ export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode @@ -7,3 +7,7 @@ export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode
7 export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)}; 7 export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
8 8
9 export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)}; 9 export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
  10 +
  11 +export const getAirportCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectList`,params)}
  12 +
  13 +export const getCustomCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)}
@@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
12 export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)}; 12 export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
13 13
14 export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)}; 14 export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
  15 +
  16 +export const sendCreateMt3201 = params => { return http.post(`${baseUrl}/sendCreateMt3201`,params)};
  17 +
  18 +export const sendRemoveMt3201 = params => { return http.post(`${baseUrl}/sendRemoveMt3201`,params)};
@@ -12,3 +12,11 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus @@ -12,3 +12,11 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
12 export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)}; 12 export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
13 13
14 export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)}; 14 export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
  15 +
  16 +
  17 +export const sendCreateMt4201 = params => { return http.post(`${baseUrl}/sendCreateMt4201`,params)};
  18 +
  19 +export const sendDeleteMt4201 = params => { return http.post(`${baseUrl}/sendDeleteMt4201`,params)};
  20 +
  21 +
  22 +
@@ -17,3 +17,9 @@ export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLost @@ -17,3 +17,9 @@ export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLost
17 export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)}; 17 export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
18 18
19 export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)}; 19 export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
  20 +
  21 +export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDeleteMt2201`,params)}
  22 +
  23 +export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)}
  24 +
  25 +export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)}
@@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
12 export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)}; 12 export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
13 13
14 export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)}; 14 export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
  15 +
  16 +export const sendCreateMt5202 = params => { return http.post(`${baseUrl}/sendCreateMt5202`,params)};
  17 +
  18 +export const sendRemoveMt5202 = params => { return http.post(`${baseUrl}/sendRemoveMt5202`,params)};
  1 +//不使用JQuery版的
  2 +
  3 +import html2canvas from 'html2canvas';
  4 +import JsPDF from 'jspdf';
  5 +
  6 +/**
  7 + * @param ele 要生成 pdf 的DOM元素(容器)
  8 + * @param padfName PDF文件生成后的文件名字
  9 + * */
  10 +
  11 +function downloadPDF(ele, pdfName){
  12 +
  13 + let eleW = ele.offsetWidth;// 获得该容器的宽
  14 + let eleH = ele.offsetHeight;// 获得该容器的高
  15 +
  16 +
  17 + let eleOffsetTop = ele.offsetTop; // 获得该容器到文档顶部的距离
  18 + let eleOffsetLeft = ele.offsetLeft; // 获得该容器到文档最左的距离
  19 +
  20 + var canvas = document.createElement("canvas");
  21 + var abs = 0;
  22 +
  23 + let win_in = document.documentElement.clientWidth || document.body.clientWidth; // 获得当前可视窗口的宽度(不包含滚动条)
  24 + let win_out = window.innerWidth; // 获得当前窗口的宽度(包含滚动条)
  25 +
  26 + if(win_out>win_in){
  27 + // abs = (win_o - win_i)/2; // 获得滚动条长度的一半
  28 + abs = (win_out - win_in)/2; // 获得滚动条宽度的一半
  29 + // console.log(a, '新abs');
  30 + }
  31 +
  32 + canvas.width = eleW * 2; // 将画布宽&&高放大两倍
  33 + canvas.height = eleH * 2;
  34 +
  35 +
  36 +
  37 +
  38 + var context = canvas.getContext("2d");
  39 +
  40 + context.scale(2, 2);
  41 +
  42 + context.translate(-eleOffsetLeft -abs, -eleOffsetTop);
  43 + // 这里默认横向没有滚动条的情况,因为offset.left(),有无滚动条的时候存在差值,因此
  44 + // translate的时候,要把这个差值去掉
  45 +
  46 + // html2canvas(element).then( (canvas)=>{ //报错
  47 + // html2canvas(element[0]).then( (canvas)=>{
  48 + html2canvas( ele, {
  49 + dpi: 300,
  50 + // allowTaint: true, //允许 canvas 污染, allowTaint参数要去掉,否则是无法通过toDataURL导出canvas数据的
  51 + useCORS:true //允许canvas画布内 可以跨域请求外部链接图片, 允许跨域请求。
  52 + } ).then( (canvas)=>{
  53 +
  54 + var contentWidth = canvas.width;
  55 + var contentHeight = canvas.height;
  56 + //一页pdf显示html页面生成的canvas高度;
  57 + var pageHeight = contentWidth / 592.28 * 841.89;
  58 + //未生成pdf的html页面高度
  59 + var leftHeight = contentHeight;
  60 + //页面偏移
  61 + var position = 0;
  62 + //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
  63 + var imgWidth = 595.28;
  64 + var imgHeight = 595.28/contentWidth * contentHeight;
  65 +
  66 + var pageData = canvas.toDataURL('image/jpeg', 1.0);
  67 +
  68 +
  69 +
  70 + var pdf = new JsPDF('', 'pt', 'a4');
  71 +
  72 + //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  73 + //当内容未超过pdf一页显示的范围,无需分页
  74 + if (leftHeight < pageHeight) {
  75 + //在pdf.addImage(pageData, 'JPEG', 左,上,宽度,高度)设置在pdf中显示;
  76 + pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight);
  77 + // pdf.addImage(pageData, 'JPEG', 20, 40, imgWidth, imgHeight);
  78 + } else { // 分页
  79 + while(leftHeight > 0) {
  80 + pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight);
  81 + leftHeight -= pageHeight;
  82 + position -= 841.89;
  83 + //避免添加空白页
  84 + if(leftHeight > 0) {
  85 + pdf.addPage();
  86 + }
  87 + }
  88 + }
  89 +
  90 + //可动态生成
  91 + pdf.save(pdfName);
  92 + })
  93 +
  94 +
  95 +}
  96 +
  97 +
  98 +export default {
  99 + downloadPDF
  100 +}
@@ -6,4 +6,10 @@ export const getMt1201List=params=>{return http.get(`${baseUrl}/getMt1201List`, @@ -6,4 +6,10 @@ export const getMt1201List=params=>{return http.get(`${baseUrl}/getMt1201List`,
6 export const getFenList=params=>{return http.get(`${baseUrl}/getFenList`, params);}; 6 export const getFenList=params=>{return http.get(`${baseUrl}/getFenList`, params);};
7 export const addMt1201=params=>{return http.post(`${baseUrl}/addMt1201`, params);}; 7 export const addMt1201=params=>{return http.post(`${baseUrl}/addMt1201`, params);};
8 export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params);}; 8 export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params);};
  9 +export const selectAirport=params=>{return http.get(`${baseUrl}/selectList`, params);};
  10 +export const getCountryCode=params=>{return http.get(`${baseUrl}/getCountryCode`, params);};
  11 +export const selectCustomcode=params=>{return http.get(`${baseUrl}/selectCustomcode`, params);};
9 12
  13 +export const sendCreateMt1201=params=>{return http.post(`${baseUrl}/sendCreateMt1201`, params);};
  14 +export const sendEditeMt1201=params=>{return http.post(`${baseUrl}/sendEditeMt1201`, params);};
  15 +export const sendRemoveMt1201=params=>{return http.post(`${baseUrl}/sendRemoveMt1201`, params);};
1 import http from './http.js' 1 import http from './http.js'
2 let baseUrl = 'nmms-server-import/nmms/mt5201' 2 let baseUrl = 'nmms-server-import/nmms/mt5201'
  3 +let baseUrl2='nmms-server-import/nmms/mt1201'
3 4
4 export const getMt5201List=params=>{return http.get(`${baseUrl}/getMt5201List`, params);}; 5 export const getMt5201List=params=>{return http.get(`${baseUrl}/getMt5201List`, params);};
5 export const addMt5201=params=>{return http.post(`${baseUrl}/addMt5201`, params);}; 6 export const addMt5201=params=>{return http.post(`${baseUrl}/addMt5201`, params);};
6 export const ediMt5201=params=>{return http.put(`${baseUrl}/ediMt5201`, params);}; 7 export const ediMt5201=params=>{return http.put(`${baseUrl}/ediMt5201`, params);};
7 export const delMt5201 = params => { return http.del(`${baseUrl}/delMt5201`,params)}; 8 export const delMt5201 = params => { return http.del(`${baseUrl}/delMt5201`,params)};
8 9
  10 +export const sendCreateMt520x=params=>{return http.post(`${baseUrl}/sendCreateMt520x`, params);};
  11 +export const sendRemoveMt520x=params=>{return http.post(`${baseUrl}/sendRemoveMt520x`, params);};
  12 +export const selectCustomcode=params=>{return http.get(`${baseUrl2}/selectCustomcode`, params);};
  13 +
  14 +
@@ -4,13 +4,14 @@ export const getUserList = params => { return http.get(`${baseUrl}/list`, param @@ -4,13 +4,14 @@ export const getUserList = params => { return http.get(`${baseUrl}/list`, param
4 4
5 export const getUserListPage = params => { return http.get(`/user/list`,params) }; 5 export const getUserListPage = params => { return http.get(`/user/list`,params) };
6 6
7 -export const removeUser = params => { return http.del(`/user/del`,params)}; 7 +export const removeUser = params => { return http.del(`${baseUrl}/del`,params)};
8 8
9 -export const batchRemoveUser = params => { return http.del(`/user/batchremove`, { params: params }); }; 9 +export const batchRemoveUser = params => { return http.del(`${baseUrl}/batchremove`, { params: params }); };
10 10
11 -export const editUser = params => { return http.put(`/user/edit`,params)};  
12 export const editPass = params => { return http.put(`${baseUrl}/password`,params)}; 11 export const editPass = params => { return http.put(`${baseUrl}/password`,params)};
13 12
14 -export const addUser = params => { return http.post(`/user/add`,params)}; 13 +export const editUser = params => { return http.put(`${baseUrl}/edit`,params)};
15 14
16 -export const setUserRole = params => { return http.put(`/user/roleset`,params)}; 15 +export const addUser = params => { return http.post(`${baseUrl}/add`,params)};
  16 +
  17 +export const setUserRole = params => { return http.put(`${baseUrl}/roleset`,params)};
1 var SIGN_REGEXP = /([yMdhsm])(\1*)/g; 1 var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
2 var DEFAULT_PATTERN = 'yyyy-MM-dd'; 2 var DEFAULT_PATTERN = 'yyyy-MM-dd';
  3 +/**
  4 + * 根据数组 元素的“值” 来删除或者获取数据
  5 + * 使用方法arrList.splice(arrList.contains('c'),1)
  6 + */
  7 +Array.prototype.contains = function(obj) {
  8 + var i = this.length;
  9 + while (i--) {
  10 + if (this[i] === obj) {
  11 + return i; // 返回的这个 i 就是元素的索引下标,
  12 + }
  13 + }
  14 + return false;
  15 +}
3 16
4 function padding(s, len) { 17 function padding(s, len) {
5 - var len = len - (s + '').length; 18 + len = len - (s + '').length;
6 for (var i = 0; i < len; i++) { s = '0' + s; } 19 for (var i = 0; i < len; i++) { s = '0' + s; }
7 return s; 20 return s;
8 -}; 21 +}
9 22
10 export default { 23 export default {
11 getQueryStringByName: function (name) { 24 getQueryStringByName: function (name) {
@@ -91,12 +91,9 @@ axios.interceptors.response.use( @@ -91,12 +91,9 @@ axios.interceptors.response.use(
91 91
92 // 下面是接口回调的satus ,因为我做了一些错误页面,所以都会指向对应的报错页面 92 // 下面是接口回调的satus ,因为我做了一些错误页面,所以都会指向对应的报错页面
93 if (error.response.status === 401) { 93 if (error.response.status === 401) {
94 - router.push({  
95 - path: "/login"  
96 - });  
97 message({ 94 message({
98 // 饿了么的消息弹窗组件 95 // 饿了么的消息弹窗组件
99 - message: '授权超时,或未授权,请重新登录', 96 + message: '授权超时,或访问未授权,请重新登录',
100 type: "error" 97 type: "error"
101 }); 98 });
102 } 99 }
@@ -108,9 +105,14 @@ axios.interceptors.response.use( @@ -108,9 +105,14 @@ axios.interceptors.response.use(
108 }); 105 });
109 } 106 }
110 if (error.response.status === 500) { 107 if (error.response.status === 500) {
111 - router.push({  
112 - path: "/error/500" 108 + message({
  109 + // 饿了么的消息弹窗组件
  110 + message: error.message,
  111 + type: "error"
113 }); 112 });
  113 + // router.push({
  114 + // path: "/error/500"
  115 + // });
114 } 116 }
115 if (error.response.status === 502) { 117 if (error.response.status === 502) {
116 router.push({ 118 router.push({
@@ -118,13 +120,15 @@ axios.interceptors.response.use( @@ -118,13 +120,15 @@ axios.interceptors.response.use(
118 }); 120 });
119 } 121 }
120 if (error.response.status === 404) { 122 if (error.response.status === 404) {
121 - router.push({  
122 - path: "/error/404" 123 + message({
  124 + // 饿了么的消息弹窗组件
  125 + message: error.message,
  126 + type: "error"
123 }); 127 });
124 } 128 }
125 } 129 }
126 // 返回 response 里的错误信息 130 // 返回 response 里的错误信息
127 - let errorInfo = error.data.error ? error.data.error.message : error.data; 131 + let errorInfo = error.response ? error.response.statusText : (error.data.error ? error.data.error.message : error.message);
128 return Promise.reject(errorInfo); 132 return Promise.reject(errorInfo);
129 } 133 }
130 ); 134 );
@@ -35,7 +35,6 @@ import Waybill from './views/nmms_import/Waybill.vue' @@ -35,7 +35,6 @@ import Waybill from './views/nmms_import/Waybill.vue'
35 import AllocateSearch from './views/nmms_import/AllocateSearch.vue' 35 import AllocateSearch from './views/nmms_import/AllocateSearch.vue'
36 import Importallocation from './views/nmms_import/Importallocation.vue' 36 import Importallocation from './views/nmms_import/Importallocation.vue'
37 import Allocatearrive from './views/nmms_import/Allocatearrive.vue' 37 import Allocatearrive from './views/nmms_import/Allocatearrive.vue'
38 -  
39 import User from './views/nav1/user.vue' 38 import User from './views/nav1/user.vue'
40 import Page4 from './views/nav2/Page4.vue' 39 import Page4 from './views/nav2/Page4.vue'
41 import Page5 from './views/nav2/Page5.vue' 40 import Page5 from './views/nav2/Page5.vue'
@@ -128,7 +127,7 @@ let routes = [ @@ -128,7 +127,7 @@ let routes = [
128 {path:'/entertall',component:EnterTally,name:'进港理货'}, 127 {path:'/entertall',component:EnterTally,name:'进港理货'},
129 {path:'/tallymaster',component:TallyMster,name:'进港理货舱单'}, 128 {path:'/tallymaster',component:TallyMster,name:'进港理货舱单'},
130 {path:'/importallocation',component:Importallocation,name:'进港分拨'}, 129 {path:'/importallocation',component:Importallocation,name:'进港分拨'},
131 - {path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'} 130 + {path:'/allocatearrive',component:Allocatearrive,name:'分拨运抵'},
132 ] 131 ]
133 }, 132 },
134 { 133 {
1 -$color-primary: #20a0ff;//#18c79c  
  1 +$color-primary: #1a4496;//#18c79c
@@ -99,3 +99,14 @@ export function validatorNum(value) { @@ -99,3 +99,14 @@ export function validatorNum(value) {
99 const reg = /^(\d*)+(\.[0-9]{1,2})?$/ 99 const reg = /^(\d*)+(\.[0-9]{1,2})?$/
100 return reg.test(value) 100 return reg.test(value)
101 } 101 }
  102 +
  103 +
  104 +/**
  105 + * 关区校验 4位数字
  106 + * @param value
  107 + * @returns {boolean}
  108 + */
  109 +export function validatorCustomsNum(value) {
  110 + const reg = /^(\d{4})$/
  111 + return reg.test(value)
  112 +}
1 <template> 1 <template>
2 - <el-row class="container"> 2 + <el-row class="container darkmenu" style="margin-top: 0px;">
3 <el-col :span="24" class="header"> 3 <el-col :span="24" class="header">
4 <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'"> 4 <el-col :span="10" class="logo" :class="collapsed?'logo-collapse-width':'logo-width'">
5 {{collapsed?'':sysName}} 5 {{collapsed?'':sysName}}
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 </el-col> 80 </el-col>
81 <el-col :span="24" class="content-wrapper"> 81 <el-col :span="24" class="content-wrapper">
82 <transition name="fade" mode="out-in"> 82 <transition name="fade" mode="out-in">
83 - <router-view></router-view> 83 + <router-view :key="$route.path +$route.query.t"></router-view>
84 </transition> 84 </transition>
85 </el-col> 85 </el-col>
86 </div> 86 </div>
@@ -94,6 +94,12 @@ @@ -94,6 +94,12 @@
94 import { editPass} from '../api/user'; 94 import { editPass} from '../api/user';
95 import ElFormItem from "element-ui/packages/form/src/form-item"; 95 import ElFormItem from "element-ui/packages/form/src/form-item";
96 export default { 96 export default {
  97 +
  98 + provide() {
  99 + return {
  100 + reload: this.reload
  101 + }
  102 + },
97 components: {ElFormItem}, 103 components: {ElFormItem},
98 data() { 104 data() {
99 var validatePass = (rule, value, callback) => { 105 var validatePass = (rule, value, callback) => {
@@ -120,6 +126,7 @@ @@ -120,6 +126,7 @@
120 sysUserName: '', 126 sysUserName: '',
121 sysUserId:'', 127 sysUserId:'',
122 sysUserAvatar: '', 128 sysUserAvatar: '',
  129 + isRouterAlive: true,
123 form: { 130 form: {
124 name: '', 131 name: '',
125 region: '', 132 region: '',
@@ -150,6 +157,16 @@ @@ -150,6 +157,16 @@
150 } 157 }
151 }, 158 },
152 methods: { 159 methods: {
  160 + reload() {
  161 + this.$nextTick(function () {
  162 + this.$router.push({
  163 + path: this.$router.path,
  164 + query:{
  165 + t: new Date().getTime()
  166 + }
  167 + })
  168 + })
  169 + },
153 editPass:function(){ 170 editPass:function(){
154 this.dialogFormVisible=true; 171 this.dialogFormVisible=true;
155 }, 172 },
@@ -190,7 +207,7 @@ @@ -190,7 +207,7 @@
190 console.log('handleclose'); 207 console.log('handleclose');
191 }, 208 },
192 handleselect: function (a, b) { 209 handleselect: function (a, b) {
193 - console.log('handleselect!'); 210 + this.reload()
194 }, 211 },
195 //退出登录 212 //退出登录
196 logout: function () { 213 logout: function () {
@@ -200,7 +217,6 @@ @@ -200,7 +217,6 @@
200 }).then(() => { 217 }).then(() => {
201 sessionStorage.removeItem('user'); 218 sessionStorage.removeItem('user');
202 sessionStorage.removeItem('menu'); 219 sessionStorage.removeItem('menu');
203 -  
204 //退出后初始化原来的路由 220 //退出后初始化原来的路由
205 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); 221 let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
206 console.log(sysRoutes); 222 console.log(sysRoutes);
@@ -227,7 +243,6 @@ @@ -227,7 +243,6 @@
227 if (user) { 243 if (user) {
228 user = JSON.parse(user); 244 user = JSON.parse(user);
229 this.sysUserName = user.username || ''; 245 this.sysUserName = user.username || '';
230 - this.sysUserId=user.userId||'';  
231 this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg'; 246 this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg';
232 } 247 }
233 //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 248 //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
@@ -245,7 +260,6 @@ @@ -245,7 +260,6 @@
245 260
246 <style scoped lang="scss"> 261 <style scoped lang="scss">
247 @import '~scss_vars'; 262 @import '~scss_vars';
248 -  
249 .container { 263 .container {
250 position: absolute; 264 position: absolute;
251 top: 0px; 265 top: 0px;
@@ -254,7 +268,7 @@ @@ -254,7 +268,7 @@
254 .header { 268 .header {
255 height: 60px; 269 height: 60px;
256 line-height: 60px; 270 line-height: 60px;
257 - background: $color-primary; 271 + background: $color-primary url("/static/images/air-banner.png");
258 color:#fff; 272 color:#fff;
259 .userinfo { 273 .userinfo {
260 text-align: right; 274 text-align: right;
@@ -317,9 +331,6 @@ @@ -317,9 +331,6 @@
317 // position: absolute; 331 // position: absolute;
318 // top: 0px; 332 // top: 0px;
319 // bottom: 0px; 333 // bottom: 0px;
320 - .el-menu{  
321 - height: 100%;  
322 - }  
323 .collapsed{ 334 .collapsed{
324 width:60px; 335 width:60px;
325 .item{ 336 .item{
@@ -356,16 +367,21 @@ @@ -356,16 +367,21 @@
356 // bottom: 0px; 367 // bottom: 0px;
357 // left: 230px; 368 // left: 230px;
358 overflow-y: scroll; 369 overflow-y: scroll;
359 - padding: 20px; 370 + padding: 10px;
360 .breadcrumb-container { 371 .breadcrumb-container {
361 //margin-bottom: 15px; 372 //margin-bottom: 15px;
362 .title { 373 .title {
363 width: 200px; 374 width: 200px;
364 float: left; 375 float: left;
365 color: #475669; 376 color: #475669;
  377 + margin-left: 10px;
366 } 378 }
367 .breadcrumb-inner { 379 .breadcrumb-inner {
368 float: right; 380 float: right;
  381 + margin-right:10px;
  382 + }
  383 + .el-breadcrumb{
  384 + line-height:36px;
369 } 385 }
370 } 386 }
371 .content-wrapper { 387 .content-wrapper {
@@ -375,4 +391,42 @@ @@ -375,4 +391,42 @@
375 } 391 }
376 } 392 }
377 } 393 }
  394 +</style>
  395 +<style lang="scss">
  396 + .darkmenu{
  397 + .main {
  398 + aside {
  399 + .el-menu{
  400 + height: 100%;
  401 + background: #606060;
  402 + .el-menu-item {
  403 + i{
  404 + color: white;
  405 + }
  406 + color: white;
  407 + }
  408 + .el-menu-item.is-active{
  409 + color:#e6a23c;
  410 + }
  411 + .el-menu-item:hover,.el-menu-item:focus{
  412 + background-color: #1a4496;
  413 + }
  414 + .el-submenu {
  415 + ul.el-menu.el-menu--inline{
  416 + background: #303030;
  417 + }
  418 + .el-submenu__title {
  419 + color: white;
  420 + i{
  421 + color: white;
  422 + }
  423 + }
  424 + .el-submenu__title:hover {
  425 + background-color: #1a4496;
  426 + }
  427 + }
  428 + }
  429 + }
  430 + }
  431 + }
378 </style> 432 </style>
@@ -3,12 +3,12 @@ @@ -3,12 +3,12 @@
3 <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" class="demo-ruleForm login-container" id="loginForm"> 3 <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px" class="demo-ruleForm login-container" id="loginForm">
4 <h3 class="title">系统登录</h3> 4 <h3 class="title">系统登录</h3>
5 <el-form-item prop="account"> 5 <el-form-item prop="account">
6 - <el-input type="text" v-model="ruleForm2.account" auto-complete="off" placeholder="账号"></el-input> 6 + <el-input type="text" v-model="ruleForm2.account" autofocus placeholder="账号"></el-input>
7 </el-form-item> 7 </el-form-item>
8 <el-form-item prop="checkPass"> 8 <el-form-item prop="checkPass">
9 - <el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" placeholder="密码"></el-input> 9 + <el-input type="password" v-model="ruleForm2.checkPass" placeholder="密码" @keyup.enter.native="handleSubmit2"></el-input>
10 </el-form-item> 10 </el-form-item>
11 - <el-checkbox v-model="checked" checked class="remember">记住密码</el-checkbox> 11 + <el-checkbox v-model="checked" checked class="remeberme">记住密码</el-checkbox>
12 <el-form-item style="width:100%;"> 12 <el-form-item style="width:100%;">
13 <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" :loading="logining" :plain="true">登录</el-button> 13 <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" :loading="logining" :plain="true">登录</el-button>
14 <!--<el-button @click.native.prevent="handleReset2">重置</el-button>--> 14 <!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 fixStyle: '', 42 fixStyle: '',
43 logining: false, 43 logining: false,
44 ruleForm2: { 44 ruleForm2: {
45 - account: 'admin',  
46 - checkPass: '123456' 45 + account: '',
  46 + checkPass: ''
47 }, 47 },
48 rules2: { 48 rules2: {
49 account: [ 49 account: [
@@ -955,9 +955,6 @@ export default { @@ -955,9 +955,6 @@ export default {
955 margin-bottom: 0; 955 margin-bottom: 0;
956 } 956 }
957 } 957 }
958 - .el-col {  
959 - border-radius: 4px;  
960 - }  
961 .bg-purple-dark { 958 .bg-purple-dark {
962 background: #99a9bf; 959 background: #99a9bf;
963 } 960 }
@@ -968,7 +965,6 @@ export default { @@ -968,7 +965,6 @@ export default {
968 background: #e5e9f2; 965 background: #e5e9f2;
969 } 966 }
970 .grid-content { 967 .grid-content {
971 - border-radius: 4px;  
972 min-height: 36px; 968 min-height: 36px;
973 } 969 }
974 .row-bg { 970 .row-bg {
@@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
32 </el-table-column> 32 </el-table-column>
33 <el-table-column prop="modelnamecn" label="操作模块" width="120" sortable> 33 <el-table-column prop="modelnamecn" label="操作模块" width="120" sortable>
34 </el-table-column> 34 </el-table-column>
35 - <el-table-column prop="classname" label="系统类" show-overflow-tooltip="true" width="100" sortable> 35 + <el-table-column prop="classname" label="系统类" show-overflow-tooltip width="100" sortable>
  36 + </el-table-column>
  37 + <el-table-column prop="parameters" label="参数" show-overflow-tooltip width="100" sortable>
36 </el-table-column> 38 </el-table-column>
37 <el-table-column prop="result" label="操作结果" min-width="200" sortable> 39 <el-table-column prop="result" label="操作结果" min-width="200" sortable>
38 </el-table-column> 40 </el-table-column>
@@ -16,22 +16,26 @@ @@ -16,22 +16,26 @@
16 </el-col> 16 </el-col>
17 17
18 <!--列表--> 18 <!--列表-->
19 - <el-table :data="tableList" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"> 19 + <el-table :data="tableList" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"
  20 + row-key="permissionId"
  21 + border
  22 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
  23 + >
20 <el-table-column type="selection" width="55"> 24 <el-table-column type="selection" width="55">
21 </el-table-column> 25 </el-table-column>
22 - <el-table-column type="index" width="60"> 26 + <!--<el-table-column type="index" width="60">-->
  27 + <!--</el-table-column>-->
  28 + <el-table-column prop="permissionId" label="ID" width="130" sortable>
23 </el-table-column> 29 </el-table-column>
24 - <el-table-column prop="permissionId" label="ID" width="100" sortable> 30 + <el-table-column prop="name" label="权限名称" min-width="150" sortable>
25 </el-table-column> 31 </el-table-column>
26 - <el-table-column prop="name" label="权限名称" min-width="200" sortable> 32 + <el-table-column prop="description" label="描述" min-width="120" sortable>
27 </el-table-column> 33 </el-table-column>
28 - <el-table-column prop="description" label="描述" min-width="200" sortable> 34 + <el-table-column prop="ismenu" label="是否目录" width="100" :formatter="formatState" sortable>
29 </el-table-column> 35 </el-table-column>
30 - <el-table-column prop="permissionOrder" label="排序" width="100" sortable> 36 + <el-table-column prop="url" label="访问路径" width="300" sortable>
31 </el-table-column> 37 </el-table-column>
32 - <el-table-column prop="url" label="路径" width="100" sortable>  
33 - </el-table-column>  
34 - <el-table-column label="操作" min-width="150"> 38 + <el-table-column label="操作" min-width="100">
35 <template slot-scope="scope"> 39 <template slot-scope="scope">
36 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> 40 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
37 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> 41 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
@@ -143,7 +147,7 @@ @@ -143,7 +147,7 @@
143 tableList: [], 147 tableList: [],
144 total: 0, 148 total: 0,
145 pageNum: 1, 149 pageNum: 1,
146 - pageSize: 10, 150 + pageSize: 100,
147 listLoading: false, 151 listLoading: false,
148 sels: [],//列表选中列 152 sels: [],//列表选中列
149 //编辑界面是否显示 153 //编辑界面是否显示
@@ -208,7 +212,7 @@ @@ -208,7 +212,7 @@
208 return row.sex == 1 ? '男' : row.sex == 0 ? '女' : '未知'; 212 return row.sex == 1 ? '男' : row.sex == 0 ? '女' : '未知';
209 }, 213 },
210 formatState: function (row, column) { 214 formatState: function (row, column) {
211 - return row.state == true ? '是' : row.state == false ? '否' : '未知'; 215 + return row.ismenu == true ? '是' : row.ismenu == false ? '否' : '未知';
212 }, 216 },
213 handleCurrentChange(val) { 217 handleCurrentChange(val) {
214 this.pageNum = val; 218 this.pageNum = val;
@@ -23,18 +23,27 @@ @@ -23,18 +23,27 @@
23 :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> 23 :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
24 <el-table-column type="selection" width="55"> 24 <el-table-column type="selection" width="55">
25 </el-table-column> 25 </el-table-column>
26 - <el-table-column type="index" width="60">  
27 - </el-table-column>  
28 - <!--<el-table-column prop="roleId" label="ID" width="100" sortable>--> 26 + <!--<el-table-column type="index" width="60">-->
29 <!--</el-table-column>--> 27 <!--</el-table-column>-->
  28 + <el-table-column prop="roleId" label="ID" width="120">
  29 + </el-table-column>
30 <el-table-column prop="roleName" label="岗位/角色名称" min-width="200" sortable> 30 <el-table-column prop="roleName" label="岗位/角色名称" min-width="200" sortable>
31 </el-table-column> 31 </el-table-column>
32 <!--<el-table-column prop="departmentName" label="部门名称" min-width="200" sortable>--> 32 <!--<el-table-column prop="departmentName" label="部门名称" min-width="200" sortable>-->
33 <!--</el-table-column>--> 33 <!--</el-table-column>-->
34 - <el-table-column prop="description" label="描述" min-width="200" sortable> 34 + <el-table-column prop="description" label="描述" min-width="160" >
  35 + </el-table-column>
  36 + <el-table-column prop="type" label="类型" min-width="80" sortable>
  37 + </el-table-column>
  38 + <el-table-column prop="businessLicense" label="工商代码" min-width="180" >
  39 + </el-table-column>
  40 + <el-table-column prop="customsRegCode" label="海关备案代码" min-width="150" >
  41 + </el-table-column>
  42 + <el-table-column prop="mqcode" label="海关通道编号" min-width="150" >
35 </el-table-column> 43 </el-table-column>
36 <el-table-column label="操作" min-width="260"> 44 <el-table-column label="操作" min-width="260">
37 <template slot-scope="scope"> 45 <template slot-scope="scope">
  46 + <el-button type="primary" size="small" @click="handleAdd(scope.$index, scope.row)">新增下级</el-button>
38 <el-button size="small" @click="setPerm(scope.$index, scope.row)">设置权限</el-button> 47 <el-button size="small" @click="setPerm(scope.$index, scope.row)">设置权限</el-button>
39 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> 48 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
40 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> 49 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
@@ -48,67 +57,57 @@ @@ -48,67 +57,57 @@
48 </el-pagination> 57 </el-pagination>
49 </el-col> 58 </el-col>
50 59
51 - <!--编辑界面-->  
52 - <el-dialog title="编辑" :visible.sync="editFormVisible" :close-on-click-modal="false">  
53 - <el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm">  
54 - <el-form-item label="ID">  
55 - <span>{{editForm.roleId}}</span> 60 + <!--新增界面-->
  61 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="addFormVisible" :close-on-click-modal="false">
  62 + <el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
  63 + <el-form-item label="上级组织机构">
  64 + <span>{{addForm.parentName}}</span>
56 </el-form-item> 65 </el-form-item>
57 - <el-form-item label="岗位名称">  
58 - <el-input v-model="editForm.roleName" auto-complete="off" placeholder="请输入岗位/角色名称:例如:ROLE_name"></el-input> 66 + <el-form-item label="组织机构名称" prop="roleName">
  67 + <el-input v-model="addForm.roleName" auto-complete="off" placeholder="请输入组织机构名称:例如:公司名称"></el-input>
59 </el-form-item> 68 </el-form-item>
60 - <el-form-item label="岗位描述">  
61 - <el-input v-model="editForm.description" auto-complete="off" placeholder="请输入岗位/角色描述:例如:用户管理员"></el-input> 69 + <el-form-item label="组织机构描述" prop="description">
  70 + <el-input v-model="addForm.description" auto-complete="off" placeholder="组织机构描述:例如:组织机构简介"></el-input>
62 </el-form-item> 71 </el-form-item>
63 - <el-form-item label="部门名称">  
64 - <el-select v-model="editForm.departmentId" placeholder="请选择"> 72 + <el-form-item label="组织机构类型" prop="type">
  73 + <el-select
  74 + v-model="addForm.type"
  75 + filterable
  76 + allow-create
  77 + default-first-option
  78 + placeholder="请选择类型">
65 <el-option 79 <el-option
66 - v-for="item in departmentNameList"  
67 - :key="item.departmentId"  
68 - :label="item.departmentName"  
69 - :value="item.departmentId"> 80 + v-for="item in companyOption"
  81 + :key="item.value"
  82 + :label="item.label"
  83 + :value="item.value">
70 </el-option> 84 </el-option>
71 </el-select> 85 </el-select>
72 </el-form-item> 86 </el-form-item>
73 - </el-form>  
74 - <div slot="footer" class="dialog-footer">  
75 - <el-button @click.native="editFormVisible = false">取消</el-button>  
76 - <el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>  
77 - </div>  
78 - </el-dialog>  
79 -  
80 - <!--新增界面-->  
81 - <el-dialog title="新增" :visible.sync="addFormVisible" :close-on-click-modal="false">  
82 - <el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm">  
83 - <el-form-item label="岗位/角色名称" prop="roleName">  
84 - <el-input v-model="addForm.roleName" auto-complete="off" placeholder="请输入岗位/角色名称:例如:ROLE_name"></el-input> 87 + <el-form-item label="工商企业代码" prop="businessLicense">
  88 + <el-input v-model="addForm.businessLicense" auto-complete="off" placeholder="社会信用代码或者组织机构代码"></el-input>
85 </el-form-item> 89 </el-form-item>
86 - <el-form-item label="岗位/角色描述" prop="description">  
87 - <el-input v-model="addForm.description" auto-complete="off" placeholder="请输入岗位/角色描述:例如:用户管理员"></el-input> 90 + <el-form-item label="海关备案代码" prop="customsRegCode">
  91 + <el-input v-model="addForm.customsRegCode" auto-complete="off" placeholder="海关备案后返回的备案代码"></el-input>
88 </el-form-item> 92 </el-form-item>
89 - <el-form-item label="部门名称" prop="roleSign">  
90 - <el-select v-model="addForm.departmentId" placeholder="请选择">  
91 - <el-option  
92 - v-for="item in departmentNameList"  
93 - :key="item.departmentId"  
94 - :label="item.departmentName"  
95 - :value="item.departmentId">  
96 - </el-option>  
97 - </el-select> 93 + <el-form-item label="海关通道编号" prop="mqcode">
  94 + <el-input v-model="addForm.mqcode" auto-complete="off" placeholder="海关通道编号"></el-input>
98 </el-form-item> 95 </el-form-item>
99 </el-form> 96 </el-form>
100 <div slot="footer" class="dialog-footer"> 97 <div slot="footer" class="dialog-footer">
101 <el-button @click.native="addFormVisible = false">取消</el-button> 98 <el-button @click.native="addFormVisible = false">取消</el-button>
102 - <el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button> 99 + <el-button type="primary" @click="dialogStatus==='create'?addSubmit():editSubmit()" :loading="addLoading" >提交</el-button>
103 </div> 100 </div>
104 </el-dialog> 101 </el-dialog>
105 102
106 <!--权限设置界面--> 103 <!--权限设置界面-->
107 <el-dialog title="岗位的权限设置" :visible.sync="PermFormVisible" :close-on-click-modal="false"> 104 <el-dialog title="岗位的权限设置" :visible.sync="PermFormVisible" :close-on-click-modal="false">
108 <el-form :model="permForm" label-width="80px" ref="permForm"> 105 <el-form :model="permForm" label-width="80px" ref="permForm">
109 - <el-checkbox-group v-model="permIds" size="small">  
110 - <el-checkbox v-for="perm in permissons" :label="perm.permissionId" :key="perm.permissionId">{{perm.name}}</el-checkbox>  
111 - </el-checkbox-group> 106 + <el-tree :data="permissons" :props="treeDefaultProps"
  107 + @check="clickDeal"
  108 + show-checkbox highlight-current default-expand-all check-on-click-node check-strictly
  109 + node-key="permissionId" ref="tree">
  110 + </el-tree>
112 </el-form> 111 </el-form>
113 <div slot="footer" class="dialog-footer"> 112 <div slot="footer" class="dialog-footer">
114 <el-button @click.native="PermFormVisible = false">取消</el-button> 113 <el-button @click.native="PermFormVisible = false">取消</el-button>
@@ -131,6 +130,20 @@ @@ -131,6 +130,20 @@
131 filters: { 130 filters: {
132 roleName: '' 131 roleName: ''
133 }, 132 },
  133 + companyOption: [
  134 + {
  135 + label: "集团",
  136 + value: "集团"
  137 + },
  138 + {
  139 + label: "公司",
  140 + value: "公司"
  141 + }
  142 + ],
  143 + treeDefaultProps: {
  144 + children: 'children',
  145 + label: 'name',
  146 + },
134 departmentNameList:[], 147 departmentNameList:[],
135 roles: [], 148 roles: [],
136 permissons: [], 149 permissons: [],
@@ -140,23 +153,11 @@ @@ -140,23 +153,11 @@
140 pageSize: 5, 153 pageSize: 5,
141 listLoading: false, 154 listLoading: false,
142 sels: [],//列表选中列 155 sels: [],//列表选中列
143 - //编辑界面是否显示  
144 - editFormVisible: false,  
145 - editLoading: false,  
146 - editFormRules: {  
147 - roleName: [  
148 - { required: true, message: '请输入岗位/角色名称', trigger: 'blur' }  
149 - ] 156 + dialogMap: {
  157 + update: '编辑',
  158 + create: '新增',
150 }, 159 },
151 - //编辑界面数据  
152 - editForm: {  
153 - roleId: 1,  
154 - description: '',  
155 - roleName: '',  
156 - roleSign: 1,  
157 - departmentId:''  
158 - },  
159 - 160 + dialogStatus: 'create',
160 //新增界面是否显示 161 //新增界面是否显示
161 addFormVisible: false, 162 addFormVisible: false,
162 //设置权限界面是否显示 163 //设置权限界面是否显示
@@ -175,7 +176,13 @@ @@ -175,7 +176,13 @@
175 description: '', 176 description: '',
176 roleName: '', 177 roleName: '',
177 roleSign: 1, 178 roleSign: 1,
178 - departmentId:'' 179 + departmentId:'',
  180 + type: '',
  181 + businessLicense: '',
  182 + customsRegCode: '',
  183 + parentName: '',
  184 + mqcode: ''
  185 +
179 }, 186 },
180 permForm: { 187 permForm: {
181 roleId: 1, 188 roleId: 1,
@@ -228,7 +235,6 @@ @@ -228,7 +235,6 @@
228 235
229 }, 236 },
230 237
231 -  
232 //获取部门列表 238 //获取部门列表
233 getdepartmentNames() { 239 getdepartmentNames() {
234 240
@@ -268,7 +274,11 @@ @@ -268,7 +274,11 @@
268 if(null!= error.response && error.response!==undefined){ 274 if(null!= error.response && error.response!==undefined){
269 let status= error.response.status; 275 let status= error.response.status;
270 let msg = error.response.statusText; 276 let msg = error.response.statusText;
271 - alert(status+msg); 277 + message({
  278 + // 饿了么的消息弹窗组件
  279 + message: status+msg,
  280 + type: "error"
  281 + });
272 }else { 282 }else {
273 alert(error); 283 alert(error);
274 } 284 }
@@ -303,14 +313,16 @@ @@ -303,14 +313,16 @@
303 * @param row 为这行的数据对象 313 * @param row 为这行的数据对象
304 */ 314 */
305 handleEdit: function (index, row) { 315 handleEdit: function (index, row) {
306 - this.editFormVisible = true;  
307 - this.editForm = Object.assign({}, row);  
308 - this.getdepartmentNames(); 316 + this.addFormVisible = true;
  317 + this.dialogStatus= 'update',
  318 + this.addForm = Object.assign({}, row);
  319 + // this.getdepartmentNames();
309 }, 320 },
310 setPerm: function (index, row) { 321 setPerm: function (index, row) {
  322 + this.PermFormVisible = true;
  323 + this.getPermList();
311 var _this = this; 324 var _this = this;
312 this.permIds = []; 325 this.permIds = [];
313 - this.PermFormVisible = true;  
314 this.permForm = Object.assign({}, row); 326 this.permForm = Object.assign({}, row);
315 let rolePerms = this.permForm.permissions; 327 let rolePerms = this.permForm.permissions;
316 if (util.checkNull(rolePerms)){ 328 if (util.checkNull(rolePerms)){
@@ -320,31 +332,47 @@ @@ -320,31 +332,47 @@
320 } 332 }
321 }); 333 });
322 } 334 }
323 - this.getPermList(); 335 +
  336 + this.$nextTick(() => {
  337 +
  338 + //反向适配
  339 + this.$refs.tree.setCheckedKeys(this.permIds);
  340 + });
324 }, 341 },
325 //显示新增界面,每次点开初始化数据 342 //显示新增界面,每次点开初始化数据
326 - handleAdd: function () { 343 + handleAdd: function (index,row) {
327 this.addFormVisible = true; 344 this.addFormVisible = true;
  345 + this.dialogStatus= 'create';
328 this.addForm = { 346 this.addForm = {
329 - username: '',  
330 - password: '',  
331 - sex: 1,  
332 - address: '',  
333 - realname: '',  
334 - email: '',  
335 - mobilephone: '',  
336 - age: 1  
337 - };  
338 - this.getdepartmentNames(); 347 + description: '',
  348 + roleName: '',
  349 + roleSign: 1,
  350 + departmentId:'',
  351 + type: '',
  352 + businessLicense: '',
  353 + customsRegCode: '',
  354 + mqcode: '',
  355 + parentid: 0
  356 +
  357 + };
  358 + //如果新增下级
  359 + if(util.checkNull(row)){
  360 + //传递上级ID
  361 + let parentRole = Object.assign({}, row);
  362 + this.addForm.parentid = parentRole.roleId;
  363 + this.addForm.parentName = parentRole.roleName;
  364 + }
  365 +
  366 +// this.getdepartmentNames();
339 }, 367 },
340 //编辑 368 //编辑
341 editSubmit: function () { 369 editSubmit: function () {
342 - this.$refs.editForm.validate((valid) => { 370 + this.$refs.addForm.validate((valid) => {
343 if (valid) { 371 if (valid) {
344 this.$confirm('确认提交吗?', '提示', {}).then(() => { 372 this.$confirm('确认提交吗?', '提示', {}).then(() => {
345 - this.editLoading = true; 373 + this.addLoading = true;
346 //NProgress.start(); 374 //NProgress.start();
347 - let para = Object.assign({}, this.editForm); 375 + let para = Object.assign({}, this.addForm);
348 //不需要提交的 去掉,后端不好接收 376 //不需要提交的 去掉,后端不好接收
349 para.authorities = null; 377 para.authorities = null;
350 para.permissions = null; 378 para.permissions = null;
@@ -357,8 +385,8 @@ @@ -357,8 +385,8 @@
357 式; 385 式;
358 */ 386 */
359 /*moment 安装 npm install moment --save*/ 387 /*moment 安装 npm install moment --save*/
360 - para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');  
361 - this.editLoading = false; 388 + // para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
  389 + this.addLoading = false;
362 edit(para).then((res) => { 390 edit(para).then((res) => {
363 391
364 //NProgress.done(); 392 //NProgress.done();
@@ -366,8 +394,8 @@ @@ -366,8 +394,8 @@
366 message: '提交成功', 394 message: '提交成功',
367 type: 'success' 395 type: 'success'
368 }); 396 });
369 - this.$refs['editForm'].resetFields();  
370 - this.editFormVisible = false; 397 + this.$refs['addForm'].resetFields();
  398 + this.addFormVisible = false;
371 this.getRoles(); 399 this.getRoles();
372 }).catch(error => alert(error)); 400 }).catch(error => alert(error));
373 }); 401 });
@@ -406,7 +434,7 @@ @@ -406,7 +434,7 @@
406 //NProgress.start(); 434 //NProgress.start();
407 let role = Object.assign({}, this.permForm); 435 let role = Object.assign({}, this.permForm);
408 let roleId = role.roleId; 436 let roleId = role.roleId;
409 - let permissionIds = this.permIds 437 + let permissionIds = this.$refs.tree.getCheckedKeys();
410 let para = {roleId,permissionIds}; 438 let para = {roleId,permissionIds};
411 updateRolePerm(para).then((res) => { 439 updateRolePerm(para).then((res) => {
412 this.addLoading = false; 440 this.addLoading = false;
@@ -449,6 +477,81 @@ @@ -449,6 +477,81 @@
449 }).catch(() => { 477 }).catch(() => {
450 478
451 }); 479 });
  480 + },
  481 + treeHandleCheckChange: function (data, checked, indeterminate) {
  482 + if(checked) {
  483 + this.permIds.push(data.permissionId);
  484 + }else {
  485 + this.permIds.splice(this.permIds.contains(data.permissionId),1);
  486 + }
  487 + console.log(data, checked, indeterminate);
  488 +
  489 + },
  490 + uniteParentSame(id,treeStatus){//当子节点全为未选中时父节点也变为未选中状态
  491 + let node = this.$refs.tree.getNode(permissionId);//获取当前节点的节点树
  492 + if (node.parent !== null && node.parent !== undefined) {
  493 + let parentNode = node.parent.data;//获取当前节点的父节点树
  494 + if (parentNode != undefined){//判断父节点是否存在
  495 + for (let i = 0; i < parentNode.children.length; i++) {
  496 + let checkedKeys = this.$refs.tree.getCheckedKeys();
  497 + let hafCheckedKeys = this.$refs.tree.getHalfCheckedKeys();
  498 + let selectNodes = checkedKeys.concat(hafCheckedKeys);//获取已选择树节点
  499 + let selected = selectNodes.indexOf(parentNode.children[i].permissionId); // -1当前节点的同级节点是否全部未选中
  500 + if (selected !== -1){
  501 + return;
  502 + }
  503 + }
  504 + }else {
  505 + return;
  506 + }
  507 + this.$refs.tree.setChecked(parentNode.permissionId, false);//修改节点为未选择
  508 + if(node.level>2){//判断是否是最上级节点
  509 + this.uniteParentSame(parentNode.permissionId,treeStatus)
  510 + }
  511 + }else {
  512 + return;
  513 + }
  514 + },
  515 +
  516 + // 统一处理子节点为相同的勾选状态
  517 + uniteChildSame(treeList, isSelected){
  518 + this.$refs.tree.setChecked(treeList.permissionId, isSelected);
  519 + if (treeList.children !== undefined){
  520 + for (let i = 0; i < treeList.children.length; i++) {
  521 + this.uniteChildSame(treeList.children[i], isSelected)
  522 + }
  523 + }
  524 + },
  525 + // 统一处理父节点为选中
  526 + selectedParent(currentObj){
  527 + let currentNode = this.$refs.tree.getNode(currentObj);
  528 + if (currentNode.parent.key !== undefined) {
  529 + this.$refs.tree.setChecked(currentNode.parent, true);
  530 + this.selectedParent(currentNode.parent)
  531 + }
  532 + },
  533 + clickDeal: function (currentObj, treeStatus){
  534 + // 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
  535 + let selected = treeStatus.checkedKeys.indexOf(currentObj.permissionId); // -1未选中
  536 + // 选中
  537 + if (selected !== -1) {
  538 + // 子节点只要被选中父节点就被选中
  539 + this.selectedParent(currentObj);
  540 + // 统一处理子节点为相同的勾选状态
  541 + this.uniteChildSame(currentObj, true)
  542 + } else {
  543 + // 未选中 处理子节点全部未选中
  544 + if (currentObj.children !== undefined){
  545 + if (currentObj.children.length !== 0) {
  546 + this.uniteChildSame(currentObj, false)
  547 + }
  548 + //放开时为当子节点全为未选中时父节点也变为未选中状态 注释后就是父节点不和子节点强制绑定
  549 + // this.uniteParentSame(currentObj.id,treeStatus)//当子节点全为未选中时父节点也变为未选中状态
  550 + }
  551 + // else {
  552 + // this.uniteParentSame(currentObj.id,treeStatus)
  553 + // }
  554 + }
452 } 555 }
453 }, 556 },
454 mounted() { 557 mounted() {
@@ -19,11 +19,11 @@ @@ -19,11 +19,11 @@
19 </el-col> 19 </el-col>
20 20
21 <!--列表--> 21 <!--列表-->
22 - <el-table :data="users" highlight-current-row v-loading="listLoading" @selection-change="selsChange" style="width: 100%;"> 22 + <el-table :data="users" highlight-current-row border v-loading="listLoading" @selection-change="selsChange" style="width: 100%;">
23 <el-table-column type="selection" width="55"> 23 <el-table-column type="selection" width="55">
24 </el-table-column> 24 </el-table-column>
25 - <el-table-column type="index" width="60">  
26 - </el-table-column> 25 + <!--<el-table-column type="index" width="60">-->
  26 + <!--</el-table-column>-->
27 <el-table-column prop="userId" label="ID" width="100" sortable> 27 <el-table-column prop="userId" label="ID" width="100" sortable>
28 </el-table-column> 28 </el-table-column>
29 <el-table-column prop="username" label="账号" width="120" sortable> 29 <el-table-column prop="username" label="账号" width="120" sortable>
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 </el-table-column> 46 </el-table-column>
47 <el-table-column label="操作" width="250"> 47 <el-table-column label="操作" width="250">
48 <template slot-scope="scope"> 48 <template slot-scope="scope">
49 - <el-button size="small" @click="roleEdit(scope.$index, scope.row)">权限配置</el-button> 49 + <el-button size="small" @click="roleEdit(scope.$index, scope.row)">角色配置</el-button>
50 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button> 50 <el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
51 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> 51 <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
52 </template> 52 </template>
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 <el-dialog title="新增" :visible.sync="addFormVisible" :close-on-click-modal="false"> 126 <el-dialog title="新增" :visible.sync="addFormVisible" :close-on-click-modal="false">
127 <el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm"> 127 <el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm">
128 <el-form-item label="账号" prop="username"> 128 <el-form-item label="账号" prop="username">
129 - <el-input v-model="addForm.username"></el-input> 129 + <el-input v-model="addForm.username" aria-placeholder="用户名长度在5-11位,支持英文和数字"></el-input>
130 </el-form-item> 130 </el-form-item>
131 <el-form-item label="密码" prop="password"> 131 <el-form-item label="密码" prop="password">
132 <el-input v-model="addForm.password" type="password"></el-input> 132 <el-input v-model="addForm.password" type="password"></el-input>
@@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
168 <el-form-item label="账号"> 168 <el-form-item label="账号">
169 <span>{{roleEditForm.username}}</span> 169 <span>{{roleEditForm.username}}</span>
170 </el-form-item> 170 </el-form-item>
171 - <el-tree :data="roles" :props="treeDefaultProps" show-checkbox node-key="roleId" ref="tree"> 171 + <el-tree :data="roles" :props="treeDefaultProps" default-expand-all show-checkbox highlight-current check-strictly node-key="roleId" ref="tree" @check-change="treeHandleCheckChange">
172 </el-tree> 172 </el-tree>
173 </el-form> 173 </el-form>
174 174
@@ -230,7 +230,10 @@ @@ -230,7 +230,10 @@
230 addLoading: false, 230 addLoading: false,
231 addFormRules: { 231 addFormRules: {
232 username: [ 232 username: [
233 - { required: true, message: '请输入姓名', trigger: 'blur' } 233 + { required: true, message: '请输入姓名,用户名长度在5-11位,支持英文和数字', trigger: 'blur' },
  234 + ],
  235 + password: [
  236 + { required: true, message: '请输入密码,用户名长度在6-18位,支持英文和数字和非空字符', trigger: 'blur'}
234 ] 237 ]
235 }, 238 },
236 //用户角色配置 239 //用户角色配置
@@ -321,16 +324,24 @@ @@ -321,16 +324,24 @@
321 this.editForm = Object.assign({}, row); 324 this.editForm = Object.assign({}, row);
322 }, 325 },
323 roleEdit: function (index, row) { 326 roleEdit: function (index, row) {
  327 + this.roleFormVisible = true;
  328 + this.getRoles();
324 var _this = this; 329 var _this = this;
325 _this.roleIds = []; 330 _this.roleIds = [];
326 this.roleEditForm = Object.assign({}, row); 331 this.roleEditForm = Object.assign({}, row);
327 - let userRoles = this.roleEditForm.roles;  
328 - if (util.checkNull(userRoles)){  
329 - userRoles.forEach(function (role,v_index,v_arr) {  
330 - _this.roleIds[v_index] = role.roleId; 332 + let roles = this.roleEditForm.roles;
  333 +
  334 + if (util.checkNull(roles)){
  335 + roles.forEach(function (role,v_index,v_arr) {
  336 + if (util.checkNull(role)) {
  337 + _this.roleIds[v_index] = role.roleId;
  338 + }
331 }); 339 });
332 } 340 }
333 - this.getRoles(); 341 + this.$nextTick(() => {
  342 + //反向适配
  343 + this.$refs.tree.setCheckedKeys(this.roleIds);
  344 + });
334 }, 345 },
335 getRoles() { 346 getRoles() {
336 let para = { 347 let para = {
@@ -340,7 +351,6 @@ @@ -340,7 +351,6 @@
340 NProgress.start(); 351 NProgress.start();
341 getList(para).then((res) => { 352 getList(para).then((res) => {
342 this.roles = res.data.list; 353 this.roles = res.data.list;
343 - this.roleFormVisible = true;  
344 NProgress.done(); 354 NProgress.done();
345 }).catch((error) => { 355 }).catch((error) => {
346 if(null!= error.response && error.response!==undefined){ 356 if(null!= error.response && error.response!==undefined){
@@ -352,6 +362,7 @@ @@ -352,6 +362,7 @@
352 } 362 }
353 }); 363 });
354 364
  365 +
355 }, 366 },
356 //显示新增界面,每次点开初始化数据 367 //显示新增界面,每次点开初始化数据
357 handleAdd: function () { 368 handleAdd: function () {
@@ -424,7 +435,10 @@ @@ -424,7 +435,10 @@
424 this.getUsers(); 435 this.getUsers();
425 }).catch(error => { 436 }).catch(error => {
426 this.addLoading = false; 437 this.addLoading = false;
427 - alert(error.message); 438 + this.$message({
  439 + message: error.message,
  440 + type: 'error'
  441 + });
428 }); 442 });
429 }); 443 });
430 } 444 }
@@ -459,11 +473,14 @@ @@ -459,11 +473,14 @@
459 this.$confirm('确认提交吗?', '提示', {}).then(() => { 473 this.$confirm('确认提交吗?', '提示', {}).then(() => {
460 // this.editLoading = true; 474 // this.editLoading = true;
461 let userId = this.roleEditForm.userId; 475 let userId = this.roleEditForm.userId;
462 - let roleIds = this.roleIds; 476 + let roleIds = this.$refs.tree.getCheckedKeys();
463 let para = {userId,roleIds}; 477 let para = {userId,roleIds};
464 setUserRole(para).then((res) => { 478 setUserRole(para).then((res) => {
465 if (res.status ===200) { 479 if (res.status ===200) {
466 - alert("ok"); 480 + this.$message({
  481 + message: '岗位设置成功',
  482 + type: 'success'
  483 + });
467 } 484 }
468 this.getUsers(); 485 this.getUsers();
469 this.roleFormVisible = false; 486 this.roleFormVisible = false;
@@ -478,6 +495,15 @@ @@ -478,6 +495,15 @@
478 }, 495 },
479 beforeAvatarUpload: function () { 496 beforeAvatarUpload: function () {
480 497
  498 + },
  499 + treeHandleCheckChange: function (data, checked, indeterminate) {
  500 + if(checked) {
  501 + this.roleIds.push(data.roleId);
  502 + }else {
  503 + this.roleIds.splice(this.roleIds.contains(data.roleId),1);
  504 + }
  505 +// console.log(data, checked, indeterminate);
  506 + console.log(this.roleIds);
481 } 507 }
482 }, 508 },
483 mounted() { 509 mounted() {
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input v-model="awba" placeholder="请输入主单号"></el-input> 35 + <el-input v-model="awba" clearable placeholder="请输入主单号"></el-input>
36 </div> 36 </div>
37 </el-col> 37 </el-col>
38 <div class="grid-content el-btn"> 38 <div class="grid-content el-btn">
@@ -51,15 +51,20 @@ @@ -51,15 +51,20 @@
51 </el-col> 51 </el-col>
52 </el-row> 52 </el-row>
53 </div> 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"> 54 + <el-table v-loading="listLoading" :data="arriveData" stripe
  55 + style="font-size: 12px" border @selection-change="handleSelectionChange"
  56 + default-expand-all
  57 + row-key="uuid"
  58 + border
  59 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
  60 + <el-table-column type="selection" width="55">
  61 + </el-table-column>
  62 + <el-table-column label="航班号" width="100" align="center">
58 <template slot-scope="scope"> 63 <template slot-scope="scope">
59 <span>{{scope.row.carrier}}{{scope.row.flightno}}</span> 64 <span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
60 </template> 65 </template>
61 </el-table-column> 66 </el-table-column>
62 - <el-table-column label="运单号" width="120" align="center"> 67 + <el-table-column label="运单号" width="110" align="center">
63 <template slot-scope="scope"> 68 <template slot-scope="scope">
64 <span>{{scope.row.awba}}</span> 69 <span>{{scope.row.awba}}</span>
65 </template> 70 </template>
@@ -79,7 +84,7 @@ @@ -79,7 +84,7 @@
79 <span>{{scope.row.weight}}</span> 84 <span>{{scope.row.weight}}</span>
80 </template> 85 </template>
81 </el-table-column> 86 </el-table-column>
82 - <el-table-column label="货物描述" width="100" align="center"> 87 + <el-table-column label="货物描述" width="120" align="center">
83 <template slot-scope="scope"> 88 <template slot-scope="scope">
84 <span>{{scope.row.goodsname}}</span> 89 <span>{{scope.row.goodsname}}</span>
85 </template> 90 </template>
@@ -91,38 +96,51 @@ @@ -91,38 +96,51 @@
91 </el-table-column> 96 </el-table-column>
92 <el-table-column label="状态" width="100" align="center"> 97 <el-table-column label="状态" width="100" align="center">
93 <template slot-scope="scope"> 98 <template slot-scope="scope">
94 - <span v-if="scope.row.status ==='01'">未发送</span>  
95 - <span v-if="scope.row.status ==='02'">已发舱单报</span> 99 + <span v-if="scope.row.status ==='01'">接受申报</span>
  100 + <span v-if="scope.row.status ==='02'">待人工审核</span>
  101 + <span v-if="scope.row.status ==='03'">退单</span>
96 <span v-if="scope.row.status ==='05'">舱单报退单</span> 102 <span v-if="scope.row.status ==='05'">舱单报退单</span>
97 <span v-if="scope.row.status ==='06'">舱单转人工</span> 103 <span v-if="scope.row.status ==='06'">舱单转人工</span>
98 <span v-if="scope.row.status ==='07'">舱单报申报成功</span> 104 <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
99 <span v-if="scope.row.status ==='08'">已发舱单删除报</span> 105 <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
100 <span v-if="scope.row.status ==='09'">舱单删除报退单</span> 106 <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
101 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> 107 <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> 108 + <span v-if="scope.row.status ==='11'">放行</span>
  109 + <span v-if="scope.row.status ==='12'">拒装</span>
  110 + <span v-if="scope.row.status ==='13'">禁卸</span>
105 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> 111 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
106 <span v-if="scope.row.status ==='15'">舱单修改报成功</span> 112 <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
107 <span v-if="scope.row.status ==='16'">海关已存在</span> 113 <span v-if="scope.row.status ==='16'">海关已存在</span>
  114 + <span v-if="scope.row.status ==='21'">可自动发送</span>
  115 + <span v-if="scope.row.status ==='22'">未发送</span>
  116 + <span v-if="scope.row.status ==='23'">已发送新增报</span>
  117 + <span v-if="scope.row.status ==='24'">已发送删除报</span>
  118 + <span v-if="scope.row.status ==='25'">已发送修改报</span>
108 </template> 119 </template>
109 </el-table-column> 120 </el-table-column>
110 - <el-table-column prop="receipt" label="回执信息" width="180" align="center"> 121 + <el-table-column prop="receipt" label="回执信息" align="center">
111 <template slot-scope="scope"> 122 <template slot-scope="scope">
112 <span>{{scope.row.ext5}}</span> 123 <span>{{scope.row.ext5}}</span>
113 </template> 124 </template>
114 </el-table-column> 125 </el-table-column>
115 - <el-table-column prop="operation" label="操作" align="center"> 126 + <el-table-column prop="operation" fixed="right" label="操作" align="center" width="400">
116 <template slot-scope="scope"> 127 <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'">发送舱单报 128 + <el-button size="mini" @click="handleSendDesc(scope.row)">收发明细</el-button>
  129 + <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
  130 + <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
  131 + :disabled="scope.row.status ==='23'">发送出港运抵报
  132 + </el-button>
  133 + <p></p>
  134 + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单
121 </el-button> 135 </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)" 136 <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
125 - :disabled="scope.row.status ==='00'">修改状态 137 + :disabled="scope.row.status ==='22'">更改状态
  138 + </el-button>
  139 + <el-button size="mini" type="primary" v-if="scope.row.awbh ===''"
  140 + @click="handleAddAwbh(scope.row)">新增分单
  141 + </el-button>
  142 + <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
  143 + :disabled="scope.row.status ==='24'">发删除报
126 </el-button> 144 </el-button>
127 </template> 145 </template>
128 </el-table-column> 146 </el-table-column>
@@ -132,7 +150,7 @@ @@ -132,7 +150,7 @@
132 <el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0" 150 <el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0"
133 @click="handelAddArriveInfo">新增出港运抵 151 @click="handelAddArriveInfo">新增出港运抵
134 </el-button> 152 </el-button>
135 - <el-button type="primary" size="mini" v-if="arriveModel.flightno !== undefined || arriveData.length>0" 153 + <el-button type="primary" size="mini" v-if="arriveQuery.flightno !== undefined || arriveData.length>0"
136 @click="handelBackStep">返回 154 @click="handelBackStep">返回
137 </el-button> 155 </el-button>
138 </el-row> 156 </el-row>
@@ -152,7 +170,7 @@ @@ -152,7 +170,7 @@
152 <el-input v-model="arriveModel.awba"></el-input> 170 <el-input v-model="arriveModel.awba"></el-input>
153 </el-form-item> 171 </el-form-item>
154 </el-col> 172 </el-col>
155 - <el-col :span="7.5"> 173 + <el-col :span="7.5" v-if="fenStatus === 'addAwbh'">
156 <el-form-item label="分单号" prop="awbh"> 174 <el-form-item label="分单号" prop="awbh">
157 <el-input v-model="awbh"></el-input> 175 <el-input v-model="awbh"></el-input>
158 </el-form-item> 176 </el-form-item>
@@ -185,14 +203,28 @@ @@ -185,14 +203,28 @@
185 <el-row> 203 <el-row>
186 <el-col :span="7.5"> 204 <el-col :span="7.5">
187 <el-form-item label="起始站" prop="originstation"> 205 <el-form-item label="起始站" prop="originstation">
188 - <el-input v-model="originstation"  
189 - :disabled="dialogFormVisible === 'update'"></el-input> 206 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  207 + allow-create v-model="originstation" remote>
  208 + <el-option v-for="item in airportCode"
  209 + :key="item.airportid" :label="item.airportid"
  210 + :value="item.airportid" :disabled="dialogFormVisible === 'update'">
  211 + <span style="float: left">{{ item.airportdescchn }}</span>
  212 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  213 + </el-option>
  214 + </el-select>
190 </el-form-item> 215 </el-form-item>
191 </el-col> 216 </el-col>
192 <el-col :span="7.5"> 217 <el-col :span="7.5">
193 <el-form-item label="目的站" prop="destinationstation"> 218 <el-form-item label="目的站" prop="destinationstation">
194 - <el-input v-model="destinationstation"  
195 - :disabled="dialogFormVisible === 'update'"></el-input> 219 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  220 + allow-create v-model="destinationstation" remote>
  221 + <el-option v-for="item in airportCode"
  222 + :key="item.airportid" :label="item.airportid"
  223 + :value="item.airportid" :disabled="dialogFormVisible === 'update'">
  224 + <span style="float: left">{{ item.airportdescchn }}</span>
  225 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  226 + </el-option>
  227 + </el-select>
196 </el-form-item> 228 </el-form-item>
197 </el-col> 229 </el-col>
198 </el-row> 230 </el-row>
@@ -226,9 +258,15 @@ @@ -226,9 +258,15 @@
226 </el-col> 258 </el-col>
227 <el-col :span="7.5"> 259 <el-col :span="7.5">
228 <el-form-item label="海关关区" prop="customcode"> 260 <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> 261 + <el-select v-model="arriveModel.customcode" placeholder="请选择关区代码" :loading="customLoading"
  262 + filterable clearable remote :remote-method="remoteMethodCustomCode"
  263 + :disabled="dialogStatus === 'addAwbh'">
  264 + <el-option v-for="item in customCodeList" :key="item.customcode"
  265 + :label="item.customcode"
  266 + :value="item.customcode">
  267 + <span style="float: left">{{ item.customcode }}</span>
  268 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  269 + </el-option>
232 </el-select> 270 </el-select>
233 </el-form-item> 271 </el-form-item>
234 </el-col> 272 </el-col>
@@ -237,12 +275,11 @@ @@ -237,12 +275,11 @@
237 <div slot="footer" class="dialog-footer"> 275 <div slot="footer" class="dialog-footer">
238 <el-button @click="dialogFormVisible = false">取消</el-button> 276 <el-button @click="dialogFormVisible = false">取消</el-button>
239 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button> 277 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
240 - <el-button type="success" @click="SaveAndSend">保存并发送</el-button>  
241 </div> 278 </div>
242 </el-dialog> 279 </el-dialog>
243 <el-dialog title="收发明细" :visible.sync="dialogTableVisible"> 280 <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
244 <el-table :data="detailData" border> 281 <el-table :data="detailData" border>
245 - <el-table-column label="操作时间" width="150"> 282 + <el-table-column label="操作时间" width="180">
246 <template slot-scope="scope"> 283 <template slot-scope="scope">
247 {{scope.row.busdate}} 284 {{scope.row.busdate}}
248 </template> 285 </template>
@@ -272,6 +309,11 @@ @@ -272,6 +309,11 @@
272 {{scope.row.cusrestext}} 309 {{scope.row.cusrestext}}
273 </template> 310 </template>
274 </el-table-column> 311 </el-table-column>
  312 + <el-table-column label="操作类型" width="100">
  313 + <template slot-scope="scope">
  314 + {{scope.row.opertype}}
  315 + </template>
  316 + </el-table-column>
275 <el-table-column label="操作人" width="100"> 317 <el-table-column label="操作人" width="100">
276 <template slot-scope="scope"> 318 <template slot-scope="scope">
277 {{scope.row.operusername}} 319 {{scope.row.operusername}}
@@ -279,16 +321,51 @@ @@ -279,16 +321,51 @@
279 </el-table-column> 321 </el-table-column>
280 </el-table> 322 </el-table>
281 </el-dialog> 323 </el-dialog>
  324 + <el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
  325 + <el-form ref="arriveDeleteForm" :model="respModel" :rules="arriveDeleteRules"
  326 + label-width="120px" style="margin-right: 50px">
  327 + <el-form-item label="删除原因" prop="reason">
  328 + <el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
  329 + </el-form-item>
  330 + <el-form-item label="删除操作人" prop="contactName">
  331 + <el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
  332 + </el-form-item>
  333 + <el-form-item label="操作人Tel" prop="contactTel">
  334 + <el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
  335 + </el-form-item>
  336 + <el-form-item label="备注">
  337 + <el-input v-model="respModel.content" type="textarea"></el-input>
  338 + </el-form-item>
  339 + </el-form>
  340 + <div slot="footer" class="dialog-footer">
  341 + <el-button @click="dialogDeleteVisible = false">取消</el-button>
  342 + <el-button type="primary" @click="sendArriveDelete()">发送</el-button>
  343 + </div>
  344 + </el-dialog>
282 </div> 345 </div>
283 </template> 346 </template>
284 <script> 347 <script>
285 import treeTable from '@/components/TreeTable' 348 import treeTable from '@/components/TreeTable'
286 import treeToArray from '@/utils/customEval' 349 import treeToArray from '@/utils/customEval'
287 import Pagination from '@/components/Pagination' 350 import Pagination from '@/components/Pagination'
288 -  
289 - import {getMt3201ListForParam, deleteByIsDelete, updateStatus, updateMT3201, addMt3201} from '@/api/exitArrive' 351 + import {getCustomCode, getAirportCode} from "@/api/country";
  352 + import {
  353 + getMt3201ListForParam,
  354 + deleteByIsDelete,
  355 + updateStatus,
  356 + updateMT3201,
  357 + addMt3201,
  358 + sendCreateMt3201,
  359 + sendRemoveMt3201
  360 + } from '@/api/exitArrive'
290 import {Message} from "element-ui"; 361 import {Message} from "element-ui";
291 - import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"; 362 + import {
  363 + validAwb,
  364 + validAlphabets,
  365 + validAlphabetsAndNum,
  366 + validAlphabetsAndSpanceKey,
  367 + validatorNum
  368 + } from "@/utils/validate";
292 import {getResponseForParam} from '@/api/responseDetail' 369 import {getResponseForParam} from '@/api/responseDetail'
293 370
294 export default { 371 export default {
@@ -314,8 +391,8 @@ @@ -314,8 +391,8 @@
314 } 391 }
315 callback() 392 callback()
316 } 393 }
317 - const validAlphabetsSpanceKey = (rule,value,callback) =>{  
318 - if(!validAlphabetsAndSpanceKey(value)){ 394 + const validAlphabetsSpanceKey = (rule, value, callback) => {
  395 + if (!validAlphabetsAndSpanceKey(value)) {
319 callback("只能输入字母、数字、空格") 396 callback("只能输入字母、数字、空格")
320 } 397 }
321 callback() 398 callback()
@@ -332,14 +409,15 @@ @@ -332,14 +409,15 @@
332 isAdmin: false, 409 isAdmin: false,
333 arriveQuery: { 410 arriveQuery: {
334 pageSize: 1, 411 pageSize: 1,
335 - limitSize: 100, 412 + limitSize: 30,
336 awba: undefined, 413 awba: undefined,
337 carrier: undefined, 414 carrier: undefined,
338 flightno: undefined, 415 flightno: undefined,
339 flightdate: undefined, 416 flightdate: undefined,
340 originstation: undefined, 417 originstation: undefined,
341 destinationstation: undefined, 418 destinationstation: undefined,
342 - customcode: undefined 419 + customcode: undefined,
  420 + messageType: undefined,
343 }, 421 },
344 dialogMap: { 422 dialogMap: {
345 update: '编辑出港运抵', 423 update: '编辑出港运抵',
@@ -347,11 +425,15 @@ @@ -347,11 +425,15 @@
347 }, 425 },
348 dialogTableVisible: false, 426 dialogTableVisible: false,
349 multipleSelection: [], 427 multipleSelection: [],
350 - customcodeList: [4604, 4620], 428 + customCodeList: [],
  429 + airportCode: [],
351 dialogStatus: undefined, 430 dialogStatus: undefined,
352 awbhStatus: false, 431 awbhStatus: false,
  432 + fenStatus: undefined,
353 dialogFormVisible: false, 433 dialogFormVisible: false,
  434 + dialogDeleteVisible: false,
354 listLoading: false, 435 listLoading: false,
  436 + customLoading: false,
355 arriveRoles: { 437 arriveRoles: {
356 awba: [{required: true, trigger: 'blur', validator: validatorAwb}], 438 awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
357 awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}], 439 awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
@@ -379,7 +461,24 @@ @@ -379,7 +461,24 @@
379 customcode: undefined, 461 customcode: undefined,
380 arrivetime: undefined, 462 arrivetime: undefined,
381 messageType: 'MT3201' 463 messageType: 'MT3201'
382 - } 464 + },
  465 + respModel: {
  466 + uuid: undefined,
  467 + reason: undefined,
  468 + contactName: undefined,
  469 + contactTel: undefined,
  470 + content: '',
  471 + flightNo: undefined,
  472 + awba: undefined,
  473 + customCode: undefined,
  474 + flightDate: undefined,
  475 + awbh: ''
  476 + },
  477 + arriveDeleteRules: {
  478 + reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
  479 + contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
  480 + contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
  481 + },
383 } 482 }
384 }, 483 },
385 created() { 484 created() {
@@ -388,7 +487,6 @@ @@ -388,7 +487,6 @@
388 if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') { 487 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) 488 this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
390 } 489 }
391 -  
392 this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2) 490 this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
393 this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2) 491 this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
394 this.arriveQuery.flightdate = this.$route.params.flightData.flightdate 492 this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
@@ -397,7 +495,7 @@ @@ -397,7 +495,7 @@
397 this.getList() 495 this.getList()
398 } 496 }
399 let username = JSON.parse(sessionStorage.getItem('user')).username 497 let username = JSON.parse(sessionStorage.getItem('user')).username
400 - if(username === 'admin'){ 498 + if (username === 'admin') {
401 this.isAdmin = true 499 this.isAdmin = true
402 } 500 }
403 }, 501 },
@@ -466,7 +564,7 @@ @@ -466,7 +564,7 @@
466 getMt3201ListForParam(this.arriveQuery).then(res => { 564 getMt3201ListForParam(this.arriveQuery).then(res => {
467 this.arriveData = res.data.dataList 565 this.arriveData = res.data.dataList
468 this.total = res.data.count 566 this.total = res.data.count
469 - if (res.data.count > 0) { 567 + if (res.data.dataList.length > 0){
470 this.arriveQuery.carrier = this.arriveData[0].carrier 568 this.arriveQuery.carrier = this.arriveData[0].carrier
471 this.arriveQuery.flightno = this.arriveData[0].flightno 569 this.arriveQuery.flightno = this.arriveData[0].flightno
472 this.arriveQuery.flightdate = this.arriveData[0].flightdate 570 this.arriveQuery.flightdate = this.arriveData[0].flightdate
@@ -490,11 +588,11 @@ @@ -490,11 +588,11 @@
490 588
491 }, 589 },
492 handleSerach() { 590 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 591 + // this.arriveQuery.carrier = undefined
  592 + // this.arriveQuery.flightno = undefined
  593 + // this.arriveQuery.originstation = undefined
  594 + // this.arriveQuery.flightdate = undefined
  595 + // this.arriveQuery.destinationstation = undefined
498 this.getList() 596 this.getList()
499 }, 597 },
500 handleSelectionChange(val) { 598 handleSelectionChange(val) {
@@ -516,6 +614,24 @@ @@ -516,6 +614,24 @@
516 this.$refs.arriveFormData.clearValidate() 614 this.$refs.arriveFormData.clearValidate()
517 }) 615 })
518 }, 616 },
  617 + // 新增出港运抵分单
  618 + handleAddAwbh(row){
  619 + this.restModel()
  620 + // 给model赋值,所使用数据是以单独单号查询数据所得
  621 + this.arriveModel.carrier = row.carrier
  622 + this.arriveModel.awba = row.awba
  623 + this.arriveModel.flightdate = row.flightdate
  624 + this.arriveModel.flightno = row.flightno
  625 + this.arriveModel.originstation = row.originstation
  626 + this.arriveModel.destinationstation = row.destinationstation
  627 + this.arriveModel.customcode = row.customcode
  628 + this.dialogStatus = 'create'
  629 + this.fenStatus = 'addAwbh'
  630 + this.dialogFormVisible = true
  631 + this.$nextTick(() => {
  632 + this.$refs.arriveFormData.clearValidate()
  633 + })
  634 + },
519 createData() { 635 createData() {
520 this.$refs.arriveFormData.validate(valid => { 636 this.$refs.arriveFormData.validate(valid => {
521 if (valid) { 637 if (valid) {
@@ -553,6 +669,13 @@ @@ -553,6 +669,13 @@
553 // 编辑 669 // 编辑
554 handleEdit(row) { 670 handleEdit(row) {
555 this.arriveModel = Object.assign({}, row) // copy obj 671 this.arriveModel = Object.assign({}, row) // copy obj
  672 +
  673 + if (row.awbh === ''){
  674 + this.fenStatus = undefined
  675 + }else {
  676 + this.fenStatus = 'addAwbh'
  677 + }
  678 +
556 this.dialogStatus = 'update' 679 this.dialogStatus = 'update'
557 this.dialogFormVisible = true 680 this.dialogFormVisible = true
558 this.$nextTick(() => { 681 this.$nextTick(() => {
@@ -575,16 +698,83 @@ @@ -575,16 +698,83 @@
575 698
576 }) 699 })
577 }, 700 },
578 - //保存并发送  
579 - SaveAndSend() { 701 + // 发送舱单报
  702 + handleSendAwb(row) {
  703 + this.$confirm("是否发送", "确认消息", {
  704 + distinguishCancelAndClose: true,
  705 + confirmButtonText: '发送',
  706 + cancelButtonText: '取消'
  707 + }).then(() => {
  708 + if (row.awbh === null) {
  709 + row.awbh = ''
  710 + }
  711 + delete row.parent
  712 + delete row.children
  713 + sendCreateMt3201(row).then(res => {
  714 + if (res.data.count > 0) {
  715 + Message.success(res.data.respMessage)
  716 + this.getList()
  717 + } else {
  718 + Message.success(res.data.respMessage)
  719 + }
  720 + })
  721 + }).catch(error => {
  722 + Message.error(error.message)
  723 + })
  724 + },
  725 +
  726 + // 发送删除报
  727 + handleSendDelete(row) {
  728 + this.respModel = {
  729 + carrier: undefined,
  730 + reason: undefined,
  731 + contactName: undefined,
  732 + contactTel: undefined,
  733 + content: '',
  734 + flightNo: undefined,
  735 + awba: undefined,
  736 + customCode: undefined,
  737 + flightDate: undefined,
  738 + awbh: undefined
  739 + }
  740 + this.dialogDeleteVisible = true
  741 + this.respModel.flightNo = row.flightno
  742 + this.respModel.awba = row.awba
  743 + this.respModel.carrier = row.carrier
  744 + if (row.awbh === null) {
  745 + this.respModel.awbh = ''
  746 + } else {
  747 + this.respModel.awbh = row.awbh
  748 + }
  749 + this.respModel.customCode = row.customcode
  750 + this.respModel.flightDate = row.flightdate
  751 + this.$nextTick(() => {
  752 + this.$refs.arriveDeleteForm.clearValidate()
  753 + })
  754 + },
580 755
  756 + sendArriveDelete() {
  757 + this.$refs.arriveDeleteForm.validate(valid => {
  758 + if (valid) {
  759 + sendRemoveMt3201(this.respModel).then(res => {
  760 + if (res.data.count > 0) {
  761 + Message.success(res.data.respMessage)
  762 + this.dialogDeleteVisible = false
  763 + this.getList()
  764 + } else {
  765 + Message.error(res.data.respMessage)
  766 + }
  767 + })
  768 + }
  769 + })
581 }, 770 },
582 // 收发明细 771 // 收发明细
583 - handleSend(row) { 772 + handleSendDesc(row) {
584 const resQuery = { 773 const resQuery = {
585 carrier: row.carrier, 774 carrier: row.carrier,
586 flightNo: row.flightno, 775 flightNo: row.flightno,
587 flightDate: row.flightdate, 776 flightDate: row.flightdate,
  777 + opertype:row.opertype,
588 awba: row.awba, 778 awba: row.awba,
589 awbh: row.awbh, 779 awbh: row.awbh,
590 messageType: 'MT3201' 780 messageType: 'MT3201'
@@ -594,15 +784,7 @@ @@ -594,15 +784,7 @@
594 this.detailData = res.data 784 this.detailData = res.data
595 }) 785 })
596 }, 786 },
597 - // 发送舱单报  
598 - handleAwbSend() {  
599 -  
600 - },  
601 - // 发送修改报  
602 - handleAwbEdit() {  
603 -  
604 - },  
605 - //发送删除报 787 + //删除运单
606 handleAwbDelete(row) { 788 handleAwbDelete(row) {
607 this.$confirm("是否删除", "确认消息", { 789 this.$confirm("是否删除", "确认消息", {
608 distinguishCancelAndClose: true, 790 distinguishCancelAndClose: true,
@@ -634,25 +816,29 @@ @@ -634,25 +816,29 @@
634 }, 816 },
635 //更改状态 817 //更改状态
636 handleAwbStatus(row) { 818 handleAwbStatus(row) {
  819 +
637 this.$confirm("是否发送更改状态", "确认消息", { 820 this.$confirm("是否发送更改状态", "确认消息", {
638 distinguishCancelAndClose: true, 821 distinguishCancelAndClose: true,
639 confirmButtonText: '确认更改', 822 confirmButtonText: '确认更改',
640 cancelButtonText: '取消更改' 823 cancelButtonText: '取消更改'
641 }).then(() => { 824 }).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 - }) 825 + if (row.status!==22){
  826 + row.status =22;
  827 + }
  828 + // updateStatus(row).then(res => {
  829 + // if (res.data.count > 0) {
  830 + // this.$message({
  831 + // type: 'success',
  832 + // message: '当前运单状态已更改'
  833 + // })
  834 + // this.getList()
  835 + // } else {
  836 + // this.$message({
  837 + // type: 'error',
  838 + // message: '状态更改失败,请稍后重试'
  839 + // })
  840 + // }
  841 + // })
656 842
657 }).catch(action => { 843 }).catch(action => {
658 this.$message({ 844 this.$message({
@@ -663,6 +849,41 @@ @@ -663,6 +849,41 @@
663 }) 849 })
664 }) 850 })
665 }, 851 },
  852 + //获取机场三字码
  853 + remoteMethodAirport(query) {
  854 + this.airportCode = []
  855 + if (query !== '') {
  856 + this.listLoading = true
  857 + getAirportCode({airportid: query}).then(res => {
  858 + if (res !== null) {
  859 + setTimeout(() => {
  860 + this.listLoading = false
  861 + this.airportCode = res.data.data
  862 + }, 200)
  863 + }
  864 + })
  865 + } else {
  866 + this.airportCode = []
  867 + }
  868 + },
  869 + //关区代码
  870 + remoteMethodCustomCode(query) {
  871 + this.customCodeList = []
  872 + if (query !== '') {
  873 + this.customLoading = true
  874 + getCustomCode({customcode: query}).then(res => {
  875 + if (res !== null) {
  876 + setTimeout(() => {
  877 + this.customLoading = false
  878 + this.customCodeList = res.data.data
  879 + }, 200)
  880 + }
  881 + })
  882 + } else {
  883 + this.airportCode = []
  884 + }
  885 + },
  886 +
666 // 携数据跳转 新增运抵 887 // 携数据跳转 新增运抵
667 handleAddArrive() { 888 handleAddArrive() {
668 const row = { 889 const row = {
@@ -671,7 +892,8 @@ @@ -671,7 +892,8 @@
671 this.$router.push({name: "出港航班信息", params: {scopeRow: row}}) 892 this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
672 }, 893 },
673 handelBackStep() { 894 handelBackStep() {
674 - this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}}) 895 + this.arriveQuery.messageType = 'MT3201'
  896 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveQuery}})
675 } 897 }
676 898
677 } 899 }
1 <template> 1 <template>
2 <div class="app-content"> 2 <div class="app-content">
3 - <!--<div class="app-container">--> 3 + <!--<div class="app-container">-->
4 <div class="filter-container"> 4 <div class="filter-container">
5 <el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item" 5 <el-input v-model="listQuery.flightNo" clearable style="width: 270px;" class="filter-item"
6 placeholder="航班号"/> 6 placeholder="航班号"/>
@@ -10,33 +10,33 @@ @@ -10,33 +10,33 @@
10 <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button> 10 <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
11 </div> 11 </div>
12 <el-table :data="flightData" stripe style="font-size: 14px" border> 12 <el-table :data="flightData" stripe style="font-size: 14px" border>
13 - <el-table-column label="航班号" width="280px" align="center"> 13 + <el-table-column label="航班号" width="180px" align="center">
14 <template slot-scope="scope"> 14 <template slot-scope="scope">
15 <span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span> 15 <span>{{ scope.row.carrier }}{{ scope.row.flightNo }}</span>
16 </template> 16 </template>
17 </el-table-column> 17 </el-table-column>
18 - <el-table-column label="航班日期" width="280px" align="center"> 18 + <el-table-column label="航班日期" width="190px" align="center">
19 <template slot-scope="scope"> 19 <template slot-scope="scope">
20 <i class="el-icon-time"></i> 20 <i class="el-icon-time"></i>
21 <span>{{ scope.row.flightDate }}</span> 21 <span>{{ scope.row.flightDate }}</span>
22 </template> 22 </template>
23 </el-table-column> 23 </el-table-column>
24 - <el-table-column label="始发站" width="280px" align="center"> 24 + <el-table-column label="始发站" width="160px" align="center">
25 <template slot-scope="scope"> 25 <template slot-scope="scope">
26 <span>{{ scope.row.originstation }}</span> 26 <span>{{ scope.row.originstation }}</span>
27 </template> 27 </template>
28 </el-table-column> 28 </el-table-column>
29 - <el-table-column label="目的站" width="280px" align="center"> 29 + <el-table-column label="目的站" width="160px" align="center">
30 <template slot-scope="scope"> 30 <template slot-scope="scope">
31 <span>{{ scope.row.destinationstation }}</span> 31 <span>{{ scope.row.destinationstation }}</span>
32 </template> 32 </template>
33 </el-table-column> 33 </el-table-column>
34 - <el-table-column label="操作" align="center"> 34 + <el-table-column label="操作" width="400px" align="center" fixed="right">
35 <template slot-scope="scope"> 35 <template slot-scope="scope">
  36 + <el-button type="primary" size="mini" @click="handlePre(scope.row)">预配舱单</el-button>
  37 + <el-button type="primary" size="mini" @click="handleArrive(scope.row)">出港运抵</el-button>
36 <el-button type="primary" size="mini" @click="handleLoading(scope.row)">装载舱单</el-button> 38 <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> 39 <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> 40 </template>
41 </el-table-column> 41 </el-table-column>
42 </el-table> 42 </el-table>
@@ -48,6 +48,7 @@ @@ -48,6 +48,7 @@
48 <script> 48 <script>
49 import Pagination from '@/components/Pagination' 49 import Pagination from '@/components/Pagination'
50 import {getFlightListForParam} from '@/api/exitFlight' 50 import {getFlightListForParam} from '@/api/exitFlight'
  51 +
51 export default { 52 export default {
52 name: "ExitFlight", 53 name: "ExitFlight",
53 components: {Pagination}, 54 components: {Pagination},
@@ -58,18 +59,22 @@ @@ -58,18 +59,22 @@
58 listQuery: { 59 listQuery: {
59 pageSize: 1, 60 pageSize: 1,
60 limitSize: 10, 61 limitSize: 10,
61 - flightNo: undefined, 62 + flightNo: '',
62 flightDate: undefined 63 flightDate: undefined
63 }, 64 },
64 flightData: [], 65 flightData: [],
65 } 66 }
66 }, 67 },
67 - created(){  
68 - this.getList() 68 + created() {
  69 + this.getList()
69 }, 70 },
70 methods: { 71 methods: {
  72 + /*设置默认航班时间*/
  73 + getdatatime() {
  74 + this.listQuery.flightDate = new Date();
  75 + },
71 getList() { 76 getList() {
72 - getFlightListForParam(this.listQuery).then(res =>{ 77 + getFlightListForParam(this.listQuery).then(res => {
73 this.flightData = res.data.dataList 78 this.flightData = res.data.dataList
74 this.total = res.data.count 79 this.total = res.data.count
75 }) 80 })
@@ -79,26 +84,39 @@ @@ -79,26 +84,39 @@
79 }, 84 },
80 handleLoading(row) { 85 handleLoading(row) {
81 row.messageType = 'MT4201' 86 row.messageType = 'MT4201'
  87 + row.flightdate = row.flightDate
  88 + row.flightno = row.flightNo
82 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 89 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
83 }, 90 },
84 handleTidy(row) { 91 handleTidy(row) {
85 - row.messageType = 'MT5201' 92 + row.messageType = 'MT5202'
  93 + row.flightdate = row.flightDate
  94 + row.flightno = row.flightNo
86 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 95 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
87 }, 96 },
88 handleArrive(row) { 97 handleArrive(row) {
89 row.messageType = 'MT3201' 98 row.messageType = 'MT3201'
  99 + row.flightdate = row.flightDate
  100 + row.flightno = row.flightNo
90 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 101 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
91 }, 102 },
92 handlePre(row) { 103 handlePre(row) {
93 row.messageType = 'MT2201' 104 row.messageType = 'MT2201'
  105 + row.flightdate = row.flightDate
  106 + row.flightno = row.flightNo
94 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 107 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
95 } 108 }
  109 + },
  110 + // 页面加载完毕后触发的事件
  111 + mounted() {
  112 + var vm = this;
  113 + vm.getdatatime();
96 } 114 }
97 } 115 }
98 116
99 </script> 117 </script>
100 <style scoped> 118 <style scoped>
101 - .app-content{ 119 + .app-content {
102 margin-top: 20px; 120 margin-top: 20px;
103 } 121 }
104 </style> 122 </style>
@@ -12,12 +12,12 @@ @@ -12,12 +12,12 @@
12 </el-col> 12 </el-col>
13 </el-row> 13 </el-row>
14 <el-row type="flex" class="row-bg" justify="center"> 14 <el-row type="flex" class="row-bg" justify="center">
15 - <el-col :span="4"> 15 + <el-col :span="4" >
16 <el-input placeholder="必填" v-model="flightno"> 16 <el-input placeholder="必填" v-model="flightno">
17 <template slot="prepend">航班号</template> 17 <template slot="prepend">航班号</template>
18 </el-input> 18 </el-input>
19 </el-col> 19 </el-col>
20 - <el-col :span="4"> 20 + <el-col :span="4" style="margin-left: 20px">
21 <el-date-picker 21 <el-date-picker
22 v-model="flight.flightdate" 22 v-model="flight.flightdate"
23 type="date" 23 type="date"
@@ -25,21 +25,51 @@ @@ -25,21 +25,51 @@
25 placeholder="选择日期"> 25 placeholder="选择日期">
26 </el-date-picker> 26 </el-date-picker>
27 </el-col> 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> 28 + <el-col :span="4" style="margin-left: 55px">
  29 + <el-select
  30 + :remote-method="remoteMethodAirport"
  31 + :loading="listLoading"
  32 + v-model="originstation"
  33 + allow-create
  34 + default-first-option
  35 + filterable
  36 + remote
  37 + placeholder="请选择起始站" clearable>
  38 + <el-option
  39 + v-for="item in airportCode"
  40 + :key="item.airportid"
  41 + :label="item.airportid"
  42 + :value="item.airportid">
  43 + <span style="float: left">{{ item.airportdescchn }}</span>
  44 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  45 + </el-option>
  46 + </el-select>
37 </el-col> 47 </el-col>
38 <el-col :span="4" style="margin-left: 20px"> 48 <el-col :span="4" style="margin-left: 20px">
39 - <el-input placeholder="可为空" v-model="awba">  
40 - <template slot="prepend">主单号</template>  
41 - </el-input> 49 + <el-select
  50 + :remote-method="remoteMethodAirport"
  51 + :loading="listLoading"
  52 + v-model="destinationstation"
  53 + allow-create
  54 + default-first-option
  55 + filterable
  56 + remote
  57 + placeholder="请选择目的站" clearable>
  58 + <el-option
  59 + v-for="item in airportCode"
  60 + :key="item.airportid"
  61 + :label="item.airportid"
  62 + :value="item.airportid">
  63 + <span style="float: left">{{ item.airportdescchn }}</span>
  64 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  65 + </el-option>
  66 + </el-select>
42 </el-col> 67 </el-col>
  68 +<!-- <el-col :span="4" style="margin-left: 20px">-->
  69 +<!-- <el-input placeholder="可为空" v-model="awba">-->
  70 +<!-- <template slot="prepend">主单号</template>-->
  71 +<!-- </el-input>-->
  72 +<!-- </el-col>-->
43 </el-row> 73 </el-row>
44 <el-row> 74 <el-row>
45 <el-col :span="4" :offset="10"> 75 <el-col :span="4" :offset="10">
@@ -55,6 +85,7 @@ @@ -55,6 +85,7 @@
55 85
56 <script> 86 <script>
57 import {Message} from "element-ui"; 87 import {Message} from "element-ui";
  88 + import {getCountry, getAirportCode} from "@/api/country";
58 89
59 export default { 90 export default {
60 name: 'ExitFlightDesc', 91 name: 'ExitFlightDesc',
@@ -66,14 +97,18 @@ @@ -66,14 +97,18 @@
66 originstation: undefined, 97 originstation: undefined,
67 destinationstation: undefined, 98 destinationstation: undefined,
68 awba: undefined, 99 awba: undefined,
69 - messageType:undefined 100 + messageType: undefined
70 }, 101 },
71 - btnStatus: true 102 + btnStatus: true,
  103 + listLoading: false,
  104 + airportList: [],
  105 + airportResultCode: [],
  106 + airportCode: [],
72 }; 107 };
73 }, 108 },
74 created() { 109 created() {
75 if (this.$route.params.scopeRow !== undefined) { 110 if (this.$route.params.scopeRow !== undefined) {
76 - if(this.$route.params.scopeRow.carrier === undefined){ 111 + if (this.$route.params.scopeRow.carrier === undefined) {
77 this.flight.flightno = this.$route.params.scopeRow.flightno 112 this.flight.flightno = this.$route.params.scopeRow.flightno
78 } else { 113 } else {
79 this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno 114 this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno
@@ -82,61 +117,68 @@ @@ -82,61 +117,68 @@
82 this.flight.originstation = this.$route.params.scopeRow.originstation 117 this.flight.originstation = this.$route.params.scopeRow.originstation
83 this.flight.destinationstation = this.$route.params.scopeRow.destinationstation 118 this.flight.destinationstation = this.$route.params.scopeRow.destinationstation
84 this.flight.messageType = this.$route.params.scopeRow.messageType 119 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('-','') 120 + if (this.$route.params.scopeRow.awba !== undefined) {
  121 + this.flight.awba = this.$route.params.scopeRow.awba.replace('-', '')
87 } 122 }
88 -  
89 } 123 }
90 }, 124 },
91 - computed:{  
92 - flightno : { 125 + // mounted() {
  126 + // // 延迟加载,否则会出错
  127 + // setTimeout(() => {
  128 + // this.airportResultCode = this.airportCode.map(item =>{
  129 + // return {label: item.airportdescchn,value: item.airportid}
  130 + // })
  131 + // }, 6000)
  132 + // },
  133 + computed: {
  134 + flightno: {
93 get: function () { 135 get: function () {
94 return this.flight.flightno 136 return this.flight.flightno
95 }, 137 },
96 - set: function(val){ 138 + set: function (val) {
97 this.flight.flightno = val.toUpperCase().trim() 139 this.flight.flightno = val.toUpperCase().trim()
98 } 140 }
99 }, 141 },
100 - originstation :{ 142 + originstation: {
101 get: function () { 143 get: function () {
102 return this.flight.originstation 144 return this.flight.originstation
103 }, 145 },
104 - set: function(val){ 146 + set: function (val) {
105 this.flight.originstation = val.toUpperCase().trim() 147 this.flight.originstation = val.toUpperCase().trim()
106 } 148 }
107 }, 149 },
108 - destinationstation :{ 150 + destinationstation: {
109 get: function () { 151 get: function () {
110 return this.flight.destinationstation 152 return this.flight.destinationstation
111 }, 153 },
112 - set: function(val){ 154 + set: function (val) {
113 this.flight.destinationstation = val.toUpperCase().trim() 155 this.flight.destinationstation = val.toUpperCase().trim()
114 } 156 }
115 }, 157 },
116 - awba :{ 158 + awba: {
117 get: function () { 159 get: function () {
118 return this.flight.awba 160 return this.flight.awba
119 }, 161 },
120 - set: function(val){ 162 + set: function (val) {
121 this.flight.awba = val.trim() 163 this.flight.awba = val.trim()
122 } 164 }
123 } 165 }
124 }, 166 },
125 methods: { 167 methods: {
126 nstep() { 168 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){ 169 + if (this.flight.flightno !== undefined && this.flight.flightno !== '' &&
  170 + this.flight.flightdate !== undefined && this.flight.flightdate !== '' &&
  171 + this.flight.destinationstation !== undefined && this.flight.destinationstation !== '' &&
  172 + this.flight.originstation !== undefined && this.flight.originstation !== '') {
  173 + if (this.flight.awba !== '' && this.flight.awba !== undefined) {
132 const manifest = this.flight.awba; 174 const manifest = this.flight.awba;
133 const reg = /^[0-9]{11}$/ 175 const reg = /^[0-9]{11}$/
134 - if(!reg.test(manifest)){ 176 + if (!reg.test(manifest)) {
135 Message.error("主单号只支持数字并且最多11位") 177 Message.error("主单号只支持数字并且最多11位")
136 return 178 return
137 } 179 }
138 - const num = (manifest.substring(3,10)) % 7  
139 - if(num !== eval(manifest.substring(10))){ 180 + const num = (manifest.substring(3, 10)) % 7
  181 + if (num !== eval(manifest.substring(10))) {
140 Message.error("主单号不符合模7校验") 182 Message.error("主单号不符合模7校验")
141 return 183 return
142 } 184 }
@@ -144,22 +186,38 @@ @@ -144,22 +186,38 @@
144 this.flight.awba = undefined 186 this.flight.awba = undefined
145 } 187 }
146 188
147 - if(this.flight.messageType ==="MT5201"){ 189 + if (this.flight.messageType === "MT5202") {
148 this.$router.push({name: '出港理货', params: {flightData: this.flight}}); 190 this.$router.push({name: '出港理货', params: {flightData: this.flight}});
149 } 191 }
150 - if(this.flight.messageType ==="MT4201"){ 192 + if (this.flight.messageType === "MT4201") {
151 this.$router.push({name: '出港装载', params: {flightData: this.flight}}); 193 this.$router.push({name: '出港装载', params: {flightData: this.flight}});
152 } 194 }
153 - if(this.flight.messageType ==="MT3201"){  
154 - this.$router.push({name:'出港运抵',params:{flightData: this.flight}}) 195 + if (this.flight.messageType === "MT3201") {
  196 + this.$router.push({name: '出港运抵', params: {flightData: this.flight}})
155 } 197 }
156 - if(this.flight.messageType ==="MT2201"){  
157 - this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}}) 198 + if (this.flight.messageType === "MT2201") {
  199 + this.$router.push({name: '出港预配舱单', params: {flightData: this.flight}})
158 } 200 }
159 } else { 201 } else {
160 Message.warning("请将航班信息填写完整") 202 Message.warning("请将航班信息填写完整")
161 } 203 }
162 204
  205 + },
  206 + remoteMethodAirport(query) {
  207 + this.airportCode = []
  208 + if (query !== '') {
  209 + this.listLoading = true
  210 + getAirportCode({airportid: query}).then(res => {
  211 + if(res !== null){
  212 + setTimeout(() => {
  213 + this.listLoading = false
  214 + this.airportCode = res.data.data
  215 + }, 200)
  216 + }
  217 + })
  218 + } else {
  219 + this.airportCode = []
  220 + }
163 } 221 }
164 } 222 }
165 }; 223 };
@@ -173,7 +231,7 @@ @@ -173,7 +231,7 @@
173 margin: 0 auto; 231 margin: 0 auto;
174 height: 400px; 232 height: 400px;
175 } 233 }
176 - 234 + flight
177 p { 235 p {
178 font-size: 25px; 236 font-size: 25px;
179 font-weight: bold; 237 font-weight: bold;
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </div> 21 </div>
22 </el-col> 22 </el-col>
23 <el-col :span="24"> 23 <el-col :span="24">
24 - <div class="grid-content content">进港舱单查询</div> 24 + <div class="grid-content content">出港装载查询</div>
25 </el-col> 25 </el-col>
26 <el-col :span="24"> 26 <el-col :span="24">
27 <div class="grid-content co"> 27 <div class="grid-content co">
@@ -32,12 +32,12 @@ @@ -32,12 +32,12 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input> 35 + <el-input clearable v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input>
36 </div> 36 </div>
37 </el-col> 37 </el-col>
38 <div class="el-btn"> 38 <div class="el-btn">
39 <el-button type="primary" size="mini" @click="handleSearch">查询</el-button> 39 <el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
40 - <el-button v-if="loadingModel.flightno === undefined && loadingData.length <1" 40 + <el-button v-if="loadingQuery.flightno === undefined && loadingData.length <1"
41 type="primary" size="mini" @click="handleAddLoading">新增装载 41 type="primary" size="mini" @click="handleAddLoading">新增装载
42 </el-button> 42 </el-button>
43 </div> 43 </div>
@@ -49,9 +49,10 @@ @@ -49,9 +49,10 @@
49 <div class="grid-content content" style="margin-top: 6px">出港装载明细</div> 49 <div class="grid-content content" style="margin-top: 6px">出港装载明细</div>
50 </el-col> 50 </el-col>
51 </el-row> 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"> 52 + <el-table v-loading="listLoading" :data="loadingData" stripe style="font-size: 12px"
  53 + border @selection-change="handleSelectionChange">
  54 + <el-table-column type="selection" width="60"></el-table-column>
  55 + <el-table-column label="主单号" width="160" align="center">
55 <template slot-scope="scope"> 56 <template slot-scope="scope">
56 <span>{{scope.row.awba}}</span> 57 <span>{{scope.row.awba}}</span>
57 </template> 58 </template>
@@ -78,50 +79,69 @@ @@ -78,50 +79,69 @@
78 </el-table-column> 79 </el-table-column>
79 <el-table-column label="状态" width="100" align="center"> 80 <el-table-column label="状态" width="100" align="center">
80 <template slot-scope="scope"> 81 <template slot-scope="scope">
81 - <span v-if="scope.row.status ==='01'">未发送</span>  
82 - <span v-if="scope.row.status ==='02'">已发舱单报</span> 82 + <span v-if="scope.row.status ==='01'">接受申报</span>
  83 + <span v-if="scope.row.status ==='02'">待人工审核</span>
  84 + <span v-if="scope.row.status ==='03'">退单</span>
83 <span v-if="scope.row.status ==='05'">舱单报退单</span> 85 <span v-if="scope.row.status ==='05'">舱单报退单</span>
84 <span v-if="scope.row.status ==='06'">舱单转人工</span> 86 <span v-if="scope.row.status ==='06'">舱单转人工</span>
85 <span v-if="scope.row.status ==='07'">舱单报申报成功</span> 87 <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
86 <span v-if="scope.row.status ==='08'">已发舱单删除报</span> 88 <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
87 <span v-if="scope.row.status ==='09'">舱单删除报退单</span> 89 <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
88 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> 90 <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> 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>
92 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> 94 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
93 <span v-if="scope.row.status ==='15'">舱单修改报成功</span> 95 <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
94 <span v-if="scope.row.status ==='16'">海关已存在</span> 96 <span v-if="scope.row.status ==='16'">海关已存在</span>
  97 + <span v-if="scope.row.status ==='21'">可自动发送</span>
  98 + <span v-if="scope.row.status ==='22'">未发送</span>
  99 + <span v-if="scope.row.status ==='23'">已发送新增报</span>
  100 + <span v-if="scope.row.status ==='24'">已发送删除报</span>
  101 + <span v-if="scope.row.status ==='25'">已发送修改报</span>
95 </template> 102 </template>
96 </el-table-column> 103 </el-table-column>
97 - <el-table-column prop="receipt" label="回执信息" width="180" align="center"> 104 + <el-table-column label="回执信息" width="180" align="center">
98 <template slot-scope="scope"> 105 <template slot-scope="scope">
99 <span>{{scope.row.ext5}}</span> 106 <span>{{scope.row.ext5}}</span>
100 </template> 107 </template>
101 </el-table-column> 108 </el-table-column>
102 - <el-table-column prop="operation" label="操作" align="center"> 109 + <el-table-column label="操作" align="center" fixed="right">
103 <template slot-scope="scope"> 110 <template slot-scope="scope">
104 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> 111 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
105 - <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑主单 112 +
  113 + <el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑
106 </el-button> 114 </el-button>
  115 +
107 <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)" 116 <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
108 - :disabled="scope.row.status !=='00'">发送舱单报 117 + :disabled="scope.row.status ==='23'">发送出港装载报
  118 + </el-button>
  119 +
  120 + <br><br>
  121 + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单
109 </el-button> 122 </el-button>
110 - <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button> 123 +
111 <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" 124 <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
112 - :disabled="scope.row.status ==='00'">更改状态 125 + :disabled="scope.row.status ==='22'">更改状态
113 </el-button> 126 </el-button>
  127 +
  128 + <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
  129 + :disabled="scope.row.status ==='24'">发删除报
  130 + </el-button>
  131 +
114 </template> 132 </template>
115 </el-table-column> 133 </el-table-column>
116 - </tree-table> 134 + </el-table>
117 <div class="btnFoot"> 135 <div class="btnFoot">
118 <el-row> 136 <el-row>
119 <el-button type="primary" size="mini" 137 <el-button type="primary" size="mini"
120 - v-if="loadingModel.flightno !== undefined || loadingData.length >0" 138 + v-if="loadingQuery.flightno !== undefined || loadingData.length >0"
121 @click="handelAddLoadingInfo">新增出港装载 139 @click="handelAddLoadingInfo">新增出港装载
122 </el-button> 140 </el-button>
123 - <el-button type="primary" size="mini" v-if="loadingModel.flightno !== undefined || loadingData.length>0"  
124 - @click="handelBackStep">返回</el-button> 141 + <el-button type="primary" size="mini"
  142 + v-if="loadingQuery.flightno !== undefined || loadingData.length>0"
  143 + @click="handelBackStep">返回
  144 + </el-button>
125 </el-row> 145 </el-row>
126 </div> 146 </div>
127 <pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit" 147 <pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
@@ -136,7 +156,7 @@ @@ -136,7 +156,7 @@
136 <el-row> 156 <el-row>
137 <el-col :span="7.5"> 157 <el-col :span="7.5">
138 <el-form-item label="主单号" prop="awba"> 158 <el-form-item label="主单号" prop="awba">
139 - <el-input v-model="loadingModel.awba"></el-input> 159 + <el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input>
140 </el-form-item> 160 </el-form-item>
141 </el-col> 161 </el-col>
142 <el-col :span="7.5"> 162 <el-col :span="7.5">
@@ -155,13 +175,28 @@ @@ -155,13 +175,28 @@
155 175
156 <el-col :span="7.5"> 176 <el-col :span="7.5">
157 <el-form-item label="起始站" prop="originstation"> 177 <el-form-item label="起始站" prop="originstation">
158 - <el-input v-model="originstation"  
159 - :disabled="dialogStatus ==='update'"></el-input> 178 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  179 + allow-create v-model="originstation" remote :disabled="dialogStatus ==='update'">
  180 + <el-option v-for="item in airportCode"
  181 + :key="item.airportid" :label="item.airportid"
  182 + :value="item.airportid" :disabled="dialogStatus === 'update'">
  183 + <span style="float: left">{{ item.airportdescchn }}</span>
  184 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  185 + </el-option>
  186 + </el-select>
160 </el-form-item> 187 </el-form-item>
161 </el-col> 188 </el-col>
162 <el-col :span="7.5"> 189 <el-col :span="7.5">
163 - <el-form-item label="目的站" prop="flightno">  
164 - <el-input v-model="destinationstation" :disabled="dialogStatus ==='update'"></el-input> 190 + <el-form-item label="目的站" prop="destinationstation">
  191 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  192 + allow-create v-model="destinationstation" remote :disabled="dialogStatus ==='update'">
  193 + <el-option v-for="item in airportCode"
  194 + :key="item.airportid" :label="item.airportid"
  195 + :value="item.airportid" :disabled="dialogStatus === 'update'">
  196 + <span style="float: left">{{ item.airportdescchn }}</span>
  197 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  198 + </el-option>
  199 + </el-select>
165 </el-form-item> 200 </el-form-item>
166 </el-col> 201 </el-col>
167 <el-col :span="7.5"> 202 <el-col :span="7.5">
@@ -176,13 +211,13 @@ @@ -176,13 +211,13 @@
176 </div> 211 </div>
177 <el-row> 212 <el-row>
178 <el-col :span="7.5"> 213 <el-col :span="7.5">
179 - <el-form-item label="装载件数" prop="piece"> 214 + <el-form-item label="装载件数" prop="lodingpiece">
180 <el-input v-model.number="loadingModel.lodingpiece"></el-input> 215 <el-input v-model.number="loadingModel.lodingpiece"></el-input>
181 </el-form-item> 216 </el-form-item>
182 </el-col> 217 </el-col>
183 <el-col :span="7.5"> 218 <el-col :span="7.5">
184 - <el-form-item label="装载重量" prop="weight">  
185 - <el-input v-model.number="loadingModel.lodingweight"></el-input> 219 + <el-form-item label="装载重量" prop="lodingweight">
  220 + <el-input v-model="loadingModel.lodingweight"></el-input>
186 </el-form-item> 221 </el-form-item>
187 </el-col> 222 </el-col>
188 <el-col :span="7.5"> 223 <el-col :span="7.5">
@@ -195,27 +230,34 @@ @@ -195,27 +230,34 @@
195 </el-row> 230 </el-row>
196 <el-row> 231 <el-row>
197 <el-col :span="7.5"> 232 <el-col :span="7.5">
198 - <el-form-item label="运单件数" prop="price">  
199 - <el-input v-model="loadingModel.awbprice"></el-input> 233 + <el-form-item label="运单件数" prop="awbprice">
  234 + <el-input v-model.number="loadingModel.awbprice"></el-input>
200 </el-form-item> 235 </el-form-item>
201 </el-col> 236 </el-col>
202 <el-col :span="7.5"> 237 <el-col :span="7.5">
203 - <el-form-item label="运单重量" prop="weight"> 238 + <el-form-item label="运单重量" prop="awbweight">
204 <el-input v-model="loadingModel.awbweight"></el-input> 239 <el-input v-model="loadingModel.awbweight"></el-input>
205 </el-form-item> 240 </el-form-item>
206 </el-col> 241 </el-col>
207 <el-col :span="7.5"> 242 <el-col :span="7.5">
208 <el-form-item label="海关关区" prop="customcode"> 243 <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> 244 + <el-select v-model="loadingModel.customcode" placeholder="请选择关区代码"
  245 + filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
  246 + allow-create
  247 + default-first-option
  248 + >
  249 + <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
  250 + :value="item.customcode">
  251 + <span style="float: left">{{ item.customcode }}</span>
  252 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  253 + </el-option>
212 </el-select> 254 </el-select>
213 </el-form-item> 255 </el-form-item>
214 </el-col> 256 </el-col>
215 </el-row> 257 </el-row>
216 <el-row> 258 <el-row>
217 <el-col :span="7.5"> 259 <el-col :span="7.5">
218 - <el-form-item label="特货代码" prop="awbh"> 260 + <el-form-item label="特货代码" prop="specialgoods">
219 <el-input v-model="loadingModel.specialgoods"></el-input> 261 <el-input v-model="loadingModel.specialgoods"></el-input>
220 </el-form-item> 262 </el-form-item>
221 </el-col> 263 </el-col>
@@ -229,12 +271,11 @@ @@ -229,12 +271,11 @@
229 <div slot="footer" class="dialog-footer"> 271 <div slot="footer" class="dialog-footer">
230 <el-button @click="dialogFormVisible = false">取消</el-button> 272 <el-button @click="dialogFormVisible = false">取消</el-button>
231 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button> 273 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
232 - <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>  
233 </div> 274 </div>
234 </el-dialog> 275 </el-dialog>
235 <el-dialog title="收发明细" :visible.sync="dialogTableVisible"> 276 <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
236 <el-table :data="detailData" border> 277 <el-table :data="detailData" border>
237 - <el-table-column label="操作时间" width="150"> 278 + <el-table-column label="操作时间" width="180">
238 <template slot-scope="scope"> 279 <template slot-scope="scope">
239 {{scope.row.busdate}} 280 {{scope.row.busdate}}
240 </template> 281 </template>
@@ -264,6 +305,11 @@ @@ -264,6 +305,11 @@
264 {{scope.row.cusrestext}} 305 {{scope.row.cusrestext}}
265 </template> 306 </template>
266 </el-table-column> 307 </el-table-column>
  308 + <el-table-column label="操作类型" width="100">
  309 + <template slot-scope="scope">
  310 + {{scope.row.opertype}}
  311 + </template>
  312 + </el-table-column>
267 <el-table-column label="操作人" width="100"> 313 <el-table-column label="操作人" width="100">
268 <template slot-scope="scope"> 314 <template slot-scope="scope">
269 {{scope.row.operusername}} 315 {{scope.row.operusername}}
@@ -271,24 +317,55 @@ @@ -271,24 +317,55 @@
271 </el-table-column> 317 </el-table-column>
272 </el-table> 318 </el-table>
273 </el-dialog> 319 </el-dialog>
  320 + <el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
  321 + <el-form ref="loadingDeleteForm" :model="respModel" :rules="loadingDeleteRules"
  322 + label-width="120px" style="margin-right: 50px">
  323 + <el-form-item label="删除原因" prop="reason">
  324 + <el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
  325 + </el-form-item>
  326 + <el-form-item label="删除操作人" prop="contactName">
  327 + <el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
  328 + </el-form-item>
  329 + <el-form-item label="操作人Tel" prop="contactTel">
  330 + <el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
  331 + </el-form-item>
  332 + <el-form-item label="备注">
  333 + <el-input v-model="respModel.content" type="textarea"></el-input>
  334 + </el-form-item>
  335 + </el-form>
  336 + <div slot="footer" class="dialog-footer">
  337 + <el-button @click="dialogDeleteVisible = false">取消</el-button>
  338 + <el-button type="primary" @click="sendLoadingDelete()">发送</el-button>
  339 + </div>
  340 + </el-dialog>
274 </div> 341 </div>
275 </div> 342 </div>
276 </template> 343 </template>
277 <script> 344 <script>
278 - import treeTable from '@/components/TreeTable'  
279 - import treeToArray from '@/utils/customEval'  
280 import Pagination from '@/components/Pagination' 345 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" 346 + import {getCustomCode,getAirportCode} from "@/api/country";
  347 + import {
  348 + getMt4201ListForParam, deleteByIsDelete, updateStatus,
  349 + updateMT4201, addMt4201, sendCreateMt4201, sendDeleteMt4201, test
  350 + } from '@/api/exitLoading'
  351 + import {Message} from "element-ui"
  352 + import {
  353 + validAwb,
  354 + validAlphabets,
  355 + validAlphabetsAndNum,
  356 + validAlphabetsAndSpanceKey,
  357 + validatorNum,
  358 + validatorCustomsNum
  359 + } from "@/utils/validate"
  360 + import {getResponseForParam} from '@/api/responseDetail'
284 export default { 361 export default {
285 name: "ExitLoading", 362 name: "ExitLoading",
286 - components: {treeTable, Pagination}, 363 + components: { Pagination},
287 inject: ['reload'], 364 inject: ['reload'],
288 data() { 365 data() {
289 const validatorAwb = (rule, value, callback) => { 366 const validatorAwb = (rule, value, callback) => {
290 if (!validAwb(value)) { 367 if (!validAwb(value)) {
291 - callback("请正确书写主单号") 368 + callback("请正确书写主单号格式为xxx-xxxxxxxx")
292 } 369 }
293 callback() 370 callback()
294 } 371 }
@@ -304,8 +381,8 @@ @@ -304,8 +381,8 @@
304 } 381 }
305 callback() 382 callback()
306 } 383 }
307 - const validAlphabetsSpanceKey = (rule,value,callback) =>{  
308 - if(!validAlphabetsAndSpanceKey(value)){ 384 + const validAlphabetsSpanceKey = (rule, value, callback) => {
  385 + if (!validAlphabetsAndSpanceKey(value)) {
309 callback("只能输入字母、数字、空格") 386 callback("只能输入字母、数字、空格")
310 } 387 }
311 callback() 388 callback()
@@ -316,18 +393,26 @@ @@ -316,18 +393,26 @@
316 } 393 }
317 callback() 394 callback()
318 } 395 }
  396 + const validatorCustomsNums = (rule, value, callback) => {
  397 + if (!validatorCustomsNum(value)) {
  398 + callback(new Error("只能输入4位数字"))
  399 + }
  400 + callback()
  401 + }
319 return { 402 return {
320 - func: treeToArray,  
321 total: 1, 403 total: 1,
322 - isAdmin:false, 404 + isAdmin: false,
323 dialogMap: { 405 dialogMap: {
324 update: '编辑出港装载', 406 update: '编辑出港装载',
325 create: '添加出港装载', 407 create: '添加出港装载',
326 }, 408 },
327 - customcodeList: [4604, 4620], 409 + customCodeList: [],
  410 + airportCode:[],
328 dialogStatus: undefined, 411 dialogStatus: undefined,
329 dialogTableVisible: false, 412 dialogTableVisible: false,
330 dialogFormVisible: false, 413 dialogFormVisible: false,
  414 + dialogDeleteVisible: false,
  415 + customLoading: false,
331 listLoading: false, 416 listLoading: false,
332 loadingQuery: { 417 loadingQuery: {
333 pageSize: 1, 418 pageSize: 1,
@@ -338,7 +423,8 @@ @@ -338,7 +423,8 @@
338 flightdate: undefined, 423 flightdate: undefined,
339 originstation: undefined, 424 originstation: undefined,
340 destinationstation: undefined, 425 destinationstation: undefined,
341 - customcode: undefined 426 + customcode: undefined,
  427 + messageType: undefined
342 }, 428 },
343 loadingRoles: { 429 loadingRoles: {
344 awba: [{required: true, trigger: 'blur', validator: validatorAwb}], 430 awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
@@ -346,16 +432,21 @@ @@ -346,16 +432,21 @@
346 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}], 432 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
347 carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}], 433 carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
348 flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}], 434 flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
  435 + flightdate: [{required: true, trigger: 'blur'}],
  436 + loadingtime: [{required: true, trigger: 'blur'}],
349 originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}], 437 originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
350 destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}], 438 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:'不能为空'}] 439 + lodingpiece: [{type: 'number',required: true, trigger: 'change', message: '只能输入数字'}],
  440 + lodingweight: [{required: true, trigger: 'change', message: '只能输入数字,并且小数位最多两位',validator: validatorNums}],
  441 + customcode: [
  442 + {required: true, message: '关区号不能为空'},
  443 + {validator: validatorCustomsNums,trigger: 'change',message: '关区号为4位整数'}
  444 + ]
354 }, 445 },
355 loadingData: [], 446 loadingData: [],
356 detailData: [], 447 detailData: [],
357 loadingModel: { 448 loadingModel: {
358 - carrier:undefined, 449 + carrier: undefined,
359 flightno: undefined, 450 flightno: undefined,
360 flightdate: undefined, 451 flightdate: undefined,
361 originstation: undefined, 452 originstation: undefined,
@@ -369,8 +460,29 @@ @@ -369,8 +460,29 @@
369 loadingtime: undefined, 460 loadingtime: undefined,
370 messageType: 'MT4201', 461 messageType: 'MT4201',
371 awbprice: undefined, 462 awbprice: undefined,
372 - awbweight: undefined  
373 - } 463 + awbweight: undefined,
  464 + reason: undefined,
  465 + contactName: undefined,
  466 + contactTel: undefined,
  467 + content: undefined,
  468 + },
  469 + respModel: {
  470 + uuid: undefined,
  471 + reason: undefined,
  472 + contactName: undefined,
  473 + contactTel: undefined,
  474 + content: '',
  475 + flightNo: undefined,
  476 + awba: undefined,
  477 + customCode: undefined,
  478 + flightDate: undefined,
  479 + awbh: ''
  480 + },
  481 + loadingDeleteRules: {
  482 + reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
  483 + contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
  484 + contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
  485 + },
374 } 486 }
375 }, 487 },
376 created() { 488 created() {
@@ -387,7 +499,7 @@ @@ -387,7 +499,7 @@
387 this.getList() 499 this.getList()
388 } 500 }
389 let username = JSON.parse(sessionStorage.getItem('user')).username 501 let username = JSON.parse(sessionStorage.getItem('user')).username
390 - if(username === 'admin'){ 502 + if (username === 'admin') {
391 this.isAdmin = true 503 this.isAdmin = true
392 } 504 }
393 }, 505 },
@@ -469,19 +581,20 @@ @@ -469,19 +581,20 @@
469 }, 581 },
470 // 查询 582 // 查询
471 handleSearch() { 583 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 584 + // this.loadingQuery.carrier = undefined
  585 + // this.loadingQuery.flightno = undefined
  586 + // this.loadingQuery.originstation = undefined
  587 + // this.loadingQuery.flightdate = undefined
  588 + // this.loadingQuery.destinationstation = undefined
477 this.getList() 589 this.getList()
478 }, 590 },
479 // 收发明细 591 // 收发明细
480 - handleSend() { 592 + handleSend(row) {
481 const resQuery = { 593 const resQuery = {
482 carrier: row.carrier, 594 carrier: row.carrier,
483 flightNo: row.flightno, 595 flightNo: row.flightno,
484 flightDate: row.flightdate, 596 flightDate: row.flightdate,
  597 + opertype: row.opertype,
485 awba: row.awba, 598 awba: row.awba,
486 awbh: row.awbh, 599 awbh: row.awbh,
487 messageType: 'MT4201' 600 messageType: 'MT4201'
@@ -494,7 +607,6 @@ @@ -494,7 +607,6 @@
494 // 编辑 弹框 607 // 编辑 弹框
495 handleEdit(row) { 608 handleEdit(row) {
496 this.loadingModel = Object.assign({}, row) 609 this.loadingModel = Object.assign({}, row)
497 - console.log(this.loadingModel)  
498 this.dialogStatus = 'update' 610 this.dialogStatus = 'update'
499 this.dialogFormVisible = true 611 this.dialogFormVisible = true
500 this.$nextTick(() => { 612 this.$nextTick(() => {
@@ -519,10 +631,75 @@ @@ -519,10 +631,75 @@
519 }, 631 },
520 632
521 // 发送舱单报 633 // 发送舱单报
522 - handleSendAwb() { 634 + handleSendAwb(row) {
523 635
  636 + this.$confirm("是否发送", "确认消息", {
  637 + distinguishCancelAndClose: true,
  638 + confirmButtonText: '发送',
  639 + cancelButtonText: '取消'
  640 + }).then(() => {
  641 + if(row.awbh === null || row.awbh === undefined){
  642 + row.awbh = ''
  643 + }
  644 + sendCreateMt4201(row).then(res => {
  645 + if (res.data.count > 0) {
  646 + Message.success(res.data.respMessage)
  647 + this.getList()
  648 + }else {
  649 + Message.success(res.data.respMessage)
  650 + }
  651 + })
  652 + }).catch(error =>{
  653 + Message.error(error.message)
  654 + })
524 }, 655 },
525 - // 删除 发送删除报 656 +
  657 + // 发送删除报
  658 + handleSendDelete(row) {
  659 + this.respModel = {
  660 + carrier: undefined,
  661 + reason: undefined,
  662 + contactName: undefined,
  663 + contactTel: undefined,
  664 + content: '',
  665 + flightNo: undefined,
  666 + awba: undefined,
  667 + customCode: undefined,
  668 + flightDate: undefined,
  669 + awbh: ''
  670 + }
  671 + this.dialogDeleteVisible = true
  672 + this.respModel.carrier = row.carrier
  673 + this.respModel.flightNo = row.flightno
  674 + this.respModel.awba = row.awba
  675 + this.respModel.customCode = row.customcode
  676 + this.respModel.flightDate = row.flightdate
  677 + if(row.awbh ===null){
  678 + this.respModel.awbh = ''
  679 + }else {
  680 + this.respModel.awbh = row.awbh
  681 + }
  682 + this.$nextTick(() => {
  683 + this.$refs.loadingDeleteForm.clearValidate()
  684 + })
  685 + },
  686 +
  687 + sendLoadingDelete() {
  688 + this.$refs.loadingDeleteForm.validate(valid => {
  689 + if (valid) {
  690 + sendDeleteMt4201(this.respModel).then(res => {
  691 + if (res.data.count > 0) {
  692 + Message.success(res.data.respMessage)
  693 + this.dialogDeleteVisible = false
  694 + this.getList()
  695 + } else {
  696 + Message.success(res.data.respMessage)
  697 + }
  698 + })
  699 + }
  700 + })
  701 + },
  702 + // 删除
526 handleAwbDelete(row) { 703 handleAwbDelete(row) {
527 this.$confirm("是否删除", "确认消息", { 704 this.$confirm("是否删除", "确认消息", {
528 distinguishCancelAndClose: true, 705 distinguishCancelAndClose: true,
@@ -559,20 +736,23 @@ @@ -559,20 +736,23 @@
559 confirmButtonText: '确认更改', 736 confirmButtonText: '确认更改',
560 cancelButtonText: '取消更改' 737 cancelButtonText: '取消更改'
561 }).then(() => { 738 }).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 - }) 739 + if (row.status!==22){
  740 + row.status =22;
  741 + }
  742 + // updateStatus(row).then(res => {
  743 + // if (res.data.count > 0) {
  744 + // this.$message({
  745 + // type: 'success',
  746 + // message: '当前运单状态已更改'
  747 + // })
  748 + // this.getList()
  749 + // } else {
  750 + // this.$message({
  751 + // type: 'error',
  752 + // message: '状态更改失败,请稍后重试'
  753 + // })
  754 + // }
  755 + // })
576 756
577 }).catch(action => { 757 }).catch(action => {
578 this.$message({ 758 this.$message({
@@ -583,14 +763,10 @@ @@ -583,14 +763,10 @@
583 }) 763 })
584 }) 764 })
585 }, 765 },
586 - // 保存并发送  
587 - handleSaveAndSend() {  
588 -  
589 - },  
590 // 重置实体 766 // 重置实体
591 restModel() { 767 restModel() {
592 this.loadingModel = { 768 this.loadingModel = {
593 - carrier:undefined, 769 + carrier: undefined,
594 flightno: undefined, 770 flightno: undefined,
595 flightdate: undefined, 771 flightdate: undefined,
596 originstation: undefined, 772 originstation: undefined,
@@ -639,6 +815,40 @@ @@ -639,6 +815,40 @@
639 } 815 }
640 }) 816 })
641 }, 817 },
  818 + //获取机场三字码
  819 + remoteMethodAirport(query){
  820 + this.airportCode = []
  821 + if (query !== '') {
  822 + this.listLoading = true
  823 + getAirportCode({airportid: query}).then(res => {
  824 + if(res !== null){
  825 + setTimeout(() => {
  826 + this.listLoading = false
  827 + this.airportCode = res.data.data
  828 + }, 200)
  829 + }
  830 + })
  831 + } else {
  832 + this.airportCode = []
  833 + }
  834 + },
  835 + //关区代码
  836 + remoteMethodCustomCode(query){
  837 + this.customCodeList = []
  838 + if (query !== '') {
  839 + this.customLoading = true
  840 + getCustomCode({customcode: query}).then(res => {
  841 + if(res !== null){
  842 + setTimeout(() => {
  843 + this.customLoading = false
  844 + this.customCodeList = res.data.data
  845 + }, 200)
  846 + }
  847 + })
  848 + } else {
  849 + this.airportCode = []
  850 + }
  851 + },
642 handleAddLoading() { 852 handleAddLoading() {
643 const row = { 853 const row = {
644 'messageType': 'MT4201' 854 'messageType': 'MT4201'
@@ -646,7 +856,8 @@ @@ -646,7 +856,8 @@
646 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 856 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
647 }, 857 },
648 handelBackStep() { 858 handelBackStep() {
649 - this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}}) 859 + this.loadingQuery.messageType = 'MT4201'
  860 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingQuery}})
650 } 861 }
651 } 862 }
652 } 863 }
@@ -212,6 +212,7 @@ @@ -212,6 +212,7 @@
212 212
213 }, 213 },
214 handleUpdate(row){ 214 handleUpdate(row){
  215 + console.log(row.messageType )
215 if(row.messageType === 'MT2201'){ 216 if(row.messageType === 'MT2201'){
216 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 217 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
217 } 218 }
@@ -221,7 +222,7 @@ @@ -221,7 +222,7 @@
221 if(row.messageType === 'MT4201'){ 222 if(row.messageType === 'MT4201'){
222 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 223 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
223 } 224 }
224 - if(row.messageType === 'MT5201'){ 225 + if(row.messageType === 'MT5202'){
225 this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 226 this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
226 } 227 }
227 }, 228 },
@@ -13,9 +13,9 @@ @@ -13,9 +13,9 @@
13 </el-col> 13 </el-col>
14 <el-col :span="20"> 14 <el-col :span="20">
15 <div class="grid-content"> 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> 16 + <span class="titleSpan">航班号:{{this.preQuery.carrier}}{{this.preQuery.flightno}}</span>
  17 + <span class="titleSpan">航班日期:{{this.preQuery.flightdate}}</span>
  18 + <span class="titleSpan">航段:{{this.preQuery.originstation}}-{{this.preQuery.destinationstation}}</span>
19 </div> 19 </div>
20 </el-col> 20 </el-col>
21 </div> 21 </div>
@@ -32,12 +32,12 @@ @@ -32,12 +32,12 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input v-model="listQuery.awba" placeholder="请输入主单号" clearable></el-input> 35 + <el-input v-model="preQuery.awba" placeholder="请输入主单号" clearable></el-input>
36 </div> 36 </div>
37 </el-col> 37 </el-col>
38 <div class="grid-content el-btn"> 38 <div class="grid-content el-btn">
39 <el-button type="primary" size="mini" @click="handleSerach">查询</el-button> 39 <el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
40 - <el-button v-if="preModel.flightno === undefined && preData.length<1" type="primary" 40 + <el-button v-if="preQuery.flightno === undefined && preData.length<1" type="primary"
41 size="mini" 41 size="mini"
42 @click="handleAddpre">新增预配舱单 42 @click="handleAddpre">新增预配舱单
43 </el-button> 43 </el-button>
@@ -52,29 +52,35 @@ @@ -52,29 +52,35 @@
52 </el-row> 52 </el-row>
53 </div> 53 </div>
54 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> 55 + <el-table :data="preData" stripe style="font-size: 12px" stripe
  56 + @selection-change="handleSelectionChange" v-loading="listLoading"
  57 + default-expand-all
  58 + row-key="uuid"
  59 + border
  60 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
  61 + <el-table-column type="selection" width="55">
63 </el-table-column> 62 </el-table-column>
64 - <el-table-column label="运单号" width="120" align="center"> 63 +<!-- <el-table-column label="航班信息" width="90" align="center">-->
  64 +<!-- <template slot-scope="scope">-->
  65 +<!-- <p class="tableInline">{{scope.row.carrier}}{{scope.row.flightno}}</p>-->
  66 +<!-- <p class="tableInline">{{scope.row.flightdate}}</p>-->
  67 +<!-- <p class="tableInline">{{scope.row.originstation}}-{{scope.row.destinationstation}}</p>-->
  68 +<!-- </template>-->
  69 +<!-- </el-table-column>-->
  70 + <el-table-column label="运单号" width="200" align="center">
65 <template slot-scope="scope"> 71 <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> 72 + <span class="tableInline" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</span>
  73 + <span class="tableInline" v-else>{{scope.row.awba}}</span>
68 </template> 74 </template>
69 </el-table-column> 75 </el-table-column>
70 <el-table-column label="运单件数/重量" width="100" align="center"> 76 <el-table-column label="运单件数/重量" width="100" align="center">
71 <template slot-scope="scope"> 77 <template slot-scope="scope">
72 - {{scope.row.piece}} 78 + {{scope.row.awbinfo.pcs}}/{{scope.row.awbinfo.weight}}
73 </template> 79 </template>
74 </el-table-column> 80 </el-table-column>
75 <el-table-column label="预配件数/重量" width="100" align="center"> 81 <el-table-column label="预配件数/重量" width="100" align="center">
76 <template slot-scope="scope"> 82 <template slot-scope="scope">
77 - {{scope.row.weight}} 83 + {{scope.row.piece}}/{{scope.row.weight}}
78 </template> 84 </template>
79 </el-table-column> 85 </el-table-column>
80 <el-table-column label="货物描述" width="120" align="center"> 86 <el-table-column label="货物描述" width="120" align="center">
@@ -87,67 +93,75 @@ @@ -87,67 +93,75 @@
87 {{scope.row.actime}} 93 {{scope.row.actime}}
88 </template> 94 </template>
89 </el-table-column> 95 </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> 96 + <!--<el-table-column label="代理人代码" width="120" align="center">-->
  97 + <!--<template slot-scope="scope">-->
  98 + <!--{{scope.row.status}}-->
  99 + <!--</template>-->
  100 + <!--</el-table-column>-->
95 <el-table-column label="状态" width="100" align="center"> 101 <el-table-column label="状态" width="100" align="center">
96 <template slot-scope="scope"> 102 <template slot-scope="scope">
97 - <span v-if="scope.row.status ==='01'">未发送</span>  
98 - <span v-if="scope.row.status ==='02'">已发舱单报</span> 103 + <span v-if="scope.row.status ==='01'">接受申报</span>
  104 + <span v-if="scope.row.status ==='02'">待人工审核</span>
  105 + <span v-if="scope.row.status ==='03'">退单</span>
99 <span v-if="scope.row.status ==='05'">舱单报退单</span> 106 <span v-if="scope.row.status ==='05'">舱单报退单</span>
100 <span v-if="scope.row.status ==='06'">舱单转人工</span> 107 <span v-if="scope.row.status ==='06'">舱单转人工</span>
101 <span v-if="scope.row.status ==='07'">舱单报申报成功</span> 108 <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
102 <span v-if="scope.row.status ==='08'">已发舱单删除报</span> 109 <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
103 <span v-if="scope.row.status ==='09'">舱单删除报退单</span> 110 <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
104 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> 111 <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> 112 + <span v-if="scope.row.status ==='11'">放行</span>
  113 + <span v-if="scope.row.status ==='12'">拒装</span>
  114 + <span v-if="scope.row.status ==='13'">禁卸</span>
108 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> 115 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
109 <span v-if="scope.row.status ==='15'">舱单修改报成功</span> 116 <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
110 <span v-if="scope.row.status ==='16'">海关已存在</span> 117 <span v-if="scope.row.status ==='16'">海关已存在</span>
  118 + <span v-if="scope.row.status ==='21'">可自动发送</span>
  119 + <span v-if="scope.row.status ==='22'">未发送</span>
  120 + <span v-if="scope.row.status ==='23'">已发送新增报</span>
  121 + <span v-if="scope.row.status ==='24'">已发送删除报</span>
  122 + <span v-if="scope.row.status ==='25'">已发送修改报</span>
111 </template> 123 </template>
112 </el-table-column> 124 </el-table-column>
113 <el-table-column prop="receipt" label="回执信息" align="center"> 125 <el-table-column prop="receipt" label="回执信息" align="center">
114 <template slot-scope="scope"> 126 <template slot-scope="scope">
115 {{scope.row.ext5}} 127 {{scope.row.ext5}}
116 - <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>  
117 </template> 128 </template>
118 </el-table-column> 129 </el-table-column>
119 - <el-table-column label="操作" width="300"> 130 + <el-table-column label="操作" width="450" fixed="right">
120 <template slot-scope="scope"> 131 <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" 132 + <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
  133 + <el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑</el-button>
  134 + <el-button size="mini" type="success" v-if="scope.row.awbh ===''"
123 @click="handleAddAwbh(scope.row)">新增分单 135 @click="handleAddAwbh(scope.row)">新增分单
124 </el-button> 136 </el-button>
125 <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" 137 <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
126 - :disabled="scope.row.status !== '01'">发舱单报 138 + :disabled="addStatus(scope.row.status)">发送预配舱单报
127 </el-button> 139 </el-button>
128 <p></p> 140 <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> 141 + <el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)"
  142 + :disabled="editStatus(scope.row.status)">发送预配修改报</el-button>
  143 +<!-- <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)" 144 <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)"
133 - :disabled="scope.row.status === '01'">更改状态 145 + :disabled="scope.row.status === '22'">更改状态
134 </el-button> 146 </el-button>
  147 + <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
  148 + :disabled="deleteStatus(scope.row.status)">发送预配删除报</el-button>
135 </template> 149 </template>
136 </el-table-column> 150 </el-table-column>
137 - </tree-table> 151 + </el-table>
138 <div class="btnFoot"> 152 <div class="btnFoot">
139 <el-row> 153 <el-row>
140 - <el-button type="primary" size="mini" v-if="preData.flightno !== undefined || preData.length> 0" 154 + <el-button type="primary" size="mini" v-if="preQuery.flightno !== undefined | preData.length > 0"
141 @click="handleAddpreInfo">新增预配舱单 155 @click="handleAddpreInfo">新增预配舱单
142 </el-button> 156 </el-button>
143 <el-button type="primary" size="mini" @click="handelBackStep" 157 <el-button type="primary" size="mini" @click="handelBackStep"
144 - v-if="preModel.flightno !== undefined || preData.length >0">返回 158 + v-if="preQuery.flightno !== undefined || preData.length >0">返回
145 </el-button> 159 </el-button>
146 </el-row> 160 </el-row>
147 </div> 161 </div>
148 - <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize" 162 + <pagination v-show="total>0" :total="total" :page.sync="preQuery.pageSize" :limit.sync="preQuery.limitSize"
149 @pagination="getList"/> 163 @pagination="getList"/>
150 - <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%"> 164 + <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="85%">
151 <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right" 165 <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
152 label-width="120px" class="el-dialog-div"> 166 label-width="120px" class="el-dialog-div">
153 <div class="grid-content content"> 167 <div class="grid-content content">
@@ -159,7 +173,7 @@ @@ -159,7 +173,7 @@
159 <el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/> 173 <el-input :disabled="dialogStatus !== 'create'" v-model="awba" clearable/>
160 </el-form-item> 174 </el-form-item>
161 </el-col> 175 </el-col>
162 - <el-col :span="7.5" v-if="dialogStatus === 'addAwbh'"> 176 + <el-col :span="7.5" v-if="fenStatus === 'addAwbh'">
163 <el-form-item label="分单号" prop="awbh"> 177 <el-form-item label="分单号" prop="awbh">
164 <el-input v-model="awbh" clearable/> 178 <el-input v-model="awbh" clearable/>
165 </el-form-item> 179 </el-form-item>
@@ -171,17 +185,17 @@ @@ -171,17 +185,17 @@
171 <el-row> 185 <el-row>
172 <el-col :span="7.5"> 186 <el-col :span="7.5">
173 <el-form-item label="承运人" prop="carrier"> 187 <el-form-item label="承运人" prop="carrier">
174 - <el-input v-model="carrier" :disabled="dialogStatus === 'addAwbh'" clearable/> 188 + <el-input v-model="carrier" :disabled="fenStatus === 'addAwbh'" clearable/>
175 </el-form-item> 189 </el-form-item>
176 </el-col> 190 </el-col>
177 <el-col :span="7.5"> 191 <el-col :span="7.5">
178 <el-form-item label="航班号" prop="flightno"> 192 <el-form-item label="航班号" prop="flightno">
179 - <el-input v-model="flightno" :disabled="dialogStatus === 'addAwbh'" clearable/> 193 + <el-input v-model="flightno" :disabled="fenStatus === 'addAwbh'" clearable/>
180 </el-form-item> 194 </el-form-item>
181 </el-col> 195 </el-col>
182 <el-col :span="7.5"> 196 <el-col :span="7.5">
183 <el-form-item label="航班日期" prop="flightdate"> 197 <el-form-item label="航班日期" prop="flightdate">
184 - <el-date-picker :disabled="dialogStatus === 'addAwbh'" 198 + <el-date-picker :disabled="fenStatus === 'addAwbh'"
185 value-format="yyyy-MM-dd" 199 value-format="yyyy-MM-dd"
186 v-model="preModel.flightdate" align="right" 200 v-model="preModel.flightdate" align="right"
187 type="date" placeholder="请输入航班日期" clearable/> 201 type="date" placeholder="请输入航班日期" clearable/>
@@ -192,12 +206,34 @@ @@ -192,12 +206,34 @@
192 <el-row> 206 <el-row>
193 <el-col :span="7.5"> 207 <el-col :span="7.5">
194 <el-form-item label="起始站" prop="originstation"> 208 <el-form-item label="起始站" prop="originstation">
195 - <el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/> 209 + <el-select
  210 + filterable
  211 + clearable
  212 + placeholder="请选择起始站"
  213 + :remote-method="remoteMethodAirport"
  214 + allow-create remote
  215 + v-model="originstation"
  216 + :loading="airportLoading">
  217 + <el-option v-for="item in airportCode"
  218 + :key="item.airportid" :label="item.airportid"
  219 + :value="item.airportid" :disabled="fenStatus === 'addAwbh'">
  220 + <span style="float: left">{{ item.airportdescchn }}</span>
  221 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  222 + </el-option>
  223 + </el-select>
196 </el-form-item> 224 </el-form-item>
197 </el-col> 225 </el-col>
198 <el-col :span="7.5"> 226 <el-col :span="7.5">
199 <el-form-item label="目的站" prop="destinationstation"> 227 <el-form-item label="目的站" prop="destinationstation">
200 - <el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/> 228 + <el-select filterable clearable placeholder="请选择目的站" allow-create remote
  229 + v-model="destinationstation" :remote-method="remoteMethodAirport">
  230 + <el-option v-for="item in airportCode"
  231 + :key="item.airportid" :label="item.airportid"
  232 + :value="item.airportid" :disabled="fenStatus === 'addAwbh'" >
  233 + <span style="float: left">{{ item.airportdescchn }}</span>
  234 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  235 + </el-option>
  236 + </el-select>
201 </el-form-item> 237 </el-form-item>
202 </el-col> 238 </el-col>
203 </el-row> 239 </el-row>
@@ -264,13 +300,13 @@ @@ -264,13 +300,13 @@
264 </el-col> 300 </el-col>
265 </el-row> 301 </el-row>
266 <el-row> 302 <el-row>
267 - <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'"> 303 + <el-col :span="7.5" v-if="fenStatus !=='addAwbh'">
268 <el-form-item label="预配件数" prop="piece"> 304 <el-form-item label="预配件数" prop="piece">
269 <el-input v-model="preModel.piece" clearable/> 305 <el-input v-model="preModel.piece" clearable/>
270 </el-form-item> 306 </el-form-item>
271 </el-col> 307 </el-col>
272 - <el-col :span="8" v-if="dialogStatus ==='addAwbh'">  
273 - <el-col :span="13"> 308 + <el-col :span="8" v-if="fenStatus ==='addAwbh'">
  309 + <el-col :span="14">
274 <el-form-item label="预配件数" prop="piece"> 310 <el-form-item label="预配件数" prop="piece">
275 <el-input v-model="preModel.piece" clearable/> 311 <el-input v-model="preModel.piece" clearable/>
276 </el-form-item> 312 </el-form-item>
@@ -279,13 +315,14 @@ @@ -279,13 +315,14 @@
279 <span>剩余件数:{{awbPiece}}</span> 315 <span>剩余件数:{{awbPiece}}</span>
280 </el-col> 316 </el-col>
281 </el-col> 317 </el-col>
282 - <el-col :span="7.5" v-if="dialogStatus !=='addAwbh'"> 318 +
  319 + <el-col :span="7.5" v-if="fenStatus !=='addAwbh'">
283 <el-form-item label="预配重量" prop="weight"> 320 <el-form-item label="预配重量" prop="weight">
284 <el-input v-model="preModel.weight" clearable/> 321 <el-input v-model="preModel.weight" clearable/>
285 </el-form-item> 322 </el-form-item>
286 </el-col> 323 </el-col>
287 - <el-col :span="8" v-if="dialogStatus ==='addAwbh'">  
288 - <el-col :span="13"> 324 + <el-col :span="8" v-if="fenStatus ==='addAwbh'">
  325 + <el-col :span="14">
289 <el-form-item label="预配重量" prop="weight"> 326 <el-form-item label="预配重量" prop="weight">
290 <el-input v-model="preModel.weight" clearable/> 327 <el-input v-model="preModel.weight" clearable/>
291 </el-form-item> 328 </el-form-item>
@@ -306,24 +343,28 @@ @@ -306,24 +343,28 @@
306 <el-row> 343 <el-row>
307 <el-col :span="7.5"> 344 <el-col :span="7.5">
308 <el-form-item label="关区代码" prop="customcode"> 345 <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> 346 + <el-select v-model="preModel.customcode" placeholder="请选择关区代码"
  347 + filterable clearable :remote-method="remoteMethodCustomCode" :loading="customLoading" remote
  348 + :disabled="fenStatus === 'addAwbh'">
  349 + <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
  350 + :value="item.customcode">
  351 + <span style="float: left">{{ item.customcode }}</span>
  352 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  353 + </el-option>
313 </el-select> 354 </el-select>
314 </el-form-item> 355 </el-form-item>
315 </el-col> 356 </el-col>
316 <el-col :span="7.5"> 357 <el-col :span="7.5">
317 <el-form-item label="海关状态"> 358 <el-form-item label="海关状态">
318 - <el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型"> 359 + <el-select v-model="preModel.awbinfo.awbtype" class="filter-item" placeholder="请录入货物类型">
319 <el-option v-for="item in customTypes" :key="item.value" :label="item.label" 360 <el-option v-for="item in customTypes" :key="item.value" :label="item.label"
320 :value="item.value"/> 361 :value="item.value"/>
321 </el-select> 362 </el-select>
322 </el-form-item> 363 </el-form-item>
323 </el-col> 364 </el-col>
324 <el-col :span="7.5"> 365 <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="付费方式"> 366 + <el-form-item label="付费方式" prop="awbinfo.paymodel">
  367 + <el-select v-model="preModel.awbinfo.paymodel" class="filter-item" placeholder="付费方式">
327 <el-option 368 <el-option
328 v-for="item in payTypes" 369 v-for="item in payTypes"
329 :key="item.value" 370 :key="item.value"
@@ -399,8 +440,9 @@ @@ -399,8 +440,9 @@
399 :loading="listLoading" 440 :loading="listLoading"
400 v-model="shprcountyr" 441 v-model="shprcountyr"
401 filterable 442 filterable
  443 + allow-create
402 remote 444 remote
403 - placeholder="请选择" clearable> 445 + placeholder="请选择" clearable>目的站
404 <el-option 446 <el-option
405 v-for="item in countryOption" 447 v-for="item in countryOption"
406 :key="item.value" 448 :key="item.value"
@@ -477,6 +519,7 @@ @@ -477,6 +519,7 @@
477 :listLoading="listLoading" 519 :listLoading="listLoading"
478 v-model="cnscountyr" 520 v-model="cnscountyr"
479 filterable 521 filterable
  522 + allow-create
480 remote 523 remote
481 placeholder="请选择" clearable> 524 placeholder="请选择" clearable>
482 <el-option 525 <el-option
@@ -520,16 +563,40 @@ @@ -520,16 +563,40 @@
520 <!--</el-form-item>--> 563 <!--</el-form-item>-->
521 <!--</el-col>--> 564 <!--</el-col>-->
522 </el-row> 565 </el-row>
  566 + <div v-if="dialogStatus === 'sendUpdate'">
  567 + <div class="grid-content content">
  568 + 运单信息
  569 + </div>
  570 + <el-row>
  571 + <el-col :span="7.5">
  572 + <el-form-item label="修改原因" prop="reason">
  573 + <el-input v-model="preModel.reason" clearable/>
  574 + </el-form-item>
  575 + </el-col>
  576 + <el-col :span="7.5">
  577 + <el-form-item label="修改人" prop="contactName">
  578 + <el-input v-model="preModel.contactName" clearable/>
  579 + </el-form-item>
  580 + </el-col>
  581 + <el-col :span="7.5">
  582 + <el-form-item label="修改人Tel" prop="contactTel">
  583 + <el-input v-model="preModel.contactTel" clearable maxlength="5"/>
  584 + </el-form-item>
  585 + </el-col>
  586 + </el-row>
  587 + </div>
  588 +
523 </el-form> 589 </el-form>
524 <div slot="footer" class="dialog-footer"> 590 <div slot="footer" class="dialog-footer">
525 <el-button @click="dialogFormVisible = false">取消</el-button> 591 <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> 592 + <el-button type="primary" v-show="dialogStatus!=='sendUpdate'"
  593 + @click="dialogStatus ==='create'? createData():updateData()">保存</el-button>
  594 + <el-button type="primary" v-show="dialogStatus==='sendUpdate'" @click="sendUpdate()">发送</el-button>
528 </div> 595 </div>
529 </el-dialog> 596 </el-dialog>
530 <el-dialog title="收发明细" :visible.sync="dialogTableVisible"> 597 <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
531 <el-table :data="detailData" border> 598 <el-table :data="detailData" border>
532 - <el-table-column label="操作时间" width="150"> 599 + <el-table-column label="操作时间" width="180">
533 <template slot-scope="scope"> 600 <template slot-scope="scope">
534 {{scope.row.busdate}} 601 {{scope.row.busdate}}
535 </template> 602 </template>
@@ -559,6 +626,11 @@ @@ -559,6 +626,11 @@
559 {{scope.row.cusrestext}} 626 {{scope.row.cusrestext}}
560 </template> 627 </template>
561 </el-table-column> 628 </el-table-column>
  629 + <el-table-column label="操作类型" width="100">
  630 + <template slot-scope="scope">
  631 + {{scope.row.opertype}}
  632 + </template>
  633 + </el-table-column>
562 <el-table-column label="操作人" width="100"> 634 <el-table-column label="操作人" width="100">
563 <template slot-scope="scope"> 635 <template slot-scope="scope">
564 {{scope.row.operusername}} 636 {{scope.row.operusername}}
@@ -566,15 +638,45 @@ @@ -566,15 +638,45 @@
566 </el-table-column> 638 </el-table-column>
567 </el-table> 639 </el-table>
568 </el-dialog> 640 </el-dialog>
  641 + <el-dialog title="删除原因" :visible.sync="dialogDeleteVisble" width="30%">
  642 + <el-form ref="sendDeleteForm" :model="respModel" :rules="sendDeleteRules" label-width="120px"
  643 + style="margin-right:50px;">
  644 + <el-form-item label="删除原因" prop="reason">
  645 + <el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
  646 + </el-form-item>
  647 + <el-form-item label="删除操作人" prop="contactName">
  648 + <el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
  649 + </el-form-item>
  650 + <el-form-item label="操作人Tel" prop="contactTel">
  651 + <el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
  652 + </el-form-item>
  653 + <el-form-item label="备注">
  654 + <el-input v-model="respModel.content" type="textarea"></el-input>
  655 + </el-form-item>
  656 + </el-form>
  657 + <div slot="footer" class="dialog-footer">
  658 + <el-button @click="dialogDeleteVisble = false">取消</el-button>
  659 + <el-button type="primary" @click="sendDelete()">发送</el-button>
  660 + </div>
  661 + </el-dialog>
569 </div> 662 </div>
570 </template> 663 </template>
571 <script> 664 <script>
572 import treeTable from '@/components/TreeTable' 665 import treeTable from '@/components/TreeTable'
573 import treeToArray from '@/utils/customEval' 666 import treeToArray from '@/utils/customEval'
574 import Pagination from '@/components/Pagination' 667 import Pagination from '@/components/Pagination'
575 -  
576 - import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";  
577 - import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre' 668 + import util from '@/common/js/util'
  669 + import {getCountry, getByCountryCode, getByCountryCodeForName,getCustomCode,getAirportCode} from "@/api/country";
  670 + import {
  671 + getMt2201ListForParam,
  672 + deleteByIsDelete,
  673 + updateStatus,
  674 + updateMT2201,
  675 + addMt2201,
  676 + sendCreateMt2201,
  677 + sendDeleteMt2201,
  678 + sendUpdateMt2201
  679 + } from '@/api/exitPre'
578 import {Message} from "element-ui"; 680 import {Message} from "element-ui";
579 import {getResponseForParam} from '@/api/responseDetail' 681 import {getResponseForParam} from '@/api/responseDetail'
580 import { 682 import {
@@ -623,16 +725,17 @@ @@ -623,16 +725,17 @@
623 return { 725 return {
624 func: treeToArray, 726 func: treeToArray,
625 total: 1, 727 total: 1,
626 - isAdmin:false,  
627 - listQuery: { 728 + isAdmin: false,
  729 + preQuery: {
628 pageSize: 1, 730 pageSize: 1,
629 limitSize: 100, 731 limitSize: 100,
630 awba: undefined, 732 awba: undefined,
631 carrier: undefined, 733 carrier: undefined,
632 - flightNo: undefined,  
633 - flightDate: undefined,  
634 - originStation: undefined,  
635 - destinationStation: undefined 734 + flightno: undefined,
  735 + flightdate: undefined,
  736 + originstation: undefined,
  737 + destinationstation: undefined,
  738 + messageType: undefined
636 }, 739 },
637 dialogMap: { 740 dialogMap: {
638 update: '编辑预配舱单', 741 update: '编辑预配舱单',
@@ -647,10 +750,15 @@ @@ -647,10 +750,15 @@
647 {label: '快件', value: '005'}], 750 {label: '快件', value: '005'}],
648 payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}], 751 payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
649 splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}], 752 splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
650 - customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}], 753 + customCodeList: [],
  754 + airportCode:[],
651 dialogStatus: undefined, 755 dialogStatus: undefined,
  756 + fenStatus:undefined,
652 dialogTableVisible: false, 757 dialogTableVisible: false,
  758 + dialogDeleteVisble: false,
653 listLoading: false, 759 listLoading: false,
  760 + customLoading:false,
  761 + airportLoading:false,
654 disabledStatus: false, 762 disabledStatus: false,
655 dialogFormVisible: false, 763 dialogFormVisible: false,
656 countryOption: [], 764 countryOption: [],
@@ -670,9 +778,12 @@ @@ -670,9 +778,12 @@
670 customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}], 778 customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
671 awba: [{required: true, trigger: 'blur', validator: validatorAwb}], 779 awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
672 awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}], 780 awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
673 - 'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}], 781 + 'awbinfo.paymodel': [{required: true, message: '付款方式必选', trigger: 'change'}],
674 goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}], 782 goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
675 ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}], 783 ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}],
  784 + reason:[{required: true, message: '修改原因不能为空', trigger: 'blur'}],
  785 + contactName:[{required: true, message: '修改操作人不能为空', trigger: 'blur'}],
  786 + contactTel:[{required: true, message: '修改操作人联系方式不能为空', trigger: 'blur'}],
676 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}], 787 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
677 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}], 788 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
678 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}], 789 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
@@ -686,6 +797,7 @@ @@ -686,6 +797,7 @@
686 'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}], 797 'awbinfo.pcs': [{required: true, trigger: 'change', validator: validatorNums}],
687 }, 798 },
688 preModel: { 799 preModel: {
  800 + uuid: undefined,
689 awba: undefined, 801 awba: undefined,
690 awbh: undefined, 802 awbh: undefined,
691 customcode: undefined, 803 customcode: undefined,
@@ -703,6 +815,9 @@ @@ -703,6 +815,9 @@
703 uldNo: undefined, 815 uldNo: undefined,
704 status: undefined, 816 status: undefined,
705 ex5: undefined, 817 ex5: undefined,
  818 + reason: undefined,
  819 + contactName: undefined,
  820 + contactTel: undefined,
706 awbinfo: { 821 awbinfo: {
707 pcs: undefined, 822 pcs: undefined,
708 weight: undefined, 823 weight: undefined,
@@ -731,7 +846,7 @@ @@ -731,7 +846,7 @@
731 cargonm: undefined, 846 cargonm: undefined,
732 sairportid: undefined, 847 sairportid: undefined,
733 dest1city: undefined, 848 dest1city: undefined,
734 - by1: undefined, 849 + by1: '',
735 dest1: undefined, 850 dest1: undefined,
736 by2: undefined, 851 by2: undefined,
737 dest2: undefined, 852 dest2: undefined,
@@ -739,12 +854,30 @@ @@ -739,12 +854,30 @@
739 dest3: undefined, 854 dest3: undefined,
740 eairportid: undefined, 855 eairportid: undefined,
741 csgcustomerid: undefined, 856 csgcustomerid: undefined,
742 - collected: '0', 857 + paymodel: '0',
743 awbtype: undefined 858 awbtype: undefined
744 } 859 }
745 }, 860 },
  861 + respModel: {
  862 + uuid: undefined,
  863 + reason: undefined,
  864 + contactName: undefined,
  865 + contactTel: undefined,
  866 + content: '',
  867 + flightNo: undefined,
  868 + awba: undefined,
  869 + customCode: undefined,
  870 + flightDate: undefined,
  871 + awbh: ''
  872 + },
  873 + sendDeleteRules:{
  874 + reason:[{required:true,message:'删除原因不能为空',trigger:'blur'}],
  875 + contactName:[{required:true,message:'删除操作人不能为空',trigger:'blur'}],
  876 + contactTel:[{required:true,message:'操作人联系方式不能为空',trigger:'blur'}]
  877 + },
746 preData: [], 878 preData: [],
747 - detailData: [] 879 + detailData: [],
  880 + rows:[]
748 } 881 }
749 }, 882 },
750 mounted() { 883 mounted() {
@@ -757,20 +890,24 @@ @@ -757,20 +890,24 @@
757 }, 890 },
758 created() { 891 created() {
759 if (this.$route.params.flightData !== undefined) { 892 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 893 + this.preQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
  894 + this.preQuery.flightno = this.$route.params.flightData.flightno.substring(2)
  895 + this.preQuery.flightdate = this.$route.params.flightData.flightdate
  896 + this.preQuery.originstation = this.$route.params.flightData.originstation
  897 + this.preQuery.destinationstation = this.$route.params.flightData.destinationstation
  898 + if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
  899 + this.preQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
  900 + }
766 this.getList() 901 this.getList()
767 } 902 }
768 this.getCountryList() 903 this.getCountryList()
769 let username = JSON.parse(sessionStorage.getItem('user')).username 904 let username = JSON.parse(sessionStorage.getItem('user')).username
770 - if(username === 'admin'){ 905 + if (username === 'admin') {
771 this.isAdmin = true 906 this.isAdmin = true
772 } 907 }
773 }, 908 },
  909 +
  910 + // 验证
774 computed: { 911 computed: {
775 awba: { 912 awba: {
776 get: function () { 913 get: function () {
@@ -930,10 +1067,10 @@ @@ -930,10 +1067,10 @@
930 }, 1067 },
931 by1: { 1068 by1: {
932 get: function () { 1069 get: function () {
933 - return this.preModel.awbinfo.by1 1070 + return util.checkNull(this.preModel.awbinfo.by1)?this.preModel.awbinfo.by1:''
934 }, 1071 },
935 set: function (val) { 1072 set: function (val) {
936 - this.preModel.awbinfo.by1 = val.toUpperCase().trim() 1073 + this.preModel.awbinfo.by1 = util.checkNull(val)?val.toUpperCase().trim():''
937 } 1074 }
938 }, 1075 },
939 dest1: { 1076 dest1: {
@@ -981,24 +1118,26 @@ @@ -981,24 +1118,26 @@
981 // >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<< 1118 // >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
982 getList() { 1119 getList() {
983 this.listLoading = true 1120 this.listLoading = true
984 - if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {  
985 - getMt2201ListForParam(this.listQuery).then(res => { 1121 + if (this.preQuery.awba !== undefined && this.preQuery.awba !== '') {
  1122 + getMt2201ListForParam(this.preQuery).then(res => {
986 this.preData = res.data.dataList 1123 this.preData = res.data.dataList
987 this.total = res.data.count 1124 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 1125 + console.log("主单号不为空时打印")
  1126 + console.log(res.data)
  1127 + if (res.data.dataList.length > 0) {
  1128 + this.preQuery.carrier = this.preData[0].carrier
  1129 + this.preQuery.flightno = this.preData[0].flightno
  1130 + this.preQuery.flightdate = this.preData[0].flightdate
  1131 + this.preQuery.originstation = this.preData[0].originstation
  1132 + this.preQuery.destinationstation = this.preData[0].destinationstation
  1133 + this.preQuery.customcode = this.preData[0].customcode
995 } 1134 }
996 setTimeout(() => { 1135 setTimeout(() => {
997 this.listLoading = false 1136 this.listLoading = false
998 }, 1500) 1137 }, 1500)
999 }) 1138 })
1000 } else { 1139 } else {
1001 - getMt2201ListForParam(this.listQuery).then(res => { 1140 + getMt2201ListForParam(this.preQuery).then(res => {
1002 this.preData = res.data.dataList 1141 this.preData = res.data.dataList
1003 this.total = res.data.count 1142 this.total = res.data.count
1004 setTimeout(() => { 1143 setTimeout(() => {
@@ -1006,7 +1145,6 @@ @@ -1006,7 +1145,6 @@
1006 }, 1500) 1145 }, 1500)
1007 }) 1146 })
1008 } 1147 }
1009 -  
1010 }, 1148 },
1011 // >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<< 1149 // >>>>>>>>>>>>>>>>重置实体<<<<<<<<<<<<<<<<<<
1012 restModel() { 1150 restModel() {
@@ -1065,19 +1203,19 @@ @@ -1065,19 +1203,19 @@
1065 dest3: undefined, 1203 dest3: undefined,
1066 eairportid: undefined, 1204 eairportid: undefined,
1067 csgcustomerid: undefined, 1205 csgcustomerid: undefined,
1068 - collected: '0', 1206 + paymodel: '0',
1069 } 1207 }
1070 } 1208 }
1071 }, 1209 },
1072 // >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<< 1210 // >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
1073 handleAddpreInfo() { 1211 handleAddpreInfo() {
1074 this.restModel() 1212 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 1213 + this.preModel.carrier = this.preQuery.carrier
  1214 + this.preModel.flightno = this.preQuery.flightno
  1215 + this.preModel.flightdate = this.preQuery.flightdate
  1216 + this.preModel.originstation = this.preQuery.originstation
  1217 + this.preModel.destinationstation = this.preQuery.destinationstation
  1218 + this.preModel.customcode = this.preQuery.customcode
1081 this.dialogStatus = 'create' 1219 this.dialogStatus = 'create'
1082 this.dialogFormVisible = true 1220 this.dialogFormVisible = true
1083 this.$nextTick(() => { 1221 this.$nextTick(() => {
@@ -1105,19 +1243,20 @@ @@ -1105,19 +1243,20 @@
1105 }, 1243 },
1106 // >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<< 1244 // >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
1107 handleSerach() { 1245 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 1246 + // this.preQuery.flightno = undefined
  1247 + // this.preQuery.carrier = undefined
  1248 + // this.preQuery.originstation = undefined
  1249 + // this.preQuery.flightdate = undefined
  1250 + // this.preQuery.destinationstation = undefined
1113 this.getList() 1251 this.getList()
1114 }, 1252 },
1115 // >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<< 1253 // >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
1116 handleSend(row) { 1254 handleSend(row) {
1117 const resQuery = { 1255 const resQuery = {
1118 carrier: row.carrier, 1256 carrier: row.carrier,
1119 - flightNo: row.flightno,  
1120 - flightDate: row.flightdate, 1257 + flightno: row.flightno,
  1258 + flightdate: row.flightdate,
  1259 + orpertype: row.orpertype,
1121 awba: row.awba, 1260 awba: row.awba,
1122 awbh: row.awbh, 1261 awbh: row.awbh,
1123 messageType: 'MT2201' 1262 messageType: 'MT2201'
@@ -1128,13 +1267,46 @@ @@ -1128,13 +1267,46 @@
1128 }) 1267 })
1129 }, 1268 },
1130 // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<< 1269 // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
1131 - handleAwbSend() {  
1132 - 1270 + handleAwbSend(row) {
  1271 + delete row.parent
  1272 + delete row.children
  1273 + this.rows = row;
  1274 + this.$confirm("是否发送", "确认消息", {
  1275 + distinguishCancelAndClose: true,
  1276 + confirmButtonText: '发送',
  1277 + cancelButtonText: '取消'
  1278 + }).then(() => {
  1279 + if (row.awbh === null) {
  1280 + row.awbh = ''
  1281 + }
  1282 + sendCreateMt2201(row).then(res => {
  1283 + if (res.data.count > 0) {
  1284 + Message.success(res.data.respMessage)
  1285 + this.rows.status="23";
  1286 + this.rows.ext5="新增报发送成功";
  1287 + } else {
  1288 + Message.error(res.data.respMessage)
  1289 + }
  1290 + })
  1291 + })
  1292 + },
  1293 + // 发送舱单报 按钮自灰
  1294 + addStatus(status){
  1295 + if(status=='23' || status=='24'||status=='25'){
  1296 + return true;
  1297 + }else if(status=='22' ) {
  1298 + return false;
  1299 + }
1133 }, 1300 },
1134 // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<< 1301 // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
1135 handleEdit(row) { 1302 handleEdit(row) {
  1303 + console.log(row)
1136 this.preModel = Object.assign({}, row) 1304 this.preModel = Object.assign({}, row)
1137 this.dialogStatus = 'update' 1305 this.dialogStatus = 'update'
  1306 + if (row.awbh !== undefined && row.awbh !== ""){
  1307 + this.fenStatus = 'addAwbh'
  1308 + }
  1309 +
1138 this.dialogFormVisible = true 1310 this.dialogFormVisible = true
1139 this.$nextTick(() => { 1311 this.$nextTick(() => {
1140 this.$refs.preFormData.clearValidate() 1312 this.$refs.preFormData.clearValidate()
@@ -1158,14 +1330,116 @@ @@ -1158,14 +1330,116 @@
1158 }) 1330 })
1159 }, 1331 },
1160 // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<< 1332 // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
1161 - handleAwbEdit() {  
1162 - 1333 + handleAwbEdit(row) {
  1334 + delete row.parent
  1335 + delete row.children
  1336 + this.rows = row;
  1337 + this.preModel = Object.assign({}, row)
  1338 + this.dialogStatus = 'sendUpdate'
  1339 + this.dialogFormVisible = true
  1340 + this.$nextTick(() => {
  1341 + this.$refs.preFormData.clearValidate()
  1342 + })
  1343 + },
  1344 + // 发送修改报自灰
  1345 + editStatus(status){
  1346 + if(status=='23' || status=='24'||status=='25'){
  1347 + return true;
  1348 + }else if(status=='25' ) {
  1349 + return false;
  1350 + }
1163 }, 1351 },
1164 - // >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<  
1165 - handleSaveAndSend() { 1352 + sendUpdate(){
  1353 + this.respModel.reason = this.preModel.reason
  1354 + this.respModel.contactName = this.preModel.contactName
  1355 + this.respModel.contactTel = this.preModel.contactTel
  1356 + //
  1357 + delete this.preModel._expanded
  1358 + delete this.preModel._level
  1359 + delete this.preModel._marginLeft
  1360 + delete this.preModel._show
  1361 + delete this.preModel._width
  1362 +
  1363 + const reason = this.preModel.reason
  1364 + const contactName = this.preModel.contactName
  1365 + const contactTel = this.preModel.contactTel
1166 1366
  1367 + this.$refs.preFormData.validate(valid =>{
  1368 + if(valid){
  1369 + delete this.preModel.reason
  1370 + delete this.preModel.contactName
  1371 + delete this.preModel.contactTel
  1372 + const map = {
  1373 + 'mt2201': this.preModel,
  1374 + 'reason' : reason,
  1375 + 'contactName': contactName,
  1376 + 'contactTel': contactTel,
  1377 + }
  1378 + sendUpdateMt2201(map).then(res =>{
  1379 + if(res.data.count >0){
  1380 + Message.success(res.data.respMessage)
  1381 + this.rows.status="25";
  1382 + this.rows.ext5="修改报发送成功";
  1383 + this.dialogFormVisible = false
  1384 + }else {
  1385 + Message.error(res.data.respMessage)
  1386 + }
  1387 + })
  1388 + }
  1389 + })
1167 }, 1390 },
  1391 +
1168 // >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<< 1392 // >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
  1393 + handleSendDelete(row) {
  1394 + this.respModel = {
  1395 + carrier: undefined,
  1396 + reason: undefined,
  1397 + contactName: undefined,
  1398 + contactTel: undefined,
  1399 + content: '',
  1400 + flightNo: undefined,
  1401 + awba: undefined,
  1402 + customCode: undefined,
  1403 + flightDate: undefined,
  1404 + awbh: ''
  1405 + }
  1406 + this.rows = row;
  1407 + this.dialogDeleteVisble = true
  1408 + this.respModel.awba = row.awba
  1409 + this.respModel.flightNo = row.flightno
  1410 + this.respModel.customCode = row.customcode
  1411 + this.respModel.awbh = row.awbh
  1412 + this.respModel.flightDate = row.flightdate
  1413 + this.respModel.carrier = row.carrier
  1414 + this.$nextTick(()=>{
  1415 + this.$refs.sendDeleteForm.clearValidate()
  1416 + })
  1417 + },
  1418 + // 发送删除报按钮自灰
  1419 + deleteStatus(status){
  1420 + if(status=='23' || status=='24'||status=='25'){
  1421 + return true;
  1422 + }else if(status=='24' ) {
  1423 + return false;
  1424 + }
  1425 + },
  1426 + sendDelete() {
  1427 + this.$refs.sendDeleteForm.validate(valid =>{
  1428 + if(valid){
  1429 + sendDeleteMt2201(this.respModel).then(res => {
  1430 + if(res.data.count>0){
  1431 + Message.success(res.data.respMessage)
  1432 + this.dialogDeleteVisble = false
  1433 + this.rows.status="24";
  1434 + this.rows.ext5="删除报发送成功";
  1435 + }else {
  1436 + Message.error(res.data.respMessage)
  1437 + }
  1438 + })
  1439 + }
  1440 + })
  1441 + },
  1442 + //>>>>>>>>>>>>>>>>删除运单<<<<<<<<<<<<<<<<<<
1169 handleAwbDelete(row) { 1443 handleAwbDelete(row) {
1170 delete row.parent 1444 delete row.parent
1171 delete row.children 1445 delete row.children
@@ -1199,27 +1473,28 @@ @@ -1199,27 +1473,28 @@
1199 }, 1473 },
1200 // >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<< 1474 // >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
1201 handleAwbStatus(row) { 1475 handleAwbStatus(row) {
1202 - delete row.parent  
1203 - delete row.children  
1204 this.$confirm("是否发送更改状态", "确认消息", { 1476 this.$confirm("是否发送更改状态", "确认消息", {
1205 distinguishCancelAndClose: true, 1477 distinguishCancelAndClose: true,
1206 confirmButtonText: '确认更改', 1478 confirmButtonText: '确认更改',
1207 cancelButtonText: '取消更改' 1479 cancelButtonText: '取消更改'
1208 }).then(() => { 1480 }).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 - }) 1481 + if (row.status!==22){
  1482 + row.status =22;
  1483 + }
  1484 + // updateStatus(row).then(res => {
  1485 + // if (res.data.count > 0) {
  1486 + // this.$message({
  1487 + // type: 'success',
  1488 + // message: '当前运单状态已更改'
  1489 + // })
  1490 + // this.getList()
  1491 + // } else {
  1492 + // this.$message({
  1493 + // type: 'error',
  1494 + // message: '状态更改失败,请稍后重试'
  1495 + // })
  1496 + // }
  1497 + // })
1223 1498
1224 }).catch(action => { 1499 }).catch(action => {
1225 this.$message({ 1500 this.$message({
@@ -1234,6 +1509,7 @@ @@ -1234,6 +1509,7 @@
1234 handleAddAwbh(row) { 1509 handleAddAwbh(row) {
1235 this.restModel() 1510 this.restModel()
1236 const template = Object.assign({}, row) // copy obj 1511 const template = Object.assign({}, row) // copy obj
  1512 + this.preModel.uuid = template.uuid
1237 this.preModel.awba = template.awba 1513 this.preModel.awba = template.awba
1238 this.preModel.flightdate = template.flightdate 1514 this.preModel.flightdate = template.flightdate
1239 this.preModel.flightno = template.flightno 1515 this.preModel.flightno = template.flightno
@@ -1242,18 +1518,18 @@ @@ -1242,18 +1518,18 @@
1242 this.preModel.carrier = template.carrier 1518 this.preModel.carrier = template.carrier
1243 this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr 1519 this.preModel.awbinfo.shprcountyr = template.awbinfo.shprcountyr
1244 this.preModel.originstation = template.originstation 1520 this.preModel.originstation = template.originstation
1245 - this.preModel.awbinfo.collected = template.awbinfo.collected 1521 + this.preModel.awbinfo.paymodel = template.awbinfo.paymodel
1246 this.preModel.awbinfo.sairportid = template.awbinfo.sairportid 1522 this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
1247 this.preModel.awbinfo.eairportid = template.awbinfo.eairportid 1523 this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
1248 this.preModel.awbinfo.ex5 = template.awbinfo.ex5 1524 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 => { 1525 + this.preQuery.awba = template.awba
  1526 + this.preQuery.flightdate = template.flightdate
  1527 + this.preQuery.flightno = template.flightno
  1528 + this.preQuery.originstation = template.originstation
  1529 + this.preQuery.destinationstation = template.destinationstation
  1530 + this.preQuery.customcode = template.customcode
  1531 + this.preQuery.carrier = template.carrier
  1532 + getMt2201ListForParam(this.preQuery).then(res => {
1257 this.awbPiece = 0 1533 this.awbPiece = 0
1258 this.awbWeight = 0 1534 this.awbWeight = 0
1259 let residuePiece = 0 1535 let residuePiece = 0
@@ -1271,14 +1547,14 @@ @@ -1271,14 +1547,14 @@
1271 this.awbWeight = res.data.dataList[0].weight - residueWeight 1547 this.awbWeight = res.data.dataList[0].weight - residueWeight
1272 } 1548 }
1273 }) 1549 })
1274 - this.dialogStatus = 'addAwbh' 1550 + this.dialogStatus = 'create'
  1551 + this.fenStatus = 'addAwbh'
1275 this.dialogFormVisible = true 1552 this.dialogFormVisible = true
1276 this.$nextTick(() => { 1553 this.$nextTick(() => {
1277 this.$refs.preFormData.clearValidate() 1554 this.$refs.preFormData.clearValidate()
1278 }) 1555 })
1279 }, 1556 },
1280 -  
1281 - //获取城市列表 1557 + //获取国家列表
1282 getCountryList() { 1558 getCountryList() {
1283 getCountry().then(res => { 1559 getCountry().then(res => {
1284 this.countryList = res.data.dataList 1560 this.countryList = res.data.dataList
@@ -1294,22 +1570,44 @@ @@ -1294,22 +1570,44 @@
1294 .indexOf(query.toUpperCase()) > -1 1570 .indexOf(query.toUpperCase()) > -1
1295 }) 1571 })
1296 }, 200) 1572 }, 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 { 1573 } else {
1308 this.countryOption = [] 1574 this.countryOption = []
1309 } 1575 }
  1576 + },
  1577 + remoteMethodAirport(query){
  1578 + this.airportCode = []
  1579 + if (query !== '') {
  1580 + this.airportLoading = true
  1581 + getAirportCode({airportid: query}).then(res => {
  1582 + if(res !== null){
  1583 + setTimeout(() => {
  1584 + this.airportLoading = false
  1585 + this.airportCode = res.data.data
  1586 + }, 200)
  1587 + }
  1588 + })
  1589 + } else {
  1590 + this.airportCode = []
  1591 + }
  1592 + },
1310 1593
1311 - 1594 + remoteMethodCustomCode(query){
  1595 + this.customCodeList = []
  1596 + if (query !== '') {
  1597 + this.customLoading = true
  1598 + getCustomCode({customcode: query}).then(res => {
  1599 + if(res !== null){
  1600 + setTimeout(() => {
  1601 + this.customLoading = false
  1602 + this.customCodeList = res.data.data
  1603 + }, 200)
  1604 + }
  1605 + })
  1606 + } else {
  1607 + this.airportCode = []
  1608 + }
1312 }, 1609 },
  1610 +
1313 handleAddpre() { 1611 handleAddpre() {
1314 const row = { 1612 const row = {
1315 'messageType': 'MT2201' 1613 'messageType': 'MT2201'
@@ -1318,7 +1616,8 @@ @@ -1318,7 +1616,8 @@
1318 }, 1616 },
1319 1617
1320 handelBackStep() { 1618 handelBackStep() {
1321 - this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}}) 1619 + this.preQuery.messageType = 'MT2201'
  1620 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
1322 } 1621 }
1323 } 1622 }
1324 } 1623 }
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </div> 21 </div>
22 </el-col> 22 </el-col>
23 <el-col :span="24"> 23 <el-col :span="24">
24 - <div class="grid-content content">进港舱单查询</div> 24 + <div class="grid-content content">出港理货查询</div>
25 </el-col> 25 </el-col>
26 <el-col :span="24"> 26 <el-col :span="24">
27 <div class="grid-content co"> 27 <div class="grid-content co">
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input v-model="tidyQuery.awba" placeholder="请输入主单号"></el-input> 35 + <el-input v-model="tidyQuery.awba" placeholder="请输入主单号" clearable></el-input>
36 </div> 36 </div>
37 </el-col> 37 </el-col>
38 <div class="grid-content el-btn"> 38 <div class="grid-content el-btn">
@@ -51,23 +51,30 @@ @@ -51,23 +51,30 @@
51 </el-col> 51 </el-col>
52 </el-row> 52 </el-row>
53 </div> 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"> 54 + <el-table v-loading="listLoading" :data="tidyData" stripe
  55 + highlight-current-row
  56 + default-expand-all
  57 + row-key="uuid"
  58 + border
  59 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
  60 + style="font-size: 12px" @selection-change="handleSelectionChange">
  61 + <el-table-column type="selection" width="55">
  62 + </el-table-column>
  63 + <el-table-column label="运单号" width="150" align="center">
57 <template slot-scope="scope"> 64 <template slot-scope="scope">
58 <span>{{scope.row.awba}}</span> 65 <span>{{scope.row.awba}}</span>
59 </template> 66 </template>
60 </el-table-column> 67 </el-table-column>
61 - <el-table-column label="单号" width="120" align="center"> 68 + <el-table-column label="单号" width="120" align="center">
62 <template slot-scope="scope"> 69 <template slot-scope="scope">
63 <span>{{scope.row.awbh}}</span> 70 <span>{{scope.row.awbh}}</span>
64 </template> 71 </template>
65 </el-table-column> 72 </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> 73 +<!-- <el-table-column label="运单件数/重量" width="100" align="center">-->
  74 +<!-- <template slot-scope="scope">-->
  75 +<!-- <span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>-->
  76 +<!-- </template>-->
  77 +<!-- </el-table-column>-->
71 <el-table-column label="理货件数/重量" width="100" align="center"> 78 <el-table-column label="理货件数/重量" width="100" align="center">
72 <template slot-scope="scope"> 79 <template slot-scope="scope">
73 <span>{{scope.row.piece}} / {{scope.row.weight}}</span> 80 <span>{{scope.row.piece}} / {{scope.row.weight}}</span>
@@ -81,51 +88,55 @@ @@ -81,51 +88,55 @@
81 <el-table-column label="状态" width="100" align="center"> 88 <el-table-column label="状态" width="100" align="center">
82 <template slot-scope="scope"> 89 <template slot-scope="scope">
83 <span v-if="scope.row.status ==='01'">未发送</span> 90 <span v-if="scope.row.status ==='01'">未发送</span>
84 - <span v-if="scope.row.status ==='02'">已发舱单报</span> 91 + <span v-if="scope.row.status ==='02'">待人工审核</span>
  92 + <span v-if="scope.row.status ==='03'">退单</span>
85 <span v-if="scope.row.status ==='05'">舱单报退单</span> 93 <span v-if="scope.row.status ==='05'">舱单报退单</span>
86 <span v-if="scope.row.status ==='06'">舱单转人工</span> 94 <span v-if="scope.row.status ==='06'">舱单转人工</span>
87 <span v-if="scope.row.status ==='07'">舱单报申报成功</span> 95 <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> 96 <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
90 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> 97 <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> 98 + <span v-if="scope.row.status ==='11'">放行</span>
  99 + <span v-if="scope.row.status ==='12'">拒装</span>
  100 + <span v-if="scope.row.status ==='13'">禁卸</span>
94 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> 101 <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
95 <span v-if="scope.row.status ==='15'">舱单修改报成功</span> 102 <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
96 <span v-if="scope.row.status ==='16'">海关已存在</span> 103 <span v-if="scope.row.status ==='16'">海关已存在</span>
  104 + <span v-if="scope.row.status ==='21'">可自动发送</span>
  105 + <span v-if="scope.row.status ==='22'">未发送</span>
  106 + <span v-if="scope.row.status ==='23'">已发送新增报</span>
  107 + <span v-if="scope.row.status ==='24'">已发送删除报</span>
  108 + <span v-if="scope.row.status ==='25'">已发送修改报</span>
97 </template> 109 </template>
98 </el-table-column> 110 </el-table-column>
99 - <el-table-column prop="receipt" label="回执信息" width="180" align="center"> 111 + <el-table-column label="回执信息" show-overflow-tooltip width="230" align="center">
100 <template slot-scope="scope"> 112 <template slot-scope="scope">
101 <span>{{scope.row.ext5}}</span> 113 <span>{{scope.row.ext5}}</span>
102 </template> 114 </template>
103 </el-table-column> 115 </el-table-column>
104 - <el-table-column prop="operation" label="操作" show-overflow-tooltip align="center"> 116 + <el-table-column prop="operation" label="操作" width="420px" align="center">
105 <template slot-scope="scope"> 117 <template slot-scope="scope">
106 -  
107 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> 118 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
108 <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button> 119 <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
109 <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" 120 <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> 121 + :disabled="addStatus(scope.row.status)">发送出港理货报</el-button>
113 122
  123 + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button>
  124 + <p></p>
114 <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" 125 <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> 126 + :disabled="scope.row.status ==='22'">更改状态</el-button>
  127 + <el-button size="mini" type="primary" v-if="scope.row.awbh ===''"
  128 + @click="handleAddAwbh(scope.row)">新增分单</el-button>
  129 + <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
  130 + :disabled="deleteStatus(scope.row.status)">发出港理货删除报</el-button>
120 </template> 131 </template>
121 </el-table-column> 132 </el-table-column>
122 - </tree-table> 133 + </el-table>
123 <div class="btnFoot"> 134 <div class="btnFoot">
124 <el-row> 135 <el-row>
125 - <el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0" 136 + <el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
126 @click="handelAddTidyInfo">新增出港理货 137 @click="handelAddTidyInfo">新增出港理货
127 </el-button> 138 </el-button>
128 - <el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0" 139 + <el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
129 @click="handelBackStep">返回 140 @click="handelBackStep">返回
130 </el-button> 141 </el-button>
131 </el-row> 142 </el-row>
@@ -148,8 +159,8 @@ @@ -148,8 +159,8 @@
148 </el-form-item> 159 </el-form-item>
149 </el-col> 160 </el-col>
150 <el-col :span="7.5"> 161 <el-col :span="7.5">
151 - <el-form-item label="分单号" prop="awbh">  
152 - <el-input v-model="awbh" :disabled="dialogStatus === 'addAwbh'"></el-input> 162 + <el-form-item label="分单号" prop="awbh" v-if="fenStatus === 'addAwbh'">
  163 + <el-input v-model="awbh" clearable></el-input>
153 </el-form-item> 164 </el-form-item>
154 </el-col> 165 </el-col>
155 </el-row> 166 </el-row>
@@ -174,14 +185,29 @@ @@ -174,14 +185,29 @@
174 <el-row> 185 <el-row>
175 <el-col :span="7.5"> 186 <el-col :span="7.5">
176 <el-form-item label="起始站" prop="originstation"> 187 <el-form-item label="起始站" prop="originstation">
177 - <el-input v-model="originstation"  
178 - :disabled="dialogStatus === 'update'"></el-input> 188 +
  189 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  190 + allow-create v-model="originstation" remote>
  191 + <el-option v-for="item in airportCode"
  192 + :key="item.airportid" :label="item.airportid"
  193 + :value="item.airportid" :disabled="dialogStatus === 'update'">
  194 + <span style="float: left">{{ item.airportdescchn }}</span>
  195 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  196 + </el-option>
  197 + </el-select>
179 </el-form-item> 198 </el-form-item>
180 </el-col> 199 </el-col>
181 <el-col :span="7.5"> 200 <el-col :span="7.5">
182 <el-form-item label="目的站" prop="destinationstation"> 201 <el-form-item label="目的站" prop="destinationstation">
183 - <el-input v-model="destinationstation"  
184 - :disabled="dialogStatus === 'update'"></el-input> 202 + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
  203 + allow-create v-model="destinationstation" remote>
  204 + <el-option v-for="item in airportCode"
  205 + :key="item.airportid" :label="item.airportid"
  206 + :value="item.airportid" :disabled="dialogStatus === 'update'">
  207 + <span style="float: left">{{ item.airportdescchn }}</span>
  208 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
  209 + </el-option>
  210 + </el-select>
185 </el-form-item> 211 </el-form-item>
186 </el-col> 212 </el-col>
187 213
@@ -192,18 +218,18 @@ @@ -192,18 +218,18 @@
192 218
193 <el-row> 219 <el-row>
194 <el-col :span="7.5"> 220 <el-col :span="7.5">
195 - <el-form-item label="运单件数" prop="price"> 221 + <el-form-item label="运单件数" prop="awbprice">
196 <el-input v-model="tidyModel.awbprice"></el-input> 222 <el-input v-model="tidyModel.awbprice"></el-input>
197 </el-form-item> 223 </el-form-item>
198 </el-col> 224 </el-col>
199 <el-col :span="7.5"> 225 <el-col :span="7.5">
200 - <el-form-item label="运单重量" prop="weight"> 226 + <el-form-item label="运单重量" prop="awbweight">
201 <el-input v-model="tidyModel.awbweight"></el-input> 227 <el-input v-model="tidyModel.awbweight"></el-input>
202 </el-form-item> 228 </el-form-item>
203 </el-col> 229 </el-col>
204 <el-col :span="7.5"> 230 <el-col :span="7.5">
205 <el-col :span="7.5"> 231 <el-col :span="7.5">
206 - <el-form-item label="装载开始时间" prop="endtime"> 232 + <el-form-item label="装载开始时间" prop="starttime">
207 <el-date-picker v-model="tidyModel.starttime" value-format="yyyy-MM-dd HH:mm:ss" 233 <el-date-picker v-model="tidyModel.starttime" value-format="yyyy-MM-dd HH:mm:ss"
208 type="datetime" 234 type="datetime"
209 placeholder="请输入"></el-date-picker> 235 placeholder="请输入"></el-date-picker>
@@ -222,13 +248,13 @@ @@ -222,13 +248,13 @@
222 <el-input v-model="tidyModel.weight"></el-input> 248 <el-input v-model="tidyModel.weight"></el-input>
223 </el-form-item> 249 </el-form-item>
224 </el-col> 250 </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> 251 +<!-- <el-col :span="7.5">-->
  252 +<!-- <el-form-item label="装载结束时间" prop="endtime">-->
  253 +<!-- <el-date-picker v-model="tidyModel.endtime" value-format="yyyy-MM-dd HH:mm:ss"-->
  254 +<!-- type="datetime"-->
  255 +<!-- placeholder="请输入"></el-date-picker>-->
  256 +<!-- </el-form-item>-->
  257 +<!-- </el-col>-->
232 </el-row> 258 </el-row>
233 <el-row> 259 <el-row>
234 <el-col :span="7.5"> 260 <el-col :span="7.5">
@@ -238,9 +264,16 @@ @@ -238,9 +264,16 @@
238 </el-col> 264 </el-col>
239 <el-col :span="7.5"> 265 <el-col :span="7.5">
240 <el-form-item label="海关关区" prop="customcode"> 266 <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> 267 + <el-select v-model="tidyModel.customcode" placeholder="请选择关区代码"
  268 + allow-create
  269 + default-first-option
  270 + filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
  271 + >
  272 + <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
  273 + :value="item.customcode">
  274 + <span style="float: left">{{ item.customcode }}</span>
  275 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  276 + </el-option>
244 </el-select> 277 </el-select>
245 </el-form-item> 278 </el-form-item>
246 </el-col> 279 </el-col>
@@ -249,12 +282,11 @@ @@ -249,12 +282,11 @@
249 <div slot="footer" class="dialog-footer"> 282 <div slot="footer" class="dialog-footer">
250 <el-button @click="dialogFormVisible = false">取消</el-button> 283 <el-button @click="dialogFormVisible = false">取消</el-button>
251 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button> 284 <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
252 - <el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>  
253 </div> 285 </div>
254 </el-dialog> 286 </el-dialog>
255 <el-dialog title="收发明细" :visible.sync="dialogTableVisible"> 287 <el-dialog title="收发明细" :visible.sync="dialogTableVisible">
256 <el-table :data="detailData" border> 288 <el-table :data="detailData" border>
257 - <el-table-column label="操作时间" width="150"> 289 + <el-table-column label="操作时间" width="180">
258 <template slot-scope="scope"> 290 <template slot-scope="scope">
259 {{scope.row.busdate}} 291 {{scope.row.busdate}}
260 </template> 292 </template>
@@ -284,6 +316,11 @@ @@ -284,6 +316,11 @@
284 {{scope.row.cusrestext}} 316 {{scope.row.cusrestext}}
285 </template> 317 </template>
286 </el-table-column> 318 </el-table-column>
  319 + <el-table-column label="操作类型" width="100">
  320 + <template slot-scope="scope">
  321 + {{scope.row.opertype}}
  322 + </template>
  323 + </el-table-column>
287 <el-table-column label="操作人" width="100"> 324 <el-table-column label="操作人" width="100">
288 <template slot-scope="scope"> 325 <template slot-scope="scope">
289 {{scope.row.operusername}} 326 {{scope.row.operusername}}
@@ -291,7 +328,27 @@ @@ -291,7 +328,27 @@
291 </el-table-column> 328 </el-table-column>
292 </el-table> 329 </el-table>
293 </el-dialog> 330 </el-dialog>
294 - 331 + <el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
  332 + <el-form ref="tidyDeleteForm" :model="respModel" :rules="tidyDeleteRules"
  333 + label-width="120px" style="margin-right: 50px">
  334 + <el-form-item label="删除原因" prop="reason">
  335 + <el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
  336 + </el-form-item>
  337 + <el-form-item label="删除操作人" prop="contactName">
  338 + <el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
  339 + </el-form-item>
  340 + <el-form-item label="操作人Tel" prop="contactTel">
  341 + <el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
  342 + </el-form-item>
  343 + <el-form-item label="备注">
  344 + <el-input v-model="respModel.content" type="textarea"></el-input>
  345 + </el-form-item>
  346 + </el-form>
  347 + <div slot="footer" class="dialog-footer">
  348 + <el-button @click="dialogDeleteVisible = false">取消</el-button>
  349 + <el-button type="primary" @click="sendTidyDelete()">发送</el-button>
  350 + </div>
  351 + </el-dialog>
295 </div> 352 </div>
296 </template> 353 </template>
297 <script> 354 <script>
@@ -299,10 +356,15 @@ @@ -299,10 +356,15 @@
299 import treeToArray from '@/utils/customEval' 356 import treeToArray from '@/utils/customEval'
300 import Pagination from '@/components/Pagination' 357 import Pagination from '@/components/Pagination'
301 358
302 - import {getMt520XListForParam, deleteByIsDelete, updateStatus, updateMt520X, addMt520X} from '@/api/exitTidy' 359 + import {
  360 + getMt520XListForParam, deleteByIsDelete,
  361 + updateStatus, updateMt520X, addMt520X,
  362 + sendCreateMt5202,sendRemoveMt5202 } from '@/api/exitTidy'
303 import {Message} from "element-ui"; 363 import {Message} from "element-ui";
304 import {getResponseForParam} from '@/api/responseDetail' 364 import {getResponseForParam} from '@/api/responseDetail'
305 import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate" 365 import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
  366 + import {getCustomCode,getAirportCode} from "@/api/country";
  367 + import util from "@/common/js/util.js";
306 368
307 export default { 369 export default {
308 name: "ExitTidy", 370 name: "ExitTidy",
@@ -316,10 +378,12 @@ @@ -316,10 +378,12 @@
316 callback() 378 callback()
317 } 379 }
318 const validatorAwbh = (rule, value, callback) => { 380 const validatorAwbh = (rule, value, callback) => {
319 - if (!validAlphabetsAndNum(value)) { 381 + if (value !=='' && value !== undefined && !validAlphabetsAndNum(value)) {
320 callback("只能输入字母和数字") 382 callback("只能输入字母和数字")
  383 + }else{
  384 + callback()
321 } 385 }
322 - callback() 386 +
323 } 387 }
324 const validatorAlphabets = (rule, value, callback) => { 388 const validatorAlphabets = (rule, value, callback) => {
325 if (!validAlphabets(value)) { 389 if (!validAlphabets(value)) {
@@ -348,35 +412,41 @@ @@ -348,35 +412,41 @@
348 create: '添加出港理货', 412 create: '添加出港理货',
349 addAwbh: '添加分单理货' 413 addAwbh: '添加分单理货'
350 }, 414 },
351 - customcodeList: [4604, 4620], 415 + customCodeList: [],
  416 + airportCode:[],
352 tidyQuery: { 417 tidyQuery: {
353 pageSize: 1, 418 pageSize: 1,
354 - limitSize: 100, 419 + limitSize: 30,
355 awba: undefined, 420 awba: undefined,
356 carrier: undefined, 421 carrier: undefined,
357 flightno: undefined, 422 flightno: undefined,
358 flightdate: undefined, 423 flightdate: undefined,
359 originstation: undefined, 424 originstation: undefined,
360 destinationstation: undefined, 425 destinationstation: undefined,
361 - customcode: undefined 426 + customcode: undefined,
  427 + rcfdep: "5202"
362 }, 428 },
363 tidyRoles: { 429 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}], 430 + awba: [{required: true, message: "主单号不能为空"},{ trigger: 'blur', validator: validatorAwb}],
  431 + awbh: [{trigger: 'blur', validator: validatorAwbh}],
  432 + goodsname: [{required: true, message: "货物描述不能为空"},{ trigger: 'blur', validator: validAlphabetsSpanceKey}],
  433 + carrier: [{required: true, message:"承运人不能为空"},{trigger: 'blur', validator: validatorAwbh}],
  434 + flightno: [{required: true, message:"航班号不能为空"}, { trigger: 'blur', validator: validatorAwbh}],
  435 + originstation: [{required: true, message:"起始站不能为空"}, {trigger: 'blur', validator: validatorAlphabets}],
  436 + destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}],
  437 + weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}],
  438 + piece: [{required: true, message:"件数不能为空"}, { trigger: 'change', validator: validatorNums}],
  439 +
373 }, 440 },
374 tidyData: [], 441 tidyData: [],
375 detailData: [], 442 detailData: [],
376 dialogTableVisible: false, 443 dialogTableVisible: false,
  444 + dialogDeleteVisible: false,
377 dialogStatus: undefined, 445 dialogStatus: undefined,
378 disabledStatus: false, 446 disabledStatus: false,
  447 + fenStatus: undefined,
379 listLoading: false, 448 listLoading: false,
  449 + customLoading:false,
380 dialogFormVisible: false, 450 dialogFormVisible: false,
381 tidyModel: { 451 tidyModel: {
382 carrier: undefined, 452 carrier: undefined,
@@ -396,7 +466,27 @@ @@ -396,7 +466,27 @@
396 awbpiece: undefined, 466 awbpiece: undefined,
397 awbweight: undefined, 467 awbweight: undefined,
398 rcfdep: 'MT5202', 468 rcfdep: 'MT5202',
399 - } 469 + },
  470 + respModel : {
  471 + uuid: undefined,
  472 + reason: undefined,
  473 + contactName: undefined,
  474 + contactTel: undefined,
  475 + content: '',
  476 + flightNo: undefined,
  477 + awba: undefined,
  478 + customCode: undefined,
  479 + flightDate: undefined,
  480 + awbh: undefined,
  481 + rcfdep: 'MT5202',
  482 + },
  483 + tidyDeleteRules: {
  484 + reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
  485 + contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
  486 + contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
  487 + },
  488 +
  489 + rows:{},
400 } 490 }
401 }, 491 },
402 created() { 492 created() {
@@ -489,11 +579,11 @@ @@ -489,11 +579,11 @@
489 getList() { 579 getList() {
490 this.listLoading = true 580 this.listLoading = true
491 //根据是否有主单号 来给查询条件赋值 581 //根据是否有主单号 来给查询条件赋值
492 - if (this.tidyQuery.awba != undefined && this.tidyQuery.awba != '') { 582 + if (this.tidyQuery.awba !== undefined && this.tidyQuery.awba !== '') {
493 getMt520XListForParam(this.tidyQuery).then(res => { 583 getMt520XListForParam(this.tidyQuery).then(res => {
494 this.tidyData = res.data.dataList 584 this.tidyData = res.data.dataList
495 this.total = res.data.count 585 this.total = res.data.count
496 - if (res.data.count > 0) { 586 + if (res.data.dataList.length > 0) {
497 this.tidyQuery.carrier = this.tidyData[0].carrier 587 this.tidyQuery.carrier = this.tidyData[0].carrier
498 this.tidyQuery.flightno = this.tidyData[0].flightno 588 this.tidyQuery.flightno = this.tidyData[0].flightno
499 this.tidyQuery.flightdate = this.tidyData[0].flightdate 589 this.tidyQuery.flightdate = this.tidyData[0].flightdate
@@ -522,11 +612,11 @@ @@ -522,11 +612,11 @@
522 }, 612 },
523 // 搜索 613 // 搜索
524 handleSerach() { 614 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 615 + // this.tidyQuery.carrier = undefined
  616 + // this.tidyQuery.flightno = undefined
  617 + // this.tidyQuery.originstation = undefined
  618 + // this.tidyQuery.flightdate = undefined
  619 + // this.tidyQuery.destinationstation = undefined
530 this.getList() 620 this.getList()
531 }, 621 },
532 // 收发明细 622 // 收发明细
@@ -535,22 +625,57 @@ @@ -535,22 +625,57 @@
535 carrier: row.carrier, 625 carrier: row.carrier,
536 flightNo: row.flightno, 626 flightNo: row.flightno,
537 flightDate: row.flightdate, 627 flightDate: row.flightdate,
  628 + opertype: row.opertype,
538 awba: row.awba, 629 awba: row.awba,
539 awbh: row.awbh, 630 awbh: row.awbh,
540 - messageType: 'MT5202' 631 + rcfdep: 'MT5202'
541 } 632 }
542 this.dialogTableVisible = true 633 this.dialogTableVisible = true
543 getResponseForParam(resQuery).then(res => { 634 getResponseForParam(resQuery).then(res => {
544 this.detailData = res.data 635 this.detailData = res.data
545 }) 636 })
546 }, 637 },
547 -  
548 //发送舱单报 638 //发送舱单报
549 handleAwbSend(row) { 639 handleAwbSend(row) {
  640 + delete row.children
  641 + delete row.parent
  642 + this.rows = row;
  643 + this.$confirm("是否发送", "确认消息", {
  644 + distinguishCancelAndClose: true,
  645 + confirmButtonText: '发送',
  646 + cancelButtonText: '取消'
  647 + }).then(() => {
  648 + console.log(row)
550 649
  650 + sendCreateMt5202(row).then(res => {
  651 + if (res.data.count > 0) {
  652 + Message.success(res.data.respMessage)
  653 + // this.getList()
  654 + this.rows.status="23";
  655 + this.rows.ext5="新增报发送成功";
  656 + }else {
  657 + Message.error(res.data.respMessage)
  658 + }
  659 + })
  660 + }).catch(error =>{
  661 + Message.error(error.message)
  662 + })
  663 + },
  664 + // 发送舱单报自灰
  665 + addStatus(status){
  666 + if(status=='23' || status=='24'||status=='25'){
  667 + return true;
  668 + }else if(status=='22' ) {
  669 + return false;
  670 + }
551 }, 671 },
552 //新增分单理货 672 //新增分单理货
553 handleAddAwbh(row) { 673 handleAddAwbh(row) {
  674 +
  675 + this.fenStatus='addAwbh'
  676 + // 清空from列表
  677 + this.restModel();
  678 +
554 this.tidyModel.carrier = row.carrier 679 this.tidyModel.carrier = row.carrier
555 this.tidyModel.awba = row.awba 680 this.tidyModel.awba = row.awba
556 this.tidyModel.flightdate = row.flightdate 681 this.tidyModel.flightdate = row.flightdate
@@ -558,12 +683,71 @@ @@ -558,12 +683,71 @@
558 this.tidyModel.originstation = row.originstation 683 this.tidyModel.originstation = row.originstation
559 this.tidyModel.destinationstation = row.destinationstation 684 this.tidyModel.destinationstation = row.destinationstation
560 this.tidyModel.customcode = row.customcode 685 this.tidyModel.customcode = row.customcode
561 - this.dialogStatus = 'addAwbh' 686 + // this.dialogStatus = 'addAwbh'
  687 + this.dialogStatus = 'create'
562 this.dialogFormVisible = true 688 this.dialogFormVisible = true
563 this.$nextTick(() => { 689 this.$nextTick(() => {
564 this.$refs.tidyFormData.clearValidate() 690 this.$refs.tidyFormData.clearValidate()
565 }) 691 })
566 }, 692 },
  693 + // 发删除报
  694 + handleSendDelete(row){
  695 +
  696 + this.rows = row;
  697 +
  698 + this.respModel = {
  699 + carrier: undefined,
  700 + reason: undefined,
  701 + contactName: undefined,
  702 + contactTel: undefined,
  703 + content: '',
  704 + flightNo: undefined,
  705 + awba: undefined,
  706 + customCode: undefined,
  707 + flightDate: undefined,
  708 + awbh: undefined,
  709 + rcfdep: 'MT5202',
  710 + }
  711 + this.dialogDeleteVisible = true
  712 + this.respModel.carrier = row.carrier
  713 + this.respModel.flightNo = row.flightno
  714 + this.respModel.awba = row.awba
  715 + this.respModel.customCode = row.customcode
  716 + this.respModel.flightDate = row.flightdate
  717 + if(row.awbh === null){
  718 + this.respModel.awbh = ''
  719 + }else {
  720 + this.respModel.awbh = row.awbh
  721 + }
  722 + this.$nextTick(() => {
  723 + this.$refs.tidyDeleteForm.clearValidate()
  724 + })
  725 + },
  726 + // 删除舱单报自灰
  727 + deleteStatus(status){
  728 + if(status=='23' || status=='24'||status=='25'){
  729 + return true;
  730 + }else if(status=='22' ) {
  731 + return false;
  732 + }
  733 + },
  734 + // 发送删除报
  735 + sendTidyDelete(){
  736 + this.$refs.tidyDeleteForm.validate(valid =>{
  737 + if(valid){
  738 + sendRemoveMt5202(this.respModel).then(res =>{
  739 + if(res.data.count >0){
  740 + Message.success(res.data.respMessage)
  741 + this.dialogDeleteVisible = false
  742 + this.rows.status="24";
  743 + this.rows.ext5="删除报发送成功";
  744 + }else {
  745 + Message.error(res.data.respMessage)
  746 + }
  747 + })
  748 + }
  749 + })
  750 + },
567 // 删除当前运单 751 // 删除当前运单
568 handleAwbDelete(row) { 752 handleAwbDelete(row) {
569 delete row.parent 753 delete row.parent
@@ -575,16 +759,10 @@ @@ -575,16 +759,10 @@
575 }).then(() => { 759 }).then(() => {
576 deleteByIsDelete(row).then(res => { 760 deleteByIsDelete(row).then(res => {
577 if (res.data.count > 0) { 761 if (res.data.count > 0) {
578 - this.$message({  
579 - type: 'success',  
580 - message: '删除成功'  
581 - }) 762 + Message.success("删除成功")
582 this.getList() 763 this.getList()
583 } else { 764 } else {
584 - this.$message({  
585 - type: 'error',  
586 - message: '删除异常,请稍后重试'  
587 - }) 765 + Message.success("删除异常,请稍后重试")
588 } 766 }
589 }) 767 })
590 }).catch(action => { 768 }).catch(action => {
@@ -599,27 +777,23 @@ @@ -599,27 +777,23 @@
599 }, 777 },
600 // 更新运单为可发送状态 778 // 更新运单为可发送状态
601 handleAwbStatus(row) { 779 handleAwbStatus(row) {
602 - delete row.parent  
603 - delete row.children 780 +
604 this.$confirm("是否发送更改状态", "确认消息", { 781 this.$confirm("是否发送更改状态", "确认消息", {
605 distinguishCancelAndClose: true, 782 distinguishCancelAndClose: true,
606 confirmButtonText: '确认更改', 783 confirmButtonText: '确认更改',
607 cancelButtonText: '取消更改' 784 cancelButtonText: '取消更改'
608 }).then(() => { 785 }).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 - }) 786 + if (row.status!==22){
  787 + row.status =22;
  788 + }
  789 + // updateStatus(row).then(res => {
  790 + // if (res.data.count > 0) {
  791 + // Message.success(res.data.respMessage)
  792 + // this.getList()
  793 + // } else {
  794 + // Message.error(res.data.respMessage)
  795 + // }
  796 + // })
623 }).catch(action => { 797 }).catch(action => {
624 this.$message({ 798 this.$message({
625 type: 'info', 799 type: 'info',
@@ -654,6 +828,7 @@ @@ -654,6 +828,7 @@
654 }, 828 },
655 // 新增出港理货弹框 829 // 新增出港理货弹框
656 handelAddTidyInfo() { 830 handelAddTidyInfo() {
  831 + this.fenStatus=undefined;
657 this.restModel() 832 this.restModel()
658 // 给model赋值,所使用数据是以单独单号查询数据所得 833 // 给model赋值,所使用数据是以单独单号查询数据所得
659 this.tidyModel.carrier = this.tidyQuery.carrier 834 this.tidyModel.carrier = this.tidyQuery.carrier
@@ -686,6 +861,11 @@ @@ -686,6 +861,11 @@
686 }, 861 },
687 // 更新出港理货弹框 862 // 更新出港理货弹框
688 handleEdit(row) { 863 handleEdit(row) {
  864 + if(row.awbh !==''){
  865 + this.fenStatus='addAwbh'
  866 + }else {
  867 + this.fenStatus=undefined
  868 + }
689 this.tidyModel = Object.assign({}, row) 869 this.tidyModel = Object.assign({}, row)
690 this.dialogStatus = 'update' 870 this.dialogStatus = 'update'
691 this.dialogFormVisible = true 871 this.dialogFormVisible = true
@@ -712,20 +892,51 @@ @@ -712,20 +892,51 @@
712 } 892 }
713 }) 893 })
714 }, 894 },
715 - // 保存并发送  
716 - handleSaveAndSend() {  
717 - 895 + // 获取机场三字码
  896 + remoteMethodAirport(query){
  897 + this.airportCode = []
  898 + if (query !== '') {
  899 + this.listLoading = true
  900 + getAirportCode({airportid: query}).then(res => {
  901 + if(res !== null){
  902 + setTimeout(() => {
  903 + this.listLoading = false
  904 + this.airportCode = res.data.data
  905 + }, 200)
  906 + }
  907 + })
  908 + } else {
  909 + this.airportCode = []
  910 + }
  911 + },
  912 + // 关区代码
  913 + remoteMethodCustomCode(query){
  914 + this.customCodeList = []
  915 + if (query !== '') {
  916 + this.customLoading = true
  917 + getCustomCode({customcode: query}).then(res => {
  918 + if(res !== null){
  919 + setTimeout(() => {
  920 + this.customLoading = false
  921 + this.customCodeList = res.data.data
  922 + }, 200)
  923 + }
  924 + })
  925 + } else {
  926 + this.airportCode = []
  927 + }
718 }, 928 },
719 // 新增理货弹框 929 // 新增理货弹框
720 handleAddTidy() { 930 handleAddTidy() {
721 - const row = {  
722 - 'messageType': 'MT5201' 931 + const query = {
  932 + 'messageType': 'MT5202'
723 } 933 }
724 - this.$router.push({name: '出港航班信息', params: {scopeRow: row}}) 934 + this.$router.push({name: '出港航班信息', params: {scopeRow: query}})
725 }, 935 },
726 // 返回 936 // 返回
727 handelBackStep() { 937 handelBackStep() {
728 - this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}}) 938 + this.tidyQuery.rcfdep = 'MT5202'
  939 + this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyQuery}})
729 } 940 }
730 } 941 }
731 } 942 }
@@ -466,6 +466,7 @@ @@ -466,6 +466,7 @@
466 import {Message} from "element-ui"; 466 import {Message} from "element-ui";
467 467
468 import {validAwb, validFlightNo} from '@/utils/validate' 468 import {validAwb, validFlightNo} from '@/utils/validate'
  469 + import util from '@/common/js/util'
469 470
470 export default { 471 export default {
471 name: 'OrgManifest', 472 name: 'OrgManifest',
@@ -823,7 +824,7 @@ @@ -823,7 +824,7 @@
823 }, 824 },
824 by1: { 825 by1: {
825 get: function () { 826 get: function () {
826 - return this.temp.awbinfo.by1 827 + return util.checkNull(this.temp.awbinfo.by1)?'':this.temp.awbinfo.by1
827 }, 828 },
828 set: function (val) { 829 set: function (val) {
829 this.temp.awbinfo.by1 = val.toUpperCase().trim() 830 this.temp.awbinfo.by1 = val.toUpperCase().trim()