Commit 60fea057 authored by XieZhiXiong's avatar XieZhiXiong
parents 6874031a df6b2f11
...@@ -3,62 +3,74 @@ ...@@ -3,62 +3,74 @@
* @Date: 2020-08-27 16:27:53 * @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com * @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-04 17:01:46 * @LastEditTime: 2020-09-09 19:50:54
*/ */
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import moment from 'moment' import moment from 'moment'
export const dockingColumn: ColumnType<any>[] = [ export const dockingColumn = (children?) => {
{ let columns: ColumnType<any>[] = []
title: '序号', columns =
dataIndex: 'id', [
align: 'center', {
key: 'id', title: '序号',
}, dataIndex: 'id',
{ align: 'center',
title: '会员名称', key: 'id',
dataIndex: 'memberName', },
key: 'memberName', {
align: 'left' title: '会员名称',
}, dataIndex: 'memberName',
key: 'memberName',
{ align: 'left'
title: '会员类型', },
dataIndex: 'memberTypeName',
key: 'memberTypeName', {
align: 'center' title: '会员类型',
}, dataIndex: 'memberTypeName',
{ key: 'memberTypeName',
title: '会员角色', align: 'center'
dataIndex: 'roleName', },
key: 'roleName', {
align: 'center' title: '会员角色',
}, dataIndex: 'roleName',
{ key: 'roleName',
title: '会员等级', align: 'center'
dataIndex: 'levelTag', },
key: 'levelTag', {
align: 'center' title: '会员等级',
}, dataIndex: 'levelTag',
{ key: 'levelTag',
title: '是否归属会员', align: 'center'
dataIndex: 'membershipOrNot', },
key: 'membershipOrNot', {
align: 'center', title: '是否归属会员',
render:(text:any) => ( dataIndex: 'membershipOrNot',
text == 0 ?'否':'是' key: 'membershipOrNot',
) align: 'center',
}, render:(text:any) => (
text == 0 ?'否':'是'
{ )
title: '需求发送状态', },
dataIndex: 'state',
key: 'state', {
align: 'center', title: '需求发送状态',
render:(text:any) => ( dataIndex: 'state',
text == 0 ? '未发生需求':'已发送需求' key: 'state',
) align: 'center',
} render:(text:any,records,index) => children? children(text,records,index) :''
] },
{
title: '操作',
dataIndex: 'option',
key: 'option',
align: 'center',
render:(text:any) => (
'进入店铺'
)
}
]
return columns
}
export const memberColumn = (children?) => { export const memberColumn = (children?) => {
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
* @Date: 2020-08-24 11:32:05 * @Date: 2020-08-24 11:32:05
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com * @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-09 14:36:46 * @LastEditTime: 2020-09-09 19:55:49
*/ */
import React, { Component, useEffect, useState, ReactNode, useRef } from 'react'; import React, { Component, useEffect, useState, ReactNode, useRef } from 'react';
import { Row, Col, Modal, Table, Tooltip, Input, Select, Button, Popconfirm, Card, Tag, Badge, Steps, Tabs, } from 'antd' import { Row, Col, Modal, Table, Tooltip, Input, Select,Switch, Button, Popconfirm, Card, Tag, Badge, Steps, Tabs, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons' import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god' import { StandardTable } from 'god'
...@@ -214,6 +214,11 @@ const detailInfo: React.FC<{}> = () => { ...@@ -214,6 +214,11 @@ const detailInfo: React.FC<{}> = () => {
} }
]; ];
const switchState = (text, record, index) => {
return <Switch disabled defaultChecked={text ? true : false} size="small" />
}
/** /**
* @description: 打开商品弹窗 * @description: 打开商品弹窗
* @param {type} * @param {type}
...@@ -660,7 +665,7 @@ const detailInfo: React.FC<{}> = () => { ...@@ -660,7 +665,7 @@ const detailInfo: React.FC<{}> = () => {
<StandardTable <StandardTable
tableProps={{ rowKey: 'id' }} tableProps={{ rowKey: 'id' }}
currentRef={ref} currentRef={ref}
columns={dockingColumn} columns={dockingColumn(switchState)}
fetchTableData={(params: any) => fetchDockingData(params)} fetchTableData={(params: any) => fetchDockingData(params)}
/> />
......
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