diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue
index 4fdd2a5..1f8d7be 100644
--- a/src/views/modules/ecss/codelnotifyConfirm.vue
+++ b/src/views/modules/ecss/codelnotifyConfirm.vue
@@ -3434,6 +3434,7 @@
detailRolls: detailRolls,
readyDate: detail.readyDate,
partDesc: detail.partDesc,
+ cinvcname: detail.cinvcname,
// 缓存物料属性(用于后续自动计算)
rollQtyCache: rollQty,
boxRollsCache: boxRolls,
@@ -4117,6 +4118,45 @@
return Array.from(nonWholeBoxMap.values())
},
+ /**
+ * 获取非整卷明细数据(按明细Rolls是否为整数判断)
+ */
+ getNonWholeRollDetails() {
+ const nonWholeRollMap = new Map()
+ const checkedDetailKeys = new Set()
+
+ this.mergeBoxTableData.forEach(row => {
+ if (!row._hasDetail || !row._detailKey || checkedDetailKeys.has(row._detailKey)) {
+ return
+ }
+ checkedDetailKeys.add(row._detailKey)
+
+ const cinvcname = (row.cinvcname || '').toString().trim().toUpperCase()
+ if (cinvcname !== 'WET') {
+ return
+ }
+
+ const detailRolls = Number(row.detailRolls)
+ if (!(detailRolls > 0)) {
+ return
+ }
+
+ const isWholeRoll = Math.abs(detailRolls - Math.round(detailRolls)) < 0.000001
+ if (!isWholeRoll) {
+ const detailKey = row._detailKey
+ if (!nonWholeRollMap.has(detailKey)) {
+ nonWholeRollMap.set(detailKey, {
+ itemNo: row.item_no,
+ pn: row.pn,
+ detailRolls: parseFloat(detailRolls.toFixed(4))
+ })
+ }
+ }
+ })
+
+ return Array.from(nonWholeRollMap.values())
+ },
+
/**
* 保存合箱批量编辑
*/
@@ -4165,7 +4205,8 @@
}
const nonWholeDetails = this.getNonWholeBoxDetails()
- if (nonWholeDetails.length > 0) {
+ const nonWholeRollDetails = this.getNonWholeRollDetails()
+ if (nonWholeDetails.length > 0 || nonWholeRollDetails.length > 0) {
const escapeHtml = (value) => String(value)
.replace(/&/g, '&')
.replace(/ `箱${escapeHtml(detail.itemNo)} / PN:${escapeHtml(detail.pn || '-')} / 箱数:${escapeHtml(detail.boxQty)}`)
- .join('
')
- const confirmMessage = `检测到 ${nonWholeDetails.length} 条非整箱数据:
${previewLines}
请确认是否继续装箱。`
+ const warningSections = []
+
+ if (nonWholeDetails.length > 0) {
+ const boxPreviewLines = nonWholeDetails
+ .map(detail => `箱${escapeHtml(detail.itemNo)} / PN:${escapeHtml(detail.pn || '-')} / 箱数:${escapeHtml(detail.boxQty)}`)
+ .join('
')
+ warningSections.push(
+ `