|
|
@@ -17,12 +17,12 @@ INTERFACE_EXPORT = (() => {
|
|
|
行车干扰施工增加费: "XCGRGCSGZJFFL",
|
|
|
行车干扰: "XCGRGCSGZJFFL",
|
|
|
工地转移费: "GDZYFFL",
|
|
|
- 工地转移: "GDZYFFL",
|
|
|
+ '工地转移(km)': "GDZYFFL",
|
|
|
施工辅助费: "SGFZFFL",
|
|
|
施工辅助: "SGFZFFL",
|
|
|
基本费用: "JBFYFL",
|
|
|
主副食运费补贴: "ZFSYFBTFL",
|
|
|
- 综合里程: "ZFSYFBTFL",
|
|
|
+ '综合里程(km)': "ZFSYFBTFL",
|
|
|
职工探亲路费: "ZGTQLFFL",
|
|
|
职工探亲: "ZGTQLFFL",
|
|
|
职工取暖补贴: "ZGQNBTFL",
|
|
|
@@ -76,6 +76,19 @@ INTERFACE_EXPORT = (() => {
|
|
|
'rationCommon': 'DEJAF'
|
|
|
};
|
|
|
|
|
|
+ const feeLibNoMap = {
|
|
|
+ 'eba0e7c0-cfe6-11ea-ba15-739be477d1fe': 'GYSFL-000000-2018-86',
|
|
|
+ '451d3180-e02e-11ea-8056-1514dfc2f39e': 'GYSFL-340000-2019-210'
|
|
|
+ };
|
|
|
+
|
|
|
+ const FixedCostMap = {
|
|
|
+ //折旧费、检修费、维护费、安拆辅助费
|
|
|
+ '折旧费': 1,
|
|
|
+ '检修费': 1,
|
|
|
+ '维护费': 1,
|
|
|
+ '安拆辅助费':1
|
|
|
+ }
|
|
|
+
|
|
|
function getBasePrice(projectGLJID, tenderProject) {
|
|
|
let glj = _.find(tenderProject.projectGLJ.datas.gljList, {
|
|
|
id: projectGLJID
|
|
|
@@ -220,7 +233,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
function NormLib() {
|
|
|
const attrs = [{
|
|
|
name: "NormLibNo",
|
|
|
- value: "0",
|
|
|
+ value: "YSDE-000000-2018-86",
|
|
|
},
|
|
|
{
|
|
|
name: "NormLibName",
|
|
|
@@ -248,7 +261,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
},
|
|
|
{
|
|
|
name: "RateLibNo",
|
|
|
- value: feeRateInfo.libID,
|
|
|
+ value: feeLibNoMap[feeRateInfo.libID],
|
|
|
},
|
|
|
];
|
|
|
Element.call(this, "Rate", attrs);
|
|
|
@@ -333,6 +346,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
|
|
|
function Pract(tpdata, seriNo) {
|
|
|
let pgljData = tpdata.projectGLJ.datas;
|
|
|
+ let decimalObj = tpdata.property.decimal;
|
|
|
const attrs = [{
|
|
|
name: "PractNo",
|
|
|
value: seriNo,
|
|
|
@@ -586,7 +600,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function Mech(g) {
|
|
|
+ function Mech(g,gljKeyMap) {
|
|
|
const attrs = [{
|
|
|
name: "Code",
|
|
|
value: g.code,
|
|
|
@@ -617,20 +631,98 @@ INTERFACE_EXPORT = (() => {
|
|
|
},
|
|
|
];
|
|
|
Element.call(this, "Mech", attrs);
|
|
|
+ let FixedCostItems = [];
|
|
|
+ let fcsum = 0;
|
|
|
+ let VariableCostItems = [];
|
|
|
+ let vcsum = 0;
|
|
|
+ if (g.ratio_data && g.ratio_data.length > 0) {
|
|
|
+ for (let ratio of g.ratio_data) {
|
|
|
+ let rIndex = gljUtil.getIndex(ratio);
|
|
|
+ let rglj = gljKeyMap[rIndex];
|
|
|
+ let ts = scMathUtil.roundForObj(parseFloat(ratio.consumption) * rglj.priceInfo.tenderPrice, decimalObj.glj.unitPrice);
|
|
|
+ if (FixedCostMap[ratio.name]) {
|
|
|
+ FixedCostItems.push(new FixedCostItem(ratio));
|
|
|
+ fcsum = scMathUtil.roundForObj(fcsum + ts, decimalObj.glj.unitPrice);
|
|
|
+ } else {
|
|
|
+ VariableCostItems.push(new VariableCostItem(ratio));
|
|
|
+ vcsum = scMathUtil.roundForObj(vcsum + ts, decimalObj.glj.unitPrice);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (FixedCostItems.length > 0) {
|
|
|
+ let fc = new FixedCost(fcsum);
|
|
|
+ fc.children = FixedCostItems;
|
|
|
+ this.children.push(fc);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (VariableCostItems.length > 0) {
|
|
|
+ let vc = new VariableCost(vcsum);
|
|
|
+ vc.children = VariableCostItems;
|
|
|
+ this.children.push(vc);
|
|
|
+ }
|
|
|
+
|
|
|
+ function VariableCost(sum) {
|
|
|
+ const attrs = [{
|
|
|
+ name: "VariableCostSum",
|
|
|
+ value: sum,
|
|
|
+ }];
|
|
|
+ Element.call(this, "VariableCost", attrs);
|
|
|
+ }
|
|
|
+
|
|
|
+ function VariableCostItem(item) {
|
|
|
+ const attrs = [{
|
|
|
+ name: "VariableCostNo",
|
|
|
+ value: item.code,
|
|
|
+ },{
|
|
|
+ name: "Consumption",
|
|
|
+ value: item.consumption,
|
|
|
+ }]
|
|
|
+ Element.call(this, "VariableCostItem", attrs);
|
|
|
+ }
|
|
|
+
|
|
|
+ function FixedCost(sum) {
|
|
|
+ const attrs = [{
|
|
|
+ name: "FixedCostSum",
|
|
|
+ value: sum,
|
|
|
+ }, {
|
|
|
+ name: "FixedRate",
|
|
|
+ value: 1,
|
|
|
+ }];
|
|
|
+ Element.call(this, "FixedCost", attrs);
|
|
|
+ }
|
|
|
+
|
|
|
+ function FixedCostItem(item) {
|
|
|
+ const attrs = [{
|
|
|
+ name: "FixedCostNo",
|
|
|
+ value: item.code,
|
|
|
+ },{
|
|
|
+ name: "Sum",
|
|
|
+ value: item.consumption,
|
|
|
+ }]
|
|
|
+ Element.call(this, "FixedCostItem", attrs);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
let Mps = new emptyElement("Mps");
|
|
|
let Materials = new emptyElement("Materials");
|
|
|
let Mechs = new emptyElement("Mechs");
|
|
|
+ let gljKeyMap = {};
|
|
|
for (let g of pgljData.gljList) {
|
|
|
let type = g.type + "";
|
|
|
+ gljKeyMap[gljUtil.getIndex(g)] = g;
|
|
|
type = type.charAt(0);
|
|
|
if (type == "1") {
|
|
|
Mps.children.push(new MP(g));
|
|
|
} else if (type == "2" || type == 5) {
|
|
|
Materials.children.push(new Material(g));
|
|
|
} else if (type == "3") {
|
|
|
- Mechs.children.push(new Mech(g));
|
|
|
+ Mechs.children.push(new Mech(g,gljKeyMap));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1325,16 +1417,18 @@ INTERFACE_EXPORT = (() => {
|
|
|
data.children.push(new SystemInfo());
|
|
|
data.children.push(new CostBasis());
|
|
|
let seriNo = 1;
|
|
|
+ let Rates = [];
|
|
|
+ let Practs = [];
|
|
|
+ let EprjInfos = [];
|
|
|
for (let c of projectData.children) {
|
|
|
let tenderProject = tenderDetailMap[c.ID];
|
|
|
let feeRataDatas = tenderProject.FeeRate.datas;
|
|
|
- data.children.push(new Rate(tenderProject, feeRataDatas, seriNo));
|
|
|
-
|
|
|
- data.children.push(new Pract(tenderProject, seriNo));
|
|
|
- data.children.push(new EprjInfo(tenderProject));
|
|
|
+ Rates.push(new Rate(tenderProject, feeRataDatas, seriNo));
|
|
|
+ Practs.push(new Pract(tenderProject, seriNo));
|
|
|
+ EprjInfos.push(new EprjInfo(tenderProject));
|
|
|
seriNo++;
|
|
|
}
|
|
|
-
|
|
|
+ data.children.push(...Rates,...Practs,...EprjInfos);
|
|
|
return [{
|
|
|
data: data,
|
|
|
exportKind: exportKind,
|