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

Merge branch 'test-preview' into dev

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