|
|
@@ -672,7 +672,8 @@ module.exports = app => {
|
|
|
if (!ctx.session.sessionUser.is_admin) {
|
|
|
throw '您没有权限查看该页面';
|
|
|
}
|
|
|
- const types_from = ctx.query.from || 'subProject';
|
|
|
+ // url是否包含tender
|
|
|
+ const types_from = ctx.url.indexOf('tender') > -1 ? 'tender' : 'subProject';
|
|
|
const commonJson = ctx.subProject.common_json ? JSON.parse(ctx.subProject.common_json) : null;
|
|
|
const types = commonJson && commonJson.contract_type ? commonJson.contract_type : [];
|
|
|
const tender_types = commonJson && commonJson.tender_contract_type ? commonJson.tender_contract_type : [];
|
|
|
@@ -681,7 +682,7 @@ module.exports = app => {
|
|
|
types,
|
|
|
tender_types,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.contract.setting),
|
|
|
- thisUrl: `/sp/${ctx.subProject.id}/contract/setting`,
|
|
|
+ thisUrl: `/sp/${ctx.subProject.id}/contract${types_from === 'tender' ? '/tender' : ''}/setting`,
|
|
|
is_setting: true,
|
|
|
};
|
|
|
await this.layout('contract/setting.ejs', renderData);
|