瀏覽代碼

选中高亮

Qukatie 3 天之前
父節點
當前提交
239fab184d

+ 3 - 0
src/views/iosBasicData/financialManagement/computationCenter/components/fromtableDetails.vue

@@ -672,4 +672,7 @@ export default {
 ::v-deep .el-input-number .el-input__inner {
   text-align: right;
 }
+::v-deep.current-row {
+  background: #ecf3ff;
+}
 </style>

+ 13 - 1
src/views/iosBasicData/financialManagement/computationCenter/components/pickedData.vue

@@ -6,6 +6,7 @@
       id="out-table"
       ref="crud"
       :cell-style="cellStyle"
+      :row-class-name="rowClassName"
       :page.sync="page"
       @size-change="sizeChange"
       @current-change="currentChange"
@@ -119,7 +120,7 @@ export default {
         align: "center",
         rowKey: "accBillId",
         selection: true,
-        highlightCurrentRow: true,
+        // highlightCurrentRow: true,
         column: [
           {
             label: "核销",
@@ -782,6 +783,14 @@ export default {
       }
       return rowStyle + "padding:0px;fontSize:12px";
     },
+    rowClassName({ row, rowIndex }) {
+      let rowName = "",
+      findRow = this.selectionList.find((c) => c.$index === rowIndex);
+      if (findRow) {
+        rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+      }
+      return rowName; //也可以再加上其他类名 如果有需求的话
+    },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {
       const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
@@ -820,4 +829,7 @@ export default {
 .el-button--text.is-disabled {
   color: #c0c4cc !important;
 }
+::v-deep.current-row {
+  background: #ecf3ff;
+}
 </style>

+ 3 - 0
src/views/iosBasicData/financialManagement/finstlbills/components/fininvoiceitemdetail.vue

@@ -538,4 +538,7 @@ export default {
 .el-button--text.is-disabled {
   color: #c0c4cc !important;
 }
+::v-deep.current-row {
+  background: #ecf3ff;
+}
 </style>

+ 13 - 2
src/views/iosBasicData/financialManagement/finstlbills/components/pickedData.vue

@@ -6,6 +6,7 @@
       id="out-table"
       ref="crud"
       :cell-style="cellStyle"
+      :row-class-name="rowClassName"
       :page.sync="page"
       @size-change="sizeChange"
       @current-change="currentChange"
@@ -222,7 +223,6 @@ export default {
         align: "center",
         rowKey: "accBillId",
         selection: true,
-        highlightCurrentRow:true,
         column: [
           {
             label: "账单编号",
@@ -490,7 +490,7 @@ export default {
   },
   methods: {
     handleRowClick(row, event, column) {
-       this.$refs.crud.toggleRowSelection(row,true);
+      this.$refs.crud.toggleRowSelection(row, true);
     },
     viewRLA(row, type) {
       this.rlaData = [];
@@ -919,6 +919,14 @@ export default {
       }
       return rowStyle + "padding:0px;fontSize:12px";
     },
+    rowClassName({ row, rowIndex }) {
+      let rowName = "",
+      findRow = this.selectionList.find((c) => c.$index === rowIndex);
+      if (findRow) {
+        rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+      }
+      return rowName; //也可以再加上其他类名 如果有需求的话
+    },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {
       const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
@@ -958,4 +966,7 @@ export default {
 .el-button--text.is-disabled {
   color: #c0c4cc !important;
 }
+::v-deep.current-row {
+  background: #ecf3ff;
+}
 </style>

+ 13 - 1
src/views/iosBasicData/financialManagement/finstlbills/components/queryData.vue

@@ -6,6 +6,7 @@
       id="out-table"
       ref="crud"
       :cell-style="cellStyle"
+      :row-class-name="rowClassName"
       :page.sync="page"
       @size-change="sizeChange"
       @current-change="currentChange"
@@ -149,7 +150,7 @@ export default {
         align: "center",
         rowKey: "accBillId",
         selection: true,
-        highlightCurrentRow: true,
+        // highlightCurrentRow: true,
         column: [
           {
             label: "账单编号",
@@ -626,6 +627,14 @@ export default {
       }
       return rowStyle + "padding:0px;fontSize:12px";
     },
+     rowClassName({ row, rowIndex }) {
+      let rowName = "",
+      findRow = this.selectionList.find((c) => c.$index === rowIndex);
+      if (findRow) {
+        rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+      }
+      return rowName; //也可以再加上其他类名 如果有需求的话
+    },
     //自定义列保存
     async saveColumn(ref, option, optionBack, code) {
       const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
@@ -664,4 +673,7 @@ export default {
 .el-button--text.is-disabled {
   color: #c0c4cc !important;
 }
+::v-deep.current-row {
+  background: #ecf3ff;
+}
 </style>

+ 2 - 2
src/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoicesitems.vue

@@ -141,7 +141,7 @@ export default {
         refreshBtn: false,
         index: true,
         selection: true,
-        highlightCurrentRow:true,
+        // highlightCurrentRow:true,
         align: "center",
         column: [
           {
@@ -481,7 +481,7 @@ export default {
     // 判断方式也是通过判断rowIndex对比
     rowClassName({ row, rowIndex }) {
       let rowName = "",
-        findRow = this.handleSelectionData.find((c) => c.rowIndex === row.rowIndex);
+        findRow = this.handleSelectionData.find((c) => c.$index === rowIndex);
       if (findRow) {
         rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
       }

+ 2 - 2
src/views/iosBasicData/fininvoicesApplyfor/assembly/fininvoicesitems2.vue

@@ -141,7 +141,7 @@ export default {
         refreshBtn: false,
         index: true,
         selection: true,
-        highlightCurrentRow:true,
+        // highlightCurrentRow:true,
         align: "center",
         column: [
           {
@@ -504,7 +504,7 @@ export default {
     // 判断方式也是通过判断rowIndex对比
     rowClassName({ row, rowIndex }) {
       let rowName = "",
-        findRow = this.handleSelectionData.find((c) => c.rowIndex === row.rowIndex);
+        findRow = this.handleSelectionData.find((c) => c.$index === rowIndex);
       if (findRow) {
         rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
       }