Commit 41c871d8 authored by XieZhiXiong's avatar XieZhiXiong
parents a849969c 6089d04c
......@@ -21,7 +21,7 @@ const KEY_TITLE = {
// 如果当前用户有电子签章申请菜单权限,但还未申请电子签章,则显示:您还没有申请电子签章,请先申请电子签章,点击申请电子签章按钮,跳转合同能力--电子签章-电子签章申请页
const Constract: React.FC<Iprops> = (props: Iprops) => {
const { loading, isError, hasRequest, responseData, ref, inViewPort } = useViewRequest<GetReportMemberHomeGetContractTallyResponse, any>(PublicApi.getReportMemberHomeGetContractTally, {})
const { loading, isError, hasRequest, responseData, ref, inViewPort, filterEmptyList } = useViewRequest<GetReportMemberHomeGetContractTallyResponse, any>(PublicApi.getReportMemberHomeGetContractTally, {})
const [hasConstract, setHasConstract] = useState<boolean>(false);
const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth();
const [hasFetchData, setHasFetchData] = useState(false)
......@@ -62,14 +62,14 @@ const Constract: React.FC<Iprops> = (props: Iprops) => {
>
<Fragment>
{
(!hasConstract) && (
isConsumer && (!hasConstract) && (
<AlertTip
url="/memberCenter/contract/ElectronicSignature/apply"
content="您还没有申请电子签章,请先申请电子签章"
/>
)
}
<StaticsDataList title={KEY_TITLE} dataSource={responseData as unknown as IDataListProps["dataSource"]} />
<StaticsDataList title={KEY_TITLE} dataSource={filterEmptyList as unknown as IDataListProps["dataSource"]} />
</Fragment>
</Layout>
......
......@@ -36,13 +36,14 @@ const PurchaseCenter: React.FC<Iprops> = () => {
const { loading, filterEmptyList, isError, ref, inViewPort, refresh } = useViewRequest<GetReportMemberHomeGetPurchaseTallyResponse, any>(PublicApi.getReportMemberHomeGetPurchaseTally, {})
const { userAuth, hasAbilityFunc, isConsumer } = useGetAuth();
const hasAbility = hasAbilityFunc('procurementAbility');
/** 是否有权限 */
/** 是否是消费者即服务消费者 有权限 */
const hasPurchaseAuth = (isBusiness.includes(userAuth.memberType)) && isConsumer
/** 是否有采购门户 */
const [hasPurchase, setHasPurchase] = useState<boolean>(hasPurchaseAuth);
const [hasPurchase, setHasPurchase] = useState<boolean>(false);
const [hasFetchData, setHasFetchData] = useState(false)
useEffect(() => {
console.log("hasPurchaseAuth", hasPurchaseAuth);
if (!inViewPort || (!hasPurchaseAuth) || hasFetchData) {
return;
}
......@@ -50,7 +51,7 @@ const PurchaseCenter: React.FC<Iprops> = () => {
const { data, code } = await PublicApi.getTemplateWebMemberPurchaseWebFindCurrMemberPurchase();
setHasFetchData(true)
if (code === 1000) {
return setHasPurchase(data?.id ? true : false)
setHasPurchase(data?.id ? true : false)
}
}
findCurrMemberPurchase()
......@@ -79,7 +80,7 @@ const PurchaseCenter: React.FC<Iprops> = () => {
>
<Fragment>
{
!hasPurchase && (
hasPurchaseAuth && !hasPurchase && (
<div className={styles.ding_tips}>
<div>
<BellOutlined />
......
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