Commit a4754c3e authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复退款金额不对的问题,过滤掉未支付的订单

parent 84f6b134
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-21 11:29:52
* @LastEditTime: 2021-02-24 17:25:15
* @Description: 联动逻辑相关
*/
import lodash from 'lodash';
......@@ -38,7 +38,7 @@ export const useBusinessEffects = (context, actions) => {
const newData = [...getFieldValue('payList')].map(item => {
return {
...item,
refundAmount: +(new BigNumber(+value).multipliedBy(purchasePriceValue).multipliedBy(new BigNumber(item.payRatio).dividedBy(100))).toFixed(2),
refundAmount: item.payTime ? +(new BigNumber(+value).multipliedBy(purchasePriceValue).multipliedBy(new BigNumber(item.payRatio).dividedBy(100))).toFixed(2) : 0,
};
});
setFieldValue('payList', newData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment