/**
 * 供应商评价任务详情接口类型定义
 */
export interface IndicatorList {
  indicatorIds: string[];
  type: number;
  userId: string;
}
export interface User{
  userId: string;
  userName: string;
  userDept: string;
  userDeptId: string;
}
/**
 * 任务详情数据
 */
export interface TaskDetailData {
  categoryId: string | null;
  categoryLimitation: string | null;
  createBy: string | null;
  createDate: string | null;
  createTime: string | null;
  deleteFlag: string | null;
  delFlag: string;
  deptId: string | null;
  endTime: string | null;
  evaluateTheme: string | null;
  evaluateYear: string | null;
  id: string | null;
  indicatorList: IndicatorList[] | null;
  lastUpdateTime: string | null;
  startTime: string | null;
  status: string;
  supplierIds: {
    id: string;
    userIds: string[];
  }[] | null;
  userList: User[];
  suppliers: {
    id: string;
    supplierName: string;
    socialCreditCode?: string;
    category?: string;
    department?: string;
    evaluators: {
      id: string;
      name: string;
      department: string;
      position?: string;
    }[];
    [key: string]: any;
  }[] | null;
  templateId: string | null;
  tenantId: string | null;
  tenantName: string | null;
  updateBy: string | null;
  updateDate: string | null;
  updateTime: string | null;
  weightDept: string | null;
  weightStatus: number | null;
  weightValue: string | null;
  taskDeptWeightList: DeptWeightItem[] | null;
  blackSupplierVos: {
    deptName: string;
    supplierId: string;
    supplierName: string;
    userList: User[];
  }[],
  [property: string]: any;
}
// 部门配置权重
export interface DeptWeightItem {
  //部门id
  weightDept: string;
  // 部门权重值
  weightValue: string;
 // 部门名称
  weightDeptName: string;
}
/**
 * 任务详情响应
 */
export interface TaskDetailResponse {
  code: number;
  data: TaskDetailData;
  message: string;
  success: boolean;
  [property: string]: any;
}

// 新增评价任务和修改 请求参数定义
export type TaskAddRequest = {
  /**
   * 品类限制类型（0.通用不限品类、1.限制品类）
   */
  categoryLimitation?: string;
  /**
   * 评价结束时间
   */
  endTime: string;
  /**
   * 评价主题
   */
  evaluateTheme: string;
  /**
   * 评价年度
   */
  evaluateYear: string;
  indicatorList: IndicatorList[];
  /**
   * 评价开始时间
   */
  startTime: string;
  supplierIds: SupplierId[];
  taskDeptWeightList: DeptWeightItem[];
  /**
   * 评价表模板id(cosco_evaluate_template表主键)
   */
  templateId: string;
  // 品类id
  categoryId?: string;
  [property: string]: any;
}
/**
 * 供应商项
 */
export interface SupplierItem {
  id: string;                       // 供应商ID
  supplierName: string;             // 供应商名称
  socialCreditCode?: string;        // 统一社会信用代码
  category?: string;                // 品类
  department?: string;              // 准入部门
  evaluatorCount: number;           // 评价人员数量
  evaluators: User[];      // 评价人员列表
  // 其他可能的字段
  [key: string]: any;
}
export type SupplierId = {
  /**
   * 供应商id
   */
  id: string;
  /**
   * 用户集合
   */
  userIds?: string[];
}