diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue index 0adf64f..7a7a756 100644 --- a/src/views/modules/ecss/codelnotify.vue +++ b/src/views/modules/ecss/codelnotify.vue @@ -1791,7 +1791,7 @@ this.dataList.forEach(o => { o.modifyLabel = !!o.modifyFlag?'是':''; }); - + // 使用 $nextTick 确保 DOM 渲染完成后再设置选中行 this.$nextTick(() => { try { @@ -1800,7 +1800,7 @@ console.warn('[行选择持久化] 表格引用不存在,跳过设置选中行'); return; } - + // 尝试恢复之前选中的行 const restoredRow = this.restoreSelectedRow(); if (restoredRow) { @@ -1888,13 +1888,13 @@ changeData(row){ this.currentRow = JSON.parse(JSON.stringify(row)); this.headerData=row; - + // 保存选中行的唯一标识到本地存储 if (row && row.delNo) { this.selectedRowKey = row.delNo; this.saveSelectedRowToStorage(); } - + this.refreshCurrentTabTable (); }, importModel(){ @@ -2290,11 +2290,11 @@ const qty = parseFloat(this.updateDetailModel.qty) || 0; const tp = parseFloat(this.updateDetailModel.tp) || 0; const vat = parseFloat(this.updateDetailModel.vat) || 0; - + // 价税合计 = 数量 * TP,保留两位小数 const sumPrice = qty * tp; this.updateDetailModel.sumPrice = sumPrice > 0 ? sumPrice.toFixed(2) : ''; - + // TTL Amount = 价税合计 * VAT,保留两位小数 const ttlAmount = sumPrice * vat; this.updateDetailModel.ttlAmount = ttlAmount > 0 ? ttlAmount.toFixed(2) : ''; @@ -2537,7 +2537,7 @@ exportParam.notifyPartDetailList = this.notifyPartDetailList ExportUtil.export( "/ecss/coDel/downloadInvoice", - exportParam, this.currentRow.cmcInvoice+"发票.xlsx" + exportParam, "CI "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportInvoiceFlag=false this.searchTable() @@ -2554,7 +2554,7 @@ exportParam.delNo = this.currentRow.delNo ExportUtil.export( "/ecss/coDel/downloadExportGoods", - exportParam, this.currentRow.cmcInvoice+"出口货物委托书.xlsx" + exportParam, "Booking "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportGoodsFlag = false; this.searchTable() @@ -2626,7 +2626,7 @@ } this.templateFlag = false }, - + /** * 保存选中行到本地存储 * 使用页面路径和用户名作为存储键的一部分,确保不同页面和用户的选择互不影响 @@ -2640,7 +2640,7 @@ console.warn('保存选中行状态失败:', error); } }, - + /** * 从本地存储恢复选中行 * @returns {Object|null} 返回匹配的行数据,如果没有找到则返回null @@ -2649,18 +2649,18 @@ try { const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`; const savedRowKey = localStorage.getItem(storageKey); - + // 检查必要的条件 if (!savedRowKey) { console.log('[行选择持久化] 没有保存的选中行'); return null; } - + if (!this.dataList || this.dataList.length === 0) { console.log('[行选择持久化] 数据列表为空,无法恢复选中行'); return null; } - + // 在当前数据列表中查找匹配的行 const matchedRow = this.dataList.find(row => row && row.delNo === savedRowKey); if (matchedRow) { @@ -2670,14 +2670,14 @@ } else { console.log(`[行选择持久化] 未找到匹配的行: ${savedRowKey},当前数据列表长度: ${this.dataList.length}`); } - + return null; } catch (error) { console.warn('恢复选中行状态失败:', error); return null; } }, - + /** * 清除本地存储的选中行状态 */ @@ -2698,7 +2698,7 @@ this.getBu () // 动态列 this.getTableUserColumn(this.$route.meta.menuId+'table1',1) - + // 初始化时从本地存储加载选中行状态 try { const storageKey = `codelnotify_selected_row_${this.$store.state.user.name}`; diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue index 4ba1e4e..797c268 100644 --- a/src/views/modules/ecss/declaration.vue +++ b/src/views/modules/ecss/declaration.vue @@ -2077,7 +2077,7 @@ let error; ExportUtil.export( "/ecss/coDel/downloadDeclarationElements", - exportParam, this.currentRow.cmcInvoice+"报关要素.xlsx" + exportParam, "报关要素 "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.brandTypeFlag = false }, @@ -2099,7 +2099,7 @@ exportParam.declarationWeight = this.declarationWeight ExportUtil.export( "/ecss/coDel/downloadDeclaration", - exportParam, this.currentRow.cmcInvoice+"报关单.xlsx" + exportParam, "报关单 "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.declarationFlag = false }, @@ -2115,7 +2115,7 @@ exportParam.notifyPartDetailList = this.notifyPartDetailList ExportUtil.export( "/ecss/coDel/downloadInvoice", - exportParam, this.currentRow.cmcInvoice+"发票.xlsx" + exportParam, "CI "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportInvoiceFlag=false this.searchTable() @@ -2150,7 +2150,7 @@ exportParam.notifyPartDetailList = this.notifyPartDetailList ExportUtil.export( "/ecss/coDel/downloadPackingList", - exportParam, this.currentRow.cmcInvoice+"箱单.xlsx" + exportParam, "PL "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportPakingFlag = false; this.searchTable() @@ -2166,7 +2166,7 @@ exportParam.delNo = this.currentRow.delNo ExportUtil.export( "/ecss/coDel/downloadExportGoods", - exportParam, this.currentRow.cmcInvoice+"出口货物委托书.xlsx" + exportParam, "Booking "+this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportGoodsFlag = false; this.searchTable() @@ -2225,7 +2225,7 @@ exportParam.notifyPartDetailList = this.notifyPartDetailList ExportUtil.export( "/ecss/coDel/downloadAll", - exportParam, this.currentRow.cmcInvoice+"单证信息.xlsx" + exportParam, this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".xlsx" ); this.exportAllFlag = false this.searchTable() @@ -2433,7 +2433,7 @@ exportParam.notifyPartDetailList = this.notifyPartDetailList ExportUtil.export( "/ecss/coDel/downloadAllPdf", - exportParam, this.currentRow.cmcInvoice+"单证信息.pdf" + exportParam, this.currentRow.cmcInvoice+" "+this.currentRow.destination+"-"+this.currentRow.shippingMode+".pdf" ); this.exportAllFlag = false this.searchTable()