Commit 756cd9f5 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents eb6cdd8f 7a894501
import menu from './zh-CN/menu' import menu from './zh-CN/menu'
import home from './zh-CN/home'
export default { export default {
'global.siteName': '瓴犀', 'global.siteName': '瓴犀',
...menu, ...menu,
...home,
} }
export default {
'home.title' : '首页',
'home.guide' : '使用向导',
'home.anyQuestion.title' : '平台使用中遇到问题',
'home.anyQuestion.tips1' : '您的专属服务团队',
'home.anyQuestion.tips2' : '客户经理、项目经理、技术专家为你解答平台使用过程中遇到任何问题',
'home.anyQuestion.ask' : '我要提问',
'home.afterSoldCenter.repairApplyList' : '售后维修申请',
'home.afterSoldCenter.repairHandleList' : '售后维修处理',
'home.afterSoldCenter.replaceApplyList' : '售后换货申请',
'home.afterSoldCenter.replaceHandleList' : '售后换货处理',
'home.afterSoldCenter.returnApplyList' : '售后退货申请',
'home.afterSoldCenter.returnHandleList' : '售后退货处理',
'home.afterSoldCenter.layoutTitle' : '售后中心',
'home.afterSoldCenter.layoutTips' : '轻松完成订单售后在线换货、退货、维修环节',
'home.afterSoldCenter.authorize.url' : '进入售后中心',
'home.channelMallCenter.title1' : '创建渠道商城',
'home.channelMallCenter.title2' : '渠道商城模板',
'home.channelMallCenter.title3' : '渠道商城装修',
'home.channelMallCenter.title4' : '业务员绑定渠道',
'home.channelMallCenter.layoutTitle' : '渠道商城中心',
'home.channelMallCenter.layoutTips' : '轻松完成渠道商城的创建、渠道商城风格选择、个性化装修',
'home.channelMallCenter.authorize.url' : '进入渠道商城中心',
'home.channelMallCenter.alertTip' : '您还没有创建渠道商城,请先创建渠道商城',
'home.constract.contractManageList' : '合同管理',
'home.constract.contractCoordinationList' : '合同协同',
'home.constract.applyAmountOrderList' : '合同请款',
'home.constract.layoutTitle' : '合同中心',
'home.constract.layoutTips' : '提供在电子签章申请,合同管理、电子合同签订、合同请款、合同协同等功能',
'home.constract.authorize.url' : '进入合同中心',
'home.constract.alertTip' : '您还没有申请电子签章,请先申请电子签章',
'home.fundCenter.creditList' : '授信处理',
'home.fundCenter.accountList' : '资金账户管理',
'home.fundCenter.title1' : '资金账户',
'home.fundCenter.title2' : '授信账户',
'home.fundCenter.title3' : '资金账户管理',
'home.fundCenter.title4' : '授信管理',
'home.fundCenter.layoutTitle' : '资金账户管理',
'home.fundCenter.layoutTips' : '提供资金账户管理、授信额度管理等功能。',
'home.layout.isError' : '拉取数据时发生了错误,点击刷新',
'home.layout.extra' : '点击创建',
'home.logisticsCenter.title1' : '物流派单',
'home.logisticsCenter.title2' : '接单报价',
'home.logisticsCenter.title3' : '收货地址管理',
'home.logisticsCenter.title4' : '发货地址管理',
'home.logisticsCenter.title5' : '运费模板',
'home.logisticsCenter.layoutTitle' : '物流中心',
'home.logisticsCenter.layoutTips' : '快速完成物流派单、接单、报价、物流信息对接',
'home.logisticsCenter.authorize.url' : '进入物流中心',
'home.logisticsCenter.alertTip' : '您还没有创建物流公司门户,请先创建物流公司门户',
'home.memberCenter.importList' : '会员入库',
'home.memberCenter.changeList' : '会员变更',
'home.memberCenter.kpiList' : '会员考评',
'home.memberCenter.rectifyList' : '会员整改',
'home.memberCenter.rectifyNoticeList' : '整改通知',
'home.memberCenter.layoutTitle' : '会员中心',
'home.memberCenter.authorize.url' : '会员中心',
'home.orderCenter.saleOrderList' : '销售订单',
'home.orderCenter.purchaseOrderList' : '采购订单',
'home.orderCenter.layoutTitle' : '订单中心',
'home.orderCenter.layoutTips' : '提供订单管理、签订电子合同等功能',
'home.orderCenter.authorize.url' : '进入订单中心',
'home.processCenter.supplierList' : '指派生产通知单',
'home.processCenter.processList' : '生产通知单处理',
'home.processCenter.layoutTitle' : '加工中心',
'home.processCenter.layoutTips' : '提供外发生产、加工、装配全流程环节管控',
'home.processCenter.authorize.url' : '加工中心',
'home.processCenter.alertTip' : '您还没有创建加工企业门户,请先创建加工企业门户。',
'home.productCenter.title1' : '创建品牌',
'home.productCenter.title2' : '创建商品',
'home.productCenter.title3' : '设置库存',
'home.productCenter.layoutTitle' : '商品中心',
'home.productCenter.layoutTips' : '快速完成品牌、商品创建、发布、提供灵活的商品库存管理',
'home.productCenter.rowTitle' : '商品',
'home.purchaseCenter.purchaseInquiryList' : '采购询价',
'home.purchaseCenter.quotedPriceList' : '报价',
'home.purchaseCenter.confirmQuotedPriceList' : '确认报价',
'home.purchaseCenter.biddingList' : '采购竞价',
'home.purchaseCenter.onlineBiddingList' : '在线竞价',
'home.purchaseCenter.inviteTenderList' : '招标',
'home.purchaseCenter.tenderList' : '采购询价',
'home.purchaseCenter.needPlanList' : '采购询价',
'home.purchaseCenter.purchasePlanList' : '采购询价',
'home.purchaseCenter.layoutTitle' : '采购中心',
'home.purchaseCenter.layoutTips' : '提供在线采购询价、在线报价、在线招投标、在线竞价、制订采购计划、创建采购门户等功能',
'home.purchaseCenter.authorize.url' : '进入采购中心',
'home.purchaseCenter.dingTips' : '您还没有创建采购门户,请先创建采购门户',
'home.purchaseCenter.dingTips.button' : '点击创建',
'home.settlementCenter.payableList' : '应付账款结算',
'home.settlementCenter.platformList' : '平台代收账款结算',
'home.settlementCenter.platformScoreList' : '平台积分结算',
'home.settlementCenter.receivableList' : '应收账款结算',
'home.settlementCenter.title1' : '平台代收款结算',
'home.settlementCenter.title2' : '平台积分结算',
'home.settlementCenter.title3' : '应收账款结算',
'home.settlementCenter.title4' : '应付账款结算',
'home.settlementCenter.title5' : '开票管理',
'home.settlementCenter.layoutTitle' : '结算中心',
'home.settlementCenter.layoutTips' : '提供资资金结算、发票管理等功能',
'home.shopCenter.title1' : '创建店铺',
'home.shopCenter.title2' : '店铺模板',
'home.shopCenter.title3' : '店铺装修',
'home.shopCenter.layoutTitle' : '店铺中心',
'home.shopCenter.layoutTips' : '轻松完成店铺的创建、店铺风格选择、店铺个性化装修',
'home.shopCenter.alertTip' : '轻松完成店铺的创建、店铺风格选择、店铺个性化装修。',
'home.tradeCenter.commodityInquiryList' : '商品询价',
'home.tradeCenter.inquiryQuotationList' : '询价报价',
'home.tradeCenter.confirmInquiryQuotationList' : '确认询价报价',
'home.tradeCenter.demandPublishList' : '需求发布',
'home.tradeCenter.demandQuotationList' : '需求报价',
'home.tradeCenter.confirmDemandQuotationList' : '确认需求报价',
'home.tradeCenter.saleOrderList' : '销售订单',
'home.tradeCenter.purchaseOrderList' : '采购订单',
'home.tradeCenter.layoutTitle' : '交易中心',
'home.tradeCenter.layoutTips' : '提供在线发布需求,在线询价、在线报价、订单交易、签订电子合同等功能',
'home.tradeCenter.authorize.url' : '进入交易中心',
'home.customWorkBench.customWorkBench' : '自定义工作台',
'home.customWorkBench.title' : '产品模块自定义',
'home.customWorkBench.tips' : '在此你可根据业务形态自定义展示后期可在“自定义工作台”中随时调整',
'home.customWorkBench.sortTips' : '可拖动排序',
'home.latestAnnouces.title' : '最新公告',
'home.latestAnnouces.month' : '月',
'home.latestAnnouces.noticeFooter' : '我知道了',
'home.recentVisit.title' : '最近访问',
'home.useGuaid.title' : '定义产品功能',
'home.useGuaid.description' : '开发第一步,标准功能、自定义功能及云功能编辑',
'home.useGuaid.a' : '如何定义',
'home.useGuaid.firstp' : '使用向导',
'home.useGuaid.guideTitle' : '1.新建商品',
'home.useGuaid.guideDesc' : '三分钟智能化,完成商品创建',
'home.useGuaid.guideClose' : '关闭',
'home.userCenter.year' : '年',
'home.userCenter.month' : '月',
'home.userCenter.day' : '日',
'home.userCenter.day0' : '星期天',
'home.userCenter.day1' : '星期一',
'home.userCenter.day2' : '星期二',
'home.userCenter.day3' : '星期三',
'home.userCenter.day4' : '星期四',
'home.userCenter.day5' : '星期五',
'home.userCenter.day6' : '星期六',
'home.userCenter.wellcome' : '欢迎来到',
'home.userCenter.error' : '仅支持上传JPEG/JPG/PNG文件!',
'home.userCenter.upload' : '修改',
'home.userCenter.link' : '修改会员信息',
'home.userCenter.level' : '会员等级',
'home.userCenter.score' : '平台积分',
'home.userCenter.userAuth.link' : '进入会员中心',
}
...@@ -25,12 +25,13 @@ interface CouponsDrawerProps { ...@@ -25,12 +25,13 @@ interface CouponsDrawerProps {
onClose: () => void, onClose: () => void,
onConfirm?: (record) => void, onConfirm?: (record) => void,
selectId?: number, selectId?: number,
disabledKeys?: number[],
// 1平台,2商家 // 1平台,2商家
belongType?: 1 | 2 belongType?: 1 | 2
} }
const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps) => { const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps) => {
const { visible, onClose, onConfirm, selectId } = props; const { visible, onClose, onConfirm, disabledKeys, selectId } = props;
const { query: { shopId } }: any = history.location const { query: { shopId } }: any = history.location
const [type, setType] = useState(2); const [type, setType] = useState(2);
const [selectedRowKeys, setSelectedRowKeys] = useState<any>(selectId ? [selectId] : []); const [selectedRowKeys, setSelectedRowKeys] = useState<any>(selectId ? [selectId] : []);
...@@ -135,7 +136,10 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps) ...@@ -135,7 +136,10 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
setSelectedRows(selectedRows); setSelectedRows(selectedRows);
setSelectedRowKeys(selectedRowKeys) setSelectedRowKeys(selectedRowKeys)
}, },
type: 'radio' type: 'radio',
getCheckboxProps: (record: any) => ({
disabled: disabledKeys?.includes(record.id), // Column configuration not to be checked
}),
} }
const drawerStyle = { background: '#FAFBFC' }; const drawerStyle = { background: '#FAFBFC' };
......
...@@ -334,7 +334,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => { ...@@ -334,7 +334,7 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
setSelectedRows(selectedRows); setSelectedRows(selectedRows);
setSelectedRowKeys(selectedRowKeys) setSelectedRowKeys(selectedRowKeys)
}, },
type: selectType type: selectType,
} }
useEffect(() => { useEffect(() => {
......
...@@ -5,9 +5,8 @@ import moment from 'moment'; ...@@ -5,9 +5,8 @@ import moment from 'moment';
import { postMarketingCouponActivityPageSelectDetail } from '@/services/MarketingV2Api'; import { postMarketingCouponActivityPageSelectDetail } from '@/services/MarketingV2Api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat' import { priceFormat } from '@/utils/numberFomat'
import useSamLevelProps from '../../../common/hooks/useSameLevelProps';
import CouponsDrawer from '@/pages/editor/components/drawer/couponsDrawer'; import CouponsDrawer from '@/pages/editor/components/drawer/couponsDrawer';
import styles from './index.less'; import styles from './index.less';
interface MarketingCardCouponProps { interface MarketingCardCouponProps {
...@@ -21,6 +20,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin ...@@ -21,6 +20,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
const { id, belongType, selectedKey } = props; const { id, belongType, selectedKey } = props;
const [drawerVisible, setDrawerVisible] = useState(false); const [drawerVisible, setDrawerVisible] = useState(false);
const [record, setRecord] = useState<any>(); const [record, setRecord] = useState<any>();
const sameLevelPropsList = useSamLevelProps({ key: selectedKey })
useEffect(() => { useEffect(() => {
changeStylesByKey({ changeStylesByKey({
...@@ -104,6 +104,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin ...@@ -104,6 +104,7 @@ const MarketingCardCoupon: React.FC<MarketingCardCouponProps> = (props: Marketin
belongType={belongType} belongType={belongType}
onClose={_onClose} onClose={_onClose}
onConfirm={_onChooseConfirm} onConfirm={_onChooseConfirm}
disabledKeys={sameLevelPropsList ? sameLevelPropsList.map((item) => item.id) : []}
selectId={id} selectId={id}
/> />
</div> </div>
......
import React, {useEffect} from 'react'; import React, { useEffect } from 'react';
import { useIntl } from 'umi';
import styles from './index.less'; import styles from './index.less';
import ask from '@/assets/imgs/ask.png'; import ask from '@/assets/imgs/ask.png';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import { configUsr, initQiyuImServer, toChatRoom } from '@/utils/im'; import { configUsr, initQiyuImServer, toChatRoom } from '@/utils/im';
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
interface Iprops {} interface Iprops { }
const AnyQuestion: React.FC<Iprops> = () => { const AnyQuestion: React.FC<Iprops> = () => {
const intl = useIntl();
const authInfo: any = getAuth() || {} const authInfo: any = getAuth() || {}
// 根据接口配置 跳转lx-IM或者七鱼IM,并传入初始秘钥 1 //自有 2 //第三方 // 根据接口配置 跳转lx-IM或者七鱼IM,并传入初始秘钥 1 //自有 2 //第三方
const _self = GlobalConfig?.global?.imConfig ? GlobalConfig.global.imConfig.type : null const _self = GlobalConfig?.global?.imConfig ? GlobalConfig.global.imConfig.type : null
useEffect(() => { useEffect(() => {
if(_self === 2) { if (_self === 2) {
// 第三方 // 第三方
const s = GlobalConfig.global.imConfig.paramConfigList[0]['value'] const s = GlobalConfig.global.imConfig.paramConfigList[0]['value']
const _window: any = window const _window: any = window
...@@ -23,33 +24,33 @@ const AnyQuestion: React.FC<Iprops> = () => { ...@@ -23,33 +24,33 @@ const AnyQuestion: React.FC<Iprops> = () => {
}, []) }, [])
const openIMServer = () => { const openIMServer = () => {
if(_self === 2) { if (_self === 2) {
configUsr(authInfo) configUsr(authInfo)
const _window: any = window const _window: any = window
_window?.ysf && _window.ysf('open') _window?.ysf && _window.ysf('open')
} else if(_self === 1) { } else if (_self === 1) {
toChatRoom(authInfo.memberId) toChatRoom(authInfo.memberId)
} }
} }
return ( return (
<div className={styles.anyQuestion}> <div className={styles.anyQuestion}>
<div className={styles.title}>平台使用中遇到问题</div> <div className={styles.title}>{intl.formatMessage({ id: 'home.anyQuestion.title' })}</div>
<div className={styles.body}> <div className={styles.body}>
<p className={styles.tips}>您的专属服务团队</p> <p className={styles.tips}>{intl.formatMessage({ id: 'home.anyQuestion.tips1' })}</p>
<p className={styles.tips}>客户经理、项目经理、技术专家为你解答平台使用过程中遇到任何问题</p> <p className={styles.tips}>{intl.formatMessage({ id: 'home.anyQuestion.tips2' })}</p>
</div> </div>
<div className={styles.ask}> <div className={styles.ask}>
{ {
_self === null ? _self === null ?
null null
: :
<a <a
target={"__blank"} target={"__blank"}
onClick={openIMServer} onClick={openIMServer}
> >
我要提问 {intl.formatMessage({ id: 'home.anyQuestion.ask' })}
</a> </a>
} }
</div> </div>
<div className={styles.ask_image}> <div className={styles.ask_image}>
......
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetAfterSaleTally, GetReportMemberHomeGetAfterSaleTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetAfterSaleTally, GetReportMemberHomeGetAfterSaleTallyResponse } from '@/services/ReportV2Api';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops { };
const KEY_TITLE = { const KEY_TITLE = {
repairApplyList: '售后维修申请', repairApplyList: getIntl().formatMessage({ id: 'home.afterSoldCenter.repairApplyList' }),
repairHandleList: '售后维修处理', repairHandleList: getIntl().formatMessage({ id: 'home.afterSoldCenter.repairHandleList' }),
replaceApplyList: '售后换货申请', replaceApplyList: getIntl().formatMessage({ id: 'home.afterSoldCenter.replaceApplyList' }),
replaceHandleList: '售后换货处理', replaceHandleList: getIntl().formatMessage({ id: 'home.afterSoldCenter.replaceHandleList' }),
returnApplyList: '售后退货申请', returnApplyList: getIntl().formatMessage({ id: 'home.afterSoldCenter.returnApplyList' }),
returnHandleList: '售后退货处理' returnHandleList: getIntl().formatMessage({ id: 'home.afterSoldCenter.returnHandleList' })
} }
const EXCHANGE_APPLICATION = `/memberCenter/afterService/exchangeApplication/exchangeQuery` const EXCHANGE_APPLICATION = `/memberCenter/afterService/exchangeApplication/exchangeQuery`
const EXCHANGE_HANDLE = '/memberCenter/afterService/exchangeManage/exchangeQuery'; const EXCHANGE_HANDLE = '/memberCenter/afterService/exchangeManage/exchangeQuery';
...@@ -23,6 +23,7 @@ const EXCHANGE_HANDLE = '/memberCenter/afterService/exchangeManage/exchangeQuery ...@@ -23,6 +23,7 @@ const EXCHANGE_HANDLE = '/memberCenter/afterService/exchangeManage/exchangeQuery
// 进入售后中心:当前会员角色类型为服务消费则点击进入售后能力-售后换货申请--换货申请单查询页,如果当前会员角色类型为服务提供则点击进入售后能力-售后换货处理--换货申请单查询页 // 进入售后中心:当前会员角色类型为服务消费则点击进入售后能力-售后换货申请--换货申请单查询页,如果当前会员角色类型为服务提供则点击进入售后能力-售后换货处理--换货申请单查询页
const AfterSoldCenter: React.FC<Iprops> = () => { const AfterSoldCenter: React.FC<Iprops> = () => {
const intl = useIntl();
const { loading, responseData, ref, filterEmptyList, isError } = useViewRequest<GetReportMemberHomeGetAfterSaleTallyResponse, any>(getReportMemberHomeGetAfterSaleTally, {}) const { loading, responseData, ref, filterEmptyList, isError } = useViewRequest<GetReportMemberHomeGetAfterSaleTallyResponse, any>(getReportMemberHomeGetAfterSaleTally, {})
const { hasAbilityFunc, isConsumer } = useGetAuth(); const { hasAbilityFunc, isConsumer } = useGetAuth();
const hasAbility = hasAbilityFunc('afterService'); const hasAbility = hasAbilityFunc('afterService');
...@@ -32,14 +33,14 @@ const AfterSoldCenter: React.FC<Iprops> = () => { ...@@ -32,14 +33,14 @@ const AfterSoldCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="售后中心" title={intl.formatMessage({ id: 'home.afterSoldCenter.layoutTitle' })}
tips={"轻松完成订单售后在线换货、退货、维修环节"} tips={intl.formatMessage({ id: 'home.afterSoldCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>进入售后中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.afterSoldCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
......
...@@ -3,7 +3,7 @@ import styles from './center.less' ...@@ -3,7 +3,7 @@ import styles from './center.less'
import create_shop from '@/assets/imgs/create_shop.png'; import create_shop from '@/assets/imgs/create_shop.png';
import { BellOutlined, RightOutlined } from '@ant-design/icons' import { BellOutlined, RightOutlined } from '@ant-design/icons'
import { Button } from 'antd'; import { Button } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
...@@ -11,7 +11,7 @@ import { getTemplateWebMemberChannelWebFindCurrMemberChannel, GetTemplateWebMemb ...@@ -11,7 +11,7 @@ import { getTemplateWebMemberChannelWebFindCurrMemberChannel, GetTemplateWebMemb
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getMemberAbilitySalesPage } from '@/services/MemberV2Api'; import { getMemberAbilitySalesPage } from '@/services/MemberV2Api';
interface Iprops {} interface Iprops { }
const SHOP_CENTER = '/memberCenter/channelAbility/infoManage' const SHOP_CENTER = '/memberCenter/channelAbility/infoManage'
const CREATE_TEMPLATE = '/memberCenter/channelAbility/template'; const CREATE_TEMPLATE = '/memberCenter/channelAbility/template';
...@@ -26,10 +26,11 @@ const BIND_MANAGER = '/memberCenter/channelAbility/memberList' ...@@ -26,10 +26,11 @@ const BIND_MANAGER = '/memberCenter/channelAbility/memberList'
// 6、如果当前用户有创建渠道商城权限,但还未创建渠道商城,则显示:您还没有创建渠道商城,请先创建渠道商城,点击创建渠道商城,跳转能力中心-渠道能力-渠道商城管理-创建渠道商城铺页 // 6、如果当前用户有创建渠道商城权限,但还未创建渠道商城,则显示:您还没有创建渠道商城,请先创建渠道商城,点击创建渠道商城,跳转能力中心-渠道能力-渠道商城管理-创建渠道商城铺页
const ChannelMallCenter: React.FC<Iprops> = () => { const ChannelMallCenter: React.FC<Iprops> = () => {
const intl = useIntl();
const { userAuth, hasAbilityFunc } = useGetAuth(); const { userAuth, hasAbilityFunc } = useGetAuth();
const { loading, responseData, isError, ref, inViewPort } = useViewRequest<GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse, any>(getTemplateWebMemberChannelWebFindCurrMemberChannel, {memberId: userAuth.memberId}) const { loading, responseData, isError, ref, inViewPort } = useViewRequest<GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse, any>(getTemplateWebMemberChannelWebFindCurrMemberChannel, { memberId: userAuth.memberId })
const hasAbility = hasAbilityFunc('channelAbility'); const hasAbility = hasAbilityFunc('channelAbility');
const bindAuth = useMemo(() => userAuth.urls?.includes(BIND_MANAGER), [userAuth]); const bindAuth = useMemo(() => userAuth.urls?.includes(BIND_MANAGER), [userAuth]);
const [salerNum, setSalerNum] = useState(0); const [salerNum, setSalerNum] = useState(0);
const [hasFetchData, setHasFetchData] = useState(false) const [hasFetchData, setHasFetchData] = useState(false)
...@@ -38,7 +39,7 @@ const ChannelMallCenter: React.FC<Iprops> = () => { ...@@ -38,7 +39,7 @@ const ChannelMallCenter: React.FC<Iprops> = () => {
return; return;
} }
async function getManagerData() { async function getManagerData() {
const { data, code } = await getMemberAbilitySalesPage({current: '1', pageSize: '1'} as any) const { data, code } = await getMemberAbilitySalesPage({ current: '1', pageSize: '1' } as any)
setHasFetchData(true) setHasFetchData(true)
if (code === 1000) { if (code === 1000) {
setSalerNum(data.totalCount) setSalerNum(data.totalCount)
...@@ -51,25 +52,25 @@ const ChannelMallCenter: React.FC<Iprops> = () => { ...@@ -51,25 +52,25 @@ const ChannelMallCenter: React.FC<Iprops> = () => {
{ {
icon: create_shop, icon: create_shop,
url: SHOP_CENTER, url: SHOP_CENTER,
title: "创建渠道商城", title: intl.formatMessage({ id: 'home.channelMallCenter.title1' }),
hasAuth: userAuth.urls.includes(SHOP_CENTER), hasAuth: userAuth.urls.includes(SHOP_CENTER),
}, },
{ {
icon: create_shop, icon: create_shop,
url: CREATE_TEMPLATE, url: CREATE_TEMPLATE,
title: "渠道商城模板", title: intl.formatMessage({ id: 'home.channelMallCenter.title2' }),
hasAuth: userAuth.urls.includes(CREATE_TEMPLATE), hasAuth: userAuth.urls.includes(CREATE_TEMPLATE),
}, },
{ {
icon: create_shop, icon: create_shop,
url: CREATE_TEMPLATE, url: CREATE_TEMPLATE,
title: "渠道商城装修", title: intl.formatMessage({ id: 'home.channelMallCenter.title3' }),
hasAuth: userAuth.urls.includes(CREATE_TEMPLATE), hasAuth: userAuth.urls.includes(CREATE_TEMPLATE),
}, },
{ {
icon: create_shop, icon: create_shop,
url: BIND_MANAGER, url: BIND_MANAGER,
title: "业务员绑定渠道", title: intl.formatMessage({ id: 'home.channelMallCenter.title4' }),
hasAuth: bindAuth, hasAuth: bindAuth,
count: salerNum, count: salerNum,
} }
...@@ -79,12 +80,12 @@ const ChannelMallCenter: React.FC<Iprops> = () => { ...@@ -79,12 +80,12 @@ const ChannelMallCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="渠道商城中心" title={intl.formatMessage({ id: 'home.channelMallCenter.layoutTitle' })}
tips="轻松完成渠道商城的创建、渠道商城风格选择、个性化装修" tips={intl.formatMessage({ id: 'home.channelMallCenter.layoutTips' })}
extra={ extra={
<Authorize url={CREATE_TEMPLATE}> <Authorize url={CREATE_TEMPLATE}>
<div> <div>
<Link to={CREATE_TEMPLATE}>进入渠道商城中心</Link> <Link to={CREATE_TEMPLATE}>{intl.formatMessage({ id: 'home.channelMallCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
...@@ -94,7 +95,7 @@ const ChannelMallCenter: React.FC<Iprops> = () => { ...@@ -94,7 +95,7 @@ const ChannelMallCenter: React.FC<Iprops> = () => {
{ {
(responseData === null || !responseData?.id) && ( (responseData === null || !responseData?.id) && (
<Layout.AlertTip <Layout.AlertTip
content="您还没有创建渠道商城,请先创建渠道商城" content={intl.formatMessage({ id: 'home.channelMallCenter.alertTip' })}
url={SHOP_CENTER} url={SHOP_CENTER}
/> />
) )
......
...@@ -2,18 +2,18 @@ import React, { Fragment, useEffect, useMemo, useState } from 'react'; ...@@ -2,18 +2,18 @@ import React, { Fragment, useEffect, useMemo, useState } from 'react';
import Layout, { IDataListProps } from './layout'; import Layout, { IDataListProps } from './layout';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetContractTally, GetReportMemberHomeGetContractTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetContractTally, GetReportMemberHomeGetContractTallyResponse } from '@/services/ReportV2Api';
import { Link } from 'umi'; import { Link, useIntl, getIntl } from 'umi';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import { getContractSignatureAuthGet } from '@/services/ContractV2Api'; import { getContractSignatureAuthGet } from '@/services/ContractV2Api';
const { StaticsDataList, AlertTip } = Layout const { StaticsDataList, AlertTip } = Layout
interface Iprops {} interface Iprops { }
const KEY_TITLE = { const KEY_TITLE = {
"contractManageList": '合同管理', "contractManageList": getIntl().formatMessage({ id: 'home.constract.contractManageList' }),
"contractCoordinationList": '合同协同', "contractCoordinationList": getIntl().formatMessage({ id: 'home.constract.contractCoordinationList' }),
"applyAmountOrderList": '合同请款' "applyAmountOrderList": getIntl().formatMessage({ id: 'home.constract.applyAmountOrderList' })
} }
// 合同中心:根据当前用户+当前角色是否有合同能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序 // 合同中心:根据当前用户+当前角色是否有合同能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
...@@ -22,6 +22,7 @@ const KEY_TITLE = { ...@@ -22,6 +22,7 @@ const KEY_TITLE = {
const Constract: React.FC<Iprops> = (props: Iprops) => { const Constract: React.FC<Iprops> = (props: Iprops) => {
const { loading, isError, hasRequest, responseData, ref, inViewPort, filterEmptyList } = useViewRequest<GetReportMemberHomeGetContractTallyResponse, any>(getReportMemberHomeGetContractTally, {}) const { loading, isError, hasRequest, responseData, ref, inViewPort, filterEmptyList } = useViewRequest<GetReportMemberHomeGetContractTallyResponse, any>(getReportMemberHomeGetContractTally, {})
const intl = useIntl();
const [hasConstract, setHasConstract] = useState<boolean>(false); const [hasConstract, setHasConstract] = useState<boolean>(false);
const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth(); const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth();
const [hasFetchData, setHasFetchData] = useState(false) const [hasFetchData, setHasFetchData] = useState(false)
...@@ -47,15 +48,15 @@ const Constract: React.FC<Iprops> = (props: Iprops) => { ...@@ -47,15 +48,15 @@ const Constract: React.FC<Iprops> = (props: Iprops) => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="合同中心" title={intl.formatMessage({ id: 'home.constract.layoutTitle' })}
tips="提供在电子签章申请,合同管理、电子合同签订、合同请款、合同协同等功能" tips={intl.formatMessage({ id: 'home.constract.layoutTips' })}
loading={loading} loading={loading}
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>进入合同中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.constract.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
...@@ -65,7 +66,7 @@ const Constract: React.FC<Iprops> = (props: Iprops) => { ...@@ -65,7 +66,7 @@ const Constract: React.FC<Iprops> = (props: Iprops) => {
isConsumer && (!hasConstract) && ( isConsumer && (!hasConstract) && (
<AlertTip <AlertTip
url="/memberCenter/contract/ElectronicSignature/apply" url="/memberCenter/contract/ElectronicSignature/apply"
content="您还没有申请电子签章,请先申请电子签章" content={intl.formatMessage({ id: 'home.constract.alertTip' })}
/> />
) )
} }
......
import React, { useCallback, useMemo} from 'react'; import React, { useCallback, useMemo } from 'react';
import styles from './center.less' import styles from './center.less'
import settlement_platformCollection from '@/assets/imgs/settlement_platformCollection.png'; import settlement_platformCollection from '@/assets/imgs/settlement_platformCollection.png';
import settlement_integrate from '@/assets/imgs/settlement_integrate.png'; import settlement_integrate from '@/assets/imgs/settlement_integrate.png';
import settlement_accountReceive from '@/assets/imgs/settlement_accountReceive.png'; import settlement_accountReceive from '@/assets/imgs/settlement_accountReceive.png';
import settlement_accountPayable from '@/assets/imgs/settlement_accountPayable.png'; import settlement_accountPayable from '@/assets/imgs/settlement_accountPayable.png';
import settlement_invoice from '@/assets/imgs/settlement_invoice.png'; import settlement_invoice from '@/assets/imgs/settlement_invoice.png';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout, { IDataListProps } from './layout'; import Layout, { IDataListProps } from './layout';
import { getReportMemberHomeGetAccountTally, GetReportMemberHomeGetAccountTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetAccountTally, GetReportMemberHomeGetAccountTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops { };
const KEY_TO_TITLE = { const KEY_TO_TITLE = {
creditList: '授信处理', creditList: getIntl().formatMessage({ id: 'home.fundCenter.creditList' }),
accountList: '资金账户管理' accountList: getIntl().formatMessage({ id: 'home.fundCenter.accountList' })
} }
// 资金账户管理中心:根据当前用户+当前角色是否有此支付能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序 // 资金账户管理中心:根据当前用户+当前角色是否有此支付能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
// 1、资金账户:判断当前用户是否有账户管理权限,有则显示资金账户按钮与图标,点击跳转能力中心-支付能力-资金账户-账户管理 // 1、资金账户:判断当前用户是否有账户管理权限,有则显示资金账户按钮与图标,点击跳转能力中心-支付能力-资金账户-账户管理
...@@ -25,6 +25,7 @@ const KEY_TO_TITLE = { ...@@ -25,6 +25,7 @@ const KEY_TO_TITLE = {
const FundCenter: React.FC<Iprops> = () => { const FundCenter: React.FC<Iprops> = () => {
const { loading, responseData, isError, ref } = useViewRequest<GetReportMemberHomeGetAccountTallyResponse, any>(getReportMemberHomeGetAccountTally, {}) const { loading, responseData, isError, ref } = useViewRequest<GetReportMemberHomeGetAccountTallyResponse, any>(getReportMemberHomeGetAccountTally, {})
const intl = useIntl();
const { hasAbilityFunc, userAuth } = useGetAuth(); const { hasAbilityFunc, userAuth } = useGetAuth();
const hasAbility = hasAbilityFunc('payandSettle'); const hasAbility = hasAbilityFunc('payandSettle');
// 在tagList 做修改过滤 // 在tagList 做修改过滤
...@@ -32,22 +33,22 @@ const FundCenter: React.FC<Iprops> = () => { ...@@ -32,22 +33,22 @@ const FundCenter: React.FC<Iprops> = () => {
const list = [ const list = [
{ {
icon: settlement_platformCollection, icon: settlement_platformCollection,
title: '资金账户', title: intl.formatMessage({ id: 'home.fundCenter.title1' }),
url: '/memberCenter/payandSettle/capitalAccounts/accountLists' url: '/memberCenter/payandSettle/capitalAccounts/accountLists'
}, },
{ {
icon: settlement_integrate, icon: settlement_integrate,
title: '授信账户', title: intl.formatMessage({ id: 'home.fundCenter.title2' }),
url: '/memberCenter/payandSettle/creditApplication/quotaMenage' url: '/memberCenter/payandSettle/creditApplication/quotaMenage'
}, },
{ {
icon: settlement_accountReceive, icon: settlement_accountReceive,
title: '资金账户管理', title: intl.formatMessage({ id: 'home.fundCenter.title3' }),
url: '/memberCenter/payandSettle/amountAccountManage/memberAccountManage' url: '/memberCenter/payandSettle/amountAccountManage/memberAccountManage'
}, },
{ {
icon: settlement_accountPayable, icon: settlement_accountPayable,
title: '授信管理', title: intl.formatMessage({ id: 'home.fundCenter.title4' }),
url: '/memberCenter/payandSettle/creditManage/quotaMenage' url: '/memberCenter/payandSettle/creditManage/quotaMenage'
}, },
].filter((_item) => userAuth.urls?.includes(_item.url)) ].filter((_item) => userAuth.urls?.includes(_item.url))
...@@ -58,8 +59,8 @@ const FundCenter: React.FC<Iprops> = () => { ...@@ -58,8 +59,8 @@ const FundCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="资金账户管理" title={intl.formatMessage({ id: 'home.fundCenter.layoutTitle' })}
tips="提供资金账户管理、授信额度管理等功能。" tips={intl.formatMessage({ id: 'home.fundCenter.layoutTips' })}
loading={loading} loading={loading}
> >
<> <>
......
import React, { useCallback, useEffect, useMemo, useState } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { Skeleton, Badge } from 'antd'; import { Skeleton, Badge } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import styles from './center.less' import styles from './center.less'
import logistics from '@/assets/imgs/logistics.png'; import logistics from '@/assets/imgs/logistics.png';
import logistics_form from '@/assets/imgs/logistics_form.png'; import logistics_form from '@/assets/imgs/logistics_form.png';
...@@ -14,7 +14,7 @@ import { getReportMemberHomeGetLogisticsTally, GetReportMemberHomeGetLogisticsTa ...@@ -14,7 +14,7 @@ import { getReportMemberHomeGetLogisticsTally, GetReportMemberHomeGetLogisticsTa
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getTemplateWebMemberLogisticsWebFindCurrMemberLogistics } from '@/services/TemplateV2Api'; import { getTemplateWebMemberLogisticsWebFindCurrMemberLogistics } from '@/services/TemplateV2Api';
interface Iprops {}; interface Iprops { };
const url = '/memberCenter/logisticsAbility/logisticsResult/orderResultSearchList'; const url = '/memberCenter/logisticsAbility/logisticsResult/orderResultSearchList';
const CREATE_INFO_MANAGE = "/memberCenter/logisticsAbility/infoManage"; const CREATE_INFO_MANAGE = "/memberCenter/logisticsAbility/infoManage";
...@@ -28,6 +28,7 @@ const CREATE_INFO_MANAGE = "/memberCenter/logisticsAbility/infoManage"; ...@@ -28,6 +28,7 @@ const CREATE_INFO_MANAGE = "/memberCenter/logisticsAbility/infoManage";
// 5、运费模板管理:判断当前用户是否有运费模板管理权限,有则显示运费模板管理按钮与图标,点击跳转物流能力-物流管理-运费模板管理 // 5、运费模板管理:判断当前用户是否有运费模板管理权限,有则显示运费模板管理按钮与图标,点击跳转物流能力-物流管理-运费模板管理
const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => { const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => {
const { loading, responseData, ref, inViewPort } = useViewRequest<GetReportMemberHomeGetLogisticsTallyResponse, any>(getReportMemberHomeGetLogisticsTally, {}) const { loading, responseData, ref, inViewPort } = useViewRequest<GetReportMemberHomeGetLogisticsTallyResponse, any>(getReportMemberHomeGetLogisticsTally, {})
const intl = useIntl();
const { hasAbilityFunc, userAuth } = useGetAuth(); const { hasAbilityFunc, userAuth } = useGetAuth();
const hasAbility = hasAbilityFunc('logisticsAbility'); const hasAbility = hasAbilityFunc('logisticsAbility');
const [isShow, setIsShow] = useState(false); const [isShow, setIsShow] = useState(false);
...@@ -40,7 +41,7 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => { ...@@ -40,7 +41,7 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => {
} }
async function getManagerData() { async function getManagerData() {
setHasFetchData(true) setHasFetchData(true)
const { data, code } = await getTemplateWebMemberLogisticsWebFindCurrMemberLogistics({memberId: userAuth.memberId, roleId: userAuth.memberRoleId } as any) const { data, code } = await getTemplateWebMemberLogisticsWebFindCurrMemberLogistics({ memberId: userAuth.memberId, roleId: userAuth.memberRoleId } as any)
if (code === 1000) { if (code === 1000) {
setIsShow(data === null) setIsShow(data === null)
} }
...@@ -52,29 +53,29 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => { ...@@ -52,29 +53,29 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => {
const list = [ const list = [
{ {
icon: logistics, icon: logistics,
title: '物流派单', title: intl.formatMessage({ id: 'home.logisticsCenter.title1' }),
url: '/memberCenter/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill', url: '/memberCenter/logisticsAbility/logisticsBillSubmit/waitSbumitLogisticsBill',
count: responseData?.["toBeCommitCount"] count: responseData?.["toBeCommitCount"]
}, },
{ {
icon: logistics_form, icon: logistics_form,
title: '接单报价', title: intl.formatMessage({ id: 'home.logisticsCenter.title2' }),
url: '/memberCenter/logisticsAbility/logisticsBillManage/waitConfirmLogisticsBill', url: '/memberCenter/logisticsAbility/logisticsBillManage/waitConfirmLogisticsBill',
count: responseData?.["toBeConfirmCount"] count: responseData?.["toBeConfirmCount"]
}, },
{ {
icon: logistics_address, icon: logistics_address,
title: '收货地址管理', title: intl.formatMessage({ id: 'home.logisticsCenter.title3' }),
url: "/memberCenter/logisticsAbility/logisticsAdminister/receivingAddress" url: "/memberCenter/logisticsAbility/logisticsAdminister/receivingAddress"
}, },
{ {
icon: logistics_address, icon: logistics_address,
title: '发货地址管理', title: intl.formatMessage({ id: 'home.logisticsCenter.title4' }),
url: "/memberCenter/logisticsAbility/logisticsAdminister/shipmentsAddress", url: "/memberCenter/logisticsAbility/logisticsAdminister/shipmentsAddress",
}, },
{ {
icon: logistics_cost, icon: logistics_cost,
title: '运费模板', title: intl.formatMessage({ id: 'home.logisticsCenter.title5' }),
url: "/memberCenter/logisticsAbility/logisticsAdminister/freightTemplate" url: "/memberCenter/logisticsAbility/logisticsAdminister/freightTemplate"
} }
].filter((_item) => userAuth.urls?.includes(_item.url)) ].filter((_item) => userAuth.urls?.includes(_item.url))
...@@ -85,14 +86,14 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => { ...@@ -85,14 +86,14 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="物流中心" title={intl.formatMessage({ id: 'home.logisticsCenter.layoutTitle' })}
tips={"快速完成物流派单、接单、报价、物流信息对接"} tips={intl.formatMessage({ id: 'home.logisticsCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>进入物流中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.logisticsCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
...@@ -101,7 +102,7 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => { ...@@ -101,7 +102,7 @@ const LogisticsCenter: React.FC<Iprops> = (props: Iprops) => {
{ {
isShow && ( isShow && (
<Layout.AlertTip <Layout.AlertTip
content="您还没有创建物流公司门户,请先创建物流公司门户" content={intl.formatMessage({ id: 'home.logisticsCenter.alertTip' })}
url={CREATE_INFO_MANAGE} url={CREATE_INFO_MANAGE}
/> />
) )
......
import React, { Fragment, useMemo } from 'react'; import React, { Fragment, useMemo } from 'react';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Layout, { IDataListProps } from './layout'; import Layout, { IDataListProps } from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetMemberTally, GetReportMemberHomeGetMemberTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetMemberTally, GetReportMemberHomeGetMemberTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops { };
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
const url = 'memberCenter/memberAbility'; const url = 'memberCenter/memberAbility';
const KEY_TITLE = { const KEY_TITLE = {
importList: '会员入库', importList: getIntl().formatMessage({ id: 'home.memberCenter.importList' }),
changeList: '会员变更', changeList: getIntl().formatMessage({ id: 'home.memberCenter.changeList' }),
kpiList: '会员考评', kpiList: getIntl().formatMessage({ id: 'home.memberCenter.kpiList' }),
rectifyList: '会员整改', rectifyList: getIntl().formatMessage({ id: 'home.memberCenter.rectifyList' }),
rectifyNoticeList: '整改通知' rectifyNoticeList: getIntl().formatMessage({ id: 'home.memberCenter.rectifyNoticeList' })
} }
// 修改会员信息:判断当前用户是否有会员导入权限,有则显示修改会员信息按钮,点击跳转会员能力--会员管理--新增会员页 // 修改会员信息:判断当前用户是否有会员导入权限,有则显示修改会员信息按钮,点击跳转会员能力--会员管理--新增会员页
// 进入会员中心:判断当前用户是否有会员管理权限,有则显示进入会员中心按钮,点击跳转会员能力--会员管理 // 进入会员中心:判断当前用户是否有会员管理权限,有则显示进入会员中心按钮,点击跳转会员能力--会员管理
const MemberCenter: React.FC<Iprops> = () => { const MemberCenter: React.FC<Iprops> = () => {
const { loading, responseData, filterEmptyList, isError, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetMemberTallyResponse, any>(getReportMemberHomeGetMemberTally, {}) const { loading, responseData, filterEmptyList, isError, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetMemberTallyResponse, any>(getReportMemberHomeGetMemberTally, {})
const intl = useIntl();
const { hasAbilityFunc } = useGetAuth(); const { hasAbilityFunc } = useGetAuth();
const hasAbility = hasAbilityFunc('memberAbility'); const hasAbility = hasAbilityFunc('memberAbility');
...@@ -29,14 +30,14 @@ const MemberCenter: React.FC<Iprops> = () => { ...@@ -29,14 +30,14 @@ const MemberCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="会员中心" title={intl.formatMessage({ id: 'home.memberCenter.layoutTitle' })}
tips="" tips=""
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>会员中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.memberCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
......
import React, { Fragment, useMemo } from 'react'; import React, { Fragment, useMemo } from 'react';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Layout from './layout'; import Layout from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetOrderTally, GetReportMemberHomeGetOrderTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetOrderTally, GetReportMemberHomeGetOrderTallyResponse, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {}; interface Iprops { };
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
const purchaseOrderUrl = '/memberCenter/tranactionAbility/purchaseOrder/orderList'; const purchaseOrderUrl = '/memberCenter/tranactionAbility/purchaseOrder/orderList';
const saleOrderUrl = '/memberCenter/tranactionAbility/saleOrder/orderList' const saleOrderUrl = '/memberCenter/tranactionAbility/saleOrder/orderList'
const KEY_TITLE = { const KEY_TITLE = {
saleOrderList: '销售订单', saleOrderList: getIntl().formatMessage({ id: 'home.orderCenter.saleOrderList' }),
purchaseOrderList: '采购订单', purchaseOrderList: getIntl().formatMessage({ id: 'home.orderCenter.purchaseOrderList' }),
} }
// 订单中心:根据当前用户+当前角色是否有订单能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序 // 订单中心:根据当前用户+当前角色是否有订单能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
...@@ -21,6 +21,7 @@ const KEY_TITLE = { ...@@ -21,6 +21,7 @@ const KEY_TITLE = {
const OrderCenter: React.FC<Iprops> = () => { const OrderCenter: React.FC<Iprops> = () => {
const { loading, responseData, filterEmptyList, isError, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetOrderTallyResponse, any>(getReportMemberHomeGetOrderTally, {}) const { loading, responseData, filterEmptyList, isError, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetOrderTallyResponse, any>(getReportMemberHomeGetOrderTally, {})
const intl = useIntl();
const { hasAbilityFunc, isConsumer } = useGetAuth(); const { hasAbilityFunc, isConsumer } = useGetAuth();
const hasAbility = hasAbilityFunc('orderAbility'); const hasAbility = hasAbilityFunc('orderAbility');
const orderCenterUrl = isConsumer ? purchaseOrderUrl : saleOrderUrl; const orderCenterUrl = isConsumer ? purchaseOrderUrl : saleOrderUrl;
...@@ -29,14 +30,14 @@ const OrderCenter: React.FC<Iprops> = () => { ...@@ -29,14 +30,14 @@ const OrderCenter: React.FC<Iprops> = () => {
<Layout <Layout
viewRef={ref} viewRef={ref}
hasAuth={hasAbility} hasAuth={hasAbility}
title="订单中心" title={intl.formatMessage({ id: 'home.orderCenter.layoutTitle' })}
tips="提供订单管理、签订电子合同等功能" tips={intl.formatMessage({ id: 'home.orderCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={orderCenterUrl} url={orderCenterUrl}
> >
<div> <div>
<Link to={orderCenterUrl}>进入订单中心</Link> <Link to={orderCenterUrl}>{intl.formatMessage({ id: 'home.orderCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import styles from './center.less'; import styles from './center.less';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Layout from './layout'; import Layout from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getReportMemberHomeGetEnhanceTally, GetReportMemberHomeGetEnhanceTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetEnhanceTally, GetReportMemberHomeGetEnhanceTallyResponse } from '@/services/ReportV2Api';
import { getTemplateWebMemberProcessWebFindCurrMemberProcess } from '@/services/TemplateV2Api'; import { getTemplateWebMemberProcessWebFindCurrMemberProcess } from '@/services/TemplateV2Api';
interface Iprops {}; interface Iprops { };
const url = '/memberCenter/handling/assign/query' const url = '/memberCenter/handling/assign/query'
const CREATE_INFO_MANAGE = "/memberCenter/handling/infoManage"; const CREATE_INFO_MANAGE = "/memberCenter/handling/infoManage";
const KEY_TITLE = { const KEY_TITLE = {
supplierList: '指派生产通知单', supplierList: getIntl().formatMessage({ id: 'home.processCenter.supplierList' }),
processList: '生产通知单处理' processList: getIntl().formatMessage({ id: 'home.processCenter.processList' })
} }
// 加工中心:根据当前用户+当前角色是否有此加工能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序 // 加工中心:根据当前用户+当前角色是否有此加工能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
// 如果当前用户有创建加工企业门户权限,但还未创建加工企业门户,则显示:您还没有创建加工企业门户,请先创建加工企业门户,点击创建加工企业门户按钮,跳转加工能力-加工企业门户管理-创建加工企业门户页 // 如果当前用户有创建加工企业门户权限,但还未创建加工企业门户,则显示:您还没有创建加工企业门户,请先创建加工企业门户,点击创建加工企业门户按钮,跳转加工能力-加工企业门户管理-创建加工企业门户页
const ProcessCenter: React.FC<Iprops> = () => { const ProcessCenter: React.FC<Iprops> = () => {
const { loading, responseData, isError,filterEmptyList, ref, inViewPort } = useViewRequest<GetReportMemberHomeGetEnhanceTallyResponse, any>(getReportMemberHomeGetEnhanceTally, {}) const { loading, responseData, isError, filterEmptyList, ref, inViewPort } = useViewRequest<GetReportMemberHomeGetEnhanceTallyResponse, any>(getReportMemberHomeGetEnhanceTally, {})
const intl = useIntl();
const { hasAbilityFunc, userAuth } = useGetAuth(); const { hasAbilityFunc, userAuth } = useGetAuth();
const hasAbility = hasAbilityFunc('handling'); const hasAbility = hasAbilityFunc('handling');
const [isShow, setIsShow] = useState(false); const [isShow, setIsShow] = useState(false);
...@@ -46,14 +47,14 @@ const ProcessCenter: React.FC<Iprops> = () => { ...@@ -46,14 +47,14 @@ const ProcessCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="加工中心" title={intl.formatMessage({ id: 'home.processCenter.layoutTitle' })}
tips="提供外发生产、加工、装配全流程环节管控" tips={intl.formatMessage({ id: 'home.processCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>加工中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.processCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
...@@ -63,7 +64,7 @@ const ProcessCenter: React.FC<Iprops> = () => { ...@@ -63,7 +64,7 @@ const ProcessCenter: React.FC<Iprops> = () => {
{ {
isShow && ( isShow && (
<Layout.AlertTip <Layout.AlertTip
content="您还没有创建加工企业门户,请先创建加工企业门户。" content={intl.formatMessage({ id: 'home.processCenter.alertTip' })}
url={CREATE_INFO_MANAGE} url={CREATE_INFO_MANAGE}
/> />
) )
......
import React, { useCallback, useMemo } from 'react'; import React, { useCallback, useMemo } from 'react';
import { Space } from 'antd'; import { Space } from 'antd';
import styles from './center.less'; import styles from './center.less';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getReportMemberHomeGetCommodityTally, GetReportMemberHomeGetCommodityTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetCommodityTally, GetReportMemberHomeGetCommodityTallyResponse } from '@/services/ReportV2Api';
interface Iprops {}; interface Iprops { };
const ADD_BRAND = "/memberCenter/commodityAbility/trademark/add"; const ADD_BRAND = "/memberCenter/commodityAbility/trademark/add";
const ADD_PRODUCT = '/memberCenter/commodityAbility/commodity/products/add'; const ADD_PRODUCT = '/memberCenter/commodityAbility/commodity/products/add';
...@@ -21,20 +21,21 @@ const ADD_REPOSITORIES = '/memberCenter/commodityAbility/repositories/add'; ...@@ -21,20 +21,21 @@ const ADD_REPOSITORIES = '/memberCenter/commodityAbility/repositories/add';
const ProductCenter: React.FC<Iprops> = () => { const ProductCenter: React.FC<Iprops> = () => {
const { loading, responseData, isError, ref, withQueryParams } = useViewRequest<GetReportMemberHomeGetCommodityTallyResponse, any>(getReportMemberHomeGetCommodityTally, {}) const { loading, responseData, isError, ref, withQueryParams } = useViewRequest<GetReportMemberHomeGetCommodityTallyResponse, any>(getReportMemberHomeGetCommodityTally, {})
const intl = useIntl();
const { userAuth, hasAbilityFunc } = useGetAuth(); const { userAuth, hasAbilityFunc } = useGetAuth();
const hasAbility = hasAbilityFunc('commodityAbility'); const hasAbility = hasAbilityFunc('commodityAbility');
const extraList = useMemo(() => [ const extraList = useMemo(() => [
{ {
title: '创建品牌', title: intl.formatMessage({ id: 'home.productCenter.title1' }),
authUrl: ADD_BRAND, authUrl: ADD_BRAND,
}, },
{ {
title: '创建商品', title: intl.formatMessage({ id: 'home.productCenter.title2' }),
authUrl: ADD_PRODUCT authUrl: ADD_PRODUCT
}, },
{ {
title: '设置库存', title: intl.formatMessage({ id: 'home.productCenter.title3' }),
authUrl: ADD_REPOSITORIES authUrl: ADD_REPOSITORIES
}, },
], []) ], [])
...@@ -66,8 +67,8 @@ const ProductCenter: React.FC<Iprops> = () => { ...@@ -66,8 +67,8 @@ const ProductCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="商品中心" title={intl.formatMessage({ id: 'home.productCenter.layoutTitle' })}
tips="快速完成品牌、商品创建、发布、提供灵活的商品库存管理" tips={intl.formatMessage({ id: 'home.productCenter.layoutTips' })}
loading={loading} loading={loading}
isError={isError} isError={isError}
extra={ extra={
...@@ -90,7 +91,7 @@ const ProductCenter: React.FC<Iprops> = () => { ...@@ -90,7 +91,7 @@ const ProductCenter: React.FC<Iprops> = () => {
} }
> >
<div className={styles.wrapRow}> <div className={styles.wrapRow}>
<span className={styles.rowTitle}>商品</span> <span className={styles.rowTitle}>{intl.formatMessage({ id: 'home.productCenter.rowTitle' })}</span>
<div className={styles.rowValues}> <div className={styles.rowValues}>
{ {
formatDataWithLink?.map((item: GetReportMemberHomeGetCommodityTallyResponse[0], key) => { formatDataWithLink?.map((item: GetReportMemberHomeGetCommodityTallyResponse[0], key) => {
...@@ -99,8 +100,8 @@ const ProductCenter: React.FC<Iprops> = () => { ...@@ -99,8 +100,8 @@ const ProductCenter: React.FC<Iprops> = () => {
<div className={styles.colTitle}>{item.name}</div> <div className={styles.colTitle}>{item.name}</div>
{ {
item.link item.link
? <Link to={item.link} className={styles.colValue}>{item.count}</Link> ? <Link to={item.link} className={styles.colValue}>{item.count}</Link>
: <div className={styles.colValue}>{item.count}</div> : <div className={styles.colValue}>{item.count}</div>
} }
</div> </div>
) )
......
import React, { Fragment, useEffect, useMemo, useState } from 'react'; import React, { Fragment, useEffect, useMemo, useState } from 'react';
import styles from './center.less'; import styles from './center.less';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Layout from './layout'; import Layout from './layout';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetPurchaseTally, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetPurchaseTally, GetReportMemberHomeGetPurchaseTallyResponse } from '@/services/ReportV2Api';
import { BellOutlined } from '@ant-design/icons'; import { BellOutlined } from '@ant-design/icons';
import {Button} from 'antd'; import { Button } from 'antd';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getTemplateWebMemberPurchaseWebFindCurrMemberPurchase } from '@/services/TemplateV2Api'; import { getTemplateWebMemberPurchaseWebFindCurrMemberPurchase } from '@/services/TemplateV2Api';
interface Iprops {}; interface Iprops { };
const { StaticsDataList } = Layout const { StaticsDataList } = Layout
const consumerUrl = '/memberCenter/procurementAbility/purchaseInquiry/inquiry'; const consumerUrl = '/memberCenter/procurementAbility/purchaseInquiry/inquiry';
const providerUrl = '/memberCenter/procurementAbility/offter/offter' const providerUrl = '/memberCenter/procurementAbility/offter/offter'
const KEY_TITLE = { const KEY_TITLE = {
purchaseInquiryList: '采购询价 ', purchaseInquiryList: getIntl().formatMessage({ id: 'home.purchaseCenter.purchaseInquiryList' }),
quotedPriceList: '报价', quotedPriceList: getIntl().formatMessage({ id: 'home.purchaseCenter.quotedPriceList' }),
confirmQuotedPriceList: '确认报价', confirmQuotedPriceList: getIntl().formatMessage({ id: 'home.purchaseCenter.confirmQuotedPriceList' }),
biddingList: '采购竞价', biddingList: getIntl().formatMessage({ id: 'home.purchaseCenter.biddingList' }),
onlineBiddingList: '在线竞价', onlineBiddingList: getIntl().formatMessage({ id: 'home.purchaseCenter.onlineBiddingList' }),
inviteTenderList: '招标', inviteTenderList: getIntl().formatMessage({ id: 'home.purchaseCenter.inviteTenderList' }),
tenderList: '投标', tenderList: getIntl().formatMessage({ id: 'home.purchaseCenter.tenderList' }),
needPlanList: '需求计划', needPlanList: getIntl().formatMessage({ id: 'home.purchaseCenter.needPlanList' }),
purchasePlanList: '采购计划' purchasePlanList: getIntl().formatMessage({ id: 'home.purchaseCenter.purchasePlanList' })
} }
/** memberType 是否是企业会员或是企业个人会员 */ /** memberType 是否是企业会员或是企业个人会员 */
const isBusiness = [1, 2]; const isBusiness = [1, 2];
...@@ -34,6 +34,7 @@ const isBusiness = [1, 2]; ...@@ -34,6 +34,7 @@ const isBusiness = [1, 2];
const PurchaseCenter: React.FC<Iprops> = () => { const PurchaseCenter: React.FC<Iprops> = () => {
const { loading, filterEmptyList, isError, ref, inViewPort, refresh } = useViewRequest<GetReportMemberHomeGetPurchaseTallyResponse, any>(getReportMemberHomeGetPurchaseTally, {}) const { loading, filterEmptyList, isError, ref, inViewPort, refresh } = useViewRequest<GetReportMemberHomeGetPurchaseTallyResponse, any>(getReportMemberHomeGetPurchaseTally, {})
const intl = useIntl();
const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth(); const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth();
const hasAbility = hasAbilityFunc('procurementAbility'); const hasAbility = hasAbilityFunc('procurementAbility');
/** 是否是消费者即服务消费者 有权限 */ /** 是否是消费者即服务消费者 有权限 */
...@@ -57,20 +58,20 @@ const PurchaseCenter: React.FC<Iprops> = () => { ...@@ -57,20 +58,20 @@ const PurchaseCenter: React.FC<Iprops> = () => {
findCurrMemberPurchase() findCurrMemberPurchase()
}, [inViewPort, hasPurchaseAuth, hasFetchData]) }, [inViewPort, hasPurchaseAuth, hasFetchData])
const purchaseCenterUrl = useMemo(() => isConsumer ? consumerUrl : providerUrl ,[userAuth]) const purchaseCenterUrl = useMemo(() => isConsumer ? consumerUrl : providerUrl, [userAuth])
return ( return (
<Layout <Layout
viewRef={ref} viewRef={ref}
hasAuth={hasAbility} hasAuth={hasAbility}
title="采购中心" title={intl.formatMessage({ id: 'home.purchaseCenter.layoutTitle' })}
tips="提供在线采购询价、在线报价、在线招投标、在线竞价、制订采购计划、创建采购门户等功能" tips={intl.formatMessage({ id: 'home.purchaseCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={purchaseCenterUrl} url={purchaseCenterUrl}
> >
<div> <div>
<Link to={purchaseCenterUrl}>进入采购中心</Link> <Link to={purchaseCenterUrl}>{intl.formatMessage({ id: 'home.purchaseCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
...@@ -84,10 +85,10 @@ const PurchaseCenter: React.FC<Iprops> = () => { ...@@ -84,10 +85,10 @@ const PurchaseCenter: React.FC<Iprops> = () => {
<div className={styles.ding_tips}> <div className={styles.ding_tips}>
<div> <div>
<BellOutlined /> <BellOutlined />
<span style={{marginLeft: '12px'}}>您还没有创建采购门户,请先创建采购门户</span> <span style={{ marginLeft: '12px' }}>{intl.formatMessage({ id: 'home.purchaseCenter.dingTips' })}</span>
</div> </div>
<Link to={`/memberCenter/procurementAbility/purchasDoor/purchasInfo`}> <Link to={`/memberCenter/procurementAbility/purchasDoor/purchasInfo`}>
<Button size="small" type="primary">点击创建</Button> <Button size="small" type="primary">{intl.formatMessage({ id: 'home.purchaseCenter.dingTips.button' })}</Button>
</Link> </Link>
</div> </div>
) )
......
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { useIntl, getIntl } from 'umi';
import settlement_platformCollection from '@/assets/imgs/settlement_platformCollection.png'; import settlement_platformCollection from '@/assets/imgs/settlement_platformCollection.png';
import settlement_integrate from '@/assets/imgs/settlement_integrate.png'; import settlement_integrate from '@/assets/imgs/settlement_integrate.png';
import settlement_accountReceive from '@/assets/imgs/settlement_accountReceive.png'; import settlement_accountReceive from '@/assets/imgs/settlement_accountReceive.png';
...@@ -8,13 +9,14 @@ import useViewRequest from '../../hooks/useViewRequest'; ...@@ -8,13 +9,14 @@ import useViewRequest from '../../hooks/useViewRequest';
import { getReportMemberHomeGetSettleAccountTally, GetReportMemberHomeGetSettleAccountTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetSettleAccountTally, GetReportMemberHomeGetSettleAccountTallyResponse } from '@/services/ReportV2Api';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
interface Iprops {};
interface Iprops { };
const KEY_TITLE = { const KEY_TITLE = {
payableList: '应付账款结算', payableList: getIntl().formatMessage({ id: 'home.settlementCenter.payableList' }),
platformList: '平台代收账款结算', platformList: getIntl().formatMessage({ id: 'home.settlementCenter.platformList' }),
platformScoreList: '平台积分结算', platformScoreList: getIntl().formatMessage({ id: 'home.settlementCenter.platformScoreList' }),
receivableList: '应收账款结算' receivableList: getIntl().formatMessage({ id: 'home.settlementCenter.receivableList' })
} }
// 结算中心:根据当前用户+当前角色是否有此结算能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序 // 结算中心:根据当前用户+当前角色是否有此结算能力菜单权限确定是否显示,再根据自定义布局确定显示及显示顺序
...@@ -26,6 +28,7 @@ const KEY_TITLE = { ...@@ -26,6 +28,7 @@ const KEY_TITLE = {
const SettlementCenter: React.FC<Iprops> = () => { const SettlementCenter: React.FC<Iprops> = () => {
const { loading, responseData, filterEmptyList, isError, ref, withQueryParams } = useViewRequest<GetReportMemberHomeGetSettleAccountTallyResponse, any>(getReportMemberHomeGetSettleAccountTally, {}) const { loading, responseData, filterEmptyList, isError, ref, withQueryParams } = useViewRequest<GetReportMemberHomeGetSettleAccountTallyResponse, any>(getReportMemberHomeGetSettleAccountTally, {})
const intl = useIntl();
const { hasAbilityFunc, userAuth } = useGetAuth(); const { hasAbilityFunc, userAuth } = useGetAuth();
const hasAbility = hasAbilityFunc('balance'); const hasAbility = hasAbilityFunc('balance');
...@@ -33,27 +36,27 @@ const SettlementCenter: React.FC<Iprops> = () => { ...@@ -33,27 +36,27 @@ const SettlementCenter: React.FC<Iprops> = () => {
return [ return [
{ {
icon: settlement_platformCollection, icon: settlement_platformCollection,
title: '平台代收款结算', title: intl.formatMessage({ id: 'home.settlementCenter.title1' }),
url: '/memberCenter/balance/platformSettlement/accountReceivable' url: '/memberCenter/balance/platformSettlement/accountReceivable'
}, },
{ {
icon: settlement_integrate, icon: settlement_integrate,
title: '平台积分结算', title: intl.formatMessage({ id: 'home.settlementCenter.title2' }),
url: '/memberCenter/balance/platformSettlement/integral' url: '/memberCenter/balance/platformSettlement/integral'
}, },
{ {
icon: settlement_accountReceive, icon: settlement_accountReceive,
title: '应收账款结算', title: intl.formatMessage({ id: 'home.settlementCenter.title3' }),
url: '/memberCenter/balance/accountsReceivable/settlementList' url: '/memberCenter/balance/accountsReceivable/settlementList'
}, },
{ {
icon: settlement_accountPayable, icon: settlement_accountPayable,
title: '应付账款结算', title: intl.formatMessage({ id: 'home.settlementCenter.title4' }),
url: '/memberCenter/balance/accountsPayable/settlementList' url: '/memberCenter/balance/accountsPayable/settlementList'
}, },
{ {
icon: settlement_invoice, icon: settlement_invoice,
title: '开票管理', title: intl.formatMessage({ id: 'home.settlementCenter.title5' }),
url: '/memberCenter/balance/accountsReceivable/invoice' url: '/memberCenter/balance/accountsReceivable/invoice'
} }
].filter((_item) => userAuth.urls?.includes(_item.url)) ].filter((_item) => userAuth.urls?.includes(_item.url))
...@@ -83,8 +86,8 @@ const SettlementCenter: React.FC<Iprops> = () => { ...@@ -83,8 +86,8 @@ const SettlementCenter: React.FC<Iprops> = () => {
<Layout <Layout
hasAuth={hasAbility} hasAuth={hasAbility}
viewRef={ref} viewRef={ref}
title="结算中心" title={intl.formatMessage({ id: 'home.settlementCenter.layoutTitle' })}
tips="提供资资金结算、发票管理等功能" tips={intl.formatMessage({ id: 'home.settlementCenter.layoutTips' })}
loading={loading} loading={loading}
isError={isError} isError={isError}
> >
......
...@@ -3,13 +3,13 @@ import styles from './center.less' ...@@ -3,13 +3,13 @@ import styles from './center.less'
import create_shop from '@/assets/imgs/create_shop.png'; import create_shop from '@/assets/imgs/create_shop.png';
import { BellOutlined, RightOutlined } from '@ant-design/icons' import { BellOutlined, RightOutlined } from '@ant-design/icons'
import { Button } from 'antd'; import { Button } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import { getTemplateWebMemberShopWebFindCurrMemberShop, GetTemplateWebMemberShopWebFindCurrMemberShopResponse } from '@/services/TemplateV2Api'; import { getTemplateWebMemberShopWebFindCurrMemberShop, GetTemplateWebMemberShopWebFindCurrMemberShopResponse } from '@/services/TemplateV2Api';
import Layout from './layout'; import Layout from './layout';
interface Iprops {} interface Iprops { }
const SHOP_ABILITY = '/memberCenter/shopAbility'; const SHOP_ABILITY = '/memberCenter/shopAbility';
const SHOP_CENTER = '/memberCenter/shopAbility/template' const SHOP_CENTER = '/memberCenter/shopAbility/template'
...@@ -23,8 +23,9 @@ const CREATE_SHOP = '/memberCenter/shopAbility/infoManage'; ...@@ -23,8 +23,9 @@ const CREATE_SHOP = '/memberCenter/shopAbility/infoManage';
const ShopCenter: React.FC<Iprops> = () => { const ShopCenter: React.FC<Iprops> = () => {
const { loading, responseData, isError, ref } = useViewRequest<GetTemplateWebMemberShopWebFindCurrMemberShopResponse, any>(getTemplateWebMemberShopWebFindCurrMemberShop, {}) const { loading, responseData, isError, ref } = useViewRequest<GetTemplateWebMemberShopWebFindCurrMemberShopResponse, any>(getTemplateWebMemberShopWebFindCurrMemberShop, {})
const intl = useIntl();
const userAuth = getAuth(); const userAuth = getAuth();
const hasShopAbility = userAuth.urls?.some((_item) => _item.includes(SHOP_ABILITY)); const hasShopAbility = userAuth.urls?.some((_item) => _item.includes(SHOP_ABILITY));
const tagList = useMemo(() => { const tagList = useMemo(() => {
const hasShopCenterAuth = userAuth.urls?.includes(SHOP_CENTER) const hasShopCenterAuth = userAuth.urls?.includes(SHOP_CENTER)
...@@ -33,19 +34,19 @@ const ShopCenter: React.FC<Iprops> = () => { ...@@ -33,19 +34,19 @@ const ShopCenter: React.FC<Iprops> = () => {
{ {
icon: create_shop, icon: create_shop,
url: CREATE_SHOP, url: CREATE_SHOP,
title: "创建店铺", title: intl.formatMessage({ id: 'home.shopCenter.title1' }),
hasAuth: userAuth.urls?.includes(CREATE_SHOP) hasAuth: userAuth.urls?.includes(CREATE_SHOP)
}, },
{ {
icon: create_shop, icon: create_shop,
url: SHOP_CENTER, url: SHOP_CENTER,
title: "店铺模板", title: intl.formatMessage({ id: 'home.shopCenter.title2' }),
hasAuth: hasShopCenterAuth, hasAuth: hasShopCenterAuth,
}, },
{ {
icon: create_shop, icon: create_shop,
url: SHOP_CENTER, url: SHOP_CENTER,
title: "店铺装修", title: intl.formatMessage({ id: 'home.shopCenter.title3' }),
hasAuth: hasShopCenterAuth, hasAuth: hasShopCenterAuth,
} }
] ]
...@@ -57,7 +58,7 @@ const ShopCenter: React.FC<Iprops> = () => { ...@@ -57,7 +58,7 @@ const ShopCenter: React.FC<Iprops> = () => {
} }
return ( return (
<Layout.AlertTip <Layout.AlertTip
content="轻松完成店铺的创建、店铺风格选择、店铺个性化装修。" content={intl.formatMessage({ id: 'home.shopCenter.alertTip' })}
url={CREATE_SHOP} url={CREATE_SHOP}
/> />
) )
...@@ -67,8 +68,8 @@ const ShopCenter: React.FC<Iprops> = () => { ...@@ -67,8 +68,8 @@ const ShopCenter: React.FC<Iprops> = () => {
<Layout <Layout
viewRef={ref} viewRef={ref}
hasAuth={hasShopAbility} hasAuth={hasShopAbility}
title="店铺中心" title={intl.formatMessage({ id: 'home.shopCenter.layoutTitle' })}
tips="轻松完成店铺的创建、店铺风格选择、店铺个性化装修" tips={intl.formatMessage({ id: 'home.shopCenter.layoutTips' })}
extra={ extra={
<Authorize url={SHOP_CENTER}> <Authorize url={SHOP_CENTER}>
<div> <div>
......
import React, {useCallback} from 'react'; import React, { useCallback } from 'react';
import { Link } from 'umi' import { Link, useIntl, getIntl } from 'umi'
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import useViewRequest from '../../hooks/useViewRequest'; import useViewRequest from '../../hooks/useViewRequest';
import Layout from './layout'; import Layout from './layout';
import useGetAuth from '../../hooks/useGetAuth'; import useGetAuth from '../../hooks/useGetAuth';
import { getReportMemberHomeGetTradeTally, GetReportMemberHomeGetTradeTallyResponse } from '@/services/ReportV2Api'; import { getReportMemberHomeGetTradeTally, GetReportMemberHomeGetTradeTallyResponse } from '@/services/ReportV2Api';
interface Iprops {}; interface Iprops { };
const KEY_TITLE = { const KEY_TITLE = {
'commodityInquiryList': '商品询价', 'commodityInquiryList': getIntl().formatMessage({ id: 'home.tradeCenter.commodityInquiryList' }),
'inquiryQuotationList': '询价报价', 'inquiryQuotationList': getIntl().formatMessage({ id: 'home.tradeCenter.inquiryQuotationList' }),
'confirmInquiryQuotationList': '确认询价报价', 'confirmInquiryQuotationList': getIntl().formatMessage({ id: 'home.tradeCenter.confirmInquiryQuotationList' }),
'demandPublishList': '需求发布', 'demandPublishList': getIntl().formatMessage({ id: 'home.tradeCenter.demandPublishList' }),
'demandQuotationList': '需求报价', 'demandQuotationList': getIntl().formatMessage({ id: 'home.tradeCenter.demandQuotationList' }),
'confirmDemandQuotationList': '确认需求报价', 'confirmDemandQuotationList': getIntl().formatMessage({ id: 'home.tradeCenter.confirmDemandQuotationList' }),
'saleOrderList': '销售订单', 'saleOrderList': getIntl().formatMessage({ id: 'home.tradeCenter.saleOrderList' }),
'purchaseOrderList': '采购订单' 'purchaseOrderList': getIntl().formatMessage({ id: 'home.tradeCenter.purchaseOrderList' })
} }
const productInquiry = '/memberCenter/tranactionAbility/productInquiry/inquirySearch'; const productInquiry = '/memberCenter/tranactionAbility/productInquiry/inquirySearch';
...@@ -25,7 +25,8 @@ const inquiryOffer = '/memberCenter/tranactionAbility/inquiryOffer/inquirySearch ...@@ -25,7 +25,8 @@ const inquiryOffer = '/memberCenter/tranactionAbility/inquiryOffer/inquirySearch
// 进入交易中心:当前会员角色类型为服务消费则点击进入交易能力-商品询价--询价单查询页,如果当前会员角色类型为服务提供则点击进入交易能力-询价报价--报价单查询页 // 进入交易中心:当前会员角色类型为服务消费则点击进入交易能力-商品询价--询价单查询页,如果当前会员角色类型为服务提供则点击进入交易能力-询价报价--报价单查询页
const TradeCenter: React.FC<Iprops> = () => { const TradeCenter: React.FC<Iprops> = () => {
const { loading,filterEmptyList, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetTradeTallyResponse, any>(getReportMemberHomeGetTradeTally, {}) const { loading, filterEmptyList, ref, isEmpty } = useViewRequest<GetReportMemberHomeGetTradeTallyResponse, any>(getReportMemberHomeGetTradeTally, {})
const intl = useIntl();
const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth(); const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth();
const hasAbility = hasAbilityFunc('tranactionAbility'); const hasAbility = hasAbilityFunc('tranactionAbility');
const url = isConsumer ? productInquiry : inquiryOffer; const url = isConsumer ? productInquiry : inquiryOffer;
...@@ -34,14 +35,14 @@ const TradeCenter: React.FC<Iprops> = () => { ...@@ -34,14 +35,14 @@ const TradeCenter: React.FC<Iprops> = () => {
<Layout <Layout
viewRef={ref} viewRef={ref}
hasAuth={hasAbility} hasAuth={hasAbility}
title="交易中心" title={intl.formatMessage({ id: 'home.tradeCenter.layoutTitle' })}
tips="提供在线发布需求,在线询价、在线报价、订单交易、签订电子合同等功能" tips={intl.formatMessage({ id: 'home.tradeCenter.layoutTips' })}
extra={ extra={
<Authorize <Authorize
url={url} url={url}
> >
<div> <div>
<Link to={url}>进入交易中心</Link> <Link to={url}>{intl.formatMessage({ id: 'home.tradeCenter.authorize.url' })}</Link>
</div> </div>
</Authorize> </Authorize>
} }
......
...@@ -2,7 +2,7 @@ import React, { ReactNode, useEffect, useMemo, useState } from 'react'; ...@@ -2,7 +2,7 @@ import React, { ReactNode, useEffect, useMemo, useState } from 'react';
import { Button, Badge } from 'antd'; import { Button, Badge } from 'antd';
import styles from './Container.less'; import styles from './Container.less';
import { Skeleton } from 'antd'; import { Skeleton } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import layoutStyles from './center.less'; import layoutStyles from './center.less';
import Authorize from '../Authorize'; import Authorize from '../Authorize';
import { BellOutlined, RightOutlined } from '@ant-design/icons'; import { BellOutlined, RightOutlined } from '@ant-design/icons';
...@@ -47,12 +47,13 @@ interface Iprops { ...@@ -47,12 +47,13 @@ interface Iprops {
/** /**
* 出错是的render方法 * 出错是的render方法
*/ */
customizeErrorRender?: (() => React.ReactElement )| null customizeErrorRender?: (() => React.ReactElement) | null
onRefresh?: (params: any) => void, onRefresh?: (params: any) => void,
}; };
const Layout: LayoutType & React.FC<Iprops> = (props) => { const Layout: LayoutType & React.FC<Iprops> = (props) => {
const intl = useIntl();
const { title, tips, extra, children, loading, isError, customizeErrorRender, viewRef, onRefresh, isEmpty = false, hasAuth = true } = props; const { title, tips, extra, children, loading, isError, customizeErrorRender, viewRef, onRefresh, isEmpty = false, hasAuth = true } = props;
const handleRefresh = () => { const handleRefresh = () => {
...@@ -67,7 +68,7 @@ const Layout: LayoutType & React.FC<Iprops> = (props) => { ...@@ -67,7 +68,7 @@ const Layout: LayoutType & React.FC<Iprops> = (props) => {
return ( return (
customizeErrorRender?.() || ( customizeErrorRender?.() || (
<div> <div>
<Button onClick={handleRefresh}>拉取数据时发生了错误,点击刷新</Button> <Button onClick={handleRefresh}>{intl.formatMessage({ id: 'home.layout.isError' })}</Button>
</div> </div>
) )
) )
...@@ -119,31 +120,31 @@ const StaticsDataList = (props: IDataListProps) => { ...@@ -119,31 +120,31 @@ const StaticsDataList = (props: IDataListProps) => {
const { dataSource, title } = props; const { dataSource, title } = props;
return ( return (
<> <>
{ {
dataSource && Object.keys(dataSource).map((record) => { dataSource && Object.keys(dataSource).map((record) => {
return ( return (
<div className={layoutStyles.wrapRow} key={record}> <div className={layoutStyles.wrapRow} key={record}>
<span className={layoutStyles.rowTitle}>{title?.[record]}</span> <span className={layoutStyles.rowTitle}>{title?.[record]}</span>
<div className={layoutStyles.rowValues}> <div className={layoutStyles.rowValues}>
{ {
dataSource[record]?.map((_item, key) => { dataSource[record]?.map((_item, key) => {
return ( return (
<div className={layoutStyles.wrapCol} key={key}> <div className={layoutStyles.wrapCol} key={key}>
<div className={layoutStyles.colTitle}>{_item.name}</div> <div className={layoutStyles.colTitle}>{_item.name}</div>
{ {
_item.link _item.link
? <Link to={_item.link} className={layoutStyles.colValue}>{_item.count}</Link> ? <Link to={_item.link} className={layoutStyles.colValue}>{_item.count}</Link>
: <div className={layoutStyles.colValue}>{_item.count}</div> : <div className={layoutStyles.colValue}>{_item.count}</div>
} }
</div> </div>
) )
}) })
} }
</div>
</div> </div>
</div> )
) })
}) }
}
</> </>
) )
} }
...@@ -178,11 +179,11 @@ const Tags = (props: TagProps) => { ...@@ -178,11 +179,11 @@ const Tags = (props: TagProps) => {
<Badge count={_item.count || 0}> <Badge count={_item.count || 0}>
<Link to={_item.url} className={layoutStyles.tagsItem} > <Link to={_item.url} className={layoutStyles.tagsItem} >
<div className={layoutStyles.hoverLink}> <div className={layoutStyles.hoverLink}>
<img src={_item.icon} className={layoutStyles.icon}/> <img src={_item.icon} className={layoutStyles.icon} />
<div className={layoutStyles.text}>{_item.title}</div> <div className={layoutStyles.text}>{_item.title}</div>
<div className={layoutStyles.hoverIconConatiner}> <div className={layoutStyles.hoverIconConatiner}>
<div className={layoutStyles.hoverIcon}> <div className={layoutStyles.hoverIcon}>
<RightOutlined style={{ color: '#fff', fontSize: '8px'}} /> <RightOutlined style={{ color: '#fff', fontSize: '8px' }} />
</div> </div>
</div> </div>
</div> </div>
...@@ -203,17 +204,18 @@ interface AlterTipProps { ...@@ -203,17 +204,18 @@ interface AlterTipProps {
} }
const AlertTip = (props: AlterTipProps) => { const AlertTip = (props: AlterTipProps) => {
const intl = useIntl();
const { content, extra = null, url = "" } = props; const { content, extra = null, url = "" } = props;
return ( return (
<div className={layoutStyles.ding_tips}> <div className={layoutStyles.ding_tips}>
<div> <div>
<BellOutlined /> <BellOutlined />
<span style={{marginLeft: '12px'}}>{content}</span> <span style={{ marginLeft: '12px' }}>{content}</span>
</div> </div>
{ {
extra || ( extra || (
<Link to={url}> <Link to={url}>
<Button size="small" type="primary">点击创建</Button> <Button size="small" type="primary">{intl.formatMessage({ id: 'home.layout.extra' })}</Button>
</Link> </Link>
) )
} }
......
import React, { useState, useEffect, useCallback, useReducer } from 'react'; import React, { useState, useEffect, useCallback, useReducer } from 'react';
import { useIntl } from 'umi';
import { Modal } from 'antd'; import { Modal } from 'antd';
import styles from './index.less'; import styles from './index.less';
import { CloseOutlined } from '@ant-design/icons'; import { CloseOutlined } from '@ant-design/icons';
...@@ -23,8 +24,9 @@ interface Iprops { ...@@ -23,8 +24,9 @@ interface Iprops {
} }
const CustomWorkBench: React.FC<Iprops> = (props) => { const CustomWorkBench: React.FC<Iprops> = (props) => {
const intl = useIntl();
const { layouts, handleChangeOrder } = props; const { layouts, handleChangeOrder } = props;
const [ cards, setCards ] = useState([]); const [cards, setCards] = useState([]);
const { state: visible, toggle: setVisible } = useToggle(false); const { state: visible, toggle: setVisible } = useToggle(false);
const handleVisible = () => { const handleVisible = () => {
setVisible(true) setVisible(true)
...@@ -35,7 +37,7 @@ const CustomWorkBench: React.FC<Iprops> = (props) => { ...@@ -35,7 +37,7 @@ const CustomWorkBench: React.FC<Iprops> = (props) => {
} }
useEffect(() => { useEffect(() => {
if(visible) { if (visible) {
return; return;
} }
setCards(layouts); setCards(layouts);
...@@ -79,21 +81,21 @@ const CustomWorkBench: React.FC<Iprops> = (props) => { ...@@ -79,21 +81,21 @@ const CustomWorkBench: React.FC<Iprops> = (props) => {
<span className={styles.icon}> <span className={styles.icon}>
<img src={home_workBench} /> <img src={home_workBench} />
</span> </span>
自定义工作台 {intl.formatMessage({ id: 'home.customWorkBench.customWorkBench' })}
</div> </div>
<Modal <Modal
width={800} width={800}
visible={visible} visible={visible}
onCancel={handleCancel} onCancel={handleCancel}
closable={false} closable={false}
bodyStyle={{padding: 0}} bodyStyle={{ padding: 0 }}
onOk={handleOk} onOk={handleOk}
> >
<div className={styles.modalContainer}> <div className={styles.modalContainer}>
<div className={styles.header}> <div className={styles.header}>
<div className={styles.left}> <div className={styles.left}>
<div className={styles.title}>产品模块自定义</div> <div className={styles.title}>{intl.formatMessage({ id: 'home.customWorkBench.title' })}</div>
<div className={styles.tips}>在此你可根据业务形态自定义展示后期可在“自定义工作台”中随时调整</div> <div className={styles.tips}>{intl.formatMessage({ id: 'home.customWorkBench.tips' })}</div>
</div> </div>
<div className={styles.close} onClick={handleCancel}> <div className={styles.close} onClick={handleCancel}>
<CloseOutlined /> <CloseOutlined />
...@@ -106,7 +108,7 @@ const CustomWorkBench: React.FC<Iprops> = (props) => { ...@@ -106,7 +108,7 @@ const CustomWorkBench: React.FC<Iprops> = (props) => {
</div> </div>
<div className={styles.footer}> <div className={styles.footer}>
<div className={styles.sortTips}> <div className={styles.sortTips}>
(可拖动排序) ({intl.formatMessage({ id: 'home.customWorkBench.sortTips' })})
</div> </div>
</div> </div>
</div> </div>
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { useIntl } from 'umi';
import styles from './index.less'; import styles from './index.less';
import { LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons'; import { LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
import { Button } from 'antd'; import { Button } from 'antd';
import moment from 'moment'; import moment from 'moment';
import { Modal } from 'antd'; import { Modal } from 'antd';
import { getManageContentNoticeFindNewestNotice } from '@/services/ManageV2Api'; import { getManageContentNoticeFindNewestNotice } from '@/services/ManageV2Api';
interface Iprops {} interface Iprops { }
const LatestAnnouces: React.FC = () => { const LatestAnnouces: React.FC = () => {
const intl = useIntl();
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [totalCount, setTotalCount] = useState<number>(0) const [totalCount, setTotalCount] = useState<number>(0)
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
...@@ -21,13 +23,13 @@ const LatestAnnouces: React.FC = () => { ...@@ -21,13 +23,13 @@ const LatestAnnouces: React.FC = () => {
const getList = (params) => { const getList = (params) => {
setLoading(true); setLoading(true);
getManageContentNoticeFindNewestNotice(params) getManageContentNoticeFindNewestNotice(params)
.then(({data, code}) => { .then(({ data, code }) => {
setLoading(false); setLoading(false);
if(code === 1000) { if (code === 1000) {
setTotalCount(data.totalCount) setTotalCount(data.totalCount)
setData(data.data); setData(data.data);
} }
}) })
} }
useEffect(() => { useEffect(() => {
...@@ -60,16 +62,16 @@ const LatestAnnouces: React.FC = () => { ...@@ -60,16 +62,16 @@ const LatestAnnouces: React.FC = () => {
return ( return (
<div className={styles.announces}> <div className={styles.announces}>
<div className={styles.header}> <div className={styles.header}>
<div className={styles.title}>最新公告</div> <div className={styles.title}>{intl.formatMessage({ id: 'home.latestAnnouces.title' })}</div>
{ {
length >= 6 length >= 6
? ( ? (
<div className={styles.nextOrPreview}> <div className={styles.nextOrPreview}>
<Button onClick={handlePrev} icon={<LeftOutlined/>} className={styles.prev} disabled={pagination.current <= 1}></Button> <Button onClick={handlePrev} icon={<LeftOutlined />} className={styles.prev} disabled={pagination.current <= 1}></Button>
<Button onClick={handleNext} icon={<RightOutlined/>} disabled={pagination.current * 5 >= totalCount}></Button> <Button onClick={handleNext} icon={<RightOutlined />} disabled={pagination.current * 5 >= totalCount}></Button>
</div> </div>
) )
: null : null
} }
</div> </div>
...@@ -82,7 +84,7 @@ const LatestAnnouces: React.FC = () => { ...@@ -82,7 +84,7 @@ const LatestAnnouces: React.FC = () => {
return ( return (
<div className={styles.item} key={item.id}> <div className={styles.item} key={item.id}>
<div className={styles.date}> <div className={styles.date}>
<div className={styles.month}>{(month + 1)}</div> <div className={styles.month}>{(month + 1)}{intl.formatMessage({ id: 'home.latestAnnouces.month' })}</div>
<div className={styles.day}>{day}</div> <div className={styles.day}>{day}</div>
</div> </div>
<div className={styles.content} onClick={() => handleViewDetail(item)}> <div className={styles.content} onClick={() => handleViewDetail(item)}>
...@@ -99,18 +101,18 @@ const LatestAnnouces: React.FC = () => { ...@@ -99,18 +101,18 @@ const LatestAnnouces: React.FC = () => {
footer={false} footer={false}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
closable={false} closable={false}
bodyStyle={{padding: 0}} bodyStyle={{ padding: 0 }}
> >
<div className={styles.notice}> <div className={styles.notice}>
<div className={styles.noticeHeader}> <div className={styles.noticeHeader}>
<div className={styles.title}>{currnetNotice.title}</div> <div className={styles.title}>{currnetNotice.title}</div>
<div className={styles.icon}><CloseOutlined onClick={() => setVisible(false)}/></div> <div className={styles.icon}><CloseOutlined onClick={() => setVisible(false)} /></div>
</div> </div>
<div className={styles.noticeBody}> <div className={styles.noticeBody}>
<div dangerouslySetInnerHTML={{__html: currnetNotice.content}} ></div> <div dangerouslySetInnerHTML={{ __html: currnetNotice.content }} ></div>
</div> </div>
<div className={styles.noticeFooter}> <div className={styles.noticeFooter}>
<Button onClick={() => setVisible(false)} type={"primary"}>我知道了</Button> <Button onClick={() => setVisible(false)} type={"primary"}>{intl.formatMessage({ id: 'home.latestAnnouces.noticeFooter' })}</Button>
</div> </div>
</div> </div>
......
...@@ -2,15 +2,16 @@ import React from 'react'; ...@@ -2,15 +2,16 @@ import React from 'react';
import styles from './index.less'; import styles from './index.less';
import menu_zh from '@/locales/zh-CN/menu'; import menu_zh from '@/locales/zh-CN/menu';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
interface Iprops {} interface Iprops { }
const RecentVisit: React.FC<Iprops> = () => { const RecentVisit: React.FC<Iprops> = () => {
const intl = useIntl();
const recentVisit = localStorage.getItem('recentVisit') && JSON.parse(localStorage.getItem('recentVisit')) || {}; const recentVisit = localStorage.getItem('recentVisit') && JSON.parse(localStorage.getItem('recentVisit')) || {};
return ( return (
<div className={styles.recentVisit}> <div className={styles.recentVisit}>
<div className={styles.header}> <div className={styles.header}>
<div className={styles.title}>最近访问</div> <div className={styles.title}>{intl.formatMessage({ id: 'home.recentVisit.title' })}</div>
</div> </div>
<div className={styles.body}> <div className={styles.body}>
{ {
...@@ -18,10 +19,10 @@ const RecentVisit: React.FC<Iprops> = () => { ...@@ -18,10 +19,10 @@ const RecentVisit: React.FC<Iprops> = () => {
const menuName = item.split("."); const menuName = item.split(".");
const length = menuName.length const length = menuName.length
return ( return (
<Tooltip key={item} placement="top" title={ menuName[length - 1] }> <Tooltip key={item} placement="top" title={menuName[length - 1]}>
<div className={styles.item}> <div className={styles.item}>
<Link key={item} to={recentVisit[item]} > <Link key={item} to={recentVisit[item]} >
{ menuName[length - 1] } {menuName[length - 1]}
</Link> </Link>
</div> </div>
</Tooltip> </Tooltip>
......
import { render } from '@/app'; import { render } from '@/app';
import React from 'react'; import React from 'react';
import { Button, Space, Row, Col, Dropdown, Steps} from 'antd'; import { useIntl } from 'umi';
import { Button, Space, Row, Col, Dropdown, Steps } from 'antd';
import { CompassOutlined, CompassFilled, UpOutlined } from '@ant-design/icons'; import { CompassOutlined, CompassFilled, UpOutlined } from '@ant-design/icons';
import styles from './index.less'; import styles from './index.less';
import cx from 'classnames'; import cx from 'classnames';
...@@ -8,34 +9,35 @@ import cx from 'classnames'; ...@@ -8,34 +9,35 @@ import cx from 'classnames';
const { Step } = Steps; const { Step } = Steps;
const UseGuaid: React.FC<{}> = () => { const UseGuaid: React.FC<{}> = () => {
const intl = useIntl();
const menu = ( const menu = (
<div className={styles.giudeMenuBox}> <div className={styles.giudeMenuBox}>
<Steps progressDot current={1000} direction="vertical"> <Steps progressDot current={1000} direction="vertical">
<Step title="定义产品功能" description={<><p>开发第一步,标准功能、自定义功能及云功能编辑</p><a href="">如何定义</a></>} /> <Step title={intl.formatMessage({ id: 'home.useGuaid.title' })} description={<><p>{intl.formatMessage({ id: 'home.useGuaid.description' })}</p><a href="">{intl.formatMessage({ id: 'home.useGuaid.a' })}</a></>} />
<Step title="定义产品功能" description={<><p>开发第一步,标准功能、自定义功能及云功能编辑</p><a href="">如何定义</a></>} /> <Step title={intl.formatMessage({ id: 'home.useGuaid.title' })} description={<><p>{intl.formatMessage({ id: 'home.useGuaid.description' })}</p><a href="">{intl.formatMessage({ id: 'home.useGuaid.a' })}</a></>} />
<Step title="定义产品功能" description={<><p>开发第一步,标准功能、自定义功能及云功能编辑</p><a href="">如何定义</a></>} /> <Step title={intl.formatMessage({ id: 'home.useGuaid.title' })} description={<><p>{intl.formatMessage({ id: 'home.useGuaid.description' })}</p><a href="">{intl.formatMessage({ id: 'home.useGuaid.a' })}</a></>} />
<Step title="定义产品功能" description={<><p>开发第一步,标准功能、自定义功能及云功能编辑</p><a href="">如何定义</a></>} /> <Step title={intl.formatMessage({ id: 'home.useGuaid.title' })} description={<><p>{intl.formatMessage({ id: 'home.useGuaid.description' })}</p><a href="">{intl.formatMessage({ id: 'home.useGuaid.a' })}</a></>} />
<Step title="定义产品功能" description={<><p>开发第一步,标准功能、自定义功能及云功能编辑</p><a href="">如何定义</a></>} /> <Step title={intl.formatMessage({ id: 'home.useGuaid.title' })} description={<><p>{intl.formatMessage({ id: 'home.useGuaid.description' })}</p><a href="">{intl.formatMessage({ id: 'home.useGuaid.a' })}</a></>} />
</Steps> </Steps>
</div> </div>
); );
return ( return (
<div> <div>
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{ width: '100%' }}>
<Row> <Row>
<Col span={24}> <Col span={24}>
<div className={styles.homeGuide}> <div className={styles.homeGuide}>
<div className={cx(styles.gridStyle, styles.gridStyleFirst)}> <div className={cx(styles.gridStyle, styles.gridStyleFirst)}>
<p className={styles.firstp}> <p className={styles.firstp}>
<CompassFilled className={styles.guideIconFirst} /> <CompassFilled className={styles.guideIconFirst} />
<span>&nbsp;使用向导</span> <span>&nbsp;{intl.formatMessage({ id: 'home.useGuaid.firstp' })}</span>
</p> </p>
</div> </div>
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<div className={styles.gridStyle}> <div className={styles.gridStyle}>
<div> <div>
<p className={styles.guideTitle}>1.新建商品</p> <p className={styles.guideTitle}>{intl.formatMessage({ id: 'home.useGuaid.guideTitle' })}</p>
<p className={styles.guideDesc}>三分钟智能化,完成商品创建</p> <p className={styles.guideDesc}>{intl.formatMessage({ id: 'home.useGuaid.guideDesc' })}</p>
</div> </div>
<UpOutlined className={styles.guideIcon} /> <UpOutlined className={styles.guideIcon} />
</div> </div>
...@@ -43,8 +45,8 @@ const UseGuaid: React.FC<{}> = () => { ...@@ -43,8 +45,8 @@ const UseGuaid: React.FC<{}> = () => {
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<div className={styles.gridStyle}> <div className={styles.gridStyle}>
<div> <div>
<p className={styles.guideTitle}>1.新建商品</p> <p className={styles.guideTitle}>{intl.formatMessage({ id: 'home.useGuaid.guideTitle' })}</p>
<p className={styles.guideDesc}>三分钟智能化,完成商品创建</p> <p className={styles.guideDesc}>{intl.formatMessage({ id: 'home.useGuaid.guideDesc' })}</p>
</div> </div>
<UpOutlined className={styles.guideIcon} /> <UpOutlined className={styles.guideIcon} />
</div> </div>
...@@ -52,22 +54,22 @@ const UseGuaid: React.FC<{}> = () => { ...@@ -52,22 +54,22 @@ const UseGuaid: React.FC<{}> = () => {
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<div className={cx(styles.gridStyle, styles.gridStyleLast)}> <div className={cx(styles.gridStyle, styles.gridStyleLast)}>
<div> <div>
<p className={styles.guideTitle}>1.新建商品</p> <p className={styles.guideTitle}>{intl.formatMessage({ id: 'home.useGuaid.guideTitle' })}</p>
<p className={styles.guideDesc}>三分钟智能化,完成商品创建</p> <p className={styles.guideDesc}>{intl.formatMessage({ id: 'home.useGuaid.guideDesc' })}</p>
</div> </div>
<UpOutlined className={styles.guideIcon} /> <UpOutlined className={styles.guideIcon} />
</div> </div>
</Dropdown> </Dropdown>
<div className={styles.guideClose}> <div className={styles.guideClose}>
<p>关闭</p> <p>{intl.formatMessage({ id: 'home.useGuaid.guideClose' })}</p>
</div> </div>
</div> </div>
</Col> </Col>
</Row> </Row>
</Space> </Space>
</div> </div>
) )
} }
export default UseGuaid; export default UseGuaid;
\ No newline at end of file
...@@ -2,11 +2,11 @@ import React, { useCallback, useMemo, useReducer } from 'react'; ...@@ -2,11 +2,11 @@ import React, { useCallback, useMemo, useReducer } from 'react';
import styles from './index.less'; import styles from './index.less';
import moment from 'moment'; import moment from 'moment';
import { Badge, message, Spin, Tooltip } from 'antd'; import { Badge, message, Spin, Tooltip } from 'antd';
import { Link } from 'umi'; import { Link, useIntl } from 'umi';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import home_user from '@/assets/imgs/home_user.png'; import home_user from '@/assets/imgs/home_user.png';
import {observer, inject} from 'mobx-react'; import { observer, inject } from 'mobx-react';
import Icon, { QuestionCircleOutlined } from '@ant-design/icons'; import Icon, { QuestionCircleOutlined } from '@ant-design/icons';
import { ReactComponent as DefaultAvatar } from '@/assets/imgs/default_avatar.svg'; import { ReactComponent as DefaultAvatar } from '@/assets/imgs/default_avatar.svg';
import UploadFiles from '@/components/UploadFiles/UploadFiles' import UploadFiles from '@/components/UploadFiles/UploadFiles'
...@@ -14,9 +14,9 @@ import { UploadChangeParam } from 'antd/lib/upload/interface' ...@@ -14,9 +14,9 @@ import { UploadChangeParam } from 'antd/lib/upload/interface'
import { GlobalConfig } from '@/global/config'; import { GlobalConfig } from '@/global/config';
import { postMemberMainpageLogoAdd } from '@/services/MemberV2Api'; import { postMemberMainpageLogoAdd } from '@/services/MemberV2Api';
interface Iprops {} interface Iprops { }
const WEEKDAYS = ["天", "一","二", "三", "四", "五","六"]; const WEEKDAYS = ["天", "一", "二", "三", "四", "五", "六"];
// const LEVEL_IMAGE = [level1, level1, level2, level3, level4]; // const LEVEL_IMAGE = [level1, level1, level2, level3, level4];
const EDIT_USER_URL = '/memberCenter/editMySelf'; const EDIT_USER_URL = '/memberCenter/editMySelf';
const USER_CENTER_URL = '/memberCenter/memberAbility/profile/query'; const USER_CENTER_URL = '/memberCenter/memberAbility/profile/query';
...@@ -25,40 +25,41 @@ const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["defau ...@@ -25,40 +25,41 @@ const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["defau
function reducer(state, action) { function reducer(state, action) {
switch (action.type) { switch (action.type) {
case 'uploading': case 'uploading':
return {...state, loading: true}; return { ...state, loading: true };
case 'done': case 'done':
return {...state, loading: false, logo: action.payload.url} return { ...state, loading: false, logo: action.payload.url }
default: default:
throw new Error(); throw new Error();
} }
} }
const UserCenter: React.FC<Iprops> = (props) => { const UserCenter: React.FC<Iprops> = (props) => {
const intl = useIntl();
const today = moment(); const today = moment();
const userAuth = getAuth(); const userAuth = getAuth();
const currentRole = userAuth?.roles?.filter((item) => item.memberRoleId === userAuth.memberRoleId) const currentRole = userAuth?.roles?.filter((item) => item.memberRoleId === userAuth.memberRoleId)
const [state, dispatch] = useReducer(reducer, { loading: false, logo: userAuth?.logo}) const [state, dispatch] = useReducer(reducer, { loading: false, logo: userAuth?.logo })
if(!userAuth) { if (!userAuth) {
return null return null
} }
const beforeUpload = useCallback((file) => { const beforeUpload = useCallback((file) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg'; const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';
if (!isJpgOrPng) { if (!isJpgOrPng) {
message.error('仅支持上传JPEG/JPG/PNG文件!'); message.error(intl.formatMessage({ id: 'home.userCenter.error' }));
} }
return isJpgOrPng; return isJpgOrPng;
}, []) }, [])
const onFileChange = async (info: UploadChangeParam) => { const onFileChange = async (info: UploadChangeParam) => {
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
dispatch({type: 'uploading'}) dispatch({ type: 'uploading' })
return; return;
} }
if(info.file.status === 'done') { if (info.file.status === 'done') {
const logo = info.file.response.data const logo = info.file.response.data
const { code } = await postMemberMainpageLogoAdd({logo: logo }); const { code } = await postMemberMainpageLogoAdd({ logo: logo });
if (code === 1000) { if (code === 1000) {
dispatch({type: 'done', payload: {url: logo}}); dispatch({ type: 'done', payload: { url: logo } });
(props as any).UserStore.setUserAvatar(logo) (props as any).UserStore.setUserAvatar(logo)
} }
} }
...@@ -71,10 +72,10 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -71,10 +72,10 @@ const UserCenter: React.FC<Iprops> = (props) => {
<div className={styles.header}> <div className={styles.header}>
<div className={styles.infos}> <div className={styles.infos}>
<div className={styles.hi}> <div className={styles.hi}>
{`Hi, ${userAuth?.company}! 欢迎来到${GlobalConfig.global.siteInfo.name}`} {`Hi, ${userAuth?.company}! ${intl.formatMessage({ id: 'home.userCenter.wellcome' })}${GlobalConfig.global.siteInfo.name}`}
</div> </div>
<div className={styles.date}> <div className={styles.date}>
{today.format('YYYY年MM月DD日')} 星期{WEEKDAYS[today.day()]} {today.format(`YYYY${intl.formatMessage({ id: 'home.userCenter.year' })}MM${intl.formatMessage({ id: 'home.userCenter.month' })}DD${intl.formatMessage({ id: 'home.userCenter.day' })}`)} {intl.formatMessage({ id: `home.userCenter.day${today.day()}` })}
</div> </div>
</div> </div>
<div className={styles.images}> <div className={styles.images}>
...@@ -89,10 +90,10 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -89,10 +90,10 @@ const UserCenter: React.FC<Iprops> = (props) => {
<UploadFiles customizeItemRender={null} beforeUpload={beforeUpload} onChange={onFileChange} showFiles={false}> <UploadFiles customizeItemRender={null} beforeUpload={beforeUpload} onChange={onFileChange} showFiles={false}>
{ {
state.logo state.logo
? <img src={state.logo || ''} className={styles.logo}/> ? <img src={state.logo || ''} className={styles.logo} />
: <Icon component={() => <DefaultAvatar className={styles.logo} />} /> : <Icon component={() => <DefaultAvatar className={styles.logo} />} />
} }
<span className={styles.upload}>修改</span> <span className={styles.upload}>{intl.formatMessage({ id: 'home.userCenter.upload' })}</span>
</UploadFiles> </UploadFiles>
</div> </div>
</div> </div>
...@@ -106,20 +107,20 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -106,20 +107,20 @@ const UserCenter: React.FC<Iprops> = (props) => {
{ {
currentRole && currentRole.map((item, key) => { currentRole && currentRole.map((item, key) => {
return ( return (
<div style={{marginRight: '16px'}} key={key}> <div style={{ marginRight: '16px' }} key={key}>
<StatusTag type={"success"} title={item.memberRoleName} /> <StatusTag type={"success"} title={item.memberRoleName} />
</div> </div>
) )
}) })
} }
</div> </div>
<div style={{marginTop: '13px'}}> <div style={{ marginTop: '13px' }}>
<Tooltip placement="top" title={userAuth.validateMsg || ''}> <Tooltip placement="top" title={userAuth.validateMsg || ''}>
<Badge status={STATUS_COLOR[userAuth.validateStatus]} text={userAuth.validateStatusDesc} /> <Badge status={STATUS_COLOR[userAuth.validateStatus]} text={userAuth.validateStatusDesc} />
{ {
isVerifyFail && ( isVerifyFail && (
<span style={{marginLeft: '4px'}}> <span style={{ marginLeft: '4px' }}>
<QuestionCircleOutlined style={{color: '#ccc', fontSize: '12px'}} /> <QuestionCircleOutlined style={{ color: '#ccc', fontSize: '12px' }} />
</span> </span>
) )
} }
...@@ -129,20 +130,20 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -129,20 +130,20 @@ const UserCenter: React.FC<Iprops> = (props) => {
</div> </div>
{ {
isVerifyFail && isVerifyFail &&
<Link to={EDIT_USER_URL} className={styles.link}>修改会员信息</Link> <Link to={EDIT_USER_URL} className={styles.link}>{intl.formatMessage({ id: 'home.userCenter.link' })}</Link>
} }
</div> </div>
<div className={styles.otherValues}> <div className={styles.otherValues}>
<div className={styles.divider}> <div className={styles.divider}>
<div className={styles.level}> <div className={styles.level}>
会员等级<StatusTag type={'primary'} title={userAuth.levelTag} /> {intl.formatMessage({ id: 'home.userCenter.level' })}<StatusTag type={'primary'} title={userAuth.levelTag} />
</div> </div>
<div className={styles.score}> <div className={styles.score}>
平台积分<strong>{userAuth.score}</strong> {intl.formatMessage({ id: 'home.userCenter.score' })}<strong>{userAuth.score}</strong>
</div> </div>
{ {
userAuth.urls.includes(USER_CENTER_URL) && ( userAuth.urls.includes(USER_CENTER_URL) && (
<Link to={USER_CENTER_URL} className={styles.link}>进入会员中心</Link> <Link to={USER_CENTER_URL} className={styles.link}>{intl.formatMessage({ id: 'home.userCenter.userAuth.link' })}</Link>
) )
} }
</div> </div>
......
import React, { useState, useEffect, useCallback } from 'react' import React, { useState, useEffect, useCallback } from 'react'
import { useIntl } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card } from 'antd'; import { Card } from 'antd';
import UseGuaid from './components/UseGuaid'; import UseGuaid from './components/UseGuaid';
...@@ -8,12 +9,11 @@ import LatestAnnounce from './components/LatestAnnounces'; ...@@ -8,12 +9,11 @@ import LatestAnnounce from './components/LatestAnnounces';
import RecentVisit from './components/RecentVisit'; import RecentVisit from './components/RecentVisit';
import AnyQuestion from './components/AnyQuestion'; import AnyQuestion from './components/AnyQuestion';
import AdvertisementContainer from './components/AdvertisementSpace'; 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 } from './components/Centers';
import styles from './index.less' import styles from './index.less'
import { CompassFilled } from '@ant-design/icons'; import { CompassFilled } from '@ant-design/icons';
import useGetAuth from './hooks/useGetAuth'; import useGetAuth from './hooks/useGetAuth';
import { getReportMemberHomeGetDataLayout, postReportMemberHomeUpdateDataLayout } from '@/services/ReportV2Api'; import { getReportMemberHomeGetDataLayout, postReportMemberHomeUpdateDataLayout } from '@/services/ReportV2Api';
const ComponentSelect = { const ComponentSelect = {
"会员中心": MemberCenter, "会员中心": MemberCenter,
"交易中心": TradeCenter, "交易中心": TradeCenter,
...@@ -32,6 +32,7 @@ const ComponentSelect = { ...@@ -32,6 +32,7 @@ const ComponentSelect = {
"风控中心": '' "风控中心": ''
} }
const Home: React.FC<{}> = () => { const Home: React.FC<{}> = () => {
const intl = useIntl();
const [visible, setVisible] = useState<boolean>(false); const [visible, setVisible] = useState<boolean>(false);
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
const [layout, setLayout] = useState<LayoutType[]>([]); const [layout, setLayout] = useState<LayoutType[]>([]);
...@@ -54,7 +55,7 @@ const Home: React.FC<{}> = () => { ...@@ -54,7 +55,7 @@ const Home: React.FC<{}> = () => {
getDataLayout(); getDataLayout();
}, []) }, [])
const handleChangeOrder = useCallback( async (list: LayoutType []) => { const handleChangeOrder = useCallback(async (list: LayoutType[]) => {
/** 将原数据补充进去 */ /** 将原数据补充进去 */
const listKeys = list.filter((_item) => _item.isShow).map((_item) => { const listKeys = list.filter((_item) => _item.isShow).map((_item) => {
const { code, isShow, ...rest } = _item; const { code, isShow, ...rest } = _item;
...@@ -65,7 +66,7 @@ const Home: React.FC<{}> = () => { ...@@ -65,7 +66,7 @@ const Home: React.FC<{}> = () => {
}); });
const { code } = await postReportMemberHomeUpdateDataLayout(listKeys as Omit<LayoutType, "code">[]); const { code } = await postReportMemberHomeUpdateDataLayout(listKeys as Omit<LayoutType, "code">[]);
if(code === 1000) { if (code === 1000) {
setLayout(list); setLayout(list);
} }
...@@ -83,7 +84,7 @@ const Home: React.FC<{}> = () => { ...@@ -83,7 +84,7 @@ const Home: React.FC<{}> = () => {
return ( return (
<div <div
className={styles.ability} className={styles.ability}
style={{order: item.sort, display: (item.isShow ? 'block' : 'none')}} style={{ order: item.sort, display: (item.isShow ? 'block' : 'none') }}
key={item.code} key={item.code}
> >
{RenderComponent && <RenderComponent />} {RenderComponent && <RenderComponent />}
...@@ -96,7 +97,7 @@ const Home: React.FC<{}> = () => { ...@@ -96,7 +97,7 @@ const Home: React.FC<{}> = () => {
}, [loading, layout]) }, [loading, layout])
return ( return (
<PageHeaderWrapper title="首页"> <PageHeaderWrapper title={intl.formatMessage({ id: 'home.title' })}>
{/* <div className={styles.userGuaid} style={{display: visible ? 'block': 'none'}}> {/* <div className={styles.userGuaid} style={{display: visible ? 'block': 'none'}}>
<UseGuaid/> <UseGuaid/>
</div> */} </div> */}
...@@ -104,7 +105,7 @@ const Home: React.FC<{}> = () => { ...@@ -104,7 +105,7 @@ const Home: React.FC<{}> = () => {
<div className={styles.left}> <div className={styles.left}>
<UserCenter /> <UserCenter />
<div className={styles.otherCenters}> <div className={styles.otherCenters}>
{renderCenters()} {renderCenters()}
</div> </div>
</div> </div>
<div className={styles.right}> <div className={styles.right}>
...@@ -117,7 +118,7 @@ const Home: React.FC<{}> = () => { ...@@ -117,7 +118,7 @@ const Home: React.FC<{}> = () => {
</div> </div>
<a href="https://www.yuque.com/shushangyun-lingxi/xr7ol7/eh909i" target="__blank" className={styles.controller}> <a href="https://www.yuque.com/shushangyun-lingxi/xr7ol7/eh909i" target="__blank" className={styles.controller}>
<CompassFilled className={styles.icon} /> <CompassFilled className={styles.icon} />
<span className={styles.text}>使用向导</span> <span className={styles.text}>{intl.formatMessage({ id: 'home.guide' })}</span>
</a> </a>
</div> </div>
<div className={styles.commonMargin}> <div className={styles.commonMargin}>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-06-22 11:10:57 * @Date: 2021-06-22 11:10:57
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-02 16:49:39 * @LastEditTime: 2021-11-26 17:42:22
* @Description: 商家优惠劵执行 * @Description: 商家优惠劵执行
*/ */
import React, { useRef } from 'react'; import React, { useRef } from 'react';
...@@ -134,15 +134,7 @@ const MerchantCouponAnalysis: React.FC = () => { ...@@ -134,15 +134,7 @@ const MerchantCouponAnalysis: React.FC = () => {
return {}; return {};
}; };
const ControllerBtns = () => ( const ControllerBtns = null;
<Space size={16}>
<Button
onClick={() => {}}
>
批量审核通过
</Button>
</Space>
);
return ( return (
<Card> <Card>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-07-02 15:30:48 * @Date: 2021-07-02 15:30:48
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-30 17:02:09 * @LastEditTime: 2021-11-26 18:15:44
* @Description: 操作 Modal * @Description: 操作 Modal
*/ */
import React, { useRef } from 'react'; import React, { useRef } from 'react';
...@@ -67,11 +67,11 @@ const ActionModal: React.FC<IProps> = (props) => { ...@@ -67,11 +67,11 @@ const ActionModal: React.FC<IProps> = (props) => {
const formRef = useRef<ReasonFormRefHandle | EditFormRefHandle | null>(null); const formRef = useRef<ReasonFormRefHandle | EditFormRefHandle | null>(null);
const handleReasonSubmit = (values: ReasonValueType) => { const handleReasonSubmit = (values: ReasonValueType) => {
onConfirm({ reason: values.reason, ...value }, modalName); onConfirm({ ...value, reason: values.reason }, modalName);
}; };
const handleEditSubmit = (values: EditSubmitValueType) => { const handleEditSubmit = (values: EditSubmitValueType) => {
onConfirm({ ...values, ...value }, modalName); onConfirm({ ...value, ...values }, modalName);
}; };
const handleConfirm = () => { const handleConfirm = () => {
......
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