浏览代码

重新审批,期缓存数据

MaiXinRong 3 年之前
父节点
当前提交
98e19b1553
共有 1 个文件被更改,包括 10 次插入0 次删除
  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),
                 });
 
                 // 添加短信通知-需要审批提醒功能