Browse Source

箱单导出

java8
han\hanst 3 months ago
parent
commit
002933b2b9
  1. 34
      src/views/modules/ecss/codelnotifyConfirm.vue

34
src/views/modules/ecss/codelnotifyConfirm.vue

@ -632,6 +632,7 @@
import {getBuList}from '@/api/factory/site.js'
import excel from "@/utils/excel-util.js";
import excelOpts from '@/utils/export-options.js'
import ExportUtil from "@/utils/export";
import { getTableUserListLanguage} from "@/api/table.js"
import {getTableDefaultListLanguage} from "../../../api/table";
export default {
@ -2141,28 +2142,32 @@
})
},
async exportExcel() {
let searchData={
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
})
return false
}
let exportParam = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
cmcInvoice: this.currentRow.cmcInvoice,
shippingMode: this.currentRow.shippingMode,
destination : this.currentRow.destination,
readyDate: this.currentRow.readyDate, // ReadyDate
remark: this.currentRow.remark, //
createBy: this.$store.state.user.name,
}
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
let updateData = {
@ -2179,6 +2184,11 @@
this.currentRow.exportFlag = 'Y';
//
this.searchTable();
this.$message({
message: '导出成功',
type: 'success',
duration: 1500
});
} else {
this.$message.warning('导出成功,但更新导出状态失败:' + data.msg);
}

Loading…
Cancel
Save