From ffb3bd83132ed2b6bd0649165f769d504f33eede Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Wed, 10 Jun 2026 18:02:13 +0800 Subject: [PATCH] 1.工单不要算箱包数 --- src/components/Common/commonBusiness.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/Common/commonBusiness.js b/src/components/Common/commonBusiness.js index b3ac4eb..6a7c5b5 100644 --- a/src/components/Common/commonBusiness.js +++ b/src/components/Common/commonBusiness.js @@ -1563,6 +1563,12 @@ export function getCalculateAllMoney(app, type, sFieldName, masterData, tableDat const sCkxDirectSolutionPack = commonUtils.isNotEmptyObject(app.systemData) && commonUtils.isNotEmptyObject(app.systemData.filter(item => item.sName === 'CkxDirectSolutionPack')) ? app.systemData.filter(item => item.sName === 'CkxDirectSolutionPack')[0].sValue : '0'; /* 默认反算 */ + const hasWork = location.pathname?.toLowerCase()?.includes('workorder'); + const hasQuo = location.pathname?.toLowerCase()?.includes('quotation'); + // const bCalPack = !hasWork && !hasQuo; + const bCalPack = !hasWork; + console.log('bbb2222', bCalPack, hasWork, sCkxDirectSolutionPack); + if (sFieldName === 'sMaterialsStyle' || sFieldName === 'sMaterialsName' || sFieldName === 'dAuxiliaryQty' || sFieldName === `d${type}Price` || sFieldName === `dN${type}Price` || sFieldName === `d${type}ForeignPrice` || sFieldName === 'sTaxId' || sFieldName === 'sTaxName' || sFieldName === 'sSupplyId' || sFieldName === 'sSupplyName' || sFieldName === 'sProcessName') { if (type === 'Product') { tableDataRow = getCalculateByPriceNew(app, type, masterData, tableDataRow, sFieldName); @@ -1570,10 +1576,12 @@ export function getCalculateAllMoney(app, type, sFieldName, masterData, tableDat tableDataRow = getCalculateByPrice(app, type, masterData, tableDataRow, sFieldName); } } else if (sFieldName === `d${type}Qty`) { - if (sCkxDirectSolutionPack === '0') { /* 箱包反算 */ - tableDataRow = getCalculatedReserveBags(tableDataRow, sFieldName); - } else { /* 箱包正算 */ - tableDataRow = getCalculatedReserveBags1(tableDataRow, sFieldName); + if (bCalPack) { + if (sCkxDirectSolutionPack === '0') { /* 箱包反算 */ + tableDataRow = getCalculatedReserveBags(tableDataRow, sFieldName); + } else { /* 箱包正算 */ + tableDataRow = getCalculatedReserveBags1(tableDataRow, sFieldName); + } } if (type === 'Product') { @@ -1599,7 +1607,7 @@ export function getCalculateAllMoney(app, type, sFieldName, masterData, tableDat tableDataRow = getCalculateNoTaxMoney(app, masterData, tableDataRow, type); } else if (sFieldName === 'dAuxiliaryLossQty' || sFieldName === 'dLossQty') { tableDataRow = getCalculatedLossMoney(app, masterData, tableDataRow, type); - } else if (sFieldName === 'dTrunkQty' || sFieldName === 'dFractionQty' || sFieldName === 'dPackQty' || sFieldName === 'dGiveQty') { + } else if (bCalPack && (sFieldName === 'dTrunkQty' || sFieldName === 'dFractionQty' || sFieldName === 'dPackQty' || sFieldName === 'dGiveQty')) { if (sCkxDirectSolutionPack === '0') { /* 箱包反算 */ tableDataRow = getCalculatedReserveBags(tableDataRow, sFieldName); } else { /* 箱包正算 */ -- libgit2 0.22.2