作者 朱兆平

合并分支 'nmms-import-dev' 到 'master'

Nmms import dev



查看合并请求 !14
@@ -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",
@@ -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",
  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 +}
@@ -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'
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
81 }, 81 },
82 data() { 82 data() {
83 return { 83 return {
84 - sysName:'易通快速通关申报管理系统', 84 + sysName:'河南烩捞大盘鸡',
85 collapsed:false, 85 collapsed:false,
86 sysUserName: '', 86 sysUserName: '',
87 sysUserAvatar: '', 87 sysUserAvatar: '',
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 <el-col :span="24"> 74 <el-col :span="24">
75 <template> 75 <template>
76 <el-table 76 <el-table
  77 + v-loading="listLoading"
77 ref="multipleTable" 78 ref="multipleTable"
78 :data="tableData" 79 :data="tableData"
79 tooltip-effect="dark" 80 tooltip-effect="dark"
@@ -133,9 +134,22 @@ @@ -133,9 +134,22 @@
133 width="100" :formatter="formatStatus"> 134 width="100" :formatter="formatStatus">
134 </el-table-column> 135 </el-table-column>
135 <el-table-column 136 <el-table-column
136 - prop="ext5"  
137 label="回执内容" 137 label="回执内容"
138 width="250"> 138 width="250">
  139 + <template slot-scope="scope">
  140 + <span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  141 + {{scope.row.ext5}}
  142 + </span>
  143 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  144 + {{scope.row.ext5}}
  145 + </span>
  146 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  147 + {{scope.row.ext5}}
  148 + </span>
  149 + <span v-else style="color: #909399;">
  150 + {{scope.row.ext5}}
  151 + </span>
  152 + </template>
139 </el-table-column> 153 </el-table-column>
140 <el-table-column 154 <el-table-column
141 label="修改状态" 155 label="修改状态"
@@ -287,20 +301,20 @@ @@ -287,20 +301,20 @@
287 <el-col :span="5"> 301 <el-col :span="5">
288 <el-form-item label="运抵件数" prop="turnpiece"> 302 <el-form-item label="运抵件数" prop="turnpiece">
289 <div v-if="dialogStatus === 'update'"> 303 <div v-if="dialogStatus === 'update'">
290 - <el-input v-model="AruleForm.turnpiece"></el-input> 304 + <el-input type="number" v-model="AruleForm.turnpiece"></el-input>
291 </div> 305 </div>
292 <div v-else> 306 <div v-else>
293 - <el-input disabled="" v-model="AruleForm.turnpiece"></el-input> 307 + <el-input type="number" disabled="" v-model="AruleForm.turnpiece"></el-input>
294 </div> 308 </div>
295 </el-form-item> 309 </el-form-item>
296 </el-col> 310 </el-col>
297 <el-col :span="5"> 311 <el-col :span="5">
298 <el-form-item label="运抵重量" prop="turnweight"> 312 <el-form-item label="运抵重量" prop="turnweight">
299 <div v-if="dialogStatus === 'update'"> 313 <div v-if="dialogStatus === 'update'">
300 - <el-input v-model="AruleForm.turnweight"></el-input> 314 + <el-input type="number" v-model="AruleForm.turnweight"></el-input>
301 </div> 315 </div>
302 <div v-else> 316 <div v-else>
303 - <el-input disabled="" v-model="AruleForm.turnweight"></el-input> 317 + <el-input type="number" disabled="" v-model="AruleForm.turnweight"></el-input>
304 </div> 318 </div>
305 </el-form-item> 319 </el-form-item>
306 </el-col> 320 </el-col>
@@ -718,7 +732,8 @@ @@ -718,7 +732,8 @@
718 rows:{}, 732 rows:{},
719 loading:false, 733 loading:false,
720 dialogTableVisible:false, 734 dialogTableVisible:false,
721 - gridData:[] 735 + gridData:[],
  736 + listLoading:false
722 } 737 }
723 }, 738 },
724 methods:{ 739 methods:{
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 </el-col> 52 </el-col>
53 <el-col :span="12"> 53 <el-col :span="12">
54 <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> 54 <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
55 - <el-button type="primary" @click="submitForm('ruleForm')">保存发送</el-button> 55 + <el-button type="primary" @click="back">返回</el-button>
56 </el-col> 56 </el-col>
57 </el-row> 57 </el-row>
58 <!--对话提示框--> 58 <!--对话提示框-->
@@ -179,7 +179,10 @@ @@ -179,7 +179,10 @@
179 DialogVisible(){ 179 DialogVisible(){
180 this.centerDialogVisible=false; 180 this.centerDialogVisible=false;
181 this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}}); 181 this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}});
182 - } 182 + },
  183 + back(){
  184 + this.$router.go(-1);//返回上一层
  185 + },
