|
@@ -598,6 +598,7 @@ module.exports = app => {
|
|
}
|
|
}
|
|
const fptAudits = await ctx.service.financialPayTenderAudit.getAllDataByCondition({ where: { spid: ctx.subProject.id, uid: ctx.session.sessionUser.accountId } });
|
|
const fptAudits = await ctx.service.financialPayTenderAudit.getAllDataByCondition({ where: { spid: ctx.subProject.id, uid: ctx.session.sessionUser.accountId } });
|
|
const fptAuditTids = ctx.helper._.map(fptAudits, 'tid');
|
|
const fptAuditTids = ctx.helper._.map(fptAudits, 'tid');
|
|
|
|
+ const fptReportTids = ctx.helper._.map(ctx.helper._.filter(fptAudits, { is_report: 1 }), 'tid');
|
|
const filterTids = tid === null ? (ctx.session.sessionUser.is_admin ? null : fptAuditTids) : [tid];
|
|
const filterTids = tid === null ? (ctx.session.sessionUser.is_admin ? null : fptAuditTids) : [tid];
|
|
const tenderCondition = { spid: ctx.subProject.id };
|
|
const tenderCondition = { spid: ctx.subProject.id };
|
|
let hadTender = false;
|
|
let hadTender = false;
|
|
@@ -625,7 +626,6 @@ module.exports = app => {
|
|
});
|
|
});
|
|
const payTenders = await ctx.service.financialPayTender.getAllDataByCondition({ where: { spid: ctx.subProject.id } });
|
|
const payTenders = await ctx.service.financialPayTender.getAllDataByCondition({ where: { spid: ctx.subProject.id } });
|
|
for (const t of tenders) {
|
|
for (const t of tenders) {
|
|
- const fptReportTids = ctx.helper._.map(ctx.helper._.filter(fptAudits, { is_report: 1 }), 'tid');
|
|
|
|
const info = await ctx.service.tenderInfo.getDataByCondition({ tid: t.id });
|
|
const info = await ctx.service.tenderInfo.getDataByCondition({ tid: t.id });
|
|
t.pay_account = info && info.pay_account ? JSON.parse(info.pay_account).project : '';
|
|
t.pay_account = info && info.pay_account ? JSON.parse(info.pay_account).project : '';
|
|
const pt = ctx.helper._.find(payTenders, { tid: t.id });
|
|
const pt = ctx.helper._.find(payTenders, { tid: t.id });
|
|
@@ -675,6 +675,7 @@ module.exports = app => {
|
|
used,
|
|
used,
|
|
payList,
|
|
payList,
|
|
fptAuditTids,
|
|
fptAuditTids,
|
|
|
|
+ fptReportTids,
|
|
moment,
|
|
moment,
|
|
auditType: auditConst.auditType,
|
|
auditType: auditConst.auditType,
|
|
preUrl: '/financial',
|
|
preUrl: '/financial',
|