Commit 60fea057 authored by XieZhiXiong's avatar XieZhiXiong
parents 6874031a df6b2f11
......@@ -3,62 +3,74 @@
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @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 moment from 'moment'
export const dockingColumn: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '会员名称',
dataIndex: 'memberName',
key: 'memberName',
align: 'left'
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
align: 'center'
},
{
title: '会员角色',
dataIndex: 'roleName',
key: 'roleName',
align: 'center'
},
{
title: '会员等级',
dataIndex: 'levelTag',
key: 'levelTag',
align: 'center'
},
{
title: '是否归属会员',
dataIndex: 'membershipOrNot',
key: 'membershipOrNot',
align: 'center',
render:(text:any) => (
text == 0 ?'否':'是'
)
},
{
title: '需求发送状态',
dataIndex: 'state',
key: 'state',
align: 'center',
render:(text:any) => (
text == 0 ? '未发生需求':'已发送需求'
)
}
]
export const dockingColumn = (children?) => {
let columns: ColumnType<any>[] = []
columns =
[
{
title: '序号',
dataIndex: 'id',
align: 'center',
key: 'id',
},
{
title: '会员名称',
dataIndex: 'memberName',
key: 'memberName',
align: 'left'
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
align: 'center'
},
{
title: '会员角色',
dataIndex: 'roleName',
key: 'roleName',
align: 'center'
},
{
title: '会员等级',
dataIndex: 'levelTag',
key: 'levelTag',
align: 'center'
},
{
title: '是否归属会员',
dataIndex: 'membershipOrNot',
key: 'membershipOrNot',
align: 'center',
render:(text:any) => (
text == 0 ?'否':'是'
)
},
{
title: '需求发送状态',
dataIndex: 'state',
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?) => {
......
......@@ -3,10 +3,10 @@
* @Date: 2020-08-24 11:32:05
* @LastEditors: LeeJiancong
* @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 { 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 { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god'
......@@ -214,6 +214,11 @@ const detailInfo: React.FC<{}> = () => {
}
];
const switchState = (text, record, index) => {
return <Switch disabled defaultChecked={text ? true : false} size="small" />
}
/**
* @description: 打开商品弹窗
* @param {type}
......@@ -660,7 +665,7 @@ const detailInfo: React.FC<{}> = () => {
<StandardTable
tableProps={{ rowKey: 'id' }}
currentRef={ref}
columns={dockingColumn}
columns={dockingColumn(switchState)}
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