|
@@ -94,61 +94,6 @@ const XMLStandard = (function () {
|
|
'修复': '23',
|
|
'修复': '23',
|
|
'其他': '99',
|
|
'其他': '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 = [
|
|
const feeCodeList = [
|
|
'QDF', 'QRG', 'QCL', 'QJX', 'ZCSB', 'QZCF', 'QSBF', 'QGL', 'QLR', 'QZGJ', 'CSF', 'AQWMSGF', 'AXSJSCSXMF',
|
|
'QDF', 'QRG', 'QCL', 'QJX', 'ZCSB', 'QZCF', 'QSBF', 'QGL', 'QLR', 'QZGJ', 'CSF', 'AQWMSGF', 'AXSJSCSXMF',
|
|
@@ -904,14 +849,14 @@ const XMLStandard = (function () {
|
|
// 费用汇总
|
|
// 费用汇总
|
|
function SummaryOfCost(summaryInfo) {
|
|
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 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 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 totalManage = scMathUtil.roundForObj(+summaryInfo.subEngineeringManage + (+summaryInfo.measureManage), Decimal.FEE);
|
|
|
|
+ const totalProfit = scMathUtil.roundForObj(+summaryInfo.subEngineeringProfit + (+summaryInfo.measureProfit), Decimal.FEE);
|
|
const attrs = [
|
|
const attrs = [
|
|
// 工程造价(元)
|
|
// 工程造价(元)
|
|
{
|
|
{
|
|
@@ -1179,10 +1124,10 @@ const XMLStandard = (function () {
|
|
name: 'Scale', dName: '建设规模', type: _type.DECIMAL, required: true,
|
|
name: 'Scale', dName: '建设规模', type: _type.DECIMAL, required: true,
|
|
value: _util.getValueByKey(projectFeature, 'buildScale')
|
|
value: _util.getValueByKey(projectFeature, 'buildScale')
|
|
},
|
|
},
|
|
- // 建设规模单位 暂取'm2'
|
|
|
|
|
|
+ // 建设规模单位 取单位工程-工程特征-建设规模单位
|
|
{
|
|
{
|
|
name: 'Unit', dName: '建设规模单位', required: true,
|
|
name: 'Unit', dName: '建设规模单位', required: true,
|
|
- value: 'm2'
|
|
|
|
|
|
+ value: _util.getValueByKey(projectFeature, 'buildScaleUnit')
|
|
},
|
|
},
|
|
// 占总投资比例(%)
|
|
// 占总投资比例(%)
|
|
{
|
|
{
|
|
@@ -1356,7 +1301,8 @@ const XMLStandard = (function () {
|
|
_base.Element.call(this, 'Preliminaries', []);
|
|
_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 mainMaterial = _util.getFee(bills.fees, 'mainMaterial.totalFee');
|
|
const equipment = _util.getFee(bills.fees, 'equipment.totalFee');
|
|
const equipment = _util.getFee(bills.fees, 'equipment.totalFee');
|
|
@@ -1405,27 +1351,29 @@ const XMLStandard = (function () {
|
|
// 分部分项工程费
|
|
// 分部分项工程费
|
|
{
|
|
{
|
|
name: 'DivisionalAndElementalWorks', type: _type.DECIMAL,
|
|
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,
|
|
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,
|
|
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,
|
|
name: 'SundryCosts', type: _type.DECIMAL,
|
|
- value: _util.getFeeByFlag(items, fixedFlag.OTEHER, 'common.totalFee')
|
|
|
|
|
|
+ value: node.isBelongToFlags([fixedFlag.OTEHER]) ? _util.getFeeByFlag(items, fixedFlag.OTEHER, 'common.totalFee') : '0'
|
|
},
|
|
},
|
|
// 暂列金额
|
|
// 暂列金额
|
|
{
|
|
{
|
|
name: 'ProvisionalSums', type: _type.DECIMAL,
|
|
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'
|
|
},
|
|
},
|
|
// 规费
|
|
// 规费
|
|
{
|
|
{
|
|
@@ -1435,7 +1383,8 @@ const XMLStandard = (function () {
|
|
// 税金
|
|
// 税金
|
|
{
|
|
{
|
|
name: 'Tax', type: _type.DECIMAL,
|
|
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);
|
|
_base.Element.call(this, 'SummaryOfBasicCost', attrs);
|
|
@@ -1978,8 +1927,36 @@ const XMLStandard = (function () {
|
|
];
|
|
];
|
|
_base.Element.call(this, eleName, attrs, '税金');
|
|
_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 = [
|
|
const attrs = [
|
|
// 编码
|
|
// 编码
|
|
{ name: 'Number', dName: '编码', required: true, value: glj.code },
|
|
{ name: 'Number', dName: '编码', required: true, value: glj.code },
|
|
@@ -1992,63 +1969,63 @@ const XMLStandard = (function () {
|
|
// 数量(总消耗量)
|
|
// 数量(总消耗量)
|
|
{ name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
{ name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
// 风险系数 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
// 风险系数 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
- { name: 'ProviderRate', type: _type.DECIMAL, value: infoData && infoData.riskCoe || '0' },
|
|
|
|
|
|
+ { name: 'ProviderRate', type: _type.DECIMAL, value: glj.riskCoe },
|
|
// 基准单价 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
// 基准单价 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"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就行
|
|
// 因此导出都取项目中的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: 'ForeignCurrency', type: _type.DECIMAL, value: '0' },
|
|
// 折合人民币
|
|
// 折合人民币
|
|
{ name: 'ConvertedIntoRMB', type: _type.DECIMAL, value: '0' },
|
|
{ name: 'ConvertedIntoRMB', type: _type.DECIMAL, value: '0' },
|
|
// 除税定额价合价 取Round(定额价*总消耗量,2)
|
|
// 除税定额价合价 取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)
|
|
// 除税编制价合价(元) 取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' },
|
|
{ name: 'TaxOrgTotal', type: _type.DECIMAL, value: '0' },
|
|
// 含税编制价合价 取Round(含税市场价*总消耗量,2) (暂时用市场价)
|
|
// 含税编制价合价 取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”
|
|
// 变值权重 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
- { name: 'Weight', type: _type.DECIMAL, value: coeData && coeData.varWeight || '0' },
|
|
|
|
|
|
+ { name: 'Weight', type: _type.DECIMAL, value: glj.varWeight },
|
|
// 基本价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
// 基本价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
- { name: 'BasicPrice', type: _type.DECIMAL, value: coeData && coeData.FO || '0' },
|
|
|
|
|
|
+ { name: 'BasicPrice', type: _type.DECIMAL, value: glj.FO },
|
|
// 现行价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
// 现行价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“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: 'Class', value: '' },
|
|
// 扩展属性
|
|
// 扩展属性
|
|
{ name: 'ExtKind', type: _type.INT, value: 1 },
|
|
{ name: 'ExtKind', type: _type.INT, value: 1 },
|
|
// 商品砼 如果工料机类型是“商品混凝土”、“商品砂浆”、“商品配合比”(软件中没有),则取“true”;否则取“false”
|
|
// 商品砼 如果工料机类型是“商品混凝土”、“商品砂浆”、“商品配合比”(软件中没有),则取“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: 'PriceSource', value: '' },
|
|
// 交货方式
|
|
// 交货方式
|
|
{ name: 'Delivery', value: glj.delivery },
|
|
{ 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 }
|
|
{ name: 'Remark', value: glj.remark }
|
|
];
|
|
];
|
|
@@ -2094,6 +2071,8 @@ const XMLStandard = (function () {
|
|
|
|
|
|
// 建设项目节点
|
|
// 建设项目节点
|
|
let constructionProjectEle = null;
|
|
let constructionProjectEle = null;
|
|
|
|
+ // 建设项目评标材料
|
|
|
|
+ const constructionBidEvaluations = [];
|
|
|
|
|
|
/*
|
|
/*
|
|
* 加载数据,分两种数据类型
|
|
* 加载数据,分两种数据类型
|
|
@@ -2137,6 +2116,11 @@ const XMLStandard = (function () {
|
|
fileName: name
|
|
fileName: name
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ // 建设项目表的人材机汇总、评标材料汇总
|
|
|
|
+ const constructionGLJSummary = loadConstructionGLJSummary();
|
|
|
|
+ console.log(constructionGLJSummary);
|
|
|
|
+ const projectInstallationWorkCost = constructionProjectEle.children.find(ele => ele.name === 'ProjectInstallationWorkCost');
|
|
|
|
+ projectInstallationWorkCost.children.push(...constructionGLJSummary, ...constructionBidEvaluations);
|
|
return extractData;
|
|
return extractData;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2164,6 +2148,7 @@ const XMLStandard = (function () {
|
|
const projectInstall = new ProjectInstallationWorkCost(projectData, summaryInfo);
|
|
const projectInstall = new ProjectInstallationWorkCost(projectData, summaryInfo);
|
|
// 单项工程
|
|
// 单项工程
|
|
const sectionalWorks = await loadEngineering(projectData.summaryInfo, projectData.children);
|
|
const sectionalWorks = await loadEngineering(projectData.summaryInfo, projectData.children);
|
|
|
|
+ // 人材机汇总
|
|
projectInstall.children.push(...sectionalWorks);
|
|
projectInstall.children.push(...sectionalWorks);
|
|
constructionProject.children.push(
|
|
constructionProject.children.push(
|
|
systemInfo,
|
|
systemInfo,
|
|
@@ -2288,9 +2273,8 @@ const XMLStandard = (function () {
|
|
const gljSummary = loadGLJSummary();
|
|
const gljSummary = loadGLJSummary();
|
|
// 评标材料
|
|
// 评标材料
|
|
const bidEvaluations = loadBidEvaluation();
|
|
const bidEvaluations = loadBidEvaluation();
|
|
- // 人材机汇总和评标材料需要汇总到建设项目
|
|
|
|
- const projectInstallationWorkCost = constructionProjectEle.children.find(ele => ele.name === 'ProjectInstallationWorkCost');
|
|
|
|
- projectInstallationWorkCost.children.push(...gljSummary, ...bidEvaluations);
|
|
|
|
|
|
+ // 建设项目需要显示的评标材料
|
|
|
|
+ constructionBidEvaluations.push(...bidEvaluations);
|
|
unitWork.children.push(
|
|
unitWork.children.push(
|
|
attrInfo,
|
|
attrInfo,
|
|
addiInfo,
|
|
addiInfo,
|
|
@@ -2319,7 +2303,7 @@ const XMLStandard = (function () {
|
|
const attrInfo = new Info('AttrInfo');
|
|
const attrInfo = new Info('AttrInfo');
|
|
attrInfo.children = loadItems(attrList);
|
|
attrInfo.children = loadItems(attrList);
|
|
return attrInfo;
|
|
return attrInfo;
|
|
-
|
|
|
|
|
|
+
|
|
// 递归导出子项
|
|
// 递归导出子项
|
|
function loadItems(items) {
|
|
function loadItems(items) {
|
|
const children = [];
|
|
const children = [];
|
|
@@ -2400,7 +2384,7 @@ const XMLStandard = (function () {
|
|
const division = new DivisionalAndElementalWorks();
|
|
const division = new DivisionalAndElementalWorks();
|
|
const subEngineering = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.SUB_ENGINERRING);
|
|
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);
|
|
const fbfx = loadFBFX(subEngineering.children, BillsKind.FBFX);
|
|
division.children.push(summaryCost, ...fbfx);
|
|
division.children.push(summaryCost, ...fbfx);
|
|
@@ -2412,7 +2396,7 @@ const XMLStandard = (function () {
|
|
const preliminaries = new Preliminaries();
|
|
const preliminaries = new Preliminaries();
|
|
const measure = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.MEASURE);
|
|
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);
|
|
const fbfx = loadFBFX(measure.children, BillsKind.MEASURE);
|
|
preliminaries.children.push(summaryCost, ...fbfx);
|
|
preliminaries.children.push(summaryCost, ...fbfx);
|
|
@@ -2426,7 +2410,7 @@ const XMLStandard = (function () {
|
|
// 有子清单的是分部
|
|
// 有子清单的是分部
|
|
if (node.source.children.length) {
|
|
if (node.source.children.length) {
|
|
ele = new DivisionalWorks(node.data);
|
|
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, kind)];
|
|
ele.children = [summaryCost, ...loadFBFX(node.children, kind)];
|
|
} else { // 无子清单的是分项
|
|
} else { // 无子清单的是分项
|
|
@@ -2441,7 +2425,7 @@ const XMLStandard = (function () {
|
|
const specialty = Specialty[tenderDetail.projectInfo.property.engineeringName]; // 工程专业
|
|
const specialty = Specialty[tenderDetail.projectInfo.property.engineeringName]; // 工程专业
|
|
const workElement = new WorkElement(node, kind, specialty);
|
|
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);
|
|
workElement.children.push(summaryCost);
|
|
// 工程量计算表
|
|
// 工程量计算表
|
|
const expressElement = loadQuantityExpressions(tenderDetail.quantity_detail.datas, true, node.data.ID);
|
|
const expressElement = loadQuantityExpressions(tenderDetail.quantity_detail.datas, true, node.data.ID);
|
|
@@ -2626,6 +2610,61 @@ const XMLStandard = (function () {
|
|
return taxEle;
|
|
return taxEle;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 建设项目人材机汇总的映射表
|
|
|
|
+ // 映射除了消耗量的字段,字段与字段间用特殊符号隔开,并作为映射的key,消耗量作为value
|
|
|
|
+ // 当除了消耗量和用消耗量关联计算的数据以外的字段都相等(包括组成物数据)时,认为是相同的人材机,不汇总消耗量,否则汇总消耗量
|
|
|
|
+ const allGLJMap = {};
|
|
|
|
+ console.log(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() {
|
|
function loadGLJSummary() {
|
|
// 所有人材机
|
|
// 所有人材机
|
|
@@ -2641,24 +2680,26 @@ const XMLStandard = (function () {
|
|
return gljList
|
|
return gljList
|
|
.filter(glj => !!+glj.quantity) // 总消耗量为0不导出
|
|
.filter(glj => !!+glj.quantity) // 总消耗量为0不导出
|
|
.map(glj => {
|
|
.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 => {
|
|
|
|
- const noCost = !+ratio.consumption;
|
|
|
|
- return new LabourMaterialsEquipmentsMachinesElement(ratio, ratio.consumption, noCost);
|
|
|
|
|
|
+ // 人材机
|
|
|
|
+ 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;
|
|
});
|
|
});
|
|
- //gljEle.children = ratios.map(ratio => new LabourMaterialsEquipmentsMachinesElement(ratio, ratio.consumption));
|
|
|
|
- return gljEle;
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// 加载评标材料
|
|
// 加载评标材料
|