|
@@ -1252,12 +1252,10 @@ module.exports = app => {
|
|
|
const changeList = await this.ctx.service.changeAuditList.getAllDataByCondition({
|
|
|
where: { cid: changeData.cid },
|
|
|
});
|
|
|
- // 申请变更金额更新为上一次审批审批变更后数量
|
|
|
+ // 申请变更金额更新为上一次审批审批变更后数量,清空audit_amount值
|
|
|
const updateTpList = [];
|
|
|
for (const cl of changeList) {
|
|
|
- if (cl.camount !== cl.spamount) {
|
|
|
- updateTpList.push({ id: cl.id, camount: cl.spamount });
|
|
|
- }
|
|
|
+ updateTpList.push({ id: cl.id, camount: cl.spamount, audit_amount: null });
|
|
|
}
|
|
|
if (updateTpList.length > 0) {
|
|
|
await this.transaction.updateRows(this.ctx.service.changeAuditList.tableName, updateTpList);
|