供应商消息以及代码优化
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 ViewModal from './components/ViewModal';
|
||||
//发起审批 弹窗
|
||||
import ApproveModal from './components/ApproveModal';
|
||||
//审批记录 弹窗
|
||||
import RecordModal from './components/RecordModal';
|
||||
//查看评审结果 弹窗
|
||||
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} />
|
||||
{/* <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} />
|
||||
<CreateModal visible={modalInfo.type === 'create' && modalInfo.visible} onCancel={closeModal} />
|
||||
</>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
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 { SearchOutlined } from '@ant-design/icons';
|
||||
import { page } from './services';
|
||||
import { page, getExitMge } from './services';
|
||||
import { getDictList } from '@/servers/api/dicts'
|
||||
|
||||
interface Data {
|
||||
@ -97,6 +97,30 @@ const supplierNews: React.FC = () => {
|
||||
// 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: '' });
|
||||
}, []);
|
||||
|
||||
@ -109,7 +133,7 @@ const supplierNews: React.FC = () => {
|
||||
style={{ marginBottom: 16 }}
|
||||
>
|
||||
<Form.Item name="content" label="消息内容">
|
||||
<Input placeholder="请输入消息内容" allowClear maxLength={50}/>
|
||||
<Input placeholder="请输入消息内容" allowClear maxLength={50} />
|
||||
</Form.Item>
|
||||
<Form.Item name="type" label="业务类型">
|
||||
<Select placeholder="请选择业务类型" allowClear>
|
||||
|
@ -10,4 +10,8 @@ interface page {
|
||||
content?: 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 {
|
||||
basePageRequest: BasePageRequest;
|
||||
name: string;
|
||||
deptId: string;
|
||||
name?: string;
|
||||
deptId?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ const SupplierListModal: React.FC<{
|
||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||
{ title: '供应商分类', dataIndex: 'type', align: 'center' },
|
||||
{ title: '供应商分类', dataIndex: 'enterpriseTypeCn', align: 'center' },
|
||||
];
|
||||
|
||||
return (
|
||||
|
@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Table, Form, Input, Select, Button, DatePicker, Tag, Space, message } from 'antd';
|
||||
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import DetailView from './components/DetailView';
|
||||
import { getSupplierChangeList, list } from './services';
|
||||
import { list } from './services';
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
@ -99,7 +99,7 @@ const SupplierChangeManage: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '供应商分类',
|
||||
dataIndex: 'supplierType',
|
||||
dataIndex: 'enterpriseTypeCn',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@ -116,13 +116,11 @@ const SupplierChangeManage: React.FC = () => {
|
||||
title: '流程状态',
|
||||
dataIndex: 'status',
|
||||
align: 'center',
|
||||
render: (val: any) => <Tag color={statusColorMap[val] || 'default'}>{val}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '审批结果',
|
||||
dataIndex: 'result',
|
||||
align: 'center',
|
||||
render: (val: any) => val ? <Tag color={resultColorMap[val] || 'default'}>{val}</Tag> : null,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@ -92,11 +92,11 @@ const SupplierRegisterAgent: React.FC = () => {
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '供应商类型',
|
||||
dataIndex: 'enterpriseType',
|
||||
align: 'center',
|
||||
},
|
||||
// {
|
||||
// title: '供应商类型',
|
||||
// dataIndex: 'supplierType',
|
||||
// align: 'center',
|
||||
// },
|
||||
{
|
||||
title: '创建单位',
|
||||
dataIndex: 'unit',
|
||||
|
@ -64,7 +64,7 @@ const SupplierMessage: React.FC = () => {
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
width: 80,
|
||||
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.Item name="content" label="消息内容">
|
||||
<Input placeholder="请输入消息内容" style={{ width: 220 }} maxLength={50} />
|
||||
<Input placeholder="请输入消息内容" style={{ width: 220 }} maxLength={50} allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="type" label="业务类型">
|
||||
<Select style={{ width: 200 }} placeholder="请选择业务类型">
|
||||
<Select style={{ width: 200 }} placeholder="请选择业务类型" allowClear>
|
||||
{messageTypeOptions.map(opt => (
|
||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user