Commit 730b4d93 authored by tjy's avatar tjy

新增会员审核页面

parent 079208ae
...@@ -43,6 +43,13 @@ const MemberRoute = { ...@@ -43,6 +43,13 @@ const MemberRoute = {
component: '@/pages/member/memberPrSubmit/index' component: '@/pages/member/memberPrSubmit/index'
}, },
{ {
path: '/memberCenter/memberAbility/manage/auditPrSubmit',
name: 'auditPrSubmit',
key: 'auditPrSubmit',
hideInMenu: true,
component: '@/pages/member/memberPrSubmit/auditPrSubmit'
},
{
path: '/memberCenter/memberAbility/manage/memberPr', path: '/memberCenter/memberAbility/manage/memberPr',
name: 'memberPr', name: 'memberPr',
key: 'memberPr', key: 'memberPr',
...@@ -93,4 +100,4 @@ const MemberRoute = { ...@@ -93,4 +100,4 @@ const MemberRoute = {
} }
export default MemberRoute export default MemberRoute
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
"@umijs/test": "^3.2.0", "@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7", "bizcharts": "^4.0.7",
"god": "0.1.7", "god": "0.1.7",
"god-tool": "^2.2.0", "god-tool": "2.4.0",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"mobx": "^5.15.4", "mobx": "^5.15.4",
"mobx-react": "^6.2.2", "mobx-react": "^6.2.2",
......
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
'menu.memberAbility.memberManage.addMember': '新增会员', 'menu.memberAbility.memberManage.addMember': '新增会员',
'menu.memberAbility.memberManage.memberMaintain': '会员维护', 'menu.memberAbility.memberManage.memberMaintain': '会员维护',
'menu.memberAbility.memberManage.memberPrSubmit': '待提交审核', 'menu.memberAbility.memberManage.memberPrSubmit': '待提交审核',
'menu.memberAbility.memberManage.auditPrSubmit': '待提交审核详情',
'menu.memberAbility.memberManage.memberPr': '待审核', 'menu.memberAbility.memberManage.memberPr': '待审核',
'menu.memberAbility.memberManage.auditPr': '待审核详情', 'menu.memberAbility.memberManage.auditPr': '待审核详情',
'menu.memberAbility.memberManage.memberPrConfirm': '待确认审核', 'menu.memberAbility.memberManage.memberPrConfirm': '待确认审核',
......
import React, { useRef, useState } from 'react'; import React, { ReactNode, useRef, useState } from 'react';
import { history } from 'umi';
import { StopOutlined, CheckSquareOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Row, Col, Button, Tag, Badge, Tabs, Steps } from 'antd';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import style from './index.less'; import style from './index.less';
const { TabPane } = Tabs;
const { Step } = Steps;
interface ItemProps {} interface ItemProps {}
const data = [
{
key: '1',
id: '1',
name: '价格权益',
explain: '交易一方能获得另一方的价格折扣',
type: '交易获取',
setting: '按交易金额比例设置',
params: '1',
status: 2,
},
{
key: '2',
id: '2',
name: '返现权益',
explain: '交易一方能获得另一方的交易返现',
type: '交易获取',
setting: '按交易金额比例设置',
params: '1',
status: 1,
},
];
const auditDetail: React.FC<ItemProps> = props => { const auditDetail: React.FC<ItemProps> = props => {
return <div>auditDetail</div>; const ref = useRef({});
const [fActived, setfActived] = useState('1');
const [lActived, setlActived] = useState('1');
const [detailData, setDetailData] = useState({
step: {
current: 0,
items: [
{
title: '会员',
desc: '申请注册',
},
{
title: '平台',
desc: '审核会员',
},
{
title: '完成',
desc: '',
},
],
},
});
const columns: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '会员权益名称',
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: '会员权益说明',
dataIndex: 'explain',
align: 'center',
key: 'explain',
},
{
title: '权益获取方式',
dataIndex: 'type',
align: 'center',
key: 'type',
},
];
// 模拟请求
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
const queryResult = data.find(v => v.key === params.keywords);
setTimeout(() => {
resolve({
code: 200,
message: '',
data: queryResult ? [queryResult] : data,
});
}, 1000);
});
};
return (
<PageHeaderWrapper
onBack={() => window.history.back()}
title={
<>
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}>广</div>
<div className={style['headerTop-name']}>
广州市极致皮具有限公司
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
</>
}
extra={
<>
<Button>
<StopOutlined />
审核不通过
</Button>
<Button className={style.saveBtn}>
<CheckSquareOutlined />
审核通过
</Button>
</>
}
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
<div className={style['headerMain-left-option']}>
<div>会员类型:</div>
<div>企业会员</div>
</div>
<div className={style['headerMain-left-option']}>
<div>会员角色:</div>
<div>供应商</div>
</div>
<div className={style['headerMain-left-option']}>
<div>会员状态:</div>
<div>
<Tag color="green">正常</Tag>
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>外部状态:</div>
<div>
<Tag color="gold">待审核</Tag>
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>内部状态:</div>
<div>
<Badge color="#669EDE" text="待提交审核" />
</div>
</div>
</div>
</div>
}
>
<Row>
<Col className={style.mainCol} span={24}>
<Tabs activeKey={fActived} onChange={val => setfActived(val)}>
<TabPane tab="外部审核流程" key="1">
<Steps
style={{ padding: '34px 0' }}
progressDot
current={detailData.step.current}
>
{detailData.step.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</TabPane>
<TabPane tab="内部审核流程" key="2">
<Steps
style={{ padding: '34px 0' }}
progressDot
current={detailData.step.current}
>
{detailData.step.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</TabPane>
</Tabs>
</Col>
<Col className={style.mainCol} span={24}>
基本信息
<Col span={6}>登录账户:</Col>
<Col span={6}>注册手机号:</Col>
<Col span={6}>注册邮箱:</Col>
<Col span={6}>申请时间:</Col>
</Col>
<Col className={style.mainCol} span={24}>
渠道信息
</Col>
<Col className={style.mainCol} span={24}>
营业执照
</Col>
<Col className={style.mainCol} span={24}>
法定代表人信息
</Col>
<Col className={style.mainCol} span={24}>
联系信息
</Col>
<Col className={style.mainCol} span={24}>
<Tabs activeKey={lActived} onChange={val => setlActived(val)}>
<TabPane tab="流转记录" key="1">
<StandardTable
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
/>
</TabPane>
<TabPane tab="内部单据流转记录" key="2">
Content of Tab Pane 2
</TabPane>
</Tabs>
</Col>
</Row>
</PageHeaderWrapper>
);
}; };
export default auditDetail; export default auditDetail;
...@@ -312,21 +312,15 @@ const auditList: React.FC<PageProps> = props => { ...@@ -312,21 +312,15 @@ const auditList: React.FC<PageProps> = props => {
align: 'center', align: 'center',
render: (text: any, record: any) => { render: (text: any, record: any) => {
let component: ReactNode = null; let component: ReactNode = null;
component = component = (
props.pageType === '1' ? ( <Button type="link" onClick={() => handleChange(record)}>
<Popconfirm {props.pageType === '1'
title="确定要执行这个操作?" ? '提交审核'
onConfirm={() => handleChange(record)} : props.pageType === '2'
okText="是" ? '审核'
cancelText="否" : '确认审核'}
> </Button>
<Button type="link">提交审核</Button> );
</Popconfirm>
) : (
<Button type="link" onClick={() => handleChange(record)}>
{props.pageType === '2' ? '审核' : '确认审核'}
</Button>
);
return component; return component;
}, },
}, },
...@@ -370,13 +364,13 @@ const auditList: React.FC<PageProps> = props => { ...@@ -370,13 +364,13 @@ const auditList: React.FC<PageProps> = props => {
}; };
const handleChange = (record: object) => { const handleChange = (record: object) => {
if (props.pageType === '1') return console.log('待提交审核', record); let path =
else props.pageType === '1'
return history.push( ? 'auditPrSubmit'
`/memberCenter/memberAbility/manage/${ : props.pageType === '2'
props.pageType === '2' ? 'auditPr' : 'auditPrComfirm' ? 'auditPr'
}`, : 'auditPrComfirm';
); history.push(`/memberCenter/memberAbility/manage/${path}`);
}; };
return ( return (
...@@ -390,7 +384,7 @@ const auditList: React.FC<PageProps> = props => { ...@@ -390,7 +384,7 @@ const auditList: React.FC<PageProps> = props => {
controlRender={ controlRender={
<Row> <Row>
<Col className={style.col} span={2}> <Col className={style.col} span={2}>
<Button className={style.importBtn}> <Button>
{props.pageType === '1' {props.pageType === '1'
? '批量提交审核' ? '批量提交审核'
: props.pageType === '2' : props.pageType === '2'
...@@ -423,7 +417,7 @@ const auditList: React.FC<PageProps> = props => { ...@@ -423,7 +417,7 @@ const auditList: React.FC<PageProps> = props => {
/> />
</Tooltip> </Tooltip>
<Button <Button
className={style.importBtn} style={{ margin: '0 16px' }}
onClick={() => setIsSearch((isSearch = !isSearch))} onClick={() => setIsSearch((isSearch = !isSearch))}
> >
高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />} 高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
text-align: right; text-align: right;
.select { .select {
width : 160px; width : 160px;
margin : 0 0 16px 16px; margin : 0 0 16px 16px;
text-align : left; text-align: left;
&:nth-of-type(1) { &:nth-of-type(1) {
margin-left: 0; margin-left: 0;
...@@ -21,8 +21,16 @@ ...@@ -21,8 +21,16 @@
} }
} }
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
&:nth-last-of-type(1) {
margin: 0;
}
}
.nameCell { .nameCell {
text-align: left; text-align: left;
...@@ -57,56 +65,72 @@ ...@@ -57,56 +65,72 @@
} }
} }
.importBtn {
margin: 0 16px;
}
.headerTop { .headerTop {
display : flex; display : flex;
align-items: center; align-items: center;
font-size : 20px;
span { font-family: PingFangSC-Medium, PingFang SC;
font-size : 14px; font-weight: 500;
font-weight: 400;
&-prefix {
&:nth-last-of-type(1) { width : 48px;
font-size : 20px; height : 48px;
font-weight: 500; line-height : 48px;
color : #172B4D; border-radius : 4px;
margin-left: 16px; border : 1px solid #DFE1E6;
} color : #fff;
text-align : center;
background-color: #8777D9;
} }
}
.saveBtn { &-name {
color : #fff; color : #172B4D;
background: @main-color margin: 0 8px 0 12px;
}
} }
.address { .headerMain {
display: flex; display: flex;
&-addition { &-left {
display : inline-block; flex : 6;
width : 32px; display : flex;
height : 32px; flex-wrap : wrap;
text-align : center; padding-left: 90px;
margin-left : 24px;
border : 1px solid #EBFBFC; &-option {
border-radius: 2px; display : flex;
cursor : pointer; width : calc(100% / 3);
overflow : hidden; margin-bottom: 17px;
font-size : 14px;
&:hover { font-family : PingFangSC-Regular, PingFang SC;
background-color: #00B37A; font-weight : 400;
border : 0; color : #6B778C;
color : #fff; padding-right: 20px;
}
&:nth-of-type(n + 4) {
margin: 0;
}
div {
flex: 1;
&:nth-last-of-type(1) {
flex: 2;
}
}
&-icon {
width : 20px;
height: 20px;
color : '#6B778C';
} }
} }
&-right {
flex : 1;
text-align: right;
}
}
.saveBtn {
color : #fff;
background : @main-color;
margin-left: 10px;
} }
\ No newline at end of file
import React, { ReactNode, useState, useRef } from 'react' import React, { ReactNode, useState, useRef } from 'react'
import { history } from 'umi' import { history } from 'umi'
import { Button, Popconfirm, Card, Input, Slider, Row, Col } from 'antd' import { Button, Popconfirm, Card, Input, Slider } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PlayCircleOutlined, ContainerOutlined } from '@ant-design/icons' import { PlayCircleOutlined, ContainerOutlined } from '@ant-design/icons'
import { StandardTable } from 'god' import { StandardTable } from 'god'
......
import React from 'react';
import AuditDetail from '../components/auditDetail';
const auditPrSubmit: React.FC<{}> = () => {
return <AuditDetail />;
};
export default auditPrSubmit;
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