|
@@ -1590,17 +1590,21 @@ module.exports = app => {
|
|
throw '提交数据错误';
|
|
throw '提交数据错误';
|
|
}
|
|
}
|
|
let updateData;
|
|
let updateData;
|
|
|
|
+ if (row.unit) {
|
|
|
|
+ if (!row.quantity) { row.quantity = updateNode.quantity; }
|
|
|
|
+ if (!row.deal_qty) { row.deal_qty = updateNode.deal_qty; }
|
|
|
|
+ }
|
|
if (this._checkCalcField(row)) {
|
|
if (this._checkCalcField(row)) {
|
|
let calcData = JSON.parse(JSON.stringify(row));
|
|
let calcData = JSON.parse(JSON.stringify(row));
|
|
- const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, updateNode.unit);
|
|
|
|
- this.ctx.helper.checkFieldPrecision(row, qtyFields, precision.value);
|
|
|
|
- if (row.quantity) {
|
|
|
|
|
|
+ const precision = this.ctx.helper.findPrecision(this.ctx.tender.info.precision, row.unit ? row.unit : updateNode.unit);
|
|
|
|
+ this.ctx.helper.checkFieldPrecision(calcData, qtyFields, precision.value);
|
|
|
|
+ if (calcData.quantity) {
|
|
if (row.unit_price) {
|
|
if (row.unit_price) {
|
|
calcData.total_price = this._.multiply(row.quantity, row.unit_price);
|
|
calcData.total_price = this._.multiply(row.quantity, row.unit_price);
|
|
} else {
|
|
} else {
|
|
calcData.total_price = this._.multiply(row.quantity, updateNode.unit_price);
|
|
calcData.total_price = this._.multiply(row.quantity, updateNode.unit_price);
|
|
}
|
|
}
|
|
- } else if (row.unit_price) {
|
|
|
|
|
|
+ } else if (calcData.unit_price) {
|
|
calcData.total_price = this._.multiply(updateNode.quantity, row.unit_price);
|
|
calcData.total_price = this._.multiply(updateNode.quantity, row.unit_price);
|
|
}
|
|
}
|
|
if (row.total_price) {
|
|
if (row.total_price) {
|