Commit 3f08e5c6 authored by tjy's avatar tjy

调整

parent b60cfb09
This diff is collapsed.
This diff is collapsed.
......@@ -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;
......@@ -201,10 +201,4 @@
color : #fff;
background : @main-color;
margin-left: 10px;
}
.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,13 +6,22 @@
}
}
.select {
width : 160px;
margin : 0 0 16px 16px;
text-align: left;
.subRow {
width: 100%;
.subCol {
width : 100%;
text-align: right;
&:nth-of-type(1) {
margin-left: 0;
.select {
width : 160px;
margin : 0 0 16px 16px;
text-align: left;
&:nth-of-type(1) {
margin-left: 0;
}
}
}
}
......@@ -109,4 +118,4 @@
font-size : 14px;
font-family : SimSun, sans-serif;
line-height : 1;
}
}
\ No newline at end of file
This diff is collapsed.
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,48 +222,44 @@ 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
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<Row>
<Col className={style.col} span={12} offset={12}>
<Tooltip
trigger={['focus']}
placement="top"
title={
<span>
输入ID、会员等级、会员角色名称&nbsp;&nbsp;进行搜索
</span>
}
>
<Input.Search
style={{ width: '232px' }}
value={keywords}
placeholder="搜索"
onChange={e => setKeywords(e.target.value)}
onSearch={() => handleSearch}
/>
</Tooltip>
<Button
className={style.resetBtn}
onClick={() => handleReset()}
>
重置
</Button>
</Col>
</Row>
}
/>
</Card>
</PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<Row>
<Col className={style.col} span={12} offset={12}>
<Tooltip
trigger={['focus']}
placement="top"
title={
<span>
输入ID、会员等级、会员角色名称&nbsp;&nbsp;进行搜索
</span>
}
>
<Input.Search
style={{ width: '232px' }}
value={keywords}
placeholder="搜索"
onChange={e => setKeywords(e.target.value)}
onSearch={() => handleSearch}
/>
</Tooltip>
<Button className={style.resetBtn} onClick={() => handleReset()}>
重置
</Button>
</Col>
</Row>
}
/>
</Card>
);
};
......
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
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} />
</Card>
</PageHeaderWrapper>
)
}
<Card>
<StandardTable
tableProps={{ rowKey: 'id' }}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
/>
</Card>
);
};
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