Browse Source

箱类型

java8
han\hanst 3 months ago
parent
commit
dcffefdeb3
  1. 57
      src/views/modules/ecss/codelnotifyConfirm.vue

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

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

Loading…
Cancel
Save