fix: 产品赔偿费用无计算结果 fix #481
This commit is contained in:
parent
aa2542b706
commit
91f273660d
@ -100,9 +100,9 @@ export const RecordFeeConvertedAmount: CustomFunctionComponent = () => {
|
||||
} else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||
calcValue = calcValue * productData.weight;
|
||||
} else {
|
||||
const weightItem = feeRule.conversion_logic?.weight_items.find((item) => {
|
||||
item.product_id - 99999 === category.id || item.product_id === productData.id;
|
||||
});
|
||||
const weightItem = feeRule.conversion_logic?.weight_items.find(
|
||||
(item) => item.product_id - 99999 === category.id || item.product_id === productData.id,
|
||||
);
|
||||
if (!weightItem) return;
|
||||
if (weightItem.conversion_logic_id === ConversionLogics.Keep) {
|
||||
calcValue = calcValue * weightItem.weight;
|
||||
|
@ -95,9 +95,9 @@ export const ReadFeeConvertedAmount: CustomFunctionComponent = () => {
|
||||
} else if (feeRule.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||
calcValue = calcValue * productData.weight;
|
||||
} else {
|
||||
const weightItem = feeRule.conversion_logic.weight_items.find((item) => {
|
||||
item.product_id - 99999 === category.id || item.product_id === productData.id;
|
||||
});
|
||||
const weightItem = feeRule.conversion_logic.weight_items.find(
|
||||
(item) => item.product_id - 99999 === category.id || item.product_id === productData.id,
|
||||
);
|
||||
if (!weightItem) return;
|
||||
if (weightItem.conversion_logic_id === ConversionLogics.Keep) {
|
||||
calcValue = calcValue * weightItem.weight;
|
||||
|
Loading…
Reference in New Issue
Block a user