Browse Source

审批退回问题

MaiXinRong 2 years ago
parent
commit
ef686a6454
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/service/stage_audit_ass.js

+ 3 - 3
app/service/stage_audit_ass.js

@@ -109,7 +109,7 @@ module.exports = app => {
                 const delConfirm = [];
                 for (const pc of preConfirm) {
                     const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: pc.ledger_id });
-                    const billsOwner = bills.full_path.split('-');
+                    const billsOwner = bills ? bills.full_path.split('-') : [];
                     const exist = locked.find(x => {
                         for (const id of x.locked_ledger_id) {
                             if (billsOwner.indexOf(id) >= 0) return true;
@@ -141,10 +141,10 @@ module.exports = app => {
                 if (a.aid === uid) break;
                 keepUid.push(a.aid);
             }
-            const keepConfirm = await this.getAllDataByCondition({ where: { sid: stage.id, times: stage.curTimes, uid: keepUid } });
+            const keepConfirm = await this.getAllDataByCondition({ where: { sid: stage.id, times: stage.curTimes, user_id: keepUid } });
             for (const kc of keepConfirm) {
                 const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: kc.ledger_id });
-                const billsOwner = bills.full_path.split('-');
+                const billsOwner = bills ? bills.full_path.split('-') : [];
                 const exist = lockConfirm.find(x => {
                     const lid = x.ass_ledger_id.split(',');
                     for (const id of lid) {