|
@@ -121,7 +121,7 @@ module.exports = app => {
|
|
const userPermission = accountInfo !== undefined && accountInfo.permission !== ''
|
|
const userPermission = accountInfo !== undefined && accountInfo.permission !== ''
|
|
? JSON.parse(accountInfo.permission) : null;
|
|
? JSON.parse(accountInfo.permission) : null;
|
|
|
|
|
|
- const tenderList = await this.ctx.service.tender.getList('', userPermission);
|
|
|
|
|
|
+ const tenderList = await this.ctx.service.tender.getList('', userPermission, this.ctx.session.sessionUser.is_admin);
|
|
|
|
|
|
for (const t of tenderList) {
|
|
for (const t of tenderList) {
|
|
if (t.user_id === this.ctx.session.sessionUser.accountId && (
|
|
if (t.user_id === this.ctx.session.sessionUser.accountId && (
|
|
@@ -174,7 +174,7 @@ module.exports = app => {
|
|
async _list(view, renderData, modal = '', list_status = '') {
|
|
async _list(view, renderData, modal = '', list_status = '') {
|
|
console.log(1);
|
|
console.log(1);
|
|
try {
|
|
try {
|
|
- renderData.tenderList = await this.ctx.service.tender.getList(list_status, renderData.userPermission);
|
|
|
|
|
|
+ renderData.tenderList = await this.ctx.service.tender.getList(list_status, renderData.userPermission, this.ctx.session.sessionUser.is_admin);
|
|
|
|
|
|
for (const t of renderData.tenderList) {
|
|
for (const t of renderData.tenderList) {
|
|
if (t.ledger_status === auditConst.ledger.status.checked) {
|
|
if (t.ledger_status === auditConst.ledger.status.checked) {
|
|
@@ -453,8 +453,8 @@ module.exports = app => {
|
|
audit: auditConst,
|
|
audit: auditConst,
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.tender.tenderInfo),
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.tender.tenderInfo),
|
|
};
|
|
};
|
|
- if (ctx.session.sessionProject.page_show !== null && parseInt(ctx.session.sessionProject.page_show.xxjd) === 1 && ctx.session.sessionUser.is_admin) {
|
|
|
|
- // 形象进度内容
|
|
|
|
|
|
+ if (ctx.session.sessionUser.is_admin) {
|
|
|
|
+ renderData.tourists = await ctx.service.tenderTourist.getTourists(tender.id);
|
|
// 获取所有项目参与者
|
|
// 获取所有项目参与者
|
|
const accountList = await ctx.service.projectAccount.getAllDataByCondition({
|
|
const accountList = await ctx.service.projectAccount.getAllDataByCondition({
|
|
where: { project_id: ctx.session.sessionProject.id, enable: 1 },
|
|
where: { project_id: ctx.session.sessionProject.id, enable: 1 },
|
|
@@ -464,9 +464,12 @@ module.exports = app => {
|
|
const groupList = accountList.filter(item => item.account_group === idx);
|
|
const groupList = accountList.filter(item => item.account_group === idx);
|
|
return { groupName: item, groupList };
|
|
return { groupName: item, groupList };
|
|
});
|
|
});
|
|
- renderData.scheduleAuditList = await ctx.service.scheduleAudit.getAllDataByCondition({ where: { tid: tender.id } });
|
|
|
|
renderData.accountList = accountList;
|
|
renderData.accountList = accountList;
|
|
renderData.accountGroup = accountGroupList;
|
|
renderData.accountGroup = accountGroupList;
|
|
|
|
+ }
|
|
|
|
+ if (ctx.session.sessionProject.page_show !== null && parseInt(ctx.session.sessionProject.page_show.xxjd) === 1 && ctx.session.sessionUser.is_admin) {
|
|
|
|
+ // 形象进度内容
|
|
|
|
+ renderData.scheduleAuditList = await ctx.service.scheduleAudit.getAllDataByCondition({ where: { tid: tender.id } });
|
|
renderData.scPermission = scheduleConst.permission;
|
|
renderData.scPermission = scheduleConst.permission;
|
|
}
|
|
}
|
|
await this.layout('tender/detail.ejs', renderData, 'tender/detail_modal.ejs');
|
|
await this.layout('tender/detail.ejs', renderData, 'tender/detail_modal.ejs');
|