| 
															
																@@ -68,14 +68,14 @@ function calcOneBQJC(xmj) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     const notx = findNotJoinLeafXmj(xmj); 
															 | 
															
															 | 
															
																     const notx = findNotJoinLeafXmj(xmj); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     if (notx === undefined) { 
															 | 
															
															 | 
															
																     if (notx === undefined) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         const list = xmj.mx_id !== undefined ? getMaterialListByLeafXmj(xmj.gcl_id, xmj.id, xmj.mx_id) : getMaterialListByLeafXmj(xmj.gcl_id, xmj.id); 
															 | 
															
															 | 
															
																         const list = xmj.mx_id !== undefined ? getMaterialListByLeafXmj(xmj.gcl_id, xmj.id, xmj.mx_id) : getMaterialListByLeafXmj(xmj.gcl_id, xmj.id); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        // const notx2 = findNotChangeLeafXmj(xmj); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        const notx2 = findNotChangeLeafXmj(xmj); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         // if (notx2 !== undefined) { 
															 | 
															
															 | 
															
																         // if (notx2 !== undefined) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //     for (const l of list) { 
															 | 
															
															 | 
															
																         //     for (const l of list) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //         jiacha = ZhCalc.add(jiacha, ZhCalc.mul(ZhCalc.mul(xmj.contract_qty, l.quantity), getMpSpreadByMBData(l.mb_id))); 
															 | 
															
															 | 
															
																         //         jiacha = ZhCalc.add(jiacha, ZhCalc.mul(ZhCalc.mul(xmj.contract_qty, l.quantity), getMpSpreadByMBData(l.mb_id))); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //     } 
															 | 
															
															 | 
															
																         //     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         // } else { 
															 | 
															
															 | 
															
																         // } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         for (const l of list) { 
															 | 
															
															 | 
															
																         for (const l of list) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            jiacha = ZhCalc.add(jiacha, ZhCalc.mul(ZhCalc.mul(calcQty(xmj, l.is_join), l.quantity), getMpSpreadByMBData(l.mb_id))); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            jiacha = ZhCalc.add(jiacha, ZhCalc.mul(ZhCalc.mul(calcQty(xmj, notx2 !== undefined ? 2 : 1), l.quantity), getMpSpreadByMBData(l.mb_id))); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         // } 
															 | 
															
															 | 
															
																         // } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -375,13 +375,11 @@ $(document).ready(() => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     updateBillsData(ms_id); 
															 | 
															
															 | 
															
																                     updateBillsData(ms_id); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     const newGclGatherListData = []; 
															 | 
															
															 | 
															
																                     const newGclGatherListData = []; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     for (const [index, s] of result.ledgerListData.entries()) { 
															 | 
															
															 | 
															
																                     for (const [index, s] of result.ledgerListData.entries()) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        // gclGatherModel.clearGatherData(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         gclGatherModel.loadLedgerData(_.cloneDeep(ledger), s); 
															 | 
															
															 | 
															
																                         gclGatherModel.loadLedgerData(_.cloneDeep(ledger), s); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         gclGatherModel.loadPosData(_.cloneDeep(pos), result.posListData[index]); 
															 | 
															
															 | 
															
																                         gclGatherModel.loadPosData(_.cloneDeep(pos), result.posListData[index]); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         const oneGclGatherData = gclGatherModel.gatherGclData().filter(item => { 
															 | 
															
															 | 
															
																                         const oneGclGatherData = gclGatherModel.gatherGclData().filter(item => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             return item.qc_qty || item.contract_qty || item.qc_minus_qty 
															 | 
															
															 | 
															
																                             return item.qc_qty || item.contract_qty || item.qc_minus_qty 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }); 
															 | 
															
															 | 
															
																                         }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        console.log(oneGclGatherData); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         newGclGatherListData.push(oneGclGatherData); 
															 | 
															
															 | 
															
																                         newGclGatherListData.push(oneGclGatherData); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     gclGatherListData = newGclGatherListData; 
															 | 
															
															 | 
															
																                     gclGatherListData = newGclGatherListData; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1023,7 +1021,6 @@ $(document).ready(() => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const data = { 
															 | 
															
															 | 
															
																             const data = { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 type: type, 
															 | 
															
															 | 
															
																                 type: type, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 select: type === 'join' ? findNotJoinLeafXmj(select) : select, 
															 | 
															
															 | 
															
																                 select: type === 'join' ? findNotJoinLeafXmj(select) : select, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // gather_qty: select.gather_qty, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 ms_id: $('#myTab').find('.active').data('msid') || null, 
															 | 
															
															 | 
															
																                 ms_id: $('#myTab').find('.active').data('msid') || null, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }; 
															 | 
															
															 | 
															
																             }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             // 添加到 
															 | 
															
															 | 
															
																             // 添加到 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1050,7 +1047,6 @@ $(document).ready(() => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             const data = { 
															 | 
															
															 | 
															
																             const data = { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 type: type, 
															 | 
															
															 | 
															
																                 type: type, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 select: type === 'change' ? findNotChangeLeafXmj(select) : select, 
															 | 
															
															 | 
															
																                 select: type === 'change' ? findNotChangeLeafXmj(select) : select, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // gather_qty: type === 'change' ? select.gather_qty : select.contract_qty, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 ms_id: $('#myTab').find('.active').data('msid') || null, 
															 | 
															
															 | 
															
																                 ms_id: $('#myTab').find('.active').data('msid') || null, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }; 
															 | 
															
															 | 
															
																             }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             // 添加到 
															 | 
															
															 | 
															
																             // 添加到 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1079,6 +1075,9 @@ $(document).ready(() => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }; 
															 | 
															
															 | 
															
																             }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (type === 'noself') { 
															 | 
															
															 | 
															
																             if (type === 'noself') { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 if (isStageSelf) { 
															 | 
															
															 | 
															
																                 if (isStageSelf) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    data.select.contract_qty = {}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    data.select.qc_qty = {}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    data.select.qc_minus_qty = {}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     data.select.gather_qty = {}; 
															 | 
															
															 | 
															
																                     data.select.gather_qty = {}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     const ledgerSheet = ledgerSpread.getActiveSheet(); 
															 | 
															
															 | 
															
																                     const ledgerSheet = ledgerSpread.getActiveSheet(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet); 
															 | 
															
															 | 
															
																                     const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet); 
															 |