Commit 3f08e5c6 authored by tjy's avatar tjy

调整

parent b60cfb09
This diff is collapsed.
......@@ -10,7 +10,6 @@ import {
Select,
Input,
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
EyeOutlined,
UpOutlined,
......@@ -374,7 +373,6 @@ const auditList: React.FC<PageProps> = props => {
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
columns={columns}
......@@ -534,7 +532,6 @@ const auditList: React.FC<PageProps> = props => {
}
/>
</Card>
</PageHeaderWrapper>
);
};
......
......@@ -57,7 +57,7 @@
color : #6B778C;
&:nth-last-of-type(1) {
flex : 2.5;
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #172B4D;
......@@ -202,9 +202,3 @@
background : @main-color;
margin-left: 10px;
}
\ No newline at end of file
.count{
font-weight: 500;
color: #172B4D;
font-size: 24px;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,14 @@
}
}
.select {
.subRow {
width: 100%;
.subCol {
width : 100%;
text-align: right;
.select {
width : 160px;
margin : 0 0 16px 16px;
text-align: left;
......@@ -14,6 +21,8 @@
&:nth-of-type(1) {
margin-left: 0;
}
}
}
}
.nameCell {
......
......@@ -10,8 +10,8 @@ import {
Menu,
Row,
Col,
Popconfirm,
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined,
EyeOutlined,
......@@ -76,9 +76,40 @@ const memberImport: React.FC<{}> = () => {
memberStatus: '',
TimeRange: '',
});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]);
const [visibleModal, setVisibleModal] = useState(false);
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]);
const onClick = ({ key }) => {
if (key === '1') {
console.log('删除');
} else {
console.log('查看');
}
};
const moreMenu = (
<Menu onClick={onClick}>
<Menu.Item key="1">
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否">
<Button type="link">删除</Button>
</Popconfirm>
</Menu.Item>
<Menu.Item key="2">
<Button
type="link"
onClick={() =>
history.push(
'/memberCenter/memberAbility/manage/addMember?type=check',
)
}
>
查看
</Button>
</Menu.Item>
</Menu>
);
const columns: ColumnType<any>[] = [
{
title: 'ID',
......@@ -111,6 +142,7 @@ const memberImport: React.FC<{}> = () => {
dataIndex: 'type',
align: 'center',
key: 'type',
filtered: true,
},
{
title: '会员角色',
......@@ -147,12 +179,19 @@ const memberImport: React.FC<{}> = () => {
<Button
type="link"
onClick={() =>
history.push('/memberCenter/memberAbility/manage/addMember')
history.push(
'/memberCenter/memberAbility/manage/addMember?type=change',
)
}
>
编辑
</Button>
<Button type="link">更多</Button>
<Dropdown overlay={moreMenu} trigger={['click']}>
<Button type="link" onClick={e => e.preventDefault()}>
更多
<DownOutlined />
</Button>
</Dropdown>
</>
);
},
......@@ -169,13 +208,7 @@ const memberImport: React.FC<{}> = () => {
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
'selectedRows: ',
selectedRows,
);
},
onChange: (selectedRowKeys: any, selectedRows: any) => {},
};
// 模拟请求
......@@ -192,11 +225,12 @@ const memberImport: React.FC<{}> = () => {
});
};
const handleSee = (record: any) => {
console.log('see');
};
const handleSee = (record: any) => {};
const handleSearch = () => {};
const handleSearch = () => {
//@ts-ignore
ref.current.reload();
};
const handleReset = () => {
for (let key in searchForm) {
......@@ -210,7 +244,6 @@ const memberImport: React.FC<{}> = () => {
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
......@@ -224,7 +257,9 @@ const memberImport: React.FC<{}> = () => {
<Button
type="primary"
onClick={() =>
history.push('/memberCenter/memberAbility/manage/addMember')
history.push(
'/memberCenter/memberAbility/manage/addMember?type=add',
)
}
>
<PlusOutlined />
......@@ -277,8 +312,8 @@ const memberImport: React.FC<{}> = () => {
<Button onClick={() => handleReset()}>重置</Button>
</Col>
{isSearch ? (
<Row className={style.row}>
<Col className={style.col}>
<Row className={style.subRow}>
<Col className={style.subCol}>
<Select
className={style.select}
value={searchForm.memberType}
......@@ -385,13 +420,12 @@ const memberImport: React.FC<{}> = () => {
</Row>
}
/>
</Card>
<UploadModal
visibleModal={visibleModal}
fileText="会员资料"
onCancel={() => setVisibleModal(false)}
/>
</PageHeaderWrapper>
</Card>
);
};
......
import React, { ReactNode, useState, useRef, useEffect } from 'react';
import { history } from 'umi';
import { Row, Col, Tooltip, Button, Popconfirm, Card, Input } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlayCircleOutlined,
PauseCircleOutlined,
......@@ -189,13 +188,13 @@ const memberLevel: React.FC<[]> = () => {
// 模拟请求
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.postMemberManageLevelPage({
levelTag: '',
memberLevelTypeEnum: '',
roleName: '',
current: params.page,
pageSize: params.rows,
}).then(res => {});
PublicApi.getMemberManageLevelPage({
cond: '',
current: params.current,
pageSize: params.pageSize,
}).then(res => {
resolve(res.data);
});
});
};
......@@ -223,13 +222,13 @@ const memberLevel: React.FC<[]> = () => {
const handleReset = () => {};
const handleSet = (record: any) => {
history.push('/memberCenter/memberAbility/manage/level/addEquity');
history.push('/memberAbility/manage/level/addEquity');
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
......@@ -253,10 +252,7 @@ const memberLevel: React.FC<[]> = () => {
onSearch={() => handleSearch}
/>
</Tooltip>
<Button
className={style.resetBtn}
onClick={() => handleReset()}
>
<Button className={style.resetBtn} onClick={() => handleReset()}>
重置
</Button>
</Col>
......@@ -264,7 +260,6 @@ const memberLevel: React.FC<[]> = () => {
}
/>
</Card>
</PageHeaderWrapper>
);
};
......
This diff is collapsed.
import React, { useState, useRef, ReactNode } from 'react'
import { history } from 'umi'
import { Card, Input, Button } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { ContainerOutlined } from '@ant-design/icons'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableController'
import './index.less'
import React, { useState, useRef, ReactNode } from 'react';
import { history } from 'umi';
import { Card, Input, Button } from 'antd';
import { ContainerOutlined } from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import './index.less';
import { PublicApi } from '@/services/api';
const data = [
{
......@@ -15,7 +18,7 @@ const data = [
rule: 1,
explain: '完成交易订单后,按照交易订单金额的百分比记入获取的升级分值',
type: '商户会员',
score: ''
score: '',
},
{
key: '2',
......@@ -23,7 +26,7 @@ const data = [
rule: 1,
explain: '完成交易订单后,按照交易订单金额的百分比记入获取的升级分值',
type: '渠道会员',
score: ''
score: '',
},
{
key: '3',
......@@ -31,7 +34,7 @@ const data = [
rule: 2,
explain: '完成交易订单后,按照交易订单金额的百分比记入获取的升级分值',
type: '商户会员',
score: ''
score: '',
},
{
key: '4',
......@@ -39,12 +42,12 @@ const data = [
rule: 3,
explain: '完成交易订单后,按照交易订单金额的百分比记入获取的升级分值',
type: '商户会员',
score: ''
score: '',
},
]
];
const memberUpgradeRule: React.FC<[]> = () => {
const ref = useRef({})
const ref = useRef({});
const columns: ColumnType<any>[] = [
{
......@@ -58,7 +61,11 @@ const memberUpgradeRule: React.FC<[]> = () => {
dataIndex: 'rule',
align: 'center',
key: 'rule',
render: (text: any, record: any) => <span>{record.rule === 1 ? '交易' : record.rule === 2 ? '评价' : '登录'}</span>
render: (text: any, record: any) => (
<span>
{record.rule === 1 ? '交易' : record.rule === 2 ? '评价' : '登录'}
</span>
),
},
{
title: '升级规则说明',
......@@ -78,43 +85,41 @@ const memberUpgradeRule: React.FC<[]> = () => {
align: 'center',
key: 'score',
render: (text: any, record: any) => {
let component: ReactNode = null
component = (
record.rule === 1 ? <Input addonAfter="%" defaultValue={record.score} /> : <Input defaultValue={record.score} />
)
return component
}
}
let component: ReactNode = null;
component =
record.rule === 1 ? (
<Input addonAfter="%" defaultValue={record.score} />
) : (
<Input defaultValue={record.score} />
);
return component;
},
},
];
// 模拟请求
const fetchData = (params: any) => {
console.log(params);
return new Promise((resolve, reject) => {
// getUpgradeRuleList(params).then(res => {
// })
const queryResult = data.find(v => v.key === params.keywords)
setTimeout(() => {
resolve({
code: 200,
message: '',
data: queryResult ? [queryResult] : data
})
}, 1000)
})
}
PublicApi.getMemberManageLevelRulePage({
current: params.current,
pageSize: params.pageSize,
}).then(res => {
resolve(res.data);
});
});
};
return (
<PageHeaderWrapper extra={[<Button className='saveBtn' icon={<ContainerOutlined />}>保存</Button>]}>
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} />
fetchTableData={(params: any) => fetchData(params)}
/>
</Card>
</PageHeaderWrapper>
)
}
);
};
export default memberUpgradeRule
\ No newline at end of file
export default memberUpgradeRule;
This source diff could not be displayed because it is too large. You can view the blob instead.
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