Browse Source

审批管理删除本次审批bug

laiguoran 4 years ago
parent
commit
5cd23f8acf
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/service/stage_audit.js

+ 3 - 2
app/service/stage_audit.js

@@ -1234,6 +1234,7 @@ module.exports = app => {
                 const yfPay = stagePay.find(function(x) {
                     return x.ptype === payConst.payType.yf;
                 });
+                console.log(stagePay);
                 const sfPay = stagePay.find(function(x) {
                     return x.ptype === payConst.payType.sf;
                 });
@@ -1245,8 +1246,8 @@ module.exports = app => {
                     contract_tp: tpData.contract_tp,
                     qc_tp: tpData.qc_tp,
                     times: nowTimes,
-                    yf_tp: yfPay.tp,
-                    sf_tp: sfPay.tp,
+                    yf_tp: yfPay ? yfPay.tp : null,
+                    sf_tp: sfPay ? sfPay.tp : null,
                     tp_history: JSON.stringify(this.ctx.stage.tp_history),
                     cache_time_l: time,
                     cache_time_r: time,