|
|
@@ -902,17 +902,23 @@ const XMLStandard = (function () {
|
|
|
function DifferentiaGlj() {
|
|
|
element.call(this, '承包人材料差额法表', []);
|
|
|
}
|
|
|
+ const AdjustType = {
|
|
|
+ info: 'priceInfo',
|
|
|
+ coe: 'priceCoe'
|
|
|
+ };
|
|
|
//承包人材料差额法明细
|
|
|
- function DifferentiaGljDetail(source) {
|
|
|
+ //如果是“控制价”、“招标”,则不导出;
|
|
|
+ //如果是“投标”,且采用了信息价差额法,则导出;如果采用了指数法,则导出,但数量、风险系数、基准单价、投标单价,都取0。
|
|
|
+ function DifferentiaGljDetail(adjustType, source) {
|
|
|
let attrs = [
|
|
|
{name: '关联材料号', value: getGljCode(source.id), minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '名称', value: source.name, minLen: 1, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '规格', value: source.specs, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE},
|
|
|
{name: '单位', value: source.unit, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
- {name: '数量', value: source.quantity, type: TYPE.DECIMAL, required: true},
|
|
|
- {name: '风险系数', value: source.riskCoe, type: TYPE.DECIMAL, require: true},
|
|
|
+ {name: '数量', value: adjustType === AdjustType.info ? source.quantity : '0', type: TYPE.DECIMAL, required: true},
|
|
|
+ {name: '风险系数', value: adjustType === AdjustType.info ? source.riskCoe : '0', type: TYPE.DECIMAL, require: true},
|
|
|
{name: '基准单价', value: source.standardPrice, type: TYPE.DECIMAL, require: true},
|
|
|
- {name: '投标单价', value: source.marketPrice, type: TYPE.DECIMAL},
|
|
|
+ {name: '投标单价', value: adjustType === AdjustType.info ? source.marketPrice : '0', type: TYPE.DECIMAL},
|
|
|
{name: '确认单价', value: '0', type: TYPE.DECIMAL},
|
|
|
{name: '备注', value: source.remark, maxLen: 255,
|
|
|
failHint: `承包人材料${source.code}-“备注”`},
|
|
|
@@ -920,18 +926,23 @@ const XMLStandard = (function () {
|
|
|
element.call(this, '承包人材料差额法明细', attrs);
|
|
|
}
|
|
|
//承包人材料指数法表
|
|
|
- function ExponentialGlj(source) {
|
|
|
- element.call(this, '承包人材料指数法表', []);
|
|
|
+ function ExponentialGlj() {
|
|
|
+ let attrs = [
|
|
|
+ {name: '定值权重A', value: '', required: true, type: TYPE.DECIMAL}
|
|
|
+ ];
|
|
|
+ element.call(this, '承包人材料指数法表', attrs);
|
|
|
}
|
|
|
//承包人材料指数法明细
|
|
|
- function ExponentialGljDetail(source) {
|
|
|
+ //如果是“控制价”、“招标”,则不导出;
|
|
|
+ //如果是“投标”,且采用了指数法,则导出;如果采用了信息价差额法,则导出,但定值权重A取1,变值权重B、基本价格指数、现行价格指数取0。
|
|
|
+ function ExponentialGljDetail(adjustType, source) {
|
|
|
let attrs = [
|
|
|
{name: '关联材料号', value: getGljCode(source.id), minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '名称', value: source.name, minLen: 1, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '规格', value: source.specs, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE},
|
|
|
- {name: '变值权重B', value: source.varWeight, type: TYPE.DECIMAL, required: true},
|
|
|
- {name: '基本价格指数', value: source.FO, type: TYPE.DECIMAL, require: true},
|
|
|
- {name: '现行价格指数', value: source.FI, type: TYPE.DECIMAL, require: true},
|
|
|
+ {name: '变值权重B', value: adjustType === AdjustType.coe ? source.varWeight : '0', type: TYPE.DECIMAL, required: true},
|
|
|
+ {name: '基本价格指数', value: adjustType === AdjustType.coe ? source.FO : '0', type: TYPE.DECIMAL, require: true},
|
|
|
+ {name: '现行价格指数', value: adjustType === AdjustType.coe ? source.FI : '0', type: TYPE.DECIMAL, require: true},
|
|
|
{name: '备注', value: source.remark, maxLen: 255,
|
|
|
failHint: `承包人材料${source.code}-“备注”`},
|
|
|
];
|
|
|
@@ -999,7 +1010,7 @@ const XMLStandard = (function () {
|
|
|
function MaterialDetail(source) {
|
|
|
let attrs = [
|
|
|
{name: '序号', value: source.serialNo, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
- {name: '关联材料号', value: source.orgCode, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE},
|
|
|
+ {name: '关联材料号', value: source.code, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE},
|
|
|
{name: '材料名称', value: source.name, minLen: 1, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '规格型号', value: source.specs, maxLen: 255},
|
|
|
{name: '计量单位', value: source.unit, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
@@ -1065,7 +1076,7 @@ const XMLStandard = (function () {
|
|
|
//评审材料明细定义
|
|
|
function AppraisalDetail(source) {
|
|
|
let attrs = [
|
|
|
- {name: '代码', value: source.orgCode, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
+ {name: '代码', value: source.code, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '名称', value: source.name, minLen: 1, maxLen: 255, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
{name: '规格', value: source.specs, maxLen: 255},
|
|
|
{name: '单位', value: source.unit, minLen: 1, maxLen: 20, whiteSpace: WHITE_SPACE.COLLAPSE, required: true},
|
|
|
@@ -1159,11 +1170,14 @@ const XMLStandard = (function () {
|
|
|
return true;
|
|
|
}
|
|
|
//检测唯一性
|
|
|
- //@param {Object}constraints(约束池) {All}data(检测的数据) {String}hint(提示已存在的内容)
|
|
|
+ //@param {Object}constraints(约束池) {All}data(检测的数据) {String}hint(提示已存在的内容) {String}subHint(额外提示,有额外提示时,不用data提示)
|
|
|
//@return {void}
|
|
|
- function checkUnique(constraints, data, hint) {
|
|
|
+ function checkUnique(constraints, data, hint, subHint) {
|
|
|
if (constraints.includes(data)) {
|
|
|
- failList.push(`${hint}“${data}”已存在`);
|
|
|
+ let failHint = subHint
|
|
|
+ ? `${hint}“${subHint}”已存在`
|
|
|
+ : `${hint}“${data}”已存在`;
|
|
|
+ failList.push(failHint);
|
|
|
} else if (data) {
|
|
|
constraints.push(data);
|
|
|
}
|
|
|
@@ -1491,22 +1505,32 @@ const XMLStandard = (function () {
|
|
|
//人材机汇总相关
|
|
|
let gljSumarryInfo = loadGlj(curAppraisalSummary, tenderDetail);
|
|
|
if (gljSumarryInfo) {
|
|
|
- //承包人材料差额法表
|
|
|
- let diffGljs = materialAdjustObj.getPirceInfoDatas(tenderDetail.projectGLJ.datas.gljList);
|
|
|
- if (diffGljs.length) {
|
|
|
- let diffP = new DifferentiaGlj();
|
|
|
- diffGljs.forEach(data => diffP.children.push(new DifferentiaGljDetail(data)));
|
|
|
- tender.children.push(diffP);
|
|
|
- }
|
|
|
- //承包人材料指数法表
|
|
|
- let engineeringCostNode = tenderDetail.Bills.tree.roots.find(node => getNodeFlag(node) === fixedFlag.ENGINEERINGCOST);
|
|
|
- if (engineeringCostNode) {
|
|
|
- let ecTotalFee = getFee(engineeringCostNode.data.fees, 'common.totalFee');
|
|
|
- let exponentialGljs = materialAdjustObj.getPriceCoeDatas(tenderDetail.projectGLJ.datas.gljList, ecTotalFee);
|
|
|
- if (exponentialGljs.length) {
|
|
|
- let exP = new ExponentialGlj();
|
|
|
- exponentialGljs.forEach(data => exP.children.push(new ExponentialGljDetail(data)));
|
|
|
- tender.children.push(exP);
|
|
|
+ //投标导出承包人材料相关
|
|
|
+ if (exportKind === ExportKind.Tender) {
|
|
|
+ let adjustType = tenderData.property.gljAdjustType || AdjustType.info;
|
|
|
+ //承包人材料差额法表
|
|
|
+ let diffGljs = materialAdjustObj.getPirceInfoDatas(tenderDetail.projectGLJ.datas.gljList);
|
|
|
+ if (diffGljs.length) {
|
|
|
+ let diffP = new DifferentiaGlj();
|
|
|
+ diffGljs.forEach(data => diffP.children.push(new DifferentiaGljDetail(adjustType, data)));
|
|
|
+ tender.children.push(diffP);
|
|
|
+ }
|
|
|
+ //承包人材料指数法表
|
|
|
+ let engineeringCostNode = tenderDetail.Bills.tree.roots.find(node => getNodeFlag(node) === fixedFlag.ENGINEERINGCOST);
|
|
|
+ if (engineeringCostNode) {
|
|
|
+ let ecTotalFee = getFee(engineeringCostNode.data.fees, 'common.totalFee');
|
|
|
+ let exponentialGljs = materialAdjustObj.getPriceCoeDatas(tenderDetail.projectGLJ.datas.gljList, ecTotalFee);
|
|
|
+ if (exponentialGljs.length) {
|
|
|
+ let exP = new ExponentialGlj();
|
|
|
+ //权重B累加
|
|
|
+ let totalVarWeight = 0;
|
|
|
+ exponentialGljs.forEach(data => {
|
|
|
+ totalVarWeight += data.varWeight || 0;
|
|
|
+ exP.children.push(new ExponentialGljDetail(adjustType, data));
|
|
|
+ });
|
|
|
+ exP.attrs.find(attr => attr.name === '定值权重A').value = adjustType === AdjustType.coe ? 1 - totalVarWeight : '1';
|
|
|
+ tender.children.push(exP);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
let {gljSummary, evalBidMaterial, evalEstimateMaterial} = gljSumarryInfo;
|
|
|
@@ -1587,7 +1611,7 @@ const XMLStandard = (function () {
|
|
|
};
|
|
|
let bills = new FXbills(source);
|
|
|
//清单项目项目编码要在单位工程中唯一
|
|
|
- checkUnique(curTenderEle.constraints.billsCode, source.code, '清单项目项目编号');
|
|
|
+ checkUnique(curTenderEle.constraints.billsCode, source.code, `第${source.row}行`,`“清单项目编码${source.code}”`);
|
|
|
//加载特征及内容
|
|
|
function loadFeatureContent() {
|
|
|
let job = [],
|
|
|
@@ -1997,6 +2021,7 @@ const XMLStandard = (function () {
|
|
|
} else { //加载暂列金额明细
|
|
|
for (let n of node.children) {
|
|
|
let pDetailSource = {
|
|
|
+ row: detail.mainTree.nodes[detail.mainTree.prefix + n.data.ID].serialNo() + 1,
|
|
|
code: n.data.code,
|
|
|
name: n.data.name,
|
|
|
unit: n.data.unit,
|
|
|
@@ -2005,7 +2030,8 @@ const XMLStandard = (function () {
|
|
|
},
|
|
|
pDetailEle = new ProvisionalDetail(pDetailSource);
|
|
|
//暂列金额明细编号在单位工程中唯一
|
|
|
- checkUnique(curTenderEle.constraints.provisionalDetailCode, pDetailSource.code, '暂列金额明细编号');
|
|
|
+ checkUnique(curTenderEle.constraints.provisionalDetailCode, pDetailSource.code,
|
|
|
+ `第${pDetailSource.row}行`, `暂列金额明细编码${pDetailSource.code}`);
|
|
|
provisionalEle.children.push(pDetailEle);
|
|
|
}
|
|
|
}
|
|
|
@@ -2021,6 +2047,7 @@ const XMLStandard = (function () {
|
|
|
} else { //加载专业工程暂估明细
|
|
|
for (let n of node.children) {
|
|
|
let eDetailSource = {
|
|
|
+ row: detail.mainTree.nodes[detail.mainTree.prefix + n.data.ID].serialNo() + 1,
|
|
|
code: n.data.code,
|
|
|
name: n.data.name,
|
|
|
engineeringContent: n.data.engineeringContent,
|
|
|
@@ -2029,7 +2056,8 @@ const XMLStandard = (function () {
|
|
|
},
|
|
|
eDetailEle = new EngEstimateDetail(eDetailSource);
|
|
|
//暂列金额明细编号在单位工程中唯一
|
|
|
- checkUnique(curTenderEle.constraints.engEstimateDetailCode, eDetailSource.code, '专业工程暂估明细编号');
|
|
|
+ checkUnique(curTenderEle.constraints.engEstimateDetailCode, eDetailSource.code,
|
|
|
+ `第${eDetailSource.row}行`, `专业工程暂估明细编码${eDetailSource.code}`);
|
|
|
engEstimateEle.children.push(eDetailEle);
|
|
|
}
|
|
|
}
|
|
|
@@ -2046,7 +2074,7 @@ const XMLStandard = (function () {
|
|
|
fees: node.data.fees,
|
|
|
remark: node.data.remark
|
|
|
};
|
|
|
- checkUnique(constraints, source.code, hint);
|
|
|
+ checkUnique(constraints, source.code, `第${source.row}行`, `计日工项目编码${source.code}`);
|
|
|
return new DayWorkItem(source);
|
|
|
}
|
|
|
//加载服务费项
|
|
|
@@ -2101,7 +2129,7 @@ const XMLStandard = (function () {
|
|
|
//汇总其他列项金额
|
|
|
let totalFee = getFee(node.data.fees, 'common.totalFee');
|
|
|
summaryFee = scMathUtil.roundForObj(summaryFee + totalFee, curPMData.tender.property.decimal.bills.totalPrice);
|
|
|
- let otherItemEle = new OtherItem({
|
|
|
+ let otherItemSource = {
|
|
|
row: detail.mainTree.nodes[detail.mainTree.prefix + node.data.ID].serialNo() + 1,
|
|
|
code: node.data.code,
|
|
|
name: node.data.name,
|
|
|
@@ -2110,9 +2138,11 @@ const XMLStandard = (function () {
|
|
|
commonTotalFee: totalFee,
|
|
|
notSummary: belongFlag && belongFlag === fixedFlag.MATERIAL_PROVISIONAL, //不计入合价,只有材料(工程设备)暂估价固定节点
|
|
|
remark: node.data.remark
|
|
|
- });
|
|
|
+ };
|
|
|
+ let otherItemEle = new OtherItem(otherItemSource);
|
|
|
otherItems.push(otherItemEle);
|
|
|
- checkUnique(curTenderEle.constraints.otherItemNo, node.data.code, '其他列项编号');
|
|
|
+ checkUnique(curTenderEle.constraints.otherItemNo, otherItemSource.code,
|
|
|
+ `第${otherItemSource.row}行`, `清单编码${otherItemSource.code}`);
|
|
|
}
|
|
|
let otherEle = new Other({commonTotalFee: summaryFee});
|
|
|
for (let ele of otherItems) {
|
|
|
@@ -2153,7 +2183,8 @@ const XMLStandard = (function () {
|
|
|
};
|
|
|
source.calcBaseState = transformCalcBaseState(detail, source.calcBase);
|
|
|
//序号唯一
|
|
|
- checkUnique(curTenderEle.constraints.feeItemNo, source.code, '规费和税金费用项编号');
|
|
|
+ checkUnique(curTenderEle.constraints.feeItemNo, source.code,
|
|
|
+ `第${source.row}行`, `清单编码${source.code}`);
|
|
|
chargeTaxEle.children.push(new FeeItem(source));
|
|
|
}
|
|
|
return chargeTaxEle;
|
|
|
@@ -2260,7 +2291,7 @@ const XMLStandard = (function () {
|
|
|
};
|
|
|
let gljEle = new Glj(gljSource);
|
|
|
//人材机代码唯一
|
|
|
- checkUnique(curTenderEle.constraints.gljCode, gljSource.code, '人材机代码');
|
|
|
+ checkUnique(curTenderEle.constraints.gljCode, gljSource.code, '人材机代码', gljSource.orgCode);
|
|
|
//人材机配比
|
|
|
let connectKey = gljUtil.getIndex(glj, gljKeyArray),
|
|
|
ratioData = detail.projectGLJ.datas.mixRatioMap[connectKey];
|
|
|
@@ -2282,7 +2313,7 @@ const XMLStandard = (function () {
|
|
|
evalBidMaterial.children.push(new MaterialDetail(gljSource));
|
|
|
//给建设项目下的评审材料汇总设置明细数据,这里需要检测代码(编号)唯一性,因为是汇总所有单位工程的,要求所有单位工程内评审材料代码唯一
|
|
|
appraisalSummary.children.push(new AppraisalDetail(gljSource));
|
|
|
- checkUnique(curTenderEle.constraints.appraisalDetailCode, gljSource.code, '评审材料明细代码');
|
|
|
+ checkUnique(curTenderEle.constraints.appraisalDetailCode, gljSource.code, '评审材料明细代码', gljSource.orgCode);
|
|
|
}
|
|
|
if (glj.is_evaluate) { //暂估
|
|
|
gljSource.serialNo = evalEstSeq++;
|