|  | @@ -332,11 +332,10 @@ class StageIm {
 | 
	
		
			
				|  |  |              if (p.children && p.children.length > 0) {
 | 
	
		
			
				|  |  |                  this._recursiveGenerateTzGclBills(p, im);
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  | -                if ((!p.b_code || p.b_code === '') || (p.children && p.children.length > 0)) {
 | 
	
		
			
				|  |  | -                    continue;
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                if (!this.ctx.helper.checkZero(p.contract_qty) || !this.ctx.helper.checkZero(p.contract_tp) ||
 | 
	
		
			
				|  |  | -                    !this.ctx.helper.checkZero(p.qc_qty) || !this.ctx.helper.checkZero(p.qc_tp)) {
 | 
	
		
			
				|  |  | +                if ((!p.b_code || p.b_code === '') || (p.children && p.children.length > 0)) continue;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                if (this.ctx.helper.checkZero(p.contract_qty) && this.ctx.helper.checkZero(p.contract_tp) &&
 | 
	
		
			
				|  |  | +                    this.ctx.helper.checkZero(p.qc_qty) && this.ctx.helper.checkZero(p.qc_tp)) {
 | 
	
		
			
				|  |  |                      continue;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  let b = this._.find(im.gclBills, { bid: p.id });
 | 
	
	
		
			
				|  | @@ -419,7 +418,7 @@ class StageIm {
 | 
	
		
			
				|  |  |          if (node.children && node.children.length > 0) {
 | 
	
		
			
				|  |  |              const posterity = this.billsTree.getPosterity(node);
 | 
	
		
			
				|  |  |              for (const p of posterity) {
 | 
	
		
			
				|  |  | -                if (!p.children || p.children.length === 0) continue;
 | 
	
		
			
				|  |  | +                if (p.children && p.children.length > 0) continue;
 | 
	
		
			
				|  |  |                  if (!helper.checkZero(p.contract_qty) || !helper.checkZero(p.contract_tp) ||
 | 
	
		
			
				|  |  |                      !helper.checkZero(p.qc_qty) || !helper.checkZero(p.qc_tp))
 | 
	
		
			
				|  |  |                      return true;
 | 
	
	
		
			
				|  | @@ -447,32 +446,32 @@ class StageIm {
 | 
	
		
			
				|  |  |       * @param {Object} node - 生成中间计量表的节点
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      _generateTzImData(node) {
 | 
	
		
			
				|  |  | -        if (this._checkUsed(node)) {
 | 
	
		
			
				|  |  | -            const nodeIndex = this.billsTree.getNodeSerialNo(node);
 | 
	
		
			
				|  |  | -            const peg = this._getPegNode(node);
 | 
	
		
			
				|  |  | -            const im = {
 | 
	
		
			
				|  |  | -                id: this.ImData.length + 1,
 | 
	
		
			
				|  |  | -                lid: node.id, pid: '', code: node.code,
 | 
	
		
			
				|  |  | -                jl: node.gather_tp, contract_jl: node.contract_tp, qc_jl: node.qc_tp,
 | 
	
		
			
				|  |  | -                pre_jl: node.pre_gather_tp, pre_contract_jl: node.pre_contract_tp, pre_qc_jl: node.pre_qc_tp,
 | 
	
		
			
				|  |  | -                end_jl: node.end_gather_tp, end_contract_jl: node.end_contract_tp, end_qc_jl: node.end_qc_tp,
 | 
	
		
			
				|  |  | -                peg: peg ? this._getPegStr(peg.name) : '', drawing_code: this._getDrawingCode(node),
 | 
	
		
			
				|  |  | -                position: '',
 | 
	
		
			
				|  |  | -                lIndex: nodeIndex,
 | 
	
		
			
				|  |  | -            };
 | 
	
		
			
				|  |  | -            if (this.ctx.stage.im_gather && node.check) {
 | 
	
		
			
				|  |  | -                im.bw = this._getZlGatherBw(node, peg);
 | 
	
		
			
				|  |  | -                im.xm = '';
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                im.bw = this._getZlNormalBw(node, peg);
 | 
	
		
			
				|  |  | -                im.xm = node.name;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            this._checkCustomDetail(im);
 | 
	
		
			
				|  |  | -            im.check = this.ctx.stage.im_gather && node.check;
 | 
	
		
			
				|  |  | -            this._generateTzGclBillsData(node, im);
 | 
	
		
			
				|  |  | -            this.ImData.push(im);
 | 
	
		
			
				|  |  | -            this._generateTzChangeData(node, im);
 | 
	
		
			
				|  |  | +        if (!this._checkUsed(node)) return;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        const nodeIndex = this.billsTree.getNodeSerialNo(node);
 | 
	
		
			
				|  |  | +        const peg = this._getPegNode(node);
 | 
	
		
			
				|  |  | +        const im = {
 | 
	
		
			
				|  |  | +            id: this.ImData.length + 1,
 | 
	
		
			
				|  |  | +            lid: node.id, pid: '', code: node.code,
 | 
	
		
			
				|  |  | +            jl: node.gather_tp, contract_jl: node.contract_tp, qc_jl: node.qc_tp,
 | 
	
		
			
				|  |  | +            pre_jl: node.pre_gather_tp, pre_contract_jl: node.pre_contract_tp, pre_qc_jl: node.pre_qc_tp,
 | 
	
		
			
				|  |  | +            end_jl: node.end_gather_tp, end_contract_jl: node.end_contract_tp, end_qc_jl: node.end_qc_tp,
 | 
	
		
			
				|  |  | +            peg: peg ? this._getPegStr(peg.name) : '', drawing_code: this._getDrawingCode(node),
 | 
	
		
			
				|  |  | +            position: '',
 | 
	
		
			
				|  |  | +            lIndex: nodeIndex,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        if (this.ctx.stage.im_gather && node.check) {
 | 
	
		
			
				|  |  | +            im.bw = this._getZlGatherBw(node, peg);
 | 
	
		
			
				|  |  | +            im.xm = '';
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            im.bw = this._getZlNormalBw(node, peg);
 | 
	
		
			
				|  |  | +            im.xm = node.name;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        this._checkCustomDetail(im);
 | 
	
		
			
				|  |  | +        im.check = this.ctx.stage.im_gather && node.check;
 | 
	
		
			
				|  |  | +        this._generateTzGclBillsData(node, im);
 | 
	
		
			
				|  |  | +        this.ImData.push(im);
 | 
	
		
			
				|  |  | +        this._generateTzChangeData(node, im);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      _addBwBillsGclBills(im, bills, pos) {
 |