ソースを参照

审核比较,总额计量相关

MaiXinRong 2 年 前
コミット
c32604e715
1 ファイル変更5 行追加5 行削除
  1. 5 5
      app/controller/stage_controller.js

+ 5 - 5
app/controller/stage_controller.js

@@ -1517,11 +1517,11 @@ module.exports = app => {
                         ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.bills_file)
                         : await ctx.service.ledger.getData(ctx.tender.id);
                     const bpcData = await ctx.service.stageBillsPc.getAllDataByCondition({ where: { sid: ctx.stage.id } });
-                    if (bpcData.length > 0) {
-                        this.ctx.helper.assignRelaData(result.main.ledger, [
-                            { data: bpcData, fields: ['pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
-                        ]);
-                    }
+                    const extraData = await ctx.service.ledgerExtra.getData(ctx.tender.id, ['id', 'is_tp']);
+                    this.ctx.helper.assignRelaData(result.main.ledger, [
+                        { data: bpcData, fields: ['pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
+                        { data: extraData, fields: ['is_tp'], prefix: '', relaId: 'id' },
+                    ]);
 
                     result.main.pos = ctx.stage.ledgerHis
                         ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.pos_file)