process.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. import { ReportTree } from './report';
  2. import { CptModelName, SubModelName, ActionType } from './base';
  3. import { BusinessTypeKey } from './gather';
  4. import { executorMember } from './approvalStatus';
  5. import { IProcessMatter, IStepMatter } from './matter';
  6. // 环节类型
  7. export enum SectorType {
  8. APPROVAL = 'approval', // 审批
  9. CONDITION = 'condition', // 条件
  10. APOSTILLE = 'apostille', // 加签
  11. }
  12. export enum ProcessStatus {
  13. WAITING = 'waiting', // 待审批
  14. APPROVED = 'approved', // 审批通过
  15. ACTIVATING = 'activating', // 当前流程
  16. FAILED = 'failed', // 审批退回
  17. }
  18. // 审批方式
  19. export enum ApprovalWay {
  20. REPORT = 'report', // 上报审批
  21. ACCOUNT = 'account', // 指定用户
  22. JOINTLYSIGN = 'jointlySign', // 会签
  23. ORSIGN = 'orSign', // 或签
  24. ORDERAPPROVAL = 'orderApproval', // 依次审批
  25. PREACCOUNT = 'prevAccount', // 上一审批人设置
  26. }
  27. // 角色权限
  28. export enum RolePermission {
  29. MY_REPORT = 'report', // 我的项目-项目上报
  30. MY_FREE_REPORT = 'freeReport', // 我的项目-指定审批人
  31. MY_ADD_PROJECT = 'addProject', // 我的项目-新建项目
  32. MY_EDIT_PROJECT = 'editProject', // 我的项目-编辑项目
  33. MY_EXPORT_PROJECT = 'exportProject', // 我的项目-导出项目
  34. MY_DEL_PROJECT = 'delProject', // 我的项目-删除项目
  35. MY_VIEW_PROJECT = 'viewProject', // 我的项目-查看项目
  36. MY_VIEW_APPROVAL = 'viewApproval', // 我的项目-审批进度
  37. MY_SAVE_INDEX = 'viewZbkProject', // 我的项目-指标入库
  38. JOIN_VIEW_PARTICIPATING_PROJECT = 'viewParticipatingProject', // 我参与的项目-查看项目
  39. JOIN_SAVE_INDEX = 'saveIndex', // 我参与的项目-指标入库
  40. JOIN_EXPORT_PARTICIPATING_PROJECT = 'exportParticipatingProject', // 我参与的项目-导出项目
  41. ALL_SET_PROJECT = 'setProjects', // 全部项目-项目设置
  42. ALL_VIEW_ALL_PROJECTS = 'viewAllProjects', // 全部项目-查看项目
  43. ALL_SAVE_INDEX = 'saveIndexAll', // 全部项目-指标入库
  44. ALL_EXPORT_PROJECTS = 'exportProjects', // 全部项目-导出项目
  45. ZBK_ENABLE = 'zbkEnable', // 指标库启用
  46. ZBK_EDIT = 'zbkEdit', // 指标库-编辑
  47. SAVE_INDEX = 'saveIndex', // 我参与的项目-指标入库
  48. CJK_ENABLE = 'cjkEnable', // 材价库-启用
  49. CJK_EDIT = 'cjkEdit', // 材价库-编辑
  50. BACK_STAGE_ENABLE = 'backstageEnable', // 小后台权限
  51. ENABLE_NOTICE = 'enableNotice', // 管理员发布通知
  52. ENABLE_LOGO = 'enableLogo',
  53. // TODO 指标库 区间对数
  54. }
  55. // 系统角色
  56. export enum RoleType {
  57. SYSTEM = 'system',
  58. SYSTEM_NORMAL = 'systemNormal',
  59. NORMAL = 'normal',
  60. }
  61. // 角色
  62. export interface IRole {
  63. ID: string;
  64. name: string;
  65. roleType: RoleType;
  66. frontPermission: RolePermission[];
  67. }
  68. // 参与者模式
  69. export enum ParticipantMode {
  70. ACCOUNT = 'account', // 用户模式
  71. ROLE = 'role', // 角色模式(未来)
  72. }
  73. export enum AccountConfigure {
  74. SKIP = 'skip', // 允许跳过
  75. RETURN = 'return', // 允许退回
  76. REVOKE = 'revoke', // 允许撤回
  77. ASSISTAUDIT = 'assistAudit', // 协审
  78. ADDSIGN = 'addSign', // 加签
  79. NEXTSECTOR = 'nextSector', // 是否可添加环节
  80. }
  81. export interface ICoreView {
  82. ID: string; // 用户ID
  83. projectIDs: string[]; // 充许协审的单位工程ID,为空数组时表示可以协审当前环节的所有项目
  84. }
  85. export interface IProcessAccount {
  86. // ID 账号ID name 名称institutionID 企事业ID
  87. ID: string;
  88. name: string; // 曾用名,不会变动
  89. institutionID?: string; // 单位ID(可能不会用到)
  90. institutionName?: string; // 单位名称(不要保存到数据库,而是在使用的时候通过ID去查)
  91. status: ProcessStatus; // 审批状态
  92. alreadyAddProcess?: boolean; // 是否已经添加了新环节(暂时用的,用于标记是否添加了环节,以后可能删除)
  93. configure: AccountConfigure[]; // 权限配置
  94. remark: string; // 审批意见(肯定有,会有默认值)
  95. coreViews: ICoreView[]; // 协审人信息
  96. projectIDs: string[]; // 允许审批的单位工程ID,为空数组时表示可以审批当前环节的所有项目
  97. }
  98. // 参与者信息
  99. export interface IParticipantInfo {
  100. approvalWay: ApprovalWay;
  101. participantMode: ParticipantMode;
  102. accounts: IProcessAccount[];
  103. }
  104. // 后台的
  105. // 流程中的一个环节
  106. export interface IProcess {
  107. ID: string;
  108. name: string;
  109. sectorType: SectorType;
  110. seq?: number;
  111. createdByProcess?: string; // 上环节ID, 表示哪个环节创建的(上环节添加的)
  112. time?: number; // 当前环节完成时间(仅当审批通过或审批退回时会有时间)
  113. participantInfo: IParticipantInfo;
  114. afterAuditMoney?: number; // 审后的金额
  115. }
  116. export interface Members {
  117. ID: string;
  118. approvalStatus: string;
  119. approvalTime: number | string;
  120. approvalComment: string;
  121. name?: string;
  122. institutionID?: string;
  123. institutionName?: string;
  124. approvedType?: string;
  125. }
  126. // 3合1执行者
  127. export interface IProcessExecutor {
  128. ID: string;
  129. permission: string[];
  130. configure: string[];
  131. businessType: BusinessTypeKey;
  132. gatherID: string;
  133. setType: string;
  134. participantMode: string;
  135. name: string;
  136. dataID: string;
  137. reportTime?: string; // 三合一审批流程第一位的上报时间
  138. scope?: string;
  139. members?: Members[];
  140. // 事项中组件及其权限
  141. inProcessMatters?: IProcessMatter[];
  142. // 事项后组件及其权限
  143. afterProcessMatters?: IProcessMatter[];
  144. }
  145. export interface SimpleDynamicStep {
  146. stepID: string;
  147. stepName: string;
  148. executorID?: string;
  149. executorName?: string;
  150. }
  151. // export interface ICollaboratorPermission {
  152. // matterID: string;
  153. // form: string[];
  154. // cost: string[];
  155. // profile: string[];
  156. // }
  157. export interface ICollaboratorExecutorInfo {
  158. executorID: string;
  159. executorName: string;
  160. executorDataID?: string;
  161. }
  162. // 3合1协审人信息
  163. export interface ICollaborator {
  164. ID: string; // 用户ID
  165. creatorID?: string; // 创建协审人的ID
  166. canAddCo?: boolean; // 该协审是否可以添加协审
  167. executorInfo?: ICollaboratorExecutorInfo; // 执行者
  168. fixCollaborator?: boolean;
  169. institutionID?: string; // 机构ID,只在协审角色为审批单位的时候存在
  170. name?: string; // 用户姓名
  171. deadline: string | number; // 截至时间
  172. // 事项中组件及其权限
  173. inProcessMatters?: IProcessMatter[];
  174. // 事项后组件及其权限
  175. afterProcessMatters?: IProcessMatter[];
  176. }
  177. // 3合1添加协审下拉选项
  178. export interface ICollaboratorItem {
  179. institutionID?: string;
  180. institutionName?: string;
  181. approvalMembers: string[];
  182. approverName?: string;
  183. executorInfo?: ICollaboratorExecutorInfo;
  184. }
  185. // 三合一协审人范围
  186. export interface ICollaboratorScope {
  187. type: string;
  188. accounts: string[];
  189. institutionRoles: string[];
  190. }
  191. // 组件权限配置(主审、固定协审通用)
  192. export interface IComponentPermissionConfig {
  193. matterID: string;
  194. formPermission?: string[];
  195. costPermission?: string[];
  196. profilePermission?: string[];
  197. auditCommentsPermission?: string[];
  198. settlementPermission?: string[];
  199. budgetComparePermission?: string[];
  200. }
  201. // 固定协审配置
  202. export interface IFixedCollaboratorConfig {
  203. executors: string[]; // 固定协审
  204. permissions: IComponentPermissionConfig[];
  205. }
  206. // 参与者配置项
  207. export interface IParticipantConfig {
  208. type: string;
  209. accounts?: string[];
  210. institutionRoles?: string[];
  211. fixedCollaborators?: IFixedCollaboratorConfig[];
  212. cooperations?: { type: string; value: string }[];
  213. }
  214. export interface IProcedureParticipantExecutor {
  215. ID: string;
  216. members?: Members[];
  217. reportTime?: string | number;
  218. approvaledPermission?: string[]; // 事项后原始数据
  219. inProcessMatters?: IProcessMatter[];
  220. afterProcessMatters?: IProcessMatter[];
  221. }
  222. // 3合1参与者信息
  223. export interface IProcedureParticipantInfo {
  224. approvalWay: string;
  225. configure?: IParticipantConfig[];
  226. executor: IProcedureParticipantExecutor;
  227. collaborators: ICollaborator[];
  228. dynamicSteps: SimpleDynamicStep[];
  229. stepMatters?: IStepMatter[];
  230. }
  231. // 3合1分支判断信息
  232. export interface IConditionItem {
  233. ID: string;
  234. field: string;
  235. type: string;
  236. symbol: string;
  237. value: string;
  238. }
  239. // 3合1分支条件信息
  240. // eslint-disable-next-line prettier/prettier, no-use-before-define
  241. export interface IConditionInfoItem<T = IProcedureProcess> {
  242. ID: string;
  243. conditions: IConditionItem[];
  244. // eslint-disable-next-line prettier/prettier, no-use-before-define
  245. process: T[];
  246. }
  247. export interface IApostilleInfo {
  248. parentProcessID: string;
  249. parentProcessReferenceID: string;
  250. nextProcessID?: string;
  251. afterApostille?: string;
  252. }
  253. // 3合1步骤中的一个环节
  254. export interface IProcedureProcess {
  255. ID: string;
  256. referenceID: string;
  257. name: string;
  258. sectorType: SectorType;
  259. isReportProcess?: boolean; // 是否上报环节(因为上报环节是特殊的,所以加个字段方便处理)
  260. participantInfo?: IProcedureParticipantInfo;
  261. conditionInfo?: IConditionInfoItem[];
  262. apostilleInfo?: IApostilleInfo;
  263. condition?: {
  264. ID: string;
  265. processID: string;
  266. field: string;
  267. fieldValue: string;
  268. };
  269. // 步骤事项中的造价是否可编辑
  270. costEditable?: boolean;
  271. }
  272. export interface IProcedureItem {
  273. ID: string;
  274. approvalStatus: string;
  275. content: string;
  276. approvalTime: string;
  277. executor?: IProcessExecutor;
  278. executorProcessMatter?: {
  279. inProcessMatters: IProcessMatter[];
  280. afterProcessMatters: IProcessMatter[];
  281. };
  282. collaborators?: ICollaborator[];
  283. isReportProcess?: boolean;
  284. // members?: executorMember[];
  285. processID?: string;
  286. approvalWay?: string;
  287. dynamicSteps?: SimpleDynamicStep[];
  288. stepMatters?: IStepMatter[];
  289. nextProcessSectorType?: SectorType;
  290. conclusion?: string;
  291. addition?: string;
  292. reduction?: string;
  293. configure?: IParticipantConfig[];
  294. sectorType?: 'apostille' | 'condition' | 'approval';
  295. apostilleInfo?: IApostilleInfo;
  296. apostilleProcess?: IProcedureItem;
  297. }
  298. export interface IApproval {
  299. ID: string;
  300. name: string;
  301. createdID: string;
  302. createdTime: number;
  303. process: IProcess[];
  304. templateProcess?: IProcedureProcess[]; // 三合一需要用的流程模板
  305. scope?: IScopeType[];
  306. subjectID?: string;
  307. businessType?: BusinessTypeKey;
  308. }
  309. export interface IScopeType {
  310. type: string;
  311. value: string;
  312. }
  313. export enum ApprovalStatus {
  314. CREATED = 'created', // 创建完成
  315. PROCESSING = 'processing', // 正在审批
  316. APPROVED = 'approved', // 审批通过
  317. }
  318. // 造价文件(费用项、建设项目)的添加类型
  319. export enum CostFileAddType {
  320. // 上报(第一步新增)
  321. REPORT = 'report',
  322. // 步骤中新增
  323. ADD = 'add',
  324. // 增报
  325. ADD_REPORT = 'addReport',
  326. }
  327. // 新增的、增报的费用项、 建设项目需要存储的步骤信息
  328. export interface IAddCostFileInfo {
  329. addType: CostFileAddType;
  330. // 来自步骤ID添加的
  331. processID: string;
  332. // 来自步骤ID添加的
  333. processName: string;
  334. // 创建人ID
  335. creatorID: string;
  336. // 创建人名字
  337. creatorName: string;
  338. }
  339. // 审核费用类型
  340. export enum AuditMoneyType {
  341. // 建设项目相关费用
  342. CONSTRUCTION = 'construction',
  343. // 费用项
  344. FEE_ITEM = 'feeItem',
  345. }
  346. export interface IProcessAuditMoney {
  347. ID: string;
  348. type: AuditMoneyType;
  349. // 来源ID,有的数据是基于某条数据拷贝而来的,sourceID为被拷贝数据的ID,方便查找源数据
  350. sourceID?: string;
  351. processID: string;
  352. addInfo?: IAddCostFileInfo;
  353. data: any[];
  354. }
  355. // 复制到项目里的流程
  356. export interface IProjectApproval extends IApproval {
  357. financialProjectID: string; // 财审项目ID
  358. constructionID: string; // 建设项目ID
  359. projectIDs: string[]; // 包含在流程里的项目(单位工程)
  360. status: ApprovalStatus; // 状态
  361. approvalTime?: number; // 审批通过时间
  362. currentProcessID?: string; // 当前正处于哪个环节ID
  363. businessID?: string; // 业务ID
  364. gatherID?: string;
  365. }
  366. // 三合一项目里的流程
  367. export interface IProcedureApproval {
  368. ID: string;
  369. name?: string;
  370. gatherID: string;
  371. businessType: BusinessTypeKey;
  372. businessID: string;
  373. templateProcess: IProcedureProcess[];
  374. process: IProcedureProcess[];
  375. }
  376. // 流程过程中存储的数据
  377. export interface IProcessData {
  378. ID: string;
  379. module: CptModelName | SubModelName; // 编辑的模块
  380. action: ActionType; // 动作,增删改等
  381. oDoc: any; // 存放删除时或者修改时的数据
  382. createTime: number; // 创建时间
  383. }
  384. // 备份数据集合
  385. export interface IProcessDataDoc {
  386. projectID: string;
  387. processID: string;
  388. index: number;
  389. processData: IProcessData[];
  390. }
  391. // 环节状态(精简)
  392. export enum SimpleProcessStatus {
  393. APPROVED = 'approved', // 审批通过
  394. FAILED = 'failed', // 失败
  395. REPORTED = 'reported', // 上报
  396. APOSTILLE = 'apostille', // 加签
  397. }
  398. // 审批待办类型
  399. export enum ApprovalType {
  400. APPROVER = 'approver', // 审批
  401. COREVIEW = 'coreview', // 协审
  402. REPORT = 'report', // 上报
  403. }
  404. export enum FinancialProjectStatus {
  405. UNREPORTED = 'unreported',
  406. APPROVING = 'approving',
  407. COMPLETION = 'completion',
  408. }
  409. // 流程环节待办列表项
  410. export interface IApprovalTodoData {
  411. approvalID: string; // 流程 id
  412. processID: string; // 环节 id
  413. financialProjectID: string; // 项目 ID
  414. constructionID?: string; // 建设项目 ID
  415. projectName?: string; // 项目名称
  416. reporterID?: string; // 发起人ID
  417. reporterName?: string; // 发起人名称
  418. lastID?: string; // 上环节ID(暂定为上环节用户ID,之后可能为上环节ID)
  419. lastName?: string; // 上环节名称(暂定为上环节用户名称,之后可能为上环节名称) 三合一是上环节名称
  420. nextID?: string; // 下一个步骤ID(三合一)
  421. nextName?: string; // 下一个步骤名称(三合一)
  422. reportTime?: number; // 上报时间
  423. lastStatus?: SimpleProcessStatus; // 上一环节的状态
  424. approveTime?: number; // 当前环节审批时间
  425. approveType?: SimpleProcessStatus; // 审批办结状态
  426. moveUserID?: string; // 环节流转(用户ID)
  427. moveUserName?: string; // 环节流转(用户名)
  428. approvalStatus?: ApprovalStatus; // 审批流程的状态
  429. type: ApprovalType; // 审批待办类型
  430. gatherID?: string;
  431. }
  432. export interface IApprovalTodoData2 {
  433. approvalID: string; // 流程 id
  434. processID: string; // 环节 id
  435. financialProjectID: string; // 项目 ID
  436. constructionID: string; // 建设项目 ID
  437. projectName?: string; // 项目名称
  438. // reporterID: string; // 发起人ID (删)
  439. // reporterName: string; // 发起人名称(删)
  440. lastID?: string; // 为上环节用户ID
  441. lastName?: string; // 上环节用户名称
  442. // reportTime: number; // 上报时间(删)
  443. lastStatus?: SimpleProcessStatus; // 上环节办结状态
  444. // approveTime: number; // 审批办结时间(删)
  445. approveType?: SimpleProcessStatus; // 审批办结状态
  446. // approvalStatus: ApprovalStatus; // 审批流程的状态(删)
  447. moveUserID?: string; // 环节流转(用户ID)
  448. moveUserName?: string; // 环节流转(用户名)
  449. type: ApprovalType; // 审批待办类型
  450. }
  451. export enum TodoType {
  452. APPROVAL = 'approval',
  453. }
  454. export enum TodoStatus {
  455. REMAIN = 'remain',
  456. COMPLETED = 'completed',
  457. }
  458. export interface ITodo {
  459. ID: string; // 待办 ID
  460. userID: string; // 用户 ID
  461. createdTime: number; // 创建时间(相当于环节流转时间)
  462. completedTime: number; // 完成时间(相当于审批办结时间)
  463. todoType: TodoType;
  464. data: any;
  465. status: TodoStatus;
  466. }
  467. export interface IApprovalTodo extends ITodo {
  468. data: IApprovalTodoData;
  469. }
  470. export enum ChangeRecord {
  471. CURRENT = 'current', // 当前清单
  472. ALLBILLS = 'all-bills', // 全部清单
  473. ALLGLJS = 'all-gljs', // 全部材价
  474. }
  475. export enum BusinessType {
  476. /** 预算 */
  477. BUDGET = 'undo',
  478. /** 结算 */
  479. SETTLEMENT = 'doing',
  480. /** 决算 */
  481. FINAL = 'done',
  482. }
  483. export enum BusinessStatus {
  484. /** 未上报 */
  485. UNREPORTED = 'unreported',
  486. /** 审批中 */
  487. APPROVING = 'approving',
  488. /** 审批完成 */
  489. COMPLETION = 'completion',
  490. }
  491. export interface IBusinessApprovalItem {
  492. ID?: string;
  493. name?: string;
  494. code?: string;
  495. gatherID?: string;
  496. businessType?: BusinessType;
  497. status?: BusinessStatus;
  498. /** 送审时间 */
  499. sendReviewTime?: string;
  500. /** 审结时间 */
  501. completionTime?: string;
  502. /** 送审金额 */
  503. reportMoney?: string;
  504. /** 审结金额 */
  505. conclusion?: string;
  506. /** 审增金额 */
  507. addition?: string;
  508. /** 审减金额 */
  509. reduction?: string;
  510. created?: string;
  511. createdID?: string;
  512. createTime?: string;
  513. }
  514. export interface IConditionSetting {
  515. ID: string;
  516. gatherID: string;
  517. schema?: string;
  518. }
  519. // 审核金额 核减、增金额数据
  520. export interface IAuditSummaryDiff {
  521. // 核减金额
  522. decFee: string;
  523. // 核增金额
  524. incFee: string;
  525. // 核减率
  526. decRate: string;
  527. // 核减率提示
  528. decRateTips?: string;
  529. // 核增率
  530. incRate: string;
  531. // 核增率提示
  532. incRateTips?: string;
  533. }
  534. // 审批金额汇总表数据
  535. export interface IAuditSummaryItem {
  536. // 阶段
  537. stage: string;
  538. // 执行者名称
  539. executor: string;
  540. // 执行者单位
  541. institution: string;
  542. // 审核步骤名称
  543. process: string;
  544. // 审结时间
  545. approvalTime: string;
  546. // 金额
  547. fee: string;
  548. // 大写金额
  549. feeInWords: string;
  550. // 与上一阶段对比
  551. compareToPrev: IAuditSummaryDiff;
  552. // 与上送审对比
  553. compareToReport: IAuditSummaryDiff;
  554. }
  555. // 审核明细数据
  556. export interface IAuditDetailItem {
  557. // 唯一标识,table渲染需要
  558. ID: string;
  559. // 步骤名
  560. process: string;
  561. // 单位
  562. institution: string;
  563. // 姓名
  564. userName: string;
  565. // 角色:负责人、协审
  566. role: string;
  567. // 起始金额
  568. beginFee: string;
  569. // 结束金额
  570. endFee: string;
  571. // 审增
  572. incFee: string;
  573. // 审减
  574. decFee: string;
  575. // 增减比例
  576. rate: string;
  577. // 状态文本
  578. status: string;
  579. // 审核状态
  580. approvalStatus: string;
  581. // 协审为子项
  582. children: IAuditDetailItem[];
  583. }
  584. // 审核意见表(入库数据)
  585. export interface IAuditComment {
  586. ID: string;
  587. // 业务ID
  588. businessID: string;
  589. // 关联模板步骤ID(一个步骤只有一份意见,所以得用模板ID,不能用全环节中的步骤)
  590. refProcessID: string;
  591. // 富文本
  592. richText: string;
  593. // 创建时间
  594. createTime: number;
  595. // 更新时间
  596. updateTime: number;
  597. // 富文本模板(只有第一版才有内容,方便还原模板)
  598. template?: string;
  599. }
  600. // 审核意见历史
  601. export interface IAuditCommentHistory {
  602. // 意见ID
  603. commentID: string;
  604. // 步骤
  605. process: string;
  606. // 版本(第几版)
  607. version: string;
  608. // 执行者
  609. executor: string;
  610. // 单位
  611. institution: string;
  612. // 审批通过时间
  613. approvalTime?: string;
  614. // 审批状态
  615. status: ProcessStatus;
  616. }
  617. // 传统结算未上报数据
  618. export interface ISettlementItem {
  619. // 建设项目ID
  620. constructionID: string;
  621. // 名称
  622. name: string;
  623. // 项目原报金额
  624. orgFee: string;
  625. // 当前步骤审核金额
  626. curFee: string;
  627. // 清单检测合格率
  628. billCheckRate: string;
  629. // 费用项ID
  630. feeID?: string;
  631. // 费用类型
  632. type?: AuditMoneyType;
  633. // 备注
  634. remark?: string;
  635. }
  636. // 传统结算已上报审核数据
  637. export interface ISettlementAuditItem {
  638. // 唯一标识,table渲染需要
  639. ID: string;
  640. // 建设项目ID
  641. constructionID?: string;
  642. // 名称
  643. name: string;
  644. // 起始金额
  645. beginFee?: string;
  646. // 结束金额
  647. endFee?: string;
  648. // 增减金额
  649. incFee?: string;
  650. decFee?: string;
  651. // 增减率
  652. incRate?: string;
  653. decRate?: string;
  654. // 审核通过时间
  655. approvalTime?: string;
  656. // 用户信息
  657. user?: {
  658. name: string;
  659. institution: string;
  660. executor: string;
  661. };
  662. // 审核状态
  663. approvalStatus?: string;
  664. children: ISettlementAuditItem[];
  665. // 数据是否是原始数据(有的费用项是从上一步拷贝而来的,不给删除)
  666. isOriginal?: boolean;
  667. // 费用项ID
  668. feeID?: string;
  669. // 费用类型
  670. type?: AuditMoneyType;
  671. // 备注
  672. remark?: string;
  673. // 新增、增报项目费用项步骤信息
  674. addInfo?: IAddCostFileInfo;
  675. // 等待审批通过的行
  676. waitApproved?: boolean;
  677. }
  678. // 概算预算阶段造价对比 审核明细表格数据
  679. export interface IBudgetEstimateTableItem {
  680. name: string;
  681. // 原报金额
  682. reportFee: string;
  683. // 审核金额
  684. auditFee: string;
  685. // 增减金额
  686. incFee?: string;
  687. decFee?: string;
  688. // 增减率
  689. incRate?: string;
  690. decRate?: string;
  691. // 审核状态
  692. approvalStatus?: string;
  693. // 审核状态文本
  694. approvalStatusText?: string;
  695. }
  696. export interface IApostilleParamUser {
  697. ID?: string;
  698. type?: string;
  699. }
  700. export enum AddSignType {
  701. MYDEPARTMENT = 'myDepartment', // 本部门
  702. ALLDEPARTMENT = 'allDepartment', // 本部门及下属部门
  703. MYINSTITUTION = 'myInstitution', // 本单位
  704. ACCOUNT = 'account', // 用户
  705. INSTITUTION = 'institution', // 单位
  706. DEPARTMENT = 'department', // 部门
  707. CONSTRUCTION = 'construction', // 建设单位
  708. CONSULTING = 'consulting', // 咨询单位
  709. AUDIT = 'audit', // 审核单位
  710. ALLEXECUTOR = 'allExecutor', // 执行者目录
  711. EXECUTOR = 'executor', // 执行者
  712. ALLINSTITUTIONROLE = 'allInstitutionRole', // 单位接收人目录
  713. INSTITUTIONROLE = 'institutionRole', // 单位接收人
  714. }
  715. export enum RangeSelectType {
  716. USER = 'user',
  717. ROLE = 'role',
  718. }
  719. export interface IRangeSelectTree<T extends RangeSelectType = any> {
  720. ID: string | number;
  721. label: string;
  722. rangeType: T;
  723. children?: IRangeSelectTree<T>[];
  724. icon?: string;
  725. [key: string]: any;
  726. }
  727. export interface IApostilleParam {
  728. permissions: Record<string, string[]>;
  729. user: IApostilleParamUser;
  730. afterApostille: 'next' | 'me';
  731. canCollaborate: boolean;
  732. collaborators: IRangeSelectTree[];
  733. }