合并代码
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { connect, useIntl } from 'umi';
|
||||
import { Modal, Button, Space, Tag } from 'antd';
|
||||
import { coscoSupplier } from './services'
|
||||
import { coscoSupplierBase } from './services'
|
||||
import SupplierRegisterInfo from './components/SupplierRegisterInfo';
|
||||
import AccessCategoryTable from './components/AccessCategoryTable';
|
||||
import TianyanchaInfo from './components/TianyanchaInfo';
|
||||
@ -21,7 +21,8 @@ const GlobalModal = ({ visible, id, dispatch }: any) => {
|
||||
//获取供应商信息
|
||||
const fetchRegisterInfo = () => {
|
||||
//供应商信息
|
||||
coscoSupplier({id}).then((res) => {
|
||||
|
||||
coscoSupplierBase(id).then((res) => {
|
||||
let { code, data } = res;
|
||||
if (code == 200) {
|
||||
setRegisterInfo(data);
|
||||
@ -54,9 +55,11 @@ const GlobalModal = ({ visible, id, dispatch }: any) => {
|
||||
};
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
|
||||
if (visible) {
|
||||
setModalType('register');
|
||||
fetchRegisterInfo();
|
||||
coscoSupplierBase(id)
|
||||
}
|
||||
}, [visible, id]);
|
||||
return (
|
||||
@ -69,10 +72,10 @@ const GlobalModal = ({ visible, id, dispatch }: any) => {
|
||||
title={
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-start', alignItems: 'center' }}>
|
||||
<span>{intl.formatMessage({id: 'component.globalModal.title' })}</span>
|
||||
<span style={{ marginLeft: '10px' }}>
|
||||
{/* <span style={{ marginLeft: '10px' }}>
|
||||
{isBlacklisted && <Tag color="red">{intl.formatMessage({id: 'component.globalModal.blacklist' })}</Tag>}
|
||||
{isGreylisted && <Tag color="gray">{intl.formatMessage({id: 'component.globalModal.GreyList' })}</Tag>}
|
||||
</span>
|
||||
</span> */}
|
||||
</div>
|
||||
}
|
||||
>
|
||||
|
Reference in New Issue
Block a user