Browse Source

1. 移除“清单审批内容”的影响代码
2. 台账分解,加载异常应重定向至标段概况

MaiXinRong 5 years ago
parent
commit
f3a9857397
1 changed files with 1 additions and 5 deletions
  1. 1 5
      app/controller/ledger_controller.js

+ 1 - 5
app/controller/ledger_controller.js

@@ -112,9 +112,6 @@ module.exports = app => {
                 const curAuditor = await ctx.service.ledgerAudit.getCurAuditor(tender.id, tender.data.ledger_times);
                 const times = tender.data.ledger_status === auditConst.status.checkNo ? tender.data.ledger_times - 1 : tender.data.ledger_times;
                 const auditors = await ctx.service.ledgerAudit.getAuditors(tender.id, times);
-                const content = auditors.length > 0 ? await ctx.service.ledgerAuditContent.getAllDataByCondition({
-                    where: { tender_id: tender.id, times, audit_id: auditors[0].audit_id },
-                }) : null;
                 const user = await ctx.service.projectAccount.getAccountInfoById(ctx.tender.data.user_id);
                 const auditHistory = [];
                 if (ctx.tender.data.ledger_times > 1) {
@@ -131,7 +128,6 @@ module.exports = app => {
                     curAuditor,
                     user,
                     auditHistory,
-                    content,
                     ledgerSpreadSetting: JSON.stringify(ledgerSpread),
                     posSpreadSetting: JSON.stringify(posSpread),
                     tenderMenu,
@@ -155,7 +151,7 @@ module.exports = app => {
                 await this.layout('ledger/explode.ejs', renderData, 'ledger/explode_modal.ejs');
             } catch (err) {
                 this.log(err);
-                await this.layout('/dashboard');
+                await this.redirect('/dashboard');
             }
         }