年审模块
This commit is contained in:
@ -13,16 +13,22 @@ import {
|
||||
Select,
|
||||
Tag,
|
||||
Tooltip,
|
||||
Modal
|
||||
Modal,
|
||||
} from 'antd';
|
||||
import { history } from 'umi';
|
||||
import { SearchOutlined, DeleteOutlined, PlusOutlined, EditOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
SearchOutlined,
|
||||
DeleteOutlined,
|
||||
PlusOutlined,
|
||||
EditOutlined,
|
||||
EyeOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { getAnnualTaskList } from '@/servers/api/supplierAnnual';
|
||||
import {
|
||||
AnnualTaskStatus,
|
||||
AnnualTaskStatusText,
|
||||
AnnualTaskStatusColor,
|
||||
AnnualTaskStatusOptions
|
||||
AnnualTaskStatusOptions,
|
||||
} from '@/dicts/supplierAnnualTaskManageDict';
|
||||
import moment from 'moment';
|
||||
import styles from './supplierAnnualTaskManage.less';
|
||||
@ -126,17 +132,13 @@ const SupplierAnnualTaskManage: React.FC = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
history.push({
|
||||
pathname: 'supplierAnnualTaskManageAdd',
|
||||
state: { id: record.id, mode: 'edit' }
|
||||
});
|
||||
history.push(`/supplierAnnual/supplierAnnualTaskManageAdd?id=${record.id}&mode=edit`);
|
||||
};
|
||||
|
||||
// 查看详情
|
||||
const handleView = (record: supplierAnnualTaskManage.TaskRecord) => {
|
||||
history.push({
|
||||
pathname: 'supplierAnnualTaskManageDetail',
|
||||
state: { id: record.id }
|
||||
pathname: '/supplierAnnual/supplierAnnualTaskManageDetail?id=' + record.id,
|
||||
});
|
||||
};
|
||||
|
||||
@ -152,7 +154,8 @@ const SupplierAnnualTaskManage: React.FC = () => {
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
width: 80,
|
||||
render: (_: any, __: any, index: number) => index + 1 + (pagination.current - 1) * pagination.pageSize,
|
||||
render: (_: any, __: any, index: number) =>
|
||||
index + 1 + (pagination.current - 1) * pagination.pageSize,
|
||||
},
|
||||
{
|
||||
title: '评价主题',
|
||||
@ -190,20 +193,22 @@ const SupplierAnnualTaskManage: React.FC = () => {
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
render: (status: string, record: supplierAnnualTaskManage.TaskRecord) => getStatusTag(status, record.statusName),
|
||||
render: (status: string, record: supplierAnnualTaskManage.TaskRecord) =>
|
||||
getStatusTag(status, record.statusName),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 180,
|
||||
fixed: 'right' as const,
|
||||
align: 'center' as const,
|
||||
render: (_: any, record: supplierAnnualTaskManage.TaskRecord) => (
|
||||
<Space size="middle">
|
||||
<Button type="link" size="small" icon={<EyeOutlined />} onClick={() => handleView(record)}>
|
||||
<Button type="link" size="small" onClick={() => handleView(record)}>
|
||||
查看
|
||||
</Button>
|
||||
{record.status === AnnualTaskStatus.PENDING && (
|
||||
<Button type="link" size="small" icon={<EditOutlined />} onClick={() => handleEdit(record)}>
|
||||
<Button type="link" size="small" onClick={() => handleEdit(record)}>
|
||||
编辑
|
||||
</Button>
|
||||
)}
|
||||
@ -234,7 +239,7 @@ const SupplierAnnualTaskManage: React.FC = () => {
|
||||
</Form.Item>
|
||||
<Form.Item name="status" label="评价状态">
|
||||
<Select placeholder="请选择状态" allowClear style={{ width: 150 }}>
|
||||
{AnnualTaskStatusOptions.map(item => (
|
||||
{AnnualTaskStatusOptions.map((item) => (
|
||||
<Option key={item.value} value={item.value}>
|
||||
{item.label}
|
||||
</Option>
|
||||
@ -245,12 +250,7 @@ const SupplierAnnualTaskManage: React.FC = () => {
|
||||
<Button type="primary" htmlType="submit" icon={<SearchOutlined />}>
|
||||
搜索
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
icon={<DeleteOutlined />}
|
||||
onClick={handleReset}
|
||||
>
|
||||
<Button type="primary" danger icon={<DeleteOutlined />} onClick={handleReset}>
|
||||
重置
|
||||
</Button>
|
||||
</Form.Item>
|
||||
|
Reference in New Issue
Block a user