|
|
@ -632,6 +632,7 @@ |
|
|
import {getBuList}from '@/api/factory/site.js' |
|
|
import {getBuList}from '@/api/factory/site.js' |
|
|
import excel from "@/utils/excel-util.js"; |
|
|
import excel from "@/utils/excel-util.js"; |
|
|
import excelOpts from '@/utils/export-options.js' |
|
|
import excelOpts from '@/utils/export-options.js' |
|
|
|
|
|
import ExportUtil from "@/utils/export"; |
|
|
import { getTableUserListLanguage} from "@/api/table.js" |
|
|
import { getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage} from "../../../api/table"; |
|
|
import {getTableDefaultListLanguage} from "../../../api/table"; |
|
|
export default { |
|
|
export default { |
|
|
@ -2141,28 +2142,32 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
async exportExcel() { |
|
|
async exportExcel() { |
|
|
let searchData={ |
|
|
|
|
|
|
|
|
if(this.currentRow.site===''||this.currentRow.site==null){ |
|
|
|
|
|
this.$alert('请先选择发货通知单!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let exportParam = { |
|
|
site: this.currentRow.site, |
|
|
site: this.currentRow.site, |
|
|
buNo: this.currentRow.buNo, |
|
|
buNo: this.currentRow.buNo, |
|
|
delNo: this.currentRow.delNo, |
|
|
delNo: this.currentRow.delNo, |
|
|
cmcInvoice: this.currentRow.cmcInvoice, |
|
|
cmcInvoice: this.currentRow.cmcInvoice, |
|
|
shippingMode: this.currentRow.shippingMode, |
|
|
shippingMode: this.currentRow.shippingMode, |
|
|
destination : this.currentRow.destination, |
|
|
destination : this.currentRow.destination, |
|
|
|
|
|
readyDate: this.currentRow.readyDate, // 增加ReadyDate列 |
|
|
|
|
|
remark: this.currentRow.remark, // 增加备注列 |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 先导出Excel |
|
|
|
|
|
await excel.exportTable({ |
|
|
|
|
|
url: "/ecss/coDel/searchCoDelPalletList", |
|
|
|
|
|
columnMapping: excelOpts.PalletSku.columnMapping,//可以直接用table,不需要的列就剔除 |
|
|
|
|
|
mergeSetting: [],//需要合并的列 |
|
|
|
|
|
params: searchData, |
|
|
|
|
|
fileName: "装箱数据导入模版.xlsx", |
|
|
|
|
|
rowFetcher: res => res.data, |
|
|
|
|
|
columnFormatter: [], |
|
|
|
|
|
dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列 |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 使用后台Excel模版导出 |
|
|
|
|
|
ExportUtil.export( |
|
|
|
|
|
"/ecss/coDel/exportPackingTemplate", |
|
|
|
|
|
exportParam, |
|
|
|
|
|
this.currentRow.cmcInvoice + "装箱数据.xlsx" |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
// 导出成功后更新export_flag字段 |
|
|
// 导出成功后更新export_flag字段 |
|
|
let updateData = { |
|
|
let updateData = { |
|
|
@ -2179,6 +2184,11 @@ |
|
|
this.currentRow.exportFlag = 'Y'; |
|
|
this.currentRow.exportFlag = 'Y'; |
|
|
// 刷新表格数据 |
|
|
// 刷新表格数据 |
|
|
this.searchTable(); |
|
|
this.searchTable(); |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '导出成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500 |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
this.$message.warning('导出成功,但更新导出状态失败:' + data.msg); |
|
|
this.$message.warning('导出成功,但更新导出状态失败:' + data.msg); |
|
|
} |
|
|
} |
|
|
|