|
@@ -915,7 +915,7 @@ module.exports = app => {
|
|
|
let result = false;
|
|
|
try {
|
|
|
const changeInfo = await this.getDataByCondition({ cid });
|
|
|
- const tenderInfo = await this.ctx.service.tenderInfo.getTenderInfo(changeInfo.tid);
|
|
|
+ const tenderInfo = await this.ctx.service.tenderInfo.getTenderInfo(changeInfo.tid);
|
|
|
|
|
|
// 获取终审
|
|
|
const auditInfo = (await this.ctx.service.changeAudit.getAllDataByCondition({ where: { cid }, orders: [['usort', 'desc']], limit: 1, offset: 0 }))[0];
|
|
@@ -957,6 +957,7 @@ module.exports = app => {
|
|
|
const changeList = await this.ctx.service.changeAuditList.getAllDataByCondition({ where: { cid: changeInfo.cid } });
|
|
|
for (const cl of changeList) {
|
|
|
const audit_amount = cl.audit_amount.split(',');
|
|
|
+ const last_amount = audit_amount[audit_amount.length - 1];
|
|
|
audit_amount.splice(-1, 1);
|
|
|
const list_update = {
|
|
|
id: cl.id,
|
|
@@ -964,7 +965,7 @@ module.exports = app => {
|
|
|
samount: '',
|
|
|
};
|
|
|
total_price = this.ctx.helper.add(total_price,
|
|
|
- this.ctx.helper.mul(cl.unit_price, cl.camount, tenderInfo.decimal.tp));
|
|
|
+ this.ctx.helper.mul(cl.unit_price, parseFloat(last_amount), tenderInfo.decimal.tp));
|
|
|
await this.transaction.update(this.ctx.service.changeAuditList.tableName, list_update);
|
|
|
}
|
|
|
|