Bläddra i källkod

新增期,拷贝数据问题

MaiXinRong 7 månader sedan
förälder
incheckning
8691b39db4
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      app/service/phase_pay.js
  2. 1 1
      app/service/phase_pay_detail.js

+ 1 - 1
app/service/phase_pay.js

@@ -251,7 +251,7 @@ module.exports = app => {
             if (!tid) throw '数据错误';
             const user_id = this.ctx.session.sessionUser.accountId;
 
-            const maxOrder = await this.getMaxOrder();
+            const maxOrder = await this.getMaxOrder(tid);
             const data = {
                 id: this.uuid.v4(), tid: tid, create_user_id: user_id, update_user_id: user_id,
                 phase_order: maxOrder + 1, phase_date: phaseDate, memo,

+ 1 - 1
app/service/phase_pay_detail.js

@@ -357,7 +357,7 @@ class PhasePayDetail extends TreeService {
 
     async initPhaseDataByPre(conn, phasePay, prePhase) {
         const preData = await this.getAllDataByCondition({
-            where: { phase_id: prePhase.id, audit_times: prePhase.audit_times, audit_sort: audit_max_sort },
+            where: { phase_id: prePhase.id, audit_times: prePhase.audit_times, audit_sort: prePhase.audit_max_sort },
         });
         for (const pd of preData) {
             delete pd.id;