Commit db303938 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理采购订单详情商品区域总计合计价格显示异常

parent 9e0c9ac9
...@@ -47,10 +47,10 @@ export const MoneyTotalBox = ({ dataSource, preview }) => { ...@@ -47,10 +47,10 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
const { orderProductRequests = [], deliveryAddressInfo, freight = 0, sumPrice, amount } = dataSource || {} const { orderProductRequests = [], deliveryAddressInfo, freight = 0, sumPrice, amount } = dataSource || {}
// 合计金额, 如果后端有传则用后端数据 // 合计金额, 如果后端有传则用后端数据
const sum = sumPrice || orderProductRequests.reduce((prev, next) => prev + parseInt((next.money || 0)), 0) const sum = amount || orderProductRequests.reduce((prev, next) => prev + parseInt((next.money || 0)), 0)
// 总计金额 // 总计金额
const amountMoney = amount || sum + freight const amountMoney = sumPrice || sum + freight
// const modelRef = useRef<any>({}) // const modelRef = useRef<any>({})
// const [freePrice, setFreePrice] = useState<number>(0) // const [freePrice, setFreePrice] = useState<number>(0)
// const handleSetting = () => { // const handleSetting = () => {
......
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