process.ts 21 KB

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