spring
8 天以前 f7165c61dd8a808132c09096f5a367565387f3e4
src/views/warehouseManagement/index.vue
@@ -68,6 +68,7 @@
          style="width: 100%; height: calc(100vh - 30em)"
          show-summary
          :summary-method="summarizeChildrenTable"
          :row-class-name="tableRowClassName"
        >
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column
@@ -77,6 +78,11 @@
            align="center"
          />
          <el-table-column
              prop="code"
              label="编号"
              width="180"
          />
          <el-table-column
            prop="supplierName"
            label="供货商名称"
            width="180"
@@ -84,7 +90,7 @@
          />
          <el-table-column prop="type" label="煤料类型">
            <template #default="scope">
              {{scope.row.type === 1 ? '成品' : '原料'}}
              {{scope.row.type == 1 ? '成品' : '原料'}}
            </template>
          </el-table-column>
          <el-table-column prop="coal" label="煤种" sortable />
@@ -892,6 +898,14 @@
    }
  });
};
// 添加判断行类名的函数
const tableRowClassName = (row) => {
  if (activeTab.value === 'officialInventory' && row.row.inventoryQuantity < 3) {
    return 'low-inventory-row';
  }
  return '';
};
// 关闭审核弹框
const cancelReview = () => {
  proxy.$refs.formRef.resetFields();
@@ -903,4 +917,8 @@
:deep(.el-table) {
  margin: 20px 0;
}
:deep(.low-inventory-row) {
  background-color: #ffcccc;
}
</style>