|
@@ -1032,6 +1032,9 @@ module.exports = app => {
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 复制一份最新数据给下一人
|
|
|
+ // 保留审批人数据,覆盖到原报中并删除该审批人合同支付数据
|
|
|
+ await this.ctx.service.stagePay.deleteAuditStagePays(this.ctx.stage, this.ctx.stage.times, 0, transaction);
|
|
|
+ await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times, 0, transaction, this.ctx.stage.times, 1);
|
|
|
await this.ctx.service.stagePay.deleteAuditStagePays(this.ctx.stage, this.ctx.stage.times, 1, transaction);
|
|
|
await this.ctx.service.stageJgcl.updateHistory(this.ctx.stage, transaction);
|
|
|
await this.ctx.service.stageBonus.updateHistory(this.ctx.stage, transaction);
|
|
@@ -1260,9 +1263,9 @@ module.exports = app => {
|
|
|
// 计算该审批人最终数据
|
|
|
await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
|
|
|
// 复制一份最新数据给下一人
|
|
|
+ await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times - 1, curAudit.order + 1, transaction, this.ctx.stage.times, 0);
|
|
|
+ await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times - 1, curAudit.order + 2, transaction, this.ctx.stage.times, 0);
|
|
|
await this.ctx.service.stagePay.deleteAuditStagePays(this.ctx.stage, this.ctx.stage.times, 0, transaction);
|
|
|
- await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times - 1, curAudit.order + 1, transaction);
|
|
|
- await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times - 1, curAudit.order + 2, transaction);
|
|
|
await this.ctx.service.stageJgcl.updateHistory(this.ctx.stage, transaction);
|
|
|
await this.ctx.service.stageBonus.updateHistory(this.ctx.stage, transaction);
|
|
|
await this.ctx.service.stageOther.updateHistory(this.ctx.stage, transaction);
|