hunan_2014.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. let isHN2014 = true;
  2. function overwriteRationCalcBases(taxType) {
  3. if (typeof rationCalcBases == 'undefined') return;
  4. for (let key in rationCalcBases) delete rationCalcBases[key];
  5. // let isJY = taxType == '2';
  6. rationCalcBases['人工费'] = function (node, isTender) {
  7. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
  8. };
  9. rationCalcBases['材料费'] = function (node, isTender) {
  10. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
  11. };
  12. rationCalcBases['施工机械使用费'] = function (node, isTender) {
  13. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
  14. };
  15. rationCalcBases['商品砼费'] = function (node, isTender) {
  16. return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptMarketPrice, isTender);
  17. };
  18. rationCalcBases['外购砼构件费'] = function (node, isTender) {
  19. return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptMarketPrice, isTender);
  20. };
  21. rationCalcBases['设备购置费'] = function (node, isTender) {
  22. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
  23. }
  24. };
  25. (function overwriteFeeTypes() {
  26. if (typeof cpFeeTypes == 'undefined') return;
  27. cpFeeTypes = [
  28. { type: 'marketDirect', name: '直接费' },
  29. { type: 'marketDirectWork', name: '直接工程费' },
  30. { type: 'marketLabour', name: '人工费' },
  31. { type: 'marketMaterial', name: '材料费' },
  32. { type: 'marketMachine', name: '施工机械使用费' },
  33. { type: 'otherFee', name: '其他工程费' },
  34. { type: 'otherFee1', name: '其他工程费I' },
  35. { type: 'otherFee2', name: '其他工程费II' },
  36. { type: "indirect", name: '间接费' },
  37. { type: 'manage', name: '企业管理费' },
  38. { type: 'force', name: '规费' },
  39. { type: 'profit', name: '利润' },
  40. { type: 'tax', name: '税金' },
  41. { type: 'common', name: '建安费' }
  42. ];
  43. })();
  44. // 清单基数
  45. const progression = ['养护工程管理经费(大修工程)', '养护工程管理经费(中修工程)', '养护工程监理费(路线工程)', '养护工程监理费(桥梁及隧道工程)', '养护工程设计文件审查费', '工程设计费(路线工程)', '工程设计费(桥梁、隧道工程)'];
  46. const deficiency = { '养护工程设计文件审查费': 4500 };
  47. const beyond = { '养护工程设计文件审查费': 600000 };
  48. if (typeof baseFigureMap !== 'undefined') {
  49. const { fixedFlag } = commonConstants;
  50. const budgetMap = {
  51. // 显示:除清单固定类别是“建筑安装工程费”的以外部分可显示
  52. '公路养护工程费': {
  53. base: 'GLYHGCF',
  54. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  55. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE],
  56. pick: false,
  57. },
  58. // 除清单固定类别是“建筑安装工程费”、“设备购置费”的以外部分可显示
  59. '设备购置费用': {
  60. base: 'SBGZFY',
  61. fixedFlag: fixedFlag.EQUIPMENT_ACQUISITION_FEE,
  62. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.EQUIPMENT_ACQUISITION_FEE],
  63. pick: false,
  64. },
  65. // 除清单固定类别是“建筑安装工程费”、“设备购置费”、“养护工程其他费用”的以外部分可显示
  66. '养护工程其他费用': {
  67. base: 'YHGCQTFY',
  68. fixedFlag: fixedFlag.MAINTENANCE_EXPENSES,
  69. filter: [fixedFlag.CONSTRUCTION_INSTALL_FEE, fixedFlag.EQUIPMENT_ACQUISITION_FEE, fixedFlag.MAINTENANCE_EXPENSES],
  70. pick: false,
  71. },
  72. // 只有清单固定类别是“养护工程其他费用”部分可显示
  73. '养护工程管理经费(大修工程)': {
  74. isProgressive: true,
  75. base: 'YHGCGLJFDXGC',
  76. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  77. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  78. pick: true,
  79. },
  80. // 只有清单固定类别是“养护工程其他费用”部分可显示
  81. '养护工程管理经费(中修工程)': {
  82. isProgressive: true,
  83. base: 'YHGCGLJFZXGC',
  84. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  85. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  86. pick: true,
  87. },
  88. // 只有清单固定类别是“养护工程其他费用”部分可显示
  89. '养护工程监理费(路线工程)': {
  90. isProgressive: true,
  91. base: 'YHGCJLFLXGC',
  92. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  93. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  94. pick: true,
  95. },
  96. // 只有清单固定类别是“养护工程其他费用”部分可显示
  97. '养护工程监理费(桥梁及隧道工程)': {
  98. isProgressive: true,
  99. base: 'YHGCJLFQLJSDGC',
  100. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  101. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  102. pick: true,
  103. },
  104. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  105. '养护工程设计文件审查费': {
  106. isProgressive: true,
  107. base: 'YHGCSJWJSCF',
  108. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  109. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  110. pick: true,
  111. },
  112. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  113. '工程设计费(路线工程)': {
  114. isProgressive: true,
  115. base: 'GCSJFLXGC',
  116. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  117. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  118. pick: true,
  119. },
  120. // 显示:只有清单固定类别是“养护工程其他费用”部分可显示。
  121. '工程设计费(桥梁、隧道工程)': {
  122. isProgressive: true,
  123. base: 'GCSJFQLSDGC',
  124. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  125. filter: [fixedFlag.MAINTENANCE_EXPENSES],
  126. pick: true,
  127. },
  128. // 显示:仅“价差预备费”可显示
  129. '价差预备费': {
  130. base: 'JCYBF',
  131. fixedFlag: fixedFlag.CONSTRUCTION_INSTALL_FEE,
  132. filter: [fixedFlag.SPREAD_BUDGET_FEE],
  133. pick: true,
  134. },
  135. };
  136. const boqMap = {
  137. //仅允许用于固定类别是“第100章至700章清单”以外的清单
  138. '各章清单合计': {
  139. base: 'GZQDHJ',
  140. fixedFlag: fixedFlag.ONE_SEVEN_BILLS,
  141. filter: [fixedFlag.ONE_SEVEN_BILLS],
  142. pick: false
  143. },
  144. //仅允许用于固定类别是“第100章至700章清单”以外的清单
  145. '专项暂定合计': {
  146. base: 'ZXZDHJ',
  147. fixedFlag: null,
  148. filter: [fixedFlag.ONE_SEVEN_BILLS],
  149. pick: false
  150. },
  151. /*
  152. * 清单固定行[第100章至700章清单]下的[第100章清单]需要允许清单可使用基数{100章以外合计}
  153. * 因此{100章以外合计}不设置关联的清单固定行
  154. * */
  155. //仅允许用于固定类别为“100章清单”引用
  156. '100章以外清单合计': {
  157. base: 'YBZYHQDHJ',
  158. fixedFlag: null,
  159. filter: [fixedFlag.ONE_HUNDRED_BILLS],
  160. pick: true
  161. }
  162. };
  163. baseFigureMap.budget = budgetMap;
  164. baseFigureMap.boq = boqMap;
  165. }
  166. if (typeof baseFigureTemplate !== 'undefined') {
  167. const { fixedFlag } = commonConstants;
  168. baseFigureTemplate.budget = {
  169. // 公路养护工程费 算法:取清单固定类别是“建筑安装工程费”的金额。
  170. GLYHGCF(tender) {
  171. return cbTools.getBaseFee(fixedFlag.CONSTRUCTION_INSTALL_FEE, tender, 'common');
  172. },
  173. // 设备购置费用:取清单固定类别是“设备购置费”的金额
  174. SBGZFY(tender) {
  175. return cbTools.getBaseFee(calcBase.fixedFlag.EQUIPMENT_ACQUISITION_FEE, tender, 'common');
  176. },
  177. // 养护工程其他费用: 取清单固定类别是“养护工程其他费用”的金额。
  178. YHGCQTFY(tender) {
  179. return cbTools.getBaseFee(calcBase.fixedFlag.MAINTENANCE_EXPENSES, tender, 'common');
  180. },
  181. // 养护工程管理经费(大修工程): 按“公路养护工程费”为基数,以累进办法计算。
  182. YHGCGLJFDXGC(tender) {
  183. const baseFee = this['GLYHGCF'](tender);
  184. if (!tender) {
  185. calcBase.baseProgressiveFee = baseFee;
  186. }
  187. return calculateUtil.getProgressiveFee(baseFee, '养护工程管理经费(大修工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  188. },
  189. // 养护工程管理经费(中修工程): 按“公路养护工程费”为基数,以累进办法计算。
  190. YHGCGLJFZXGC(tender) {
  191. const baseFee = this['GLYHGCF'](tender);
  192. if (!tender) {
  193. calcBase.baseProgressiveFee = baseFee;
  194. }
  195. return calculateUtil.getProgressiveFee(baseFee, '养护工程管理经费(中修工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  196. },
  197. // 养护工程监理费(路线工程): 按“公路养护工程费”为基数,以累进办法计算。
  198. YHGCJLFLXGC(tender) {
  199. const baseFee = this['GLYHGCF'](tender);
  200. if (!tender) {
  201. calcBase.baseProgressiveFee = baseFee;
  202. }
  203. return calculateUtil.getProgressiveFee(baseFee, '养护工程监理费(路线工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  204. },
  205. // 养护工程监理费(桥梁及隧道工程): 按“公路养护工程费”为基数,以累进办法计算。
  206. YHGCJLFQLJSDGC(tender) {
  207. const baseFee = this['GLYHGCF'](tender);
  208. if (!tender) {
  209. calcBase.baseProgressiveFee = baseFee;
  210. }
  211. return calculateUtil.getProgressiveFee(baseFee, '养护工程监理费(桥梁及隧道工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  212. },
  213. // 养护工程设计文件审查费: 按“公路养护工程费”为基数,以累进办法计算。
  214. YHGCSJWJSCF(tender) {
  215. const baseFee = this['GLYHGCF'](tender);
  216. if (!tender) {
  217. calcBase.baseProgressiveFee = baseFee;
  218. }
  219. return calculateUtil.getProgressiveFee(baseFee, '养护工程设计文件审查费', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  220. },
  221. // 工程设计费(路线工程): 按“公路养护工程费”为基数,以累进办法计算。
  222. GCSJFLXGC(tender) {
  223. const baseFee = this['GLYHGCF'](tender);
  224. if (!tender) {
  225. calcBase.baseProgressiveFee = baseFee;
  226. }
  227. return calculateUtil.getProgressiveFee(baseFee, '工程设计费(路线工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  228. },
  229. // 工程设计费(桥梁、隧道工程): 按“公路养护工程费”为基数,以累进办法计算。
  230. GCSJFQLSDGC(tender) {
  231. const baseFee = this['GLYHGCF'](tender);
  232. if (!tender) {
  233. calcBase.baseProgressiveFee = baseFee;
  234. }
  235. return calculateUtil.getProgressiveFee(baseFee, '工程设计费(桥梁、隧道工程)', projectObj.project.property.progressiveInterval, decimalObj.bills.totalPrice, deficiency);
  236. },
  237. /* 价差预备费 算法:以建筑安装工程费为基数,按设计文件编制年始至养护项目工程竣工年终的年数和年工程造价增涨率计算。
  238. 价差预备费 P * [(1+i)^(n-1) -1]
  239. P——建筑安装工程费总额(元);
  240. i——年工程造价增涨率(%);
  241. n——设计文件编制年至养护项目开工年+养护项目建设期限(年)。
  242. */
  243. JCYBF(tender) {
  244. //建筑安装工程费作为基数
  245. const installFee = this['GLYHGCF'](tender);
  246. //年造价增涨
  247. const costGrowthRate = calcBase.project.property.costGrowthRate
  248. ? calcBase.project.property.costGrowthRate
  249. : 0;
  250. //增涨计费年限
  251. const growthPeriod = projectObj.project.property.growthPeriod
  252. ? calcBase.project.property.growthPeriod
  253. : 0;
  254. //= P * [(1+i)^(n-1) -1]
  255. return (installFee * (Math.pow(1 + costGrowthRate, growthPeriod - 1) - 1)).toDecimal(decimalObj.bills.totalPrice);
  256. }
  257. };
  258. baseFigureTemplate.boq = {
  259. //{各章清单合计}
  260. // 取清单固定类别是“第100章至700章清单”的金额
  261. 'GZQDHJ': function (tender) {
  262. return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, 'common');
  263. },
  264. //{专项暂定合计}
  265. // 第100章至700章清单行的暂估合价
  266. 'ZXZDHJ': function (tender) {
  267. return cbTools.getBaseFee(calcBase.fixedFlag.ONE_SEVEN_BILLS, tender, 'estimate');
  268. },
  269. //{100章以外清单合计}
  270. // 取清单固定清单[第100章至700章清单]的金额,但扣除清单100章下的金额。
  271. // 如果是固定清单[第100章至700章清单]下100章以外清单引用此基数,要排除自身(目前只允许100章的清单使用,所以暂时不需要此判断)
  272. 'YBZYHQDHJ': function (tender) {
  273. let oneToSeven = cbTools.findNodeByFlag(fixedFlag.ONE_SEVEN_BILLS);
  274. if (!oneToSeven) {
  275. return 0;
  276. }
  277. //100-700章固定节点的所有子节点
  278. let allChildren = [];
  279. function getChildren(nodes) {
  280. allChildren = allChildren.concat(nodes);
  281. for (let node of nodes) {
  282. if (node.children.length > 0) {
  283. getChildren(node.children);
  284. }
  285. }
  286. }
  287. getChildren(oneToSeven.children);
  288. //扣除的节点:100章的节点[100-200)
  289. let deductNodes = allChildren.filter(cbTools.withingOneHundred);
  290. //计算金额
  291. let fullFeeField = tender ? 'common.tenderTotalFee' : 'common.totalFee';
  292. return projectObj.project.calcProgram.getTotalFee([oneToSeven], deductNodes, fullFeeField).toDecimal(decimalObj.bills.totalPrice);
  293. }
  294. };
  295. }
  296. //湖南2014工地转移费率值修改特殊处理
  297. if (typeof feeRateObject !== "undefined") {
  298. feeRateObject.feeRateSpecialHandle = function (subRate, value) {
  299. let result = {};
  300. if (subRate.name == "工地转移(km)" && value && value < 50) {
  301. //工地转移50km以内按0km算
  302. result.valueKey = "0";
  303. result.value = scMathUtil.roundForObj(value, getDecimal("feeRate")); //设置显示的节点值
  304. }
  305. return result;
  306. };
  307. }
  308. if (typeof electrovalenceObj !== 'undefined') {
  309. electrovalenceObj.options = [
  310. { code: "870", name: "电网电", specs: "", unit: "kW·h", type: "201" },
  311. { code: "1791", name: "5kw以内柴油发电机组", specs: "5GF1", unit: "台班", type: "301" },
  312. { code: "1792", name: "15kw以内柴油发电机组", specs: "12GF1", unit: "台班", type: "301" },
  313. { code: "1793", name: "30kw以内柴油发电机组", specs: "30GFY-2", unit: "台班", type: "301" },
  314. { code: "1794", name: "50kw以内柴油发电机组", specs: "50GFY-2", unit: "台班", type: "301" },
  315. { code: "1795", name: "75kw以内柴油发电机组", specs: "75GFY-4", unit: "台班", type: "301" },
  316. { code: "1796", name: "100kw以内柴油发电机组", specs: "90GFZ", unit: "台班", type: "301" },
  317. { code: "1797", name: "120kw以内柴油发电机组", specs: "120GFY-4", unit: "台班", type: "301" },
  318. { code: "1798", name: "160kw以内柴油发电机组", specs: "160GF", unit: "台班", type: "301" },
  319. { code: "1799", name: "200kw以内柴油发电机组", specs: "200GF", unit: "台班", type: "301" },
  320. { code: "1800", name: "250kw以内柴油发电机组", specs: "250GF4-4", unit: "台班", type: "301" },
  321. { code: "1801", name: "320kw以内柴油发电机组", specs: "320GF-2", unit: "台班", type: "301" }
  322. ]
  323. }
  324. if (typeof gljUtil !== 'undefined') {
  325. gljUtil.getCodeSortMath = getCodeSortMath;
  326. gljUtil.getElecCoe = function () {
  327. return 0.24;
  328. }
  329. }
  330. if (typeof projectObj !== 'undefined') {
  331. projectObj.isInsertEquipmentVisable = function (selected) {
  332. return false;//山东养护(2016)和湖南养护(2014),预算、工程量清单项目右键应隐藏“插入设备”按钮。
  333. }
  334. }
  335. if (typeof module !== 'undefined') {
  336. module.exports = {
  337. progression,
  338. deficiency,
  339. beyond,
  340. getDefalutAssistProductionFeeRate: function () {
  341. return 5
  342. }
  343. };
  344. }