Commit 730b4d93 authored by tjy's avatar tjy

新增会员审核页面

parent 079208ae
......@@ -43,6 +43,13 @@ const MemberRoute = {
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',
name: 'memberPr',
key: 'memberPr',
......@@ -93,4 +100,4 @@ const MemberRoute = {
}
export default MemberRoute
\ No newline at end of file
export default MemberRoute
......@@ -30,7 +30,7 @@
"@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7",
"god": "0.1.7",
"god-tool": "^2.2.0",
"god-tool": "2.4.0",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
......@@ -51,6 +51,7 @@ export default {
'menu.memberAbility.memberManage.addMember': '新增会员',
'menu.memberAbility.memberManage.memberMaintain': '会员维护',
'menu.memberAbility.memberManage.memberPrSubmit': '待提交审核',
'menu.memberAbility.memberManage.auditPrSubmit': '待提交审核详情',
'menu.memberAbility.memberManage.memberPr': '待审核',
'menu.memberAbility.memberManage.auditPr': '待审核详情',
'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';
const { TabPane } = Tabs;
const { Step } = Steps;
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 => {
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;
......@@ -312,21 +312,15 @@ const auditList: React.FC<PageProps> = props => {
align: 'center',
render: (text: any, record: any) => {
let component: ReactNode = null;
component =
props.pageType === '1' ? (
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleChange(record)}
okText="是"
cancelText="否"
>
<Button type="link">提交审核</Button>
</Popconfirm>
) : (
<Button type="link" onClick={() => handleChange(record)}>
{props.pageType === '2' ? '审核' : '确认审核'}
</Button>
);
component = (
<Button type="link" onClick={() => handleChange(record)}>
{props.pageType === '1'
? '提交审核'
: props.pageType === '2'
? '审核'
: '确认审核'}
</Button>
);
return component;
},
},
......@@ -370,13 +364,13 @@ const auditList: React.FC<PageProps> = props => {
};
const handleChange = (record: object) => {
if (props.pageType === '1') return console.log('待提交审核', record);
else
return history.push(
`/memberCenter/memberAbility/manage/${
props.pageType === '2' ? 'auditPr' : 'auditPrComfirm'
}`,
);
let path =
props.pageType === '1'
? 'auditPrSubmit'
: props.pageType === '2'
? 'auditPr'
: 'auditPrComfirm';
history.push(`/memberCenter/memberAbility/manage/${path}`);
};
return (
......@@ -390,7 +384,7 @@ const auditList: React.FC<PageProps> = props => {
controlRender={
<Row>
<Col className={style.col} span={2}>
<Button className={style.importBtn}>
<Button>
{props.pageType === '1'
? '批量提交审核'
: props.pageType === '2'
......@@ -423,7 +417,7 @@ const auditList: React.FC<PageProps> = props => {
/>
</Tooltip>
<Button
className={style.importBtn}
style={{ margin: '0 16px' }}
onClick={() => setIsSearch((isSearch = !isSearch))}
>
高级筛选{isSearch ? <UpOutlined /> : <DownOutlined />}
......
......@@ -10,9 +10,9 @@
text-align: right;
.select {
width : 160px;
width : 160px;
margin : 0 0 16px 16px;
text-align : left;
text-align: left;
&:nth-of-type(1) {
margin-left: 0;
......@@ -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 {
text-align: left;
......@@ -57,56 +65,72 @@
}
}
.importBtn {
margin: 0 16px;
}
.headerTop {
display : flex;
align-items: center;
span {
font-size : 14px;
font-weight: 400;
&:nth-last-of-type(1) {
font-size : 20px;
font-weight: 500;
color : #172B4D;
margin-left: 16px;
}
font-size : 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
&-prefix {
width : 48px;
height : 48px;
line-height : 48px;
border-radius : 4px;
border : 1px solid #DFE1E6;
color : #fff;
text-align : center;
background-color: #8777D9;
}
}
.saveBtn {
color : #fff;
background: @main-color
&-name {
color : #172B4D;
margin: 0 8px 0 12px;
}
}
.address {
.headerMain {
display: flex;
&-addition {
display : inline-block;
width : 32px;
height : 32px;
text-align : center;
margin-left : 24px;
border : 1px solid #EBFBFC;
border-radius: 2px;
cursor : pointer;
overflow : hidden;
&:hover {
background-color: #00B37A;
border : 0;
color : #fff;
}
&-left {
flex : 6;
display : flex;
flex-wrap : wrap;
padding-left: 90px;
&-option {
display : flex;
width : calc(100% / 3);
margin-bottom: 17px;
font-size : 14px;
font-family : PingFangSC-Regular, PingFang SC;
font-weight : 400;
color : #6B778C;
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 { 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 { PlayCircleOutlined, ContainerOutlined } from '@ant-design/icons'
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