import { Fields, IBandDetail, IBands, ICell, IControlCollection, ICrossTab, ICurrent_DATA, ICurrent_RPT, ICustomizeCfg, IDataObj, IDefProperties, IGrpLine, IMergePos, IPreviewPage, IRptTpl, ITab } from "./basic";

export interface IFlowTabClass {
    auto_height_fields_idx: [number, Fields][];
    auto_height_info: number[][];
    checkCombineEvent: ($RUN_TYPE: string, $VER_COMB_ARRAY: number[][], $HOR_COMB_ARRAY: any[], $CURRENT_CELL_ITEMS: ICell[], $CURRENT_RPT: ICurrent_RPT) => void;
    checkGrpTxtOutEvent: ($RUN_TYPE: string, $TEXT: Fields, $TIMES: number, $CURRENT_RPT: ICurrent_RPT) => void;
    combinePageCells: (rstPageCells: ICell[], verticalCombinePos: number[][], horizonCombinePos: number[][]) => void;
    commonTabRestOutput: (dataObj: IDataObj | null, page: number, segIdx: number, bands: IBands, band: IBandDetail, unitFactor: number, tab: ITab, multiColIdx: number, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg | null) => void;
    disp_fields_ex_idx: any[];
    disp_fields_idx: any[];
    dispValueIdxLst: any[];
    group_check_fields: any[];
    group_lines_amt: number;
    group_node_info: number[][];
    group_sum_fields: any[]
    group_sum_values: Fields[]
    groupSumValLst: any[]
    isEx: boolean;
    multiCols: number;
    outputAsPreviewPage: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT) => any;
    outputAsSimpleJSONPage: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, controls: IControlCollection, adHocMergePos: IMergePos, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any[];
    outputAutoHeightTabField: (band: IBandDetail, tab_field: Fields, data_field: string[], contentValInfo: number[], rows: number, rowIdx: number, cols: number, colIdx: number, unitFactor: number, isRow: boolean, controls: IControlCollection, multiColIdx: number) => any;
    outputColumn: (rptTpl: IRptTpl, dataObj: IDataObj | null, page: number, segIdx: number, bands: IBands, unitFactor: number, multiColIdx: number, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg | null) => any[]
    outputAsSimpleJSONPageArray?: (rptTpl: IRptTpl, dataObj: IDataObj, startPage: number, endPage: number, defProperties: IDefProperties, customizeCfg: ICustomizeCfg) => any;
    outputSegSum: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, segIdx: number, bands: IBands, unitFactor: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any
    outputTabField: (band: IBandDetail, tab_field: Fields, data_field: string[] | null, valueIdx: number, serialIdx: number, rows: number, rowIdx: number, cols: number, colIdx: number, unitFactor: number, isRow: boolean, controls: IControlCollection, multiColIdx: number) => any
    outputTabGrpLine: (band: IBandDetail, grp_line: IGrpLine, page: number, grpValueIdx: number[], rows: number, rowIdx: number, cols: number, colIdx: number, unitFactor: number, isRow: boolean, controls: IControlCollection, multiColIdx: number, grpCntIdx: number, $CURRENT_RPT: ICurrent_RPT) => any
    page_seg_map: number[][];
    page_sum_fields_idx: any[][]
    page_sum_tab_fields: any[]
    pagesAmt: number
    pageStatusLst: boolean[][];
    pageSumValLst: any[];
    paging_option: string
    preSetupPages: (rptTpl: IRptTpl, dataObj: IDataObj, defProperties: IDefProperties, option: string, $CURRENT_RPT: ICurrent_RPT, followTabEx: any) => any
    seg_sum_fields_idx: any[];
    seg_sum_tab_fields: any[];
    segments: number[][];
    segSumValLst: any[];
    setupAutoHeightData: (bands: IBands, segIdx: number, rptTpl: IRptTpl, dataObj: IDataObj, $CURRENT_RPT: ICurrent_RPT, defProperties: IDefProperties) => void
    setupGroupingData: (rptTpl: IRptTpl, dataObj: IDataObj, $CURRENT_RPT: ICurrent_RPT) => void
    sorting: (rptTpl: IRptTpl, dataObj: IDataObj, dataSeq: number[][], $CURRENT_RPT: ICurrent_RPT) => void
    sumSeg: (dataObj: IDataObj, $CURRENT_RPT: ICurrent_RPT) => void
    sumUpGrp: (rptTpl: IRptTpl, $CURRENT_RPT: ICurrent_RPT, dataObj: IDataObj, segIdx: number, preGrpIdx: number, nexGrpIdx: number) => void
}

