|
@@ -265,33 +265,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' }]
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
// 获取工程类型:枚举单位工程的工程专业+费用标准,用“;”分隔
|
|
@@ -869,6 +902,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 +990,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, '费用汇总');
|