|
|
@@ -139,9 +139,9 @@ const XMLStandard = (function () {
|
|
|
let _base = XML_EXPORT_BASE,
|
|
|
_config = _base.CONFIG,
|
|
|
_util = _base.UTIL,
|
|
|
- _cache = _base.CACHE,
|
|
|
- _failList = _cache.getItem('failList');
|
|
|
+ _cache = _base.CACHE;
|
|
|
return function (userID, granularity, exportKind) {
|
|
|
+ let _failList = _cache.getItem('failList');
|
|
|
//默认导出建设项目
|
|
|
if (!granularity || ![1, 2, 3].includes(granularity)) {
|
|
|
granularity = _config.GRANULARITY.PROJECT;
|
|
|
@@ -790,9 +790,9 @@ const XMLStandard = (function () {
|
|
|
XML_EXPORT_BASE.Element.call(this, '承包人材料差额法明细', attrs);
|
|
|
}
|
|
|
//承包人材料指数法表
|
|
|
- function ExponentialGlj() {
|
|
|
+ function ExponentialGlj(fixedWeight) {
|
|
|
let attrs = [
|
|
|
- {name: '定值权重A', value: '', required: true, type: _config.TYPE.DECIMAL}
|
|
|
+ {name: '定值权重A', value: fixedWeight, required: true, type: _config.TYPE.DECIMAL}
|
|
|
];
|
|
|
XML_EXPORT_BASE.Element.call(this, '承包人材料指数法表', attrs);
|
|
|
}
|
|
|
@@ -1150,14 +1150,14 @@ const XMLStandard = (function () {
|
|
|
let ecTotalFee = _util.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;
|
|
|
+ // 变值权重B累加
|
|
|
+ let totalVarWeight = exponentialGljs.reduce((acc, cur) => acc += cur.varWeight || 0, 0);
|
|
|
+ // 如果采用指数法,定值权重A = 1 - 变值权重B累加。如果不是指数法,取1
|
|
|
+ let fixedWeight = adjustType === _config.ADJUST_TYPE.coe ? 1 - totalVarWeight : '1';
|
|
|
+ let exP = new ExponentialGlj(fixedWeight);
|
|
|
exponentialGljs.forEach(data => {
|
|
|
- totalVarWeight += data.varWeight || 0;
|
|
|
exP.children.push(new ExponentialGljDetail(adjustType, data));
|
|
|
});
|
|
|
- exP.attrs.find(attr => attr.name === '定值权重A').value = adjustType === _config.ADJUST_TYPE.coe ? 1 - totalVarWeight : '1';
|
|
|
tender.children.push(exP);
|
|
|
}
|
|
|
}
|
|
|
@@ -2034,7 +2034,7 @@ const XMLStandard = (function () {
|
|
|
this.transformData = async function (tenderID, curExportKind) {
|
|
|
if (curExportKind) {
|
|
|
// 更新缓存中的导出文件类型
|
|
|
- _cache.setItem('exportKind', +curExportKind);
|
|
|
+ //_cache.setItem('exportKind', +curExportKind);
|
|
|
exportKind = parseInt(curExportKind);
|
|
|
}
|
|
|
let eleData = await loadProject(tenderID);
|
|
|
@@ -2043,7 +2043,6 @@ const XMLStandard = (function () {
|
|
|
if (!eleData) {
|
|
|
return;
|
|
|
}
|
|
|
- console.log(this.datas);
|
|
|
this.originalDatas.push({data: this.datas, fileName: `重庆标准交换数据(${FILE_KIND[exportKind]}).QTF`});
|
|
|
};
|
|
|
}
|