export interface IBillTabClass {
    disp_fields_idx: any[];
    outputAsPreviewPage: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT) => any
    outputAsSimpleJSONPage: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any;
    outputContent: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, controls: IControlCollection, pageStatus: boolean[], $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any
    outputPreviewContent: (rptTpl: IRptTpl, bands: IBands, unitFactor: number, controls: IControlCollection, pageStatus: boolean[]) => any;
    paging: (rptTpl: IRptTpl, dataObj: IDataObj) => number
    sorting: (rptTpl: IRptTpl) => void
}

export interface ICostTabClass {
    dispValueIdxLst_Row: number[][];
    dispValueIdxLst_Col: any[];
    dispValueIdxLst_Content: number[][][];
    dispSerialIdxLst_Row: number[][];
    col_sum_fields_idx: any[];
    col_sum_fields_value_total: any[][];
    dispSumValueLst_Col: any[];
    page_seg_map: any;
    row_fields_idx: any[];
    row_fields_adhoc_idx: any[];
    col_fields_idx: any[];
    content_fields_idx: any[];
    row_extension_fields_idx: any[];
    row_sum_extension_fields_idx: any[];
    sortedRowSequence: any[];
    sortedColSequence: any[];
    sortedContentSequence: any[];
    crsOrient: number;
    pageStatusLst: any[];
    paging_option: string;
    sorting: (rptTpl: IRptTpl, dataObj: IDataObj, dataSeq: number[][], $CURRENT_RPT: ICurrent_RPT) => void;
    preSetupPages: (rptTpl: IRptTpl, defProperties: IDefProperties, option: string) => number;
    outputAsPreviewPage: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any; //最后一个参数其实没作用，方法中定义了，但是在实际使用并没有传值
    outputPreviewContent: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxRowRec: number, maxColRec: number, unitFactor: number) => any;
    outputPreviewRowTab: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxRowRec: number, unitFactor: number) => ICell[];
    outputPreviewColTab: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxColRec: number, unitFactor: number) => ICell[];
    outputPreviewTabExt: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxColRec: number, unitFactor: number) => ICell[];
    outputPreviewSumTabExt: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, unitFactor: number) => ICell[];
    outputPreviewTabSum: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxRowRec: number, tabNodeName: string, unitFactor: number) => ICell[];
    private_OutputPreviewCommon: (rptTpl: IRptTpl, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg, maxRowRec: number, maxColRec: number, tab: ICrossTab, unitFactor: number) => any
    outputAsSimpleJSONPage: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any;
    outputTabSum: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, tabNodeName: string, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any
    outputTabExt: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any;
    outputSumTabExt: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, segIdx: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any
    outputContent: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any;
    outputColTab: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, unitFactor: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => any
    outputRowTabCommon: (rptTpl: IRptTpl, dataObj: IDataObj, page: number, bands: IBands, tabStr: string, rowFieldsIdxArr: any[], unitFactor: number, controls: IControlCollection, $CURRENT_RPT: ICurrent_RPT, customizeCfg: ICustomizeCfg) => ICell[];
    outputTabField: (band: IBandDetail, tab_field: Fields, data_field: any, valueIdx: number, serialIdx: number, rows: number, rowIdx: number, cols: number, colIdx: number, unitFactor: number, isRow: boolean, controls: IControlCollection) => ICell;


}
