Commit 2d190a66 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复支付金额不对的问题

parent 04db13fa
......@@ -2,13 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-29 10:53:28
* @LastEditTime: 2021-02-09 17:02:36
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
import { Drawer, Button, Pagination, message } from 'antd';
import { createFormActions } from '@formily/antd';
import moment from 'moment';
import BigNumber from 'bignumber.js';
import { ColumnType } from 'antd/lib/table/interface';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
......@@ -501,7 +502,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payAmount:
product.payInfoList ?
product.payInfoList.reduce((prev, now) => {
return now.externalState === PayOutWorkState.CONFIRM_ACCOUNT ? now.payPrice + prev : 0;
return now.externalState === PayOutWorkState.CONFIRM_ACCOUNT ? +(new BigNumber(+product.purchaseCount).multipliedBy(product.price).multipliedBy(new BigNumber(now.payRatio).dividedBy(100))).toFixed(2) + prev : prev;
}, 0) :
0
});
......
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