Commit 3e68dedb authored by XieZhiXiong's avatar XieZhiXiong

chore: 跟进接口更新

parent 2d70e070
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-28 15:06:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-01 10:59:23
* @LastEditTime: 2021-06-08 16:33:49
* @Description: 平台注册资料
*/
import React, { useState, useEffect } from 'react';
......@@ -29,6 +29,10 @@ interface FetchListParams {
* 当前页数
*/
pageSize?: number,
/**
* 名称
*/
name?: string,
}
interface IProps {
......@@ -44,6 +48,7 @@ const PlatformConfigTable = (props: IProps) => {
} = props;
const [page, setPage] = useState(1);
const [size, setSize] = useState(PAGE_SIZE);
const [name, setName] = useState('');
const [loading, setLoading] = useState(false);
const [data, setData] = useState({ data: [], totalCount: 0 });
......@@ -63,15 +68,17 @@ const PlatformConfigTable = (props: IProps) => {
},
];
const getMemberProcessRuleRoleConfigPage = async (params?: FetchListParams) => {
const getMemberProcessRuleRoleConfigPage = async (params: FetchListParams = {}) => {
if (!roleId) {
return;
}
setLoading(true);
const nextName = params.name !== undefined ? params.name : name;
const res = await PublicApi.getMemberProcessRuleRoleConfigPage({
roleId: `${roleId}`,
current: `${params?.current || page}`,
pageSize: `${params?.pageSize || size}`,
name: nextName,
});
if (res.code === 1000) {
setData(res.data);
......@@ -92,10 +99,19 @@ const PlatformConfigTable = (props: IProps) => {
});
};
const handleSearchChange = (value: string) => {
setName(value);
};
const handleSearch = (value: string) => {
getMemberProcessRuleRoleConfigPage({ current: 1, name: value })
};
return (
<>
<Row
justify="space-between"
align="middle"
style={{
marginBottom: theme['@margin-md'],
}}
......@@ -115,13 +131,16 @@ const PlatformConfigTable = (props: IProps) => {
</div>
)}
labelStyle={{ width: 180 }}
style={{
paddingBottom: 0,
}}
>
<Checkbox checked disabled>使用平台注册资料(默认)</Checkbox>
</Descriptions.Item>
</Descriptions>
</Col>
<Col span={6}>
<Search value={''} onChange={() => {}} onSearch={() => {}} />
<Search value={name} onChange={handleSearchChange} onSearch={handleSearch} />
</Col>
</Row>
<PolymericTable
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-28 14:30:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-28 15:04:40
* @LastEditTime: 2021-06-08 16:27:02
* @Description: 搜索组件
*/
import React from 'react';
......@@ -43,7 +43,6 @@ const MySearch: React.FC<IProps> = (props: IProps) => {
} = props;
const handleChange = (e) => {
console.log('e', e)
if (onChange) {
onChange(e.target.value);
}
......@@ -56,8 +55,9 @@ const MySearch: React.FC<IProps> = (props: IProps) => {
};
const handleReset = () => {
onChange('');
if (searchOnResetAction) {
onSearch(value);
onSearch('');
}
if (onReset) {
onReset();
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-27 16:01:23
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-01 14:35:51
* @LastEditTime: 2021-06-08 17:13:57
* @Description: 会员管理流程规则配置
*/
import React, { useState, useRef } from 'react';
......@@ -121,7 +121,7 @@ const MemberFlowRule: React.FC<[]> = () => {
},
{
title: '操作时间',
dataIndex: 'registerTime',
dataIndex: 'createTime',
},
{
title: '状态',
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-26 16:52:48
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-07 14:12:47
* @LastEditTime: 2021-06-08 17:14:38
* @Description: 申请会员
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -201,6 +201,12 @@ const MemberQueryApplyMember: React.FC = () => {
PublicApi.postMemberAbilityInfoDepositDetailUpdate({
validateId,
detail: step3,
qualities: qualities.map((item) => ({
expireDay: item.expireDay,
permanent: item.permanent[0] || 0,
url: item.file.url,
name: item.file.name,
})),
}).then(res => {
if (res.code !== 1000) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment