查看中单位问题
This commit is contained in:
@ -5,7 +5,15 @@ import { getCountMessage } from '@/servers/api/user';
|
|||||||
import { history } from 'umi';
|
import { history } from 'umi';
|
||||||
const MessageNotice: React.FC = () => {
|
const MessageNotice: React.FC = () => {
|
||||||
const [count, setCount] = useState<number>(0);
|
const [count, setCount] = useState<number>(0);
|
||||||
|
const handleBellClick = () => {
|
||||||
|
const activeKey = sessionStorage.getItem('activeKey') || '';
|
||||||
|
if (activeKey === 'accountLogin') {
|
||||||
|
history.push('/supplierMessage');
|
||||||
|
} else {
|
||||||
|
history.push('/backend/supplierNews');
|
||||||
|
}
|
||||||
|
setCount(0)
|
||||||
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let alive = true;
|
let alive = true;
|
||||||
// 拉未读数量
|
// 拉未读数量
|
||||||
@ -24,22 +32,14 @@ const MessageNotice: React.FC = () => {
|
|||||||
|
|
||||||
return count !== 0 ? (
|
return count !== 0 ? (
|
||||||
<Tooltip title="消息通知">
|
<Tooltip title="消息通知">
|
||||||
<Badge count={count} overflowCount={99}>
|
<span onClick={handleBellClick} style={{ cursor: 'pointer' }} >
|
||||||
<BellOutlined
|
<Badge count={count} overflowCount={99}>
|
||||||
style={{ fontSize: 18, cursor: 'pointer' }}
|
<BellOutlined style={{ fontSize: 18, cursor: 'pointer' }} />
|
||||||
onClick={() => {
|
</Badge>
|
||||||
const activeKey = sessionStorage.getItem('activeKey') || '';
|
</span>
|
||||||
if (activeKey === 'accountLogin') {
|
|
||||||
history.push('/supplierMessage')
|
|
||||||
} else {
|
|
||||||
history.push('/backend/supplierNews')
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Badge>
|
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : null
|
) : null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default MessageNotice;
|
export default MessageNotice;
|
||||||
|
@ -22,6 +22,7 @@ interface coscoAccessSupplierLists {
|
|||||||
interface coscoAccessWorks {
|
interface coscoAccessWorks {
|
||||||
deptId: string;
|
deptId: string;
|
||||||
deptName: string;
|
deptName: string;
|
||||||
|
orgName: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
}
|
}
|
||||||
@ -56,6 +57,7 @@ const ViewModal: React.FC<{
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
||||||
|
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入供应商">
|
<Descriptions.Item label="准入供应商">
|
||||||
{data.coscoAccessSupplierList.map((item) => {
|
{data.coscoAccessSupplierList.map((item) => {
|
||||||
|
@ -22,6 +22,7 @@ interface coscoAccessSupplierLists {
|
|||||||
interface coscoAccessWorks {
|
interface coscoAccessWorks {
|
||||||
deptId: string;
|
deptId: string;
|
||||||
deptName: string;
|
deptName: string;
|
||||||
|
orgName: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
approveStatusText: string;
|
approveStatusText: string;
|
||||||
}
|
}
|
||||||
@ -56,6 +57,7 @@ const ViewModal: React.FC<{
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1}>
|
<Descriptions bordered column={1}>
|
||||||
|
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入供应商">
|
<Descriptions.Item label="准入供应商">
|
||||||
{data.coscoAccessSupplierList.map((item) => {
|
{data.coscoAccessSupplierList.map((item) => {
|
||||||
|
@ -34,6 +34,7 @@ interface coscoAccessSupplierLists {
|
|||||||
interface coscoAccessWorks {
|
interface coscoAccessWorks {
|
||||||
deptId: string;
|
deptId: string;
|
||||||
deptName: string;
|
deptName: string;
|
||||||
|
orgName: string;
|
||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
@ -72,6 +73,7 @@ const ViewModal: React.FC<{
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
||||||
|
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入供应商">
|
<Descriptions.Item label="准入供应商">
|
||||||
{data.coscoAccessSupplierList.map((item) => {
|
{data.coscoAccessSupplierList.map((item) => {
|
||||||
|
@ -34,6 +34,7 @@ interface coscoAccessSupplierLists {
|
|||||||
interface coscoAccessWorks {
|
interface coscoAccessWorks {
|
||||||
deptId: string;
|
deptId: string;
|
||||||
deptName: string;
|
deptName: string;
|
||||||
|
orgName: string;
|
||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
@ -74,6 +75,7 @@ const ViewModal: React.FC<{
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
||||||
|
<Descriptions.Item label="准入单位">{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入供应商">
|
<Descriptions.Item label="准入供应商">
|
||||||
{data.coscoAccessSupplierList.map((item) => {
|
{data.coscoAccessSupplierList.map((item) => {
|
||||||
|
@ -34,6 +34,7 @@ interface coscoAccessSupplierLists {
|
|||||||
interface coscoAccessWorks {
|
interface coscoAccessWorks {
|
||||||
deptId: string;
|
deptId: string;
|
||||||
deptName: string;
|
deptName: string;
|
||||||
|
orgName: string;
|
||||||
startTime: string;
|
startTime: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
reviewStatusText: string;
|
reviewStatusText: string;
|
||||||
@ -74,6 +75,7 @@ const ViewModal: React.FC<{
|
|||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
{data && (
|
{data && (
|
||||||
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
||||||
|
<Descriptions.Item label="准入单位" >{data.coscoAccessWork.orgName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入部门" >{data.coscoAccessWork.deptName}</Descriptions.Item>
|
<Descriptions.Item label="准入部门" >{data.coscoAccessWork.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="准入供应商">
|
<Descriptions.Item label="准入供应商">
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ interface CategoryInfo {
|
|||||||
structure?: string;
|
structure?: string;
|
||||||
termOfValidity?: string;
|
termOfValidity?: string;
|
||||||
deptId?: string;
|
deptId?: string;
|
||||||
|
applyOrgName?: string;
|
||||||
|
orgName?: string;
|
||||||
deptName?: string;
|
deptName?: string;
|
||||||
categoryName?: string;
|
categoryName?: string;
|
||||||
area?: string;
|
area?: string;
|
||||||
@ -74,6 +76,12 @@ const ViewModal: React.FC<{
|
|||||||
<Descriptions.Item label="有效期至">
|
<Descriptions.Item label="有效期至">
|
||||||
{categoryInfo?.termOfValidity || '-'}
|
{categoryInfo?.termOfValidity || '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="创建单位">
|
||||||
|
{categoryInfo?.applyOrgName || '-'}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="所属单位">
|
||||||
|
{categoryInfo?.orgName || '-'}
|
||||||
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="负责部门">
|
<Descriptions.Item label="负责部门">
|
||||||
{categoryInfo?.deptName || '-'}
|
{categoryInfo?.deptName || '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
@ -140,9 +140,7 @@ const ViewModal: React.FC<{
|
|||||||
<Descriptions.Item label="有效期至">
|
<Descriptions.Item label="有效期至">
|
||||||
{categoryInfo?.applyTime || '-'}
|
{categoryInfo?.applyTime || '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="负责部门">
|
|
||||||
{categoryInfo?.deptName || '-'}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="区域">
|
<Descriptions.Item label="区域">
|
||||||
{categoryInfo?.area ? areaMap[categoryInfo.area] || categoryInfo?.area : '-'}
|
{categoryInfo?.area ? areaMap[categoryInfo.area] || categoryInfo?.area : '-'}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
@ -48,11 +48,11 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
// 可传查询条件 form.getFieldsValue()
|
// 可传查询条件 form.getFieldsValue()
|
||||||
|
|
||||||
const values = form.getFieldsValue();
|
const values = form.getFieldsValue();
|
||||||
const { exitTheme, time, deptId } = values;
|
const { time } = values;
|
||||||
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
|
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
|
||||||
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
|
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
|
||||||
|
|
||||||
const { code, data } = await getExitInfoPage({ supplierexitId: recordId, pageNo, pageSize, exitTheme, deptId, startTime, endTime });
|
const { code, data } = await getExitInfoPage({ supplierexitId: recordId, pageNo, pageSize, ...values, startTime, endTime });
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
setData(data.records);
|
setData(data.records);
|
||||||
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
|
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
|
||||||
@ -112,7 +112,7 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
<Form.Item name="exitTheme" label="供应商名称">
|
<Form.Item name="exitTheme" label="供应商名称">
|
||||||
<Input placeholder="请输入供应商名称" style={{ width: 150 }} allowClear maxLength={100} />
|
<Input placeholder="请输入供应商名称" style={{ width: 150 }} allowClear maxLength={100} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="deptId" label="发起单位">
|
<Form.Item name="orgId" label="发起单位">
|
||||||
<AccessDepartmentSelect placeholder={'请选择发起单位'} />
|
<AccessDepartmentSelect placeholder={'请选择发起单位'} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="time" label="退出时间">
|
<Form.Item name="time" label="退出时间">
|
||||||
|
@ -48,11 +48,11 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
// 可传查询条件 form.getFieldsValue()
|
// 可传查询条件 form.getFieldsValue()
|
||||||
|
|
||||||
const values = form.getFieldsValue();
|
const values = form.getFieldsValue();
|
||||||
const { exitTheme, time, deptId } = values;
|
const { time } = values;
|
||||||
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
|
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
|
||||||
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
|
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
|
||||||
|
|
||||||
const { code, data } = await getExitInfoPage({ supplierexitId: recordId, pageNo, pageSize, exitTheme, deptId, startTime, endTime });
|
const { code, data } = await getExitInfoPage({ supplierexitId: recordId, pageNo, pageSize, ...values, startTime, endTime });
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
setData(data.records);
|
setData(data.records);
|
||||||
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
|
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
|
||||||
@ -112,7 +112,7 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
|
|||||||
<Form.Item name="exitTheme" label="供应商名称">
|
<Form.Item name="exitTheme" label="供应商名称">
|
||||||
<Input placeholder="请输入供应商名称" style={{ width: 150 }} allowClear maxLength={100} />
|
<Input placeholder="请输入供应商名称" style={{ width: 150 }} allowClear maxLength={100} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="deptId" label="发起单位">
|
<Form.Item name="orgId" label="发起单位">
|
||||||
<AccessDepartmentSelect placeholder={'请选择发起单位'} />
|
<AccessDepartmentSelect placeholder={'请选择发起单位'} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="time" label="退出时间">
|
<Form.Item name="time" label="退出时间">
|
||||||
|
Reference in New Issue
Block a user