process.ts 23 KB

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