compilation.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. import { TaxType, IGLJCol, FileType } 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. visible?: boolean; // 是否显示
  50. }
  51. export interface IValuation {
  52. engineeringList: IEngineering[];
  53. enable: boolean;
  54. ID: string;
  55. name: string;
  56. fileTypes?: FileType[];
  57. }
  58. export enum versionType {
  59. FREE = 'free', // 免费版
  60. PRO = 'pro', // 专业版
  61. }
  62. export enum LockInfo {
  63. DEFAULT = 0, // 默认值
  64. BORROW = 1, // 借用
  65. BUY = 2, // 销售
  66. }
  67. export interface IConsumeAmt {
  68. region: string;
  69. taxModel: number;
  70. consumeAmt: {
  71. dataCode: string;
  72. dataName: string;
  73. refPrice: string;
  74. };
  75. }
  76. export interface ISubPrice {
  77. region: string;
  78. taxModel: number;
  79. price: {
  80. dataCode: string;
  81. dataName: string;
  82. };
  83. }
  84. interface ISubStructuralSegmentProperty {
  85. valuationID: string;
  86. normLib: string;
  87. taxType: number;
  88. fileType: number;
  89. calcProgramLib: {
  90. ID: string;
  91. name: string;
  92. displayName: string;
  93. };
  94. engineeringID: string;
  95. }
  96. export interface ISubStructuralSegment {
  97. dispName: string;
  98. key: string;
  99. type: string;
  100. subItems?: ISubStructuralSegment[];
  101. engineering?: string;
  102. feeType?: string;
  103. calcProgram?: string;
  104. IndicatorSegment?: string;
  105. property?: ISubStructuralSegmentProperty;
  106. }
  107. // 结构分布
  108. export interface IStructuralSegmentData {
  109. monomerType: string;
  110. valuationName: string;
  111. items: ISubStructuralSegment[];
  112. }
  113. export interface IStructuralSegment {
  114. compilationID: string;
  115. ID: string;
  116. name: string;
  117. data: IStructuralSegmentData[];
  118. }
  119. // 单体模板
  120. export interface ISubMonomerTemplate {
  121. dispName: string;
  122. key: string;
  123. monomerType: string;
  124. isHaveStructuralSegment: string;
  125. }
  126. export interface IMonomerTemplateData {
  127. dispName: string;
  128. key: string;
  129. items: ISubMonomerTemplate[];
  130. }
  131. export interface IConstructionTemplate {
  132. dispName: string;
  133. key: string;
  134. }
  135. export interface IMonomerTemplate {
  136. compilationID: string;
  137. data: any; // 兼容还没改结构之前的版本,写法,上线后修改回来 -- 不然部署报错
  138. /* data: {
  139. constructionTemplate: IConstructionTemplate[];
  140. monomerTemplate: IMonomerTemplateData[];
  141. }; */
  142. }
  143. export interface ICompilation {
  144. ID: string;
  145. name: string;
  146. creator: string;
  147. createTime: number;
  148. releaseTime: number;
  149. rationValuations: any;
  150. billValuations: IValuation[];
  151. isRelease: boolean;
  152. description: string;
  153. overWriteUrl: string;
  154. categoryID: string;
  155. example: number[];
  156. adProjects: number[];
  157. consumeAmtProperties?: IConsumeAmt[]; // 多组成物时的消耗量属性来源
  158. priceProperties?: ISubPrice[]; // 多单价时的价格属性来源
  159. // 附加
  160. version: versionType; // 版本
  161. versionText: string; // 版本对应的显示文字:免费版,学习版,专业版
  162. lockInfo: LockInfo; // 锁信息
  163. monomerTemplate: IMonomerTemplateData[];
  164. constructionTemplate: IConstructionTemplate[];
  165. structuralSegment: IStructuralSegmentData[];
  166. edition: string; // 版本号(用于项目信息、项目特征等项目信息的升级)
  167. }
  168. export enum ValuationType {
  169. BILL = 'bill', // 清单计价
  170. RATION = 'ration', // 定额计价
  171. }
  172. // 专业版费用定额
  173. export interface IProCptItem {
  174. // 编办 ID
  175. compilationID: string;
  176. // 开通时间
  177. upgradeTime: number;
  178. // 备注
  179. remark: string;
  180. // 截至时间,0 代表无限制
  181. deadline: number;
  182. // 锁信息
  183. lock: LockInfo;
  184. }