guangxi_2021.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. // 清单基数
  2. const progression = [
  3. "施工场地建设费",
  4. "养护管理单位项目管理费",
  5. "项目信息化费",
  6. "工程监理费",
  7. "设计文件审查费(一阶段)",
  8. "设计文件审查费(二阶段)",
  9. "采用一阶段设计的工程设计费",
  10. "采用二阶段设计的工程设计费",
  11. "独立立项进行维修、加固的一般桥梁工程设计费",
  12. "独立立项进行维修、加固的技术复杂大桥工程设计费",
  13. "独立立项进行维修、加固的隧道工程设计费",
  14. "招标费",
  15. ];
  16. const deficiency = {
  17. "设计文件审查费(一阶段)": 4000,
  18. "设计文件审查费(二阶段)": 4000,
  19. };
  20. if (typeof baseFigureMap !== "undefined") {
  21. const { fixedFlag } = commonConstants;
  22. const budgetMap = {
  23. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
  24. 建筑安装工程费: {
  25. base: "JZAZGCF",
  26. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  27. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  28. pick: false,
  29. },
  30. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
  31. 定额建筑安装工程费: {
  32. base: "DEJZAZGCF",
  33. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  34. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  35. pick: false,
  36. },
  37. // 显示:除“建筑安装工程费”以外部分可显示。
  38. "建筑安装工程费(不含设备费)": {
  39. base: "JZAZGCFBHSB",
  40. fixedFlag: null,
  41. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  42. pick: false,
  43. },
  44. // 显示:仅清单固定类别是“专项费用”可显示
  45. "定额建筑安装工程费(不含专项费用)": {
  46. base: "DEJZAZGCFBHZX",
  47. fixedFlag: null,
  48. filter: [fixedFlag.SPECIAL_COST],
  49. pick: true,
  50. },
  51. // 显示:仅清单固定类别是“安全生产费”可显示。
  52. "建筑安装工程费(不含安全生产费)": {
  53. base: "JZAZGCFBHSC",
  54. fixedFlag: null,
  55. filter: [fixedFlag.SAFE_COST],
  56. pick: true,
  57. },
  58. // 显示:仅清单固定类别是“专项费用”可显示。
  59. 施工场地建设费: {
  60. isProgressive: true,
  61. base: "SGCDJSF",
  62. fixedFlag: null,
  63. filter: [fixedFlag.SPECIAL_COST],
  64. pick: true,
  65. },
  66. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  67. 养护管理单位项目管理费: {
  68. isProgressive: true,
  69. base: "YHGLDWXMGLF",
  70. fixedFlag: null,
  71. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  72. pick: true,
  73. },
  74. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  75. 项目信息化费: {
  76. isProgressive: true,
  77. base: "XMXXHF",
  78. fixedFlag: null,
  79. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  80. pick: true,
  81. },
  82. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  83. 工程监理费: {
  84. isProgressive: true,
  85. base: "GCJLF",
  86. fixedFlag: null,
  87. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  88. pick: true,
  89. },
  90. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  91. "设计文件审查费(一阶段)": {
  92. isProgressive: true,
  93. deficiency: 4000,
  94. base: "SJWJSCFYJD",
  95. fixedFlag: null,
  96. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  97. pick: true,
  98. },
  99. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  100. "设计文件审查费(二阶段)": {
  101. isProgressive: true,
  102. deficiency: 4000,
  103. base: "SJWJSCFEJD",
  104. fixedFlag: null,
  105. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  106. pick: true,
  107. },
  108. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  109. 采用一阶段设计的工程设计费: {
  110. isProgressive: true,
  111. base: "CQYJDSJDGCSJF",
  112. fixedFlag: null,
  113. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  114. pick: true,
  115. },
  116. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  117. 采用二阶段设计的工程设计费: {
  118. isProgressive: true,
  119. base: "CQEJDSJDGCSJF",
  120. fixedFlag: null,
  121. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  122. pick: true,
  123. },
  124. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  125. "独立立项进行维修、加固的一般桥梁工程设计费": {
  126. isProgressive: true,
  127. base: "DLLXJXWXJGDYBQLGCSJF",
  128. fixedFlag: null,
  129. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  130. pick: true,
  131. },
  132. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  133. "独立立项进行维修、加固的技术复杂大桥工程设计费": {
  134. isProgressive: true,
  135. base: "DLLXJXWXJGDJSFZDQGCSJF",
  136. fixedFlag: null,
  137. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  138. pick: true,
  139. },
  140. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  141. "独立立项进行维修、加固的隧道工程设计费": {
  142. isProgressive: true,
  143. base: "DLLXJXWXJGDSDGCSJF",
  144. fixedFlag: null,
  145. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  146. pick: true,
  147. },
  148. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  149. 招标费: {
  150. isProgressive: true,
  151. base: "ZBF",
  152. fixedFlag: null,
  153. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  154. pick: true,
  155. },
  156. // 显示:仅“价差预备费”可显示
  157. 价差预备费: {
  158. base: "JCYBF",
  159. fixedFlag: null,
  160. filter: [fixedFlag.SPREAD_BUDGET_FEE],
  161. pick: true,
  162. },
  163. };
  164. const boqMap = {
  165. //仅允许用于固定类别是“第100章至700章清单”以外的清单
  166. 各章清单合计: {
  167. base: "GZQDHJ",
  168. fixedFlag: fixedFlag.ONE_SEVEN_BILLS,
  169. filter: [fixedFlag.ONE_SEVEN_BILLS],
  170. pick: false,
  171. },
  172. //仅允许用于固定类别是“第100章至700章清单”以外的清单
  173. 专项暂定合计: {
  174. base: "ZXZDHJ",
  175. fixedFlag: null,
  176. filter: [fixedFlag.ONE_SEVEN_BILLS],
  177. pick: false,
  178. },
  179. /*
  180. * 清单固定行[第100章至700章清单]下的[第100章清单]需要允许清单可使用基数{100章以外合计}
  181. * 因此{100章以外合计}不设置关联的清单固定行
  182. * */
  183. //仅允许用于固定类别为“100章清单”引用
  184. "100章以外清单合计": {
  185. base: "YBZYWQDHJ",
  186. fixedFlag: null,
  187. filter: [fixedFlag.ONE_HUNDRED_BILLS],
  188. pick: true,
  189. },
  190. 定额建筑安装工程费: {
  191. base: "DEJZAZGCF",
  192. fixedFlag: null,
  193. filter: [fixedFlag.ONE_HUNDRED_BILLS],
  194. pick: true,
  195. },
  196. };
  197. baseFigureMap.budget = budgetMap;
  198. baseFigureMap.boq = boqMap;
  199. }
  200. if (typeof baseFigureTemplate !== "undefined") {
  201. const { fixedFlag } = commonConstants;
  202. baseFigureTemplate.budget = {
  203. // 建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的金额。
  204. JZAZGCF(tender) {
  205. return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
  206. },
  207. // 定额建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的定额建安费。
  208. DEJZAZGCF(tender) {
  209. return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "rationCommon");
  210. },
  211. // 建筑安装工程费(不含设备费) 算法:取清单固定类别是“建筑安装工程费”的金额,扣除设备购置。
  212. JZAZGCFBHSB(tender) {
  213. let baseFee = this["JZAZGCF"](tender);
  214. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
  215. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender);
  216. baseFee = (baseFee - equipmentFee).toDecimal(decimalObj.process);
  217. return baseFee.toDecimal(decimalObj.bills.totalPrice);
  218. },
  219. // 定额建筑安装工程费(不含专项费用) 算法:取清单固定类别是“建筑安装工程费”的定额建安费,扣除“专项费用”行的定额建安费。
  220. DEJZAZGCFBHZX(tender) {
  221. return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SPECIAL_COST], tender, "rationCommon");
  222. },
  223. // 建筑安装工程费(不含安全生产费) 算法:取清单固定类别是“建筑安装工程费”的金额,扣除“安全生产费”的金额。
  224. JZAZGCFBHSC(tender) {
  225. return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SAFE_COST], tender, "common");
  226. },
  227. // 施工场地建设费 算法:按“定额建筑安装工程费(不含专项费用)”为基数,以累进办法计算。
  228. SGCDJSF(tender) {
  229. const baseFee = this["DEJZAZGCFBHZX"](tender);
  230. if (!tender) {
  231. calcBase.baseProgressiveFee = baseFee;
  232. }
  233. return calculateUtil.getProgressiveFee(
  234. baseFee,
  235. "施工场地建设费",
  236. projectObj.project.property.progressiveInterval,
  237. decimalObj.bills.totalPrice,
  238. deficiency
  239. );
  240. },
  241. // 养护管理单位项目管理费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  242. YHGLDWXMGLF(tender) {
  243. const baseFee = this["DEJZAZGCF"](tender);
  244. if (!tender) {
  245. calcBase.baseProgressiveFee = baseFee;
  246. }
  247. return calculateUtil.getProgressiveFee(
  248. baseFee,
  249. "养护管理单位项目管理费",
  250. projectObj.project.property.progressiveInterval,
  251. decimalObj.bills.totalPrice,
  252. deficiency
  253. );
  254. },
  255. // 项目信息化费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  256. XMXXHF(tender) {
  257. const baseFee = this["DEJZAZGCF"](tender);
  258. if (!tender) {
  259. calcBase.baseProgressiveFee = baseFee;
  260. }
  261. return calculateUtil.getProgressiveFee(baseFee, "项目信息化费", projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  262. },
  263. // 工程监理费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  264. GCJLF(tender) {
  265. const baseFee = this["DEJZAZGCF"](tender);
  266. if (!tender) {
  267. calcBase.baseProgressiveFee = baseFee;
  268. }
  269. return calculateUtil.getProgressiveFee(baseFee, "工程监理费", projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  270. },
  271. // 设计文件审查费(一阶段) 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  272. SJWJSCFYJD(tender) {
  273. const baseFee = this["DEJZAZGCF"](tender);
  274. if (!tender) {
  275. calcBase.baseProgressiveFee = baseFee;
  276. }
  277. return calculateUtil.getProgressiveFee(
  278. baseFee,
  279. "设计文件审查费(一阶段)",
  280. projectObj.project.property.progressiveInterval,
  281. decimalObj.bills.totalPrice,
  282. deficiency
  283. );
  284. },
  285. // 设计文件审查费(二阶段) 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  286. SJWJSCFEJD(tender) {
  287. const baseFee = this["DEJZAZGCF"](tender);
  288. if (!tender) {
  289. calcBase.baseProgressiveFee = baseFee;
  290. }
  291. return calculateUtil.getProgressiveFee(
  292. baseFee,
  293. "设计文件审查费(二阶段)",
  294. projectObj.project.property.progressiveInterval,
  295. decimalObj.bills.totalPrice,
  296. deficiency
  297. );
  298. },
  299. // 采用一阶段设计的工程设计费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  300. CQYJDSJDGCSJF(tender) {
  301. const baseFee = this["DEJZAZGCF"](tender);
  302. if (!tender) {
  303. calcBase.baseProgressiveFee = baseFee;
  304. }
  305. return calculateUtil.getProgressiveFee(
  306. baseFee,
  307. "采用一阶段设计的工程设计费",
  308. projectObj.project.property.progressiveInterval,
  309. decimalObj.bills.totalPrice,
  310. deficiency
  311. );
  312. },
  313. // 采用二阶段设计的工程设计费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  314. CQEJDSJDGCSJF(tender) {
  315. const baseFee = this["DEJZAZGCF"](tender);
  316. if (!tender) {
  317. calcBase.baseProgressiveFee = baseFee;
  318. }
  319. return calculateUtil.getProgressiveFee(
  320. baseFee,
  321. "采用二阶段设计的工程设计费",
  322. projectObj.project.property.progressiveInterval,
  323. decimalObj.bills.totalPrice,
  324. deficiency
  325. );
  326. },
  327. // 独立立项进行维修、加固的一般桥梁工程设计费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  328. DLLXJXWXJGDYBQLGCSJF(tender) {
  329. const baseFee = this["DEJZAZGCF"](tender);
  330. if (!tender) {
  331. calcBase.baseProgressiveFee = baseFee;
  332. }
  333. return calculateUtil.getProgressiveFee(
  334. baseFee,
  335. "独立立项进行维修、加固的一般桥梁工程设计费",
  336. projectObj.project.property.progressiveInterval,
  337. decimalObj.bills.totalPrice,
  338. deficiency
  339. );
  340. },
  341. // 独立立项进行维修、加固的技术复杂大桥工程设计费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  342. DLLXJXWXJGDJSFZDQGCSJF(tender) {
  343. const baseFee = this["DEJZAZGCF"](tender);
  344. if (!tender) {
  345. calcBase.baseProgressiveFee = baseFee;
  346. }
  347. return calculateUtil.getProgressiveFee(
  348. baseFee,
  349. "独立立项进行维修、加固的技术复杂大桥工程设计费",
  350. projectObj.project.property.progressiveInterval,
  351. decimalObj.bills.totalPrice,
  352. deficiency
  353. );
  354. },
  355. // 独立立项进行维修、加固的隧道工程设计费 算法:按“定额建筑安装工程费”为基数,以累进办法计算。
  356. DLLXJXWXJGDSDGCSJF(tender) {
  357. const baseFee = this["DEJZAZGCF"](tender);
  358. if (!tender) {
  359. calcBase.baseProgressiveFee = baseFee;
  360. }
  361. return calculateUtil.getProgressiveFee(
  362. baseFee,
  363. "独立立项进行维修、加固的隧道工程设计费",
  364. projectObj.project.property.progressiveInterval,
  365. decimalObj.bills.totalPrice,
  366. deficiency
  367. );
  368. },
  369. // 招标费 算法:按“指标建筑安装工程费”为基数,以累进办法计算。
  370. ZBF(tender) {
  371. const baseFee = this["DEJZAZGCF"](tender);
  372. if (!tender) {
  373. calcBase.baseProgressiveFee = baseFee;
  374. }
  375. return calculateUtil.getProgressiveFee(baseFee, "招标费", projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  376. },
  377. /* 价差预备费 算法:以建筑安装工程费为基数,按设计文件编制年始至养护项目工程竣工年终的年数和年工程造价增涨率计算。
  378. 价差预备费 P * [(1+i)^(n-1) -1]
  379. P——建筑安装工程费总额(元);
  380. i——年工程造价增涨率(%);
  381. n——设计文件编制年至养护项目开工年+养护项目建设期限(年)。
  382. */
  383. JCYBF(tender) {
  384. //建筑安装工程费作为基数
  385. const installFee = this["JZAZGCF"](tender);
  386. //年造价增涨
  387. const costGrowthRate = calcBase.project.property.costGrowthRate ? calcBase.project.property.costGrowthRate : 0;
  388. //增涨计费年限
  389. const growthPeriod = projectObj.project.property.growthPeriod ? calcBase.project.property.growthPeriod : 0;
  390. //= P * [(1+i)^(n-1) -1]
  391. return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
  392. },
  393. };
  394. baseFigureTemplate.boq = {
  395. //{各章清单合计}
  396. // 取清单固定类别是“第100章至700章清单”的金额
  397. GZQDHJ: function (tender) {
  398. return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, "common");
  399. },
  400. //{专项暂定合计}
  401. // 第100章至700章清单行的暂估合价
  402. ZXZDHJ: function (tender) {
  403. return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, "estimate");
  404. },
  405. //{100章以外清单合计}
  406. // 取清单固定清单[第100章至700章清单]的金额,但扣除清单100章下的金额。
  407. // 如果是固定清单[第100章至700章清单]下100章以外清单引用此基数,要排除自身(目前只允许100章的清单使用,所以暂时不需要此判断)
  408. YBZYWQDHJ: function (tender) {
  409. let oneToSeven = cbTools.findNodeByFlag(fixedFlag.ONE_SEVEN_BILLS);
  410. if (!oneToSeven) {
  411. return 0;
  412. }
  413. //100-700章固定节点的所有子节点
  414. let allChildren = [];
  415. function getChildren(nodes) {
  416. allChildren = allChildren.concat(nodes);
  417. for (let node of nodes) {
  418. if (node.children.length > 0) {
  419. getChildren(node.children);
  420. }
  421. }
  422. }
  423. getChildren(oneToSeven.children);
  424. //扣除的节点:100章的节点[100-200)
  425. let deductNodes = allChildren.filter(cbTools.withingOneHundred);
  426. //计算金额
  427. let fullFeeField = tender ? "common.tenderTotalFee" : "common.totalFee";
  428. return projectObj.project.calcProgram.getTotalFee([oneToSeven], deductNodes, fullFeeField).toDecimal(decimalObj.bills.totalPrice);
  429. },
  430. // 清单项目基数:{定额建筑安装工程费} 算法:取清单固定类别是“第100章至700章清单”的定额建安费(其中定额设备费按40%计算,税金是全额计算)。显示:只有清单固定类别是“第100章清单总则”的部分可显示。
  431. DEJZAZGCF(tender) {
  432. const baseFee = cbTools.getBaseFee(fixedFlag.ONE_SEVEN_BILLS, tender, "rationCommon");
  433. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.ONE_SEVEN_BILLS);
  434. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "equipment");
  435. return (baseFee - equipmentFee * 0.6).toDecimal(decimalObj.bills.totalPrice);
  436. },
  437. };
  438. }
  439. function overwriteRationCalcBases() {
  440. if (typeof rationCalcBases == "undefined") return;
  441. for (let key in rationCalcBases) delete rationCalcBases[key];
  442. rationCalcBases["人工费"] = function (node, isTender) {
  443. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
  444. };
  445. rationCalcBases["材料费"] = function (node, isTender) {
  446. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
  447. };
  448. rationCalcBases["施工机械使用费"] = function (node, isTender) {
  449. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
  450. };
  451. rationCalcBases["施工机械人工费"] = function (node, isTender) {
  452. return calcTools.machineDetailFee(node, node.data.gljList, [], gljType.MACHINE_LABOUR, isTender);
  453. };
  454. rationCalcBases["设备购置费"] = function (node, isTender) {
  455. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
  456. };
  457. rationCalcBases["定额人工费"] = function (node, isTender) {
  458. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
  459. };
  460. rationCalcBases["定额材料费"] = function (node, isTender) {
  461. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptBasePrice, isTender);
  462. };
  463. rationCalcBases["定额施工机械使用费"] = function (node, isTender) {
  464. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
  465. };
  466. rationCalcBases["定额商品砼费"] = function (node, isTender) {
  467. return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptBasePrice, isTender);
  468. };
  469. rationCalcBases["定额设备购置费"] = function (node, isTender) {
  470. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptBasePrice, isTender);
  471. };
  472. rationCalcBases["定额外购砼构件费"] = function (node, isTender) {
  473. return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptBasePrice, isTender);
  474. };
  475. rationCalcBases["定额绿化苗木费"] = function (node, isTender) {
  476. return calcTools.rationBaseFee(node, [gljType.GREEN_SEEDLING], priceTypes.ptBasePrice, isTender);
  477. };
  478. }
  479. if (typeof projectObj !== "undefined") {
  480. projectObj.isInsertEquipmentVisable = function (selected) {
  481. return true; //广西不管是预算或者工程量清单,都是显示
  482. };
  483. }
  484. if (typeof feeRateObject !== "undefined") {
  485. feeRateObject.feeRateSpecialHandle = function (subRate, value) {
  486. let result = {};
  487. if (subRate.name == "工地转移(km)" && value && value < 50) {
  488. //工地转移50km以内按50km算
  489. result.valueKey = "50";
  490. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  491. }
  492. if (subRate.name == "综合里程(km)" && value && value < 3) {
  493. //综合里程3km以内按3km算
  494. result.valueKey = "3";
  495. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  496. }
  497. if (subRate.name == "施工进出场(km)" && value && value < 5) {
  498. //施工进出场5km以内按3km算
  499. result.valueKey = "5";
  500. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  501. }
  502. return result;
  503. };
  504. }
  505. (function overwriteFeeTypes() {
  506. if (typeof cpFeeTypes == "undefined") return;
  507. cpFeeTypes = [
  508. { type: "marketDirect", name: "直接费" },
  509. { type: "marketLabour", name: "人工费" },
  510. { type: "marketMaterial", name: "材料费" },
  511. { type: "marketMachine", name: "施工机械使用费" },
  512. { type: "marketMachineLabour", name: "施工机械人工费" },
  513. { type: "marketEquipment", name: "设备购置费" },
  514. { type: "labour", name: "定额人工费" },
  515. { type: "material", name: "定额材料费" },
  516. { type: "machine", name: "定额施工机械使用费" },
  517. { type: "equipment", name: "定额设备购置费" },
  518. { type: "direct", name: "定额直接费" },
  519. { type: "measure", name: "措施费" },
  520. { type: "manage", name: "企业管理费" },
  521. { type: "force", name: "规费" },
  522. { type: "profit", name: "利润" },
  523. { type: "tax", name: "税金" },
  524. { type: "common", name: "建安费" },
  525. { type: "rationCommon", name: "定额建安费" },
  526. ];
  527. })();