process.ts 22 KB

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