|  | @@ -224,7 +224,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              this.ledgerExtraColumn = ['is_tp'];
 | 
	
		
			
				|  |  |              if (this.ctx.session.sessionProject.gxby) this.ledgerExtraColumn.push('gxby_status', 'gxby_url', 'gxby_limit');
 | 
	
		
			
				|  |  |              if (this.ctx.session.sessionProject.dagl) this.ledgerExtraColumn.push('dagl_status', 'dagl_url', 'dagl_limit');
 | 
	
		
			
				|  |  | -            this.memoColumn = ['id', 'memo'];
 | 
	
		
			
				|  |  | +            this.ledgerMemoColumn = ['memo'];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              this.posColumn = ['id', 'tid', 'lid', 'name', 'position', 'porder', 'quantity', 'add_stage_order', 'drawing_code'];
 | 
	
	
		
			
				|  | @@ -233,14 +233,16 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              this.posExtraColumn = [];
 | 
	
		
			
				|  |  |              if (this.ctx.session.sessionProject.gxby) this.posExtraColumn.push('gxby_status', 'gxby_url', 'gxby_limit');
 | 
	
		
			
				|  |  |              if (this.ctx.session.sessionProject.dagl) this.posExtraColumn.push('dagl_status', 'dagl_url', 'dagl_limit');
 | 
	
		
			
				|  |  | +            this.posMemoColumn = [];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (!sjsRela) return;
 | 
	
		
			
				|  |  |              if (sjsRela) {
 | 
	
		
			
				|  |  |                  for (const field of sjsRela.ledgerCol) {
 | 
	
		
			
				|  |  |                      if (field.show) {
 | 
	
		
			
				|  |  | -                        this.memoColumn.push(field.field);
 | 
	
		
			
				|  |  | +                        this.ledgerMemoColumn.push(field.field);
 | 
	
		
			
				|  |  |                          this.ledgerColumn.push(field.field);
 | 
	
		
			
				|  |  |                          this.posColumn.push(field.field);
 | 
	
		
			
				|  |  | +                        this.posMemoColumn.push(field.field);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -250,7 +252,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              const ledgerData = ctx.stage.ledgerHis
 | 
	
		
			
				|  |  |                  ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.bills_file)
 | 
	
		
			
				|  |  |                  : await ctx.service.ledger.getAllDataByCondition({ columns: this.ledgerColumn, where: { tender_id: ctx.tender.id } });
 | 
	
		
			
				|  |  | -            const memoData = ctx.stage.ledgerHis ? await ctx.service.ledger.getAllDataByCondition({ columns: this.memoColumn, where: { tender_id: ctx.tender.id } }) : [];
 | 
	
		
			
				|  |  | +            const memoData = ctx.stage.ledgerHis ? await ctx.service.ledger.getMemoData(ctx.tender.id, this.ledgerMemoColumn) : [];
 | 
	
		
			
				|  |  |              const dgnData = await ctx.service.stageBillsDgn.getDgnData(ctx.tender.id);
 | 
	
		
			
				|  |  |              const extraData = await ctx.service.ledgerExtra.getData(ctx.tender.id, this.ledgerExtraColumn);
 | 
	
		
			
				|  |  |              const pcData = await ctx.service.stageBillsPc.getAllDataByCondition({ where: { sid: ctx.stage.id } });
 | 
	
	
		
			
				|  | @@ -284,6 +286,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              const posData = ctx.stage.ledgerHis
 | 
	
		
			
				|  |  |                  ? await ctx.helper.loadLedgerDataFromOss(ctx.stage.ledgerHis.pos_file)
 | 
	
		
			
				|  |  |                  : await ctx.service.pos.getAllDataByCondition({ columns: this.posColumn, where: { tid: ctx.tender.id } });
 | 
	
		
			
				|  |  | +            const memoData = ctx.stage.ledgerHis ? await ctx.service.pos.getMemoData(ctx.tender.id, this.posMemoColumn) : [];
 | 
	
		
			
				|  |  |              const extraData = await ctx.service.posExtra.getData(ctx.tender.id, this.posExtraColumn);
 | 
	
		
			
				|  |  |              // 根据当前人,或指定对象查询数据
 | 
	
		
			
				|  |  |              if (ctx.stage.readOnly) {
 | 
	
	
		
			
				|  | @@ -300,6 +303,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |              // 查询截止上期数据
 | 
	
		
			
				|  |  |              const preStageData = ctx.stage.order > 1 ? await ctx.service.stagePosFinal.getFinalData(ctx.tender.data, ctx.stage.order - 1) : [];
 | 
	
		
			
				|  |  |              this.ctx.helper.assignRelaData(posData, [
 | 
	
		
			
				|  |  | +                { data: memoData, fields: this.posMemoColumn, prefix: '', relaId: 'id'},
 | 
	
		
			
				|  |  |                  { data: extraData, fields: this.posExtraColumn, prefix: '', relaId: 'id'},
 | 
	
		
			
				|  |  |                  { data: curStageData, fields: ['contract_qty', 'contract_expr', 'qc_qty', 'qc_minus_qty', 'postil'], prefix: '', relaId: 'pid' },
 | 
	
		
			
				|  |  |                  { data: preStageData, fields: ['contract_qty', 'qc_qty', 'qc_minus_qty'], prefix: 'pre_', relaId: 'pid' },
 |