Pārlūkot izejas kodu

重新审批,期缓存数据

MaiXinRong 3 gadi atpakaļ
vecāks
revīzija
98e19b1553
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      app/service/stage_audit.js

+ 10 - 0
app/service/stage_audit.js

@@ -952,10 +952,20 @@ module.exports = app => {
                 await this.ctx.service.stagePosFinal.delGenerateFinalData(transaction, this.ctx.tender, this.ctx.stage);
                 await this.ctx.service.stageChangeFinal.delGenerateFinalData(transaction, this.ctx.tender, this.ctx.stage);
                 // 同步 期信息
+                const his = this.ctx.stage.tp_history.find(x => { return x.times === times && x.order === audit.order });
+                this.ctx.stage.tp_history.push({
+                    times,
+                    order: audit.order + 1,
+                    contract_tp: his.contract_tp,
+                    qc_tp: his.qc_tp,
+                    yf_tp: his.tp,
+                    sf_tp: his.tp,
+                });
                 await transaction.update(this.ctx.service.stage.tableName, {
                     id: stageId,
                     status: auditConst.status.checking,
                     cache_time_r: this.ctx.stage.cache_time_l,
+                    tp_history: JSON.stringify(this.ctx.stage.tp_history),
                 });
 
                 // 添加短信通知-需要审批提醒功能