Commit bde37f35 authored by 前端-许佳敏's avatar 前端-许佳敏

Merge branch 'test-preview' into dev

parents c5e52d6b d44553ad
...@@ -8,6 +8,7 @@ import OuterSider from './OuterSide' ...@@ -8,6 +8,7 @@ import OuterSider from './OuterSide'
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
import styles from '../styles/MenuSlider.less' import styles from '../styles/MenuSlider.less'
import { getRouters } from '@/utils/auth'; import { getRouters } from '@/utils/auth';
import { isDev } from '@/constants';
const { Sider } = Layout const { Sider } = Layout
const { SubMenu } = Menu; const { SubMenu } = Menu;
...@@ -35,7 +36,7 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => { ...@@ -35,7 +36,7 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
if (!!menuArray && menuArray.length > 0) { if (!!menuArray && menuArray.length > 0) {
return menuArray.map((item: any) => { return menuArray.map((item: any) => {
// 不存在路由表内或者 需要隐藏 // 不存在路由表内或者 需要隐藏
if (item.hideInMenu || !getRouters().includes(item.path)) { if (item.hideInMenu || (!getRouters().includes(item.path) && !isDev)) {
return null return null
} }
......
...@@ -56,14 +56,15 @@ export const orderCombination = { ...@@ -56,14 +56,15 @@ export const orderCombination = {
} }
export const orderTypeLabel = ['', export const orderTypeLabel = ['',
'现货采购',
'现货采购',
'询价采购', '询价采购',
'需求采购', '需求采购',
'现货采购',
'集采', '集采',
'积分兑换',
'渠道直采', '渠道直采',
'渠道直采',
'渠道现货',
'渠道现货', '渠道现货',
'渠道积分兑换'
] ]
// 支付方式 // 支付方式
......
...@@ -13,7 +13,7 @@ export interface OrderMergeInfoProps { } ...@@ -13,7 +13,7 @@ export interface OrderMergeInfoProps { }
const payInfo = [ const payInfo = [
{ title: '交付日期', name: 'deliveryTime', render: (text) => formatTimeString(text) }, { title: '交付日期', name: 'deliveryTime', render: (text) => formatTimeString(text) },
{ {
title: '交付地址', name: 'deliveryAddresId', render: (_, record) => title: '交付地址', name: 'deliveryAddressInfo', render: (_, record) =>
<div> <div>
<Row> <Row>
<Col>{record.receiverName}</Col> <Col>{record.receiverName}</Col>
...@@ -60,25 +60,26 @@ const RenderCard = ({ infoList, dataSource }) => infoList.map(v => dataSource[v. ...@@ -60,25 +60,26 @@ const RenderCard = ({ infoList, dataSource }) => infoList.map(v => dataSource[v.
const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => { const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
const orderDetailCtx = useContext(OrderDetailContext) const orderDetailCtx = useContext(OrderDetailContext)
const address = useMemo(async () => { // const address = useMemo(async () => {
const { data } = await PublicApi.getLogisticsSelectListReceiverAddress() // const { data } = await PublicApi.getLogisticsSelectListReceiverAddress()
return data // return data
}, []) // }, [])
const { data, ctl } = orderDetailCtx const { data, ctl } = orderDetailCtx
useEffect(() => { // useEffect(() => {
if (data.deliveryAddresId && !data.receiverName) { // if (data.deliveryAddresId && !data.receiverName) {
asyncSetAddress() // asyncSetAddress()
} // }
}, [data, address]) // }, [data, address])
const asyncSetAddress = async () => { // const asyncSetAddress = async () => {
const res = await address // const res = await address
ctl.setData({ // debugger
...data, // ctl.setData({
...(res.find(v => v.id === data.deliveryAddresId) || {}) // ...data,
}) // ...(res.find(v => v.id === data.deliveryAddresId) || {})
} // })
// }
return ( return (
<Row style={{ marginTop: 24 }} gutter={24}> <Row style={{ marginTop: 24 }} gutter={24}>
......
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