183 }, 186 },
184 mounted(){ 187 mounted(){
185 this.getDefaultData(); 188 this.getDefaultData();
@@ -138,15 +138,13 @@ @@ -138,15 +138,13 @@
138 this.options = []; 138 this.options = [];
139 this.options2=[]; 139 this.options2=[];
140 } 140 }
141 - //this.options=res.data.data;  
142 - //this.options2=res.data.data;  
143 }); 141 });
144 }, 142 },
145 /*按钮点击请求方法*/ 143 /*按钮点击请求方法*/
146 submitForm(formName) { 144 submitForm(formName) {
147 this.$refs[formName].validate((valid) => { 145 this.$refs[formName].validate((valid) => {
148 if (valid) { 146 if (valid) {
149 - this.$router.push({name:'进港原始舱单',params:{flightno:this.ruleForm.flightno,flightdate:this.dateConversion(this.ruleForm.flightdate),originstation:this.ruleForm.originstation,destinationstation:this.ruleForm.destinationstation}}); 147 + this.$router.push({path:'/origmaster',query:{flightno:JSON.stringify(this.ruleForm.flightno),flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),originstation:JSON.stringify(this.ruleForm.originstation),destinationstation:JSON.stringify(this.ruleForm.destinationstation),awba:JSON.stringify("")}});
150 } else { 148 } else {
151 console.log('error submit!!'); 149 console.log('error submit!!');
152 return false; 150 return false;
@@ -161,11 +159,11 @@ @@ -161,11 +159,11 @@
161 }, 159 },
162 /*加载默认参数*/ 160 /*加载默认参数*/
163 getDefaultData(){ 161 getDefaultData(){
164 - if(this.$route.params.row!=null){  
165 - this.ruleForm.flightno=this.$route.params.row.flightno;  
166 - this.ruleForm.flightdate=this.$route.params.row.flightdate;  
167 - this.ruleForm.originstation=this.$route.params.row.originstation;  
168 - this.ruleForm.destinationstation=this.$route.params.row.destinationstation; 162 + if(this.$route.query!=null){
  163 + this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
  164 + this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
  165 + this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
  166 + this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
169 } 167 }
170 } 168 }
171 }, 169 },
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 flightno: '', 102 flightno: '',
103 flightdate:'', 103 flightdate:'',
104 originstation:'', 104 originstation:'',
105 - destinationstation:'' 105 + destinationstation:'',
106 }, 106 },
107 options: [], 107 options: [],
108 airportid:'', 108 airportid:'',
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 submitForm(formName) { 174 submitForm(formName) {
175 this.$refs[formName].validate((valid) => { 175 this.$refs[formName].validate((valid) => {
176 if (valid) { 176 if (valid) {
177 - this.$router.push({name:'进港理货舱单',params:{flightno:this.ruleForm.flightno,flightdate:this.dateConversion(this.ruleForm.flightdate),originstation:this.ruleForm.originstation,destinationstation:this.ruleForm.destinationstation}}) 177 + this.$router.push({path:'/tallymaster',query:{flightno:JSON.stringify(this.ruleForm.flightno),flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),originstation:JSON.stringify(this.ruleForm.originstation),destinationstation:JSON.stringify(this.ruleForm.destinationstation),awba:JSON.stringify("")}})
178 } else { 178 } else {
179 //console.log('error submit!!'); 179 //console.log('error submit!!');
180 return false; 180 return false;
@@ -189,11 +189,11 @@ @@ -189,11 +189,11 @@
189 }, 189 },
190 /*获取默认值方法*/ 190 /*获取默认值方法*/
191 getDefaultData(){ 191 getDefaultData(){
192 - if(this.$route.params.row!=null){  
193 - this.ruleForm.flightno=this.$route.params.row.flightno;  
194 - this.ruleForm.flightdate=this.$route.params.row.flightdate;  
195 - this.ruleForm.originstation=this.$route.params.row.originstation;  
196 - this.ruleForm.destinationstation=this.$route.params.row.destinationstation; 192 + if(this.$route.query!=null){
  193 + this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
  194 + this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
  195 + this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
  196 + this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
197 } 197 }
198 } 198 }
199 }, 199 },
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 </el-col> 58 </el-col>
59 <el-col :span="12"> 59 <el-col :span="12">
60 <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> 60 <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
61 - <el-button type="primary" @click="submitSend('ruleForm')">保存发送</el-button> 61 + <el-button type="primary" @click="back">返回</el-button>
62 </el-col> 62 </el-col>
63 </el-row> 63 </el-row>
64 <!--对话提示框--> 64 <!--对话提示框-->
@@ -190,7 +190,10 @@ @@ -190,7 +190,10 @@
190 DialogVisible(){ 190 DialogVisible(){
191 this.centerDialogVisible=false; 191 this.centerDialogVisible=false;
192 this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}}); 192 this.$router.push({name:'运单分拨申报',params:{awba:this.ruleForm.awba}});
193 - } 193 + },
  194 + back(){
  195 + this.$router.go(-1);//返回上一层
  196 + },
194 }, 197 },
195 mounted(){ 198 mounted(){
196 this.getDefaultData(); 199 this.getDefaultData();
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 <el-row> 30 <el-row>
31 <template> 31 <template>
32 <el-table 32 <el-table
  33 + v-loading="tableloading"
33 :data="tableData" 34 :data="tableData"
34 style="width: 100%" 35 style="width: 100%"
35 :default-sort = "{prop: 'date', order: 'descending'}" 36 :default-sort = "{prop: 'date', order: 'descending'}"
@@ -107,7 +108,8 @@ @@ -107,7 +108,8 @@
107 flighttime: undefined, 108 flighttime: undefined,
108 currentPage:1, 109 currentPage:1,
109 pageSize:10, 110 pageSize:10,
110 - total:0 111 + total:0,
  112 + tableloading:true
111 } 113 }
112 }, 114 },
113 methods: { 115 methods: {
@@ -130,19 +132,19 @@ @@ -130,19 +132,19 @@
130 this.listLoading = true; 132 this.listLoading = true;
131 selectFlightLists(params).then(res=>{ 133 selectFlightLists(params).then(res=>{
132 let response=res.data.data; 134 let response=res.data.data;
133 - console.log(response)  
134 this.tableData=response.list; 135 this.tableData=response.list;
  136 + this.tableloading=false;
135 this.total=response.total; 137 this.total=response.total;
136 this.listLoading = false; 138 this.listLoading = false;
137 }); 139 });
138 }, 140 },
139 /*原始舱单跳转*/ 141 /*原始舱单跳转*/
140 handleEdit(index, row) { 142 handleEdit(index, row) {
141 - this.$router.push({name:'原始舱单',params:{index,row}}) 143 + this.$router.push({path:'/enter',query:{flightno:JSON.stringify(row.flightno),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation),destinationstation:JSON.stringify(row.destinationstation)}})
142 }, 144 },
143 /*进港理货跳转*/ 145 /*进港理货跳转*/
144 handleDelete(index, row) { 146 handleDelete(index, row) {
145 - this.$router.push({name:'进港理货',params:{index,row}}) 147 + this.$router.push({path:'entertall',query:{flightno:JSON.stringify(row.flightno),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation),destinationstation:JSON.stringify(row.destinationstation)}})
146 } 148 }
147 }, 149 },
148 computed:{ 150 computed:{
@@ -42,7 +42,15 @@ @@ -42,7 +42,15 @@
42 </el-col> 42 </el-col>
43 <el-col :span="4" class="pub"> 43 <el-col :span="4" class="pub">
44 <div class="grid-content"> 44 <div class="grid-content">
45 - <el-button type="primary" size="mini">导出PDF</el-button> 45 + <el-dropdown @command="handleCommand">
  46 + <el-button size="mini" type="primary">
  47 + 导出文件<i class="el-icon-arrow-down el-icon--right"></i>
  48 + </el-button>
  49 + <el-dropdown-menu slot="dropdown">
  50 + <el-dropdown-item command="PDF">导出PDF</el-dropdown-item>
  51 + <el-dropdown-item command="EXCEL">导出EXCEL</el-dropdown-item>
  52 + </el-dropdown-menu>
  53 + </el-dropdown>
46 </div> 54 </div>
47 </el-col> 55 </el-col>
48 </div> 56 </div>
@@ -58,6 +66,9 @@ @@ -58,6 +66,9 @@
58 <el-col :span="24"> 66 <el-col :span="24">
59 <template> 67 <template>
60 <el-table 68 <el-table
  69 + class="table"
  70 + id="pdfDom"
  71 + v-loading="tableloading"
61 ref="multipleTable" 72 ref="multipleTable"
62 :data="tableData" 73 :data="tableData"
63 tooltip-effect="dark" 74 tooltip-effect="dark"
@@ -74,7 +85,7 @@ @@ -74,7 +85,7 @@
74 <el-table-column 85 <el-table-column
75 label="运单号" 86 label="运单号"
76 width="185" 87 width="185"
77 - show-overflow-tooltip> 88 + >
78 <template slot-scope="scope"> 89 <template slot-scope="scope">
79 <span v-if="scope.row.awbh==''||scope.row.awbh==null"> 90 <span v-if="scope.row.awbh==''||scope.row.awbh==null">
80 {{scope.row.awba}} 91 {{scope.row.awba}}
@@ -119,9 +130,22 @@ @@ -119,9 +130,22 @@
119 width="100" :formatter="formatStatus"> 130 width="100" :formatter="formatStatus">
120 </el-table-column> 131 </el-table-column>
121 <el-table-column 132 <el-table-column
122 - prop="customText"  
123 - label="回执信息"  
124 - width="180"> 133 + label="回执内容"
  134 + width="250">
  135 + <template slot-scope="scope">
  136 + <span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  137 + {{scope.row.ext5}}
  138 + </span>
  139 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  140 + {{scope.row.ext5}}
  141 + </span>
  142 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  143 + {{scope.row.ext5}}
  144 + </span>
  145 + <span v-else style="color: #909399;">
  146 + {{scope.row.ext5}}
  147 + </span>
  148 + </template>
125 </el-table-column> 149 </el-table-column>
126 <el-table-column 150 <el-table-column
127 prop="operation" 151 prop="operation"
@@ -333,22 +357,22 @@ @@ -333,22 +357,22 @@
333 <el-row class="product"> 357 <el-row class="product">
334 <el-col :span="6"> 358 <el-col :span="6">
335 <el-form-item label="总件数" prop="awbinfo.pcs"> 359 <el-form-item label="总件数" prop="awbinfo.pcs">
336 - <el-input v-model="ruleForm.awbinfo.pcs" ></el-input> 360 + <el-input type="number" v-model="ruleForm.awbinfo.pcs" ></el-input>
337 </el-form-item> 361 </el-form-item>
338 </el-col> 362 </el-col>
339 <el-col :span="6"> 363 <el-col :span="6">
340 <el-form-item label="总重量" prop="awbinfo.weight"> 364 <el-form-item label="总重量" prop="awbinfo.weight">
341 - <el-input v-model="ruleForm.awbinfo.weight"></el-input> 365 + <el-input type="number" v-model="ruleForm.awbinfo.weight"></el-input>
342 </el-form-item> 366 </el-form-item>
343 </el-col> 367 </el-col>
344 <el-col :span="6"> 368 <el-col :span="6">
345 <el-form-item label="舱单件数" prop="piece"> 369 <el-form-item label="舱单件数" prop="piece">
346 - <el-input v-model="ruleForm.piece"></el-input> 370 + <el-input type="number" v-model="ruleForm.piece"></el-input>
347 </el-form-item> 371 </el-form-item>
348 </el-col> 372 </el-col>
349 <el-col :span="6"> 373 <el-col :span="6">
350 <el-form-item label="舱单重量" prop="weight"> 374 <el-form-item label="舱单重量" prop="weight">
351 - <el-input v-model="ruleForm.weight"></el-input> 375 + <el-input type="number" v-model="ruleForm.weight"></el-input>
352 </el-form-item> 376 </el-form-item>
353 </el-col> 377 </el-col>
354 </el-row> 378 </el-row>
@@ -569,7 +593,7 @@ @@ -569,7 +593,7 @@
569 </el-col> 593 </el-col>
570 <el-col :span="2" class="pub"> 594 <el-col :span="2" class="pub">
571 <div class="grid-content"> 595 <div class="grid-content">
572 - <el-button type="primary" size="mini">返回</el-button> 596 + <el-button type="primary" @click="back" size="mini">返回</el-button>
573 </div> 597 </div>
574 </el-col> 598 </el-col>
575 <el-col :span="2.5" class="pub"> 599 <el-col :span="2.5" class="pub">
@@ -681,12 +705,23 @@ @@ -681,12 +705,23 @@
681 .pub { 705 .pub {
682 margin-right: 10px; 706 margin-right: 10px;
683 } 707 }
  708 + .el-dropdown {
  709 + vertical-align: top;
  710 + }
  711 + .el-dropdown + .el-dropdown {
  712 + margin-left: 15px;
  713 + }
  714 + .el-icon-arrow-down {
  715 + font-size: 12px;
  716 + }
684 </style> 717 </style>
685 718
686 <script> 719 <script>
687 import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201' 720 import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201'
688 import{addResponse,selectResponseList} from "../../api/InResponse"; 721 import{addResponse,selectResponseList} from "../../api/InResponse";
689 - 722 + import FileSaver from "file-saver";
  723 + import XLSX from "xlsx";
  724 + import htmlToPdf from "../../api/htmlToPdf"
690 export default { 725 export default {
691 data() { 726 data() {
692 /*初始数据*/ 727 /*初始数据*/
@@ -772,7 +807,7 @@ @@ -772,7 +807,7 @@
772 waybill:undefined, 807 waybill:undefined,
773 customText:undefined 808 customText:undefined
774 }, 809 },
775 - paymodel:[{value:'PP',label:'预付'},{value:'DP',label:'到付'}], 810 + paymodel:[{value:'PP',label:'预付'},{value:'CC',label:'到付'}],
776 customext5: [ 811 customext5: [
777 {value:'001',label:'普通货物'}, 812 {value:'001',label:'普通货物'},
778 {value:'002',label:'国际转运货物'}, 813 {value:'002',label:'国际转运货物'},
@@ -845,14 +880,43 @@ @@ -845,14 +880,43 @@
845 }, 880 },
846 udStatus:'', 881 udStatus:'',
847 loading:false, 882 loading:false,
848 - temprows:{  
849 - }, 883 + temprows:{},
850 dialogTableVisible:false, 884 dialogTableVisible:false,
851 - gridData:[] 885 + gridData:[],
  886 + tableloading:true,
  887 + htmlTitle:''
852 } 888 }
853 }, 889 },
854 methods: { 890 methods: {
855 - 891 + //导出PDF,EXCEL文件
  892 + handleCommand(command) {
  893 + if(command=='EXCEL'){
  894 + this.$message('正在为您下载' + command+'文件');
  895 + this.downLoad();
  896 + }else{
  897 + this.htmlTitle=this.defaultQuery.flightno+this.defaultQuery.flightdate;
  898 + htmlToPdf.downloadPDF(document.querySelector('#pdfDom'), this.htmlTitle)
  899 + this.$message('正在为您下载' + command+'文件');
  900 + //this.getPdf();
  901 + }
  902 + },
  903 + downLoad(){
  904 + var wb = XLSX.utils.table_to_book(document.querySelector(".table"));
  905 + var wbout = XLSX.write(wb, {
  906 + bookType: "xlsx",
  907 + bookSST: true,
  908 + type: "array"
  909 + });
  910 + try {
  911 + FileSaver.saveAs(
  912 + new Blob([wbout], { type: "application/octet-stream" }),
  913 + this.defaultQuery.flightno+this.defaultQuery.flightdate+ ".xlsx" // name+'.xlsx'表示导出的excel表格名字
  914 + );
  915 + } catch (e) {
  916 + if (typeof console !== "undefined") console.log(e, wbout);
  917 + }
  918 + return wbout;
  919 + },
856 //回执收发明细 920 //回执收发明细
857 handleDetail(index,row){ 921 handleDetail(index,row){
858 if(row.flightno.length>4){ 922 if(row.flightno.length>4){
@@ -889,7 +953,7 @@ @@ -889,7 +953,7 @@
889 :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报' 953 :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
890 :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':''; 954 :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
891 }, 955 },
892 - //发送舱单报按钮判定事件 956 + //发送舱单报按钮,删除,修改判定事件
893 btSendStatusFormater:(status) => { 957 btSendStatusFormater:(status) => {
894 if(status=='23' || status=='24'||status=='25'){ 958 if(status=='23' || status=='24'||status=='25'){
895 return true; 959 return true;
@@ -914,6 +978,7 @@ @@ -914,6 +978,7 @@
914 /*多选框功能*/ 978 /*多选框功能*/
915 handleSelectionChange(val) { 979 handleSelectionChange(val) {
916 this.multipleSelection = val; 980 this.multipleSelection = val;
  981 + console.log(val)
917 }, 982 },
918 /*编辑主单信息*/ 983 /*编辑主单信息*/
919 handleEdit(index, row){ 984 handleEdit(index, row){
@@ -922,6 +987,7 @@ @@ -922,6 +987,7 @@
922 this.FenStatus='ediAwbh'; 987 this.FenStatus='ediAwbh';
923 this.ruleForm=row; 988 this.ruleForm=row;
924 this.ruleForm.originstation=row.originstation+"-"+row.destinationstation; 989 this.ruleForm.originstation=row.originstation+"-"+row.destinationstation;
  990 + this.ruleForm.flightno=row.carrier+row.flightno;
925 this.FenQuery.awba=row.awba; 991 this.FenQuery.awba=row.awba;
926 this.FenQuery.flightno= row.flightno; 992 this.FenQuery.flightno= row.flightno;
927 this.FenQuery.flightdate=row.flightdate 993 this.FenQuery.flightdate=row.flightdate
@@ -1087,21 +1153,21 @@ @@ -1087,21 +1153,21 @@
1087 }, 1153 },
1088 /*获取默认值*/ 1154 /*获取默认值*/
1089 getDefaultData(){ 1155 getDefaultData(){
1090 - this.defaultQuery.flightno = this.$route.params.flightno;  
1091 - this.defaultQuery.flightdate = this.$route.params.flightdate;  
1092 - this.defaultQuery.originstation = this.$route.params.originstation;  
1093 - this.defaultQuery.destinationstation = this.$route.params.destinationstation;  
1094 - this.defaultQuery.awba=this.$route.params.awba; 1156 + this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
  1157 + this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
  1158 + this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
  1159 + this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
  1160 + this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
1095 }, 1161 },
1096 /*获取默认数据列表*/ 1162 /*获取默认数据列表*/
1097 getList(){ 1163 getList(){
1098 getMt1201List(this.defaultQuery).then(res =>{ 1164 getMt1201List(this.defaultQuery).then(res =>{
1099 - console.log(res);  
1100 this.sumNmmsCount=0; 1165 this.sumNmmsCount=0;
1101 this.sumNmmsPrice=0; 1166 this.sumNmmsPrice=0;
1102 this.sumNmmsWeight=0; 1167 this.sumNmmsWeight=0;
1103 let response=res.data.data; 1168 let response=res.data.data;
1104 this.tableData=response; 1169 this.tableData=response;
  1170 + this.tableloading=false;
1105 response.forEach((item,i) => { 1171 response.forEach((item,i) => {
1106 if(item.awba!=null&&item.awbh==""); 1172 if(item.awba!=null&&item.awbh=="");
1107 this.sumNmmsCount=Number(this.sumNmmsCount)+1; 1173 this.sumNmmsCount=Number(this.sumNmmsCount)+1;
@@ -1152,9 +1218,9 @@ @@ -1152,9 +1218,9 @@
1152 this.dialogStatus="create"; 1218 this.dialogStatus="create";
1153 this.outerVisible = true; 1219 this.outerVisible = true;
1154 this.FenStatus='ediAwbh'; 1220 this.FenStatus='ediAwbh';
1155 - this.ruleForm.flightno=this.$route.params.flightno;  
1156 - this.ruleForm.flightdate=this.$route.params.flightdate;  
1157 - this.ruleForm.originstation=this.$route.params.originstation+"-"+this.$route.params.destinationstation; 1221 + this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
  1222 + this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
  1223 + this.ruleForm.originstation=JSON.parse(this.$route.query.originstation)+"-"+JSON.parse(this.$route.query.destinationstation);
1158 }, 1224 },
1159 //新增原始分单 1225 //新增原始分单
1160 addFen(formName){ 1226 addFen(formName){
@@ -1226,15 +1292,18 @@ @@ -1226,15 +1292,18 @@
1226 }, 1292 },
1227 //分拨申请 1293 //分拨申请
1228 Importallocation(index,row){ 1294 Importallocation(index,row){
1229 - this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno.substr(2),awba:row.awba,flightdate:row.flightdate, 1295 + this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
1230 turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode}}); 1296 turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode}});
1231 1297
1232 }, 1298 },
1233 //分拨运抵 1299 //分拨运抵
1234 Allocatearrive(index,row){ 1300 Allocatearrive(index,row){
1235 - this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno.substr(2),awba:row.awba,flightdate:row.flightdate, 1301 + this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
1236 turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}}); 1302 turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}});
1237 - } 1303 + },
  1304 + back(){
  1305 + this.$router.go(-1);//返回上一层
  1306 + },
1238 1307
1239 }, 1308 },
1240 /*渲染方法*/ 1309 /*渲染方法*/
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
42 ref="multipleTable" 42 ref="multipleTable"
43 :data="tableData" 43 :data="tableData"
44 tooltip-effect="dark" 44 tooltip-effect="dark"
  45 + v-loading="tableLoading"
45 style="width: 100%" 46 style="width: 100%"
46 @selection-change="handleSelectionChange" 47 @selection-change="handleSelectionChange"
47 row-key="uuid" 48 row-key="uuid"
@@ -101,9 +102,22 @@ @@ -101,9 +102,22 @@
101 width="100" :formatter="formatStatus"> 102 width="100" :formatter="formatStatus">
102 </el-table-column> 103 </el-table-column>
103 <el-table-column 104 <el-table-column
104 - prop="ext5"  
105 - label="回执信息"  
106 - width="180"> 105 + label="回执内容"
  106 + width="250">
  107 + <template slot-scope="scope">
  108 + <span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  109 + {{scope.row.ext5}}
  110 + </span>
  111 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  112 + {{scope.row.ext5}}
  113 + </span>
  114 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  115 + {{scope.row.ext5}}
  116 + </span>
  117 + <span v-else style="color: #909399;">
  118 + {{scope.row.ext5}}
  119 + </span>
  120 + </template>
107 </el-table-column> 121 </el-table-column>
108 <el-table-column 122 <el-table-column
109 prop="operation" 123 prop="operation"
@@ -222,22 +236,22 @@ @@ -222,22 +236,22 @@
222 <el-row class="product"> 236 <el-row class="product">
223 <el-col :span="6"> 237 <el-col :span="6">
224 <el-form-item label="舱单件数" prop="pcs"> 238 <el-form-item label="舱单件数" prop="pcs">
225 - <el-input v-model="ruleForm.pcs"></el-input> 239 + <el-input type="number" v-model="ruleForm.pcs"></el-input>
226 </el-form-item> 240 </el-form-item>
227 </el-col> 241 </el-col>
228 <el-col :span="6"> 242 <el-col :span="6">
229 <el-form-item label="舱单重量" prop="wei"> 243 <el-form-item label="舱单重量" prop="wei">
230 - <el-input v-model="ruleForm.wei"></el-input> 244 + <el-input type="number" v-model="ruleForm.wei"></el-input>
231 </el-form-item> 245 </el-form-item>
232 </el-col> 246 </el-col>
233 <el-col :span="6"> 247 <el-col :span="6">
234 <el-form-item label="理货件数" prop="piece"> 248 <el-form-item label="理货件数" prop="piece">
235 - <el-input v-model="ruleForm.piece"></el-input> 249 + <el-input type="number" v-model="ruleForm.piece"></el-input>
236 </el-form-item> 250 </el-form-item>
237 </el-col> 251 </el-col>
238 <el-col :span="6"> 252 <el-col :span="6">
239 <el-form-item label="理货重量" prop="weight"> 253 <el-form-item label="理货重量" prop="weight">
240 - <el-input v-model="ruleForm.weight"></el-input> 254 + <el-input type="number" v-model="ruleForm.weight"></el-input>
241 </el-form-item> 255 </el-form-item>
242 </el-col> 256 </el-col>
243 </el-row> 257 </el-row>
@@ -336,7 +350,7 @@ @@ -336,7 +350,7 @@
336 <el-row> 350 <el-row>
337 <el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col> 351 <el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col>
338 <el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini">批量发送删除报</el-button></div></el-col> 352 <el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini">批量发送删除报</el-button></div></el-col>
339 - <el-col :span="2"><div class="grid-content"><el-button type="primary" size="mini">返回</el-button></div></el-col> 353 + <el-col :span="2"><div class="grid-content"><el-button type="primary" @click="back" size="mini">返回</el-button></div></el-col>
340 <el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col> 354 <el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col>
341 <el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col> 355 <el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col>
342 <el-col :span="4"><div class="grid-content"><span>理货总重量:{{sumNmmsWeight}}</span></div></el-col> 356 <el-col :span="4"><div class="grid-content"><span>理货总重量:{{sumNmmsWeight}}</span></div></el-col>
@@ -435,7 +449,7 @@ @@ -435,7 +449,7 @@
435 flightdate:undefined, 449 flightdate:undefined,
436 originstation:undefined, 450 originstation:undefined,
437 destinationstation:undefined, 451 destinationstation:undefined,
438 - awba:undefined 452 + awba:undefined,
439 }, 453 },
440 tableData: [], 454 tableData: [],
441 tableData2: [], 455 tableData2: [],
@@ -517,6 +531,7 @@ @@ -517,6 +531,7 @@
517 loading:false, 531 loading:false,
518 dialogTableVisible:false, 532 dialogTableVisible:false,
519 gridData:[], 533 gridData:[],
  534 + tableLoading:false
