jinhui.wang

货物查询样式更新

......@@ -45,3 +45,11 @@ export function findFltCommonConf(data) {
})
}
export function updateStatusBatch(data){
return request({
url: '/FlightPreserveController/updateStatusBatch',
method: 'post',
data: data
})
}
......
......@@ -5,7 +5,7 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/IMAC2' // uat服务器
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/IMAC2' //uat服务器
const baseUrl = 'http://47.103.140.98:9002' //阿里云服务器
// const baseUrl = 'http://192.168.1.134:18080' //测试服务器
export function downLoadZip(str, filename) {
......@@ -19,18 +19,23 @@ export function downLoadZip(str, filename) {
resolveBlob(res, mimeMap.zip)
})
}
export function cargoXlsx(str,data) {
export function cargoXlsx(str, data) {
var url = baseUrl + str
return new Promise((resolve,rej)=>{
axios({
method: 'post',
url: url,
data:data,
data: data,
responseType: 'blob',
headers: { 'Authorization': getToken() }
}).then(res => {
if(res.status === 200){
if (res.status === 200) {
cargoTableXlsx(res)
}
resolve()
}).catch((err)=>{
rej(err)
})
})
}
/**
......@@ -55,10 +60,10 @@ export function resolveBlob(res, mimeType) {
}
//货物查询表导出
export function cargoTableXlsx(res){
export function cargoTableXlsx(val) {
const aLink = document.createElement('a')
const fileName = "货物查询表.xlsx"
aLink.href = URL.createObjectURL(res.data)
aLink.href = URL.createObjectURL(val.data)
aLink.setAttribute('download', fileName) // 设置下载文件名称
document.body.appendChild(aLink)
aLink.click()
......
<template>
<div class="cargoPage" v-loading="downloading">
<div class="cargoPage">
<el-form
ref="cargoForm"
size="small"
......@@ -8,7 +8,7 @@
label-width="auto"
style="margin: 10px; width: 100%"
>
<el-row type="flex" style="flexWrap: wrap!important;margin:0 20px">
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="配舱航班日期:">
<el-date-picker
......@@ -300,16 +300,17 @@
type="primary"
icon="el-icon-search"
size="small"
:loading="tableLoading"
@click="select"
>查询</el-button
>
<el-button type="primary" size="small" @click="checks(tableData)"
>全选/全否</el-button
>
<el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0"
<el-button type="primary" size="small" @click="xlse(0)" v-dbClick :disabled="tableData.length==0" :loading="downloading"
>导出本页查询结果</el-button
>
<el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0"
<el-button type="primary" size="small" @click="xlse(1)" v-dbClick :disabled="tableData.length==0" :loading="downloading"
>导出全部查询结果</el-button
>
<div class="tips">
......@@ -323,6 +324,7 @@
:data="tableData"
v-loading="tableLoading"
highlight-current-row border stripe
height="500"
size="mini"
@select="cheacked"
@select-all="selectAll"
......@@ -392,50 +394,50 @@ export default {
cargoPlaneEnd:null,
}, //表单数据
tableHeader: [
{ name: "口岸代码", value: "portName" },
{ name: "取件日期", value: "pickUpDate" },
{ name: "取件扫描号", value: "pickUpScanNo" },
{ name: "服务类型", value: "serviceTypeName" },
{ name: "站点", value: "siteName" },
{ name: "运单号", value: "waybillNo" },
{ name: "总单号", value: "totalWaybillNo" },
{ name: "服务类型", value: "serviceTypeName" },
{ name: "URSA", value: "ursa" },
{ name: "申报类型", value: "typeName" },
{ name: "HandlingCode", value: "handingCode" },
{ name: "subcategory", value: "subCategory" },
{ name: "件数", value: "qty" },
{ name: "实际重量", value: "actualWeight" },
{ name: "收件人国家代码", value: "consigneeCountry" },
{ name: "品名描述", value: "nameDescription" },
{ name: "海关回执状态", value: "customsReceiptStatusName" },
{ name: "预审状态", value: "preQualificationStatus" },
{ name: "航班预审意见", value: "caPretrialOpinion" },
{ name: "货物状态", value: "statusName" },
{ name: "终配航班号", value: "finalFlightNo" },
{ name: "终配航班日期", value: "finalFlightTime" },
{ name: "二配航班号", value: "twoMatchFlightNo" },
{ name: "二配航班日期", value: "twoMatchFlightTime" },
{ name: "预配航班号", value: "preplanFlightNo" },
{ name: "预配航班日期", value: "preplanFlightTime" },
{ name: "ACCS原航班号", value: "fltNoAccs" },
{ name: "ACCS原航班日期", value: "fltDateAccs" },
{ name: "ACCS原航线", value: "accsFlightRoute" },
{ name: "预配航班日期", value: "preplanFlightTime" },
{ name: "预配航班号", value: "preplanFlightNo" },
{ name: "二配航班日期", value: "twoMatchFlightTime" },
{ name: "二配航班号", value: "twoMatchFlightNo" },
{ name: "终配航班日期", value: "finalFlightTime" },
{ name: "终配航班号", value: "finalFlightNo" },
{ name: "件数", value: "qty" },
{ name: "实际重量", value: "actualWeight" },
{ name: "申报类型", value: "typeName" },
{ name: "口岸代码", value: "portName" },
{ name: "subcategory", value: "subCategory" },
{ name: "是否RDE手工录入", value: "manualRde" },
{ name: "是否自动", value: "cargoRulesStatus" },
{ name: "发件人账号", value: "shipperAccount" },
{ name: "发件公司中文名称", value: "shipperCompany" },
{ name: "是否RDE手工录入", value: "manualRde" },
{ name: "HandlingCode", value: "handingCode" },
{ name: "品名描述", value: "nameDescription" },
{ name: "站点", value: "siteName" },
{ name: "始发地城市名称", value: "originCity" },
{ name: "收件地", value: "destinationSiteName" },
{ name: "收件人国家代码", value: "consigneeCountry" },
{ name: "URSA", value: "ursa" },
{ name: "尺寸", value: "sizeStr" },
{ name: "海关回执状态", value: "customsReceiptStatusName" },
{ name: "海关回执时间", value: "customsReceiptTime" },
{ name: "预审状态", value: "preQualificationStatus" },
{ name: "CA预审意见", value: "caPretrialOpinion" },
{ name: "CA预审时间", value: "caPretrialTime" },
{
name: "大货预审意见(是否可以配置CA航班)",
value: "bigPretrialOpinion",
},
{ name: "大货预审时间", value: "bigPretrialTime" },
{ name: "创建人", value: "createUserId" },
{ name: "海关回执时间", value: "customsReceiptTime" },
{ name: "航班预审时间", value: "caPretrialTime" },
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
{ name: "是否自动", value: "cargoRulesStatus" },
], //表头数据
findConditionData: {}, //货物查询条件
tableData: [], //表格数据
......@@ -647,6 +649,7 @@ export default {
},
// 导出表格
xlse(page) {
this.downloading = true;
let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
this.formData.customsReceiptStatusId = null;
......@@ -688,7 +691,11 @@ export default {
cargoXlse.cargoConditionDto.limitStart = 0;
cargoXlse.cargoConditionDto.limitSize = -1;
}
cargoXlsx("/cargo/excel",cargoXlse)
cargoXlsx("/cargo/excel",cargoXlse).then(()=>{
this.downloading = false;
}).catch(()=>{
this.downloading = false;
})
},
//表格格式化
formatter(row,column,cellValue,index){
......