gansu_2021.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. if (typeof feeRateObject !== "undefined") {
  2. feeRateObject.feeRateSpecialHandle = function (subRate, value) {
  3. let result = {};
  4. if (subRate.name == "综合里程(km)" && value && value < 3) {
  5. //综合里程3km以内按3km算
  6. result.valueKey = "3";
  7. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  8. }
  9. if (subRate.name == "工地转移(km)" && value && value < 50) {
  10. //工地转移50km以内按50km算
  11. result.valueKey = "50";
  12. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  13. }
  14. if (subRate.name == "施工进出场(km)" && value && value < 5) {
  15. //施工进出场5km以内按5km算
  16. result.valueKey = "5";
  17. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  18. }
  19. return result;
  20. };
  21. }
  22. // 清单基数
  23. const littleFixNames = ["小修", "养护检查预算", "日常养护预算"];
  24. const progression = [
  25. "养护单位(业主)管理费",
  26. "养护单位(业主)管理费(未单独设置)",
  27. "养护工程监理费",
  28. "养护工程监理费(路线工程)",
  29. "养护工程监理费(桥梁及隧道工程)",
  30. "设计文件审查费",
  31. "养护工程设计费(路线工程)",
  32. "养护工程设计费(独立桥梁、隧道工程)",
  33. "施工场地建设费",
  34. ];
  35. const deficiency = { 养护工程监理费: 10000, 设计文件审查费: 10000 };
  36. if (typeof baseFigureMap !== "undefined") {
  37. const { fixedFlag } = commonConstants;
  38. const budgetMap = {
  39. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示。
  40. 建筑安装工程费: {
  41. base: "JZAZGCF",
  42. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  43. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  44. pick: false,
  45. },
  46. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示
  47. "建筑安装工程费(不含设备费)": {
  48. base: "JZAZGCFBHSB",
  49. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  50. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  51. pick: false,
  52. },
  53. // 显示:仅清单固定类别是“安全生产费”可显示
  54. "建筑安装工程费(不含安全生产费)": {
  55. base: "JZAZGCFBHAQSCF",
  56. // fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  57. fixedFlag: null,
  58. filter: [fixedFlag.SAFE_COST],
  59. pick: true,
  60. },
  61. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示
  62. 定额建筑安装工程费: {
  63. base: "DEJZAZGCF",
  64. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  65. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  66. pick: false,
  67. },
  68. "定额建筑安装工程费(不含专项费用)": {
  69. base: "DEJZAZGCFBHZXF",
  70. fixedFlag: null,
  71. filter: [fixedFlag.SPECIAL_COST],
  72. pick: true,
  73. },
  74. 设备费: {
  75. base: "SBF",
  76. fixedFlag: fixedFlag.EQUIPMENT_ACQUISITION_FEE,
  77. filter: [fixedFlag.EQUIPMENT_ACQUISITION_FEE],
  78. pick: false,
  79. },
  80. 定额设备费: {
  81. base: "DESBF",
  82. fixedFlag: fixedFlag.EQUIPMENT_ACQUISITION_FEE,
  83. filter: [fixedFlag.EQUIPMENT_ACQUISITION_FEE],
  84. pick: false,
  85. },
  86. // 显示:除清单固定类别是“养护工程费”的以外部分可显示
  87. 养护工程费: {
  88. base: "YHGCF",
  89. fixedFlag: fixedFlag.MAINTENANCE_FEE,
  90. filter: [fixedFlag.MAINTENANCE_FEE],
  91. pick: false,
  92. },
  93. // 显示:除清单固定类别是“养护工程费”的以外部分可显示。
  94. 定额养护工程费: {
  95. base: "DEYHGCF",
  96. fixedFlag: fixedFlag.MAINTENANCE_FEE,
  97. filter: [fixedFlag.MAINTENANCE_FEE],
  98. pick: false,
  99. },
  100. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  101. "养护单位(业主)管理费": {
  102. isProgressive: true,
  103. base: "YHDWYZGLF",
  104. fixedFlag: null,
  105. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  106. pick: true,
  107. },
  108. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  109. "养护单位(业主)管理费(未单独设置)": {
  110. isProgressive: true,
  111. base: "YHDWYZGLFWDDSZ",
  112. fixedFlag: null,
  113. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  114. pick: true,
  115. },
  116. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。 仅小修保养类别可以显示
  117. 养护工程监理费: {
  118. isProgressive: true,
  119. base: "YHGCJLF",
  120. fixedFlag: null,
  121. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  122. pick: true,
  123. engineeringList: littleFixNames,
  124. },
  125. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  126. "养护工程监理费(路线工程)": {
  127. isProgressive: true,
  128. base: "YHGCJLFLXGC",
  129. fixedFlag: null,
  130. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  131. pick: true,
  132. engineeringList: ["大修", "中修"],
  133. },
  134. // 显示:仅清单固定类别是“养护工程其他费用”部分可显示。
  135. "养护工程监理费(桥梁及隧道工程)": {
  136. isProgressive: true,
  137. base: "YHGCJLFQLJSDGC",
  138. fixedFlag: null,
  139. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  140. pick: true,
  141. engineeringList: ["大修", "中修"],
  142. },
  143. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  144. 设计文件审查费: {
  145. isProgressive: true,
  146. base: "SJWJSCF",
  147. fixedFlag: null,
  148. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  149. pick: true,
  150. engineeringList: ["大修", "中修"],
  151. },
  152. 养护项目信息化费: {
  153. base: "YHXMXXHF",
  154. fixedFlag: null,
  155. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  156. pick: true,
  157. },
  158. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  159. "养护工程设计费(路线工程)": {
  160. isProgressive: true,
  161. base: "YHGCSJFLXGC",
  162. fixedFlag: null,
  163. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  164. pick: true,
  165. engineeringList: ["大修", "中修"],
  166. },
  167. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  168. "养护工程设计费(独立桥梁、隧道工程)": {
  169. isProgressive: true,
  170. base: "YHGCSJFQLSDGC",
  171. fixedFlag: null,
  172. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  173. pick: true,
  174. engineeringList: ["大修", "中修"],
  175. },
  176. 施工场地建设费: {
  177. isProgressive: true,
  178. base: "SGCDJSF",
  179. fixedFlag: null,
  180. filter: [fixedFlag.CONSTRUCTION_PLANT_COST],
  181. pick: true,
  182. },
  183. // 显示:除清单固定类别是“一二三四部分合计”的以外部分可显示。
  184. 一二三四部分合计: {
  185. base: "YESSBFHJ",
  186. fixedFlag: fixedFlag.ONE_TO_FOUR_TOTAL,
  187. filter: [fixedFlag.ONE_TO_FOUR_TOTAL],
  188. pick: false,
  189. },
  190. // 显示:仅“价差预备费”可显示
  191. 价差预备费: {
  192. base: "JCYBF",
  193. fixedFlag: null,
  194. filter: [fixedFlag.SPREAD_BUDGET_FEE],
  195. pick: true,
  196. },
  197. };
  198. const boqMap = {
  199. //仅允许用于固定类别是“第100章至700章清单”以外的清单
  200. 专项暂定合计: {
  201. base: "ZXZDHJ",
  202. fixedFlag: null,
  203. filter: [fixedFlag.ONE_SEVEN_BILLS],
  204. pick: false,
  205. },
  206. /*
  207. * 清单固定行[第100章至700章清单]下的[第100章清单]需要允许清单可使用基数{100章以外合计}
  208. * 因此{100章以外合计}不设置关联的清单固定行
  209. * */
  210. //仅允许用于固定类别为“100章清单”引用
  211. "100章以外清单合计": {
  212. base: "YBZYHQDHJ",
  213. fixedFlag: null,
  214. filter: [fixedFlag.ONE_HUNDRED_BILLS],
  215. pick: true,
  216. },
  217. 定额建筑安装工程费: {
  218. base: "DEJZAZGCF",
  219. fixedFlag: null,
  220. filter: [fixedFlag.ONE_HUNDRED_BILLS],
  221. pick: true,
  222. },
  223. };
  224. baseFigureMap.budget = budgetMap;
  225. baseFigureMap.boq = boqMap;
  226. }
  227. // 是否是小修
  228. const isLittleFix = (engName) => {
  229. return littleFixNames.some((name) => new RegExp(name).test(engName));
  230. };
  231. if (typeof baseFigureTemplate !== "undefined") {
  232. const { fixedFlag } = commonConstants;
  233. baseFigureTemplate.budget = {
  234. // 建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的建安费。
  235. JZAZGCF(tender) {
  236. return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
  237. },
  238. // 建筑安装工程费(不含设备费)算法:取清单固定类别是“建筑安装工程费”的金额 - {设备费}。
  239. JZAZGCFBHSB(tender) {
  240. const engName = projectObj.project.property.engineeringName;
  241. if (isLittleFix(engName)) {
  242. // 小修的没有设备购置固定行
  243. const baseFee = cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, "common");
  244. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
  245. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "common");
  246. return (baseFee - equipmentFee).toDecimal(decimalObj.bills.totalPrice);
  247. } else {
  248. return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.EQUIPMENT_ACQUISITION_FEE], tender, "common");
  249. }
  250. },
  251. JZAZGCFBHAQSCF(tender) {
  252. return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SAFE_COST], tender, "common");
  253. },
  254. // 定额建筑安装工程费 算法:取清单固定类别是“建筑安装工程费”的定额建安费(其中定额设备费按40%计算)。
  255. DEJZAZGCF(tender) {
  256. const engName = projectObj.project.property.engineeringName;
  257. const feeField = "rationCommon";
  258. if (isLittleFix(engName)) {
  259. // 小修的没有设备购置固定行
  260. const baseFee = cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, feeField);
  261. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.CONSTRUCTION_INSTALL_FEE);
  262. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "equipment");
  263. return (baseFee - equipmentFee * 0.6).toDecimal(decimalObj.bills.totalPrice);
  264. } else {
  265. const deductFlags = [fixedFlag.EQUIPMENT_ACQUISITION_FEE];
  266. //建安费扣除定额设备购置费
  267. const afterDeductFee = cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, deductFlags, tender, feeField, false);
  268. //定额设备购置费
  269. const equipmentAcFee = cbTools.getBaseFee(deductFlags[0], tender, "equipment");
  270. const equipmentAcTaxFee = cbTools.getBaseFee(deductFlags[0], tender, "tax");
  271. return (afterDeductFee + equipmentAcFee * 0.4 + equipmentAcTaxFee).toDecimal(decimalObj.bills.totalPrice);
  272. }
  273. },
  274. DEJZAZGCFBHZXF(tender) {
  275. // 定额建筑安装工程费(不含专项费用)
  276. return cbTools.getFeeWithDeduction(fixedFlag.CONSTRUCTION_INSTALL_FEE, [fixedFlag.SPECIAL_COST], tender, "rationCommon", true);
  277. },
  278. // 设备费 算法:取清单固定类别是“设备购置”的建安费
  279. SBF(tender) {
  280. return cbTools.getBaseFee(fixedFlag.EQUIPMENT_ACQUISITION_FEE, tender, "common");
  281. },
  282. // 设备费 算法:取清单固定类别是“设备购置”的定额建安费
  283. DESBF(tender) {
  284. return cbTools.getBaseFee(fixedFlag.EQUIPMENT_ACQUISITION_FEE, tender, "rationCommon");
  285. },
  286. // 养护工程费 算法:取清单固定类别是“养护工程费”的金额。
  287. YHGCF(tender) {
  288. return cbTools.getBaseFee(fixedFlag.MAINTENANCE_FEE, tender, "common");
  289. },
  290. // 定额养护工程费 算法:取清单固定类别是“养护工程费”的定额建安费(其中定额设备费按40%计算)。
  291. DEYHGCF(tender) {
  292. const engName = projectObj.project.property.engineeringName;
  293. const feeField = "rationCommon";
  294. if (isLittleFix(engName)) {
  295. // 小修的没有设备购置固定行
  296. const baseFee = cbTools.getBaseFee(fixedFlag.MAINTENANCE_FEE, tender, feeField);
  297. const fixedNode = projectObj.project.mainTree.items.find((node) => node.getFlag() === fixedFlag.MAINTENANCE_FEE);
  298. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "equipment");
  299. return (baseFee - equipmentFee * 0.6).toDecimal(decimalObj.bills.totalPrice);
  300. } else {
  301. const deductFlags = [fixedFlag.EQUIPMENT_ACQUISITION_FEE];
  302. //建安费扣除定额设备购置费
  303. const afterDeductFee = cbTools.getFeeWithDeduction(fixedFlag.MAINTENANCE_FEE, deductFlags, tender, feeField, false);
  304. //定额设备购置费
  305. const equipmentAcFee = cbTools.getBaseFee(deductFlags[0], tender, "equipment");
  306. const equipmentAcTaxFee = cbTools.getBaseFee(deductFlags[0], tender, "tax");
  307. return (afterDeductFee + equipmentAcFee * 0.4 + equipmentAcTaxFee).toDecimal(decimalObj.bills.totalPrice);
  308. }
  309. },
  310. // 养护单位(业主)管理费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。。
  311. YHDWYZGLF(tender) {
  312. const baseFee = this["DEJZAZGCF"](tender);
  313. if (!tender) {
  314. calcBase.baseProgressiveFee = baseFee;
  315. }
  316. return calculateUtil.getProgressiveFee(
  317. baseFee,
  318. "养护单位(业主)管理费",
  319. projectObj.project.property.progressiveInterval,
  320. decimalObj.bills.totalPrice,
  321. deficiency
  322. );
  323. },
  324. // 养护单位(业主)管理费(未单独设置) 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。
  325. YHDWYZGLFWDDSZ(tender) {
  326. const baseFee = this["DEJZAZGCF"](tender);
  327. if (!tender) {
  328. calcBase.baseProgressiveFee = baseFee;
  329. }
  330. return calculateUtil.getProgressiveFee(
  331. baseFee,
  332. "养护单位(业主)管理费(未单独设置)",
  333. projectObj.project.property.progressiveInterval,
  334. decimalObj.bills.totalPrice,
  335. deficiency
  336. );
  337. },
  338. // 养护工程监理费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算
  339. YHGCJLF(tender) {
  340. const baseFee = this["DEJZAZGCF"](tender);
  341. if (!tender) {
  342. calcBase.baseProgressiveFee = baseFee;
  343. }
  344. return calculateUtil.getProgressiveFee(
  345. baseFee,
  346. "养护工程监理费",
  347. projectObj.project.property.progressiveInterval,
  348. decimalObj.bills.totalPrice,
  349. deficiency
  350. );
  351. },
  352. // 养护工程监理费(路线工程) 算法:以{定额建筑安装工程费}为基数,采用累进办法计算
  353. YHGCJLFLXGC(tender) {
  354. const baseFee = this["DEJZAZGCF"](tender);
  355. if (!tender) {
  356. calcBase.baseProgressiveFee = baseFee;
  357. }
  358. return calculateUtil.getProgressiveFee(
  359. baseFee,
  360. "养护工程监理费(路线工程)",
  361. projectObj.project.property.progressiveInterval,
  362. decimalObj.bills.totalPrice,
  363. deficiency
  364. );
  365. },
  366. // 养护工程监理费(桥梁及隧道工程) 算法:以{定额建筑安装工程费}为基数,采用累进办法计算
  367. YHGCJLFQLJSDGC(tender) {
  368. const baseFee = this["DEJZAZGCF"](tender);
  369. if (!tender) {
  370. calcBase.baseProgressiveFee = baseFee;
  371. }
  372. return calculateUtil.getProgressiveFee(
  373. baseFee,
  374. "养护工程监理费(桥梁及隧道工程)",
  375. projectObj.project.property.progressiveInterval,
  376. decimalObj.bills.totalPrice,
  377. deficiency
  378. );
  379. },
  380. // 设计文件审查费 算法:以{定额建筑安装工程费}为基数,采用累进办法计算。
  381. SJWJSCF(tender) {
  382. const baseFee = this["DEJZAZGCF"](tender);
  383. if (!tender) {
  384. calcBase.baseProgressiveFee = baseFee;
  385. }
  386. return calculateUtil.getProgressiveFee(
  387. baseFee,
  388. "设计文件审查费",
  389. projectObj.project.property.progressiveInterval,
  390. decimalObj.bills.totalPrice,
  391. deficiency
  392. );
  393. },
  394. // 养护项目信息化费 (大中修):取清单固定类别是“建筑安装工程费”的定额建安费(其中定额设备费按40%计算)*0.32%计算。不足10000取10000
  395. // 养护项目信息化费 (小修):算法:取清单固定类别是“建筑安装工程费”的定额建安费(其中定额设备费按40%计算)*0.2%计算。信息化管理费不足5000元时按5000元计取。
  396. YHXMXXHF(tender) {
  397. const engName = projectObj.project.property.engineeringName;
  398. const baseFee = this["DEJZAZGCF"](tender);
  399. if (isLittleFix(engName)) {
  400. const fee = (baseFee * 0.002).toDecimal(decimalObj.bills.totalPrice);
  401. return fee > 0 && fee < 5000 ? 5000 : fee;
  402. } else {
  403. const fee = (baseFee * 0.0032).toDecimal(decimalObj.bills.totalPrice);
  404. return fee > 0 && fee < 10000 ? 10000 : fee;
  405. }
  406. },
  407. // 养护工程设计费(路线工程) 算法:以{定额建筑安装工程费}为基数,采用累进办法计算
  408. YHGCSJFLXGC(tender) {
  409. const baseFee = this["DEJZAZGCF"](tender);
  410. if (!tender) {
  411. calcBase.baseProgressiveFee = baseFee;
  412. }
  413. return calculateUtil.getProgressiveFee(
  414. baseFee,
  415. "养护工程设计费(路线工程)",
  416. projectObj.project.property.progressiveInterval,
  417. decimalObj.bills.totalPrice,
  418. deficiency
  419. );
  420. },
  421. // 养护工程设计费(独立桥梁、隧道工程) 算法:以{定额建筑安装工程费}为基数,采用累进办法计算
  422. YHGCSJFQLSDGC(tender) {
  423. const baseFee = this["DEJZAZGCF"](tender);
  424. if (!tender) {
  425. calcBase.baseProgressiveFee = baseFee;
  426. }
  427. return calculateUtil.getProgressiveFee(
  428. baseFee,
  429. "养护工程设计费(独立桥梁、隧道工程)",
  430. projectObj.project.property.progressiveInterval,
  431. decimalObj.bills.totalPrice,
  432. deficiency
  433. );
  434. },
  435. // 施工场地建设费 算法:以{定额养护工程费}为基数,采用累进办法计算
  436. SGCDJSF(tender) {
  437. const baseFee = this["DEJZAZGCFBHZXF"](tender);
  438. // 小修保养类别,施工场地建设费的计算基数定额建筑安装工程费超过30000000元时,不进行累进计算,直接按500000元计取。
  439. const engName = projectObj.project.property.engineeringName;
  440. if (isLittleFix(engName) && baseFee > 30000000) {
  441. return 500000;
  442. }
  443. if (!tender) {
  444. calcBase.baseProgressiveFee = baseFee;
  445. }
  446. return calculateUtil.getProgressiveFee(
  447. baseFee,
  448. "施工场地建设费",
  449. projectObj.project.property.progressiveInterval,
  450. decimalObj.bills.totalPrice,
  451. deficiency
  452. );
  453. },
  454. // 一二三四部分合计 算法:取清单固定类别是“一二三四部分合计”的金额
  455. YESSBFHJ(tender) {
  456. return cbTools.getBaseFee(fixedFlag.ONE_TO_FOUR_TOTAL, tender, "common");
  457. },
  458. /* 价差预备费 算法:以建筑安装工程费为基数,按设计文件编制年始至养护项目工程竣工年终的年数和年工程造价增涨率计算。
  459. 价差预备费 P * [(1+i)^(n-1) -1]
  460. P——建筑安装工程费总额(元);
  461. i——年工程造价增涨率(%);
  462. n——设计文件编制年至养护项目开工年+养护项目建设期限(年)。
  463. */
  464. JCYBF(tender) {
  465. //建筑安装工程费作为基数
  466. const installFee = this["JZAZGCF"](tender);
  467. //年造价增涨
  468. const costGrowthRate = calcBase.project.property.costGrowthRate ? calcBase.project.property.costGrowthRate : 0;
  469. //增涨计费年限
  470. const growthPeriod = projectObj.project.property.growthPeriod ? calcBase.project.property.growthPeriod : 0;
  471. //= P * [(1+i)^(n-1) -1]
  472. return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
  473. },
  474. };
  475. baseFigureTemplate.boq = {
  476. //{专项暂定合计}
  477. // 第100章至700章清单行的暂估合价
  478. ZXZDHJ: function (tender) {
  479. return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, "estimate");
  480. },
  481. //{100章以外清单合计}
  482. // 取清单固定清单[第100章至700章清单]的金额,但扣除清单100章下的金额。
  483. // 如果是固定清单[第100章至700章清单]下100章以外清单引用此基数,要排除自身(目前只允许100章的清单使用,所以暂时不需要此判断)
  484. YBZYHQDHJ: function (tender) {
  485. let oneToSeven = cbTools.findNodeByFlag(fixedFlag.ONE_SEVEN_BILLS);
  486. if (!oneToSeven) {
  487. return 0;
  488. }
  489. //100-700章固定节点的所有子节点
  490. let allChildren = [];
  491. function getChildren(nodes) {
  492. allChildren = allChildren.concat(nodes);
  493. for (let node of nodes) {
  494. if (node.children.length > 0) {
  495. getChildren(node.children);
  496. }
  497. }
  498. }
  499. getChildren(oneToSeven.children);
  500. //扣除的节点:100章的节点[100-200)
  501. let deductNodes = allChildren.filter(cbTools.withingOneHundred);
  502. //计算金额
  503. let fullFeeField = tender ? "common.tenderTotalFee" : "common.totalFee";
  504. return projectObj.project.calcProgram.getTotalFee([oneToSeven], deductNodes, fullFeeField).toDecimal(decimalObj.bills.totalPrice);
  505. },
  506. // 清单项目基数:{定额建筑安装工程费} 算法:取清单固定类别是“第100章至700章清单”的定额建安费(其中定额设备费按40%计算,税金是全额计算)。显示:只有清单固定类别是“第100章清单总则”的部分可显示。
  507. DEJZAZGCF(tender) {
  508. const baseFee = cbTools.getBaseFee(fixedFlag.ONE_SEVEN_BILLS, tender, "rationCommon");
  509. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.ONE_SEVEN_BILLS);
  510. const equipmentFee = cbTools.getEquipmentFee(fixedNode, tender, "equipment");
  511. return (baseFee - equipmentFee * 0.6).toDecimal(decimalObj.bills.totalPrice);
  512. },
  513. };
  514. }
  515. if (typeof module !== "undefined") {
  516. // 甘肃养护,项目属性-小数位数,费率小数位数默认为2。
  517. const defaultDecimal = {
  518. bills: { unitPrice: 2, totalPrice: 0 },
  519. ration: { quantity: 3, unitPrice: 2, totalPrice: 0 },
  520. glj: { quantity: 3, unitPriceHasMix: 2, unitPrice: 2 },
  521. feeRate: 4,
  522. quantity_detail: 4,
  523. material: 5, //三材系数
  524. process: 6,
  525. marketPriceProcess: 2,
  526. temProcess: 6,
  527. };
  528. module.exports = {
  529. progression,
  530. deficiency,
  531. defaultDecimal,
  532. };
  533. }
  534. // 不显示但可的基数
  535. const invisibleBases = ["设备费", "定额设备费"];
  536. if (typeof projectObj !== "undefined") {
  537. projectObj.isInsertEquipmentVisable = function (selected) {
  538. if (projectObj.project.property.valuationType !== "ration") {
  539. //属于预算项目的情况下,在固定清单可见
  540. const engName = projectObj.project.property.engineeringName;
  541. //属于的固定清单
  542. const belongFlag = cbTools.getBelongFlag(selected);
  543. if (isLittleFix(engName)) {
  544. if (belongFlag && belongFlag === fixedFlag.MAINTENANCE_FEE) {
  545. return true;
  546. }
  547. } else {
  548. if (belongFlag && belongFlag === fixedFlag.EQUIPMENT_ACQUISITION_FEE) {
  549. return true;
  550. }
  551. }
  552. return false;
  553. }
  554. return true;
  555. };
  556. }