|  | @@ -641,6 +641,7 @@ const gatherStagePay = {
 | 
	
		
			
				|  |  |              {name: '本期完成计量', ptype: 4, order: 1, visible: false},
 | 
	
		
			
				|  |  |              {name: '业主违约罚金', match: '业主违约罚金', order: 2},
 | 
	
		
			
				|  |  |              {name: '迟付款利息', match: '迟付款利息', order: 3},
 | 
	
		
			
				|  |  | +            {flow: true, minus: 0, rid: ['业主违约罚金', '迟付款利息'], order: 4},
 | 
	
		
			
				|  |  |              {name: '其他付款', minus: 0, rid: ['业主违约罚金', '迟付款利息'], order: 4},
 | 
	
		
			
				|  |  |              {name: '合计', order: 5, order_calc: 'o1+o2+o3+o4', },
 | 
	
		
			
				|  |  |              {name: '动员预付款', order: 6},
 | 
	
	
		
			
				|  | @@ -655,7 +656,7 @@ const gatherStagePay = {
 | 
	
		
			
				|  |  |              {name: '支付', ptype: 2, order: 15},
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    _gatherFields: function (ctx, d, source, calcFields) {
 | 
	
		
			
				|  |  | +    _filterFields: function (ctx, d, source) {
 | 
	
		
			
				|  |  |          let filterData = source;
 | 
	
		
			
				|  |  |          if (d.ptype) {
 | 
	
		
			
				|  |  |              filterData = filterData.filter(function (x) {
 | 
	
	
		
			
				|  | @@ -686,6 +687,10 @@ const gatherStagePay = {
 | 
	
		
			
				|  |  |                  return true;
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        return filterData;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    _gatherFields: function (ctx, d, source, calcFields) {
 | 
	
		
			
				|  |  | +        const filterData = this._filterFields(ctx, d, source);
 | 
	
		
			
				|  |  |          for (const fd of filterData) {
 | 
	
		
			
				|  |  |              for (const prop in fd) {
 | 
	
		
			
				|  |  |                  if (prop.indexOf('tp') >= 0) {
 | 
	
	
		
			
				|  | @@ -702,15 +707,28 @@ const gatherStagePay = {
 | 
	
		
			
				|  |  |          const result = [], calcFields = [];
 | 
	
		
			
				|  |  |          for (const c of options.custom) {
 | 
	
		
			
				|  |  |              const cData = JSON.parse(JSON.stringify(c));
 | 
	
		
			
				|  |  | -            if (!cData.order_calc && cData.empty !== 1) {
 | 
	
		
			
				|  |  | -                this._gatherFields(ctx, cData, gatherData, calcFields);
 | 
	
		
			
				|  |  | +            cData.subOrder = 0;
 | 
	
		
			
				|  |  | +            if (cData.flow) {
 | 
	
		
			
				|  |  | +                const fData = this._filterFields(ctx, cData, gatherData);
 | 
	
		
			
				|  |  | +                for (const [i, f] of fData.entries()) {
 | 
	
		
			
				|  |  | +                    f.order = cData.order;
 | 
	
		
			
				|  |  | +                    f.subOrder = i;
 | 
	
		
			
				|  |  | +                    result.push(fData);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                if (!cData.order_calc && cData.empty !== 1) {
 | 
	
		
			
				|  |  | +                    this._gatherFields(ctx, cData, gatherData, calcFields);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                result.push(cData);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            result.push(cData);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          rdaUtils.orderCalc(ctx, result, calcFields);
 | 
	
		
			
				|  |  |          data[options.table] = result.filter(function (x) {
 | 
	
		
			
				|  |  |              return x.visible === undefined || x.visible;
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | +        data[options.table].sort(function (a, b) {
 | 
	
		
			
				|  |  | +            return a.order === b.order ? a.subOrder - b.subOrder : a.order - b.order;
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  const union = {
 |