|
@@ -205,8 +205,7 @@ class ImportBaseTree {
|
|
pos.add_user = this.ctx.session.sessionUser.accountId;
|
|
pos.add_user = this.ctx.session.sessionUser.accountId;
|
|
this.finalNode.pos.push(pos);
|
|
this.finalNode.pos.push(pos);
|
|
this.pos.push(pos);
|
|
this.pos.push(pos);
|
|
- pos.sgfh_qty = this.ctx.helper.round(pos.sgfh_qty, this.finalPrecision.value);
|
|
|
|
- pos.quantity = pos.sgfh_qty;
|
|
|
|
|
|
+ pos.quantity = this.ctx.helper.round(pos.quantity, this.finalPrecision.value);
|
|
return pos;
|
|
return pos;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -235,28 +234,12 @@ class ImportBaseTree {
|
|
for (const node of this.items) {
|
|
for (const node of this.items) {
|
|
if (node.children && node.children.length > 0) { continue; }
|
|
if (node.children && node.children.length > 0) { continue; }
|
|
if (!node.pos || node.pos.length === 0) { continue; }
|
|
if (!node.pos || node.pos.length === 0) { continue; }
|
|
- // node.sgfh_qty = this.ctx.helper.sum(_.map(node.pos, 'sgfh_qty'));
|
|
|
|
- // if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- // node.sgfh_tp = this.ctx.helper.round(this.ctx.helper.mul(node.sgfh_qty, node.unit_price),
|
|
|
|
- // this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.sgfh_tp = null;
|
|
|
|
- // }
|
|
|
|
- // node.quantity = this.ctx.helper.sum(_.map(node.pos, 'quantity'));
|
|
|
|
- // if (node.quantity && node.unit_price) {
|
|
|
|
- // node.total_price = this.ctx.helper.round(this.ctx.helper.mul(node.quantity, node.unit_price),
|
|
|
|
- // this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.total_price = null;
|
|
|
|
- // }
|
|
|
|
- node.sgfh_qty = this.ctx.helper.sum(_.map(node.pos, 'sgfh_qty'));
|
|
|
|
- if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- node.sgfh_tp = this.ctx.helper.mul(node.sgfh_qty, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
|
|
|
|
+ node.quantity = this.ctx.helper.sum(_.map(node.pos, 'quantity'));
|
|
|
|
+ if (node.quantity && node.unit_price) {
|
|
|
|
+ node.total_price = this.ctx.helper.mul(node.quantity, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
} else {
|
|
} else {
|
|
- node.sgfh_tp = null;
|
|
|
|
|
|
+ node.total_price = null;
|
|
}
|
|
}
|
|
- node.quantity = node.sgfh_qty;
|
|
|
|
- node.total_price = node.sgfh_tp;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -274,7 +257,7 @@ class AnalysisExcelTree {
|
|
pos: ['部位明细'],
|
|
pos: ['部位明细'],
|
|
name: ['名称'],
|
|
name: ['名称'],
|
|
unit: ['单位'],
|
|
unit: ['单位'],
|
|
- sgfh_qty: ['清单数量'], // 施工图复核数量
|
|
|
|
|
|
+ quantity: ['清单数量'],
|
|
dgn_qty1: ['设计数量1'],
|
|
dgn_qty1: ['设计数量1'],
|
|
dgn_qty2: ['设计数量2'],
|
|
dgn_qty2: ['设计数量2'],
|
|
unit_price: ['单价'],
|
|
unit_price: ['单价'],
|
|
@@ -295,30 +278,17 @@ class AnalysisExcelTree {
|
|
node.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
node.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
- node.sgfh_qty = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.sgfh_qty]), precision.value);
|
|
|
|
|
|
+ node.quantity = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.quantity]), precision.value);
|
|
node.dgn_qty1 = aeUtils.toNumber(row[this.colsDef.dgn_qty1]);
|
|
node.dgn_qty1 = aeUtils.toNumber(row[this.colsDef.dgn_qty1]);
|
|
node.dgn_qty2 = aeUtils.toNumber(row[this.colsDef.dgn_qty2]);
|
|
node.dgn_qty2 = aeUtils.toNumber(row[this.colsDef.dgn_qty2]);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
node.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
node.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
node.memo = this.ctx.helper.replaceReturn(row[this.colsDef.memo]);
|
|
node.memo = this.ctx.helper.replaceReturn(row[this.colsDef.memo]);
|
|
- // if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- // node.sgfh_tp = this.ctx.helper.round(this.ctx.helper.mul(node.sgfh_qty, node.unit_price), this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.sgfh_tp = null;
|
|
|
|
- // }
|
|
|
|
- // node.quantity = node.sgfh_qty;
|
|
|
|
- // if (node.quantity && node.unit_price) {
|
|
|
|
- // node.total_price = this.ctx.helper.round(this.ctx.helper.mul(node.quantity, node.unit_price), this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.total_price = null;
|
|
|
|
- // }
|
|
|
|
- if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- node.sgfh_tp = this.ctx.helper.mul(node.sgfh_qty, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
|
|
|
|
+ if (node.quantity && node.unit_price) {
|
|
|
|
+ node.total_price = this.ctx.helper.mul(node.quantity, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
} else {
|
|
} else {
|
|
- node.sgfh_tp = null;
|
|
|
|
|
|
+ node.total_price = null;
|
|
}
|
|
}
|
|
- node.quantity = node.sgfh_qty;
|
|
|
|
- node.total_price = node.sgfh_tp;
|
|
|
|
return this.cacheTree.addXmjNode(node);
|
|
return this.cacheTree.addXmjNode(node);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -333,28 +303,15 @@ class AnalysisExcelTree {
|
|
node.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
node.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
- node.sgfh_qty = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.sgfh_qty]), precision.value);
|
|
|
|
|
|
+ node.quantity = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.quantity]), precision.value);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
node.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
node.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
node.memo = this.ctx.helper.replaceReturn(row[this.colsDef.memo]);
|
|
node.memo = this.ctx.helper.replaceReturn(row[this.colsDef.memo]);
|
|
- // if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- // node.sgfh_tp = this.ctx.helper.round(this.ctx.helper.mul(node.sgfh_qty, node.unit_price), this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.sgfh_tp = null;
|
|
|
|
- // }
|
|
|
|
- // node.quantity = node.sgfh_qty;
|
|
|
|
- // if (node.quantity && node.unit_price) {
|
|
|
|
- // node.total_price = this.ctx.helper.round(this.ctx.helper.mul(node.quantity, node.unit_price), this.ctx.tender.info.decimal.tp);
|
|
|
|
- // } else {
|
|
|
|
- // node.total_price = null;
|
|
|
|
- // }
|
|
|
|
- if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- node.sgfh_tp = this.ctx.helper.mul(node.sgfh_qty, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
|
|
|
|
+ if (node.quantity && node.unit_price) {
|
|
|
|
+ node.total_price = this.ctx.helper.mul(node.quantity, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
} else {
|
|
} else {
|
|
- node.sgfh_tp = null;
|
|
|
|
|
|
+ node.total_price = null;
|
|
}
|
|
}
|
|
- node.quantity = node.sgfh_qty;
|
|
|
|
- node.total_price = node.sgfh_tp;
|
|
|
|
return this.cacheTree.addGclNode(node);
|
|
return this.cacheTree.addGclNode(node);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -366,7 +323,7 @@ class AnalysisExcelTree {
|
|
_loadPos(row) {
|
|
_loadPos(row) {
|
|
const pos = {};
|
|
const pos = {};
|
|
pos.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
pos.name = this.ctx.helper.replaceReturn(row[this.colsDef.name]);
|
|
- pos.sgfh_qty = aeUtils.toNumber(row[this.colsDef.sgfh_qty]);
|
|
|
|
|
|
+ pos.quantity = aeUtils.toNumber(row[this.colsDef.quantity]);
|
|
pos.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
pos.drawing_code = this.ctx.helper.replaceReturn(row[this.colsDef.drawing_code]);
|
|
return this.cacheTree.addPos(pos);
|
|
return this.cacheTree.addPos(pos);
|
|
}
|
|
}
|
|
@@ -529,7 +486,7 @@ class AnalysisGclExcelTree {
|
|
b_code: ['编号', '清单编号', '子目号'],
|
|
b_code: ['编号', '清单编号', '子目号'],
|
|
name: ['名称'],
|
|
name: ['名称'],
|
|
unit: ['单位'],
|
|
unit: ['单位'],
|
|
- sgfh_qty: ['清单数量'], // 施工图复核数量
|
|
|
|
|
|
+ quantity: ['清单数量'], // 施工图复核数量
|
|
unit_price: ['单价'],
|
|
unit_price: ['单价'],
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -553,15 +510,13 @@ class AnalysisGclExcelTree {
|
|
|
|
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
node.unit = this.ctx.helper.replaceReturn(row[this.colsDef.unit]);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, node.unit);
|
|
- node.sgfh_qty = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.sgfh_qty]), precision.value);
|
|
|
|
|
|
+ node.quantity = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.quantity]), precision.value);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
node.unit_price = aeUtils.toNumber(row[this.colsDef.unit_price]);
|
|
- if (node.sgfh_qty && node.unit_price) {
|
|
|
|
- node.sgfh_tp = this.ctx.helper.mul(node.sgfh_qty, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
|
|
|
|
+ if (node.quantity && node.unit_price) {
|
|
|
|
+ node.total_price = this.ctx.helper.mul(node.quantity, node.unit_price, this.ctx.tender.info.decimal.tp);
|
|
} else {
|
|
} else {
|
|
- node.sgfh_tp = null;
|
|
|
|
|
|
+ node.total_price = null;
|
|
}
|
|
}
|
|
- node.quantity = node.sgfh_qty;
|
|
|
|
- node.total_price = node.sgfh_tp;
|
|
|
|
return this.cacheTree.addNode(node);
|
|
return this.cacheTree.addNode(node);
|
|
}
|
|
}
|
|
|
|
|