| 
					
				 | 
			
			
				@@ -659,13 +659,19 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 toastr.error('查询变更令有误,请刷新页面后重试'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _matchPos(match, change) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return match && this.callData.pos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ? (change.gcl_id === this.callData.bills.id && change.b_bwmx === this.callData.pos.name) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                : true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _matchBillsParent(match, change) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return match ? (!change.b_bwmx || change.b_bwmx === this.callData.leafXmj.name) : true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _filterChange(filterEmpty, matchPosName) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.displayChanges = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const c of this.changes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const filterVisible = filterEmpty ? (c.vamount ? !checkZero(c.vamount) : false) : true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const matchVisible = matchPosName && this.callData.pos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    ? (c.gcl_id === this.callData.bills.id && c.b_bwmx === this.callData.pos.name) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    : true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const matchVisible = this.callData.pos ? this._matchPos(matchPosName, c) : this._matchBillsParent(matchPosName, c); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if ((filterVisible && matchVisible) || (c.org_uamount)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     this.displayChanges.push(c); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -675,11 +681,12 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         loadChanges(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.callData = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (this.callData.pos) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $('#matchPos').parent().show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $('#matchPos').parent().hide(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // if (this.callData.pos) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //     $('#matchPos').parent().show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //     $('#matchPos').parent().hide(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $('#matchPos').parent().show(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const self = this; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $('#b-code-hint').text('当前变更清单:' + data.bills.b_code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             postData(window.location.pathname + '/valid-change', data, function (result) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -725,7 +732,8 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const nodePos = stagePos.getLedgerPos(data.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (nodePos && nodePos.length > 0) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const minus = col.field === 'qc_minus_qty' ? 1 : 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                changesObj.loadChanges({bills: data, minus, noValue: minus}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const leafXmj = stageTree.getLeafXmjParent(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                changesObj.loadChanges({bills: data, minus, noValue: minus, leafXmj: leafXmj}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             default: return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |