compilation.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. import { TaxType, IGLJCol } from './project';
  2. import { IFileRef, INumFileRef } from './base';
  3. import { IBillOption } from './bill';
  4. export interface ICptItem {
  5. ID: string;
  6. name: string;
  7. description: string;
  8. }
  9. export interface IProgramLib extends INumFileRef {
  10. displayName: string;
  11. }
  12. export interface ITaxGroup {
  13. programLib: IProgramLib;
  14. templateLib: IFileRef;
  15. colLib: IFileRef;
  16. feeLib: IFileRef;
  17. taxType: TaxType;
  18. normLib: string; // 指标分部
  19. }
  20. // 工程专业
  21. export interface IEngineering {
  22. ID: string;
  23. name: string;
  24. feeName: string;
  25. engineering: number;
  26. projectEngineering: number;
  27. valuationID: string;
  28. // 显示设置
  29. isAreaIncrease?: boolean; // 显示面积增加费
  30. isItemIncrease?: boolean; // 显示子目增加费
  31. isInstall?: boolean; // 显示安装增加费
  32. gljCol?: IGLJCol;
  33. overHeightLib?: IFileRef[];
  34. economicLib?: IFileRef[];
  35. mainQuantityLib?: IFileRef[];
  36. materialLib?: IFileRef[];
  37. engineerFeatureLib?: IFileRef[];
  38. engineerInfoLib?: IFileRef[];
  39. infoLib?: IFileRef[];
  40. featureLib?: IFileRef[];
  41. artificialLib?: INumFileRef[];
  42. billLib?: IBillOption[];
  43. billsGuidanceLib?: IFileRef[];
  44. gljLib?: INumFileRef[];
  45. rationLib?: INumFileRef[];
  46. progressiveLib?: IFileRef[];
  47. taxGroup: ITaxGroup[];
  48. indexName?: string; // 指标专业名称
  49. }
  50. export interface IValuation {
  51. engineeringList: IEngineering[];
  52. enable: boolean;
  53. ID: string;
  54. name: string;
  55. }
  56. export enum versionType {
  57. FREE = 'free', // 免费版
  58. PRO = 'pro', // 专业版
  59. }
  60. export enum LockInfo {
  61. DEFAULT = 0, // 默认值
  62. BORROW = 1, // 借用
  63. BUY = 2, // 销售
  64. }
  65. export interface IConsumeAmt {
  66. region: string;
  67. taxModel: number;
  68. consumeAmt: {
  69. dataCode: string;
  70. dataName: string;
  71. refPrice: string;
  72. };
  73. }
  74. export interface ISubPrice {
  75. region: string;
  76. taxModel: number;
  77. price: {
  78. dataCode: string;
  79. dataName: string;
  80. };
  81. }
  82. interface ISubStructuralSegment {
  83. dispName: string;
  84. key: string;
  85. type: string;
  86. subItems?: ISubStructuralSegment[];
  87. property?: any;
  88. }
  89. // 结构分布
  90. export interface IStructuralSegmentData {
  91. monomerType: string;
  92. items: ISubStructuralSegment[];
  93. }
  94. export interface IStructuralSegment {
  95. compilationID: string;
  96. data: IStructuralSegmentData;
  97. }
  98. // 单体模板
  99. interface ISubMonomerTemplate {
  100. dispName: string;
  101. key: string;
  102. monomerType: string;
  103. isHaveStructuralSegment: string;
  104. }
  105. export interface IMonomerTemplateData {
  106. dispName: string;
  107. key: string;
  108. items: ISubMonomerTemplate[];
  109. }
  110. export interface IMonomerTemplate {
  111. compilationID: string;
  112. data: IMonomerTemplateData[];
  113. }
  114. export interface ICompilation {
  115. ID: string;
  116. name: string;
  117. creator: string;
  118. createTime: number;
  119. releaseTime: number;
  120. rationValuations: any;
  121. billValuations: IValuation[];
  122. isRelease: boolean;
  123. description: string;
  124. overWriteUrl: string;
  125. categoryID: string;
  126. example: number[];
  127. adProjects: number[];
  128. consumeAmtProperties?: IConsumeAmt[]; // 多组成物时的消耗量属性来源
  129. priceProperties?: ISubPrice[]; // 多单价时的价格属性来源
  130. // 附加
  131. version: versionType; // 版本
  132. versionText: string; // 版本对应的显示文字:免费版,学习版,专业版
  133. lockInfo: LockInfo; // 锁信息
  134. monomerTemplate: IMonomerTemplateData[];
  135. structuralSegment: IStructuralSegmentData[];
  136. }
  137. export enum ValuationType {
  138. BILL = 'bill', // 清单计价
  139. RATION = 'ration', // 定额计价
  140. }
  141. // 专业版费用定额
  142. export interface IProCptItem {
  143. // 编办 ID
  144. compilationID: string;
  145. // 开通时间
  146. upgradeTime: number;
  147. // 备注
  148. remark: string;
  149. // 截至时间,0 代表无限制
  150. deadline: number;
  151. // 锁信息
  152. lock: LockInfo;
  153. }