Commit 58392ca9f9fcf4747f5a6a888c122bf80ef615af

Authored by Min
1 parent 78e9e2f1

1.处理采购模块,从本位币单价算本位币金额时,算的不对问题

2.处理计算方案,保存自定义参数保存报错
src/components/Common/CommonElementEvent.js
... ... @@ -2788,6 +2788,7 @@ export default (ChildComponent) => {
2788 2788 });
2789 2789 data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamDataNew, customizeParamDelDataNew));
2790 2790 } else if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  2791 + customizeParamConfig.sTbName = 'sisformulacustomizeparam';
2791 2792 data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamData, customizeParamDelData));
2792 2793 }
2793 2794 if (commonUtils.isNotEmptyObject(selfParamConfig)) {
... ...
src/components/Common/commonBusiness.js
... ... @@ -452,7 +452,7 @@ export function getCalculateByPrice(app, type, masterData, tableDataRow, sFieldN
452 452 dProductPrice = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignPrice * dCurrencyRate : 0, dNetPrice); /* 本位币单价 */
453 453 dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dNetMoney); /* 金额 */
454 454 } else {
455   - if( dProductForeignPrice > 0 ) { /* 如果有外币情况 */
  455 + if(sFieldName === `d${type}ForeignPrice` && dProductForeignPrice > 0 ) { /* 如果有外币情况 */
456 456 dProductForeignMoney = commonUtils.convertFixNum(dProductQty * dProductForeignPrice, dNetMoney); /* 外币金额 */
457 457 dProductMoney = commonUtils.convertFixNum(dCurrencyRate !== 0 ? dProductForeignMoney * dCurrencyRate : 0, dNetMoney); /* 金额 */
458 458 if(sFieldName !== `d${type}Price`) { /* 输入数量等 */
... ... @@ -589,7 +589,7 @@ export function getCalculateByPriceNew(app, type, masterData, tableDataRow, sFil
589 589 }
590 590 /* 销售对账 改变数量与金额 同步dNSrcNoMoney = 外币金额 */
591 591 const dSrcNoCheckMoney = dProductForeignMoney; /* 金额 */
592   - if (commonUtils.isNotEmptyNumber(dLossMoney)) { /* 减去报损 重新算金额 */
  592 + if (commonUtils.isNotEmptyNumber(dLossMoney) && dLossMoney > 0) { /* 减去报损 重新算金额 */
593 593 tableDataRow = getCalculateMoneyByLossMoney(app, type, masterData, tableDataRow, dSrcNoCheckMoney, dLossMoney); /* dSrcNoCheckMoney = dLossMoney 重新算外币金额 */
594 594 dProductForeignMoney = tableDataRow[`d${type}ForeignMoney`];
595 595 dProductMoney = tableDataRow[`d${type}Money`];
... ...