|
@@ -1163,9 +1163,16 @@ module.exports = app => {
|
|
|
await this.ctx.service.changeHistory.saveHistory(this.transaction, changeData, changeList);
|
|
|
let total_price = 0;
|
|
|
const tp_decimal = changeData.tp_decimal ? changeData.tp_decimal : this.ctx.tender.info.decimal.tp;
|
|
|
+ const updateChangeList = [];
|
|
|
for (const cl of changeList) {
|
|
|
+ updateChangeList.push({
|
|
|
+ id: cl.id,
|
|
|
+ audit_amount: null,
|
|
|
+ spamount: cl.camount,
|
|
|
+ });
|
|
|
total_price = this.ctx.helper.add(total_price, this.ctx.helper.mul(cl.unit_price, cl.camount, tp_decimal));
|
|
|
}
|
|
|
+ if (updateChangeList.length > 0) await this.transaction.updateRows(this.ctx.service.changeAuditList.tableName, updateChangeList);
|
|
|
// 设置变更令退回
|
|
|
const change_update = {
|
|
|
w_code: postData.w_code,
|