Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
9f5feefd
Commit
9f5feefd
authored
Jun 10, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改0618代办需求
parent
2696f898
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
439 additions
and
71 deletions
+439
-71
home.ts
src/constants/home.ts
+5
-2
home.ts
src/locales/en-US/home.ts
+46
-1
home.ts
src/locales/ko-KR/home.ts
+46
-1
home.ts
src/locales/zh-CN/home.ts
+0
-0
CustomeCenter.tsx
src/pages/home/components/Centers/CustomeCenter.tsx
+50
-0
MarketingCenter.tsx
src/pages/home/components/Centers/MarketingCenter.tsx
+50
-0
MemberCenter.tsx
src/pages/home/components/Centers/MemberCenter.tsx
+2
-1
OrderCenter.tsx
src/pages/home/components/Centers/OrderCenter.tsx
+5
-0
ProductCenter.tsx
src/pages/home/components/Centers/ProductCenter.tsx
+26
-49
PurchaseCenter.tsx
src/pages/home/components/Centers/PurchaseCenter.tsx
+3
-1
QualityCenter.tsx
src/pages/home/components/Centers/QualityCenter.tsx
+50
-0
SettlementCenter.tsx
src/pages/home/components/Centers/SettlementCenter.tsx
+65
-14
VendorCenter.tsx
src/pages/home/components/Centers/VendorCenter.tsx
+54
-0
index.tsx
src/pages/home/components/Centers/index.tsx
+9
-1
useGetAuth.tsx
src/pages/home/hooks/useGetAuth.tsx
+23
-0
index.tsx
src/pages/home/index.tsx
+5
-1
No files found.
src/constants/home.ts
View file @
9f5feefd
...
...
@@ -18,6 +18,10 @@ export const HOME_TODO = {
'/memberCenter/logisticsAbility'
:
'物流中心'
,
'/memberCenter/handling'
:
'加工中心'
,
'/memberCenter/memberAbility'
:
'会员中心'
,
'/memberCenter/customerAbility'
:
'客户中心'
,
'/memberCenter/supplierAbility'
:
'供应商中心'
,
'/memberCenter/quality'
:
'质量中心'
,
'/memberCenter/marketingAbility'
:
'营销中心'
};
/**
...
...
@@ -42,4 +46,4 @@ export const SRM_PURCHASER_HOME_PATH = '/memberCenter/srmPurchaserHome';
/**
* 首页路径
*/
export
const
HOME_PATH
=
'/memberCenter/home'
;
\ No newline at end of file
export
const
HOME_PATH
=
'/memberCenter/home'
;
src/locales/en-US/home.ts
View file @
9f5feefd
...
...
@@ -147,5 +147,50 @@ export default {
'home.userCenter.score'
:
'Platform score'
,
'home.userCenter.userAuth.link'
:
'Enter Member Center'
,
'home.jinrudianpuzhongxin'
:
'Enter the store center'
,
'home.moreUser.welcome'
:
'Welcome to the supply chain collaboration management system'
'home.moreUser.welcome'
:
'Welcome to the supply chain collaboration management system'
,
'home.gongyingshangrukushu'
:
'Number of suppliers in storage'
,
'home.gongyingshangbiangeng'
:
'Supplier change'
,
'home.gongyingshangkaoping'
:
'Supplier evaluation'
,
'home.gongyingshangzhenggai'
:
'Supplier rectification'
,
'home.gongyingshangzhenggaitongzhi'
:
'Supplier rectification notice'
,
'home.gongyingshangrukuziliaobian'
:
'Change of supplier incoming data'
,
'home.gongyingshangzhongxin'
:
'Supplier center'
,
'home.tigonggongyingshangruku'
:
'Provide supplier storage, change, evaluation, rectification and other functions.'
,
'home.jinrugongyingshangzhongxin'
:
'Enter the supplier center'
,
'home.kaipiaoguanli'
:
'Invoice management'
,
'home.fapiaoxietong'
:
'Invoice coordination'
,
'home.yewuduizhang'
:
'Business reconciliation'
,
'home.yewuduizhangxietong'
:
'Coordination of business reconciliation'
,
'home.yewuqingkuan'
:
'Business request'
,
'home.pingtaiyouhuiquanjiesuan'
:
'Platform coupon settlement'
,
'home.zhijiandan'
:
'Quality inspection list'
,
'home.8Dzhenggai'
:
'8D rectification and reform'
,
'home.8Dxietong'
:
'8D synergy'
,
'home.zhiliangzhongxin'
:
'Quality center'
,
'home.tigongzhijiandanguanli8D'
:
'Provide quality inspection order management, 8D rectification, 8D coordination and other functions.'
,
'home.jinruzhiliangzhongxin'
:
'Enter the quality center'
,
'home.qinggoudan'
:
'Purchase order'
,
'home.xuqiuchi'
:
'Demand pool'
,
'home.wuliaoshenhe'
:
'Material audit'
,
'home.wuliaobiangengshenhe'
:
'Material change audit'
,
'home.pinpaiguanli'
:
'Brand management'
,
'home.shangpinguanli'
:
'Commodity management'
,
'home.songhuojihua'
:
'Delivery plan'
,
'home.songhuojihuaxietong'
:
'Coordination of delivery planning'
,
'home.songhuotongzhi'
:
'Delivery notice'
,
'home.songhuotongzhixietong'
:
'Delivery notification coordination'
,
'home.shouhuodan'
:
'Receipt of goods'
,
'home.huiyuanrukuziliaobiangeng'
:
'Change of entry data of members'
,
'home.shangjiayingxiaohuodongguanli'
:
'Merchant marketing activity management'
,
'home.pingtaiyingxiaohuodong'
:
'Platform marketing campaign'
,
'home.shangjiayouhuiquanguanli'
:
'Merchant coupon management'
,
'home.yingxiaozhongxin'
:
'Marketing center'
,
'home.tigonghuodongyouhuiquan'
:
'Provide activities, coupon management and other functions.'
,
'home.jinruyingxiaozhongxin'
:
'Enter the marketing center'
,
'home.kehuruku'
:
'Customer storage'
,
'home.kehubiangeng'
:
'Customer change'
,
'home.kehukaoping'
:
'Customer evaluation'
,
'home.kehuzhongxin'
:
'Customer center'
,
'home.tigongkehurukubian'
:
'Provide customer storage, change, evaluation and other functions.'
,
'home.jinrukehuzhongxin'
:
'Enter the customer center'
,
}
src/locales/ko-KR/home.ts
View file @
9f5feefd
...
...
@@ -147,5 +147,50 @@ export default {
'home.userCenter.score'
:
'플랫폼 포인트'
,
'home.userCenter.userAuth.link'
:
'회원 센터에 들어가다'
,
'home.jinrudianpuzhongxin'
:
'매장 안으로 들어가다'
,
'home.moreUser.welcome'
:
'공급사슬 협동 관리 시스템 사용을 환영합니다.'
'home.moreUser.welcome'
:
'공급사슬 협동 관리 시스템 사용을 환영합니다.'
,
'home.gongyingshangrukushu'
:
'공급자 재고 수'
,
'home.gongyingshangbiangeng'
:
'공급업체 변경'
,
'home.gongyingshangkaoping'
:
'공급업체 평가'
,
'home.gongyingshangzhenggai'
:
'공급업체 수정'
,
'home.gongyingshangzhenggaitongzhi'
:
'공급업체 수정 통지'
,
'home.gongyingshangrukuziliaobian'
:
'공급자 보관 자료 변경'
,
'home.gongyingshangzhongxin'
:
'공급업체 센터'
,
'home.tigonggongyingshangruku'
:
'공급자 입고, 변경, 평가, 수정 등의 기능을 제공한다.'
,
'home.jinrugongyingshangzhongxin'
:
'공급업체 센터로 이동'
,
'home.kaipiaoguanli'
:
'송장 발행 관리'
,
'home.fapiaoxietong'
:
'송장 상호 작용'
,
'home.yewuduizhang'
:
'업무 대부.'
,
'home.yewuduizhangxietong'
:
'업무 대 장부 협동.'
,
'home.yewuqingkuan'
:
'업무 청부금'
,
'home.pingtaiyouhuiquanjiesuan'
:
'플랫폼 쿠폰 결제'
,
'home.zhijiandan'
:
'품질검사서'
,
'home.8Dzhenggai'
:
'8D 수정'
,
'home.8Dxietong'
:
'8D 공동 작업'
,
'home.zhiliangzhongxin'
:
'품질 중심'
,
'home.tigongzhijiandanguanli8D'
:
'품질 검사장 관리, 8D 수정, 8D 공동 작업 등의 기능을 제공합니다.'
,
'home.jinruzhiliangzhongxin'
:
'품질 센터에 들어가다'
,
'home.qinggoudan'
:
'주문을 요청하다.'
,
'home.xuqiuchi'
:
'수요 풀'
,
'home.wuliaoshenhe'
:
'자재 감사'
,
'home.wuliaobiangengshenhe'
:
'품목 변경 감사'
,
'home.pinpaiguanli'
:
'브랜드 관리'
,
'home.shangpinguanli'
:
'상품 관리'
,
'home.songhuojihua'
:
'배송 계획'
,
'home.songhuojihuaxietong'
:
'배송 프로그램 공동 작업'
,
'home.songhuotongzhi'
:
'배송 알림'
,
'home.songhuotongzhixietong'
:
'배송 알림 공동 작업'
,
'home.shouhuodan'
:
'수하서'
,
'home.huiyuanrukuziliaobiangeng'
:
'회원 입고 자료 변경'
,
'home.shangjiayingxiaohuodongguanli'
:
'마케팅 캠페인 관리'
,
'home.pingtaiyingxiaohuodong'
:
'플랫폼 마케팅 캠페인'
,
'home.shangjiayouhuiquanguanli'
:
'가맹점 쿠폰 관리'
,
'home.yingxiaozhongxin'
:
'마케팅 센터'
,
'home.tigonghuodongyouhuiquan'
:
'이벤트, 쿠폰 관리 등의 기능을 제공한다.'
,
'home.jinruyingxiaozhongxin'
:
'마케팅 센터에 들어가다'
,
'home.kehuruku'
:
'고객 재고'
,
'home.kehubiangeng'
:
'고객 변경 사항'
,
'home.kehukaoping'
:
'고객 평가'
,
'home.kehuzhongxin'
:
'고객 센터'
,
'home.tigongkehurukubian'
:
'고객 입고, 변경, 평가 등의 기능을 제공한다.'
,
'home.jinrukehuzhongxin'
:
'고객 센터로 이동'
,
}
src/locales/zh-CN/home.ts
View file @
9f5feefd
This diff is collapsed.
Click to expand it.
src/pages/home/components/Centers/CustomeCenter.tsx
0 → 100644
View file @
9f5feefd
import
React
,
{
useCallback
,
useMemo
}
from
'react'
;
import
{
Space
}
from
'antd'
;
import
styles
from
'./center.less'
;
import
{
Link
,
useIntl
}
from
'umi'
;
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/useGetAuth'
;
import
{
getReportMemberHomeGetCustomerReport
,
GetReportMemberHomeGetCustomerReportResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{
};
const
CustomeCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetCustomerReportResponse
,
any
>
(
getReportMemberHomeGetCustomerReport
,
{})
const
intl
=
useIntl
();
const
{
userAuth
,
hasAbilityFunc
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'commodityAbility'
);
const
{
StaticsDataList
}
=
Layout
const
KEY_TITLE
=
{
customerImportList
:
intl
.
formatMessage
({
id
:
'home.kehuruku'
,
defaultMessage
:
'客户入库'
}),
customerChangeList
:
intl
.
formatMessage
({
id
:
'home.kehubiangeng'
,
defaultMessage
:
'客户变更'
}),
customerKpiList
:
intl
.
formatMessage
({
id
:
'home.kehukaoping'
,
defaultMessage
:
'客户考评'
}),
}
return
(
<
Layout
hasAuth=
{
hasAbility
}
viewRef=
{
ref
}
title=
{
intl
.
formatMessage
({
id
:
'home.kehuzhongxin'
,
defaultMessage
:
'客户中心'
})
}
tips=
{
intl
.
formatMessage
({
id
:
'home.tigongkehurukubian'
,
defaultMessage
:
'提供客户入库、变更、考评等功能。'
})
}
loading=
{
loading
}
isError=
{
isError
}
extra=
{
<
Space
>
<
Authorize
url=
{
'/memberCenter/customerAbility'
}
>
<
div
>
<
Link
to=
{
'/memberCenter/customerAbility'
}
>
{
intl
.
formatMessage
({
id
:
'home.jinrukehuzhongxin'
,
defaultMessage
:
'进入客户中心'
})
}
</
Link
>
</
div
>
</
Authorize
>
</
Space
>
}
>
<
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterEmptyList
}
/>
</
Layout
>
)
}
export
default
CustomeCenter
src/pages/home/components/Centers/MarketingCenter.tsx
0 → 100644
View file @
9f5feefd
import
React
,
{
useCallback
,
useMemo
}
from
'react'
;
import
{
Space
}
from
'antd'
;
import
styles
from
'./center.less'
;
import
{
Link
,
useIntl
}
from
'umi'
;
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/useGetAuth'
;
import
{
getReportMemberHomeGetMarketingReport
,
GetReportMemberHomeGetMarketingReportResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{
};
const
MarketingCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetMarketingReportResponse
,
any
>
(
getReportMemberHomeGetMarketingReport
,
{})
const
intl
=
useIntl
();
const
{
userAuth
,
hasAbilityFunc
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'commodityAbility'
);
const
{
StaticsDataList
}
=
Layout
const
KEY_TITLE
=
{
marketingMerchantList
:
intl
.
formatMessage
({
id
:
'home.shangjiayingxiaohuodongguanli'
,
defaultMessage
:
'商家营销活动管理'
}),
marketingPlatformList
:
intl
.
formatMessage
({
id
:
'home.pingtaiyingxiaohuodong'
,
defaultMessage
:
'平台营销活动'
}),
marketingMerchantCouponList
:
intl
.
formatMessage
({
id
:
'home.shangjiayouhuiquanguanli'
,
defaultMessage
:
'商家优惠券管理'
}),
}
return
(
<
Layout
hasAuth=
{
hasAbility
}
viewRef=
{
ref
}
title=
{
intl
.
formatMessage
({
id
:
'home.yingxiaozhongxin'
,
defaultMessage
:
'营销中心'
})
}
tips=
{
intl
.
formatMessage
({
id
:
'home.tigonghuodongyouhuiquan'
,
defaultMessage
:
'提供活动、优惠券管理等功能。'
})
}
loading=
{
loading
}
isError=
{
isError
}
extra=
{
<
Space
>
<
Authorize
url=
{
'/memberCenter/marketingAbility'
}
>
<
div
>
<
Link
to=
{
'/memberCenter/marketingAbility'
}
>
{
intl
.
formatMessage
({
id
:
'home.jinruyingxiaozhongxin'
,
defaultMessage
:
'进入营销中心'
})
}
</
Link
>
</
div
>
</
Authorize
>
</
Space
>
}
>
<
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterEmptyList
}
/>
</
Layout
>
)
}
export
default
MarketingCenter
src/pages/home/components/Centers/MemberCenter.tsx
View file @
9f5feefd
...
...
@@ -15,7 +15,8 @@ const KEY_TITLE = {
changeList
:
getIntl
().
formatMessage
({
id
:
'home.memberCenter.changeList'
}),
kpiList
:
getIntl
().
formatMessage
({
id
:
'home.memberCenter.kpiList'
}),
rectifyList
:
getIntl
().
formatMessage
({
id
:
'home.memberCenter.rectifyList'
}),
rectifyNoticeList
:
getIntl
().
formatMessage
({
id
:
'home.memberCenter.rectifyNoticeList'
})
rectifyNoticeList
:
getIntl
().
formatMessage
({
id
:
'home.memberCenter.rectifyNoticeList'
}),
memberImportChangeList
:
getIntl
().
formatMessage
({
id
:
'home.huiyuanrukuziliaobiangeng'
,
defaultMessage
:
'会员入库资料变更'
}),
}
// 修改会员信息:判断当前用户是否有会员导入权限,有则显示修改会员信息按钮,点击跳转会员能力--会员管理--新增会员页
// 进入会员中心:判断当前用户是否有会员管理权限,有则显示进入会员中心按钮,点击跳转会员能力--会员管理
...
...
src/pages/home/components/Centers/OrderCenter.tsx
View file @
9f5feefd
...
...
@@ -14,6 +14,11 @@ const saleOrderUrl = '/memberCenter/order/saleOrder/orderList'
const
KEY_TITLE
=
{
saleOrderList
:
getIntl
().
formatMessage
({
id
:
'home.orderCenter.saleOrderList'
}),
purchaseOrderList
:
getIntl
().
formatMessage
({
id
:
'home.orderCenter.purchaseOrderList'
}),
deliveryPlanList
:
getIntl
().
formatMessage
({
id
:
'home.songhuojihua'
,
defaultMessage
:
'送货计划'
}),
deliveryPlanCollaborationList
:
getIntl
().
formatMessage
({
id
:
'home.songhuojihuaxietong'
,
defaultMessage
:
'送货计划协同'
}),
deliveryNoticeList
:
getIntl
().
formatMessage
({
id
:
'home.songhuotongzhi'
,
defaultMessage
:
'送货通知'
}),
deliveryNoticeCollaborationList
:
getIntl
().
formatMessage
({
id
:
'home.songhuotongzhixietong'
,
defaultMessage
:
'送货通知协同'
}),
receiptList
:
getIntl
().
formatMessage
({
id
:
'home.shouhuodan'
,
defaultMessage
:
'收货单'
}),
}
// 订单中心:根据当前用户+当前角色是否有订单能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
...
...
src/pages/home/components/Centers/ProductCenter.tsx
View file @
9f5feefd
...
...
@@ -10,9 +10,11 @@ import { getReportMemberHomeGetCommodityTally, GetReportMemberHomeGetCommodityTa
interface
Iprops
{
};
const
ADD_BRAND
=
"/memberCenter/commodityAbility/trademark/add"
;
const
ADD_BRAND
=
'/memberCenter/commodityAbility/trademark/trademarkApply/add'
;
const
ADD_PRODUCT
=
'/memberCenter/commodityAbility/commodity/products/add'
;
const
ADD_REPOSITORIES
=
'/memberCenter/commodityAbility/repositories/add'
;
const
ADD_CATEGORY
=
'/memberCenter/commodityAbility/classAndProperty/class'
;
const
ADD_MATERIAL
=
'/memberCenter/commodityAbility/material/pendingAdd/add'
;
// 商品中心:根据当前用户+当前角色是否有此商品能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
// 1、创建品牌:判断当前用户是否有品牌申请权限,有则显示创建品牌按钮,点击跳转能力中心-商品能力-品牌管理-新增品牌
...
...
@@ -20,49 +22,41 @@ const ADD_REPOSITORIES = '/memberCenter/commodityAbility/repositories/add';
// 3、设置库存:判断当前用户是否有仓位库存管理权限,有则显示设置库存按钮,点击跳转能力中心-商品能力-仓位管理--新增仓位库存
const
ProductCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetCommodityTallyResponse
,
any
>
(
getReportMemberHomeGetCommodityTally
,
{})
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetCommodityTallyResponse
,
any
>
(
getReportMemberHomeGetCommodityTally
,
{})
const
intl
=
useIntl
();
const
{
userAuth
,
hasAbilityFunc
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'commodityAbility'
);
const
{
StaticsDataList
}
=
Layout
const
KEY_TITLE
=
{
materialAuditList
:
intl
.
formatMessage
({
id
:
'home.wuliaoshenhe'
,
defaultMessage
:
'物料审核'
}),
materialChangeAuditList
:
intl
.
formatMessage
({
id
:
'home.wuliaobiangengshenhe'
,
defaultMessage
:
'物料变更审核'
}),
brandManagementList
:
intl
.
formatMessage
({
id
:
'home.pinpaiguanli'
,
defaultMessage
:
'品牌管理'
}),
commodityManagementList
:
intl
.
formatMessage
({
id
:
'home.shangpinguanli'
,
defaultMessage
:
'商品管理'
}),
}
const
extraList
=
useMemo
(()
=>
[
{
title
:
intl
.
formatMessage
({
id
:
'home.productCenter.title1'
})
,
title
:
'创建品牌'
,
authUrl
:
ADD_BRAND
,
},
{
title
:
intl
.
formatMessage
({
id
:
'home.productCenter.title2'
})
,
authUrl
:
ADD_
PRODUCT
title
:
'创建品类'
,
authUrl
:
ADD_
CATEGORY
,
},
{
title
:
intl
.
formatMessage
({
id
:
'home.productCenter.title3'
}),
authUrl
:
ADD_REPOSITORIES
title
:
'创建商品'
,
authUrl
:
ADD_PRODUCT
,
},
{
title
:
'创建物料'
,
authUrl
:
ADD_MATERIAL
,
},
{
title
:
'设置库存'
,
authUrl
:
ADD_REPOSITORIES
,
},
],
[])
/** @review 就离谱, 搜索状态值拼接到链接上,后端不做交给了前端。坑啊 */
const
withParamsList
=
useMemo
(()
=>
{
const
status
=
{
"商品总数"
:
""
,
"品牌总数"
:
""
,
"待提交审核商品"
:
"statusList=1"
,
"待上架商品"
:
"statusList=4"
,
"待提交审核品牌"
:
"status=1"
,
}
return
status
},
[])
const
formatDataWithLink
=
useMemo
(()
=>
{
// const newData = [...responseData];
// const newData = responseData?.map((_item) => {
// return {
// ..._item,
// link: `${_item.link}?${withParamsList[_item.name]}`
// }
// })
// return newData
},
[
responseData
,
withParamsList
])
return
(
<
Layout
hasAuth=
{
hasAbility
}
...
...
@@ -75,6 +69,7 @@ const ProductCenter: React.FC<Iprops> = () => {
<
Space
>
{
extraList
.
map
((
_item
)
=>
{
console
.
log
(
_item
,
'aaa'
)
return
(
<
Authorize
url=
{
_item
.
authUrl
}
...
...
@@ -90,25 +85,7 @@ const ProductCenter: React.FC<Iprops> = () => {
</
Space
>
}
>
<
div
className=
{
styles
.
wrapRow
}
>
<
span
className=
{
styles
.
rowTitle
}
>
{
intl
.
formatMessage
({
id
:
'home.productCenter.rowTitle'
})
}
</
span
>
<
div
className=
{
styles
.
rowValues
}
>
{
formatDataWithLink
?.
map
((
item
:
GetReportMemberHomeGetCommodityTallyResponse
[
0
],
key
)
=>
{
return
(
<
div
className=
{
styles
.
wrapCol
}
key=
{
key
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
?
<
Link
to=
{
item
.
link
}
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
Link
>
:
<
div
className=
{
styles
.
colValue
}
>
{
item
.
count
}
</
div
>
}
</
div
>
)
})
}
</
div
>
</
div
>
<
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterEmptyList
}
/>
</
Layout
>
)
}
...
...
src/pages/home/components/Centers/PurchaseCenter.tsx
View file @
9f5feefd
...
...
@@ -24,7 +24,9 @@ const KEY_TITLE = {
inviteTenderList
:
getIntl
().
formatMessage
({
id
:
'home.purchaseCenter.inviteTenderList'
}),
tenderList
:
getIntl
().
formatMessage
({
id
:
'home.purchaseCenter.tenderList'
}),
needPlanList
:
getIntl
().
formatMessage
({
id
:
'home.purchaseCenter.needPlanList'
}),
purchasePlanList
:
getIntl
().
formatMessage
({
id
:
'home.purchaseCenter.purchasePlanList'
})
purchasePlanList
:
getIntl
().
formatMessage
({
id
:
'home.purchaseCenter.purchasePlanList'
}),
requisitionsList
:
getIntl
().
formatMessage
({
id
:
'home.qinggoudan'
,
defaultMessage
:
'请购单'
}),
demandPoolList
:
getIntl
().
formatMessage
({
id
:
'home.xuqiuchi'
,
defaultMessage
:
'需求池'
}),
}
/** memberType 是否是企业会员或是企业个人会员 */
const
isBusiness
=
[
1
,
2
];
...
...
src/pages/home/components/Centers/QualityCenter.tsx
0 → 100644
View file @
9f5feefd
import
React
,
{
useCallback
,
useMemo
}
from
'react'
;
import
{
Space
}
from
'antd'
;
import
styles
from
'./center.less'
;
import
{
Link
,
useIntl
}
from
'umi'
;
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/useGetAuth'
;
import
{
getReportMemberHomeGetQualityReport
,
GetReportMemberHomeGetQualityReportResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{
};
const
QualityCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetQualityReportResponse
,
any
>
(
getReportMemberHomeGetQualityReport
,
{})
const
intl
=
useIntl
();
const
{
userAuth
,
hasAbilityFunc
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'commodityAbility'
);
const
{
StaticsDataList
}
=
Layout
const
KEY_TITLE
=
{
qualityInspectionList
:
intl
.
formatMessage
({
id
:
'home.zhijiandan'
,
defaultMessage
:
'质检单'
}),
eightDRectificationList
:
intl
.
formatMessage
({
id
:
'home.8Dzhenggai'
,
defaultMessage
:
'8D整改'
}),
eightDCollaborationList
:
intl
.
formatMessage
({
id
:
'home.8Dxietong'
,
defaultMessage
:
'8D协同'
}),
}
return
(
<
Layout
hasAuth=
{
hasAbility
}
viewRef=
{
ref
}
title=
{
intl
.
formatMessage
({
id
:
'home.zhiliangzhongxin'
,
defaultMessage
:
'质量中心'
})
}
tips=
{
intl
.
formatMessage
({
id
:
'home.tigongzhijiandanguanli8D'
,
defaultMessage
:
'提供质检单管理、8D 整改、8D 协同等功能。'
})
}
loading=
{
loading
}
isError=
{
isError
}
extra=
{
<
Space
>
<
Authorize
url=
{
'/memberCenter/quality'
}
>
<
div
>
<
Link
to=
{
'/memberCenter/quality'
}
>
{
intl
.
formatMessage
({
id
:
'home.jinruzhiliangzhongxin'
,
defaultMessage
:
'进入质量中心'
})
}
</
Link
>
</
div
>
</
Authorize
>
</
Space
>
}
>
<
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterEmptyList
}
/>
</
Layout
>
)
}
export
default
QualityCenter
src/pages/home/components/Centers/SettlementCenter.tsx
View file @
9f5feefd
...
...
@@ -5,6 +5,10 @@ import settlement_integrate from '@/assets/imgs/settlement_integrate.png';
import
settlement_accountReceive
from
'@/assets/imgs/settlement_accountReceive.png'
;
import
settlement_accountPayable
from
'@/assets/imgs/settlement_accountPayable.png'
;
import
settlement_invoice
from
'@/assets/imgs/settlement_invoice.png'
;
import
settlement_invoiceCoordination
from
'@/assets/imgs/settlement_integrate.png'
;
import
settlement_businessRequest
from
'@/assets/imgs/settlement_invoice.png'
;
import
settlement_businessReconciliation
from
'@/assets/imgs/settlement_accountReceive.png'
;
import
settlement_coordination
from
'@/assets/imgs/settlement_accountPayable.png'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
getReportMemberHomeGetSettleAccountTally
,
GetReportMemberHomeGetSettleAccountTallyResponse
}
from
'@/services/ReportV2Api'
;
import
Layout
from
'./layout'
;
...
...
@@ -17,7 +21,13 @@ const KEY_TITLE = {
payableList
:
getIntl
().
formatMessage
({
id
:
'home.settlementCenter.payableList'
}),
platformList
:
getIntl
().
formatMessage
({
id
:
'home.settlementCenter.platformList'
}),
platformScoreList
:
getIntl
().
formatMessage
({
id
:
'home.settlementCenter.platformScoreList'
}),
receivableList
:
getIntl
().
formatMessage
({
id
:
'home.settlementCenter.receivableList'
})
receivableList
:
getIntl
().
formatMessage
({
id
:
'home.settlementCenter.receivableList'
}),
billingManagementList
:
getIntl
().
formatMessage
({
id
:
'home.kaipiaoguanli'
,
defaultMessage
:
'开票管理'
}),
invoiceCoordinationList
:
getIntl
().
formatMessage
({
id
:
'home.fapiaoxietong'
,
defaultMessage
:
'发票协同'
}),
businessReconciliationList
:
getIntl
().
formatMessage
({
id
:
'home.yewuduizhang'
,
defaultMessage
:
'业务对账'
}),
businessReconciliationCollaborationList
:
getIntl
().
formatMessage
({
id
:
'home.yewuduizhangxietong'
,
defaultMessage
:
'业务对账协同'
}),
businessRequestList
:
getIntl
().
formatMessage
({
id
:
'home.yewuqingkuan'
,
defaultMessage
:
'业务请款'
}),
platformCouponSettlementList
:
getIntl
().
formatMessage
({
id
:
'home.pingtaiyouhuiquanjiesuan'
,
defaultMessage
:
'平台优惠券结算'
}),
}
// 结算中心:根据当前用户+当前角色是否有此结算能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
...
...
@@ -27,10 +37,19 @@ const KEY_TITLE = {
// 4、应付账款结算:判断当前用户是否有应付账款结算权限,有则显示应付账款结算按钮与图标,点击跳转支付能力-应付账款管理-应付账款结算
// 5、开票管理:判断当前用户是否有开票管理权限,有则显示开票管理按钮与图标,点击跳转支付能力-应收账款管理-开票管理
export
enum
RoleEnum
{
/** 1: 供应商 */
Supplier
=
1
,
/** 2: 采购商 */
Purchaser
=
2
}
const
SettlementCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGetSettleAccountTallyResponse
,
any
>
(
getReportMemberHomeGetSettleAccountTally
,
{})
const
intl
=
useIntl
();
const
{
hasAbilityFunc
,
userAuth
}
=
useGetAuth
();
const
{
memberRoleType
}
=
userAuth
const
hasAbility
=
hasAbilityFunc
(
'balance'
);
const
enableMultiTenancy
=
useMemo
(()
=>
getEnableMultiTenancy
(),
[])
...
...
@@ -50,26 +69,58 @@ const SettlementCenter: React.FC<Iprops> = () => {
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_businessReconciliation
,
title
:
'业务对账'
,
url
:
'/memberCenter/balance/businessReconciliation/readyReconciliation'
,
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_coordination
,
title
:
'业务对账协同'
,
url
:
'/memberCenter/balance/businessReconciliationCollaboration/search'
,
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_businessRequest
,
title
:
'业务请款'
,
url
:
'/memberCenter/balance/businessRequestFunds/search'
,
enableMulti
:
enableMultiTenancy
??
false
},
...(
memberRoleType
===
RoleEnum
.
Purchaser
?
[
{
icon
:
settlement_invoice
,
title
:
'发票管理'
,
url
:
'/memberCenter/balance/invoice/ready'
,
enableMulti
:
enableMultiTenancy
??
false
}
]
:
[
{
icon
:
settlement_invoice
,
title
:
'发票管理'
,
url
:
'/memberCenter/balance/invoice/list'
,
enableMulti
:
enableMultiTenancy
??
false
}
]),
{
icon
:
settlement_invoiceCoordination
,
title
:
'发票协同'
,
url
:
'/memberCenter/balance/invoiceJoint/list'
,
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_accountReceive
,
title
:
intl
.
formatMessage
({
id
:
'home.settlementCenter.title3'
})
,
title
:
'应收账款结算'
,
url
:
'/memberCenter/balance/accountsReceivable/settlementList'
,
enableMulti
:
false
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_accountPayable
,
title
:
intl
.
formatMessage
({
id
:
'home.settlementCenter.title4'
}),
url
:
'/memberCenter/balance/accountsPayable/settlementList'
,
enableMulti
:
false
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_invoice
,
title
:
intl
.
formatMessage
({
id
:
'home.settlementCenter.title5'
}),
url
:
'/memberCenter/balance/accountsReceivable/invoice'
,
enableMulti
:
false
}
].
filter
((
_item
)
=>
userAuth
.
urls
?.
includes
(
_item
.
url
)
&&
!
_item
.
enableMulti
)
},
[
userAuth
])
},
[
userAuth
,
memberRoleType
])
/** @review 搜索状态值拼接到链接上,后端不做交给了前端。坑啊 */
const
withParamsList
=
useMemo
(()
=>
{
...
...
@@ -92,8 +143,8 @@ const SettlementCenter: React.FC<Iprops> = () => {
const
withSearchStatusData
=
useMemo
(()
=>
withQueryParams
(
withParamsList
),
[
withQueryParams
,
withParamsList
]);
/** 如果开启了多用户, 那么过滤掉平台积分结算, 平台代收账款结算 */
const
filterMultiTenancy
=
enableMultiTenancy
?
{
payableList
:
withSearchStatusData
[
'payableList'
],
receivableList
:
withSearchStatusData
[
'receivableList'
]
}
const
filterMultiTenancy
=
enableMultiTenancy
?
{
payableList
:
withSearchStatusData
[
'payableList'
],
receivableList
:
withSearchStatusData
[
'receivableList'
]
}
:
withSearchStatusData
return
(
<
Layout
...
...
src/pages/home/components/Centers/VendorCenter.tsx
0 → 100644
View file @
9f5feefd
import
React
,
{
useCallback
,
useMemo
}
from
'react'
;
import
{
Space
}
from
'antd'
;
import
styles
from
'./center.less'
;
import
{
Link
,
useIntl
}
from
'umi'
;
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/useGetAuth'
;
import
{
getReportMemberHomeGeVendorReport
,
GetReportMemberHomeGeVendorReportResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{
};
const
VendorCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
withQueryParams
}
=
useViewRequest
<
GetReportMemberHomeGeVendorReportResponse
,
any
>
(
getReportMemberHomeGeVendorReport
,
{})
const
intl
=
useIntl
();
const
{
userAuth
,
hasAbilityFunc
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'commodityAbility'
);
const
{
StaticsDataList
}
=
Layout
const
KEY_TITLE
=
{
vendorImportList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangrukushu'
,
defaultMessage
:
'供应商入库数'
}),
vendorChangeList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangbiangeng'
,
defaultMessage
:
'供应商变更'
}),
vendorKpiList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangkaoping'
,
defaultMessage
:
'供应商考评'
}),
vendorRectifyList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangzhenggai'
,
defaultMessage
:
'供应商整改'
}),
vendorRectifyNoticeList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangzhenggaitongzhi'
,
defaultMessage
:
'供应商整改通知'
}),
vendorImportChangeList
:
intl
.
formatMessage
({
id
:
'home.gongyingshangrukuziliaobian'
,
defaultMessage
:
'供应商入库资料变更'
}),
}
return
(
<
Layout
hasAuth=
{
hasAbility
}
viewRef=
{
ref
}
title=
{
intl
.
formatMessage
({
id
:
'home.gongyingshangzhongxin'
,
defaultMessage
:
'供应商中心'
})
}
tips=
{
intl
.
formatMessage
({
id
:
'home.tigonggongyingshangruku'
,
defaultMessage
:
'提供供应商入库、变更、考评、整改等功能。'
})
}
loading=
{
loading
}
isError=
{
isError
}
extra=
{
<
Space
>
<
Authorize
url=
{
'/memberCenter/supplierAbility'
}
>
<
div
>
<
Link
to=
{
'/memberCenter/supplierAbility'
}
>
{
intl
.
formatMessage
({
id
:
'home.jinrugongyingshangzhongxin'
,
defaultMessage
:
'进入供应商中心'
})
}
</
Link
>
</
div
>
</
Authorize
>
</
Space
>
}
>
<
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterEmptyList
}
/>
</
Layout
>
)
}
export
default
VendorCenter
src/pages/home/components/Centers/index.tsx
View file @
9f5feefd
...
...
@@ -11,6 +11,10 @@ import PurchaseCenter from './PurchaseCenter';
import
OrderCenter
from
'./OrderCenter'
;
import
ChannelMallCenter
from
'./ChannelMallCenter'
;
import
MemberCenter
from
'./MemberCenter'
;
import
CustomeCenter
from
'./CustomeCenter'
;
import
VendorCenter
from
'./VendorCenter'
;
import
MarketingCenter
from
'./MarketingCenter'
;
import
QualityCenter
from
'./QualityCenter'
;
export
{
TradeCenter
,
...
...
@@ -25,5 +29,9 @@ export {
PurchaseCenter
,
OrderCenter
,
ChannelMallCenter
,
MemberCenter
MemberCenter
,
CustomeCenter
,
VendorCenter
,
QualityCenter
,
MarketingCenter
,
}
src/pages/home/hooks/useGetAuth.tsx
View file @
9f5feefd
...
...
@@ -15,6 +15,10 @@ type AbilityNameType = "orderAbility"
|
"logisticsAbility"
|
"handling"
|
"memberAbility"
"customerAbility"
"supplierAbility"
"quality"
"marketingAbility"
type
isCheckedLayoutsType
=
{
id
:
number
|
null
,
...
...
@@ -113,6 +117,25 @@ const useGetAuth = () => {
"/memberCenter/memberAbility/memberRectification/"
,
"/memberCenter/memberAbility/profile/"
,
],
//客户
"customerAbility"
:
[
"/memberCenter/customerAbility/manage"
,
"/memberCenter/customerAbility/memberEvaluate"
,
],
// 供应商
"supplierAbility"
:
"/memberCenter/supplierAbility"
,
// 质量
"quality"
:
[
"/memberCenter/quality/qualityManage"
,
"/memberCenter/quality/8D/page"
,
"/memberCenter/quality/8D/pageCoordination"
,
],
// 营销
"marketingAbility"
:
[
"/memberCenter/marketingAbility/selfManagement"
,
"/memberCenter/marketingAbility/paltformSign"
,
"/memberCenter/marketingAbility/merchantCoupon"
,
]
}
},
[])
...
...
src/pages/home/index.tsx
View file @
9f5feefd
...
...
@@ -9,7 +9,7 @@ import LatestAnnounce from './components/LatestAnnounces';
import
RecentVisit
from
'./components/RecentVisit'
;
import
AnyQuestion
from
'./components/AnyQuestion'
;
import
AdvertisementContainer
from
'./components/AdvertisementSpace'
;
import
{
TradeCenter
,
FundCenter
,
ShopCenter
,
ProductCenter
,
SettlementCenter
,
AfterSoldCenter
,
LogisticsCenter
,
ProcessCenter
,
Contract
,
PurchaseCenter
,
OrderCenter
,
ChannelMallCenter
,
MemberCenter
}
from
'./components/Centers'
;
import
{
TradeCenter
,
FundCenter
,
ShopCenter
,
ProductCenter
,
SettlementCenter
,
AfterSoldCenter
,
LogisticsCenter
,
ProcessCenter
,
Contract
,
PurchaseCenter
,
OrderCenter
,
ChannelMallCenter
,
MemberCenter
,
CustomeCenter
,
VendorCenter
,
QualityCenter
,
MarketingCenter
}
from
'./components/Centers'
;
import
styles
from
'./index.less'
import
{
CompassFilled
}
from
'@ant-design/icons'
;
import
useGetAuth
from
'./hooks/useGetAuth'
;
...
...
@@ -28,6 +28,10 @@ const ComponentSelect = {
"采购中心"
:
PurchaseCenter
,
"订单中心"
:
OrderCenter
,
'渠道商城中心'
:
ChannelMallCenter
,
'客户中心'
:
CustomeCenter
,
'供应商中心'
:
VendorCenter
,
'质量中心'
:
QualityCenter
,
'营销中心'
:
MarketingCenter
,
"数据中心"
:
''
,
"风控中心"
:
''
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment