|  | @@ -6,6 +6,7 @@
 | 
	
		
			
				|  |  |   * @version
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /*
 | 
	
		
			
				|  |  |  * 广东建设工程政府投资项目造价数据标准3.0
 | 
	
		
			
				|  |  |  * */
 | 
	
	
		
			
				|  | @@ -93,61 +94,6 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          '修复': '23',
 | 
	
		
			
				|  |  |          '其他': '99',
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | -    /*     // 需要用固定类别关联的费用字典,用固定类别来映射
 | 
	
		
			
				|  |  | -        // 数据节选自标准pdf文件《《建设工程政府投资项目造价数据标准》信息公开版》,附录C-费用名称与费用代号
 | 
	
		
			
				|  |  | -        // 若映射表中没有映射关系,则费用字典取名称首字母
 | 
	
		
			
				|  |  | -        const FlagFeeCodeMap = {
 | 
	
		
			
				|  |  | -            // 分部分项工程
 | 
	
		
			
				|  |  | -            [fixedFlag.SUB_ENGINERRING]: 'QDF',
 | 
	
		
			
				|  |  | -            // 措施项目
 | 
	
		
			
				|  |  | -            [fixedFlag.MEASURE]: 'CSF',
 | 
	
		
			
				|  |  | -            // 其他项目
 | 
	
		
			
				|  |  | -            [fixedFlag.OTHER]: 'QTF',
 | 
	
		
			
				|  |  | -            // 措施项目的子项
 | 
	
		
			
				|  |  | -            [fixedFlag.GREEN_MEASURE_FEE]: 'AQWMSGF', // 绿色施工安全防护措施费
 | 
	
		
			
				|  |  | -            [fixedFlag.OTHER_MEASURE_FEE]: 'QTCSF', // 其他措施费
 | 
	
		
			
				|  |  | -            // 其他项目的子项
 | 
	
		
			
				|  |  | -            [fixedFlag.PROVISIONAL]: 'ZLF', // 暂列金额
 | 
	
		
			
				|  |  | -            [fixedFlag.ESTIMATE]: 'ZGJ', // 暂估价
 | 
	
		
			
				|  |  | -            [fixedFlag.MATERIAL_PROVISIONAL]: 'ZGC', // 材料(工程设备)暂估价
 | 
	
		
			
				|  |  | -            [fixedFlag.ENGINEERING_ESITIMATE]: 'ZGGC', // 专业工程暂估价
 | 
	
		
			
				|  |  | -            [fixedFlag.DAYWORK]: 'LXF', // 计日工
 | 
	
		
			
				|  |  | -            [fixedFlag.TURN_KEY_CONTRACT]: 'ZCBFWF', // 总承包服务费
 | 
	
		
			
				|  |  | -            [fixedFlag.BUDGET_INCLUDE_WORK_FEE]: 'YSBGF', // 预算包干费
 | 
	
		
			
				|  |  | -            [fixedFlag.PROJECT_HIGH_QUALITY_FEE]: 'GCYZF', // 工程优质费
 | 
	
		
			
				|  |  | -            [fixedFlag.BUDGET_ESTIMATE_DIFF]: 'GSFDC', // 概算幅度差
 | 
	
		
			
				|  |  | -            [fixedFlag.CLAIM]: 'SPFY', // 索赔费用
 | 
	
		
			
				|  |  | -            [fixedFlag.VISA]: 'XCQZFY', // 现场签证
 | 
	
		
			
				|  |  | -            [fixedFlag.OTHER_FEE]: 'QTFY', // 其他费用
 | 
	
		
			
				|  |  | -            // 税金
 | 
	
		
			
				|  |  | -            [fixedFlag.TAX]: 'SJ',
 | 
	
		
			
				|  |  | -            // 工程造价
 | 
	
		
			
				|  |  | -            [fixedFlag.ENGINEERINGCOST]: 'ZZJ',
 | 
	
		
			
				|  |  | -        }; */
 | 
	
		
			
				|  |  | -    // 需要用计算基数关联的费用字典
 | 
	
		
			
				|  |  | -    /*     const FormulaFeeCodeMap = {
 | 
	
		
			
				|  |  | -            '{分部分项工程费}': 'QDF',
 | 
	
		
			
				|  |  | -            '{分部分项人工费}': 'QRG',
 | 
	
		
			
				|  |  | -            '{分部分项材料费}': 'QCL',
 | 
	
		
			
				|  |  | -            '{分部分项施工机具费}': 'QJX',
 | 
	
		
			
				|  |  | -            '{分部分项主材费}': 'QZCF',
 | 
	
		
			
				|  |  | -            '{分部分项设备费}': 'QSBF',
 | 
	
		
			
				|  |  | -            '{分部分项人工工日}': 'FBFXRGGR', // 标准没有,自增
 | 
	
		
			
				|  |  | -            '{建筑面积}': 'JZMZ', // 自增
 | 
	
		
			
				|  |  | -            '{措施项目费}': 'CSF',
 | 
	
		
			
				|  |  | -            '{其他项目费}': 'QTF',
 | 
	
		
			
				|  |  | -            '{甲供人工费}': 'JGRGF', // 自增
 | 
	
		
			
				|  |  | -            '{甲供材料费}': 'JGC',
 | 
	
		
			
				|  |  | -            '{甲供施工机具费}': 'JGSGJJF', // 自增
 | 
	
		
			
				|  |  | -            '{甲定人工费}': 'JDRGF', // 自增
 | 
	
		
			
				|  |  | -            '{甲定材料费}': 'JDCLF', // 自增
 | 
	
		
			
				|  |  | -            '{甲定施工机具费}': 'JDSGJJF', // 自增
 | 
	
		
			
				|  |  | -            '{甲定主材费}': 'JDZCF', // 自增
 | 
	
		
			
				|  |  | -            '{甲定设备费}': 'JDSBF', // 自增
 | 
	
		
			
				|  |  | -            '{暂估材料费(从子目汇总)}': 'ZGCLFCZMHZ', // 自增
 | 
	
		
			
				|  |  | -            '{税金}': 'SJ',
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | -        }; */
 | 
	
		
			
				|  |  |      // 费用字典占用列表,普通清单根据首字母获取费用字典时,与下列占用费用字典重复时,需要加上_序号后缀
 | 
	
		
			
				|  |  |      const feeCodeList = [
 | 
	
		
			
				|  |  |          'QDF', 'QRG', 'QCL', 'QJX', 'ZCSB', 'QZCF', 'QSBF', 'QGL', 'QLR', 'QZGJ', 'CSF', 'AQWMSGF', 'AXSJSCSXMF',
 | 
	
	
		
			
				|  | @@ -171,7 +117,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      // 计算程序名称-费用代号映射
 | 
	
		
			
				|  |  |      const CalculationCodeMap = {
 | 
	
		
			
				|  |  | -        '直接费': 'DEZJF',
 | 
	
		
			
				|  |  | +        '直接费': 'ZJF',
 | 
	
		
			
				|  |  |          '人工费': 'RGF',
 | 
	
		
			
				|  |  |          '材料费': 'CLF',
 | 
	
		
			
				|  |  |          '施工机具费': 'JXF',
 | 
	
	
		
			
				|  | @@ -265,33 +211,66 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 项目汇总字段
 | 
	
		
			
				|  |  |      const summaryObj = {
 | 
	
		
			
				|  |  | -        // 取固定清单的综合合价进行汇总
 | 
	
		
			
				|  |  | -        feeFields: [
 | 
	
		
			
				|  |  | -            { k: fixedFlag.ENGINEERINGCOST, v: 'engineeringCost' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.SUB_ENGINERRING, v: 'subEngineering' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.MEASURE, v: 'measure' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.GREEN_MEASURE_FEE, v: 'greenMeasureFee' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.OTHER_MEASURE_FEE, v: 'otherPreliminaries' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.OTHER, v: 'other' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.PROVISIONAL, v: 'provisional' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.MATERIAL_PROVISIONAL, v: 'materialProvisional' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.ENGINEERING_ESITIMATE, v: 'engineeringEstimate' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.DAYWORK, v: 'daywork' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.TURN_KEY_CONTRACT, v: 'turnKeyContract' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.CLAIM, v: 'claim' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.VISA, v: 'visa' },
 | 
	
		
			
				|  |  | -            { k: fixedFlag.TAX, v: 'tax' }
 | 
	
		
			
				|  |  | -        ],
 | 
	
		
			
				|  |  | -        // 取工程造价的一些费用进行汇总,k为汇总到summaryInfo的字段,v为取的工程造价费用字段
 | 
	
		
			
				|  |  | -        engineeringCostFields: [
 | 
	
		
			
				|  |  | -            { k: 'labour', v: 'labour' },
 | 
	
		
			
				|  |  | -            { k: 'material', v: 'material' },
 | 
	
		
			
				|  |  | -            { k: 'equipment', v: 'equipment' },
 | 
	
		
			
				|  |  | -            { k: 'mainMaterial', v: 'mainMaterial' },
 | 
	
		
			
				|  |  | -            { k: 'machine', v: 'machine' },
 | 
	
		
			
				|  |  | -            { k: 'overhead', v: 'manage' },
 | 
	
		
			
				|  |  | -            { k: 'profit', v: 'profit' },
 | 
	
		
			
				|  |  | -        ]
 | 
	
		
			
				|  |  | +        [fixedFlag.SUB_ENGINERRING]: {
 | 
	
		
			
				|  |  | +            items: [
 | 
	
		
			
				|  |  | +                { name: 'subEngineering', feeName: 'common' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringLabour', feeName: 'labour' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringMaterial', feeName: 'material' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringEquipment', feeName: 'equipment' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringMainMaterial', feeName: 'mainMaterial' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringMachine', feeName: 'machine' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringManage', feeName: 'manage' },
 | 
	
		
			
				|  |  | +                { name: 'subEngineeringProfit', feeName: 'profit' }
 | 
	
		
			
				|  |  | +            ]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.MEASURE]: {
 | 
	
		
			
				|  |  | +            items: [
 | 
	
		
			
				|  |  | +                { name: 'measure', feeName: 'common' },
 | 
	
		
			
				|  |  | +                { name: 'measureLabour', feeName: 'labour' },
 | 
	
		
			
				|  |  | +                { name: 'measureMaterial', feeName: 'material' },
 | 
	
		
			
				|  |  | +                { name: 'measureEquipment', feeName: 'equipment' },
 | 
	
		
			
				|  |  | +                { name: 'measureMainMaterial', feeName: 'mainMaterial' },
 | 
	
		
			
				|  |  | +                { name: 'measureMachine', feeName: 'machine' },
 | 
	
		
			
				|  |  | +                { name: 'measureManage', feeName: 'manage' },
 | 
	
		
			
				|  |  | +                { name: 'measureProfit', feeName: 'profit' }
 | 
	
		
			
				|  |  | +            ]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.GREEN_MEASURE_FEE]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'greenMeasureFee', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.OTHER_MEASURE_FEE]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'otherPreliminaries', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.OTHER]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'other', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.PROVISIONAL]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'provisional', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.MATERIAL_PROVISIONAL]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'materialProvisional', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.ENGINEERING_ESITIMATE]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'engineeringEstimate', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.DAYWORK]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'daywork', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.TURN_KEY_CONTRACT]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'turnKeyContract', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.CLAIM]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'claim', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.VISA]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'visa', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.TAX]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'tax', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        [fixedFlag.ENGINEERINGCOST]: {
 | 
	
		
			
				|  |  | +            items: [{ name: 'engineeringCost', feeName: 'common' }]
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 获取工程类型:枚举单位工程的工程专业+费用标准,用“;”分隔
 | 
	
	
		
			
				|  | @@ -605,7 +584,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                          : _util.getValueByKey(basicInformation, 'tenderCompileDate')
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 编制单位法定代表人或其授权人
 | 
	
		
			
				|  |  | -                { name: 'Authorizer', mustHasValue: true, value: _util.getValueByKey(basicInformation, 'authorizer') },
 | 
	
		
			
				|  |  | +                { name: 'Authorizer', mustHasValue: true, value: _util.getValueByKey(basicInformation, 'constructingUnitsPerson') },
 | 
	
		
			
				|  |  |                  // 工程总价(元)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Total', dName: '工程总价', type: _type.DECIMAL, required: true,
 | 
	
	
		
			
				|  | @@ -869,6 +848,15 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          // 费用汇总
 | 
	
		
			
				|  |  |          function SummaryOfCost(summaryInfo) {
 | 
	
		
			
				|  |  | +            // 人工费、材料费、机械费...: 取“分部分项工程”行+“措施项目”行对应的费用值
 | 
	
		
			
				|  |  | +            const totalLabour = scMathUtil.roundForObj(+summaryInfo.subEngineeringLabour + (+summaryInfo.measureLabour), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalMaterial = scMathUtil.roundForObj(+summaryInfo.subEngineeringMaterial + (+summaryInfo.measureMaterial), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalMachine = scMathUtil.roundForObj(+summaryInfo.subEngineeringMachine + (+summaryInfo.measureMachine), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalEquipment = scMathUtil.roundForObj(+summaryInfo.subEngineeringEquipment + (+summaryInfo.measureEquipment), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalMainMaterial = scMathUtil.roundForObj(+summaryInfo.subEngineeringMainMaterial + (+summaryInfo.measureMainMaterial), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalMainMaterialEquipment = scMathUtil.roundForObj(totalMainMaterial + totalEquipment, Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalManage = scMathUtil.roundForObj(+summaryInfo.subEngineeringManage + (+summaryInfo.measureManage), Decimal.FEE);
 | 
	
		
			
				|  |  | +            const totalProfit = scMathUtil.roundForObj(+summaryInfo.subEngineeringProfit + (+summaryInfo.measureProfit), Decimal.FEE);
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 工程造价(元)
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -948,42 +936,42 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 人工费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Labor', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.labour
 | 
	
		
			
				|  |  | +                    value: totalLabour
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 材料费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Material', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.material
 | 
	
		
			
				|  |  | +                    value: totalMaterial
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 设备费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Equipment', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.equipment
 | 
	
		
			
				|  |  | +                    value: totalEquipment
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 主材设备费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'MainMaterialEquipment', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: scMathUtil.roundForObj(summaryInfo.mainMaterial + summaryInfo.equipment, Decimal.FEE)
 | 
	
		
			
				|  |  | +                    value: totalMainMaterialEquipment
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 主材费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'MainMaterial', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.mainMaterial
 | 
	
		
			
				|  |  | +                    value: totalMainMaterial
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 机械费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Machine', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.machine
 | 
	
		
			
				|  |  | +                    value: totalMachine
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 管理费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Overhead', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.overhead
 | 
	
		
			
				|  |  | +                    value: totalManage
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 利润
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Profit', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: summaryInfo.profit
 | 
	
		
			
				|  |  | +                    value: totalProfit
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |              ];
 | 
	
		
			
				|  |  |              _base.Element.call(this, 'SummaryOfCost', attrs, '费用汇总');
 | 
	
	
		
			
				|  | @@ -1082,10 +1070,10 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                      value: tenderData.name
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 标段 取建设项目名称
 | 
	
		
			
				|  |  | -                {
 | 
	
		
			
				|  |  | +                /* {
 | 
	
		
			
				|  |  |                      name: 'Segment',
 | 
	
		
			
				|  |  |                      value: projectData.name
 | 
	
		
			
				|  |  | -                },
 | 
	
		
			
				|  |  | +                }, */
 | 
	
		
			
				|  |  |                  // 工程类别
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'ProjectCategory', dName: '工程类别', required: true,
 | 
	
	
		
			
				|  | @@ -1094,7 +1082,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 工程类型
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'ProjectType', dName: '工程类型', required: true,
 | 
	
		
			
				|  |  | -                    value: getProjectType(tenderData, false)
 | 
	
		
			
				|  |  | +                    value: _util.getValueByKey(projectFeature, 'projType')
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 计价模式
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -1136,10 +1124,10 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                      name: 'Scale', dName: '建设规模', type: _type.DECIMAL, required: true,
 | 
	
		
			
				|  |  |                      value: _util.getValueByKey(projectFeature, 'buildScale')
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  | -                // 建设规模单位 暂取'm2'
 | 
	
		
			
				|  |  | +                // 建设规模单位 取单位工程-工程特征-建设规模单位
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Unit', dName: '建设规模单位', required: true,
 | 
	
		
			
				|  |  | -                    value: 'm2'
 | 
	
		
			
				|  |  | +                    value: _util.getValueByKey(projectFeature, 'buildScaleUnit')
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 占总投资比例(%)
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -1313,7 +1301,8 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              _base.Element.call(this, 'Preliminaries', []);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          // 合计费用
 | 
	
		
			
				|  |  | -        function SummaryOfBasicCost(items, bills) {
 | 
	
		
			
				|  |  | +        function SummaryOfBasicCost(items, node) {
 | 
	
		
			
				|  |  | +            const bills = node.data;
 | 
	
		
			
				|  |  |              // 省略了一些
 | 
	
		
			
				|  |  |              const mainMaterial = _util.getFee(bills.fees, 'mainMaterial.totalFee');
 | 
	
		
			
				|  |  |              const equipment = _util.getFee(bills.fees, 'equipment.totalFee');
 | 
	
	
		
			
				|  | @@ -1342,7 +1331,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 暂估价
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Appraisal', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.ESTIMATE, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: _util.getFee(bills.fees, 'estimate.totalFee')
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 机械费
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -1362,27 +1351,29 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 分部分项工程费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'DivisionalAndElementalWorks', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.SUB_ENGINERRING, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    // TODO value的处理速度可能需要优化
 | 
	
		
			
				|  |  | +                    value: node.isBelongToFlags([fixedFlag.SUB_ENGINERRING]) ? _util.getFeeByFlag(items, fixedFlag.SUB_ENGINERRING, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 措施项目费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Preliminaries', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.MEASURE, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: node.isBelongToFlags([fixedFlag.MEASURE]) ? _util.getFeeByFlag(items, fixedFlag.MEASURE, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 绿色施工安全防护措施费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'CostForHSE', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.GREEN_MEASURE_FEE, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: node.isBelongToFlags([fixedFlag.GREEN_MEASURE_FEE]) ? _util.getFeeByFlag(items, fixedFlag.GREEN_MEASURE_FEE, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 其他项目费
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'SundryCosts', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.OTHER_MEASURE_FEE, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: node.isBelongToFlags([fixedFlag.OTEHER]) ? _util.getFeeByFlag(items, fixedFlag.OTEHER, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 暂列金额
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'ProvisionalSums', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.PROVISIONAL, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: '0'
 | 
	
		
			
				|  |  | +                    //value: node.isBelongToFlags([fixedFlag.fixedFlag.PROVISIONAL]) ? _util.getFeeByFlag(items, fixedFlag.PROVISIONAL, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |                  // 规费
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -1392,7 +1383,8 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 税金
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      name: 'Tax', type: _type.DECIMAL,
 | 
	
		
			
				|  |  | -                    value: _util.getFeeByFlag(items, fixedFlag.TAX, 'common.totalFee')
 | 
	
		
			
				|  |  | +                    value: '0'
 | 
	
		
			
				|  |  | +                    //value: node.isBelongToFlags([fixedFlag.fixedFlag.TAX]) ? _util.getFeeByFlag(items, fixedFlag.TAX, 'common.totalFee') : '0'
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  |              ];
 | 
	
		
			
				|  |  |              _base.Element.call(this, 'SummaryOfBasicCost', attrs);
 | 
	
	
		
			
				|  | @@ -1493,7 +1485,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          function ExpressElement(quantityDetail) {
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 序号
 | 
	
		
			
				|  |  | -                { name: 'OrderNumber', dName: '序号', required: true, value: quantityDetail.seq },
 | 
	
		
			
				|  |  | +                { name: 'OrderNumber', dName: '序号', required: true, value: quantityDetail.seq + 1 }, // 软件中是从0开始,导出需要从1开始
 | 
	
		
			
				|  |  |                  // 工程量计算式
 | 
	
		
			
				|  |  |                  { name: 'Express', dName: '工程量计算式', required: true, value: quantityDetail.regex },
 | 
	
		
			
				|  |  |                  // 工程量
 | 
	
	
		
			
				|  | @@ -1583,14 +1575,14 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              _base.Element.call(this, 'ManageFees', attrs, '子目管理费');
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          // 工料机含量明细
 | 
	
		
			
				|  |  | -        function LabourMaterialsEquipmentsMachinesElement(glj, quantity) {
 | 
	
		
			
				|  |  | +        function LabourMaterialsEquipmentsMachinesElement(glj, quantity, noCost) {
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 工料机编码
 | 
	
		
			
				|  |  |                  { name: 'Number', value: glj.code },
 | 
	
		
			
				|  |  |                  // 消耗量
 | 
	
		
			
				|  |  |                  { name: 'Quantity', type: _type.DECIMAL, value: quantity },
 | 
	
		
			
				|  |  |                  // 不计价材料
 | 
	
		
			
				|  |  | -                { name: 'NOCost', typ: _type.BOOL, value: 'false' },
 | 
	
		
			
				|  |  | +                { name: 'NOCost', typ: _type.BOOL, value: noCost },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: '' }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1607,7 +1599,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 费率
 | 
	
		
			
				|  |  |                  { name: 'Rate', type: _type.DECIMAL, value: feeRate },
 | 
	
		
			
				|  |  |                  // 金额
 | 
	
		
			
				|  |  | -                { name: 'Total', type: _type.DECIMAL, value: calcItem.totalFee },
 | 
	
		
			
				|  |  | +                { name: 'Total', type: _type.DECIMAL, value: calcItem.unitFee },
 | 
	
		
			
				|  |  |                  // 费用代号
 | 
	
		
			
				|  |  |                  { name: 'Code', value: CalculationCodeMap[calcItem.name] },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
	
		
			
				|  | @@ -1636,6 +1628,8 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          // 其他项目费标题
 | 
	
		
			
				|  |  |          function SundryCostsGroup(node) {
 | 
	
		
			
				|  |  |              const bills = node.data;
 | 
	
		
			
				|  |  | +            // 材料暂估价取不汇总,其他为汇总
 | 
	
		
			
				|  |  | +            const kind = node.getFlag() === fixedFlag.MATERIAL_PROVISIONAL ? SummrayKind.NO : SummrayKind.YES;
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 名称
 | 
	
		
			
				|  |  |                  { name: 'Name', dName: '名称', required: true, value: bills.name },
 | 
	
	
		
			
				|  | @@ -1644,7 +1638,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 费用代号
 | 
	
		
			
				|  |  |                  { name: 'Code', dName: '费用代号', required: true, value: getFeeCode(bills) },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.YES },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: kind },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1653,6 +1647,8 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          // 其他项目费明细
 | 
	
		
			
				|  |  |          function SundryCostsItem(node) {
 | 
	
		
			
				|  |  |              const bills = node.data;
 | 
	
		
			
				|  |  | +            // 材料暂估价取不汇总,其他为汇总
 | 
	
		
			
				|  |  | +            const kind = node.getFlag() === fixedFlag.MATERIAL_PROVISIONAL ? SummrayKind.NO : SummrayKind.YES;
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 名称
 | 
	
		
			
				|  |  |                  { name: 'Name', dName: '名称', required: true, value: bills.name },
 | 
	
	
		
			
				|  | @@ -1671,7 +1667,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 费用代号
 | 
	
		
			
				|  |  |                  { name: 'Code', dName: '费用代号', required: true, value: getFeeCode(bills) },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.NO },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: kind },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1711,7 +1707,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 金额
 | 
	
		
			
				|  |  |                  { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.NO },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.YES },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1734,7 +1730,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 单价 取市场价
 | 
	
		
			
				|  |  |                  { name: 'Price', type: _type.DECIMAL, value: price.marketPrice },
 | 
	
		
			
				|  |  |                  // 金额 round(总消耗量*市场价,2)
 | 
	
		
			
				|  |  | -                { name: 'Total', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.quantity * price.marketPrice, 2) },
 | 
	
		
			
				|  |  | +                { name: 'Total', type: _type.DECIMAL, value: scMathUtil.roundForObj(glj.quantity * price.marketPrice, 2) },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: glj.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1778,7 +1774,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 金额
 | 
	
		
			
				|  |  |                  { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.NO },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.YES },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1843,8 +1839,8 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 名称
 | 
	
		
			
				|  |  |                  { name: 'Name', dName: '名称', required: true, value: bills.name },
 | 
	
		
			
				|  |  | -                // 项目价值
 | 
	
		
			
				|  |  | -                { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
 | 
	
		
			
				|  |  | +                // 项目价值,计算基数对应的金额
 | 
	
		
			
				|  |  | +                { name: 'Quantity', type: _type.DECIMAL, value: bills.tenderCalcBaseValue },
 | 
	
		
			
				|  |  |                  // 服务内容
 | 
	
		
			
				|  |  |                  { name: 'Content', value: bills.serviceContent },
 | 
	
		
			
				|  |  |                  // 计算基数
 | 
	
	
		
			
				|  | @@ -1854,7 +1850,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 金额
 | 
	
		
			
				|  |  |                  { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.NO },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.YES },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1894,9 +1890,9 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 金额
 | 
	
		
			
				|  |  |                  { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
 | 
	
		
			
				|  |  |                  // 依据
 | 
	
		
			
				|  |  | -                { name: 'Reason', value: '' },
 | 
	
		
			
				|  |  | +                { name: 'Reason', value: bills.claimVisa },
 | 
	
		
			
				|  |  |                  // 汇总类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.NO },
 | 
	
		
			
				|  |  | +                { name: 'Kind', dName: '汇总类型', type: _type.INT, required: true, value: SummrayKind.YES },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: bills.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -1931,8 +1927,36 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              ];
 | 
	
		
			
				|  |  |              _base.Element.call(this, eleName, attrs, '税金');
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        // 人材机汇总条目对象
 | 
	
		
			
				|  |  | +        function getGLJSummaryItem(glj, price, infoData, coeData) {
 | 
	
		
			
				|  |  | +            return {
 | 
	
		
			
				|  |  | +                code: glj.code || '',
 | 
	
		
			
				|  |  | +                name: glj.name || '',
 | 
	
		
			
				|  |  | +                specs: glj.specs || '',
 | 
	
		
			
				|  |  | +                unit: glj.unit || '',
 | 
	
		
			
				|  |  | +                quantity: glj.quantity || '0',
 | 
	
		
			
				|  |  | +                riskCoe: infoData && infoData.riskCoe || '0',
 | 
	
		
			
				|  |  | +                standardPrice: infoData && infoData.standardPrice || '0',
 | 
	
		
			
				|  |  | +                basePrice: price.basePrice || '0',
 | 
	
		
			
				|  |  | +                marketPrice: price.marketPrice || '0',
 | 
	
		
			
				|  |  | +                varWeight: coeData && coeData.varWeight || '0',
 | 
	
		
			
				|  |  | +                FO: coeData && coeData.FO || '0',
 | 
	
		
			
				|  |  | +                FI: coeData && coeData.FI || '0',
 | 
	
		
			
				|  |  | +                kind: getGLJKind(glj.type),
 | 
	
		
			
				|  |  | +                isConcrete: [205, 206].includes(glj.type),
 | 
	
		
			
				|  |  | +                isMainMaterial: !!glj.is_main_material,
 | 
	
		
			
				|  |  | +                isProvisionalMaterial: !!glj.is_evaluate,
 | 
	
		
			
				|  |  | +                provider: Provider[glj.supply],
 | 
	
		
			
				|  |  | +                delivery: glj.delivery || '',
 | 
	
		
			
				|  |  | +                location: glj.delivery_address || '',
 | 
	
		
			
				|  |  | +                producingArea: glj.originPlace || '',
 | 
	
		
			
				|  |  | +                supplier: glj.vender || '',
 | 
	
		
			
				|  |  | +                character: glj.qualityGrace || '',
 | 
	
		
			
				|  |  | +                remark: glj.remark || ''
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          // 人材机汇总
 | 
	
		
			
				|  |  | -        function LabourMaterialsEquipmentsMachinesSummary(glj, price, infoData, coeData) {
 | 
	
		
			
				|  |  | +        function LabourMaterialsEquipmentsMachinesSummary(glj) {
 | 
	
		
			
				|  |  |              const attrs = [
 | 
	
		
			
				|  |  |                  // 编码
 | 
	
		
			
				|  |  |                  { name: 'Number', dName: '编码', required: true, value: glj.code },
 | 
	
	
		
			
				|  | @@ -1945,63 +1969,63 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 数量(总消耗量)
 | 
	
		
			
				|  |  |                  { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
 | 
	
		
			
				|  |  |                  // 风险系数 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
 | 
	
		
			
				|  |  | -                { name: 'ProviderExp', type: _type.DECIMAL, value: infoData && infoData.riskCoe || '0' },
 | 
	
		
			
				|  |  | +                { name: 'ProviderRate', type: _type.DECIMAL, value: glj.riskCoe },
 | 
	
		
			
				|  |  |                  // 基准单价 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
 | 
	
		
			
				|  |  | -                { name: 'ProviderBase', type: _type.DECIMAL, value: infoData && infoData.standardPrice || '0' },
 | 
	
		
			
				|  |  | +                { name: 'ProviderBase', type: _type.DECIMAL, value: glj.standardPrice },
 | 
	
		
			
				|  |  |                  // 除税定额价(定额价)
 | 
	
		
			
				|  |  | -                { name: 'NoTaxOrgPrice', type: _type.DECIMAL, value: price.basePrice },
 | 
	
		
			
				|  |  | +                { name: 'NoTaxOrgPrice', type: _type.DECIMAL, value: glj.basePrice },
 | 
	
		
			
				|  |  |                  // 除税编制价(市场价)
 | 
	
		
			
				|  |  | -                { name: 'NoTaxPrice', type: _type.DECIMAL, value: price.marketPrice },
 | 
	
		
			
				|  |  | +                { name: 'NoTaxPrice', type: _type.DECIMAL, value: glj.marketPrice },
 | 
	
		
			
				|  |  |                  // 含税定额价 含税与不含税是对应项目的计税方式(一般、简易)
 | 
	
		
			
				|  |  |                  // 人材机含税和不含税的数据在项目创建时就确定,并且都赋在一个属性上
 | 
	
		
			
				|  |  |                  // 因此导出都取项目中的basePriceh额marketPrice就行
 | 
	
		
			
				|  |  | -                { name: 'TaxOrgPrice', type: _type.DECIMAL, value: price.basePrice },
 | 
	
		
			
				|  |  | +                { name: 'TaxOrgPrice', type: _type.DECIMAL, value: glj.basePrice },
 | 
	
		
			
				|  |  |                  // 含税编制价 
 | 
	
		
			
				|  |  | -                { name: 'TaxPrice', type: _type.DECIMAL, value: price.marketPrice },
 | 
	
		
			
				|  |  | +                { name: 'TaxPrice', type: _type.DECIMAL, value: glj.marketPrice },
 | 
	
		
			
				|  |  |                  // 引进部分
 | 
	
		
			
				|  |  |                  { name: 'ForeignCurrency', type: _type.DECIMAL, value: '0' },
 | 
	
		
			
				|  |  |                  // 折合人民币
 | 
	
		
			
				|  |  |                  { name: 'ConvertedIntoRMB', type: _type.DECIMAL, value: '0' },
 | 
	
		
			
				|  |  |                  // 除税定额价合价 取Round(定额价*总消耗量,2)
 | 
	
		
			
				|  |  | -                { name: 'NoTaxOrgTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.basePrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  | +                { name: 'NoTaxOrgTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(glj.basePrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  |                  // 除税编制价合价(元) 取Round(不含税市场价*总消耗量,2)
 | 
	
		
			
				|  |  | -                { name: 'NoTaxTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.marketPrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  | +                { name: 'NoTaxTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(glj.marketPrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  |                  // 含税定额价合价
 | 
	
		
			
				|  |  |                  { name: 'TaxOrgTotal', type: _type.DECIMAL, value: '0' },
 | 
	
		
			
				|  |  |                  // 含税编制价合价 取Round(含税市场价*总消耗量,2) (暂时用市场价)
 | 
	
		
			
				|  |  | -                { name: 'TaxTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.marketPrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  | +                { name: 'TaxTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(glj.marketPrice * glj.quantity, 2) },
 | 
	
		
			
				|  |  |                  // 变值权重 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
 | 
	
		
			
				|  |  | -                { name: 'Weight', type: _type.DECIMAL, value: coeData && coeData.varWeight || '0' },
 | 
	
		
			
				|  |  | +                { name: 'Weight', type: _type.DECIMAL, value: glj.varWeight },
 | 
	
		
			
				|  |  |                  // 基本价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
 | 
	
		
			
				|  |  | -                { name: 'BasicPrice', type: _type.DECIMAL, value: coeData && coeData.FO || '0' },
 | 
	
		
			
				|  |  | +                { name: 'BasicPrice', type: _type.DECIMAL, value: glj.FO },
 | 
	
		
			
				|  |  |                  // 现行价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
 | 
	
		
			
				|  |  | -                { name: 'CurrentPrice', type: _type.DECIMAL, value: coeData && coeData.FI || '0' },
 | 
	
		
			
				|  |  | +                { name: 'CurrentPrice', type: _type.DECIMAL, value: glj.FI },
 | 
	
		
			
				|  |  |                  // 工料机类型
 | 
	
		
			
				|  |  | -                { name: 'Kind', type: _type.INT, value: getGLJKind(glj.type) },
 | 
	
		
			
				|  |  | +                { name: 'Kind', type: _type.INT, value: glj.kind },
 | 
	
		
			
				|  |  |                  // 工料机归属
 | 
	
		
			
				|  |  |                  { name: 'Class', value: '' },
 | 
	
		
			
				|  |  |                  // 扩展属性
 | 
	
		
			
				|  |  |                  { name: 'ExtKind', type: _type.INT, value: 1 },
 | 
	
		
			
				|  |  |                  // 商品砼 如果工料机类型是“商品混凝土”、“商品砂浆”、“商品配合比”(软件中没有),则取“true”;否则取“false”
 | 
	
		
			
				|  |  | -                { name: 'Concrete', type: _type.BOOL, value: [205, 206].includes(glj.type) },
 | 
	
		
			
				|  |  | +                { name: 'Concrete', type: _type.BOOL, value: glj.isConcrete },
 | 
	
		
			
				|  |  |                  // 主要材料
 | 
	
		
			
				|  |  | -                { name: 'MainMaterial', type: _type.BOOL, value: !!glj.is_main_material },
 | 
	
		
			
				|  |  | +                { name: 'MainMaterial', type: _type.BOOL, value: glj.isMainMaterial },
 | 
	
		
			
				|  |  |                  // 是否暂估价材料
 | 
	
		
			
				|  |  | -                { name: 'ProvisionalMaterial', type: _type.BOOL, value: !!glj.is_evaluate },
 | 
	
		
			
				|  |  | +                { name: 'ProvisionalMaterial', type: _type.BOOL, value: glj.isProvisionalMaterial },
 | 
	
		
			
				|  |  |                  // 供料方式
 | 
	
		
			
				|  |  | -                { name: 'Provider', type: _type.INT, value: Provider[glj.supply] },
 | 
	
		
			
				|  |  | +                { name: 'Provider', type: _type.INT, value: glj.provider },
 | 
	
		
			
				|  |  |                  // 价格来源
 | 
	
		
			
				|  |  |                  { name: 'PriceSource', value: '' },
 | 
	
		
			
				|  |  |                  // 交货方式
 | 
	
		
			
				|  |  |                  { name: 'Delivery', value: glj.delivery },
 | 
	
		
			
				|  |  |                  // 送达地点
 | 
	
		
			
				|  |  | -                { name: 'Location', value: glj.delivery_address },
 | 
	
		
			
				|  |  | +                { name: 'Location', value: glj.location },
 | 
	
		
			
				|  |  |                  // 产地
 | 
	
		
			
				|  |  | -                { name: 'ProducingArea', value: glj.originPlace },
 | 
	
		
			
				|  |  | +                { name: 'ProducingArea', value: glj.producingArea },
 | 
	
		
			
				|  |  |                  // 供应商
 | 
	
		
			
				|  |  | -                { name: 'Supplier', value: glj.vender },
 | 
	
		
			
				|  |  | +                { name: 'Supplier', value: glj.supplier },
 | 
	
		
			
				|  |  |                  // 质量要求
 | 
	
		
			
				|  |  | -                { name: 'Character', value: glj.qualityGrace },
 | 
	
		
			
				|  |  | +                { name: 'Character', value: glj.character },
 | 
	
		
			
				|  |  |                  // 备注
 | 
	
		
			
				|  |  |                  { name: 'Remark', value: glj.remark }
 | 
	
		
			
				|  |  |              ];
 | 
	
	
		
			
				|  | @@ -2090,6 +2114,11 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                      fileName: name
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | +            // 建设项目表的人材机汇总、评标材料汇总
 | 
	
		
			
				|  |  | +            const constructionGLJSummary = loadConstructionGLJSummary();
 | 
	
		
			
				|  |  | +            const constructionBidEvaluations = loadConstructionBidEval();
 | 
	
		
			
				|  |  | +            const projectInstallationWorkCost = constructionProjectEle.children.find(ele => ele.name === 'ProjectInstallationWorkCost');
 | 
	
		
			
				|  |  | +            projectInstallationWorkCost.children.push(...constructionGLJSummary, ...constructionBidEvaluations);
 | 
	
		
			
				|  |  |              return extractData;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2117,6 +2146,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const projectInstall = new ProjectInstallationWorkCost(projectData, summaryInfo);
 | 
	
		
			
				|  |  |              // 单项工程
 | 
	
		
			
				|  |  |              const sectionalWorks = await loadEngineering(projectData.summaryInfo, projectData.children);
 | 
	
		
			
				|  |  | +            // 人材机汇总
 | 
	
		
			
				|  |  |              projectInstall.children.push(...sectionalWorks);
 | 
	
		
			
				|  |  |              constructionProject.children.push(
 | 
	
		
			
				|  |  |                  systemInfo,
 | 
	
	
		
			
				|  | @@ -2241,9 +2271,6 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  const gljSummary = loadGLJSummary();
 | 
	
		
			
				|  |  |                  // 评标材料
 | 
	
		
			
				|  |  |                  const bidEvaluations = loadBidEvaluation();
 | 
	
		
			
				|  |  | -                // 人材机汇总和评标材料需要汇总到建设项目
 | 
	
		
			
				|  |  | -                const projectInstallationWorkCost = constructionProjectEle.children.find(ele => ele.name === 'ProjectInstallationWorkCost');
 | 
	
		
			
				|  |  | -                projectInstallationWorkCost.children.push(...gljSummary, ...bidEvaluations);
 | 
	
		
			
				|  |  |                  unitWork.children.push(
 | 
	
		
			
				|  |  |                      attrInfo,
 | 
	
		
			
				|  |  |                      addiInfo,
 | 
	
	
		
			
				|  | @@ -2271,6 +2298,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |          function loadAttrInfo(attrList) {
 | 
	
		
			
				|  |  |              const attrInfo = new Info('AttrInfo');
 | 
	
		
			
				|  |  |              attrInfo.children = loadItems(attrList);
 | 
	
		
			
				|  |  | +            return attrInfo;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              // 递归导出子项
 | 
	
		
			
				|  |  |              function loadItems(items) {
 | 
	
	
		
			
				|  | @@ -2352,7 +2380,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const division = new DivisionalAndElementalWorks();
 | 
	
		
			
				|  |  |              const subEngineering = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.SUB_ENGINERRING);
 | 
	
		
			
				|  |  |              // 合计费用
 | 
	
		
			
				|  |  | -            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, subEngineering.data);
 | 
	
		
			
				|  |  | +            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, subEngineering);
 | 
	
		
			
				|  |  |              // 分部、分项
 | 
	
		
			
				|  |  |              const fbfx = loadFBFX(subEngineering.children, BillsKind.FBFX);
 | 
	
		
			
				|  |  |              division.children.push(summaryCost, ...fbfx);
 | 
	
	
		
			
				|  | @@ -2364,7 +2392,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const preliminaries = new Preliminaries();
 | 
	
		
			
				|  |  |              const measure = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.MEASURE);
 | 
	
		
			
				|  |  |              // 合计费用
 | 
	
		
			
				|  |  | -            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, measure.data);
 | 
	
		
			
				|  |  | +            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, measure);
 | 
	
		
			
				|  |  |              // 分部、分项
 | 
	
		
			
				|  |  |              const fbfx = loadFBFX(measure.children, BillsKind.MEASURE);
 | 
	
		
			
				|  |  |              preliminaries.children.push(summaryCost, ...fbfx);
 | 
	
	
		
			
				|  | @@ -2378,9 +2406,9 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                  // 有子清单的是分部
 | 
	
		
			
				|  |  |                  if (node.source.children.length) {
 | 
	
		
			
				|  |  |                      ele = new DivisionalWorks(node.data);
 | 
	
		
			
				|  |  | -                    const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, node.data);
 | 
	
		
			
				|  |  | +                    const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, node);
 | 
	
		
			
				|  |  |                      // 递归获取子元素
 | 
	
		
			
				|  |  | -                    ele.children = [summaryCost, ...loadFBFX(node.children)];
 | 
	
		
			
				|  |  | +                    ele.children = [summaryCost, ...loadFBFX(node.children, kind)];
 | 
	
		
			
				|  |  |                  } else { // 无子清单的是分项
 | 
	
		
			
				|  |  |                      ele = loadBills(node, kind);
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -2393,7 +2421,7 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const specialty = Specialty[tenderDetail.projectInfo.property.engineeringName]; // 工程专业
 | 
	
		
			
				|  |  |              const workElement = new WorkElement(node, kind, specialty);
 | 
	
		
			
				|  |  |              // 合计费用
 | 
	
		
			
				|  |  | -            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, node.data);
 | 
	
		
			
				|  |  | +            const summaryCost = new SummaryOfBasicCost(tenderDetail.mainTree.items, node);
 | 
	
		
			
				|  |  |              workElement.children.push(summaryCost);
 | 
	
		
			
				|  |  |              // 工程量计算表
 | 
	
		
			
				|  |  |              const expressElement = loadQuantityExpressions(tenderDetail.quantity_detail.datas, true, node.data.ID);
 | 
	
	
		
			
				|  | @@ -2447,15 +2475,16 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              let rationGLJs = tenderDetail.ration_glj.datas.filter(rGLJ => rGLJ.rationID === node.data.ID);
 | 
	
		
			
				|  |  |              rationGLJs = gljUtil.sortRationGLJ(rationGLJs); // 定额人材机排序
 | 
	
		
			
				|  |  |              const rationGLJElements = rationGLJs
 | 
	
		
			
				|  |  | -                /* .filter(rGLJ => {
 | 
	
		
			
				|  |  | +                .filter(rGLJ => {
 | 
	
		
			
				|  |  |                      // 总消耗量为0的,不输出
 | 
	
		
			
				|  |  | -                    const totalQuantity = gljUtil.getTotalQuantity(rGLJ, node.data, Decimal.GLJ, Decimal.QUANTITY);
 | 
	
		
			
				|  |  | +                    const totalQuantity = gljUtil.getTotalQuantity(rGLJ, node.data, Decimal.QUANTITY, Decimal.GLJ);
 | 
	
		
			
				|  |  |                      const parsedTotalQuantity = parseFloat(totalQuantity);
 | 
	
		
			
				|  |  |                      return parsedTotalQuantity;
 | 
	
		
			
				|  |  | -                }) */
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  |                  .map(rGLJ => {
 | 
	
		
			
				|  |  | -                    //const totalQuantity = gljUtil.getTotalQuantity(rGLJ, node.data, Decimal.GLJ, Decimal.QUANTITY);
 | 
	
		
			
				|  |  | -                    return new LabourMaterialsEquipmentsMachinesElement(rGLJ, rGLJ.quantity)
 | 
	
		
			
				|  |  | +                    const totalQuantity = gljUtil.getTotalQuantity(rGLJ, node.data, Decimal.QUANTITY, Decimal.GLJ);
 | 
	
		
			
				|  |  | +                    const noCost = !+totalQuantity; // 总消耗量为0即为不计价材料
 | 
	
		
			
				|  |  | +                    return new LabourMaterialsEquipmentsMachinesElement(rGLJ, rGLJ.quantity, noCost);
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |              norm.children.push(...rationGLJElements);
 | 
	
		
			
				|  |  |              // 子目单价计算(定额计算程序)
 | 
	
	
		
			
				|  | @@ -2577,6 +2606,60 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              return taxEle;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        // 建设项目人材机汇总的映射表
 | 
	
		
			
				|  |  | +        // 映射除了消耗量的字段,字段与字段间用特殊符号隔开,并作为映射的key,消耗量作为value
 | 
	
		
			
				|  |  | +        // 当除了消耗量和用消耗量关联计算的数据以外的字段都相等(包括组成物数据)时,认为是相同的人材机,不汇总消耗量,否则汇总消耗量
 | 
	
		
			
				|  |  | +        const allGLJMap = {};
 | 
	
		
			
				|  |  | +        const splitStr = '{@}'; // 字段间分割符
 | 
	
		
			
				|  |  | +        const splitKeys = [
 | 
	
		
			
				|  |  | +            'code', 'name', 'specs', 'unit', 'riskCoe', 'standardPrice',
 | 
	
		
			
				|  |  | +            'basePrice', 'marketPrice', 'varWeight', 'FO', 'FI', 'kind', 'isConcrete',
 | 
	
		
			
				|  |  | +            'isMainMaterial', 'isProvisionalMaterial', 'provider', 'delivery', 'location',
 | 
	
		
			
				|  |  | +            'producingArea', 'supplier', 'character', 'remark'
 | 
	
		
			
				|  |  | +        ];
 | 
	
		
			
				|  |  | +        // 合并人材机汇总数据(合并消耗量)
 | 
	
		
			
				|  |  | +        function mergeGLJSummary(gljSummaryItem) {
 | 
	
		
			
				|  |  | +            const connectKey = splitKeys.reduce((acc, key, index) => {
 | 
	
		
			
				|  |  | +                return `${acc}${index === 0 ? '' : splitStr}${gljSummaryItem[key]}`;
 | 
	
		
			
				|  |  | +            }, '');
 | 
	
		
			
				|  |  | +            gljSummaryItem.quantity = +gljSummaryItem.quantity; // 防止汇总的时候变成字符串拼接
 | 
	
		
			
				|  |  | +            if (!allGLJMap[connectKey]) {
 | 
	
		
			
				|  |  | +                // 不需要合并组成物,以第一条人材机的组成物为准
 | 
	
		
			
				|  |  | +                allGLJMap[connectKey] = { serialNo: Object.keys(allGLJMap).length, quantity: gljSummaryItem.quantity, ratios: gljSummaryItem.ratios };
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                allGLJMap[connectKey].quantity = scMathUtil.roundForObj(allGLJMap[connectKey].quantity + gljSummaryItem.quantity, Decimal.GLJ);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        // 加载建设项目人材机汇总数据
 | 
	
		
			
				|  |  | +        function loadConstructionGLJSummary() {
 | 
	
		
			
				|  |  | +            const gljList = [];
 | 
	
		
			
				|  |  | +            Object
 | 
	
		
			
				|  |  | +                .entries(allGLJMap)
 | 
	
		
			
				|  |  | +                .forEach(([connectKey, { serialNo, quantity, ratios }]) => {
 | 
	
		
			
				|  |  | +                    const glj = connectKey
 | 
	
		
			
				|  |  | +                        .split(splitStr)
 | 
	
		
			
				|  |  | +                        .reduce((obj, value, index) => {
 | 
	
		
			
				|  |  | +                            const attr = splitKeys[index];
 | 
	
		
			
				|  |  | +                            obj[attr] = value;
 | 
	
		
			
				|  |  | +                            return obj;
 | 
	
		
			
				|  |  | +                        }, {});
 | 
	
		
			
				|  |  | +                    glj.quantity = quantity;
 | 
	
		
			
				|  |  | +                    glj.serialNo = serialNo;
 | 
	
		
			
				|  |  | +                    glj.ratios = ratios;
 | 
	
		
			
				|  |  | +                    gljList.push(glj);
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            return gljList
 | 
	
		
			
				|  |  | +                .sort((a, b) => a.serialNo - b.serialNo)
 | 
	
		
			
				|  |  | +                .map(gljSummaryItem => {
 | 
	
		
			
				|  |  | +                    const gljEle = new LabourMaterialsEquipmentsMachinesSummary(gljSummaryItem);
 | 
	
		
			
				|  |  | +                    gljEle.children = gljSummaryItem.ratios.map(ratio => {
 | 
	
		
			
				|  |  | +                        const noCost = !+ratio.consumption;
 | 
	
		
			
				|  |  | +                        return new LabourMaterialsEquipmentsMachinesElement(ratio, ratio.consumption, noCost);
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                    return gljEle;
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          // 加载人材机汇总
 | 
	
		
			
				|  |  |          function loadGLJSummary() {
 | 
	
		
			
				|  |  |              // 所有人材机
 | 
	
	
		
			
				|  | @@ -2589,21 +2672,70 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |              const engineeringCostNode = tenderDetail.Bills.tree.roots.find(node => node.getFlag() === fixedFlag.ENGINEERINGCOST);
 | 
	
		
			
				|  |  |              const ecTotalFee = _util.getFee(engineeringCostNode.data.fees, 'common.totalFee');
 | 
	
		
			
				|  |  |              const coeDatas = materialAdjustObj.getPriceCoeDatas(gljList, contractorList, ecTotalFee, decimalObj);
 | 
	
		
			
				|  |  | -            return gljList.map(glj => {
 | 
	
		
			
				|  |  | -                // 人材机
 | 
	
		
			
				|  |  | -                const price = gljUtil.getGLJPrice(glj, tenderDetail.projectGLJ.datas, // 价格信息
 | 
	
		
			
				|  |  | -                    tenderDetail.projectInfo.property.calcOptions, tenderDetail.labourCoe.datas, tenderDetail.projectInfo.property.decimal, false, _, scMathUtil);
 | 
	
		
			
				|  |  | -                // 人材机对应的造价信息差额数据
 | 
	
		
			
				|  |  | -                const infoData = infoDatas.find(item => item.projectGLJID === glj.id);
 | 
	
		
			
				|  |  | -                // 人材机对应的价格指数数据
 | 
	
		
			
				|  |  | -                const coeData = coeDatas.find(item => item.projectGLJID === glj.id);
 | 
	
		
			
				|  |  | -                const gljEle = new LabourMaterialsEquipmentsMachinesSummary(glj, price, infoData, coeData);
 | 
	
		
			
				|  |  | -                // 人材机组成物
 | 
	
		
			
				|  |  | -                const connectKey = gljUtil.getIndex(glj, gljKeyArray);
 | 
	
		
			
				|  |  | -                const ratios = tenderDetail.projectGLJ.datas.mixRatioMap[connectKey] || [];
 | 
	
		
			
				|  |  | -                gljEle.children = ratios.map(ratio => new LabourMaterialsEquipmentsMachinesElement(ratio, ratio.consumption));
 | 
	
		
			
				|  |  | -                return gljEle;
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | +            return gljList
 | 
	
		
			
				|  |  | +                .filter(glj => !!+glj.quantity) // 总消耗量为0不导出
 | 
	
		
			
				|  |  | +                .map(glj => {
 | 
	
		
			
				|  |  | +                    // 人材机
 | 
	
		
			
				|  |  | +                    const price = gljUtil.getGLJPrice(glj, tenderDetail.projectGLJ.datas, // 价格信息
 | 
	
		
			
				|  |  | +                        tenderDetail.projectInfo.property.calcOptions, tenderDetail.labourCoe.datas, tenderDetail.projectInfo.property.decimal, false, _, scMathUtil);
 | 
	
		
			
				|  |  | +                    // 人材机对应的造价信息差额数据
 | 
	
		
			
				|  |  | +                    const infoData = infoDatas.find(item => item.projectGLJID === glj.id);
 | 
	
		
			
				|  |  | +                    // 人材机对应的价格指数数据
 | 
	
		
			
				|  |  | +                    const coeData = coeDatas.find(item => item.projectGLJID === glj.id);
 | 
	
		
			
				|  |  | +                    const gljSummaryItem = getGLJSummaryItem(glj, price, infoData, coeData);
 | 
	
		
			
				|  |  | +                    const gljEle = new LabourMaterialsEquipmentsMachinesSummary(gljSummaryItem);
 | 
	
		
			
				|  |  | +                    // 人材机组成物
 | 
	
		
			
				|  |  | +                    const connectKey = gljUtil.getIndex(glj, gljKeyArray);
 | 
	
		
			
				|  |  | +                    const ratios = tenderDetail.projectGLJ.datas.mixRatioMap[connectKey] || [];
 | 
	
		
			
				|  |  | +                    gljSummaryItem.ratios = ratios;
 | 
	
		
			
				|  |  | +                    gljEle.children = ratios.map(ratio => {
 | 
	
		
			
				|  |  | +                        const noCost = !+ratio.consumption;
 | 
	
		
			
				|  |  | +                        return new LabourMaterialsEquipmentsMachinesElement(ratio, ratio.consumption, noCost);
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                    mergeGLJSummary(gljSummaryItem); // 合并人材机消耗量,为输出建设项目表下的人材机汇总做准备
 | 
	
		
			
				|  |  | +                    return gljEle;
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 建设项目评标材料的映射表
 | 
	
		
			
				|  |  | +        // 映射除了消耗量的字段,字段与字段间用特殊符号隔开,并作为映射的key,消耗量作为value
 | 
	
		
			
				|  |  | +        const allBidEvalMap = {};
 | 
	
		
			
				|  |  | +        const bidEvalSplitKeys = [
 | 
	
		
			
				|  |  | +            'seq', 'code', 'name', 'specs', 'unit', 'marketPrice', 'delivery',
 | 
	
		
			
				|  |  | +            'delivery_address', 'originPlace', 'vender', 'qualityGrace', 'remark'
 | 
	
		
			
				|  |  | +        ];
 | 
	
		
			
				|  |  | +        // 合并数据(合并消耗量)
 | 
	
		
			
				|  |  | +        function mergeBidEval(glj) {
 | 
	
		
			
				|  |  | +            const connectKey = bidEvalSplitKeys.reduce((acc, key, index) => {
 | 
	
		
			
				|  |  | +                return `${acc}${index === 0 ? '' : splitStr}${glj[key]}`;
 | 
	
		
			
				|  |  | +            }, '');
 | 
	
		
			
				|  |  | +            glj.quantity = +glj.quantity; // 防止汇总的时候变成字符串拼接
 | 
	
		
			
				|  |  | +            if (!allBidEvalMap[connectKey]) {
 | 
	
		
			
				|  |  | +                allBidEvalMap[connectKey] = { serialNo: Object.keys(allBidEvalMap).length, quantity: glj.quantity };
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                allBidEvalMap[connectKey].quantity = scMathUtil.roundForObj(allBidEvalMap[connectKey].quantity + glj.quantity, Decimal.GLJ);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        // 加载建设项目评标材料数据
 | 
	
		
			
				|  |  | +        function loadConstructionBidEval() {
 | 
	
		
			
				|  |  | +            const gljList = [];
 | 
	
		
			
				|  |  | +            Object
 | 
	
		
			
				|  |  | +                .entries(allBidEvalMap)
 | 
	
		
			
				|  |  | +                .forEach(([connectKey, { serialNo, quantity }]) => {
 | 
	
		
			
				|  |  | +                    const glj = connectKey
 | 
	
		
			
				|  |  | +                        .split(splitStr)
 | 
	
		
			
				|  |  | +                        .reduce((obj, value, index) => {
 | 
	
		
			
				|  |  | +                            const attr = bidEvalSplitKeys[index];
 | 
	
		
			
				|  |  | +                            obj[attr] = value;
 | 
	
		
			
				|  |  | +                            return obj;
 | 
	
		
			
				|  |  | +                        }, {});
 | 
	
		
			
				|  |  | +                    glj.quantity = quantity;
 | 
	
		
			
				|  |  | +                    glj.serialNo = serialNo;
 | 
	
		
			
				|  |  | +                    gljList.push(glj);
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            return gljList
 | 
	
		
			
				|  |  | +                .sort((a, b) => a.serialNo - b.serialNo)
 | 
	
		
			
				|  |  | +                .map(glj => new BidEvaluationMainMaterial(glj));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 加载评标材料
 | 
	
	
		
			
				|  | @@ -2621,6 +2753,21 @@ const XMLStandard = (function () {
 | 
	
		
			
				|  |  |                      glj.vender = projectGLJ.vender;
 | 
	
		
			
				|  |  |                      glj.qualityGrace = projectGLJ.qualityGrace;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +                const toMergeGLJ = _.cloneDeep(glj);
 | 
	
		
			
				|  |  | +                // 需要提前处理空值的情况,将合并数据需要判断的字段值进行空值统一处理,防止空值值不同(null, undefined, '')造成连接key判断错误
 | 
	
		
			
				|  |  | +                toMergeGLJ.seq = toMergeGLJ.seq || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.code = toMergeGLJ.code || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.name = toMergeGLJ.name || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.specs = toMergeGLJ.specs || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.unit = toMergeGLJ.unit || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.marketPrice = toMergeGLJ.marketPrice || '0';
 | 
	
		
			
				|  |  | +                toMergeGLJ.delivery = toMergeGLJ.delivery || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.delivery_address = toMergeGLJ.delivery_address || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.originPlace = toMergeGLJ.originPlace || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.vender = toMergeGLJ.vender || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.qualityGrace = toMergeGLJ.qualityGrace || '';
 | 
	
		
			
				|  |  | +                toMergeGLJ.remark = toMergeGLJ.remark || '';
 | 
	
		
			
				|  |  | +                mergeBidEval(toMergeGLJ);
 | 
	
		
			
				|  |  |                  return new BidEvaluationMainMaterial(glj);
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |          }
 |