| 
					
				 | 
			
			
				@@ -806,7 +806,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             info.end_gather_tp = helper.add(info.pre_gather_tp, info.gather_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             info.end_yf_tp = helper.add(info.pre_yf_tp, info.yf_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherZoneTenderInfo(tender, index, zone) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const info = await this._getBaseTenderInfo(tender); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const [stages, preStage, endStage] = await this._getTimeZoneStages(tender, zone); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -852,7 +851,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             await this._getStageTenderInfo(stages[0], info); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultTenderInfo.push(info); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherLedgerTenderInfo(tender, index) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const info = await this._getBaseTenderInfo(tender); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultTenderInfo.push(info); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -862,7 +860,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             info.spec = sKey; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultTenderInfo.push(info); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async getGatherTenderInfo(memFieldKeys, gsDefine, gsCustom) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsDefine || !gsDefine.enable) return []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsCustom || !gsCustom.tenders || gsCustom.tenders.length === 0) return []; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -933,7 +930,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (fun) fun(rdp, dealPay); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _checkStagePayCalc(tender, stage, dealPay) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!stage.readOnly) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 // 计算 本期金额 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -941,7 +937,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 await payCalculator.calculateAll(dealPay); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherStagePay(completeData, tender, stage, hasPre) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (stage) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 completeData.id = tender.id; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1048,7 +1043,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const stages = await this._getCheckedStages(tender.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             await this._gatherStagePay(completeData, tender, stages[0], hasPre); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async getGatherStagePay(memFieldKeys, gsDefine, gsCustom) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsDefine || !gsDefine.enable) return []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsCustom || !gsCustom.tenders || gsCustom.tenders.length === 0) return []; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1121,7 +1115,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (fun) fun(rdb, db); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherCommonDealBills(sTender, completeData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const self = this; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const tender = await this.ctx.service.tender.getCheckTender(sTender.tid); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1138,7 +1131,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 gatherData['s_' + 'tp'] = self.ctx.helper.add(gatherData['s_' + 'tp'], sourceData.total_price); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherSpecialDealBills(sTender, sKey) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const tender = await this.ctx.service.tender.getCheckTender(sTender.tid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             await this._gatherDealBills(tender, function (gatherData, sourceData) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1148,7 +1140,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 gatherData[prefix + 'tp'] = sourceData.total_price; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async getGatherDealBills(memFieldKeys, gsDefine, gsCustom) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsDefine || !gsDefine.enable) return []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!gsCustom || !gsCustom.tenders || gsCustom.tenders.length === 0) return []; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1182,7 +1173,6 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async _gatherChange(tender, hasUsed) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const self = this; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1299,6 +1289,7 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 d.end_arrive_tp = this.ctx.helper.add(d.pre_arrive_tp, d.arrive_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 d.end_deduct_qty = this.ctx.helper.add(d.pre_deduct_qty, d.deduct_qty); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 d.end_deduct_tp = this.ctx.helper.add(d.pre_deduct_tp, d.deduct_tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                d.tender_name = tender.name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultStageJgcl.push(...data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1357,6 +1348,7 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return x.filename + x.fileext; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 d.proof = names.join('\n'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                d.tender_name = tender.name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultStageBonus.push(...data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1417,6 +1409,7 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     d.pre_tp = pd.tp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 d.end_tp = this.ctx.helper.add(d.pre_tp, d.tp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                d.tender_name = tender.name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.resultStageOther.push(...data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |