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

fix: 处理订单线上确认凭证预览异常问题

parent 12c182e8
......@@ -7,6 +7,7 @@ import { history } from 'umi'
import OverflowText from '@/components/OverflowText'
export interface OrderPayResultModalProps {
/** default: 确认模式,preview: 预览模式 */
type: 'default' | 'preview',
currentRef: any
}
......@@ -16,7 +17,7 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const { id } = usePageStatus()
const [visible, setVisible] = useState(false)
const [isReady, setIsReady] = useState<any>()
const canCtlData = data.payments.find(v => v.showConfirm) || {}
const canCtlData = data.payments.find(v => type === 'preview' ? v.showView : v.showConfirm) || {}
// const transData = canCtlData.vouchers?.split(',') || []
......
......@@ -15,6 +15,7 @@ const TabPane = Tabs.TabPane
const TabHeader = ({dataSource}) => {
const { setPayResultType, payResultVisible } = useContext(OrderDetailContext)
return <div>
<Row justify='space-between' style={{minWidth: 216}}>
<Col>
......
......@@ -13,6 +13,7 @@ import OrderTransformRecord from './components/orderTransformRecord'
import OrderPayTabs from './components/orderPayTabs'
import OrderDeleveRecord from './components/orderDeleveRecord'
import { OrderKindType } from './constant'
import OrderPayResultModal from './components/orderPayResultModal'
export interface CommonOrderDetailProps {}
......@@ -110,6 +111,7 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
<OrderTransformRecord/>
</div>
</OrderDetailWrapper>
<OrderPayResultModal currentRef={payResultVisible} type={payResultType}/>
</OrderDetailContext.Provider>
</div>
) : null
......
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