// import type { fx_saletaskmx } from "@/typings/business";
import { ColumnProps, searchProjectItem } from "@/components/LjVxeTable/interface";

export namespace Table {
  export interface Pageable {
    pageNum: number;
    pageSize: number;
    total: number;
  }
  export interface TableStateProps {
    tableData: any[];
    pageable: Pageable;
    searchParam: {
      [key: string]: any;
    };
    searchInitParam: {
      [key: string]: any;
    };
    totalParam: {
      [key: string]: any;
    };
    icon?: {
      [key: string]: any;
    };
    tableLoading: boolean | undefined;
    lastPageable: Pageable;
  }
  export interface defaultProps {
    vxeTableRef: any;
  }
}

export namespace HandleData {
  export type MessageType = "" | "success" | "warning" | "info" | "error";
}

export namespace Theme {
  export type GreyOrWeakType = "grey" | "weak";
}

/**
 * @description 详情页模块
 */
export namespace Detail {
  export interface Pageable {
    pageNum: number;
    pageSize: number;
    total: number;
  }
  export interface DetailStateProps {
    /**
     * @description 基础信息数据
     */
    baseData: {
      [key: string]: any;
    };

    searchParam: {
      [key: string]: any;
    };
    searchInitParam: {
      [key: string]: any;
    };
    totalParam: {
      [key: string]: any;
    };
    icon?: {
      [key: string]: any;
    };
  }
}

export namespace SaletaskMx {
  export interface SaletaskMxStateProps {
    vxeTableRef: any;
    /**
     * @description 当前多选的行
     */
    selectList: any[];
    /**
     * @description 当前选择的行
     */
    currentRecord: any;
    /**
     * @name 批接收/拒绝 确认窗口table显示列
     */
    requestData: any[];
    /**
     * @description 拒绝理由
     */
    reason: string;
  }
}

export namespace Layout {
  export interface LayoutStateProps {
    /**
     * @description 读取的布局，暂存
     */
    dwLayout: any[];
    // /**
    //  * @description 读取的布局，Map()格式
    //  */
    // dwFieldMap: any;
    /**
     * @description 扁平化：columns，用于打印、记录
     */
    flatColumns: any;
    /**
     * @description 展示布局数据
     */
    tableColumns: ColumnProps<any>[];
  }
}

/**
 * @description 详情页模块
 */
export namespace Print {
  export interface PrintStateProps {
    /**
     * @description 编辑器ref
     */
    printEditorRef: any;
    /**
     * @description 模版ref
     */
    printTemplateRef: any;
    /**
     * @description 列表打印模板下拉
     */
    printerListTpDropdownRef: any;
    /**
     * @description 当前打印的选择标记（单据\明细\...)
     */
    activePrint: string;
    hiprinterStateList: any;
    hiprinterStateMx: any;
    /**
     * @description 打印模版列表
     */
    printerTpList: any;
  }
}
