Commit 52285993 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修改计算支付金额逻辑

parent 9f4f9f35
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 18:06:04
* @LastEditTime: 2021-01-29 10:53:28
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -12,7 +12,7 @@ import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { PurchaseOrderOutWorkStateTexts, ORDER_TYPE2, PAYWAY, PAY_CHANNEL} from '@/constants';
import { PurchaseOrderOutWorkStateTexts, ORDER_TYPE2, PAYWAY, PAY_CHANNEL, PayOutWorkState } from '@/constants';
import NiceForm from '@/components/NiceForm';
import NestTable from '@/components/NestTable';
import { goodItem, OrderListParams, OrderListRes } from './interface';
......@@ -501,7 +501,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payAmount:
product.payInfoList ?
product.payInfoList.reduce((prev, now) => {
return +((product.price * product.purchaseCount * (now.payRatio / 100)).toFixed(2)) + prev;
return now.externalState === PayOutWorkState.CONFIRM_ACCOUNT ? now.payPrice + prev : 0;
}, 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