520 } 535 }
521 }, 536 },
522 methods: { 537 methods: {
@@ -688,6 +703,7 @@ @@ -688,6 +703,7 @@
688 this.dialogStatus='update'; 703 this.dialogStatus='update';
689 this.FenStatus='ediAwbh'; 704 this.FenStatus='ediAwbh';
690 this.ruleForm=row; 705 this.ruleForm=row;
  706 + this.ruleForm.flightno=row.carrier+row.flightno;
691 }, 707 },
692 //编辑分单 708 //编辑分单
693 handleFen(index,row){ 709 handleFen(index,row){
@@ -705,20 +721,22 @@ @@ -705,20 +721,22 @@
705 }, 721 },
706 //获取默认值 722 //获取默认值
707 getDefaultData(){ 723 getDefaultData(){
708 - this.defaultQuery.flightno=this.$route.params.flightno;  
709 - this.defaultQuery.flightdate=this.$route.params.flightdate;  
710 - this.defaultQuery.originstation=this.$route.params.originstation;  
711 - this.defaultQuery.destinationstation=this.$route.params.destinationstation; 724 + this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
  725 + this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
  726 + this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
  727 + this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
  728 + this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
712 }, 729 },
713 //获取进港理货列表 730 //获取进港理货列表
714 getMt5201List(){ 731 getMt5201List(){
  732 + this.tableLoading=true;
715 getMt5201List(this.defaultQuery).then(res =>{ 733 getMt5201List(this.defaultQuery).then(res =>{
716 this.sumNmmsCount=0; 734 this.sumNmmsCount=0;
717 this.sumNmmsPrice=0; 735 this.sumNmmsPrice=0;
718 this.sumNmmsWeight=0; 736 this.sumNmmsWeight=0;
719 let response=res.data.data; 737 let response=res.data.data;
720 - console.log(res)  
721 this.tableData=response; 738 this.tableData=response;
  739 + this.tableLoading=false;
722 response.forEach((item,i) => { 740 response.forEach((item,i) => {
723 if(item.awba!=null&&item.awbh==""); 741 if(item.awba!=null&&item.awbh=="");
724 this.sumNmmsCount=Number(this.sumNmmsCount)+1; 742 this.sumNmmsCount=Number(this.sumNmmsCount)+1;
@@ -732,10 +750,10 @@ @@ -732,10 +750,10 @@
732 this.outerVisible = true; 750 this.outerVisible = true;
733 this.dialogStatus="create"; 751 this.dialogStatus="create";
734 this.FenStatus='ediAwbh'; 752 this.FenStatus='ediAwbh';
735 - this.ruleForm.flightno=this.$route.params.flightno;  
736 - this.ruleForm.flightdate=this.$route.params.flightdate;  
737 - this.ruleForm.originstation=this.$route.params.originstation;  
738 - this.ruleForm.destinationstation=this.$route.params.destinationstation; 753 + this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
  754 + this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
  755 + this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
  756 + this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
739 }, 757 },
740 //新增原始舱单数据 758 //新增原始舱单数据
741 createData(formName){ 759 createData(formName){
@@ -789,6 +807,9 @@ @@ -789,6 +807,9 @@
789 } 807 }
790 }); 808 });
791 }, 809 },
  810 + back(){
  811 + this.$router.go(-1);//返回上一层
  812 + },
792 }, 813 },
793 //渲染方法 814 //渲染方法
794 mounted(){ 815 mounted(){
@@ -67,9 +67,9 @@ @@ -67,9 +67,9 @@
67 <el-col :span="8" style="margin-right: 0px"> 67 <el-col :span="8" style="margin-right: 0px">
68 <el-button type="primary" v-on:click="QueryData">查询</el-button> 68 <el-button type="primary" v-on:click="QueryData">查询</el-button>
69 </el-col> 69 </el-col>
70 - <el-col :span="16" style="margin-right: 0px"> 70 + <!--<el-col :span="16" style="margin-right: 0px">
71 <el-button type="primary">批量修改状态</el-button> 71 <el-button type="primary">批量修改状态</el-button>
72 - </el-col> 72 + </el-col>-->
73 </el-col> 73 </el-col>
74 </el-row> 74 </el-row>
75 <!--查询结果样式--> 75 <!--查询结果样式-->
@@ -85,6 +85,7 @@ @@ -85,6 +85,7 @@
85 <el-col :span="24"> 85 <el-col :span="24">
86 <template> 86 <template>
87 <el-table 87 <el-table
  88 + v-loading="tableloading"
88 ref="multipleTable" 89 ref="multipleTable"
89 :data="tableData" 90 :data="tableData"
90 tooltip-effect="dark" 91 tooltip-effect="dark"
@@ -128,10 +129,23 @@ @@ -128,10 +129,23 @@
128 </template> 129 </template>
129 </el-table-column> 130 </el-table-column>
130 <el-table-column 131 <el-table-column
131 - prop="awba"  
132 label="主单号" 132 label="主单号"
133 width="115" 133 width="115"
134 > 134 >
  135 + <template slot-scope="scope">
  136 + <span v-if="scope.row.stype=='MT1201'&&scope.row.awbh==''" style="background-color:#67C23A;width: 100%;height:100%;display:block">
  137 + {{scope.row.awba}}
  138 + </span>
  139 + <span v-else-if="scope.row.stype=='MT1201'&&scope.row.awbh!=''" style="background-color:#409eff;width: 100%;height:100%;display:block;">
  140 + {{scope.row.awba}}
  141 + </span>
  142 + <span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh==''" style="background-color:#FF8C00;width: 100%;height:100%;display:block;">
  143 + {{scope.row.awba}}
  144 + </span>
  145 + <span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh!=''" style="background-color:#e6a23c;width: 100%;height:100%;display:block;">
  146 + {{scope.row.awba}}
  147 + </span>
  148 + </template>
135 </el-table-column> 149 </el-table-column>
136 <el-table-column 150 <el-table-column
137 prop="awbh" 151 prop="awbh"
@@ -165,9 +179,22 @@ @@ -165,9 +179,22 @@
165 width="90" :formatter="formatStatus"> 179 width="90" :formatter="formatStatus">
166 </el-table-column> 180 </el-table-column>
167 <el-table-column 181 <el-table-column
168 - prop="ext5"  
169 label="回执内容" 182 label="回执内容"
170 width="250"> 183 width="250">
  184 + <template slot-scope="scope">
  185 + <span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  186 + {{scope.row.ext5}}
  187 + </span>
  188 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  189 + {{scope.row.ext5}}
  190 + </span>
  191 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  192 + {{scope.row.ext5}}
  193 + </span>
  194 + <span v-else style="color: #909399;">
  195 + {{scope.row.ext5}}
  196 + </span>
  197 + </template>
171 </el-table-column> 198 </el-table-column>
172 </el-table> 199 </el-table>
173 </template> 200 </template>
@@ -201,10 +228,10 @@ @@ -201,10 +228,10 @@
201 .sel{display: inline;} 228 .sel{display: inline;}
202 .mark{height:24px;} 229 .mark{height:24px;}
203 .bg{height:24px;text-align: center;line-height:24px;min-height: 24px} 230 .bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
204 - .mainse{background: #5BB75B}  
205 - .fense{background-color: #12B399}  
206 - .tallse{background-color: #FA9403}  
207 - .tallfense{background-color: #C55124} 231 + .mainse{background: #67C23A}
  232 + .fense{background-color: #409eff}
  233 + .tallse{background-color: #FF8C00}
  234 + .tallfense{background-color: #e6a23c}
208 .cell{background: #5BB75B} 235 .cell{background: #5BB75B}
209 .cell2{background-color: #12B399} 236 .cell2{background-color: #12B399}
210 .el-input-group{ 237 .el-input-group{
@@ -253,7 +280,8 @@ @@ -253,7 +280,8 @@
253 multipleSelection: [], 280 multipleSelection: [],
254 currentPage:1, 281 currentPage:1,
255 pageSize:100, 282 pageSize:100,
256 - total:0 283 + total:0,
  284 + tableloading:false
257 } 285 }
258 }, 286 },
259 methods:{ 287 methods:{
@@ -282,22 +310,22 @@ @@ -282,22 +310,22 @@
282 QueryData(){ 310 QueryData(){
283 let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier, 311 let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier,
284 flightno:this.defaultQuery.flightno,flightdate:this.defaultQuery.flightdate,status:this.defaultQuery.status,messageType:this.defaultQuery.messageType}; 312 flightno:this.defaultQuery.flightno,flightdate:this.defaultQuery.flightdate,status:this.defaultQuery.status,messageType:this.defaultQuery.messageType};
285 - this.listLoading = true; 313 + this.tableloading=true;
286 QueryData(params).then(res =>{ 314 QueryData(params).then(res =>{
287 - console.log(res)  
288 let response=res.data.data; 315 let response=res.data.data;
  316 + console.log(response)
289 this.tableData=response.list; 317 this.tableData=response.list;
290 this.total=response.total; 318 this.total=response.total;
291 - this.listLoading = false; 319 + this.tableloading = false;
292 }); 320 });
293 }, 321 },
294 //点击进入原始页面 322 //点击进入原始页面
295 handleClick(row){ 323 handleClick(row){
296 - this.$router.push({name:'进港原始舱单',params:{flightno:row.carrier+row.flightno,destinationstation:row.destinationstation,awba:row.awba,flightdate:row.flightdate,originstation:row.originstation}}); 324 + this.$router.push({path:'/origmaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)}});
297 }, 325 },
298 //点击进入理货页面 326 //点击进入理货页面
299 handleTally(row){ 327 handleTally(row){
300 - this.$router.push({name:'进港理货舱单',params:{flightno:row.carrier+row.flightno,destinationstation:row.destinationstation,awba:row.awba,flightdate:row.flightdate,originstation:row.originstation}}); 328 + this.$router.push({path:'/tallymaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)}});
301 }, 329 },
302 //table显示时间转换 330 //table显示时间转换
303 timestampToTime(timestamp) { 331 timestampToTime(timestamp) {