|
@@ -522,6 +522,7 @@ module.exports = app => {
|
|
async getStagePayData(tid, sid, fields) {
|
|
async getStagePayData(tid, sid, fields) {
|
|
await this.ctx.service.tender.checkTender(tid);
|
|
await this.ctx.service.tender.checkTender(tid);
|
|
await this.ctx.service.stage.checkStage(sid);
|
|
await this.ctx.service.stage.checkStage(sid);
|
|
|
|
+ const stage = this.ctx.stage;
|
|
|
|
|
|
const dealPay = await this.ctx.service.stagePay.getStagePays(this.ctx.stage);
|
|
const dealPay = await this.ctx.service.stagePay.getStagePays(this.ctx.stage);
|
|
|
|
|
|
@@ -535,7 +536,7 @@ module.exports = app => {
|
|
if (this._checkFieldsExistReg(fields, 'r[0-9]+_tp')) {
|
|
if (this._checkFieldsExistReg(fields, 'r[0-9]+_tp')) {
|
|
const validRole = this._getStageValidRole();
|
|
const validRole = this._getStageValidRole();
|
|
const allStagePays = await this.ctx.service.stagePay.getAllDataByCondition({
|
|
const allStagePays = await this.ctx.service.stagePay.getAllDataByCondition({
|
|
- where: {sid: this.ctx.stage.id, stimes: this.ctx.stage.curTimes}
|
|
|
|
|
|
+ where: {sid: stage.id, stimes: stage.curTimes}
|
|
});
|
|
});
|
|
|
|
|
|
for (const [i, role] of validRole.entries()) {
|
|
for (const [i, role] of validRole.entries()) {
|