import type { IObject, PromiseType } from '@newgrand/udp-core'; export type PrintObjInfo = { /** * @description formatPrintData */ formatPrintData?: (val: any) => any; /** * @description pageid */ pageid: string; /** * @description filteredColumn 筛选列不打印 */ filteredColumn?: string[]; /** * @description imageColumn render返回图片img标签的列 */ imageColumn?: string[]; /** * @description title */ title?: string; /** * @description 多个title */ titles?: string; /** * @description 列表组件GridView id */ grids?: Array; /** * @description 表单NGForm id */ forms?: Array; /** * @description 表单集合 id */ formSets?: Array; /** * @description keyhelper */ keyhelper?: string; /** * @description 批量打印 */ batchdata?: Array<{ appflowpk?: string; formdata?: {}; griddatas?: [{ id?: string; Record: IObject[]; }]; }>; /** * @description 导出模式 * @default undefined */ exportmode?: string; /** * @description 预览配置 */ previeweditflg?: string; /** * @description 是否预览 * @default false */ showpreview?: string; /** * @description referencevalue * @default - */ referencevalue?: string; /** * @description allowOutputData * @default - */ allowOutputData?: string; /** * @description 文件名称 */ filename?: string; /** * @description 表单数据 */ formdata?: IObject; /** * @description (当表格带checkbox时)启用过滤 * @default true */ checked?: boolean; /** * @description 列表数据 */ griddatas?: IObject[][]; /** * @description 业务id */ buskey?: string; /** * @description 列表打印模式 */ gridprintmode?: string; /** * @description */ prtBusFn?: string; /** * @description 类型编码 */ typeCode?: string; /** * @description 自定义打印参数 */ customConfig?: { topRows?: { leftText?: string; centerText?: string; rightText?: string; }[]; bottomRows?: { leftText?: string; centerText?: string; rightText?: string; }[]; useDefaultBottom?: 0 | 1; }; }; export type PrintDefaultObjInfo = PrintObjInfo; export type TemplatePrintObjInfo = { /** * @description appflowbiz */ appflowbiz?: string; /** * @description appflowpk */ appflowpk?: string; /** * @description 单据类型 */ typefile: string; } & PrintObjInfo; export type PrintInfo = { /** * @description 打印页面标题 * @default 打印 */ title: string; /** * @description 打印根目录 * @default /RW */ urlRoot?: string; /** * @description 处理模板数据 */ handleTempData?: (data: any[]) => PromiseType; /** * @description 打印页面地址 * @default printDefaultObj | templatePrintObj */ printObj: T; }; type getDataFunc = (printObj: PrintObjInfo, parms: T) => T; export type getPrintParFunc = getDataFunc; export {};