处理序号字典

This commit is contained in:
孙景学
2025-07-10 09:31:22 +08:00
parent 1f2986b5ae
commit eefc97e553
26 changed files with 300 additions and 426 deletions

View File

@ -1,52 +0,0 @@
import { Request, Response } from 'express';
export default {
'GET /api/system/bank': (req: Request, res: Response) => {
res.json({ code: 200,
data: [
{
id: '1',
interbankNumber: '123456789',
bank: '中国银行',
accountName: '张三',
account: '6228480000000000000',
currency: '人民币',
nation: '中国',
province: '广东省',
city: '广州市',
updateTime: '2024-06-18',
},
{
id: '2',
interbankNumber: '987654321',
bank: '工商银行',
accountName: '李四',
account: '6228480000000000001',
currency: '美元',
nation: '中国',
province: '江苏省',
city: '南京市',
updateTime: '2024-06-17',
},
],
total: 2,
msg: '操作成功'
});
},
'GET /api/system/categoryOption': (req: Request, res: Response) => {
res.json({ code: 200,
data: [
{
value: '1',
label: '1',
},
{
value: '2',
label: '3',
},
],
total: 2,
msg: '操作成功'
});
},
};

View File

@ -15,8 +15,8 @@ interface Data {
}
interface CategoryOption {
value: string;
label: string;
code: string;
dicName: string;
}
const supplierNews: React.FC = () => {
@ -82,21 +82,23 @@ const supplierNews: React.FC = () => {
title: '业务类型',
dataIndex: 'typeCn',
key: 'typeCn',
width: 160,
},
{
title: '发送时间',
dataIndex: 'createTime',
key: 'createTime',
width: 200,
},
];
//初始化
useEffect(() => {
// categoryOption().then((res:any) => {
// const { code, data } = res;
// if(code == 200) {
// setCategoryOptions(data)
// }
// })
getDictList('message_type').then((res:any) => {
const { code, data } = res;
if(code == 200) {
setCategoryOptions(data)
}
})
getExitMge().then((res) => {
const { code, data } = res;
if (code == 200) {
@ -138,8 +140,8 @@ const supplierNews: React.FC = () => {
<Form.Item name="type" label="业务类型">
<Select placeholder="请选择业务类型" allowClear>
{categoryOptions.map((option) => (
<Select.Option key={option.value} value={option.value}>
{option.label}
<Select.Option key={option.code} value={option.code}>
{option.dicName}
</Select.Option>
))}
</Select>