diff --git a/src/views/modules/inspection/inspectionRequestAudit.vue b/src/views/modules/inspection/inspectionRequestAudit.vue
index f10db07..55ce2af 100644
--- a/src/views/modules/inspection/inspectionRequestAudit.vue
+++ b/src/views/modules/inspection/inspectionRequestAudit.vue
@@ -629,25 +629,27 @@ export default {
}
// 主表格行样式 - 验货申请中有数量修改时标红
-/deep/ .el-table__body tr.modified-request-row {
+// 使用 ::v-deep 确保兼容性
+::v-deep .el-table .modified-request-row {
background-color: #fef0f0 !important;
}
-/deep/ .el-table__body tr.modified-request-row > td {
+// 必须针对 td 进行设置,因为 Element 的背景色是挂在 td 上的
+::v-deep .el-table .modified-request-row td {
background-color: #fef0f0 !important;
color: #f56c6c !important;
}
-/deep/ .el-table__body tr.modified-request-row:hover > td {
- background-color: #fde2e2 !important;
-}
-
-/deep/ .el-table__row.current-row.modified-request-row {
- background-color: #fef0f0 !important;
+// 针对鼠标悬停时的状态,防止被 hover 颜色覆盖
+::v-deep .el-table .el-table__body tr.modified-request-row:hover > td {
+ background-color: #fde2e2 !important; // 稍微深一点的红色以便区分 hover
}
+
-/deep/ .el-table__row.current-row.modified-request-row > td {
- background-color: #fef0f0 !important;
- color: #f56c6c !important;
+
+
diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue
index d6305e2..72c5bf9 100644
--- a/src/views/modules/inspection/inspectionRequestList.vue
+++ b/src/views/modules/inspection/inspectionRequestList.vue
@@ -700,7 +700,7 @@ export default {
searchInspectionRequestHeaderList(this.searchData).then(({ data }) => {
if (data.code === 0) {
this.mainDataList = data.page.list
-
+
// 调试信息:打印第一条数据的 hasModifiedQty 字段
if (this.mainDataList.length > 0) {
console.log('=== 主表格数据调试 ===')
@@ -708,7 +708,7 @@ export default {
console.log('hasModifiedQty 值:', this.mainDataList[0].hasModifiedQty)
console.log('=====================')
}
-
+
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
@@ -880,24 +880,24 @@ export default {
mainTableRowClassName ({ row }) {
// 调试信息:打印每行的 hasModifiedQty 值
console.log('Row:', row.requestNo, 'hasModifiedQty:', row.hasModifiedQty, 'type:', typeof row.hasModifiedQty)
-
+
// 如果后端返回 hasModifiedQty 字段,直接使用
// 支持多种类型:布尔值、字符串、数字
- if (row.hasModifiedQty === true ||
- row.hasModifiedQty === 'true' ||
- row.hasModifiedQty === 'Y' ||
+ if (row.hasModifiedQty === true ||
+ row.hasModifiedQty === 'true' ||
+ row.hasModifiedQty === 'Y' ||
row.hasModifiedQty === 'y' ||
- row.hasModifiedQty === 1 ||
+ row.hasModifiedQty === 1 ||
row.hasModifiedQty === '1') {
console.log('✅ 应用红色背景到:', row.requestNo)
return 'modified-request-row'
}
-
+
// 如果字段不存在,输出提示
if (row.hasModifiedQty === undefined || row.hasModifiedQty === null) {
console.warn('⚠️ 警告: 行', row.requestNo, '缺少 hasModifiedQty 字段,后端可能未返回该字段')
}
-
+
return ''
},
@@ -1411,34 +1411,32 @@ padding: 10px 15px 0 0;
// PO表格行样式 - 验货数量修改后标红
.po-section /deep/ .el-table__row.modified-row {
background-color: #fef0f0 !important;
-
+
&:hover > td {
background-color: #fde2e2 !important;
}
-
+
td {
color: #f56c6c;
}
}
-// 主表格行样式 - 验货申请中有数量修改时标红
-/deep/ .el-table__row.modified-request-row {
- background-color: #fef0f0 !important;
-
- td {
- background-color: #fef0f0 !important;
- color: #f56c6c !important;
- }
-
- &:hover > td {
- background-color: #fde2e2 !important;
- }
+/* 强制主表红色背景 */
+::v-deep .el-table__body tr.modified-request-row td {
+ background-color: #ff4d4f !important;
+ color: #ffffff !important;
}
-// 提高优先级,确保覆盖所有可能的样式
-/deep/ .el-table__body tr.modified-request-row > td {
- background-color: #fef0f0 !important;
- color: #f56c6c !important;
+/* 当前选中行也强制红色 */
+::v-deep .el-table__body tr.modified-request-row.current-row td {
+ background-color: #ff4d4f !important;
+ color: #ffffff !important;
+}
+
+/* hover状态 */
+::v-deep .el-table__body tr.modified-request-row:hover td {
+ background-color: #ff7875 !important;
+ color: #ffffff !important;
}
.po-section {
@@ -1466,3 +1464,11 @@ padding: 10px 15px 0 0;
}
+
+
+