提交 60bf6ec0 作者: 龚洪江

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

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