|
@@ -1367,26 +1367,31 @@ module.exports = app => {
|
|
|
const data = JSON.parse(ctx.request.body.data);
|
|
|
const filter = data.filter.split(';');
|
|
|
const responseData = { err: 0, msg: '', data: {} };
|
|
|
+ const where = { tid: this.ctx.tender.id };
|
|
|
for (const f of filter) {
|
|
|
switch (f) {
|
|
|
case 'change':
|
|
|
+ where.valid = 1;
|
|
|
+ if (ctx.session.sessionProject.page_show.isOnlyChecked) where.status = auditConst.flow.status.checked;
|
|
|
responseData.data[f] = await ctx.service.change.getAllDataByCondition({
|
|
|
columns: [ 'cid', 'code', 'name', 'selected' ],
|
|
|
- where: { tid: this.ctx.tender.id, valid: 1 },
|
|
|
+ where,
|
|
|
orders: [['sin_time', 'desc']],
|
|
|
});
|
|
|
break;
|
|
|
case 'change_project':
|
|
|
+ if (ctx.session.sessionProject.page_show.isOnlyChecked) where.status = auditConst.changeProject.status.checked;
|
|
|
responseData.data[f] = await ctx.service.changeProject.getAllDataByCondition({
|
|
|
columns: [ 'id', 'code', 'name', 'selected' ],
|
|
|
- where: { tid: this.ctx.tender.id },
|
|
|
+ where,
|
|
|
orders: [['in_time', 'desc']],
|
|
|
});
|
|
|
break;
|
|
|
case 'change_apply':
|
|
|
+ if (ctx.session.sessionProject.page_show.isOnlyChecked) where.status = auditConst.changeApplyProject.status.checked;
|
|
|
responseData.data[f] = await ctx.service.changeApply.getAllDataByCondition({
|
|
|
columns: [ 'id', 'code', 'name', 'selected' ],
|
|
|
- where: { tid: this.ctx.tender.id },
|
|
|
+ where,
|
|
|
orders: [['in_time', 'desc']],
|
|
|
});
|
|
|
break;
|