jiangxi_2017.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. /**
  2. * Created by CSL on 2018/11/12. 江西计算程序、基数 等覆盖。
  3. */
  4. let isJX2017 = true;
  5. //允许使用的工料机类型:人工、普通材料、其他材料费、混凝土、砂浆、配合比、商品混凝土、商品砂浆
  6. //机械台班、机上人工、机械组成物、主材、设备
  7. if(typeof allowGljType !== 'undefined'){
  8. allowGljType = [1, 201, 202, 203, 204, 205, 206, 207, 301, 302, 303, 4, 5];
  9. }
  10. if(typeof allowComponent !== 'undefined'){
  11. //允许含有组成物的工料机类型:混凝土、砂浆、配合比、机械台班、主材
  12. allowComponent = [202, 203, 204, 301, 4];
  13. }
  14. if(typeof componentType !== 'undefined'){
  15. //可以作为组成物的工料机类型:普通材料、机械组成物、机上人工、主材
  16. componentType = [201, 302, 303, 4];
  17. }
  18. if(typeof machineAllowComponent !== 'undefined'){
  19. //允许含有组成物的机械工料机类型:机械台班器仪表
  20. machineAllowComponent = [301];
  21. }
  22. if(typeof machineComponent !== 'undefined'){
  23. //可以作为机械工料机组成物的工料机类型:机械组成物、机上人工
  24. machineComponent = [302, 303];
  25. }
  26. if(typeof materialAllowComponent !== 'undefined'){
  27. //允许含有组成物的材料工料机类型:混凝土、砂浆、配合比
  28. materialAllowComponent = [202, 203, 204];
  29. }
  30. if(typeof materialComponent !== 'undefined'){
  31. //可以作为材料工料机组成物的工料机类型:普通材料
  32. materialComponent = [201];
  33. }
  34. // 一般计税取不含税市场价、不含税定额价。简易计税取含税市场价、含税定额价。打开项目时,4个价格根据计税类型只载入其二,所以这里可不作区分。
  35. function overwriteRationCalcBases (taxType){
  36. if (typeof rationCalcBases == 'undefined') return;
  37. for (let key in rationCalcBases) delete rationCalcBases[key];
  38. // let isJY = taxType == '2';
  39. rationCalcBases['人工费'] = function (node, isTender) {
  40. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
  41. };
  42. rationCalcBases['定额人工费'] = function (node, isTender) {
  43. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
  44. };
  45. rationCalcBases['材料费'] = function (node, isTender) {
  46. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
  47. };
  48. rationCalcBases['机械费'] = function (node, isTender) {
  49. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
  50. };
  51. rationCalcBases['定额机械费'] = function (node, isTender) {
  52. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
  53. };
  54. rationCalcBases['主材费'] = function (node, isTender) {
  55. return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender);
  56. };
  57. rationCalcBases['设备费'] = function (node, isTender) {
  58. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
  59. };
  60. rationCalcBases['人工费价差'] = function (node, isTender) {
  61. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptDiffPrice, isTender);
  62. };
  63. rationCalcBases['材料费价差'] = function (node, isTender) {
  64. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptDiffPrice, isTender);
  65. };
  66. rationCalcBases['机械费价差'] = function (node, isTender) {
  67. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptDiffPrice, isTender);
  68. };
  69. rationCalcBases['主材费价差'] = function (node, isTender) {
  70. return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptDiffPrice, isTender);
  71. };
  72. rationCalcBases['设备费价差'] = function (node, isTender) {
  73. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptDiffPrice, isTender);
  74. };
  75. rationCalcBases['人工工日'] = function (node, isTender) {
  76. return calcTools.labourDays(node, isTender);
  77. };
  78. rationCalcBases['甲供人工费'] = function (node, isTender) {
  79. return calcTools.partASupplyFee(node, '甲供人工费', isTender, false);
  80. };
  81. rationCalcBases['甲供材料费'] = function (node, isTender) {
  82. return calcTools.partASupplyFee(node, '甲供材料费', isTender, false);
  83. };
  84. rationCalcBases['甲供机械费'] = function (node, isTender) {
  85. return calcTools.partASupplyFee(node, '甲供机械费', isTender, false);
  86. };
  87. rationCalcBases['甲供主材费'] = function (node, isTender) {
  88. return calcTools.partASupplyFee(node, '甲供主材费', isTender, false);
  89. };
  90. rationCalcBases['甲供设备费'] = function (node, isTender) {
  91. return calcTools.partASupplyFee(node, '甲供设备费', isTender, false);
  92. };
  93. rationCalcBases['甲定人工费'] = function (node, isTender) {
  94. return calcTools.partASupplyFee(node, '甲定人工费', isTender, false);
  95. };
  96. rationCalcBases['甲定材料费'] = function (node, isTender) {
  97. return calcTools.partASupplyFee(node, '甲定材料费', isTender, false);
  98. };
  99. rationCalcBases['甲定机械费'] = function (node, isTender) {
  100. return calcTools.partASupplyFee(node, '甲定机械费', isTender, false);
  101. };
  102. rationCalcBases['甲定主材费'] = function (node, isTender) {
  103. return calcTools.partASupplyFee(node, '甲定主材费', isTender, false);
  104. };
  105. rationCalcBases['甲定设备费'] = function (node, isTender) {
  106. return calcTools.partASupplyFee(node, '甲定设备费', isTender, false);
  107. };
  108. rationCalcBases['暂估材料费'] = function (node, isTender) {
  109. return calcTools.estimateFee(node, true, isTender);
  110. };
  111. rationCalcBases['分包人工费'] = function (node, isTender) {
  112. if (node.data.isSubcontract)
  113. return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender)
  114. else
  115. return 0;
  116. };
  117. rationCalcBases['分包材料费'] = function (node, isTender) {
  118. if (node.data.isSubcontract)
  119. return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender)
  120. else
  121. return 0;
  122. };
  123. rationCalcBases['分包机械费'] = function (node, isTender) {
  124. if (node.data.isSubcontract)
  125. return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender)
  126. else
  127. return 0;
  128. };
  129. rationCalcBases['分包主材费'] = function (node, isTender) {
  130. if (node.data.isSubcontract)
  131. return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender)
  132. else
  133. return 0;
  134. };
  135. rationCalcBases['分包设备费'] = function (node, isTender) {
  136. if (node.data.isSubcontract)
  137. return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender)
  138. else
  139. return 0;
  140. };
  141. rationCalcBases['分包人工工日'] = function (node, isTender) {
  142. if (node.data.isSubcontract)
  143. return calcTools.labourDays(node, isTender)
  144. else
  145. return 0;
  146. };
  147. };
  148. (function overwriteFeeTypes() {
  149. if (typeof cpFeeTypes == 'undefined') return;
  150. cpFeeTypes = [
  151. // {type: 'direct', name: '直接费'},
  152. {type: 'labour', name: '人工费'},
  153. {type: 'marketLabour', name: '市场价人工费'},
  154. {type: 'marketMaterial', name: '市场价材料费'},
  155. {type: 'machine', name: '机械费'},
  156. {type: 'marketMachine', name: '市场价机械费'},
  157. {type: 'mainMaterial', name: '主材费'},
  158. {type: 'equipment', name: '设备费'},
  159. {type: 'manage', name: '企业管理费'},
  160. {type: 'surtax', name: '附加税费'},
  161. {type: 'profit', name: '利润'},
  162. {type: 'safeMeasures', name: '安全文明施工措施费'},
  163. {type: 'environment', name: '安全文明环保费'},
  164. {type: 'tempFacility', name: '临时设施费'},
  165. {type: 'otherTotalMeasures', name: '其他总价措施费'},
  166. {type: 'dirtMeasures', name: '扬尘治理措施费'},
  167. {type: 'forceFee', name: '规费'},
  168. {type: 'tax', name: '税金'},
  169. {type: 'common', name: '工程造价'}
  170. ];
  171. })();
  172. //清单计算基数相关
  173. if(typeof baseFigureMap !== 'undefined'){
  174. baseFigureMap = {
  175. //与清单直接关联=======
  176. '分部分项工程费': {base: 'FBFXGCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  177. //'分部分项直接费': {base: 'FBFXZJF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  178. '分部分项定额人工费': {base: 'FBFXDEJJRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  179. '分部分项人工费': {base: 'FBFXRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  180. '分部分项材料费': {base: 'FBFXCLF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  181. '分部分项定额机械费': {base: 'FBFXDEJJJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  182. '分部分项机械费': {base: 'FBFXJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  183. '分部分项主材费': {base: 'FBFXZCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  184. '分部分项设备费': {base: 'FBFXSBF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  185. '分部分项人工工日': {base: 'FBFXRGGR', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
  186. '措施项目费': {base: 'CSXMF', fixedFlag: fixedFlag.MEASURE, class: 'CSXM'},
  187. '组织措施项目费': {base: 'ZZCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
  188. '组织措施项目人工费': {base: 'ZZCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
  189. '组织措施项目材料费': {base: 'ZZCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
  190. '组织措施项目机械费': {base: 'ZZCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
  191. '技术措施项目费': {base: 'JSCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  192. '技术措施项目定额人工费': {base: 'JSCSXMDEJJRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  193. '技术措施项目人工费': {base: 'JSCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  194. '技术措施项目材料费': {base: 'JSCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  195. '技术措施项目定额机械费': {base: 'JSCSXMDEJJJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  196. '技术措施项目机械费': {base: 'JSCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  197. '技术措施项目主材费': {base: 'JSCSXMZCF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  198. '技术措施项目设备费': {base: 'JSCSXMSBF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  199. '技术措施项目人工工日': {base: 'JSCSXMRGGR', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
  200. '其他项目费': {base: 'QTXMF', fixedFlag: fixedFlag.OTHER, class: 'QTXM'},
  201. '规费': {base: 'GF', fixedFlag: fixedFlag.CHARGE, class: 'GF'},
  202. '税金': {base: 'SJ', fixedFlag: fixedFlag.TAX, class: 'SJ'},
  203. //不于清单直接关联==========
  204. '建筑面积': {base: 'JZMJ', class: 'FBFX'},
  205. '人材机价差': {base: 'RCJJC', class: 'RCJ'},
  206. '人工价差': {base: 'RGJC', class: 'RCJ'},
  207. '材料价差': {base: 'CLJC', class: 'RCJ'},
  208. '机械价差': {base: 'JXJC', class: 'RCJ'},
  209. '甲供人工费': {base: 'JGRGF', class: 'RCJ'},
  210. '甲供材料费': {base: 'JGCLF', class: 'RCJ'},
  211. '甲供机械费': {base: 'JGJXF', class: 'RCJ'},
  212. '甲供主材费': {base: 'JGZCF', class: 'RCJ'},
  213. '甲供设备费': {base: 'JGSBF', class: 'RCJ'},
  214. '甲定人工费': {base: 'JDRGF', class: 'RCJ'},
  215. '甲定材料费': {base: 'JDCLF', class: 'RCJ'},
  216. '甲定机械费': {base: 'JDJXF', class: 'RCJ'},
  217. '甲定主材费': {base: 'JDZCF', class: 'RCJ'},
  218. '甲定设备费': {base: 'JDSBF', class: 'RCJ'},
  219. '暂估材料费(从子目汇总)': {base: 'ZGCLFFZM', class: 'RCJ'},
  220. '分包费': {base: 'FBF', class: 'FBF'},
  221. '分包人工费': {base: 'FBRGF', class: 'FBF'},
  222. '分包材料费': {base: 'FBCLF', class: 'FBF'},
  223. '分包机械费': {base: 'FBJXF', class: 'FBF'},
  224. '分包主材费': {base: 'FBZCF', class: 'FBF'},
  225. '分包设备费': {base: 'FBSBF', class: 'FBF'},
  226. '分包人工工日': {base: 'FBRGGR', class: 'FBF'},
  227. '估价项目定额人工费': {base: 'GJXMDERGF', class: 'GJXM'},
  228. '估价项目定额机械费': {base: 'GJXMDEJXF', class: 'GJXM'},
  229. //'估价项目直接费': {base: 'GJXMZJF', class: 'GJXM'},
  230. '估价项目人工费': {base: 'GJXMRGF', class: 'GJXM'},
  231. '估价项目材料费': {base: 'GJXMCLF', class: 'GJXM'},
  232. '估价项目机械费': {base: 'GJXMJXF', class: 'GJXM'},
  233. '估价项目主材费': {base: 'GJXMZCF', class: 'GJXM'},
  234. '估价项目工日': {base: 'GJXMGR', class: 'GJXM'},
  235. };
  236. }
  237. if(typeof baseFigureTemplate !== 'undefined'){
  238. baseFigureTemplate['FBFXRGF'] = function (tender) {//分部分项人工费(市场人工费)
  239. let feeField = 'marketLabour',
  240. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  241. return cbTools.getBillsFee(fixedFlag.SUB_ENGINERRING, feeField, subFeeField);
  242. };
  243. baseFigureTemplate['FBFXCLF'] = function (tender) {//分部分项材料费(市场材料费)
  244. let feeField = 'marketMaterial',
  245. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  246. return cbTools.getBillsFee(fixedFlag.SUB_ENGINERRING, feeField, subFeeField);
  247. };
  248. baseFigureTemplate['FBFXJXF'] = function (tender) {//分部分项机械费(市场机械费)
  249. let feeField = 'marketMachine',
  250. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  251. return cbTools.getBillsFee(fixedFlag.SUB_ENGINERRING, feeField, subFeeField);
  252. };
  253. baseFigureTemplate['ZZCSXMRGF'] = function (tender) {//组织措施项目人工费(市场人工费)
  254. let feeField = 'marketLabour',
  255. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  256. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_ORGANIZATION, feeField, subFeeField);
  257. };
  258. baseFigureTemplate['ZZCSXMCLF'] = function (tender) {//组织措施项目材料费(市场材料费)
  259. let feeField = 'marketMaterial',
  260. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  261. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_ORGANIZATION, feeField, subFeeField);
  262. };
  263. baseFigureTemplate['ZZCSXMJXF'] = function (tender) {//组织措施项目机械费(市场机械费)
  264. let feeField = 'marketMachine',
  265. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  266. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_ORGANIZATION, feeField, subFeeField);
  267. };
  268. baseFigureTemplate['JSCSXMRGF'] = function (tender) {//技术措施项目人工费(市场人工费)
  269. let feeField = 'marketLabour',
  270. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  271. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_TECH, feeField, subFeeField);
  272. };
  273. baseFigureTemplate['JSCSXMCLF'] = function (tender) {//技术措施项目材料费(市场材料费)
  274. let feeField = 'marketMaterial',
  275. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  276. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_TECH, feeField, subFeeField);
  277. };
  278. baseFigureTemplate['JSCSXMJXF'] = function (tender) {//技术措施项目机械费(市场机械费)
  279. let feeField = 'marketMachine',
  280. subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
  281. return cbTools.getBillsFee(fixedFlag.CONSTRUCTION_TECH, feeField, subFeeField);
  282. };
  283. baseFigureTemplate['FBRGF'] = function (tender) {//分包人工费(市场人工费)
  284. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  285. let rst = 0;
  286. let rations = calcBase.project.Ration.datas;
  287. for(let ration of rations){
  288. if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketLabour){
  289. rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  290. }
  291. }
  292. return rst;
  293. };
  294. baseFigureTemplate['FBCLF'] = function (tender) {//分包材料费(市场材料费)
  295. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  296. let rst = 0;
  297. let rations = calcBase.project.Ration.datas;
  298. for(let ration of rations){
  299. if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMaterial){
  300. rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  301. }
  302. }
  303. return rst;
  304. };
  305. baseFigureTemplate['FBJXF'] = function (tender) {//分包机械费(市场机械费)
  306. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  307. let rst = 0;
  308. let rations = calcBase.project.Ration.datas;
  309. for(let ration of rations){
  310. if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMachine){
  311. rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  312. }
  313. }
  314. return rst;
  315. };
  316. baseFigureTemplate['GJXMDERGF'] = function (tender) {//估计项目定额人工费
  317. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  318. let rst = 0;
  319. let rations = calcBase.project.Ration.datas;
  320. for(let ration of rations){
  321. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.labour){
  322. rst = parseFloat(rst + ration.feesIndex.labour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  323. }
  324. }
  325. return rst;
  326. };
  327. baseFigureTemplate['GJXMDEJXF'] = function (tender) {//估计项目定额机械费
  328. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  329. let rst = 0;
  330. let rations = calcBase.project.Ration.datas;
  331. for(let ration of rations){
  332. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.machine){
  333. rst = parseFloat(rst + ration.feesIndex.machine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  334. }
  335. }
  336. return rst;
  337. };
  338. baseFigureTemplate['GJXMRGF'] = function (tender) {//估计项目人工费(市场人工费)
  339. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  340. let rst = 0;
  341. let rations = calcBase.project.Ration.datas;
  342. for(let ration of rations){
  343. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketLabour){
  344. rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  345. }
  346. }
  347. return rst;
  348. };
  349. baseFigureTemplate['GJXMCLF'] = function (tender) {//估计项目材料费(市场材料费)
  350. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  351. let rst = 0;
  352. let rations = calcBase.project.Ration.datas;
  353. for(let ration of rations){
  354. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMaterial){
  355. rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  356. }
  357. }
  358. return rst;
  359. };
  360. baseFigureTemplate['GJXMJXF'] = function (tender) {//估计项目机械费(市场机械费)
  361. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  362. let rst = 0;
  363. let rations = calcBase.project.Ration.datas;
  364. for(let ration of rations){
  365. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMachine){
  366. rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  367. }
  368. }
  369. return rst;
  370. };
  371. baseFigureTemplate['GJXMZCF'] = function (tender) {//估计项目主材费
  372. const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
  373. let rst = 0;
  374. let rations = calcBase.project.Ration.datas;
  375. for(let ration of rations){
  376. if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.mainMaterial){
  377. rst = parseFloat(rst + ration.feesIndex.mainMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
  378. }
  379. }
  380. return rst;
  381. };
  382. baseFigureTemplate['GJXMGR'] = function (tender) {//估计项目工日
  383. const quantityType = tender ? 'tenderQuantity' : 'quantity';
  384. let rst = 0;
  385. let rations = calcBase.project.Ration.datas;
  386. let rationGljs = calcBase.project.ration_glj.datas;
  387. for (let ration of rations) {
  388. if (ration.evaluationProject && ration.type === rationType.ration) {
  389. for(let glj of rationGljs){
  390. if(ration.ID === glj.rationID && glj.type === gljType.LABOUR){
  391. rst = parseFloat(rst + parseFloat(glj[quantityType] * ration[quantityType]).toDecimal(decimalObj.glj.quantity)).toDecimal(decimalObj.glj.quantity);
  392. }
  393. }
  394. }
  395. }
  396. return rst;
  397. };
  398. }
  399. //增加清单基数分类估价项目、去除分类税前工程造价
  400. if(typeof $ !== 'undefined' && $('#cbClassList')){
  401. $('#cbClassList').find('li:eq(8)').remove();
  402. let $li = $('<li class="py-1"><a id="cb_GJXM" href="javascript:void(0);">估价项目</a></li>');
  403. $li.insertAfter($('#cbClassList').find('li:eq(4)'));
  404. }
  405. if (typeof calcBaseView !== 'undefined') {
  406. calcBaseView.billsCBClass = {ALL: [], FBFX: [], CSXM: [], QTXM: [], FBF: [], RCJ: [], GF: [], SJ: [], GJXM: []};
  407. }
  408. // (江西)项目属性-关于计算中的取费方式默认勾选子目单价取费(反算)方式。
  409. // 根据重写去给项目的billsCalcMode赋值比这种形式麻烦
  410. if (typeof leafBillGetFeeType !== 'undefined') {
  411. leafBillGetFeeType = {
  412. rationPriceConverse: 0,
  413. rationContent: 1,
  414. rationPrice: 2,
  415. billsPrice: 3
  416. };
  417. }