|
|
@ -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}`; |
|
|
|