|
|
|
@ -137,7 +137,7 @@ |
|
|
|
<template v-else-if="item.columnProp === 'pn'"> |
|
|
|
<el-tooltip |
|
|
|
v-if="isPnDataIncomplete(scope.row)" |
|
|
|
content="基本信息(每卷数量、每箱卷数、箱重量)未维护,点击跳转到维护页面" |
|
|
|
:content="getPnIncompleteTooltip(scope.row)" |
|
|
|
placement="top"> |
|
|
|
<span |
|
|
|
v-if="!item.columnHidden" |
|
|
|
@ -1857,8 +1857,33 @@ |
|
|
|
const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== ''; |
|
|
|
const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== ''; |
|
|
|
const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== ''; |
|
|
|
const packageNo = row.packageNo !== null && row.packageNo !== undefined && row.packageNo !== ''; |
|
|
|
return !hasBoxrolls || !hasRollqty || !hasBoxweight || !packageNo; |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取PN数据缺失的具体字段提示信息 |
|
|
|
getPnIncompleteTooltip(row) { |
|
|
|
const missingFields = []; |
|
|
|
|
|
|
|
// 检查每个字段是否缺失 |
|
|
|
if (!(row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== '')) { |
|
|
|
missingFields.push('每卷数量'); |
|
|
|
} |
|
|
|
if (!(row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== '')) { |
|
|
|
missingFields.push('每箱卷数'); |
|
|
|
} |
|
|
|
if (!(row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== '')) { |
|
|
|
missingFields.push('箱重量'); |
|
|
|
} |
|
|
|
if (!(row.packageNo !== null && row.packageNo !== undefined && row.packageNo !== '')) { |
|
|
|
missingFields.push('箱类型'); |
|
|
|
} |
|
|
|
|
|
|
|
return !hasBoxrolls || !hasRollqty || !hasBoxweight; |
|
|
|
// 根据缺失字段生成提示信息 |
|
|
|
if (missingFields.length > 0) { |
|
|
|
return `基本信息(${missingFields.join('、')})未维护,点击跳转到维护页面`; |
|
|
|
} |
|
|
|
return ''; |
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转到PN维护页面 |
|
|
|
@ -1943,7 +1968,7 @@ |
|
|
|
} |
|
|
|
o.modifyLabel = !!o.modifyFlag?'是':''; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 使用 $nextTick 确保 DOM 渲染完成后再设置选中行 |
|
|
|
this.$nextTick(() => { |
|
|
|
try { |
|
|
|
@ -1952,7 +1977,7 @@ |
|
|
|
console.warn('[确认页面行选择持久化] 表格引用不存在,跳过设置选中行'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 尝试恢复之前选中的行 |
|
|
|
const restoredRow = this.restoreSelectedRow(); |
|
|
|
if (restoredRow) { |
|
|
|
@ -2002,8 +2027,8 @@ |
|
|
|
const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== ''; |
|
|
|
const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== ''; |
|
|
|
const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== ''; |
|
|
|
|
|
|
|
if (!hasBoxrolls || !hasRollqty || !hasBoxweight) { |
|
|
|
const packageNo = row.packageNo !== null && row.packageNo !== undefined && row.packageNo !== ''; |
|
|
|
if (!hasBoxrolls || !hasRollqty || !hasBoxweight || !packageNo) { |
|
|
|
return { color: '#ff8c00' }; // 橙色 |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2016,13 +2041,13 @@ |
|
|
|
this.currentRow.notifyDate='' |
|
|
|
} |
|
|
|
this.headerData=row; |
|
|
|
|
|
|
|
|
|
|
|
// 保存选中行的唯一标识到本地存储 |
|
|
|
if (row && row.delNo) { |
|
|
|
this.selectedRowKey = row.delNo; |
|
|
|
this.saveSelectedRowToStorage(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.refreshCurrentTabTable (); |
|
|
|
}, |
|
|
|
refreshCurrentTabTable(){ |
|
|
|
@ -2645,7 +2670,7 @@ |
|
|
|
this.$nextTick(() => this.$refs.detailTable.doLayout());// 强制刷新布局, 否则会被表格覆盖 |
|
|
|
return sums; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 保存选中行到本地存储 |
|
|
|
* 使用页面路径和用户名作为存储键的一部分,确保不同页面和用户的选择互不影响 |
|
|
|
@ -2659,7 +2684,7 @@ |
|
|
|
console.warn('保存选中行状态失败:', error); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 从本地存储恢复选中行 |
|
|
|
* @returns {Object|null} 返回匹配的行数据,如果没有找到则返回null |
|
|
|
@ -2668,18 +2693,18 @@ |
|
|
|
try { |
|
|
|
const storageKey = `codelnotifyConfirm_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) { |
|
|
|
@ -2689,14 +2714,14 @@ |
|
|
|
} else { |
|
|
|
console.log(`[确认页面行选择持久化] 未找到匹配的行: ${savedRowKey},当前数据列表长度: ${this.dataList.length}`); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
} catch (error) { |
|
|
|
console.warn('恢复选中行状态失败:', error); |
|
|
|
return null; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 清除本地存储的选中行状态 |
|
|
|
*/ |
|
|
|
@ -2718,7 +2743,7 @@ |
|
|
|
this.getBu () |
|
|
|
// 动态列 |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
|
|
|
|
|
|
|
|
// 初始化时从本地存储加载选中行状态 |
|
|
|
try { |
|
|
|
const storageKey = `codelnotifyConfirm_selected_row_${this.$store.state.user.name}`; |
|
|
|
|