|
@@ -358,9 +358,10 @@ module.exports = app => {
|
|
|
columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group'],
|
|
|
});
|
|
|
renderData.accountList = accountList;
|
|
|
- renderData.accountGroup = accountGroup.map((item, idx) => {
|
|
|
- const groupList = accountList.filter(item => item.account_group === idx);
|
|
|
- return { groupName: item, groupList };
|
|
|
+ const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: ctx.session.sessionProject.id } });
|
|
|
+ renderData.accountGroup = unitList.map(item => {
|
|
|
+ const groupList = accountList.filter(item1 => item1.company === item.name);
|
|
|
+ return { groupName: item.name, groupList };
|
|
|
});
|
|
|
// 重新上报获取审批流程
|
|
|
if (auditStatus === 2 || auditStatus === 9) {
|
|
@@ -639,9 +640,10 @@ module.exports = app => {
|
|
|
columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group'],
|
|
|
});
|
|
|
renderData.accountList = accountList;
|
|
|
- renderData.accountGroup = accountGroup.map((item, idx) => {
|
|
|
- const groupList = accountList.filter(item => item.account_group === idx);
|
|
|
- return { groupName: item, groupList };
|
|
|
+ const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: ctx.session.sessionProject.id } });
|
|
|
+ renderData.accountGroup = unitList.map(item => {
|
|
|
+ const groupList = accountList.filter(item1 => item1.company === item.name);
|
|
|
+ return { groupName: item.name, groupList };
|
|
|
});
|
|
|
// 重新上报获取审批流程
|
|
|
if (auditStatus === 2 || auditStatus === 9) {
|
|
@@ -2094,9 +2096,10 @@ module.exports = app => {
|
|
|
columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile'],
|
|
|
});
|
|
|
renderData.accountList = accountList;
|
|
|
- renderData.accountGroup = accountGroup.map((item, idx) => {
|
|
|
- const groupList = accountList.filter(item => item.account_group === idx);
|
|
|
- return { groupName: item, groupList };
|
|
|
+ const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: ctx.session.sessionProject.id } });
|
|
|
+ renderData.accountGroup = unitList.map(item => {
|
|
|
+ const groupList = accountList.filter(item1 => item1.company === item.name);
|
|
|
+ return { groupName: item.name, groupList };
|
|
|
});
|
|
|
// }
|
|
|
await this.layout('change/project_information.ejs', renderData, 'change/project_information_modal.ejs');
|
|
@@ -2694,9 +2697,10 @@ module.exports = app => {
|
|
|
columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile'],
|
|
|
});
|
|
|
renderData.accountList = accountList;
|
|
|
- renderData.accountGroup = accountGroup.map((item, idx) => {
|
|
|
- const groupList = accountList.filter(item => item.account_group === idx);
|
|
|
- return { groupName: item, groupList };
|
|
|
+ const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: ctx.session.sessionProject.id } });
|
|
|
+ renderData.accountGroup = unitList.map(item => {
|
|
|
+ const groupList = accountList.filter(item1 => item1.company === item.name);
|
|
|
+ return { groupName: item.name, groupList };
|
|
|
});
|
|
|
}
|
|
|
await this.layout('change/apply_information.ejs', renderData, 'change/apply_information_modal.ejs');
|
|
@@ -3315,9 +3319,10 @@ module.exports = app => {
|
|
|
columns: ['id', 'name', 'company', 'role', 'enable', 'is_admin', 'account_group', 'mobile'],
|
|
|
});
|
|
|
renderData.accountList = accountList;
|
|
|
- renderData.accountGroup = accountGroup.map((item, idx) => {
|
|
|
- const groupList = accountList.filter(item => item.account_group === idx);
|
|
|
- return { groupName: item, groupList };
|
|
|
+ const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: ctx.session.sessionProject.id } });
|
|
|
+ renderData.accountGroup = unitList.map(item => {
|
|
|
+ const groupList = accountList.filter(item1 => item1.company === item.name);
|
|
|
+ return { groupName: item.name, groupList };
|
|
|
});
|
|
|
}
|
|
|
await this.layout('change/plan_information.ejs', renderData, 'change/plan_information_modal.ejs');
|