供应商消息以及代码优化
This commit is contained in:
@ -3,10 +3,6 @@ import { Form, Select, Button, Table, Space, Modal, message } from 'antd';
|
|||||||
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
||||||
//查看弹窗
|
//查看弹窗
|
||||||
import ViewModal from './components/ViewModal';
|
import ViewModal from './components/ViewModal';
|
||||||
//发起审批 弹窗
|
|
||||||
import ApproveModal from './components/ApproveModal';
|
|
||||||
//审批记录 弹窗
|
|
||||||
import RecordModal from './components/RecordModal';
|
|
||||||
//查看评审结果 弹窗
|
//查看评审结果 弹窗
|
||||||
import ResultModal from './components/ResultModal';
|
import ResultModal from './components/ResultModal';
|
||||||
//发起准入 弹窗
|
//发起准入 弹窗
|
||||||
@ -159,8 +155,6 @@ const AccessManagement: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
{/* 弹窗区 */}
|
{/* 弹窗区 */}
|
||||||
<ViewModal visible={modalInfo.type === 'view' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} />
|
<ViewModal visible={modalInfo.type === 'view' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} />
|
||||||
{/* <ApproveModal visible={modalInfo.type === 'approve' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} /> */}
|
|
||||||
{/* <RecordModal visible={modalInfo.type === 'record' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} /> */}
|
|
||||||
<ResultModal visible={modalInfo.type === 'result' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} />
|
<ResultModal visible={modalInfo.type === 'result' && modalInfo.visible} record={modalInfo.record} onCancel={closeModal} />
|
||||||
<CreateModal visible={modalInfo.type === 'create' && modalInfo.visible} onCancel={closeModal} />
|
<CreateModal visible={modalInfo.type === 'create' && modalInfo.visible} onCancel={closeModal} />
|
||||||
</>
|
</>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useIntl } from 'umi';
|
import { useIntl } from 'umi';
|
||||||
import { Form, Button, Table, Select, Input } from 'antd';
|
import { Form, Button, Table, Select, Input, Modal } from 'antd';
|
||||||
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
||||||
import { SearchOutlined } from '@ant-design/icons';
|
import { SearchOutlined } from '@ant-design/icons';
|
||||||
import { page } from './services';
|
import { page, getExitMge } from './services';
|
||||||
import { getDictList } from '@/servers/api/dicts'
|
import { getDictList } from '@/servers/api/dicts'
|
||||||
|
|
||||||
interface Data {
|
interface Data {
|
||||||
@ -97,6 +97,30 @@ const supplierNews: React.FC = () => {
|
|||||||
// setCategoryOptions(data)
|
// setCategoryOptions(data)
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
getExitMge().then((res) => {
|
||||||
|
const { code, data } = res;
|
||||||
|
if (code == 200) {
|
||||||
|
if (Array.isArray(data) && data.length > 0) {
|
||||||
|
Modal.info({
|
||||||
|
title: '消息通知',
|
||||||
|
width: 520,
|
||||||
|
content: (
|
||||||
|
<div>
|
||||||
|
<p>已被发起退出并通过:</p>
|
||||||
|
<ul>
|
||||||
|
{data.map((item: any) => (
|
||||||
|
<li key={item.id} style={{ margin: '6px 0' }}>
|
||||||
|
退出内容:{item.content || '--'}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
okText: '知道了'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
getList({ pageNo: 1, pageSize: 10, content: '', type: '' });
|
getList({ pageNo: 1, pageSize: 10, content: '', type: '' });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -11,3 +11,7 @@ interface page {
|
|||||||
type?: string;
|
type?: string;
|
||||||
}
|
}
|
||||||
export const page = (data: page) => request.post('/supplierMessage/page', { data });
|
export const page = (data: page) => request.post('/supplierMessage/page', { data });
|
||||||
|
/**
|
||||||
|
* 消息弹出
|
||||||
|
*/
|
||||||
|
export const getExitMge = () => request.get('/supplierMessage/getExitMge');
|
||||||
|
@ -40,8 +40,8 @@ export interface CoscoCategoryLibrarAttachments {
|
|||||||
|
|
||||||
export interface getPageData {
|
export interface getPageData {
|
||||||
basePageRequest: BasePageRequest;
|
basePageRequest: BasePageRequest;
|
||||||
name: string;
|
name?: string;
|
||||||
deptId: string;
|
deptId?: string;
|
||||||
[property: string]: any;
|
[property: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ const SupplierListModal: React.FC<{
|
|||||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||||
{ title: '供应商分类', dataIndex: 'type', align: 'center' },
|
{ title: '供应商分类', dataIndex: 'enterpriseTypeCn', align: 'center' },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { Table, Form, Input, Select, Button, DatePicker, Tag, Space, message } from 'antd';
|
import { Table, Form, Input, Select, Button, DatePicker, Tag, Space, message } from 'antd';
|
||||||
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons';
|
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||||
import DetailView from './components/DetailView';
|
import DetailView from './components/DetailView';
|
||||||
import { getSupplierChangeList, list } from './services';
|
import { list } from './services';
|
||||||
|
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ const SupplierChangeManage: React.FC = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '供应商分类',
|
title: '供应商分类',
|
||||||
dataIndex: 'supplierType',
|
dataIndex: 'enterpriseTypeCn',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -116,13 +116,11 @@ const SupplierChangeManage: React.FC = () => {
|
|||||||
title: '流程状态',
|
title: '流程状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (val: any) => <Tag color={statusColorMap[val] || 'default'}>{val}</Tag>,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '审批结果',
|
title: '审批结果',
|
||||||
dataIndex: 'result',
|
dataIndex: 'result',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (val: any) => val ? <Tag color={resultColorMap[val] || 'default'}>{val}</Tag> : null,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -92,11 +92,11 @@ const SupplierRegisterAgent: React.FC = () => {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '供应商类型',
|
// title: '供应商类型',
|
||||||
dataIndex: 'enterpriseType',
|
// dataIndex: 'supplierType',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '创建单位',
|
title: '创建单位',
|
||||||
dataIndex: 'unit',
|
dataIndex: 'unit',
|
||||||
|
@ -64,7 +64,7 @@ const SupplierMessage: React.FC = () => {
|
|||||||
dataIndex: 'index',
|
dataIndex: 'index',
|
||||||
key: 'index',
|
key: 'index',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 60,
|
width: 80,
|
||||||
render: (_: any, __: any, idx: number) => ((pagination.current! - 1) * pagination.pageSize!) + idx + 1,
|
render: (_: any, __: any, idx: number) => ((pagination.current! - 1) * pagination.pageSize!) + idx + 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -115,10 +115,10 @@ const SupplierMessage: React.FC = () => {
|
|||||||
<>
|
<>
|
||||||
<Form form={form} layout="inline" style={{ marginBottom: 12 }}>
|
<Form form={form} layout="inline" style={{ marginBottom: 12 }}>
|
||||||
<Form.Item name="content" label="消息内容">
|
<Form.Item name="content" label="消息内容">
|
||||||
<Input placeholder="请输入消息内容" style={{ width: 220 }} maxLength={50} />
|
<Input placeholder="请输入消息内容" style={{ width: 220 }} maxLength={50} allowClear />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="type" label="业务类型">
|
<Form.Item name="type" label="业务类型">
|
||||||
<Select style={{ width: 200 }} placeholder="请选择业务类型">
|
<Select style={{ width: 200 }} placeholder="请选择业务类型" allowClear>
|
||||||
{messageTypeOptions.map(opt => (
|
{messageTypeOptions.map(opt => (
|
||||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
||||||
))}
|
))}
|
||||||
|
Reference in New Issue
Block a user