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

fix:处理商城下单商品名称没有属性字符的问题

parent eb6fcc97
This source diff could not be displayed because it is too large. You can view the blob instead.
import React, { useContext, useEffect, useState } from 'react' import React, { useContext, useEffect, useState } from 'react'
import style from './index.less' import style from './index.less'
import { Tabs, Row, Col, Modal, List } from 'antd' import { Tabs, Row, Col, Modal, List, Tooltip } from 'antd'
import { OrderDetailContext } from '../../_public/order/context' import { OrderDetailContext } from '../../_public/order/context'
import MellowCard from '@/components/MellowCard' import MellowCard from '@/components/MellowCard'
import StatusColors from '../StatusColors' import StatusColors from '../StatusColors'
...@@ -8,6 +8,7 @@ import moment from 'moment' ...@@ -8,6 +8,7 @@ import moment from 'moment'
import { PayOutWorkState } from '@/constants' import { PayOutWorkState } from '@/constants'
import OverflowText from '@/components/OverflowText' import OverflowText from '@/components/OverflowText'
import { isTemplateExpression } from 'typescript' import { isTemplateExpression } from 'typescript'
import { QuestionCircleOutlined } from '@ant-design/icons'
/** /**
* 展示 支付比例和简单流程的发货信息 * 展示 支付比例和简单流程的发货信息
...@@ -56,6 +57,12 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => { ...@@ -56,6 +57,12 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
<div className={style.smallnumber}> <div className={style.smallnumber}>
{dataSource.channel !== 0 && '¥'} {dataSource.channel !== 0 && '¥'}
{dataSource.payPrice || 0} {dataSource.payPrice || 0}
{
dataSource.refundPrice &&
<Tooltip title={`本次实际支付金额(¥${data.payPrice-data.refundPrice})=本次订单待支付金额(¥${data.payPrice})-售后待退款金额(¥${data.refundPrice})`}>
<QuestionCircleOutlined />
</Tooltip>
}
</div> </div>
</Col> </Col>
<Col> <Col>
......
...@@ -178,7 +178,6 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn ...@@ -178,7 +178,6 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
ctx.setFieldValue('supplyMembersName', initValue.supplyMembersName) ctx.setFieldValue('supplyMembersName', initValue.supplyMembersName)
initValue.idList && ctx.setFieldValue('idList', initValue.idList) initValue.idList && ctx.setFieldValue('idList', initValue.idList)
initValue.productType && ctx.setFieldValue('productType', initValue.productType) initValue.productType && ctx.setFieldValue('productType', initValue.productType)
ctx.setFieldValue('orderProductRequests', await filterProductDataById([], productInfo.map(v => { ctx.setFieldValue('orderProductRequests', await filterProductDataById([], productInfo.map(v => {
return { return {
...v, ...v,
...@@ -194,6 +193,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn ...@@ -194,6 +193,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
memberRoleId: initValue.supplyMembersRoleId, memberRoleId: initValue.supplyMembersRoleId,
commodityId: v.id, // 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他) commodityId: v.id, // 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他)
memberPrice: v.memberDiscount !== 1 ? v.memberDiscount : 1, // 添加会员折扣 memberPrice: v.memberDiscount !== 1 ? v.memberDiscount : 1, // 添加会员折扣
name: v.attribute?.length ? v.name + '/' + v.attribute.map(item => item.customerAttributeValue.value).join('/') : v.name,
} }
}) })
)) ))
......
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