Commit 8cad91d7 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复 bignum 未获取值报错的问题

parent 7e45bc48
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-07 15:22:20
* @LastEditTime: 2021-09-08 20:00:03
* @Description: 查看退货数量与退款金额 抽屉
*/
import React, { useEffect, useState } from 'react';
......@@ -240,7 +240,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
refundAmount: applyInfo.refundAmount !== undefined ?
applyInfo.refundAmount : (
isMateriel ?
+(new BigNumber(+applyInfo.remaining).multipliedBy(applyInfo.purchasePrice))
+(new BigNumber(+applyInfo.remaining).multipliedBy(applyInfo.purchasePrice).toFixed(2))
: 0
), // 默认赋值,如果是有支付信息的订单,退款金额 refundAmount 交给 payList 累加
});
......
......@@ -692,7 +692,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
id: item.id,
returnReason: '',
taskTypeKey: item.processKey,
remaining: new BigNumber(item.quantity).minus(item.returnCount || 0), // 可退货数量
remaining: new BigNumber(item.quantity).minus(item.returnCount || 0).toFixed(3), // 可退货数量
orderId: item.orderId,
},
isHasTax: item.tax,
......
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