...
|
...
|
@@ -42,7 +42,15 @@ |
|
|
</el-col>
|
|
|
<el-col :span="4" class="pub">
|
|
|
<div class="grid-content">
|
|
|
<el-button type="primary" size="mini">导出PDF</el-button>
|
|
|
<el-dropdown @command="handleCommand">
|
|
|
<el-button size="mini" type="primary">
|
|
|
导出文件<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="PDF">导出PDF</el-dropdown-item>
|
|
|
<el-dropdown-item command="EXCEL">导出EXCEL</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</div>
|
...
|
...
|
@@ -58,6 +66,9 @@ |
|
|
<el-col :span="24">
|
|
|
<template>
|
|
|
<el-table
|
|
|
class="table"
|
|
|
id="pdfDom"
|
|
|
v-loading="tableloading"
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
|
tooltip-effect="dark"
|
...
|
...
|
@@ -74,7 +85,7 @@ |
|
|
<el-table-column
|
|
|
label="运单号"
|
|
|
width="185"
|
|
|
show-overflow-tooltip>
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.awbh==''||scope.row.awbh==null">
|
|
|
{{scope.row.awba}}
|
...
|
...
|
@@ -569,7 +580,7 @@ |
|
|
</el-col>
|
|
|
<el-col :span="2" class="pub">
|
|
|
<div class="grid-content">
|
|
|
<el-button type="primary" size="mini">返回</el-button>
|
|
|
<el-button type="primary" @click="back" size="mini">返回</el-button>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="2.5" class="pub">
|
...
|
...
|
@@ -681,12 +692,23 @@ |
|
|
.pub {
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
.el-dropdown {
|
|
|
vertical-align: top;
|
|
|
}
|
|
|
.el-dropdown + .el-dropdown {
|
|
|
margin-left: 15px;
|
|
|
}
|
|
|
.el-icon-arrow-down {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<script>
|
|
|
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201'
|
|
|
import{addResponse,selectResponseList} from "../../api/InResponse";
|
|
|
|
|
|
import FileSaver from "file-saver";
|
|
|
import XLSX from "xlsx";
|
|
|
/*import htmlToPdf from "../../api/htmlToPdf"*/
|
|
|
export default {
|
|
|
data() {
|
|
|
/*初始数据*/
|
...
|
...
|
@@ -845,14 +867,42 @@ |
|
|
},
|
|
|
udStatus:'',
|
|
|
loading:false,
|
|
|
temprows:{
|
|
|
},
|
|
|
temprows:{},
|
|
|
dialogTableVisible:false,
|
|
|
gridData:[]
|
|
|
gridData:[],
|
|
|
tableloading:true,
|
|
|
htmlTitle:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
//导出PDF,EXCEL文件
|
|
|
handleCommand(command) {
|
|
|
if(command='EXCEL'){
|
|
|
this.$message('正在为您下载' + command+'文件');
|
|
|
this.downLoad();
|
|
|
}else if(command='PDF'){
|
|
|
this.htmlTitle=this.defaultQuery.flightno+this.defaultQuery.flightdate;
|
|
|
this.$message('正在为您下载' + command+'文件');
|
|
|
//this.getPdf();
|
|
|
}
|
|
|
},
|
|
|
downLoad(){
|
|
|
var wb = XLSX.utils.table_to_book(document.querySelector(".table"));
|
|
|
var wbout = XLSX.write(wb, {
|
|
|
bookType: "xlsx",
|
|
|
bookSST: true,
|
|
|
type: "array"
|
|
|
});
|
|
|
try {
|
|
|
FileSaver.saveAs(
|
|
|
new Blob([wbout], { type: "application/octet-stream" }),
|
|
|
this.defaultQuery.flightno+this.defaultQuery.flightdate+ ".xlsx" // name+'.xlsx'表示导出的excel表格名字
|
|
|
);
|
|
|
} catch (e) {
|
|
|
if (typeof console !== "undefined") console.log(e, wbout);
|
|
|
}
|
|
|
return wbout;
|
|
|
},
|
|
|
//回执收发明细
|
|
|
handleDetail(index,row){
|
|
|
if(row.flightno.length>4){
|
...
|
...
|
@@ -914,6 +964,7 @@ |
|
|
/*多选框功能*/
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
console.log(val)
|
|
|
},
|
|
|
/*编辑主单信息*/
|
|
|
handleEdit(index, row){
|
...
|
...
|
@@ -1087,21 +1138,21 @@ |
|
|
},
|
|
|
/*获取默认值*/
|
|
|
getDefaultData(){
|
|
|
this.defaultQuery.flightno = this.$route.params.flightno;
|
|
|
this.defaultQuery.flightdate = this.$route.params.flightdate;
|
|
|
this.defaultQuery.originstation = this.$route.params.originstation;
|
|
|
this.defaultQuery.destinationstation = this.$route.params.destinationstation;
|
|
|
this.defaultQuery.awba=this.$route.params.awba;
|
|
|
this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
|
|
|
this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
|
|
|
this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
|
|
|
this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
|
|
|
this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
|
|
|
},
|
|
|
/*获取默认数据列表*/
|
|
|
getList(){
|
|
|
getMt1201List(this.defaultQuery).then(res =>{
|
|
|
console.log(res);
|
|
|
this.sumNmmsCount=0;
|
|
|
this.sumNmmsPrice=0;
|
|
|
this.sumNmmsWeight=0;
|
|
|
let response=res.data.data;
|
|
|
this.tableData=response;
|
|
|
this.tableloading=false;
|
|
|
response.forEach((item,i) => {
|
|
|
if(item.awba!=null&&item.awbh=="");
|
|
|
this.sumNmmsCount=Number(this.sumNmmsCount)+1;
|
...
|
...
|
@@ -1152,9 +1203,9 @@ |
|
|
this.dialogStatus="create";
|
|
|
this.outerVisible = true;
|
|
|
this.FenStatus='ediAwbh';
|
|
|
this.ruleForm.flightno=this.$route.params.flightno;
|
|
|
this.ruleForm.flightdate=this.$route.params.flightdate;
|
|
|
this.ruleForm.originstation=this.$route.params.originstation+"-"+this.$route.params.destinationstation;
|
|
|
this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
|
|
|
this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
|
|
|
this.ruleForm.originstation=JSON.parse(this.$route.query.originstation)+"-"+JSON.parse(this.$route.query.destinationstation);
|
|
|
},
|
|
|
//新增原始分单
|
|
|
addFen(formName){
|
...
|
...
|
@@ -1234,7 +1285,10 @@ |
|
|
Allocatearrive(index,row){
|
|
|
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno.substr(2),awba:row.awba,flightdate:row.flightdate,
|
|
|
turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}});
|
|
|
}
|
|
|
},
|
|
|
back(){
|
|
|
this.$router.go(-1);//返回上一层
|
|
|
},
|
|
|
|
|
|
},
|
|
|
/*渲染方法*/
|
...
|
...
|
|