| 
					
				 | 
			
			
				@@ -140,7 +140,9 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (const [index, s] of result.ledgerListData.entries()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 gclGatherModel.loadLedgerData(ledger, s); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 gclGatherModel.loadPosData(pos, result.posListData[index]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const oneGclGatherData = gclGatherModel.gatherGclData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const oneGclGatherData = gclGatherModel.gatherGclData().filter(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return item.qc_qty || item.contract_qty 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 newGclGatherListData.push(oneGclGatherData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             gclGatherListData = newGclGatherListData; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -419,7 +421,7 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const select = SpreadJsObj.getSelectObject(sheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const gcl = gclGatherData[gclIndex].leafXmjs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const ms_id = isStageSelf ? parseInt($('#myTab').find('.active').data('msid')) : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const index = materialChecklistData.indexOf(select); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const datas = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (const xmj of gcl) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -482,16 +484,17 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const gcl = gclGatherData[gclIndex].leafXmjs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const datas = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (const xmj of gcl) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         xmj_id: xmj.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         gcl_id: xmj.gcl_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         mx_id: xmj.mx_id !== undefined ? xmj.mx_id : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (ms_id) data.ms_id = ms_id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     datas.push(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (isStageSelf) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 取所有的gclGatherData才行,然后获取下的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const gclData = gclGatherData[gclIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     for (const [index, ms] of materialStageData.entries()) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -591,16 +594,17 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const gcl = gclGatherData[gclIndex].leafXmjs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const datas = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     for (const xmj of gcl) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             xmj_id: xmj.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             gcl_id: xmj.gcl_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             mx_id: xmj.mx_id !== undefined ? xmj.mx_id : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (ms_id) data.ms_id = ms_id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         datas.push(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (isStageSelf) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 取所有的gclGatherData才行,然后获取下的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const gclData = gclGatherData[gclIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         for (const [index, ms] of materialStageData.entries()) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -712,16 +716,17 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const gcl = gclGatherData[gclIndex].leafXmjs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const datas = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (const xmj of gcl) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const data2 = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         xmj_id: xmj.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         gcl_id: xmj.gcl_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         mx_id: xmj.mx_id !== undefined ? xmj.mx_id : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (ms_id) data2.ms_id = ms_id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     datas.push(data2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (isStageSelf) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    const ms_id = isStageSelf ? materialStageData[0].id : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 取所有的gclGatherData才行,然后获取下的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const gclData = gclGatherData[gclIndex]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     for (const [index, ms] of materialStageData.entries()) { 
			 |