|
|
@@ -9,7 +9,6 @@
|
|
|
*/
|
|
|
const audit = require('../const/audit');
|
|
|
const shenpiConst = require('../const/shenpi');
|
|
|
-const moment = require('moment');
|
|
|
const sendToWormhole = require('stream-wormhole');
|
|
|
const fs = require('fs');
|
|
|
const path = require('path');
|
|
|
@@ -120,7 +119,7 @@ module.exports = app => {
|
|
|
await this.layout('cost/ledger_list.ejs', renderData, 'cost/ledger_list_modal.ejs');
|
|
|
} catch(err) {
|
|
|
ctx.log(err);
|
|
|
- ctx.redirect(ctx.request.header.referer);
|
|
|
+ ctx.redirect(`/sp/${ctx.subProject.id}/cost`);
|
|
|
}
|
|
|
}
|
|
|
async book(ctx) {
|
|
|
@@ -142,7 +141,7 @@ module.exports = app => {
|
|
|
await this.layout('cost/book_list.ejs', renderData, 'cost/book_list_modal.ejs');
|
|
|
} catch(err) {
|
|
|
ctx.log(err);
|
|
|
- ctx.redirect(ctx.request.header.referer);
|
|
|
+ ctx.redirect(`/sp/${ctx.subProject.id}/cost`);
|
|
|
}
|
|
|
}
|
|
|
async analysis(ctx) {
|
|
|
@@ -167,7 +166,7 @@ module.exports = app => {
|
|
|
await this.layout('cost/analysis_list.ejs', renderData, 'cost/analysis_list_modal.ejs');
|
|
|
} catch(err) {
|
|
|
ctx.log(err);
|
|
|
- ctx.redirect(ctx.request.header.referer);
|
|
|
+ ctx.redirect(`/sp/${ctx.subProject.id}/cost`);
|
|
|
}
|
|
|
}
|
|
|
|