Browse Source

导出文件名修改

java8
han\hanst 3 months ago
parent
commit
4e0fa586d6
  1. 32
      src/views/modules/ecss/codelnotify.vue
  2. 14
      src/views/modules/ecss/declaration.vue

32
src/views/modules/ecss/codelnotify.vue

@ -1791,7 +1791,7 @@
this.dataList.forEach(o => { this.dataList.forEach(o => {
o.modifyLabel = !!o.modifyFlag?'是':''; o.modifyLabel = !!o.modifyFlag?'是':'';
}); });
// 使 $nextTick DOM // 使 $nextTick DOM
this.$nextTick(() => { this.$nextTick(() => {
try { try {
@ -1800,7 +1800,7 @@
console.warn('[行选择持久化] 表格引用不存在,跳过设置选中行'); console.warn('[行选择持久化] 表格引用不存在,跳过设置选中行');
return; return;
} }
// //
const restoredRow = this.restoreSelectedRow(); const restoredRow = this.restoreSelectedRow();
if (restoredRow) { if (restoredRow) {
@ -1888,13 +1888,13 @@
changeData(row){ changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row)); this.currentRow = JSON.parse(JSON.stringify(row));
this.headerData=row; this.headerData=row;
// //
if (row && row.delNo) { if (row && row.delNo) {
this.selectedRowKey = row.delNo; this.selectedRowKey = row.delNo;
this.saveSelectedRowToStorage(); this.saveSelectedRowToStorage();
} }
this.refreshCurrentTabTable (); this.refreshCurrentTabTable ();
}, },
importModel(){ importModel(){
@ -2290,11 +2290,11 @@
const qty = parseFloat(this.updateDetailModel.qty) || 0; const qty = parseFloat(this.updateDetailModel.qty) || 0;
const tp = parseFloat(this.updateDetailModel.tp) || 0; const tp = parseFloat(this.updateDetailModel.tp) || 0;
const vat = parseFloat(this.updateDetailModel.vat) || 0; const vat = parseFloat(this.updateDetailModel.vat) || 0;
// = * TP // = * TP
const sumPrice = qty * tp; const sumPrice = qty * tp;
this.updateDetailModel.sumPrice = sumPrice > 0 ? sumPrice.toFixed(2) : ''; this.updateDetailModel.sumPrice = sumPrice > 0 ? sumPrice.toFixed(2) : '';
// TTL Amount = * VAT // TTL Amount = * VAT
const ttlAmount = sumPrice * vat; const ttlAmount = sumPrice * vat;
this.updateDetailModel.ttlAmount = ttlAmount > 0 ? ttlAmount.toFixed(2) : ''; this.updateDetailModel.ttlAmount = ttlAmount > 0 ? ttlAmount.toFixed(2) : '';
@ -2537,7 +2537,7 @@
exportParam.notifyPartDetailList = this.notifyPartDetailList exportParam.notifyPartDetailList = this.notifyPartDetailList
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadInvoice", "/ecss/coDel/downloadInvoice",
exportParam, this.currentRow.cmcInvoice+"发票.xlsx"
exportParam, "CI "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportInvoiceFlag=false this.exportInvoiceFlag=false
this.searchTable() this.searchTable()
@ -2554,7 +2554,7 @@
exportParam.delNo = this.currentRow.delNo exportParam.delNo = this.currentRow.delNo
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadExportGoods", "/ecss/coDel/downloadExportGoods",
exportParam, this.currentRow.cmcInvoice+"出口货物委托书.xlsx"
exportParam, "Booking "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportGoodsFlag = false; this.exportGoodsFlag = false;
this.searchTable() this.searchTable()
@ -2626,7 +2626,7 @@
} }
this.templateFlag = false this.templateFlag = false
}, },
/** /**
* 保存选中行到本地存储 * 保存选中行到本地存储
* 使用页面路径和用户名作为存储键的一部分确保不同页面和用户的选择互不影响 * 使用页面路径和用户名作为存储键的一部分确保不同页面和用户的选择互不影响
@ -2640,7 +2640,7 @@
console.warn('保存选中行状态失败:', error); console.warn('保存选中行状态失败:', error);
} }
}, },
/** /**
* 从本地存储恢复选中行 * 从本地存储恢复选中行
* @returns {Object|null} 返回匹配的行数据如果没有找到则返回null * @returns {Object|null} 返回匹配的行数据如果没有找到则返回null
@ -2649,18 +2649,18 @@
try { try {
const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`; const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;
const savedRowKey = localStorage.getItem(storageKey); const savedRowKey = localStorage.getItem(storageKey);
// //
if (!savedRowKey) { if (!savedRowKey) {
console.log('[行选择持久化] 没有保存的选中行'); console.log('[行选择持久化] 没有保存的选中行');
return null; return null;
} }
if (!this.dataList || this.dataList.length === 0) { if (!this.dataList || this.dataList.length === 0) {
console.log('[行选择持久化] 数据列表为空,无法恢复选中行'); console.log('[行选择持久化] 数据列表为空,无法恢复选中行');
return null; return null;
} }
// //
const matchedRow = this.dataList.find(row => row && row.delNo === savedRowKey); const matchedRow = this.dataList.find(row => row && row.delNo === savedRowKey);
if (matchedRow) { if (matchedRow) {
@ -2670,14 +2670,14 @@
} else { } else {
console.log(`[行选择持久化] 未找到匹配的行: ${savedRowKey},当前数据列表长度: ${this.dataList.length}`); console.log(`[行选择持久化] 未找到匹配的行: ${savedRowKey},当前数据列表长度: ${this.dataList.length}`);
} }
return null; return null;
} catch (error) { } catch (error) {
console.warn('恢复选中行状态失败:', error); console.warn('恢复选中行状态失败:', error);
return null; return null;
} }
}, },
/** /**
* 清除本地存储的选中行状态 * 清除本地存储的选中行状态
*/ */
@ -2698,7 +2698,7 @@
this.getBu () this.getBu ()
// //
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
// //
try { try {
const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`; const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`;

14
src/views/modules/ecss/declaration.vue

@ -2077,7 +2077,7 @@
let error; let error;
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadDeclarationElements", "/ecss/coDel/downloadDeclarationElements",
exportParam, this.currentRow.cmcInvoice+"报关要素.xlsx"
exportParam, "报关要素 "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.brandTypeFlag = false this.brandTypeFlag = false
}, },
@ -2099,7 +2099,7 @@
exportParam.declarationWeight = this.declarationWeight exportParam.declarationWeight = this.declarationWeight
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadDeclaration", "/ecss/coDel/downloadDeclaration",
exportParam, this.currentRow.cmcInvoice+"报关单.xlsx"
exportParam, "报关单 "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.declarationFlag = false this.declarationFlag = false
}, },
@ -2115,7 +2115,7 @@
exportParam.notifyPartDetailList = this.notifyPartDetailList exportParam.notifyPartDetailList = this.notifyPartDetailList
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadInvoice", "/ecss/coDel/downloadInvoice",
exportParam, this.currentRow.cmcInvoice+"发票.xlsx"
exportParam, "CI "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportInvoiceFlag=false this.exportInvoiceFlag=false
this.searchTable() this.searchTable()
@ -2150,7 +2150,7 @@
exportParam.notifyPartDetailList = this.notifyPartDetailList exportParam.notifyPartDetailList = this.notifyPartDetailList
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadPackingList", "/ecss/coDel/downloadPackingList",
exportParam, this.currentRow.cmcInvoice+"箱单.xlsx"
exportParam, "PL "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportPakingFlag = false; this.exportPakingFlag = false;
this.searchTable() this.searchTable()
@ -2166,7 +2166,7 @@
exportParam.delNo = this.currentRow.delNo exportParam.delNo = this.currentRow.delNo
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadExportGoods", "/ecss/coDel/downloadExportGoods",
exportParam, this.currentRow.cmcInvoice+"出口货物委托书.xlsx"
exportParam, "Booking "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportGoodsFlag = false; this.exportGoodsFlag = false;
this.searchTable() this.searchTable()
@ -2225,7 +2225,7 @@
exportParam.notifyPartDetailList = this.notifyPartDetailList exportParam.notifyPartDetailList = this.notifyPartDetailList
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadAll", "/ecss/coDel/downloadAll",
exportParam, this.currentRow.cmcInvoice+"单证信息.xlsx"
exportParam, this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx"
); );
this.exportAllFlag = false this.exportAllFlag = false
this.searchTable() this.searchTable()
@ -2433,7 +2433,7 @@
exportParam.notifyPartDetailList = this.notifyPartDetailList exportParam.notifyPartDetailList = this.notifyPartDetailList
ExportUtil.export( ExportUtil.export(
"/ecss/coDel/downloadAllPdf", "/ecss/coDel/downloadAllPdf",
exportParam, this.currentRow.cmcInvoice+"单证信息.pdf"
exportParam, this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".pdf"
); );
this.exportAllFlag = false this.exportAllFlag = false
this.searchTable() this.searchTable()

Loading…
Cancel
Save