Commit 029b6622 authored by tjy's avatar tjy

会员导入列表调整

parent fba2bc2a
......@@ -27,7 +27,7 @@
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7",
"god": "0.1.0",
"god": "0.1.7",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
import React, { useState, useRef } from 'react'
import React, { useState, useRef, Children } from 'react'
import { history } from 'umi'
import { Button, Form, Card, Modal, Result, Progress, Select } from 'antd'
import { Button, Card, Dropdown, Menu } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
FileExcelOutlined,
EyeOutlined
EyeOutlined,
DeleteOutlined,
DownOutlined
} 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 { Input, TimePicker, DatePicker } from '@formily/antd-components'
import 'antd/dist/antd.css'
import './index.less'
const data = [
......@@ -47,9 +49,6 @@ const data = [
externalStatus: '待提交',
}
]
const handleSubmit = (record: any) => {
console.log(record)
}
const memberImport: React.FC<{}> = () => {
const ref = useRef({})
......@@ -122,81 +121,13 @@ const memberImport: React.FC<{}> = () => {
}
];
const search: IFormFilter[] = [
{
type: 'Input',
value: 'keywords',
col: 4,
placeHolder: '货号'
},
{
type: 'Input',
value: 'name',
col: 4,
placeHolder: '货品名称'
},
{
type: 'Input',
value: 'brand',
col: 4,
placeHolder: '品牌'
},
{
type: 'Input',
value: 'type',
col: 4,
placeHolder: '品类'
},
{
type: 'Input',
value: 'num',
col: 4,
placeHolder: '导入批次'
},
]
const searchBarActions: IButtonFilter[] = [
{
text: '查询',
handler: () => {
console.log('查询')
}
},
{
text: '重置',
handler: () => {
console.log('重置')
}
},
{
type: 'primary',
text: '新建',
icon: <PlusOutlined />,
handler: () => {
history.push('/commodity/goods/addGoods')
}
},
{
text: '导入数据',
handler: () => {
console.log('导入')
// setImportModal(true)
}
},
{
text: '批量删除',
handler: () => {
console.log('删除')
}
},
{
text: '删除导入批次',
handler: () => {
// setDeleteBatchModal(true)
console.log('删除导入')
}
},
]
const menu = (
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
删除导入批次
</Menu.Item>
</Menu>
)
const rowSelection = {
selectedRowKeys: selectedRowKeys,
......@@ -223,6 +154,14 @@ const memberImport: React.FC<{}> = () => {
console.log('see')
}
const handleMenuClick = (e: any) => {
console.log('menu', e);
}
const handleButtonClick = (e: any) => {
console.log('button', e);
}
return (
<PageHeaderWrapper>
<Card>
......@@ -231,8 +170,48 @@ const memberImport: React.FC<{}> = () => {
currentRef={ref}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
formFilters={search}
buttonFilters={searchBarActions}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
layouts: {
order: 1
},
ctx: {
schema: {
type: 'object',
properties: {
keywords: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索'
},
}
}
}
}
}}
formilyChilds={
{
layouts: {
order: 0
},
children: (
<>
<Button type='primary'><PlusOutlined />新建</Button>
<Button>导入</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</>
)
}
}
/>
</Card>
</PageHeaderWrapper >
......
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