process.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  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. }
  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. // 3合1协审人信息
  158. export interface ICollaborator {
  159. ID: string; // 用户ID
  160. creatorID?: string; // 创建协审人的ID
  161. canAddCo?: boolean; // 该协审是否可以添加协审
  162. executorInfo?: {
  163. executorID: string;
  164. executorName: string;
  165. }; // 执行者
  166. fixCollaborator?: boolean;
  167. institutionID?: string; // 机构ID,只在协审角色为审批单位的时候存在
  168. name?: string; // 用户姓名
  169. deadline: string | number; // 截至时间
  170. // 事项中组件及其权限
  171. inProcessMatters?: IProcessMatter[];
  172. // 事项后组件及其权限
  173. afterProcessMatters?: IProcessMatter[];
  174. }
  175. // 3合1添加协审下拉选项
  176. export interface ICollaboratorItem {
  177. institutionID?: string;
  178. institutionName?: string;
  179. approvalMembers: string[];
  180. approverName?: string;
  181. executorInfo?: {
  182. executorID: string;
  183. executorName: string;
  184. executorDataID?: string;
  185. };
  186. }
  187. // 三合一协审人范围
  188. export interface ICollaboratorScope {
  189. type: string;
  190. accounts: string[];
  191. institutionRoles: string[];
  192. }
  193. // 组件权限配置(主审、固定协审通用)
  194. export interface IComponentPermissionConfig {
  195. matterID: string;
  196. formPermission?: string[];
  197. costPermission?: string[];
  198. profilePermission?: string[];
  199. auditCommentsPermission?: string[];
  200. settlementPermission?: string[];
  201. budgetComparePermission?: string[];
  202. }
  203. // 固定协审配置
  204. export interface IFixedCollaboratorConfig {
  205. executors: string[]; // 固定协审
  206. permissions: IComponentPermissionConfig[];
  207. }
  208. // 参与者配置项
  209. export interface IParticipantConfig {
  210. type: string;
  211. accounts?: string[];
  212. institutionRoles?: string[];
  213. fixedCollaborators?: IFixedCollaboratorConfig[];
  214. cooperations?: { type: string; value: string }[];
  215. }
  216. export interface IProcedureParticipantExecutor {
  217. ID: string;
  218. members?: Members[];
  219. reportTime?: string | number;
  220. approvaledPermission?: string[]; // 事项后原始数据
  221. inProcessMatters?: IProcessMatter[];
  222. afterProcessMatters?: IProcessMatter[];
  223. }
  224. // 3合1参与者信息
  225. export interface IProcedureParticipantInfo {
  226. approvalWay: string;
  227. configure?: IParticipantConfig[];
  228. executor: IProcedureParticipantExecutor;
  229. collaborators: ICollaborator[];
  230. dynamicSteps: SimpleDynamicStep[];
  231. stepMatters?: IStepMatter[];
  232. }
  233. // 3合1分支判断信息
  234. export interface IConditionItem {
  235. ID: string;
  236. field: string;
  237. type: string;
  238. symbol: string;
  239. value: string;
  240. }
  241. // 3合1分支条件信息
  242. // eslint-disable-next-line prettier/prettier, no-use-before-define
  243. export interface IConditionInfoItem<T = IProcedureProcess> {
  244. ID: string;
  245. conditions: IConditionItem[];
  246. // eslint-disable-next-line prettier/prettier, no-use-before-define
  247. process: T[];
  248. }
  249. export interface IApostilleInfo {
  250. parentProcessID: string;
  251. parentProcessReferenceID: string;
  252. nextProcessID?: string;
  253. afterApostille?: string;
  254. }
  255. // 3合1步骤中的一个环节
  256. export interface IProcedureProcess {
  257. ID: string;
  258. referenceID: string;
  259. name: string;
  260. sectorType: SectorType;
  261. isReportProcess?: boolean; // 是否上报环节(因为上报环节是特殊的,所以加个字段方便处理)
  262. participantInfo?: IProcedureParticipantInfo;
  263. conditionInfo?: IConditionInfoItem[];
  264. apostilleInfo?: IApostilleInfo;
  265. condition?: {
  266. ID: string;
  267. processID: string;
  268. field: string;
  269. fieldValue: string;
  270. };
  271. // 步骤事项中的造价是否可编辑
  272. costEditable?: boolean;
  273. }
  274. export interface IProcedureItem {
  275. ID: string;
  276. approvalStatus: string;
  277. content: string;
  278. approvalTime: string;
  279. executor?: IProcessExecutor;
  280. executorProcessMatter?: {
  281. inProcessMatters: IProcessMatter[];
  282. afterProcessMatters: IProcessMatter[];
  283. };
  284. collaborators?: ICollaborator[];
  285. isReportProcess?: boolean;
  286. // members?: executorMember[];
  287. processID?: string;
  288. approvalWay?: string;
  289. dynamicSteps?: SimpleDynamicStep[];
  290. stepMatters?: IStepMatter[];
  291. nextProcessSectorType?: SectorType;
  292. conclusion?: string;
  293. addition?: string;
  294. reduction?: string;
  295. configure?: IParticipantConfig[];
  296. sectorType?: 'apostille' | 'condition' | 'approval';
  297. apostilleInfo?: IApostilleInfo;
  298. apostilleProcess?: IProcedureItem;
  299. }
  300. export interface IApproval {
  301. ID: string;
  302. name: string;
  303. createdID: string;
  304. createdTime: number;
  305. process: IProcess[];
  306. templateProcess?: IProcedureProcess[]; // 三合一需要用的流程模板
  307. subjectID?: string;
  308. businessType?: BusinessTypeKey;
  309. }
  310. export enum ApprovalStatus {
  311. CREATED = 'created', // 创建完成
  312. PROCESSING = 'processing', // 正在审批
  313. APPROVED = 'approved', // 审批通过
  314. }
  315. // 造价文件(费用项、建设项目)的添加类型
  316. export enum CostFileAddType {
  317. // 上报(第一步新增)
  318. REPORT = 'report',
  319. // 步骤中新增
  320. ADD = 'add',
  321. // 增报
  322. ADD_REPORT = 'addReport',
  323. }
  324. // 新增的、增报的费用项、 建设项目需要存储的步骤信息
  325. export interface IAddCostFileInfo {
  326. addType: CostFileAddType;
  327. // 来自步骤ID添加的
  328. processID: string;
  329. // 来自步骤ID添加的
  330. processName: string;
  331. // 创建人ID
  332. creatorID: string;
  333. // 创建人名字
  334. creatorName: string;
  335. }
  336. // 审核费用类型
  337. export enum AuditMoneyType {
  338. // 建设项目相关费用
  339. CONSTRUCTION = 'construction',
  340. // 费用项
  341. FEE_ITEM = 'feeItem',
  342. }
  343. export interface IProcessAuditMoney {
  344. ID: string;
  345. type: AuditMoneyType;
  346. // 来源ID,有的数据是基于某条数据拷贝而来的,sourceID为被拷贝数据的ID,方便查找源数据
  347. sourceID?: string;
  348. processID: string;
  349. addInfo?: IAddCostFileInfo;
  350. data: any[];
  351. }
  352. // 复制到项目里的流程
  353. export interface IProjectApproval extends IApproval {
  354. financialProjectID: string; // 财审项目ID
  355. constructionID: string; // 建设项目ID
  356. projectIDs: string[]; // 包含在流程里的项目(单位工程)
  357. status: ApprovalStatus; // 状态
  358. approvalTime?: number; // 审批通过时间
  359. currentProcessID?: string; // 当前正处于哪个环节ID
  360. businessID?: string; // 业务ID
  361. gatherID?: string;
  362. }
  363. // 三合一项目里的流程
  364. export interface IProcedureApproval {
  365. ID: string;
  366. name?: string;
  367. gatherID: string;
  368. businessType: BusinessTypeKey;
  369. businessID: string;
  370. templateProcess: IProcedureProcess[];
  371. process: IProcedureProcess[];
  372. }
  373. // 流程过程中存储的数据
  374. export interface IProcessData {
  375. ID: string;
  376. module: CptModelName | SubModelName; // 编辑的模块
  377. action: ActionType; // 动作,增删改等
  378. oDoc: any; // 存放删除时或者修改时的数据
  379. createTime: number; // 创建时间
  380. }
  381. // 备份数据集合
  382. export interface IProcessDataDoc {
  383. projectID: string;
  384. processID: string;
  385. index: number;
  386. processData: IProcessData[];
  387. }
  388. // 环节状态(精简)
  389. export enum SimpleProcessStatus {
  390. APPROVED = 'approved', // 审批通过
  391. FAILED = 'failed', // 失败
  392. REPORTED = 'reported', // 上报
  393. APOSTILLE = 'apostille', // 加签
  394. }
  395. // 审批待办类型
  396. export enum ApprovalType {
  397. APPROVER = 'approver', // 审批
  398. COREVIEW = 'coreview', // 协审
  399. REPORT = 'report', // 上报
  400. }
  401. export enum FinancialProjectStatus {
  402. UNREPORTED = 'unreported',
  403. APPROVING = 'approving',
  404. COMPLETION = 'completion',
  405. }
  406. // 流程环节待办列表项
  407. export interface IApprovalTodoData {
  408. approvalID: string; // 流程 id
  409. processID: string; // 环节 id
  410. financialProjectID: string; // 项目 ID
  411. constructionID?: string; // 建设项目 ID
  412. projectName?: string; // 项目名称
  413. reporterID?: string; // 发起人ID
  414. reporterName?: string; // 发起人名称
  415. lastID?: string; // 上环节ID(暂定为上环节用户ID,之后可能为上环节ID)
  416. lastName?: string; // 上环节名称(暂定为上环节用户名称,之后可能为上环节名称) 三合一是上环节名称
  417. nextID?: string; // 下一个步骤ID(三合一)
  418. nextName?: string; // 下一个步骤名称(三合一)
  419. reportTime?: number; // 上报时间
  420. lastStatus?: SimpleProcessStatus; // 上一环节的状态
  421. approveTime?: number; // 当前环节审批时间
  422. approveType?: SimpleProcessStatus; // 审批办结状态
  423. moveUserID?: string; // 环节流转(用户ID)
  424. moveUserName?: string; // 环节流转(用户名)
  425. approvalStatus?: ApprovalStatus; // 审批流程的状态
  426. type: ApprovalType; // 审批待办类型
  427. gatherID?: string;
  428. }
  429. export interface IApprovalTodoData2 {
  430. approvalID: string; // 流程 id
  431. processID: string; // 环节 id
  432. financialProjectID: string; // 项目 ID
  433. constructionID: string; // 建设项目 ID
  434. projectName?: string; // 项目名称
  435. // reporterID: string; // 发起人ID (删)
  436. // reporterName: string; // 发起人名称(删)
  437. lastID?: string; // 为上环节用户ID
  438. lastName?: string; // 上环节用户名称
  439. // reportTime: number; // 上报时间(删)
  440. lastStatus?: SimpleProcessStatus; // 上环节办结状态
  441. // approveTime: number; // 审批办结时间(删)
  442. approveType?: SimpleProcessStatus; // 审批办结状态
  443. // approvalStatus: ApprovalStatus; // 审批流程的状态(删)
  444. moveUserID?: string; // 环节流转(用户ID)
  445. moveUserName?: string; // 环节流转(用户名)
  446. type: ApprovalType; // 审批待办类型
  447. }
  448. export enum TodoType {
  449. APPROVAL = 'approval',
  450. }
  451. export enum TodoStatus {
  452. REMAIN = 'remain',
  453. COMPLETED = 'completed',
  454. }
  455. export interface ITodo {
  456. ID: string; // 待办 ID
  457. userID: string; // 用户 ID
  458. createdTime: number; // 创建时间(相当于环节流转时间)
  459. completedTime: number; // 完成时间(相当于审批办结时间)
  460. todoType: TodoType;
  461. data: any;
  462. status: TodoStatus;
  463. }
  464. export interface IApprovalTodo extends ITodo {
  465. data: IApprovalTodoData;
  466. }
  467. export enum ChangeRecord {
  468. CURRENT = 'current', // 当前清单
  469. ALLBILLS = 'all-bills', // 全部清单
  470. ALLGLJS = 'all-gljs', // 全部材价
  471. }
  472. export enum BusinessType {
  473. /** 预算 */
  474. BUDGET = 'undo',
  475. /** 结算 */
  476. SETTLEMENT = 'doing',
  477. /** 决算 */
  478. FINAL = 'done',
  479. }
  480. export enum BusinessStatus {
  481. /** 未上报 */
  482. UNREPORTED = 'unreported',
  483. /** 审批中 */
  484. APPROVING = 'approving',
  485. /** 审批完成 */
  486. COMPLETION = 'completion',
  487. }
  488. export interface IBusinessApprovalItem {
  489. ID?: string;
  490. name?: string;
  491. code?: string;
  492. gatherID?: string;
  493. businessType?: BusinessType;
  494. status?: BusinessStatus;
  495. /** 送审时间 */
  496. sendReviewTime?: string;
  497. /** 审结时间 */
  498. completionTime?: string;
  499. /** 送审金额 */
  500. reportMoney?: string;
  501. /** 审结金额 */
  502. conclusion?: string;
  503. /** 审增金额 */
  504. addition?: string;
  505. /** 审减金额 */
  506. reduction?: string;
  507. created?: string;
  508. createdID?: string;
  509. createTime?: string;
  510. }
  511. export interface IConditionSetting {
  512. ID: string;
  513. gatherID: string;
  514. schema?: string;
  515. }
  516. // 审核金额 核减、增金额数据
  517. export interface IAuditSummaryDiff {
  518. // 核减金额
  519. decFee: string;
  520. // 核增金额
  521. incFee: string;
  522. // 核减率
  523. decRate: string;
  524. // 核减率提示
  525. decRateTips?: string;
  526. // 核增率
  527. incRate: string;
  528. // 核增率提示
  529. incRateTips?: string;
  530. }
  531. // 审批金额汇总表数据
  532. export interface IAuditSummaryItem {
  533. // 阶段
  534. stage: string;
  535. // 执行者名称
  536. executor: string;
  537. // 执行者单位
  538. institution: string;
  539. // 审核步骤名称
  540. process: string;
  541. // 审结时间
  542. approvalTime: string;
  543. // 金额
  544. fee: string;
  545. // 大写金额
  546. feeInWords: string;
  547. // 与上一阶段对比
  548. compareToPrev: IAuditSummaryDiff;
  549. // 与上送审对比
  550. compareToReport: IAuditSummaryDiff;
  551. }
  552. // 审核明细数据
  553. export interface IAuditDetailItem {
  554. // 唯一标识,table渲染需要
  555. ID: string;
  556. // 步骤名
  557. process: string;
  558. // 单位
  559. institution: string;
  560. // 姓名
  561. userName: string;
  562. // 角色:负责人、协审
  563. role: string;
  564. // 起始金额
  565. beginFee: string;
  566. // 结束金额
  567. endFee: string;
  568. // 审增
  569. incFee: string;
  570. // 审减
  571. decFee: string;
  572. // 增减比例
  573. rate: string;
  574. // 状态文本
  575. status: string;
  576. // 审核状态
  577. approvalStatus: string;
  578. // 协审为子项
  579. children: IAuditDetailItem[];
  580. }
  581. // 审核意见表(入库数据)
  582. export interface IAuditComment {
  583. ID: string;
  584. // 业务ID
  585. businessID: string;
  586. // 关联模板步骤ID(一个步骤只有一份意见,所以得用模板ID,不能用全环节中的步骤)
  587. refProcessID: string;
  588. // 富文本
  589. richText: string;
  590. // 创建时间
  591. createTime: number;
  592. // 更新时间
  593. updateTime: number;
  594. // 富文本模板(只有第一版才有内容,方便还原模板)
  595. template?: string;
  596. }
  597. // 审核意见历史
  598. export interface IAuditCommentHistory {
  599. // 意见ID
  600. commentID: string;
  601. // 步骤
  602. process: string;
  603. // 版本(第几版)
  604. version: string;
  605. // 执行者
  606. executor: string;
  607. // 单位
  608. institution: string;
  609. // 审批通过时间
  610. approvalTime?: string;
  611. // 审批状态
  612. status: ProcessStatus;
  613. }
  614. // 传统结算未上报数据
  615. export interface ISettlementItem {
  616. // 建设项目ID
  617. constructionID: string;
  618. // 名称
  619. name: string;
  620. // 项目原报金额
  621. orgFee: string;
  622. // 当前步骤审核金额
  623. curFee: string;
  624. // 清单检测合格率
  625. billCheckRate: string;
  626. // 费用项ID
  627. feeID?: string;
  628. // 费用类型
  629. type?: AuditMoneyType;
  630. // 备注
  631. remark?: string;
  632. }
  633. // 传统结算已上报审核数据
  634. export interface ISettlementAuditItem {
  635. // 唯一标识,table渲染需要
  636. ID: string;
  637. // 建设项目ID
  638. constructionID?: string;
  639. // 名称
  640. name: string;
  641. // 起始金额
  642. beginFee?: string;
  643. // 结束金额
  644. endFee?: string;
  645. // 增减金额
  646. incFee?: string;
  647. decFee?: string;
  648. // 增减率
  649. incRate?: string;
  650. decRate?: string;
  651. // 审核通过时间
  652. approvalTime?: string;
  653. // 用户信息
  654. user?: {
  655. name: string;
  656. institution: string;
  657. executor: string;
  658. };
  659. // 审核状态
  660. approvalStatus?: string;
  661. children: ISettlementAuditItem[];
  662. // 数据是否是原始数据(有的费用项是从上一步拷贝而来的,不给删除)
  663. isOriginal?: boolean;
  664. // 费用项ID
  665. feeID?: string;
  666. // 费用类型
  667. type?: AuditMoneyType;
  668. // 备注
  669. remark?: string;
  670. // 新增、增报项目费用项步骤信息
  671. addInfo?: IAddCostFileInfo;
  672. // 等待审批通过的行
  673. waitApproved?: boolean;
  674. }
  675. // 概算预算阶段造价对比 审核明细表格数据
  676. export interface IBudgetEstimateTableItem {
  677. name: string;
  678. // 原报金额
  679. reportFee: string;
  680. // 审核金额
  681. auditFee: string;
  682. // 增减金额
  683. incFee?: string;
  684. decFee?: string;
  685. // 增减率
  686. incRate?: string;
  687. decRate?: string;
  688. // 审核状态
  689. approvalStatus?: string;
  690. // 审核状态文本
  691. approvalStatusText?: string;
  692. }
  693. export interface IApostilleParamUser {
  694. ID?: string;
  695. type?: string;
  696. }
  697. export enum AddSignType {
  698. MYDEPARTMENT = 'myDepartment', // 本部门
  699. ALLDEPARTMENT = 'allDepartment', // 本部门及下属部门
  700. MYINSTITUTION = 'myInstitution', // 本单位
  701. ACCOUNT = 'account', // 用户
  702. INSTITUTION = 'institution', // 单位
  703. DEPARTMENT = 'department', // 部门
  704. CONSTRUCTION = 'construction', // 建设单位
  705. CONSULTING = 'consulting', // 咨询单位
  706. AUDIT = 'audit', // 审核单位
  707. ALLEXECUTOR = 'allExecutor', // 执行者目录
  708. EXECUTOR = 'executor', // 执行者
  709. ALLINSTITUTIONROLE = 'allInstitutionRole', // 单位接收人目录
  710. INSTITUTIONROLE = 'institutionRole', // 单位接收人
  711. }
  712. export enum RangeSelectType {
  713. USER = 'user',
  714. ROLE = 'role',
  715. }
  716. export interface IRangeSelectTree<T extends RangeSelectType = any> {
  717. ID: string | number;
  718. label: string;
  719. rangeType: T;
  720. children?: IRangeSelectTree<T>[];
  721. icon?: string;
  722. [key: string]: any;
  723. }
  724. export interface IApostilleParam {
  725. permissions: Record<string, string[]>;
  726. user: IApostilleParamUser;
  727. afterApostille: 'next' | 'me';
  728. canCollaborate: boolean;
  729. collaborators: IRangeSelectTree[];
  730. }