供应商消息以及代码优化
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user