gansu_2021.js 24 KB

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