Commit a03f8377 authored by XieZhiXiong's avatar XieZhiXiong

调整相关路由

parent 70c987ab
......@@ -148,95 +148,154 @@ const CommodityRoute: RouterChild = {
name: 'commodity',
icon: 'smile',
routes: [
// 货品
{
path: '/memberCenter/commodityAbility/commodity/goods',
name: 'goods',
icon: 'smile',
component: '@/pages/commodity/goods',
},
},
// 货品-新增
{
path: '/memberCenter/commodityAbility/commodity/goods/addGoods',
path: '/memberCenter/commodityAbility/commodity/goods/add',
name: 'addGoods',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/goods/addGoods',
},
hideInMenu: true,
},
// 货品-编辑
{
path: '/memberCenter/commodityAbility/commodity/goods/edit',
name: 'editGoods',
icon: 'smile',
component: '@/pages/commodity/goods/addGoods',
hideInMenu: true,
},
// 货品-详情
{
path: '/memberCenter/commodityAbility/commodity/goods/detail',
name: 'goodsDetail',
icon: 'smile',
component: '@/pages/commodity/goods/addGoods',
hideInMenu: true,
},
// 商品
{
path: '/memberCenter/commodityAbility/commodity/products',
name: 'products',
icon: 'smile',
component: '@/pages/commodity/products',
},
},
// 商品-新增
{
path: '/memberCenter/commodityAbility/commodity/products/addProducts',
name: 'addProducts',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/addProducts',
},
},
// 商品-新增
{
path: '/memberCenter/commodityAbility/commodity/products/viewProducts',
name: 'viewProducts',
path: '/memberCenter/commodityAbility/commodity/products/add',
name: 'addProducts',
icon: 'smile',
component: '@/pages/commodity/products/addProducts',
hideInMenu: true,
},
// 商品-编辑
{
path: '/memberCenter/commodityAbility/commodity/products/edit',
name: 'editProducts',
icon: 'smile',
component: '@/pages/commodity/products/addProducts',
hideInMenu: true,
},
// 商品-详情
{
path: '/memberCenter/commodityAbility/commodity/products/detail',
name: 'productsDetail',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/viewProducts',
},
// 快捷修改单价
{
path: '/memberCenter/commodityAbility/commodity/products/fastModifyPrice',
name: 'fastModifyPrice',
icon: 'smile',
component: '@/pages/commodity/products/fastModifyPrice',
},
},
// 渠道直采商品
{
path: '/memberCenter/commodityAbility/commodity/products/directChannel',
name: 'directChannel',
icon: 'smile',
component: '@/pages/commodity/products/directChannel',
},
},
// 渠道直采商品-新增
{
path: '/memberCenter/commodityAbility/commodity/products/directChannel/addDirectChannel',
path: '/memberCenter/commodityAbility/commodity/products/directChannel/add',
name: 'addDirectChannel',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/addDirectChannel',
},
},
// 渠道直采商品-编辑
{
path: '/memberCenter/commodityAbility/commodity/products/directChannel/modifyDirectChannel',
name: 'modifyDirectChannel',
name: 'editDirectChannel',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/modifyDirectChannel',
},
},
// 渠道直采商品-详情
{
path: '/memberCenter/commodityAbility/commodity/products/directChannel/viewDirectChannel',
name: 'viewDirectChannel',
path: '/memberCenter/commodityAbility/commodity/products/directChannel/detail',
name: 'directChannelDetail',
hideInMenu: true,
icon: 'smile',
component: '@/pages/commodity/products/viewDirectChannel',
},
]
},
},
// 仓位
{
path: '/memberCenter/commodityAbility/repositories',
name: 'repositories',
// key: 'repositories',
icon: 'smile',
component: './repositories',
},
},
// 仓位-新增
{
path: '/memberCenter/commodityAbility/repositories/addRepository',
path: '/memberCenter/commodityAbility/repositories/add',
name: 'addRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/addRepository',
},
hideInMenu: true,
},
// 仓位-编辑
{
path: '/memberCenter/commodityAbility/repositories/edit',
name: 'editRepository',
icon: 'smile',
component: './repositories/addRepository',
hideInMenu: true,
},
// 仓位-详情
{
path: '/memberCenter/commodityAbility/repositories/detail',
name: 'repositoryDetail',
icon: 'smile',
component: './repositories/addRepository',
hideInMenu: true,
},
// 仓位-调整
{
path: '/memberCenter/commodityAbility/repositories/adjustRepository',
name: 'adjustRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/adjustRepository',
hideInMenu: true,
}
]
}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-13 16:11:50
* @LastEditTime: 2020-10-13 20:15:11
*/
export default {
......@@ -60,18 +60,22 @@ export default {
'menu.commodityAbility.commodity': '商品',
'menu.commodityAbility.commodity.goods': '货品',
'menu.commodityAbility.commodity.addGoods': '新建货品',
'menu.commodityAbility.commodity.editGoods': '编辑货品',
'menu.commodityAbility.commodity.goodsDetail': '查看货品',
'menu.commodityAbility.commodity.products': '商品',
'menu.commodityAbility.commodity.addProducts': '新建商品',
'menu.commodityAbility.commodity.viewProducts': '商品详情',
'menu.commodityAbility.commodity.editProducts': '编辑商品',
'menu.commodityAbility.commodity.productsDetail': '查看商品',
'menu.commodityAbility.commodity.fastModifyPrice': '快捷修改单价',
'menu.commodityAbility.commodity.directChannel': '渠道直采商品',
'menu.commodityAbility.commodity.addDirectChannel': '新建渠道直采商品',
'menu.commodityAbility.commodity.modifyDirectChannel': '修改渠道直采商品',
'menu.commodityAbility.commodity.viewDirectChannel': '渠道直采商品详情',
'menu.commodityAbility.commodity.editDirectChannel': '修改渠道直采商品',
'menu.commodityAbility.commodity.directChannelDetail': '查看渠道直采商品',
'menu.commodityAbility.repositories': '仓位',
'menu.commodityAbility.addRepository': '新建仓位',
'menu.commodityAbility.editRepository': '编辑仓位',
'menu.commodityAbility.repositoryDetail': '查看仓位',
'menu.commodityAbility.adjustRepository': '仓位库存调拨',
'menu.commodityAbility.viewRepository': '查看仓位库存',
// 会员能力
'menu.memberAbility': '会员',
......
......@@ -81,7 +81,7 @@ const Goods: React.FC<{}> = () => {
className: 'commonPickColor',
render: (text: any, record: any) => <span
className="commonPickColor"
onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/addGoods?id=${record.id}&isSee=true`)}
onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/detail?id=${record.id}&isSee=true`)}
>
{text}&nbsp;<EyeOutlined />
</span>
......@@ -123,7 +123,7 @@ const Goods: React.FC<{}> = () => {
render: (text: any, record: any) => {
return (
<>
<Button type='link' onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/addGoods?id=${record.id}`)}>修改</Button>
<Button type='link' onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/edit?id=${record.id}`)}>修改</Button>
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleSingleDelete(record)}
......@@ -380,7 +380,7 @@ const Goods: React.FC<{}> = () => {
<Space>
<Button
type='primary'
onClick={() => history.push('/memberCenter/commodityAbility/commodity/goods/addGoods')}
onClick={() => history.push('/memberCenter/commodityAbility/commodity/goods/add')}
>
<PlusOutlined />新建
</Button>
......@@ -431,7 +431,7 @@ const Goods: React.FC<{}> = () => {
<Col span={12}>
<Button
type='primary'
onClick={()=>history.push('/memberCenter/commodityAbility/commodity/goods/addGoods')}
onClick={()=>history.push('/memberCenter/commodityAbility/commodity/goods/add')}
>
<PlusOutlined />新建
</Button>
......
......@@ -105,7 +105,7 @@ const SelectChannel:React.FC<IProps> = (props) => {
key: 'name',
className: history.location.query?.id ? 'commonPickColor' : '',
render: (text:any, record:any) => (history.location.query?.id ? <EyePreview
url={`/memberCenter/commodityAbility/commodity/products/directChannel/viewDirectChannel?id=${record.id}`}
url={`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`}
>
{text}
</EyePreview> : text)
......
......@@ -79,7 +79,7 @@ const SelectGoodsForm: React.FC<{}> = (props) => {
className: 'commonPickColor',
render: (text: any, record: any) => <span
className="commonPickColor"
onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/addGoods?id=${record.id}&isSee=true`)}
onClick={() => history.push(`/memberCenter/commodityAbility/commodity/goods/detail?id=${record.id}&isSee=true`)}
>
{text}&nbsp;<EyeOutlined />
</span>
......
......@@ -69,7 +69,7 @@ const DirectChannel: React.FC<{}> = () => {
key: 'id',
className: 'commonPickColor',
render: (text:any, record:any) => <EyePreview
url={`/memberCenter/commodityAbility/commodity/products/directChannel/viewDirectChannel?id=${record.id}`}
url={`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`}
>
{text}
</EyePreview>
......@@ -198,7 +198,7 @@ const DirectChannel: React.FC<{}> = () => {
];
const clickModify = (params: any) => {
history.push(`/memberCenter/commodityAbility/commodity/products/directChannel/modifyDirectChannel?id=${params.id}&commodityId=${params.channelCommodity.id}`)
history.push(`/memberCenter/commodityAbility/commodity/products/directChannel/edit?id=${params.id}&commodityId=${params.channelCommodity.id}`)
}
// paramId ? 单个删除 : 批量删除
......@@ -409,7 +409,7 @@ const DirectChannel: React.FC<{}> = () => {
<Space>
<Button
type='primary'
onClick={() => history.push('/memberCenter/commodityAbility/commodity/products/directChannel/addDirectChannel')}
onClick={() => history.push('/memberCenter/commodityAbility/commodity/products/directChannel/add')}
>
<PlusOutlined />新建
</Button>
......
......@@ -74,7 +74,7 @@ const FastModifyPrice: React.FC<{}> = () => {
key: 'name',
className: 'commonPickColor',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.commodityId}`}
url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`}
>
{text}
</EyePreview>
......
......@@ -274,11 +274,11 @@ const Products: React.FC<{}> = () => {
}
const handleSee = (record: any) => {
history.push(`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.id}`)
history.push(`/memberCenter/commodityAbility/commodity/products/detail?id=${record.id}`)
}
const clickModify = (id: number) => {
history.push(`/memberCenter/commodityAbility/commodity/products/addProducts?id=${id}`)
history.push(`/memberCenter/commodityAbility/commodity/products/edit?id=${id}`)
}
// const confirm = () => {
......@@ -687,7 +687,7 @@ const Products: React.FC<{}> = () => {
<Col span={12}>
<Button
type='primary'
onClick={()=>history.push('/memberCenter/commodityAbility/commodity/products/addProducts')}
onClick={()=>history.push('/memberCenter/commodityAbility/commodity/products/add')}
>
<PlusOutlined />新建
</Button>
......
......@@ -154,7 +154,7 @@ const ViewDriectChannel: React.FC<{}> = () => {
href={
channelDetails?.channelCommodity?.source === 1 ?
`/channelmall/commodity/detail?id=${channelDetails?.channelCommodity?.commodity?.id}&channelId=${btoa(JSON.stringify({ shopId: '', memberId: channelDetails?.channelCommodity?.parentMemberId }))}` :
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${channelDetails?.channelCommodity?.commodity?.id}`
`/memberCenter/commodityAbility/commodity/products/detail?id=${channelDetails?.channelCommodity?.commodity?.id}`
}
// target="blank"
>去查看 &gt;</a>
......
......@@ -318,7 +318,7 @@ const viewProducts: React.FC<{}> = () => {
}
const clickModify = () => {
history.push(`/memberCenter/commodityAbility/commodity/products/addProducts?id=${productDetail.id}`)
history.push(`/memberCenter/commodityAbility/commodity/products/edit?id=${productDetail.id}`)
}
return (
......
......@@ -31,7 +31,7 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
// 卖家服务快捷导航
const sell_quick_nav_list = [
{
path: '/memberCenter/commodityAbility/commodity/products/addProducts',
path: '/memberCenter/commodityAbility/commodity/products/add',
title: '上传商品',
icon: require('@/assets/mallHomeIcon/upload_icon.png')
},
......
......@@ -60,7 +60,7 @@ const Repositories: React.FC<{}> = () => {
key: 'name',
render: (text: any, record: any) => (
<EyePreview
url={`/memberCenter/commodityAbility/repositories/addRepository?id=${record.id}&preview=1`}
url={`/memberCenter/commodityAbility/repositories/detail?id=${record.id}&preview=1`}
>
{text}
</EyePreview>
......@@ -155,7 +155,7 @@ const Repositories: React.FC<{}> = () => {
};
const handleToAdd = () => {
history.push(`/memberCenter/commodityAbility/repositories/addRepository`);
history.push(`/memberCenter/commodityAbility/repositories/add`);
};
const controllerBtns = <Space>
......
......@@ -85,7 +85,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
dataIndex: 'name',
title: '商品名称',
key: 'name',
render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.commodityId}`}>{_}</EyePreview>
render: (_, record) => <EyePreview url={`/memberCenter/commodityAbility/commodity/products/detail?id=${record.commodityId}`}>{_}</EyePreview>
},
{
dataIndex: 'customerCategoryName',
......
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