|
@@ -235,22 +235,26 @@ const XMLStandard = (function () {
|
|
|
};
|
|
|
// 降效类型 建筑装饰工程定额超高降效费用计算标记
|
|
|
const EfficiencyKind = {
|
|
|
- 'baseReduction': '1', // 降效基础定额
|
|
|
- 'notReduction': '2', // 非降效定额
|
|
|
- 'marketPriceReduction': '3', // 按市场价计算降效费用定额
|
|
|
- 'rationPriceReduction': '4', // 按定额价计算降效费用定额
|
|
|
+ BASE_REDUCTION: '1', // 降效基础定额
|
|
|
+ NOT_BASE_REDUCTION: '2', // 非降效定额
|
|
|
+ MARKET_PRICE_REDUCTION: '3', // 按市场价计算降效费用定额
|
|
|
+ RATION_PRICE_REDUCTION: '4', // 按定额价计算降效费用定额
|
|
|
};
|
|
|
// 子目增加费类型 安装工程定额子目增加费的费用计算标记
|
|
|
const IncFeeKind = {
|
|
|
- 'subBase': '1', // 子目增加费基础定额
|
|
|
- 'notSubBase': '2', // 非子目增加费定额
|
|
|
- 'subCalc': '3', // 子目增加费用计算定额
|
|
|
+ SUB_BASE: '1', // 子目增加费基础定额
|
|
|
+ NOT_SUB_BASE: '2', // 非子目增加费定额
|
|
|
+ SUB_CALC: '3', // 子目增加费用计算定额
|
|
|
};
|
|
|
// 工料机类型
|
|
|
const GLJKind = {
|
|
|
};
|
|
|
// 供料方式
|
|
|
const Provider = {
|
|
|
+ [supplyType.ZXCG]: '1',
|
|
|
+ [supplyType.BFJG]: '2',
|
|
|
+ [supplyType.WQJG]: '2',
|
|
|
+ [supplyType.WQJG]: '3',
|
|
|
}
|
|
|
|
|
|
// 通用设置和工具
|
|
@@ -349,9 +353,8 @@ const XMLStandard = (function () {
|
|
|
return FlagCalcBaseMap[node.getFlag()] || '';
|
|
|
}
|
|
|
if (expr) {
|
|
|
- let illegal = false;
|
|
|
- let normalBase = _util.getNormalBase(expr),
|
|
|
- idBase = _util.getIDBase(expr);
|
|
|
+ const normalBase = _util.getNormalBase(expr);
|
|
|
+ const idBase = _util.getIDBase(expr);
|
|
|
//普通基数转费用字典
|
|
|
normalBase.forEach(base => {
|
|
|
const feeCode = getFeeCode(null, base);
|
|
@@ -368,6 +371,14 @@ const XMLStandard = (function () {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 获取计算计算说明
|
|
|
+ function getCalBasis(node) {
|
|
|
+ let expr = node.data.calcBase || '';
|
|
|
+ expr = expr.replace(new RegExp('{', 'g'), '');
|
|
|
+ expr = expr.replace(new RegExp('}', 'g'), '');
|
|
|
+ return expr;
|
|
|
+ }
|
|
|
+
|
|
|
// 获取定额册 取定额编号开头字母后面、-前面的数字,没有则取0
|
|
|
// 如: A2-1-1 则册为2
|
|
|
function getVolume(code) {
|
|
@@ -390,6 +401,28 @@ const XMLStandard = (function () {
|
|
|
return rst ? rst[1] : '0';
|
|
|
}
|
|
|
|
|
|
+ // 获取人材机类型
|
|
|
+ function getGLJKind(type) {
|
|
|
+ // 标准中的定义: 1=人工;2=材料;3=机械;4=主材;5=设备;6=配合比(砂浆、混凝土);7=机械(具)台班;8=定额材料;15=其他。
|
|
|
+ // 处理人材机类型:2=除了配合比、砂浆、混凝土的材料; 3=除了机械台班的机械
|
|
|
+ type = +type;
|
|
|
+ switch (type) {
|
|
|
+ case 202:
|
|
|
+ case 203:
|
|
|
+ case 204:
|
|
|
+ return '6'; // 配合比、砂浆、混凝土
|
|
|
+ case 301:
|
|
|
+ return '7'; // 机械台班
|
|
|
+ case 6:
|
|
|
+ case 7:
|
|
|
+ case 8:
|
|
|
+ return '15'; // 管理费、利润、一般风险费
|
|
|
+ }
|
|
|
+ const rootTypeReg = /\d/;
|
|
|
+ const rootType = rootTypeReg.exec(type)[0];
|
|
|
+ return ['1', '2', '3', '4', '5', '6'].includes(rootType) ? rootType : '15';
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* 提取数据入口
|
|
|
* @param {String}userID 用户ID
|
|
@@ -399,6 +432,10 @@ const XMLStandard = (function () {
|
|
|
* */
|
|
|
async function entry(userID, exportKind, projectData) {
|
|
|
// name为导出的xml节点属性名称 dName为可能需要显示给用户属性时使用的名称,比如自检提示的时候用,这里只有required为true时需要设置dNam
|
|
|
+
|
|
|
+ // 错误列表
|
|
|
+ const _failList = _cache.getItem('failList');
|
|
|
+
|
|
|
// 建设项目
|
|
|
function ConstructionProject(projectData) {
|
|
|
const basicInformation = projectData.property.basicInformation;
|
|
@@ -1449,7 +1486,7 @@ const XMLStandard = (function () {
|
|
|
// 设备单价(元)指清单项目所采用设备的综合单价
|
|
|
{ name: 'EquipmentPrice', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'equipment.unitFee') },
|
|
|
// 最低限价(元)
|
|
|
- { name: 'PriceLow', type: _type.DECIMAL, value: 'todo' },
|
|
|
+ //{ name: 'PriceLow', type: _type.DECIMAL, value: 'todo' },
|
|
|
// 最高限价(元)
|
|
|
{ name: 'PriceHigh', type: _type.DECIMAL, value: bills.maxPrice },
|
|
|
// 费率(%)
|
|
@@ -1464,7 +1501,7 @@ const XMLStandard = (function () {
|
|
|
{ name: 'CalculationKind', type: _type.INT, required: true, value: '1' },
|
|
|
// 费用归属
|
|
|
{ name: 'CostKind', type: _type.INT, required: true, value: '1' },
|
|
|
- // 计算方式 todo
|
|
|
+ // 计算方式
|
|
|
{ name: 'CalcType', type: _type.INT, required: true, value: '1' },
|
|
|
// 专业类型
|
|
|
{ name: 'Specialty', type: _type.INT, value: specialty },
|
|
@@ -1518,19 +1555,22 @@ const XMLStandard = (function () {
|
|
|
{ name: 'IsNorm', type: _type.Bool, required: true, value: 'true' },
|
|
|
// 子目类型
|
|
|
{ name: 'Kind', type: _type.INT, required: true, value: kind },
|
|
|
- // 取费类型 todo
|
|
|
+ // 取费类型
|
|
|
{ name: 'CalculationKind', type: _type.INT, required: true, value: '1' },
|
|
|
// 费用归属
|
|
|
{ name: 'CostKind', type: _type.INT, required: true, value: '1' },
|
|
|
// 降效类型
|
|
|
{
|
|
|
name: 'EfficiencyKind', type: _type.INT,
|
|
|
- value: ration.type === rationType.overHeight ? EfficiencyKind.baseReduction : EfficiencyKind.notReduction
|
|
|
+ value: ration.type === rationType.overHeight ? EfficiencyKind.BASE_REDUCTION : EfficiencyKind.NOT_BASE_REDUCTION
|
|
|
+ },
|
|
|
+ // 子目增加费类型itemIncrease
|
|
|
+ {
|
|
|
+ name: 'IncFeeKind', type: _type.INT,
|
|
|
+ value: ration.type === rationType.overHeight ? IncFeeKind.SUB_BASE : IncFeeKind.NOT_SUB_BASE
|
|
|
},
|
|
|
- // 子目增加费类型
|
|
|
- { name: 'IncFeeKind', type: _type.INT, value: 'todo' },
|
|
|
// 换算说明
|
|
|
- { name: 'Conversion', value: 'todo' },
|
|
|
+ { name: 'Conversion', value: ration.adjustState },
|
|
|
// 专业类别
|
|
|
{ name: 'Specialty', type: _type.INT, value: specialty },
|
|
|
//定额标识(定额库编码)
|
|
@@ -1564,12 +1604,12 @@ const XMLStandard = (function () {
|
|
|
_base.Element.call(this, 'ManageFees', attrs);
|
|
|
}
|
|
|
// 工料机含量明细
|
|
|
- function LabourMaterialsEquipmentsMachinesElement(rationGLJ) {
|
|
|
+ function LabourMaterialsEquipmentsMachinesElement(glj) {
|
|
|
const attrs = [
|
|
|
// 工料机编码
|
|
|
- { name: 'Number', value: rationGLJ.code },
|
|
|
+ { name: 'Number', value: glj.code },
|
|
|
// 消耗量
|
|
|
- { name: 'Quantity', value: rationGLJ.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
|
// 不计价材料
|
|
|
{ name: 'NOCost', typ: _type.BOOL, value: 'false' },
|
|
|
// 备注
|
|
@@ -1586,9 +1626,9 @@ const XMLStandard = (function () {
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: CalculationQtyMap[calcItem.name] },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: calcItem.totalFee },
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: calcItem.totalFee },
|
|
|
// 费用代号
|
|
|
{ name: 'Code', value: CalculationCodeMap[calcItem.name] },
|
|
|
// 备注
|
|
@@ -1606,7 +1646,7 @@ const XMLStandard = (function () {
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 费用代号
|
|
|
{ name: 'Code', required: true, value: getFeeCode(bills) },
|
|
|
// 备注
|
|
@@ -1615,16 +1655,17 @@ const XMLStandard = (function () {
|
|
|
_base.Element.call(this, eleName, attrs);
|
|
|
}
|
|
|
// 其他项目费标题
|
|
|
- function SundryCostsGroup(bills) {
|
|
|
+ function SundryCostsGroup(node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 费用代号
|
|
|
{ name: 'Code', required: true, value: getFeeCode(bills) },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.YES },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.YES },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1639,33 +1680,34 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', value: bills.unit },
|
|
|
// 工程量
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
// 单价
|
|
|
- { name: 'Price', value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: bills.feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 费用代号
|
|
|
{ name: 'Code', required: true, value: getFeeCode(bills) },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.NO },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.NO },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
|
_base.Element.call(this, 'SundryCostsItem', attrs);
|
|
|
}
|
|
|
// 暂列金额标题
|
|
|
- function ProvisionalSumsGroup(bills) {
|
|
|
+ function ProvisionalSumsGroup(node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.YES },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.YES },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1680,17 +1722,17 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', value: bills.unit },
|
|
|
// 工程量
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
// 单价
|
|
|
- { name: 'Price', value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: bills.feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.NO },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.NO },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1698,7 +1740,7 @@ const XMLStandard = (function () {
|
|
|
}
|
|
|
// 材料设备暂估价明细
|
|
|
// 读取单位工程-其他项目费的材料暂估价的组成数据,业务上这个清单是使用清单基数计算得来,所以此部分读取整个单位工程下打勾暂估的材料
|
|
|
- function ProvisionalMaterialEquipmentItem(glj) {
|
|
|
+ function ProvisionalMaterialEquipmentItem(glj, price) {
|
|
|
const attrs = [
|
|
|
// 编码
|
|
|
{ name: 'Number', value: glj.code },
|
|
@@ -1709,27 +1751,28 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', required: true, value: bills.unit },
|
|
|
// 工程量(总消耗量)
|
|
|
- { name: 'Quantity', value: glj.quantity },
|
|
|
- // 单价
|
|
|
- { name: 'Price', value: 'todo' },
|
|
|
- // 金额
|
|
|
- { name: 'Total', value: 'todo'},
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
|
+ // 单价 取市场价
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: price.marketPrice },
|
|
|
+ // 金额 round(总消耗量*市场价,2)
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.quantity * price.marketPrice, 2) },
|
|
|
// 备注
|
|
|
- { name: 'Remark', value: 'todo' }
|
|
|
+ { name: 'Remark', value: glj.remark }
|
|
|
];
|
|
|
_base.Element.call(this, 'ProvisionalMaterialEquipmentItem', attrs);
|
|
|
}
|
|
|
// 专业工程暂估价标题
|
|
|
- function SpecialtyProvisionalPriceGroup(bills) {
|
|
|
+ function SpecialtyProvisionalPriceGroup(node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 工程内容
|
|
|
{ name: 'Content', value: bills.engineeringContent },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.YES },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.YES },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1746,29 +1789,30 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', value: bills.unit },
|
|
|
// 工程量
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
// 单价
|
|
|
- { name: 'Price', value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: bills.feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.NO },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.NO },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
|
_base.Element.call(this, 'SpecialtyProvisionalPriceItem', attrs);
|
|
|
}
|
|
|
// 计日工标题
|
|
|
- function DayWorkRateGroup(bills) {
|
|
|
+ function DayWorkRateGroup(node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 费用代号
|
|
|
{ name: 'Code', value: getFeeCode(bills) },
|
|
|
// 备注
|
|
@@ -1777,7 +1821,7 @@ const XMLStandard = (function () {
|
|
|
_base.Element.call(this, 'DayWorkRateGroup', attrs);
|
|
|
}
|
|
|
// 计日工明细
|
|
|
- function DayWorkRateItem(bills) {
|
|
|
+ function DayWorkRateItem(node) {
|
|
|
const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 编码
|
|
@@ -1789,25 +1833,26 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', required: true, value: bills.unit },
|
|
|
// 工程量
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 单价
|
|
|
- { name: 'Price', value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
|
_base.Element.call(this, 'DayWorkRateItem', attrs);
|
|
|
}
|
|
|
// 总承包服务费标题
|
|
|
- function MainContractorAttendanceGroup(bills) {
|
|
|
+ function MainContractorAttendanceGroup(node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.YES },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.YES },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1820,31 +1865,32 @@ const XMLStandard = (function () {
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 项目价值
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 服务内容
|
|
|
{ name: 'Content', value: bills.serviceContent },
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: bills.feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.NO },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.NO },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
|
_base.Element.call(this, 'MainContractorAttendanceItem', attrs);
|
|
|
}
|
|
|
// 索赔、签证费用标题
|
|
|
- function ClaimVisaCostGroup(eleName, bills) {
|
|
|
+ function ClaimVisaCostGroup(eleName, node) {
|
|
|
+ const bills = node.data;
|
|
|
const attrs = [
|
|
|
// 名称
|
|
|
{ name: 'Name', required: true, value: bills.name },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.YES },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.YES },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
@@ -1859,24 +1905,164 @@ const XMLStandard = (function () {
|
|
|
// 单位
|
|
|
{ name: 'Unit', value: bills.unit },
|
|
|
// 数量
|
|
|
- { name: 'Quantity', value: bills.quantity },
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: bills.quantity },
|
|
|
// 计算基数
|
|
|
{ name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
// 单价
|
|
|
{ name: 'Price', value: _util.getFee(bills.fees, 'common.unitFee') },
|
|
|
// 费率
|
|
|
- { name: 'Rate', value: bills.feeRate },
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
// 金额
|
|
|
- { name: 'Total', value: _util.getFee(bills.fees, 'common.totalFee')},
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
// 依据
|
|
|
- { name: 'Reason', value: ''},
|
|
|
+ { name: 'Reason', value: '' },
|
|
|
// 汇总类型
|
|
|
- { name: 'Kind', required: true, value: SummrayKind.NO },
|
|
|
+ { name: 'Kind', type: _type.INT, required: true, value: SummrayKind.NO },
|
|
|
+ // 备注
|
|
|
+ { name: 'Remark', value: bills.remark }
|
|
|
+ ];
|
|
|
+ _base.Element.call(this, eleName, attrs);
|
|
|
+ }
|
|
|
+ // 规费
|
|
|
+ function StatutoryFees() {
|
|
|
+ const attrs = [
|
|
|
+ { name: 'Name', required: true, value: '规费' },
|
|
|
+ { name: 'Code', required: true, value: 'GF' }
|
|
|
+ ];
|
|
|
+ _base.Element.call(this, 'StatutoryFees', attrs);
|
|
|
+ }
|
|
|
+ // 税金
|
|
|
+ function Tax(eleName, node) {
|
|
|
+ const bills = node.data;
|
|
|
+ const attrs = [
|
|
|
+ // 名称
|
|
|
+ { name: 'Name', required: true, value: bills.name },
|
|
|
+ // 计算基数说明
|
|
|
+ { name: 'CalBasis', value: getCalBasis(node) },
|
|
|
+ // 计算基数
|
|
|
+ { name: 'QtyFormula', value: getQtyFormula(node) },
|
|
|
+ // 费率
|
|
|
+ { name: 'Rate', type: _type.DECIMAL, value: bills.feeRate },
|
|
|
+ // 金额
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: _util.getFee(bills.fees, 'common.totalFee') },
|
|
|
+ // 费用代号
|
|
|
+ { name: 'Code', value: getFeeCode(bills) },
|
|
|
// 备注
|
|
|
{ name: 'Remark', value: bills.remark }
|
|
|
];
|
|
|
_base.Element.call(this, eleName, attrs);
|
|
|
}
|
|
|
+ // 人材机汇总
|
|
|
+ function LabourMaterialsEquipmentsMachinesSummary(glj, price, infoData, coeData) {
|
|
|
+ const attrs = [
|
|
|
+ // 编码
|
|
|
+ { name: 'Number', required: true, value: glj.code },
|
|
|
+ // 名称
|
|
|
+ { name: 'Name', required: true, value: glj.name },
|
|
|
+ // 规格型号
|
|
|
+ { name: 'Specification', value: glj.specs },
|
|
|
+ // 单位
|
|
|
+ { name: 'Unit', required: true, value: glj.unit },
|
|
|
+ // 数量(总消耗量)
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
|
+ // 风险系数 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
|
+ { name: 'ProviderExp', type: _type.DECIMAL, value: infoData && infoData.riskCoe || '0' },
|
|
|
+ // 基准单价 从承包人主要材料设备-造价信息差额调整法读取,取不到则输出"0"
|
|
|
+ { name: 'ProviderBase', type: _type.DECIMAL, value: infoData && infoData.standardPrice || '0' },
|
|
|
+ // 除税定额价(定额价)
|
|
|
+ { name: 'NoTaxOrgPrice', type: _type.DECIMAL, value: price.basePrice },
|
|
|
+ // 除税编制价(市场价)
|
|
|
+ { name: 'NoTaxPrice', type: _type.DECIMAL, value: price.marketPrice },
|
|
|
+ // 含税定额价 不存在这个字段,输出"0"
|
|
|
+ { name: 'TaxOrgPrice', type: _type.DECIMAL, value: '0' },
|
|
|
+ // 含税编制价 暂时取市场价
|
|
|
+ { name: 'TaxPrice', type: _type.DECIMAL, value: price.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) },
|
|
|
+ // 除税编制价合价(元) 取Round(不含税市场价*总消耗量,2)
|
|
|
+ { name: 'NoTaxTotal', type: _type.DECIMAL, value: scMathUtil.roundForObj(price.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) },
|
|
|
+ // 变值权重 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
|
+ { name: 'Weight', type: _type.DECIMAL, value: coeData && coeData.varWeight || '0' },
|
|
|
+ // 基本价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
|
+ { name: 'BasicPrice', type: _type.DECIMAL, value: coeData && coeData.FO || '0' },
|
|
|
+ // 现行价格指数 从承包人主要材料设备-价格指数调整法读取,取不到则输出“0”
|
|
|
+ { name: 'CurrentPrice', type: _type.DECIMAL, value: coeData && coeData.FI || '0' },
|
|
|
+ // 工料机类型
|
|
|
+ { name: 'Kind', type: _type.INT, value: getGLJKind(glj.type) },
|
|
|
+ // 工料机归属
|
|
|
+ { name: 'Class', value: '' },
|
|
|
+ // 扩展属性
|
|
|
+ { name: 'ExtKind', type: _type.INT, value: 1 },
|
|
|
+ // 商品砼 如果工料机类型是“商品混凝土”、“商品砂浆”、“商品配合比”(软件中没有),则取“true”;否则取“false”
|
|
|
+ { name: 'Concrete', type: _type.BOOL, value: [205, 206].includes(glj.type) },
|
|
|
+ // 主要材料
|
|
|
+ { name: 'MainMaterial', type: _type.BOOL, value: !!glj.is_main_material },
|
|
|
+ // 是否暂估价材料
|
|
|
+ { name: 'ProvisionalMaterial', type: _type.BOOL, value: !!glj.is_evaluate },
|
|
|
+ // 供料方式
|
|
|
+ { name: 'Provider', type: _type.INT, value: Provider[glj.supply] },
|
|
|
+ // 价格来源
|
|
|
+ { name: 'PriceSource', value: '' },
|
|
|
+ // 交货方式
|
|
|
+ { name: 'Delivery', value: glj.delivery },
|
|
|
+ // 送达地点
|
|
|
+ { name: 'Location', value: glj.delivery_address },
|
|
|
+ // 产地
|
|
|
+ { name: 'ProducingArea', value: glj.originPlace },
|
|
|
+ // 供应商
|
|
|
+ { name: 'Supplier', value: glj.vender },
|
|
|
+ // 质量要求
|
|
|
+ { name: 'Character', value: glj.qualityGrace },
|
|
|
+ // 备注
|
|
|
+ { name: 'Remark', value: glj.remark }
|
|
|
+ ];
|
|
|
+ _base.Element.call(this, 'LabourMaterialsEquipmentsMachinesSummary', attrs);
|
|
|
+ }
|
|
|
+ // 评标主要材料
|
|
|
+ function BidEvaluationMainMaterial(glj) {
|
|
|
+ const attrs = [
|
|
|
+ // 序号
|
|
|
+ { name: 'Code', required: true, value: glj.seq },
|
|
|
+ // 编码
|
|
|
+ { name: 'Number', value: glj.code },
|
|
|
+ // 名称
|
|
|
+ { name: 'Name', required: true, value: glj.name },
|
|
|
+ // 规格型号
|
|
|
+ { name: 'Specification', value: glj.specs },
|
|
|
+ // 单位
|
|
|
+ { name: 'Unit', required: true, value: glj.unit },
|
|
|
+ // 市场价
|
|
|
+ { name: 'Price', type: _type.DECIMAL, value: glj.marketPrice },
|
|
|
+ // 最高限价
|
|
|
+ { name: 'LimitedPrice', type: _type.DECIMAL, value: '0' },
|
|
|
+ // 总消耗量
|
|
|
+ { name: 'Quantity', type: _type.DECIMAL, value: glj.quantity },
|
|
|
+ // 金额 Round(市场价*总消耗量,2)
|
|
|
+ { name: 'Total', type: _type.DECIMAL, value: scMathUtil.roundForObj(glj.marketPrice * glj.quantity, 2) },
|
|
|
+ // 交货方式
|
|
|
+ { name: 'Delivery', type: _type.DECIMAL, value: glj.delivery },
|
|
|
+ // 送达地点
|
|
|
+ { name: 'DeliPlace', value: glj.delivery_address },
|
|
|
+ // 产地
|
|
|
+ { name: 'ProducingArea', value: glj.originPlace },
|
|
|
+ // 供应商
|
|
|
+ { name: 'Supplier', value: glj.vender },
|
|
|
+ // 质量要求
|
|
|
+ { name: 'Character', value: glj.qualityGrace },
|
|
|
+ // 备注
|
|
|
+ { name: 'Remark', value: glj.remark }
|
|
|
+ ];
|
|
|
+ _base.Element.call(this, 'BidEvaluationMainMaterial', attrs);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 建设项目节点
|
|
|
let constructionProjectEle = null;
|
|
@@ -1889,12 +2075,14 @@ const XMLStandard = (function () {
|
|
|
* @return {Array}
|
|
|
* */
|
|
|
async function loadData(projectData) {
|
|
|
+ // 标记自检提示的开始(一次性多出多个文件类型,会导出多次)
|
|
|
+ _failList.push(_config.HINT_START);
|
|
|
// 提取出的数据
|
|
|
const extractData = [];
|
|
|
// 建设项目部分
|
|
|
- constructionProject = await loadConstructionProject(projectData);
|
|
|
+ constructionProjectEle = await loadConstructionProject(projectData);
|
|
|
extractData.push({
|
|
|
- data: constructionProject,
|
|
|
+ data: constructionProjectEle,
|
|
|
dataType: DATA_TYPE.project,
|
|
|
exportKind,
|
|
|
fileName: 'Project.xml'
|
|
@@ -1909,7 +2097,7 @@ const XMLStandard = (function () {
|
|
|
}, []);
|
|
|
// 获取单位工程详细结构
|
|
|
const isPlainTender = false;
|
|
|
- const tenders = await loadTender(projectData.summaryInfo, tenderData, isPlainTender);
|
|
|
+ const tenders = await loadTenders(projectData.summaryInfo, tenderData, isPlainTender);
|
|
|
tenders.forEach(tender => {
|
|
|
// 单位工程文件名为@_单位工程编码_单位工程名称.xml
|
|
|
// 因为单位工程编码后续用户可能会改变,这里暂时将fileName设置成单位工程名称.xml
|
|
@@ -1932,7 +2120,7 @@ const XMLStandard = (function () {
|
|
|
async function loadConstructionProject(projectData) {
|
|
|
const summaryInfo = projectData.summaryInfo[projectData.ID];
|
|
|
// 建设项目
|
|
|
- constructionProjectEle = new ConstructionProject(projectData);
|
|
|
+ const constructionProject = new ConstructionProject(projectData);
|
|
|
// 系统信息
|
|
|
const systemInfo = new SystemInfo({
|
|
|
// 软件相关信息进行base64编码
|
|
@@ -2025,6 +2213,18 @@ const XMLStandard = (function () {
|
|
|
return unitWork;
|
|
|
}
|
|
|
// 不是简单结构,继续添加各种子元素
|
|
|
+
|
|
|
+ // 需要请求项目详细数据的时候,间隔一段时间再初始单位工程数据,减少服务器压力
|
|
|
+ const tenderDetailMap = _cache.getItem('tenderDetailMap');
|
|
|
+ if (!tenderDetailMap[tData.ID]) {
|
|
|
+ await _util.setTimeoutSync(() => { }, _config.TIMEOUT_TIME);
|
|
|
+ }
|
|
|
+ // 方便用户看错误来自哪个单位工程
|
|
|
+ _failList.push(`<span style="font-weight: bold">单位工程“${tData.name}”下:</span>`);
|
|
|
+ const orgLen = _failList.length;
|
|
|
+ // 先计算人材机总消耗量,以供后面需要
|
|
|
+ gljUtil.calcProjectGLJQuantity(tenderDetail.projectGLJ.datas,
|
|
|
+ tenderDetail.ration_glj.datas, tenderDetail.Ration.datas, tenderDetail.Bills.datas, Decimal.GLJ, _, scMathUtil);
|
|
|
// 工程特征信息
|
|
|
const attrInfo = loadAttrInfo(tData.property.projectFeature);
|
|
|
// 基本信息
|
|
@@ -2040,8 +2240,36 @@ const XMLStandard = (function () {
|
|
|
// 措施项目
|
|
|
const preliminaries = loadPreliminaries();
|
|
|
// 其他项目
|
|
|
-
|
|
|
- unitWork.children.push(attrInfo, addiInfo, summaryOfCost, unitWorksSummary, divisionalElements, preliminaries);
|
|
|
+ const sundry = loadSundry();
|
|
|
+ // 规费
|
|
|
+ const statutoryFees = new StatutoryFees();
|
|
|
+ // 税金
|
|
|
+ const tax = loadTax();
|
|
|
+ // 人材机汇总
|
|
|
+ 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,
|
|
|
+ summaryOfCost,
|
|
|
+ unitWorksSummary,
|
|
|
+ divisionalElements,
|
|
|
+ preliminaries,
|
|
|
+ sundry,
|
|
|
+ statutoryFees,
|
|
|
+ tax,
|
|
|
+ ...gljSummary,
|
|
|
+ ...bidEvaluations
|
|
|
+ );
|
|
|
+
|
|
|
+ // 只有方便用户看错误来自哪个单位工程的提示,说明该单位工程没有报错
|
|
|
+ if (_failList.length === orgLen) {
|
|
|
+ _failList.pop();
|
|
|
+ }
|
|
|
});
|
|
|
return await Promise.all(tenderTasks);
|
|
|
}
|
|
@@ -2120,7 +2348,7 @@ const XMLStandard = (function () {
|
|
|
// 加载分部分项工程
|
|
|
function loadDivisionalAndElementalWorks() {
|
|
|
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);
|
|
|
// 分部、分项
|
|
@@ -2132,7 +2360,7 @@ const XMLStandard = (function () {
|
|
|
// 加载措施项目
|
|
|
function loadPreliminaries() {
|
|
|
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);
|
|
|
// 分部、分项
|
|
@@ -2141,14 +2369,6 @@ const XMLStandard = (function () {
|
|
|
return preliminaries;
|
|
|
}
|
|
|
|
|
|
- // 加载其他项目
|
|
|
- function loadSundry(params) {
|
|
|
- const sundry = new Sundry();
|
|
|
- // 其他项目费
|
|
|
-
|
|
|
- const sundryCosts = new SundryItem()
|
|
|
- }
|
|
|
-
|
|
|
// 加载分部分项清单,这部分是分部分项工程和措施项目共用的
|
|
|
function loadFBFX(nodes, kind) {
|
|
|
return nodes.map(node => {
|
|
@@ -2236,6 +2456,165 @@ const XMLStandard = (function () {
|
|
|
}
|
|
|
return norm;
|
|
|
}
|
|
|
+
|
|
|
+ // 递归加载标题和子目
|
|
|
+ function loadGroupAndItems(nodes, groupFactory, itemFactory) {
|
|
|
+ return nodes.map(node => {
|
|
|
+ let ele;
|
|
|
+ // 有子清单的是标题
|
|
|
+ if (node.source.children.length) {
|
|
|
+ ele = groupFactory(node);
|
|
|
+ // 递归获取子元素
|
|
|
+ ele.children = loadGroupAndItems(node.source.children, groupFactory, itemFactory);
|
|
|
+ } else { // 无子清单的是分项
|
|
|
+ ele = itemFactory(node);
|
|
|
+ }
|
|
|
+ return ele;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 加载其他项目
|
|
|
+ function loadSundry() {
|
|
|
+ // 加载材料设备暂估价明细
|
|
|
+ // 业务上这个清单是使用清单基数计算得来,所以此部分读取整个单位工程下打勾暂估的材料。is_evaluate = 1
|
|
|
+ function loadProvisionalMaterialDetail() {
|
|
|
+ return gljList
|
|
|
+ .filter(glj => glj.is_evaluate)
|
|
|
+ .map(glj => {
|
|
|
+ const price = gljUtil.getGLJPrice(glj, tenderDetail.projectGLJ.datas, // 价格信息
|
|
|
+ tenderDetail.projectInfo.property.calcOptions, tenderDetail.labourCoe.datas, tenderDetail.projectInfo.property.decimal, false, _, scMathUtil);
|
|
|
+ return new ProvisionalMaterialEquipmentItem(glj, price);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ const sundry = new Sundry();
|
|
|
+ // 其他项目费
|
|
|
+ const other = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.OTEHER);
|
|
|
+ const sundryCosts = new SundryItem('SundryCosts', other.data);
|
|
|
+ sundryCosts.children = loadGroupAndItems(
|
|
|
+ other.children,
|
|
|
+ (node) => new SundryCostsGroup(node),
|
|
|
+ (node) => new SundryCostsItem(node)
|
|
|
+ );
|
|
|
+ // 暂列金额
|
|
|
+ const provisional = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.PROVISIONAL);
|
|
|
+ const provisionalSums = new SundryItem('ProvisionalSums', provisional.data);
|
|
|
+ provisionalSums.children = loadGroupAndItems(
|
|
|
+ provisional.children,
|
|
|
+ (node) => new ProvisionalSumsGroup(node),
|
|
|
+ (node) => new ProvisionalSumsItem(node)
|
|
|
+ );
|
|
|
+ // 材料设备暂估价
|
|
|
+ const provisionalMaterial = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.MATERIAL_PROVISIONAL);
|
|
|
+ const provisionalMaterialEle = new SundryItem('ProvisionalMaterialEquipment', provisionalMaterial.data);
|
|
|
+ provisionalMaterialEle.children = loadProvisionalMaterialDetail();
|
|
|
+ // 专业工程暂估价
|
|
|
+ const specialtyProvisionalNode = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.ENGINEERING_ESITIMATE);
|
|
|
+ const specialtyProvisional = new SundryItem('SpecialtyProvisionalPrice', specialtyProvisionalNode.data);
|
|
|
+ specialtyProvisional.children = loadGroupAndItems(
|
|
|
+ specialtyProvisionalNode.children,
|
|
|
+ (node) => new SpecialtyProvisionalPriceGroup(node),
|
|
|
+ (node) => new SpecialtyProvisionalPriceItem(node)
|
|
|
+ );
|
|
|
+ // 计日工
|
|
|
+ const daywork = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.DAYWORK);
|
|
|
+ const dayworkRate = new SundryItem('DayWorkRate', daywork.data);
|
|
|
+ // 计日工最多只能有两层子项
|
|
|
+ const isValidDepth = _util.validDepth(2, daywork);
|
|
|
+ if (!isValidDepth) {
|
|
|
+ _failList.push('计日工子项超过两层')
|
|
|
+ } else {
|
|
|
+ dayworkRate.children = loadGroupAndItems(
|
|
|
+ daywork.children,
|
|
|
+ (node) => new DayWorkRateGroup(node),
|
|
|
+ (node) => new DayWorkRateItem(node)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // 总承包服务费
|
|
|
+ const turnKeyContract = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.TURN_KEY_CONTRACT);
|
|
|
+ const mainContractorAttendance = new SundryItem('MainContractorAttendance', turnKeyContract.data);
|
|
|
+ mainContractorAttendance.children = loadGroupAndItems(
|
|
|
+ turnKeyContract.children,
|
|
|
+ (node) => new MainContractorAttendanceGroup(node),
|
|
|
+ (node) => new MainContractorAttendanceItem(node)
|
|
|
+ );
|
|
|
+ // 索赔费用
|
|
|
+ const claim = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.CLAIM);
|
|
|
+ const claimsCost = new SundryItem('ClaimsCost', claim.data);
|
|
|
+ claimsCost.children = loadGroupAndItems(
|
|
|
+ claim.children,
|
|
|
+ (node) => new ClaimVisaCostGroup('ClaimsCostGroup', node),
|
|
|
+ (node) => new ClaimVisaCostItem('ClaimsCostItem', node)
|
|
|
+ );
|
|
|
+ // 签证费用
|
|
|
+ const visa = tenderDetail.mainTree.items.find(node => node.getFlag() === fixedFlag.VISA);
|
|
|
+ const siteInstructionCost = new SundryItem('SiteInstructionCost', visa.data);
|
|
|
+ siteInstructionCost.children = loadGroupAndItems(
|
|
|
+ visa.children,
|
|
|
+ (node) => new ClaimVisaCostGroup('SiteInstructionCostGroup', node),
|
|
|
+ (node) => new ClaimVisaCostItem('SiteInstructionCostItem', node)
|
|
|
+ );
|
|
|
+ sundry.children.push(sundryCosts, provisionalSums, specialtyProvisional, dayworkRate, mainContractorAttendance, claimsCost, siteInstructionCost);
|
|
|
+ return sundry;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 加载税金
|
|
|
+ function loadTax() {
|
|
|
+ const tax = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.TAX);
|
|
|
+ const taxEle = new Tax('Tax', tax);
|
|
|
+ // 加载税金子项,若无税金子项,税金本身也作为子项
|
|
|
+ const taxChildren = tax.source.children.length ? tax.source.children : [tax];
|
|
|
+ taxEle.children = taxChildren.map(taxItem => new Tax('TaxItem', taxItem));
|
|
|
+ return tax;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 加载人材机汇总
|
|
|
+ function loadGLJSummary() {
|
|
|
+ // 所有人材机
|
|
|
+ const gljList = gljUtil.sortRationGLJ(tenderDetail.projectGLJ.datas.gljList); // 汇总排序
|
|
|
+ const contractorList = tenderDetail.contractor_list.datas;
|
|
|
+ const decimalObj = tenderDetail.projectInfo.property.decimal;
|
|
|
+ // 总承包人造价信息差额调整法数据
|
|
|
+ const infoDatas = materialAdjustObj.getPirceInfoDatas(gljList, contractorList, decimalObj)
|
|
|
+ // 总承包人价格指数调整法数据
|
|
|
+ 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));
|
|
|
+ return gljEle;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 加载评标材料
|
|
|
+ function loadBidEvaluation() {
|
|
|
+ const gljList = tenderDetail.projectGLJ.datas.gljList;
|
|
|
+ const bidEvaluationSrc = tenderDetail.projectObj.project.bid_evaluation_list.datas;
|
|
|
+ const decimalObj = tenderDetail.projectInfo.property.decimal;
|
|
|
+ const bidEvaluationList = configMaterialObj.getBidMaterialDatas(gljList, bidEvaluationSrc, decimalObj);
|
|
|
+ return bidEvaluationList.map(glj => {
|
|
|
+ const projectGLJ = gljList.find(pGLJ => pGLJ.id === glj.projectGLJID);
|
|
|
+ if (projectGLJ) {
|
|
|
+ glj.delivery = projectGLJ.delivery;
|
|
|
+ glj.delivery_address = projectGLJ.delivery_address;
|
|
|
+ glj.originPlace = projectGLJ.originPlace;
|
|
|
+ glj.vender = projectGLJ.vender;
|
|
|
+ glj.qualityGrace = projectGLJ.qualityGrace;
|
|
|
+ }
|
|
|
+ return new BidEvaluationMainMaterial(glj);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/*
|