Browse Source

审批退回问题

MaiXinRong 5 năm trước cách đây
mục cha
commit
b036cac16f
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 3
      app/service/stage_audit.js

+ 2 - 3
app/service/stage_audit.js

@@ -491,8 +491,7 @@ module.exports = app => {
             try {
                 // 计算并合同支付最终数据
                 const [yfPay, sfPay] = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
-                const tpHistory = this.ctx.stage.tp_history ? JSON.parse(this.ctx.stage.tp_history) : [];
-                tpHistory.push({
+                this.ctx.stage.push({
                     times: times, order: audit.order,
                     contract_tp: tpData.contract_tp,
                     qc_tp: tpData.qc_tp,
@@ -507,7 +506,7 @@ module.exports = app => {
                     times: times,
                     yf_tp: yfPay.tp,
                     sf_tp: sfPay.tp,
-                    tp_history: JSON.stringify(tpHistory),
+                    tp_history: JSON.stringify(this.ctx.stage.tp_history),
                     cache_time_r: this.ctx.stage.cache_time_l,
                 });
                 await transaction.update(this.tableName, {id: audit.id, status: checkData.checkType, opinion: checkData.opinion, end_time: time});