|
|
@@ -428,6 +428,45 @@ let gljUtil = {
|
|
|
return scMathUtil.roundToString(quantity * glj.quantity, gd);
|
|
|
}
|
|
|
},
|
|
|
+ getMaterialCalcRationFee:function (ration,ration_gljs,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,_,scMathUtil) {
|
|
|
+ let pMap =_.indexBy(projectGLJDatas.gljList, 'id');
|
|
|
+ let process_decimal = decimalObj.process;
|
|
|
+ let ration_quantity_decimal = decimalObj.ration.quantity;
|
|
|
+ let glj_quantity_decimal = decimalObj.glj.quantity;
|
|
|
+ let glj_unitPrice_decimal = decimalObj.glj.unitPrice;
|
|
|
+ let assFeeRate = scMathUtil.roundForObj(projectGLJDatas.constData.assistProductionFeeRate,decimalObj.feeRate) * 0.01;//辅助生产间接费费率
|
|
|
+ let rationLaberFee = 0; //定额人工费(市场价)
|
|
|
+ let rationMachineFee = 0; //定额施工机械使用费(市场价)
|
|
|
+ let rationLaberFee_b = 0; //定额人工费(定额价)
|
|
|
+ let rationMachineFee_b = 0; //定额施工机械使用费(定额价)
|
|
|
+ let directFee = 0;//直接费
|
|
|
+ let rationQuantity = scMathUtil.roundForObj(ration.quantity,ration_quantity_decimal);
|
|
|
+ for(let g of ration_gljs){
|
|
|
+ let result = gljUtil.getGLJPrice(pMap[g.projectGLJID],projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,false,_,scMathUtil);
|
|
|
+ g.marketPrice = result.marketPrice;
|
|
|
+ g.basePrice = result.basePrice;
|
|
|
+ let quantity = scMathUtil.roundForObj(g.quantity,glj_quantity_decimal);
|
|
|
+ let t = scMathUtil.roundForObj(quantity * g.marketPrice * rationQuantity,process_decimal);//市场价
|
|
|
+ let rt = scMathUtil.roundForObj(quantity * g.basePrice * rationQuantity,process_decimal);//定额价
|
|
|
+ if(g.type == gljUtil.gljType.LABOUR){
|
|
|
+ rationLaberFee = scMathUtil.roundForObj(rationLaberFee+t,process_decimal);
|
|
|
+ rationLaberFee_b = scMathUtil.roundForObj(rationLaberFee_b+rt,process_decimal);
|
|
|
+ }else if(gljUtil.getMainType(g.type) == 3){
|
|
|
+ rationMachineFee = scMathUtil.roundForObj(rationMachineFee+t,process_decimal);
|
|
|
+ rationMachineFee_b = scMathUtil.roundForObj(rationMachineFee_b+rt,process_decimal);
|
|
|
+ }
|
|
|
+ directFee = scMathUtil.roundForObj(directFee + t,process_decimal);
|
|
|
+ }
|
|
|
+ ration.assistProductionFee = scMathUtil.roundForObj(rationLaberFee_b * assFeeRate,glj_unitPrice_decimal);//辅助生产间接费
|
|
|
+ ration.rationLaberFee = scMathUtil.roundForObj(rationLaberFee,glj_unitPrice_decimal);//定额人工费(市场价)
|
|
|
+ ration.rationMachineFee = scMathUtil.roundForObj(rationMachineFee,glj_unitPrice_decimal);//定额施工机械使用费(市场价)
|
|
|
+ ration.directFee = scMathUtil.roundForObj(directFee,glj_unitPrice_decimal);//直接费
|
|
|
+ //to do 高原取费类别的情况待确认
|
|
|
+ //let hs = scMathUtil.roundForObj(tt*hightFeeRate,process_decimal);//(人工定额消耗量*定额价*定额工程量+机械定额消耗量*定额价*定额工程量)*高原取费类别费率
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
fixedFlag : {
|
|
|
// 分部分项工程
|
|
|
SUB_ENGINERRING: 1,
|