// 评价打分模块类型声明

declare namespace supplierEvaluateScore {
  // 基础分页请求参数
  interface BasePageRequest {
    pageNo: number;
    pageSize: number;
    [property: string]: any;
  }

  // 评价打分请求参数
  interface ScorePageRequest {
    basePageRequest: BasePageRequest;
    keyword?: string;
    startTime?: string;
    endTime?: string;
    status?: string;
    [property: string]: any;
  }

  // 按供应商维度查询参数
  interface SupplierDimensionRequest {
    basePageRequest: BasePageRequest;
    keyword?: string; // 供应商名称或评价主题关键字
    startTime?: string; // 评价开始时间
    endTime?: string; // 评价结束时间
    status?: string; // 评价状态：1-待评分，2-已评分，3-进行中，4-已完成
    [property: string]: any;
  }

  // 按任务查询参数
  interface TaskPageRequest {
    basePageRequest: BasePageRequest;
    keyword?: string; // 评价主题关键字
    startTime?: string; // 评价开始时间
    endTime?: string; // 评价结束时间
    status?: string; // 评价状态：1-待评分，2-已评分，3-进行中，4-已完成
    [property: string]: any;
  }

  // 供应商维度列表返回数据类型
  interface SupplierDimensionResponse {
    code: number;
    data: SupplierDimensionData;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  interface SupplierDimensionData {
    countId: null;
    current: number;
    hitCount: boolean;
    maxLimit: null;
    optimizeCountSql: boolean;
    orders: any[];
    pages: number;
    records: SupplierDimensionRecord[];
    searchCount: boolean;
    size: number;
    total: number;
    [property: string]: any;
  }

  interface SupplierDimensionRecord {
    basePageRequest?: null;
    endTime?: string;
    evaluateTheme?: string;
    id?: string;
    startTime?: string;
    status?: string; // 1-待评分，2-已评分，3-进行中，4-已完成
    statusName?: string;
    tenantName?: string; // 发起单位
    userId?: null;
    supplierName?: string;
    submissionStatus?: string; // 提交状态
    submissionTime?: string; // 提交时间
    name?: string; // 供应商名称，与 supplierName 同义
    [property: string]: any;
  }

  // 评价任务列表返回数据类型
  interface TaskPageResponse {
    code: number;
    data: TaskPageData;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  interface TaskPageData {
    countId: null;
    current: number;
    hitCount: boolean;
    maxLimit: null;
    optimizeCountSql: boolean;
    orders: any[];
    pages: number;
    records: TaskPageRecord[];
    searchCount: boolean;
    size: number;
    total: number;
    [property: string]: any;
  }

  interface TaskPageRecord {
    basePageRequest?: null;
    endTime?: string;
    evaluateTheme?: string;
    id?: string;
    startTime?: string;
    status?: string; // 1-待评分，2-已评分，3-进行中，4-已完成
    statusName?: string;
    deptName?: string; // 发起单位/部门
    tenantName?: string; // 发起单位，与 deptName 同义
    userId?: null;
    [property: string]: any;
  }

  // 评价打分明细请求参数
  interface ScoreDetailRequest {
    id: string;
    [property: string]: any;
  }

  // 评价打分明细返回数据类型
  interface ScoreDetailResponse {
    code: number;
    data: ScoreDetailData;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  // 评价明细数据
  interface ScoreDetailData {
    category: string;
    name: string;
    taskIndicatorVo: TaskIndicatorVo[];
    [property: string]: any;
  }

  // 评价指标项
  interface TaskIndicatorVo {
    baseIndicator: string;
    indicatorDesc: string;
    score: string;
    subIndicator: SubIndicator[];
  }

  // 评价子指标项
  interface SubIndicator {
    id: string;
    remark: string | null;
    scoreNum: string | number | null;
    starIndicator: string;
    stId: string;
    subIndicator: string;
    subScore: string;
    [property: string]: any;
  }

  // 打分保存请求参数
  interface ScoreSaveRequest {
    id: string;
    scoreVoList: ScoreVoList[];
  }

  // 打分项
  interface ScoreVoList {
    id?: string;
    remark?: string;
    score?: string;
  }

  // 打分保存响应
  interface ScoreSaveResponse {
    code: number;
    success: boolean;
    message: string;
    data: any;
    [property: string]: any;
  }

  // 提交评分请求参数
  interface ScoreSubmitRequest {
    id: string;
    taskIndicatorVo: TaskIndicatorVo[];
  }

  // 提交评分响应
  interface ScoreSubmitResponse {
    code: number;
    success: boolean;
    message: string;
    data: any;
    [property: string]: any;
  }

  // 导出评价数据请求参数
  interface ExportRequest {
    evaluateTaskId: string;
    [property: string]: any;
  }
}
