From 58392ca9f9fcf4747f5a6a888c122bf80ef615af Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Wed, 19 Nov 2025 14:29:21 +0800 Subject: [PATCH] 1.处理采购模块,从本位币单价算本位币金额时,算的不对问题 2.处理计算方案,保存自定义参数保存报错 --- src/components/Common/CommonElementEvent.js | 1 + src/components/Common/commonBusiness.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Common/CommonElementEvent.js b/src/components/Common/CommonElementEvent.js index e2f4b3b..49f9b36 100644 --- a/src/components/Common/CommonElementEvent.js +++ b/src/components/Common/CommonElementEvent.js @@ -2788,6 +2788,7 @@ export default (ChildComponent) => { }); data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamDataNew, customizeParamDelDataNew)); } else if (commonUtils.isNotEmptyObject(customizeParamConfig)) { + customizeParamConfig.sTbName = 'sisformulacustomizeparam'; data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamData, customizeParamDelData)); } if (commonUtils.isNotEmptyObject(selfParamConfig)) { diff --git a/src/components/Common/commonBusiness.js b/src/components/Common/commonBusiness.js index b6b4c2a..51ae065 100644 --- a/src/components/Common/commonBusiness.js +++ b/src/components/Common/commonBusiness.js @@ -452,7 +452,7 @@ export function getCalculateByPrice(app, type, masterData, tableDataRow, sFieldN dProductPrice = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignPrice * dCurrencyRate : 0, dNetPrice); /* 本位币单价 */ dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dNetMoney); /* 金额 */ } else { - if( dProductForeignPrice > 0 ) { /* 如果有外币情况 */ + if(sFieldName === `d${type}ForeignPrice` && dProductForeignPrice > 0 ) { /* 如果有外币情况 */ dProductForeignMoney = commonUtils.convertFixNum(dProductQty * dProductForeignPrice, dNetMoney); /* 外币金额 */ dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dNetMoney); /* 金额 */ if(sFieldName !== `d${type}Price`) { /* 输入数量等 */ @@ -589,7 +589,7 @@ export function getCalculateByPriceNew(app, type, masterData, tableDataRow, sFil } /* 销售对账 改变数量与金额 同步dNSrcNoMoney = 外币金额 */ const dSrcNoCheckMoney = dProductForeignMoney; /* 金额 */ - if (commonUtils.isNotEmptyNumber(dLossMoney)) { /* 减去报损 重新算金额 */ + if (commonUtils.isNotEmptyNumber(dLossMoney) && dLossMoney > 0) { /* 减去报损 重新算金额 */ tableDataRow = getCalculateMoneyByLossMoney(app, type, masterData, tableDataRow, dSrcNoCheckMoney, dLossMoney); /* dSrcNoCheckMoney = dLossMoney 重新算外币金额 */ dProductForeignMoney = tableDataRow[`d${type}ForeignMoney`]; dProductMoney = tableDataRow[`d${type}Money`]; -- libgit2 0.22.2