Explorar o código

暂存计量相关

MaiXinRong %!s(int64=2) %!d(string=hai) anos
pai
achega
dc937300b7
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/service/stage_stash.js

+ 4 - 0
app/service/stage_stash.js

@@ -228,6 +228,10 @@ module.exports = app => {
             const insertBillsData = [], insertPosData = [], insertChangeData = [];
 
             const bills = await this.ctx.service.ledger.getAllDataByCondition({ where: { tender_id: stage.tid, is_leaf: true } });
+            const extraData = await this.ctx.service.ledgerExtra.getData(stage.tid, ['id', 'is_tp']);
+            this.ctx.helper.assignRelaData(bills, [
+                { data: extraData, fields: ['is_tp'], prefix: '', relaId: 'id' },
+            ]);
             const pos = await this.ctx.service.pos.getAllDataByCondition({ where: { tid: stage.tid } });
 
             const said = this.ctx.session.sessionUser.accountId;