project.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. import { ValuationType } from './compilation';
  2. import { ILabourCoeFile } from './labourCoe';
  3. import { IIncreaseSetting } from './increaseFee';
  4. import {
  5. ITreeScm,
  6. IFileRef,
  7. DeleteEnum,
  8. INumFileRef,
  9. IColumnMeta,
  10. } from './base';
  11. import { ICalcOption, ITenderSetting } from './calculation';
  12. export enum ProjectType {
  13. FOLDER = 1,
  14. CONSTRUCTION, // 建设项目
  15. SINGLE, // 单项工程
  16. UNIT, // 单位工程
  17. }
  18. export interface IGLJCol {
  19. showAdjustPrice?: boolean;
  20. }
  21. // 小数位数
  22. export interface IDecimal {
  23. bills: { unitFee: number; totalFee: number };
  24. ration: { quantity: number; unitFee: number; totalFee: number };
  25. glj: { quantity: number; unitPriceHasMix: number; unitFee: number };
  26. feeRate: number;
  27. quantityDetail: number;
  28. material: number; // 三材系数
  29. process: number;
  30. }
  31. // 工程量精度
  32. export interface IBillsQuantityDecimal {
  33. unit: string;
  34. decimal: number;
  35. }
  36. // 呈现选项
  37. export interface IDisplaySetting {
  38. billsAutoHeight: boolean;
  39. rationAutoHeight: boolean;
  40. disPlayMainMaterial: boolean;
  41. }
  42. // 累进区间
  43. export interface IProgression {
  44. interval: string; // 区间字符 eg: '(0,100]'
  45. feeRate: boolean;
  46. }
  47. export interface IProgressiveInterval {
  48. name: string;
  49. progression: IProgression[];
  50. }
  51. // 超高降效
  52. export interface IOverHeight {
  53. name: string;
  54. code?: string;
  55. unit?: string;
  56. labourRate?: number;
  57. machineRate?: number;
  58. labourMachineRate?: number;
  59. benchmark?: number;
  60. extra?: number;
  61. limit?: number;
  62. }
  63. export enum OverHeightOption {
  64. SEPARATION = 1, // 对应清单或分部下(默认)
  65. MEASURE, // 指定措施清单011704001
  66. SPECIFIC, // 指定具体位置,显示分部分项以及措施项目的树结构显示叶子清单(分项)供勾选
  67. }
  68. // 承包人材料调整类型
  69. export enum GLJAdjustType {
  70. PRICE_INFO = 'priceInfo', // 造价信息差额调整法
  71. PRICE_COE = 'priceCoe', // 价格指数调整法
  72. }
  73. // 计税方式
  74. export enum TaxType {
  75. GENERAL = 1,
  76. SIMPLE,
  77. }
  78. // 文件类型
  79. export enum FileType {
  80. SUBMISSION = 1, // 投标
  81. INVITATION, // 招标
  82. CONTROL, // 控制价
  83. }
  84. export enum FileTypeName {
  85. SUBMISSION = '投标',
  86. INVITATION = '招标',
  87. CONTROL = '控制价',
  88. }
  89. export const FileTypeMap = {
  90. [FileType.SUBMISSION]: FileTypeName.SUBMISSION,
  91. [FileType.INVITATION]: FileTypeName.INVITATION,
  92. [FileType.CONTROL]: FileTypeName.CONTROL,
  93. };
  94. // 工程特征、基本信息
  95. export interface IInfoItem {
  96. key: string;
  97. dispName: string;
  98. value?: string;
  99. required?: string;
  100. readonly?: string;
  101. options?: string;
  102. cellType?: string;
  103. fileKind?: FileTypeName;
  104. items?: IInfoItem[];
  105. }
  106. // 工程特征指标
  107. interface IBaseEngineerFeature {
  108. value: string;
  109. name: string;
  110. exportName?: string;
  111. cellType?: string;
  112. options?: string;
  113. }
  114. export interface IStdEngineerFeature extends IBaseEngineerFeature {
  115. ID: number;
  116. ParentID: number;
  117. }
  118. export interface IEngineerFeature extends ITreeScm, IBaseEngineerFeature {}
  119. // 主要工料指标
  120. export interface IMaterialIndex {
  121. name: string;
  122. unit: string;
  123. coe: number;
  124. }
  125. // 主要工程量指标
  126. export interface IMainQtyIndex {
  127. name: string;
  128. unit: string;
  129. coe: number;
  130. }
  131. // 主要经济指标
  132. export interface IEconomicIndex {
  133. name: string;
  134. value: string;
  135. }
  136. // 项目属性
  137. export interface IProperty {
  138. rootProjectID?: string; // 建设项目ID
  139. valuationType?: ValuationType; // 计价类型
  140. valuationID?: string; // 计价规则
  141. engineeringID?: string; // 工程专业ID
  142. fileType?: FileType; // 文件类型
  143. taxType?: TaxType; // 计税方式
  144. rationFeeType?: number; // 定额取费专业
  145. unitFeeType?: number; // 单位工程取费专业
  146. calcProgramLib?: INumFileRef; // 计算程序(标准)
  147. calcProgramFile?: IFileRef; // 计算程序(用户数据)
  148. feeFile?: IFileRef; // 费率文件
  149. region?: string;
  150. showAdjustPrice?: boolean; // 是否显示调整价列
  151. isInstall?: boolean; // 是否是安装工程
  152. isItemIncrease?: boolean; // 是否是子目增加
  153. itemIncreaseSetting?: IIncreaseSetting;
  154. isAreaIncrease?: boolean; // 是否是面积增加
  155. indexName?: string; // 指标名称
  156. lockBills?: boolean; // 锁定清单
  157. decimal?: IDecimal; // 小数位数
  158. billsQuantityDecimal?: IBillsQuantityDecimal[]; // 清单工程量精度
  159. displaySetting?: IDisplaySetting; // 呈现选项
  160. billsCalcMode?: number; // 清单计费取费方式
  161. zanguCalcMode?: number; // 暂估合价计算方式
  162. calcOption?: ICalcOption; // 计算选项
  163. tenderSetting?: ITenderSetting; // 调价设置
  164. overHeight?: IOverHeight[]; // 超高降效数据
  165. overHeightOption?: OverHeightOption; // 超高降效选项
  166. basicInfo?: IInfoItem[]; // 基本信息
  167. feature?: IInfoItem[]; // 工程特征
  168. progressiveInterval?: IProgressiveInterval[]; // 累进区间
  169. gljAdjustType?: GLJAdjustType; // 承包人材料调整类型
  170. cptIllustration?: string; // 编制说明
  171. labourCoeFile?: ILabourCoeFile; // 人工系数文件
  172. engineerInfos?: IInfoItem[];
  173. engineerFeatures?: IEngineerFeature[];
  174. materials?: IMaterialIndex[];
  175. mainQuantities?: IMainQtyIndex[];
  176. economics?: IEconomicIndex[];
  177. }
  178. // 原来的列设置太复杂了,没什么必要
  179. export interface IMainTreeCol {
  180. cols: Array<any>;
  181. headRowHeight: Array<number>;
  182. treeCol?: number;
  183. headRows?: number;
  184. emptyRows?: number;
  185. }
  186. export enum ImportType {
  187. NONE,
  188. YBP,
  189. INTERFACE,
  190. }
  191. export interface IProject extends ITreeScm {
  192. type: ProjectType;
  193. compilationID: string;
  194. userID: string;
  195. name: string;
  196. code?: string;
  197. createDate: number;
  198. property?: IProperty;
  199. colMetas?: IColumnMeta[];
  200. changeMark?: string;
  201. remark?: string;
  202. fileVer?: string;
  203. lastFileVer?: string;
  204. imported?: ImportType;
  205. deleteType?: DeleteEnum;
  206. deleteDate?: number;
  207. deleteBy?: string;
  208. // 只是为了显示,不是自身的正在数据,比如汇总信息等
  209. external?: {
  210. cost: number; // 工程造价
  211. };
  212. }
  213. export interface IProjectBulkRst {
  214. create: IProject[];
  215. remove: string[];
  216. }