|
@@ -240,9 +240,9 @@ module.exports = app => {
|
|
|
preStageData;
|
|
|
// 当前操作人查看最新数据,其他人查看历史数据
|
|
|
if (ctx.stage.readOnly) {
|
|
|
- curStageData = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, ctx.stage.curOrder);
|
|
|
+ curStageData = await ctx.service.stageBills.getAuditorStageData2(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, ctx.stage.curOrder);
|
|
|
} else {
|
|
|
- curStageData = await ctx.service.stageBills.getLastestStageData(ctx.tender.id, ctx.stage.id);
|
|
|
+ curStageData = await ctx.service.stageBills.getLastestStageData2(ctx.tender.id, ctx.stage.id);
|
|
|
const surplus = this._checkUniqData(curStageData, 'lid');
|
|
|
if (surplus.length > 0) {
|
|
|
await ctx.service.stageBills.deleteById(surplus);
|
|
@@ -608,7 +608,7 @@ module.exports = app => {
|
|
|
result.ledger = await ctx.service.ledger.getData(ctx.tender.id);
|
|
|
result.pos = await ctx.service.pos.getPosData({ tid: ctx.tender.id });
|
|
|
if (ctx.stage.readOnly) {
|
|
|
- const curStage = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, ctx.stage.curOrder);
|
|
|
+ const curStage = await ctx.service.stageBills.getAuditorStageData2(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, ctx.stage.curOrder);
|
|
|
this.ctx.helper.assignRelaData(result.ledger, [
|
|
|
{ data: curStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid' },
|
|
|
]);
|
|
@@ -617,7 +617,7 @@ module.exports = app => {
|
|
|
{ data: curPosStage, fields: ['contract_qty', 'qc_qty'], prefix: '', relaId: 'pid' },
|
|
|
]);
|
|
|
} else {
|
|
|
- const curStage = await ctx.service.stageBills.getLastestStageData(ctx.tender.id, ctx.stage.id);
|
|
|
+ const curStage = await ctx.service.stageBills.getLastestStageData2(ctx.tender.id, ctx.stage.id);
|
|
|
this.ctx.helper.assignRelaData(result.ledger, [
|
|
|
{ data: curStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid' },
|
|
|
]);
|