Browse Source

采购需求处理标红

黄梓星 1 year ago
parent
commit
c2c3fdf03f

+ 11 - 1
src/views/purchase/DemandSummary/index.vue

@@ -245,6 +245,7 @@
           height="355"
           max-height="355"
           style="font-size: 12px;"
+          :cell-class-name="cellClassName"
           @selection-change="handleSelectionChange"
           @row-click="rowSelect"
           @row-dblclick="doubleClick"
@@ -546,7 +547,13 @@ export default {
   methods: {
     reDraw() {
       this.$refs.table.doLayout();
-      console.log(111)
+    },
+    // 单元格标红
+    cellClassName({row, column, rowIndex, columnIndex}) {
+      console.log('111', {row, column})
+      if(column.label == "需求可用周期" && Number(row.demandCycle) > 1.5 ) {
+        return 'success-row';
+      }
     },
     // 指定列合计
     getSummaries(param) {
@@ -938,6 +945,9 @@ export default {
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;
 }
+::v-deep .el-table__row .success-row {
+  background-color: #ff8a8a!important;
+}
 </style>
 <style>
 .exporttable {

+ 1 - 1
src/views/purchase/PurchaseDemandList/add.vue

@@ -1854,7 +1854,7 @@ export default {
 //   top: 70%
 // }
 ::v-deep .elx-body--row .success-row {
-  background-color: #f11616!important;
+  background-color: #ff8a8a!important;
 }
 ::v-deep .uxbeautifyTableClass .elx-table--header-wrapper {
   color: #606266;