chongqing_2018.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * Created by zhang on 2018/8/14.
  3. */
  4. //重庆综合里程、工地转移费率值修改特殊处理
  5. if (typeof feeRateObject !== "undefined") {
  6. feeRateObject.feeRateSpecialHandle = function (subRate, value) {
  7. let result = {};
  8. if (subRate.name == "工地转移(km)" && value && value < 50) {
  9. //工地转移50km以内按50km算
  10. result.valueKey = "50";
  11. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  12. }
  13. if (subRate.name == "综合里程(km)" && value && value < 3) {
  14. //综合里程3km以内按3km算
  15. result.valueKey = "3";
  16. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  17. }
  18. return result;
  19. };
  20. }
  21. // 累进的基数名称
  22. const progression = [
  23. "施工场地建设费",
  24. "养护单位(业主)管理费",
  25. "信息化费",
  26. "路线工程监理费",
  27. "独立桥梁隧道工程监理费",
  28. "设计文件审查费",
  29. "路线勘察设计费",
  30. "独立桥梁隧道维修加固勘察设计费",
  31. "招标代理及标底(最高投标限价)编制费",
  32. ];
  33. // 累进计算金额不足时的处理映射
  34. const deficiency = {
  35. 路线工程监理费: 20000, // 不足2万按2万
  36. 独立桥梁隧道工程监理费: 20000,
  37. 设计文件审查费: 3000,
  38. };
  39. if (typeof module !== "undefined") {
  40. module.exports = {
  41. progression,
  42. deficiency,
  43. };
  44. }
  45. // {定额建安费(不含定额设备购置费)}
  46. if (typeof baseFigureTemplate !== "undefined") {
  47. baseFigureTemplate.boq.DEJAFBHDESBGZF = function (tender) {
  48. // 旧:汇总定额的定额建安费(不含设备类型的定额、不含工料机定额、不含量x价清单)。因缺少量x价清单的定额建安费,新版本不再使用。
  49. if (isLowVer(historyVer1)) {
  50. const feeField = "rationCommon";
  51. const subFeeField = tender ? "tenderTotalFee" : "totalFee";
  52. let rations = projectObj.project.Ration.datas.filter((ration) => !(ration.type === rationType.gljRation && ration.subType === gljType.EQUIPMENT));
  53. const summaryFee = rations.reduce((total, ration) => {
  54. const fee = cbTools.getFee(ration, feeField, subFeeField);
  55. return (total += fee);
  56. }, 0);
  57. return summaryFee.toDecimal(decimalObj.bills.totalPrice);
  58. } else {
  59. // 新:根结点的定额建安费(含 量x价清单的定额建安费),扣除定额设备费+税金。其中,设备费:传入rationCommon时,表示定额设备费+税金。传入equipment表示定额设备费
  60. const baseFee = cbTools.getBaseFee(fixedFlag.ONE_SEVEN_BILLS, tender, "rationCommon");
  61. const fixedNode = projectObj.project.mainTree.roots.find((node) => node.getFlag() === fixedFlag.ONE_SEVEN_BILLS);
  62. const equipmentTaxFee = cbTools.getEquipmentFee(fixedNode, tender, "rationCommon");
  63. return (baseFee - equipmentTaxFee).toDecimal(decimalObj.bills.totalPrice);
  64. }
  65. };
  66. }