提交 60bf6ec0 作者: 龚洪江

功能:客户列表备注修改,认证状态筛选

上级 967c6918
...@@ -8,6 +8,7 @@ export type listAppUserType = InterListFunction< ...@@ -8,6 +8,7 @@ export type listAppUserType = InterListFunction<
keyword?: string; keyword?: string;
phoneNum?: string; phoneNum?: string;
startTime?: string; startTime?: string;
realAuthStatus?: number;
}, },
{ {
id: number; id: number;
...@@ -28,6 +29,7 @@ export type listAppUserType = InterListFunction< ...@@ -28,6 +29,7 @@ export type listAppUserType = InterListFunction<
companyAuthStatus: number; companyAuthStatus: number;
cooperationTagId: number; cooperationTagId: number;
companyName: null; companyName: null;
realAuthStatus: number;
tagName: null; tagName: null;
cooperationTagVOS: { cooperationTagVOS: {
createTime: string; createTime: string;
...@@ -247,6 +249,7 @@ export type listAuthPageType = InterItemFunction< ...@@ -247,6 +249,7 @@ export type listAuthPageType = InterItemFunction<
uid: string; uid: string;
userName: string; userName: string;
createTime: string; createTime: string;
remark: string;
}[] }[]
>; >;
//实名认证详情返回类型 //实名认证详情返回类型
...@@ -262,3 +265,5 @@ export type authDetailType = InterFunction< ...@@ -262,3 +265,5 @@ export type authDetailType = InterFunction<
userName: string; userName: string;
} }
>; >;
//实名认证-更新备注
export type authRemarkType = InterFunction<{ id: number; remark: string }, any>;
...@@ -3,6 +3,7 @@ import { ...@@ -3,6 +3,7 @@ import {
applyTagDetails, applyTagDetails,
approvalApplyTag, approvalApplyTag,
authDetailType, authDetailType,
authRemarkType,
changeUserTagNew, changeUserTagNew,
changeUserTagType, changeUserTagType,
CompanyListTag, CompanyListTag,
...@@ -63,4 +64,7 @@ export class CustomManageAPI { ...@@ -63,4 +64,7 @@ export class CustomManageAPI {
// 客户-实名认证详情 // 客户-实名认证详情
static getAuthDetail: authDetailType = (params) => static getAuthDetail: authDetailType = (params) =>
axios.get('/userapp/real-name-auth/detail', { params }); axios.get('/userapp/real-name-auth/detail', { params });
// 客户-实名认证更新备注
static updateRemark: authRemarkType = (params) =>
axios.get('/userapp/real-name-auth/updateRemark', { params });
} }
...@@ -60,7 +60,6 @@ function CustomListView() { ...@@ -60,7 +60,6 @@ function CustomListView() {
totalPage, totalPage,
}); });
setTableData(list); setTableData(list);
// console.log('加载列表 --->', list);
} }
}; };
// 翻页 // 翻页
...@@ -124,6 +123,12 @@ function CustomListView() { ...@@ -124,6 +123,12 @@ function CustomListView() {
align: 'center', align: 'center',
}, },
{ {
title: '实名认证',
dataIndex: 'realNameAuthStatus',
align: 'center',
render: (text: number) => (text ? '已认证' : '未认证'),
},
{
title: '认证企业', title: '认证企业',
dataIndex: 'companyName', dataIndex: 'companyName',
align: 'center', align: 'center',
...@@ -264,16 +269,16 @@ function CustomListView() { ...@@ -264,16 +269,16 @@ function CustomListView() {
{ value: 1, label: '已认证' }, { value: 1, label: '已认证' },
], ],
}, },
// { {
// label: '电子签约认证', label: '实名认证',
// name: 'contract', name: 'realAuthStatus',
// type: 'Select', type: 'Select',
// placeholder: '请选择是否认证', placeholder: '请选择认证状态',
// options: [ options: [
// { value: 1, label: '未认证' }, { value: 0, label: '未认证' },
// { value: 2, label: '已认证' }, { value: 1, label: '已认证' },
// ], ],
// }, },
]} ]}
searchData={onFinish} searchData={onFinish}
/> />
......
import { Form, Input, message, Modal, ModalProps } from 'antd';
import { FC, useEffect } from 'react';
import { InterDataType } from '~/api/interface';
import { listAuthPageType } from '~/api/interface/customManageType';
import { CustomManageAPI } from '~/api';
type listAuthType = InterDataType<listAuthPageType>['list'];
interface selfProps {
onOk: () => void;
currentAuthItem: listAuthType[0] | undefined;
}
//实名认证列表返回类型
const RemarkModal: FC<ModalProps & selfProps> = ({ open, onCancel, onOk, currentAuthItem }) => {
const [form] = Form.useForm<{ remark: string }>();
const handleOk = () => {
if (currentAuthItem) {
form.validateFields().then((values) => {
CustomManageAPI.updateRemark({ id: currentAuthItem.id, ...values }).then(({ code }) => {
if (code === '200') {
message.success('更新备注成功');
onOk();
}
});
});
}
};
useEffect(() => {
if (currentAuthItem) {
form.setFieldValue('remark', currentAuthItem.remark || undefined);
}
}, [currentAuthItem]);
return (
<Modal open={open} onCancel={onCancel} onOk={handleOk} title='备注弹窗'>
<Form form={form}>
<Form.Item label='备注' name='remark'>
<Input.TextArea placeholder='请输入备注' maxLength={70} showCount rows={4} />
</Form.Item>
</Form>
</Modal>
);
};
export default RemarkModal;
...@@ -6,6 +6,7 @@ import { CustomManageAPI } from '~/api'; ...@@ -6,6 +6,7 @@ import { CustomManageAPI } from '~/api';
import { InterDataType, InterReqListType, PaginationProps } from '~/api/interface'; import { InterDataType, InterReqListType, PaginationProps } from '~/api/interface';
import { listAuthPageType } from '~/api/interface/customManageType'; import { listAuthPageType } from '~/api/interface/customManageType';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import RemarkModal from '~/pages/customManage/customVerification/list/components/remarkModal';
//实名认证列表返回类型 //实名认证列表返回类型
type listAuthType = InterDataType<listAuthPageType>['list']; type listAuthType = InterDataType<listAuthPageType>['list'];
...@@ -53,6 +54,13 @@ const CustomVerification = () => { ...@@ -53,6 +54,13 @@ const CustomVerification = () => {
title: '备注', title: '备注',
align: 'center', align: 'center',
dataIndex: 'remark', dataIndex: 'remark',
width: '20%',
ellipsis: true,
render: (text: string, record) => (
<Button type='link' onClick={() => remarkModalShowClick(record)}>
{text || '--'}
</Button>
),
}, },
{ {
title: '操作', title: '操作',
...@@ -72,6 +80,9 @@ const CustomVerification = () => { ...@@ -72,6 +80,9 @@ const CustomVerification = () => {
pageSize: 10, pageSize: 10,
totalCount: 0, totalCount: 0,
}); });
//备注弹窗
const [remarkModalShow, setRemarkModalShow] = useState<boolean>(false);
const [currentAuthItem, setCurrentAuthItem] = useState<listAuthType[0]>();
const getAuthList = (query?: listAuthParametersType) => { const getAuthList = (query?: listAuthParametersType) => {
CustomManageAPI.getListAuth({ CustomManageAPI.getListAuth({
...@@ -102,6 +113,19 @@ const CustomVerification = () => { ...@@ -102,6 +113,19 @@ const CustomVerification = () => {
navigate({ pathname: '/customManage/customVerificationDetail', search: `id=${record.id}` }); navigate({ pathname: '/customManage/customVerificationDetail', search: `id=${record.id}` });
}; };
//修改备注操作
const remarkModalShowClick = (record: listAuthType[0]) => {
setCurrentAuthItem({ ...record });
setRemarkModalShow(true);
};
const remarkModalCancel = () => {
setRemarkModalShow(false);
};
const remarkModalOk = () => {
getAuthList(query);
setRemarkModalShow(false);
};
useEffect(() => { useEffect(() => {
getAuthList(); getAuthList();
}, []); }, []);
...@@ -124,6 +148,12 @@ const CustomVerification = () => { ...@@ -124,6 +148,12 @@ const CustomVerification = () => {
showTotal: (total, range) => `当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`, showTotal: (total, range) => `当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`,
}} }}
/> />
<RemarkModal
open={remarkModalShow}
onCancel={remarkModalCancel}
onOk={remarkModalOk}
currentAuthItem={currentAuthItem}
/>
</div> </div>
); );
}; };
......
...@@ -91,7 +91,7 @@ const FlyerDetail = () => { ...@@ -91,7 +91,7 @@ const FlyerDetail = () => {
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label='业务案例'> <Descriptions.Item label='业务案例'>
{flyerDetail?.abilityUrl ? ( {flyerDetail?.abilityUrl ? (
<Image.PreviewGroup items={JSON.parse(flyerDetail?.abilityUrl)}> <Image.PreviewGroup>
{JSON.parse(flyerDetail?.abilityUrl).map((v: string, index: number) => ( {JSON.parse(flyerDetail?.abilityUrl).map((v: string, index: number) => (
<Image src={v} key={index} width={100} rootClassName='ability-img' /> <Image src={v} key={index} width={100} rootClassName='ability-img' />
))} ))}
......
...@@ -95,6 +95,8 @@ const FlyerList = () => { ...@@ -95,6 +95,8 @@ const FlyerList = () => {
title: '备注', title: '备注',
align: 'center', align: 'center',
dataIndex: 'remark', dataIndex: 'remark',
width: '20%',
ellipsis: true,
render: (text: string, record) => ( render: (text: string, record) => (
<Button type='link' onClick={() => updateRemarkClick(record)}> <Button type='link' onClick={() => updateRemarkClick(record)}>
{text || '--'} {text || '--'}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论