|
@@ -0,0 +1,455 @@
|
|
|
+/**
|
|
|
+ * Created by CSL on 2018/11/12. 江西计算程序、基数 等覆盖。
|
|
|
+ */
|
|
|
+
|
|
|
+let isJX2017 = true;
|
|
|
+
|
|
|
+// 一般计税取不含税市场价、不含税定额价。简易计税取含税市场价、含税定额价。打开项目时,4个价格根据计税类型只载入其二,所以这里可不作区分。
|
|
|
+function overwriteRationCalcBases (taxType){
|
|
|
+ if (typeof rationCalcBases == 'undefined') return;
|
|
|
+ for (let key in rationCalcBases) delete rationCalcBases[key];
|
|
|
+ // let isJY = taxType == '2';
|
|
|
+
|
|
|
+ rationCalcBases['人工费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['定额人工费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptBasePrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['材料费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['机械费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['定额机械费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptBasePrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['主材费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['设备费'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['人工费价差'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptDiffPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['材料费价差'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptDiffPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['机械费价差'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptDiffPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['主材费价差'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptDiffPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['设备费价差'] = function (node, isTender) {
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptDiffPrice, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['人工工日'] = function (node, isTender) {
|
|
|
+ return calcTools.labourDays(node, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲供人工费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲供人工费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲供材料费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲供材料费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲供机械费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲供机械费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲供主材费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲供主材费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲供设备费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲供设备费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲定人工费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲定人工费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲定材料费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲定材料费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲定机械费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲定机械费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲定主材费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲定主材费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['甲定设备费'] = function (node, isTender) {
|
|
|
+ return calcTools.partASupplyFee(node, '甲定设备费', isTender, false);
|
|
|
+ };
|
|
|
+ rationCalcBases['暂估材料费'] = function (node, isTender) {
|
|
|
+ return calcTools.estimateFee(node, true, isTender);
|
|
|
+ };
|
|
|
+ rationCalcBases['分包人工费'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+ rationCalcBases['分包材料费'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+ rationCalcBases['分包机械费'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+ rationCalcBases['分包主材费'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.MAIN_MATERIAL], priceTypes.ptMarketPrice, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+ rationCalcBases['分包设备费'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+ rationCalcBases['分包人工工日'] = function (node, isTender) {
|
|
|
+ if (node.data.isSubcontract)
|
|
|
+ return calcTools.labourDays(node, isTender)
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+(function overwriteFeeTypes() {
|
|
|
+ if (typeof cpFeeTypes == 'undefined') return;
|
|
|
+ cpFeeTypes = [
|
|
|
+ {type: 'direct', name: '直接费'},
|
|
|
+ {type: 'labour', name: '人工费'},
|
|
|
+ {type: 'marketLabour', name: '市场价人工费'},
|
|
|
+ {type: 'marketMaterial', name: '市场价材料费'},
|
|
|
+ {type: 'machine', name: '机械费'},
|
|
|
+ {type: 'marketMachine', name: '市场价机械费'},
|
|
|
+ {type: 'mainMaterial', name: '主材费'},
|
|
|
+ {type: 'equipment', name: '设备费'},
|
|
|
+ {type: 'manage', name: '企业管理费'},
|
|
|
+ {type: 'surtax', name: '附加税费'},
|
|
|
+ {type: 'profit', name: '利润'},
|
|
|
+ {type: 'safeMeasures', name: '安全文明施工措施费'},
|
|
|
+ {type: 'environment', name: '安全文明环保费'},
|
|
|
+ {type: 'tempFacility', name: '临时设施费'},
|
|
|
+ {type: 'otherTotalMeasures', name: '其他总价措施费'},
|
|
|
+ {type: 'dirtMeasures', name: '扬尘治理措施费'},
|
|
|
+ {type: 'forceFee', name: '规费'},
|
|
|
+ {type: 'tax', name: '税金'},
|
|
|
+ {type: 'common', name: '工程造价'}
|
|
|
+ ];
|
|
|
+})();
|
|
|
+
|
|
|
+
|
|
|
+//清单计算基数相关
|
|
|
+if(typeof baseFigureMap !== 'undefined'){
|
|
|
+ baseFigureMap = {
|
|
|
+ //与清单直接关联=======
|
|
|
+ '分部分项工程费': {base: 'FBFXGCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项直接费': {base: 'FBFXZJF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项定额人工费': {base: 'FBFXDEJJRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项人工费': {base: 'FBFXRGF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项材料费': {base: 'FBFXCLF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项定额机械费': {base: 'FBFXDEJJJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项机械费': {base: 'FBFXJXF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项主材费': {base: 'FBFXZCF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项设备费': {base: 'FBFXSBF', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '分部分项人工工日': {base: 'FBFXRGGR', fixedFlag: fixedFlag.SUB_ENGINERRING, class: 'FBFX'},
|
|
|
+ '措施项目费': {base: 'CSXMF', fixedFlag: fixedFlag.MEASURE, class: 'CSXM'},
|
|
|
+ '组织措施项目费': {base: 'ZZCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
|
|
|
+ '组织措施项目人工费': {base: 'ZZCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
|
|
|
+ '组织措施项目材料费': {base: 'ZZCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
|
|
|
+ '组织措施项目机械费': {base: 'ZZCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_ORGANIZATION, class: 'CSXM'},
|
|
|
+ '技术措施项目费': {base: 'JSCSXMF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目定额人工费': {base: 'JSCSXMDEJJRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目人工费': {base: 'JSCSXMRGF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目材料费': {base: 'JSCSXMCLF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目定额机械费': {base: 'JSCSXMDEJJJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目机械费': {base: 'JSCSXMJXF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目主材费': {base: 'JSCSXMZCF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目设备费': {base: 'JSCSXMSBF', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '技术措施项目人工工日': {base: 'JSCSXMRGGR', fixedFlag: fixedFlag.CONSTRUCTION_TECH, class: 'CSXM'},
|
|
|
+ '其他项目费': {base: 'QTXMF', fixedFlag: fixedFlag.OTHER, class: 'QTXM'},
|
|
|
+ '规费': {base: 'GF', fixedFlag: fixedFlag.CHARGE, class: 'GF'},
|
|
|
+ '税金': {base: 'SJ', fixedFlag: fixedFlag.TAX, class: 'SJ'},
|
|
|
+ //不于清单直接关联==========
|
|
|
+ '建筑面积': {base: 'JZMJ', class: 'FBFX'},
|
|
|
+ '人材机价差': {base: 'RCJJC', class: 'RCJ'},
|
|
|
+ '人工价差': {base: 'RGJC', class: 'RCJ'},
|
|
|
+ '材料价差': {base: 'CLJC', class: 'RCJ'},
|
|
|
+ '机械价差': {base: 'JXJC', class: 'RCJ'},
|
|
|
+ '甲供人工费': {base: 'JGRGF', class: 'RCJ'},
|
|
|
+ '甲供材料费': {base: 'JGCLF', class: 'RCJ'},
|
|
|
+ '甲供机械费': {base: 'JGJXF', class: 'RCJ'},
|
|
|
+ '甲供主材费': {base: 'JGZCF', class: 'RCJ'},
|
|
|
+ '甲供设备费': {base: 'JGSBF', class: 'RCJ'},
|
|
|
+ '甲定人工费': {base: 'JDRGF', class: 'RCJ'},
|
|
|
+ '甲定材料费': {base: 'JDCLF', class: 'RCJ'},
|
|
|
+ '甲定机械费': {base: 'JDJXF', class: 'RCJ'},
|
|
|
+ '甲定主材费': {base: 'JDZCF', class: 'RCJ'},
|
|
|
+ '甲定设备费': {base: 'JDSBF', class: 'RCJ'},
|
|
|
+ '暂估材料费(从子目汇总)': {base: 'ZGCLFFZM', class: 'RCJ'},
|
|
|
+ '分包费': {base: 'FBF', class: 'FBF'},
|
|
|
+ '分包人工费': {base: 'FBRGF', class: 'FBF'},
|
|
|
+ '分包材料费': {base: 'FBCLF', class: 'FBF'},
|
|
|
+ '分包机械费': {base: 'FBJXF', class: 'FBF'},
|
|
|
+ '分包主材费': {base: 'FBZCF', class: 'FBF'},
|
|
|
+ '分包设备费': {base: 'FBSBF', class: 'FBF'},
|
|
|
+ '分包人工工日': {base: 'FBRGGR', class: 'FBF'},
|
|
|
+ '估价项目定额人工费': {base: 'GJXMDERGF', class: 'GJXM'},
|
|
|
+ '估价项目定额机械费': {base: 'GJXMDEJXF', class: 'GJXM'},
|
|
|
+ '估价项目直接费': {base: 'GJXMZJF', class: 'GJXM'},
|
|
|
+ '估价项目人工费': {base: 'GJXMRGF', class: 'GJXM'},
|
|
|
+ '估价项目材料费': {base: 'GJXMCLF', class: 'GJXM'},
|
|
|
+ '估价项目机械费': {base: 'GJXMJXF', class: 'GJXM'},
|
|
|
+ '估价项目主材费': {base: 'GJXMZCF', class: 'GJXM'},
|
|
|
+ '估价项目工日': {base: 'GJXMGR', class: 'GJXM'},
|
|
|
+ };
|
|
|
+}
|
|
|
+if(typeof baseFigureTemplate !== 'undefined'){
|
|
|
+ baseFigureTemplate['FBFXZJF'] = function (tender) {//分部分项直接费
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.direct) && cbTools.isDef(bill.feesIndex.direct[totalFeeType]) ? bill.feesIndex.direct[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBFXRGF'] = function (tender) {//分部分项人工费(市场人工费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBFXCLF'] = function (tender) {//分部分项材料费(市场材料费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBFXJXF'] = function (tender) {//分部分项机械费(市场机械费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.SUB_ENGINERRING])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.SUB_ENGINERRING]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['ZZCSXMRGF'] = function (tender) {//组织措施项目人工费(市场人工费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['ZZCSXMCLF'] = function (tender) {//组织措施项目材料费(市场材料费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['ZZCSXMJXF'] = function (tender) {//组织措施项目机械费(市场机械费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_ORGANIZATION]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['JSCSXMRGF'] = function (tender) {//技术措施项目人工费(市场人工费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketLabour) && cbTools.isDef(bill.feesIndex.marketLabour[totalFeeType]) ? bill.feesIndex.marketLabour[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['JSCSXMCLF'] = function (tender) {//技术措施项目材料费(市场材料费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMaterial) && cbTools.isDef(bill.feesIndex.marketMaterial[totalFeeType]) ? bill.feesIndex.marketMaterial[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['JSCSXMJXF'] = function (tender) {//技术措施项目机械费(市场机械费)
|
|
|
+ if(cbTools.isUnDef(calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH])){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let bill = calcBase.fixedBills[fixedFlag.CONSTRUCTION_TECH]['bill'];
|
|
|
+ if(cbTools.isUnDef(bill)) return 0;
|
|
|
+ if(cbTools.isUnDef(bill.feesIndex) || Object.keys(bill.feesIndex).length === 0) return 0;
|
|
|
+ return cbTools.isDef(bill.feesIndex.marketMachine) && cbTools.isDef(bill.feesIndex.marketMachine[totalFeeType]) ? bill.feesIndex.marketMachine[totalFeeType] : 0;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBRGF'] = function (tender) {//分包人工费(市场人工费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketLabour){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBCLF'] = function (tender) {//分包材料费(市场材料费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMaterial){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['FBJXF'] = function (tender) {//分包机械费(市场机械费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.isSubcontract && ration.feesIndex && ration.feesIndex.marketMachine){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMDERGF'] = function (tender) {//估计项目定额人工费
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.labour){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.labour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMDEJXF'] = function (tender) {//估计项目定额机械费
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.machine){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.machine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMZJF'] = function (tender) {//估计项目直接费
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.direct){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.direct[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMRGF'] = function (tender) {//估计项目人工费(市场人工费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketLabour){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketLabour[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMCLF'] = function (tender) {//估计项目材料费(市场材料费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMaterial){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMJXF'] = function (tender) {//估计项目机械费(市场机械费)
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.marketMachine){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.marketMachine[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMZCF'] = function (tender) {//估计项目主材费
|
|
|
+ const totalFeeType = tender ? 'tenderTotalFee' : 'totalFee';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ for(let ration of rations){
|
|
|
+ if(ration.evaluationProject && ration.feesIndex && ration.feesIndex.mainMaterial){
|
|
|
+ rst = parseFloat(rst + ration.feesIndex.mainMaterial[totalFeeType]).toDecimal(decimalObj.ration.totalPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+ baseFigureTemplate['GJXMGR'] = function (tender) {//估计项目工日
|
|
|
+ const quantityType = tender ? 'tenderQuantity' : 'quantity';
|
|
|
+ let rst = 0;
|
|
|
+ let rations = calcBase.project.Ration.datas;
|
|
|
+ let rationGljs = calcBase.project.ration_glj.datas;
|
|
|
+ for (let ration of rations) {
|
|
|
+ if (ration.evaluationProject && ration.type === rationType.ration) {
|
|
|
+ for(let glj of rationGljs){
|
|
|
+ if(ration.ID === glj.rationID && glj.type === gljType.LABOUR){
|
|
|
+ rst = parseFloat(rst + parseFloat(glj[quantityType] * ration[quantityType]).toDecimal(decimalObj.glj.quantity)).toDecimal(decimalObj.glj.quantity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ };
|
|
|
+}
|
|
|
+//增加清单基数分类估价项目、去除分类税前工程造价
|
|
|
+if(typeof $ !== 'undefined' && $('#cbClassList')){
|
|
|
+ $('#cbClassList').find('li:eq(8)').remove();
|
|
|
+ let $li = $('<li class="p-1"><a id="cb_GJXM" href="javascript:void(0);">估价项目</a></li>');
|
|
|
+ $li.insertAfter($('#cbClassList').find('li:eq(4)'));
|
|
|
+}
|
|
|
+if (typeof calcBaseView !== 'undefined') {
|
|
|
+ calcBaseView.billsCBClass = {ALL: [], FBFX: [], CSXM: [], QTXM: [], FBF: [], RCJ: [], GF: [], SJ: [], GJXM: []};
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|