glj.ts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. * @Descripttion:
  3. * @Author: vian
  4. * @Date: 2021-05-26 17:37:16
  5. */
  6. import { fromType, ITreeScm, supplyType } from './base';
  7. // 工料机类型
  8. export enum GljType {
  9. LABOUR = 1, // 人工
  10. // ==============材料类型 ↓=================
  11. MATERIAL = 2, // 材料
  12. GENERAL_MATERIAL = 201, // 普通材料
  13. CONCRETE = 202, // 混凝土
  14. MORTAR = 203, // 砂浆
  15. MIX_RATIO = 204, // 配合比
  16. COMMERCIAL_CONCRETE = 205, // 商品混凝土
  17. COMMERCIAL_MORTAR = 206, // 商品砂浆
  18. OTHER_MATERIAL = 207, // 其它材料
  19. // ==============材料类型 ↑=================
  20. // ==============机械类型 ↓=================
  21. GENERAL_MACHINE = 301, // 机械台班
  22. MACHINE_COMPOSITION = 302, // 机械组成物
  23. MACHINE_LABOUR = 303, // 机上人工
  24. INSTRUMENT = 304, // 仪器仪表
  25. FUEL_POWER_FEE = 305, // 燃料动力费
  26. DEPRECIATION_FEE = 306, // 折旧费
  27. INSPECTION_FEE = 307, // 检修费
  28. MAINTENANCE = 308, // 维护费
  29. DISMANTLING_FREIGHT_FEE = 309, // 安拆费及场外运费
  30. VERIFICATION_FEE = 310, // 校验费
  31. OTHER_FEE = 311, // 其他费用
  32. OTHER_MACHINE_USED = 312, // 其他施工机具使用费
  33. // ==============机械类型 ↑=================
  34. MAIN_MATERIAL = 4, // 主材
  35. EQUIPMENT = 5, // 设备
  36. MANAGEMENT_FEE = 6, // 企业管理费
  37. PROFIT = 7, // 利润
  38. GENERAL_RISK_FEE = 8, // 一般风险费
  39. }
  40. export interface IBaseGlj {
  41. code: string;
  42. name: string;
  43. specs?: string;
  44. type: GljType;
  45. unit: string;
  46. [key: string]: any;
  47. }
  48. export interface IDisplayType {
  49. [type: number]: string;
  50. }
  51. export const DisplayType: IDisplayType = {
  52. 1: '人',
  53. 201: '材',
  54. 202: '砼',
  55. 203: '浆',
  56. 204: '配比',
  57. 205: '商砼',
  58. 206: '商浆',
  59. 207: '材',
  60. 208: '外购',
  61. 209: '苗木',
  62. 301: '机',
  63. 302: '机',
  64. 303: '机人',
  65. 304: '仪',
  66. 305: '动',
  67. 306: '折',
  68. 307: '检',
  69. 308: '维',
  70. 309: '安',
  71. 310: '校',
  72. 311: '机',
  73. 312: '机',
  74. 4: '主',
  75. 5: '设',
  76. 6: '管',
  77. 7: '利',
  78. 8: '险',
  79. };
  80. export interface IComponent {
  81. ID: string;
  82. consumption: number; // 消耗量(有别于总消耗,此字段记录配合比的消耗量)
  83. gljID: string; // 工料机总库对应id (关联用)
  84. specs?: string; // 规格型号
  85. unit: string; // 单位
  86. name: string; // 名称
  87. code: string; // 对应工料机code
  88. type: GljType; // 工料机类型
  89. model?: number; // 机型
  90. from: fromType; // std, cpt 来自标准工料机库、补充工料机库
  91. }
  92. export enum MaterialType {
  93. GC = 1,
  94. GJ = 2,
  95. MC = 3,
  96. SN = 4,
  97. SPT = 5,
  98. SPSJ = 6,
  99. }
  100. export const MaterialDisplay = {
  101. 1: '钢材',
  102. 2: '钢筋',
  103. 3: '木材',
  104. 4: '水泥',
  105. 5: '商品砼',
  106. 6: '商品砂浆',
  107. };
  108. export interface IProjectGlj {
  109. ID: string;
  110. gljID: string; // 工料机ID
  111. code: string; // 编码
  112. originalCode: string; // 原始的编码
  113. name: string; // 名称
  114. supply: supplyType; // 供货方式
  115. supplyQuantity?: number; // 甲供数量
  116. delivery?: string; // 交货方式
  117. deliveryAddress?: string; // 送达地点
  118. noAdjustPrice: boolean; // 不调价 { type: boolean; default: false }
  119. noTaxEqp?: boolean; // 不计税设备 { type: boolean; default: false }
  120. adjCoe?: number; // 调整系数ID
  121. specs: string; // 规格型号
  122. type: GljType; // 类型
  123. model?: number; // 机型
  124. unit: string; // 单位
  125. isAdd: boolean; // 是否新增
  126. basePrice: number; // 基价单价
  127. marketPrice: number; // 市场单价
  128. components?: IComponent[]; // 组成物
  129. taxRate?: number; // 税率
  130. adjustPrice?: string; // 显示调整基价
  131. quantity?: number; // 显示关联的消耗量
  132. tenderQuantity?: number; // 调整后消耗量
  133. techQuantity?: number; // 技术措施项目消耗量
  134. subdivisionQuantity?: number; // 分部分项消耗量
  135. materialType?: MaterialType; // 三材类别
  136. materialCoe?: number; // 三材系数
  137. materialQuantity?: number; // 三材量
  138. // 经济指标数据
  139. materialIndexType?: string; // 工料指标类别
  140. materialIndexUnit?: string; // 工料指标单位
  141. materialIndexCoe: number; // 单位转换系数
  142. isMainMaterial: boolean; // 是否主要材料 (0为否 1为是) { type: boolean; default: false };
  143. remark?: string; // 备注
  144. originPlace?: string; // 产地
  145. vender?: string; // 厂家
  146. qualityGrade?: string; // 质量等级
  147. brand?: string; // 品牌
  148. priceFrom?: string; // 价格来源
  149. from: fromType; // std, cpt 来自标准工料机库、补充工料机库
  150. }
  151. export interface IProjectGljs {
  152. projectID: string;
  153. projectGljs: IProjectGlj[];
  154. }
  155. /* 标准人材机相关 ↓ */
  156. // 标准、补充人材机共用属性(原始数据)
  157. export interface IBaseRationGlj {
  158. code: string;
  159. name: string;
  160. specs?: string;
  161. basePrice: number;
  162. priceProperty: any; // 多单价的情况
  163. gljClass: number;
  164. model: number; // 机型
  165. shortName: string;
  166. unit: string;
  167. adjCoe: number;
  168. materialType: MaterialType; // 三材类别
  169. materialCoe: number; // 三材系数
  170. // 经济指标数据
  171. materialIndexType: string; // 工料指标类别
  172. materialIndexUnit: string; // 工料指标单位
  173. materialIndexCoe: number; // 单位转换系数
  174. taxRate: string; // 税率
  175. }
  176. // 标准人材机组成物
  177. export interface IStdComponent {
  178. ID: number;
  179. consumeAmt: number;
  180. consumeAmtProperty: any; // 多消耗量的情况
  181. }
  182. // 标准人材机(原始数据)
  183. export interface IRawStdGlj extends IBaseRationGlj {
  184. ID: number;
  185. repositoryId: number;
  186. gljType: number;
  187. component: IStdComponent[];
  188. }
  189. // 标准人材机
  190. export interface IStdGlj extends IBaseRationGlj {
  191. ID: number;
  192. repositoryID: number;
  193. type: number;
  194. components: IStdComponent[];
  195. from: fromType;
  196. }
  197. // 标准人材机分类树(原始数据)
  198. export interface IRawStdGljTree {
  199. ID: number;
  200. ParentID: number;
  201. NextSiblingID: number;
  202. repositoryId: number;
  203. Name: string;
  204. }
  205. // 标准人材机分类树
  206. export interface IStdGljTree extends ITreeScm {
  207. repositoryID: number;
  208. name: string;
  209. from: fromType;
  210. }
  211. /* 标准人材机相关 ↑ */
  212. /* 补充人材机相关 ↓ */
  213. export interface ICptComponent {
  214. ID: string; // 补充的ID改成了UUID ,标准的不变,但是这里
  215. consumeAmt: number;
  216. consumeAmtProperty: any; // 多消耗量的情况
  217. from: fromType;
  218. }
  219. export interface ICptGlj extends IBaseRationGlj {
  220. ID: string;
  221. ownerID: string;
  222. type: number;
  223. compilationID: string;
  224. components: ICptComponent[];
  225. from: fromType;
  226. }
  227. /* 补充人材机相关 ↑ */
  228. /* 选择人材机相关 ↓ */
  229. // 库下拉项
  230. export interface ISelectGljLibItem {
  231. name: string;
  232. repositoryID: number | string;
  233. key: string; // 与gljLibID拼接的形成的唯一值
  234. isPrior: boolean; // 优先的
  235. from: fromType;
  236. located?: boolean; // 定位到的库(替换时需要)
  237. }
  238. // 选择人材机-需要替换人材机接口
  239. export interface IGetPagingGljReplaceGlj extends IBaseGlj {
  240. repositoryID: number | string;
  241. from: fromType;
  242. }
  243. // 获取人材机分页数据接口选项
  244. export interface IGetPagingGljOptions {
  245. classList?: number[]; // 需要匹配的分类
  246. typeList?: GljType[]; // 需要匹配的人材机类型
  247. libID?: number | string; // 人材机库ID
  248. replaceGlj?: IGetPagingGljReplaceGlj; // 替换的人材机
  249. located?: boolean; // 是否需要定位(打开替换窗口时)
  250. limit?: number; // 分页数量
  251. gtCode?: string; // 分页排序$gt code
  252. search?: string; // 搜索的内容(匹配编号、名称)
  253. }
  254. // 选择人材机接口返回数据格式
  255. export interface ISelectGljResult {
  256. libData: ISelectGljLibItem[]; // 库下拉项
  257. treeData: IStdGljTree[]; // 人材机分类树
  258. gljData: (IStdGlj | ICptGlj)[]; // 人材机数据
  259. total: number; // 当前数据总数量
  260. }
  261. /* 选择人材机相关 ↑ */