...
|
...
|
@@ -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}}
|
...
|
...
|
@@ -119,9 +130,22 @@ |
|
|
width="100" :formatter="formatStatus">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="customText"
|
|
|
label="回执信息"
|
|
|
width="180">
|
|
|
label="回执内容"
|
|
|
width="250">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
|
|
|
{{scope.row.ext5}}
|
|
|
</span>
|
|
|
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
|
|
|
{{scope.row.ext5}}
|
|
|
</span>
|
|
|
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
|
|
|
{{scope.row.ext5}}
|
|
|
</span>
|
|
|
<span v-else style="color: #909399;">
|
|
|
{{scope.row.ext5}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="operation"
|
...
|
...
|
@@ -333,22 +357,22 @@ |
|
|
<el-row class="product">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="总件数" prop="awbinfo.pcs">
|
|
|
<el-input v-model="ruleForm.awbinfo.pcs" ></el-input>
|
|
|
<el-input type="number" v-model="ruleForm.awbinfo.pcs" ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="总重量" prop="awbinfo.weight">
|
|
|
<el-input v-model="ruleForm.awbinfo.weight"></el-input>
|
|
|
<el-input type="number" v-model="ruleForm.awbinfo.weight"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="舱单件数" prop="piece">
|
|
|
<el-input v-model="ruleForm.piece"></el-input>
|
|
|
<el-input type="number" v-model="ruleForm.piece"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="舱单重量" prop="weight">
|
|
|
<el-input v-model="ruleForm.weight"></el-input>
|
|
|
<el-input type="number" v-model="ruleForm.weight"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
...
|
...
|
@@ -569,7 +593,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 +705,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() {
|
|
|
/*初始数据*/
|
...
|
...
|
@@ -772,7 +807,7 @@ |
|
|
waybill:undefined,
|
|
|
customText:undefined
|
|
|
},
|
|
|
paymodel:[{value:'PP',label:'预付'},{value:'DP',label:'到付'}],
|
|
|
paymodel:[{value:'PP',label:'预付'},{value:'CC',label:'到付'}],
|
|
|
customext5: [
|
|
|
{value:'001',label:'普通货物'},
|
|
|
{value:'002',label:'国际转运货物'},
|
...
|
...
|
@@ -845,14 +880,43 @@ |
|
|
},
|
|
|
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{
|
|
|
this.htmlTitle=this.defaultQuery.flightno+this.defaultQuery.flightdate;
|
|
|
htmlToPdf.downloadPDF(document.querySelector('#pdfDom'), this.htmlTitle)
|
|
|
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){
|
...
|
...
|
@@ -889,7 +953,7 @@ |
|
|
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
|
|
|
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
|
|
|
},
|
|
|
//发送舱单报按钮判定事件
|
|
|
//发送舱单报按钮,删除,修改判定事件
|
|
|
btSendStatusFormater:(status) => {
|
|
|
if(status=='23' || status=='24'||status=='25'){
|
|
|
return true;
|
...
|
...
|
@@ -914,6 +978,7 @@ |
|
|
/*多选框功能*/
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
console.log(val)
|
|
|
},
|
|
|
/*编辑主单信息*/
|
|
|
handleEdit(index, row){
|
...
|
...
|
@@ -922,6 +987,7 @@ |
|
|
this.FenStatus='ediAwbh';
|
|
|
this.ruleForm=row;
|
|
|
this.ruleForm.originstation=row.originstation+"-"+row.destinationstation;
|
|
|
this.ruleForm.flightno=row.carrier+row.flightno;
|
|
|
this.FenQuery.awba=row.awba;
|
|
|
this.FenQuery.flightno= row.flightno;
|
|
|
this.FenQuery.flightdate=row.flightdate
|
...
|
...
|
@@ -1087,21 +1153,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 +1218,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){
|
...
|
...
|
@@ -1226,15 +1292,18 @@ |
|
|
},
|
|
|
//分拨申请
|
|
|
Importallocation(index,row){
|
|
|
this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno.substr(2),awba:row.awba,flightdate:row.flightdate,
|
|
|
this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
|
|
|
turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode}});
|
|
|
|
|
|
},
|
|
|
//分拨运抵
|
|
|
Allocatearrive(index,row){
|
|
|
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno.substr(2),awba:row.awba,flightdate:row.flightdate,
|
|
|
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno,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);//返回上一层
|
|
|
},
|
|
|
|
|
|
},
|
|
|
/*渲染方法*/
|
...
|
...
|
|