| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- import { IScopeType } from './process';
- import { BusinessTypeKey, MatterTypeKey } from './gather';
- // 审批金额汇总组件阶段数据
- export interface IAuditSummaryConfig {
- // 阶段名称
- name: string;
- // 关联步骤ID(条件下有多个步骤)
- stepIDs: string[];
- }
- // 审核意见组件配置
- export interface IAuditCommentConfig {
- // 富文本模板
- template: string;
- }
- // 报表打印设置
- export interface IMatterReportConfig {
- component: string;
- enable: boolean;
- type: string;
- IDs: string | number[];
- compilationID?: string;
- }
- // 事项
- export interface IMatter {
- ID: string;
- gatherID: string;
- businessType: BusinessTypeKey;
- matterType: MatterTypeKey;
- parentID: string;
- name: string;
- sort: string;
- formSchema: any;
- // 组件名列表
- assembly: string[];
- dataID: string;
- // 审批金额组件配置
- auditAmountConfig?: IAuditSummaryConfig[];
- // 审核意见组件配置
- auditCommentsConfig?: IAuditCommentConfig;
- // 多文件组件合格率设置
- settlementPassingRate?: number;
- // 多文件组件区间来源可见性范围
- settlementSourceScope?: IScopeType[];
- // 多文件组件区间来源项目名称可见性范围
- settlementProjectScope?: IScopeType[];
- // 报表打印设置
- reportConfig?: IMatterReportConfig[];
- // 计价创建方式和导出方式权限控制
- settlementCost?: {
- create: IScopeType[];
- ybpx: IScopeType[];
- cos: IScopeType[];
- costExport: IScopeType[];
- };
- // 造价金额必填
- settlementCostPrice?: boolean;
- }
- export enum ESettlementCost {
- CREATE = 'create',
- YBPX = 'ybpx',
- COS = 'cos',
- COSTEXPORT = 'costExport',
- }
- export interface IGatherMatter extends IMatter {
- businessID: string;
- }
- export interface IStepMatter {
- ID: string;
- userID: string;
- gatherID: string;
- businessType: BusinessTypeKey;
- stepID: string;
- matterID: string;
- formPermission: string[];
- costPermission: string[];
- profilePermission: string[];
- auditCommentsPermission: string[];
- settlementPermission: string[];
- budgetComparePermission: string[];
- changeAuditPermission: string[];
- }
- export interface IGatherStepMatter extends IStepMatter {
- businessID: string;
- userID: string;
- }
- export interface ITemplateFile {
- originalName: string;
- realName: string;
- ID: string;
- path: string;
- }
- export interface IYsProfileTemplate {
- ID: string;
- parentID: string;
- gatherID: string;
- businessType: BusinessTypeKey;
- name: string;
- sort: string;
- enable: boolean;
- required: boolean;
- folder: boolean;
- mode: string[];
- selectMode?: string;
- fileNum?: number;
- remark?: string; // 备注
- profileIndex?: string; // 资料索引
- templateFiles: ITemplateFile[]; // 文件模板名称
- }
- export interface IGatherYsProfileTemplate extends IYsProfileTemplate {
- businessID: string;
- matterID?: string;
- matterListID?: string;
- dataID?: string;
- approvalID?: string;
- creatorId?: string;
- creatorName?: string;
- isEditNewFile?: boolean; // 是否在上个步骤被修改过
- isReadProcess?: string[]; // 已读步骤
- }
- export interface IDynamicStep {
- ID: string;
- gatherID: string;
- businessType: BusinessTypeKey;
- stepID: string;
- nextStepID: string;
- executorID: boolean;
- }
- export interface IGatherDynamicStep extends IDynamicStep {
- businessID: string;
- }
- // 组件权限相关
- export interface IProcessComponentPermission {
- // 是否可编辑
- editable: boolean;
- // 是否可查看
- viewable: boolean;
- // 是否可删除
- deletable?: boolean;
- // 能否创建项目
- createProject?: boolean;
- // 新增
- add?: boolean;
- // 审核
- audit?: boolean;
- // 增报
- addReport?: boolean;
- // 区间来源
- scopeSource?: {
- // 能否看区间来源tab
- viewable: boolean;
- // 能否看项目名称
- projectNameViewable: boolean;
- };
- }
- // 步骤里的的组件
- export interface IProcessComponent<T = any> {
- // 组件名:'cost'、'form'...
- name: string;
- // 组件权限
- permission: IProcessComponentPermission;
- // 组件数据
- data?: T | null;
- // 组件标题
- componentTitle?: string;
- // 报表打印设置
- reportConfig?: IMatterReportConfig;
- }
- // 步骤里的事项
- export interface IProcessMatter {
- // 事项ID
- matterID: string;
- // 事项可用组件
- components: IProcessComponent[];
- }
- // 前端展示需要用的事项数据结构
- export interface IMatterNode {
- ID: string;
- seq: number;
- parentID: string;
- name: string;
- components: IProcessComponent[];
- }
- export const ComponentNameMap: Record<string, string> = {
- dataProfile: '送审资料',
- form: '表单',
- costProfile: '造价文件',
- auditAmountSummary: '审核金额汇总',
- auditComments: '审核意见',
- settlement: '造价文件',
- budgetCompare: '概算-预算阶段造价对比',
- resultsDocument: '成果文件',
- changeAudit: '传统变更审核',
- reviewRecord: '预算复核',
- auditScore: '审核评分',
- };
- // 后台模板文件
- export interface IGypFileTemplate {
- ID: string;
- dataID: string;
- originalName: string;
- gypID: string;
- businessID: string;
- path: string;
- realName?: string;
- url?: string;
- }
- // 事项库
- export interface IMatterList {
- ID: string;
- name: string;
- approvalID: string;
- createdID: string;
- createdTime: number;
- }
|