process.ts 22 KB

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