Commit 8d3f53db authored by 前端-李俊鑫's avatar 前端-李俊鑫

商城规则配置-初步

parent 6abb7e58
......@@ -142,6 +142,37 @@ const router = {
component: '@/pages/ruleSettingManage/platformSettlementStrategy/info',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 列表
{
path: '/ruleSettingManager/mallRules',
name: 'mallRulesList',
component: '@/pages/ruleSettingManage/mallRules'
},
// 商城规则配置 - 新增
{
path: '/ruleSettingManager/mallRules/add',
name: 'mallRulesAdd',
component: '@/pages/ruleSettingManage/mallRules/detail',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 查看
{
path: '/ruleSettingManager/mallRules/preview',
name: 'mallRulesDetail',
component: '@/pages/ruleSettingManage/mallRules/preview',
hidePageHeader: true,
hideInMenu: true
},
// 商城规则配置 - 编辑
{
path: '/ruleSettingManager/mallRules/edit',
name: 'mallRulesEdit',
component: '@/pages/ruleSettingManage/mallRules/detail',
hidePageHeader: true,
hideInMenu: true
}
]
}
......
......@@ -11,7 +11,6 @@ import { useTreeTabs } from '@/hooks/useTreeTabs';
import NiceForm from '@/components/NiceForm';
import { GetManageContentCategoryAllResponse } from '@/services/PlatformApi/id8545';
import styles from './index.less';
import Form from '@/pages/pageCustomized/configs/componentConfigs/Ant/Form';
import { BorderOuterOutlined, QuestionCircleOutlined } from '@ant-design/icons';
const { ON_FORM_INPUT_CHANGE } = LifeCycleTypes
......
import React, { Fragment, useEffect, useState } from 'react'
import { Form, Radio, Table, Button } from 'antd';
import { ColumnType } from 'antd/lib/table';
import ModalTable from '@/components/ModalTable'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { PlusOutlined } from '@ant-design/icons';
import LevelBrand from '@/components/LevelBrand';
import StatusSwitch from '@/components/StatusSwitch'
interface Iprops {
rowCtl: (key: string, e) => void,
/** ID */
id?: number
}
const MemberInfo: React.FC<Iprops> = (props: any) => {
const { rowCtl, id } = props;
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' })
const [dataSource, setDataSource] = useState<any>([])
const columns: ColumnType<any>[] = [
{
title: '商城ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '商城名称',
key: 'name',
dataIndex: 'name'
},
{
title: '商城LOGO',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '商城环境',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '商城属性',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '商城地址',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '商城描述',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => handleModify(record)}
record={record}
/>
)
},
{
title: '是否默认',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_text, record) => {
return (
<>
<Button type='link' onClick={() => handleDelect(record.memberId)}>修改</Button>
<Button type='link' onClick={() => handleDelect(record.memberId)}>删除</Button>
</>
)
}
}
]
const columnsSetProduct: any[] = [
{
dataIndex: 'memberId',
title: '商城ID',
key: 'memberId'
},
{
dataIndex: 'name',
title: '商城名称',
key: 'name'
},
{
dataIndex: 'memberTypeName',
title: '商城属性',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '商城环境',
key: 'roleName'
},
{
dataIndex: 'levelTag',
title: '商城域名',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
{
dataIndex: 'roleName',
title: '商城描述',
key: 'roleName'
},
]
const formMember: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商城名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员类型',
}
},
roleId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员角色',
}
},
level: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员等级',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
const handleModify = async (record: any) => {
// await PublicApi.postOrderPlatformPaymentStatus({
// paymentId: record.paymentId,
// status: record.status === 1 ? 0 : 1
// })
// ref.current.reload()
}
/** 删除会员 */
const handleDelect = (id) => {
const data = [...dataSource];
const source = data.filter(item => item.memberId !== id);
setDataSource(source);
rowCtl('malls', source)
}
// 会员弹框筛选select值
const fetchSelectOptions = async () => {
const res = await PublicApi.getMemberManagePageitems({ roleTypeEnum: '1' })
if (res.code === 1000) {
const { data = {} }: any = res
const {
memberTypes = [],
roles = [],
levels = [],
} = data
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
return {}
}
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
const handleCancelAddMember = () => {
setVisibleChannelRroduct(false)
}
const handleOkAddMember = () => {
setVisibleChannelRroduct(false)
setDataSource(memberRowCtl.selectRow)
rowCtl('malls', memberRowCtl.selectRow.map(item => {
return {
memberId: item.memberId,
roleId: item.roleId,
}
}))
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, pageSize: '999', current: '1', name: '' }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res.data;
memberRowCtl.setSelectedRowKeys(data.map(v => v.memberId))
memberRowCtl.setSelectRow(data);
rowCtl('malls', data)
setDataSource(data)
})
}
}, [id])
return (
<Fragment>
<Form.Item name='malls' wrapperCol={{ span: 24 }}>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
onClick={() => setVisibleChannelRroduct(true)}
>
选择商城
</Button>
<Table
pagination={{
size: 'small'
}}
rowKey={record => record.memberId}
columns={columns}
dataSource={dataSource}
/>
</Form.Item>
<ModalTable
modalTitle='选择适用商城'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelRroduct}
columns={columnsSetProduct}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMembersList(params)}
formilyProps={
{
ctx: {
schema: formMember,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'level'],
fetchSelectOptions,
);
}
}
}
}
tableProps={{
rowKey: 'id'
}}
/>
</Fragment>
)
}
export default MemberInfo;
import React, { Fragment, useEffect, useState } from 'react'
import { Form, Radio, Table, Button } from 'antd';
import { ColumnType } from 'antd/lib/table';
import ModalTable from '@/components/ModalTable'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { PublicApi } from '@/services/api';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { PlusOutlined } from '@ant-design/icons';
import LevelBrand from '@/components/LevelBrand';
interface Iprops {
rowCtl: (key: string, e) => void,
/** ID */
id?: number
}
const MemberInfo: React.FC<Iprops> = (props: any) => {
const { rowCtl, id } = props;
const [visibleChannelRroduct, setVisibleChannelRroduct] = useState(false)
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio' })
const [dataSource, setDataSource] = useState<any>([])
const columns: ColumnType<any>[] = [
{
title: 'ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '会员名称',
key: 'name',
dataIndex: 'name'
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag'
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_text, record) => <Button type='link' onClick={() => handleDelect(record.memberId)}>删除</Button>
}
]
const columnsSetProduct: any[] = [
{
dataIndex: 'memberRoleId',
title: 'MRID',
key: 'memberRoleId',
className: 'commonHide'
},
{
dataIndex: 'memberId',
title: 'ID',
key: 'memberId'
},
{
dataIndex: 'name',
title: '会员名称',
key: 'name'
},
{
dataIndex: 'memberTypeName',
title: '会员类型',
key: 'memberTypeName'
},
{
dataIndex: 'roleName',
title: '会员角色',
key: 'roleName'
},
{
dataIndex: 'levelTag',
title: '会员等级',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
]
const formMember: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入会员名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员类型',
}
},
roleId: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员角色',
}
},
level: {
type: 'string',
enum: [],
"x-component-props": {
placeholder: '请选择会员等级',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
/** 删除会员 */
const handleDelect = (id) => {
const data = [...dataSource];
const source = data.filter(item => item.memberId !== id);
setDataSource(source);
rowCtl('members', source)
}
// 会员弹框筛选select值
const fetchSelectOptions = async () => {
const res = await PublicApi.getMemberManagePageitems({ roleTypeEnum: '1' })
if (res.code === 1000) {
const { data = {} }: any = res
const {
memberTypes = [],
roles = [],
levels = [],
} = data
return {
memberTypeId: memberTypes.map(item => ({ label: item.memberTypeName, value: item.memberTypeId })),
roleId: roles.map(item => ({ label: item.roleName, value: item.roleId })),
level: levels.map(item => ({ label: item.levelTag, value: item.level })),
}
}
return {}
}
const fetchMembersList = async (params) => {
const res = await PublicApi.getMemberManageAllProviderPage(params)
const { code, data } = res
let _data = data.data.map(item => ({ ...item, memberRoleId: item.memberId + '_' + item.roleId }))
return { totalCount: data.totalCount, data: _data }
}
const handleCancelAddMember = () => {
setVisibleChannelRroduct(false)
}
const handleOkAddMember = () => {
setVisibleChannelRroduct(false)
setDataSource(memberRowCtl.selectRow)
rowCtl('members', memberRowCtl.selectRow.map(item => {
return {
memberId: item.memberId,
roleId: item.roleId,
}
}))
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, pageSize: '999', current: '1', name: '' }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res.data;
memberRowCtl.setSelectedRowKeys(data.map(v => v.memberId))
memberRowCtl.setSelectRow(data);
rowCtl('members', data)
setDataSource(data)
})
}
}, [id])
return (
<Fragment>
<Form.Item name='members' wrapperCol={{ span: 24 }}>
<Button
type='dashed'
block
icon={<PlusOutlined />}
style={{ marginBottom: '24px' }}
onClick={() => setVisibleChannelRroduct(true)}
>
选择会员
</Button>
<Table
pagination={{
size: 'small'
}}
rowKey={record => record.memberId}
columns={columns}
dataSource={dataSource}
/>
</Form.Item>
<ModalTable
modalTitle='选择适用会员'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelRroduct}
columns={columnsSetProduct}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMembersList(params)}
formilyProps={
{
ctx: {
schema: formMember,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['memberTypeId', 'roleId', 'level'],
fetchSelectOptions,
);
}
}
}
}
tableProps={{
rowKey: 'id'
}}
/>
</Fragment>
)
}
export default MemberInfo;
import React, { useEffect, useState } from 'react';
import { Card, Tabs, Form, Button } from 'antd';
import { history, Prompt } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import Mall from './components/mall';
import Member from './components/member';
import { SaveOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
const layout: any = {
colon: false,
labelCol: { style: { width: "144px" } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const { TabPane } = Tabs;
const PaymentConfigLayout = () => {
const {
query: {
id,
},
pathname,
}: any = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [loading, setLoading] = useState<boolean>(false)
const [unsaved, setUnsaved] = useState<boolean>(false);
const [form] = Form.useForm();
const handleSubmit = () => {
form.validateFields().then(res => {
console.log(`res`, res)
const params: any = {
name: res.name,
}
if (res.members) {
params.members = res.members
}
id && (params.paymentId = id);
return
const fetchApi = id ? PublicApi.postOrderPlatformPaymentUpdate : PublicApi.postOrderPlatformPaymentCreate;
setLoading(true)
fetchApi(params).then(res => {
if (res.code !== 1000) {
setLoading(false);
return
}
setUnsaved(false)
setLoading(false);
history.goBack();
})
})
}
const rowCtl = (key, ctl) => {
form.setFieldsValue({
[key]: ctl
})
}
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentDetail({ paymentId: id }).then(res => {
if (res.code !== 1000) {
return
}
form.setFieldsValue({
...res.data,
})
})
}
}, [])
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button
loading={loading}
type="primary"
onClick={handleSubmit} icon={<SaveOutlined />}
>
保存
</Button>
}
>
<Card>
<Form
form={form}
{...layout}
onValuesChange={() => {
if (!unsaved) {
setUnsaved(true)
}
}}
>
<Tabs>
<TabPane tab='适用会员' key={1} forceRender>
<Member id={id} rowCtl={rowCtl} />
</TabPane>
<TabPane tab='适用商城' key={2} forceRender>
<Mall id={id} rowCtl={rowCtl} />
</TabPane>
</Tabs>
</Form>
</Card>
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
</PageHeaderWrapper>
)
}
export default PaymentConfigLayout;
import React, { useRef, Fragment } from 'react';
import { Card, Button, Popconfirm } from 'antd'
import { history } from 'umi'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import EyePreview from '@/components/EyePreview'
import StatusSwitch from '@/components/StatusSwitch'
import { PlusOutlined } from '@ant-design/icons'
import { PublicApi } from '@/services/api'
import LevelBrand from '@/pages/member/components/LevelBrand'
const List: React.FC<{}> = () => {
const ref = useRef<any>({})
const columns: ColumnType<any>[] = [
{
title: '会员ID',
dataIndex: 'paymentId',
key: 'paymentId',
},
{
title: '会员名称',
dataIndex: 'name',
key: 'name',
render: (text: any, record: any) => (
<EyePreview url={`/ruleSettingManager/mallRules/preview?id=${record.paymentId}`}>
{text}
</EyePreview>
)
},
{
title: '会员类型',
align: 'center',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
// render: (data) => findArrayItem(MEMBER_TYPE_LISTS, data).label
},
{
title: '会员角色',
align: 'center',
dataIndex: 'roleTypeName',
key: 'roleTypeName',
// render: (data) => findArrayItem(MEMBER_ROLE_LISTS, data).label
},
{
title: '会员等级',
align: 'center',
dataIndex: 'levelTag',
key: 'levelTag',
render: (text, record) => <LevelBrand level={record.level} />
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => handleModify(record)}
record={record}
/>
)
},
{
title: '操作',
key: 'operate',
dataIndex: 'operate',
render: (_, record) => !record.status && (
<Fragment>
<Button type='link' onClick={() => history.push(`/ruleSettingManager/mallRules/edit?id=${record.paymentId}`)}>修改</Button>
<Popconfirm
title="确定要执行这个操作?"
onConfirm={() => handleDelete(record.paymentId)}
>
<Button type='link'>删除</Button>
</Popconfirm>
</Fragment>
)
}
]
const handleModify = async (record: any) => {
await PublicApi.postOrderPlatformPaymentStatus({
paymentId: record.paymentId,
status: record.status === 1 ? 0 : 1
})
ref.current.reload()
}
//删除
const handleDelete = async (paymentId) => {
await PublicApi.postOrderPlatformPaymentDelete({ paymentId })
ref.current.reload()
}
const handleToAdd = () => {
history.push('/ruleSettingManager/mallRules/add')
}
const fetchData = (params: any) => {
return new Promise((resolve) => {
PublicApi.getOrderPlatformPaymentPage({ ...params }).then(res => {
resolve(res.data)
})
})
}
return (
<Card>
<StandardTable
currentRef={ref}
tableProps={{ rowKey: 'paymentId' }}
columns={columns}
fetchTableData={(params: any) => fetchData(params)}
formilyLayouts={{
justify: "space-between"
}}
formilyChilds={{
layouts: {
order: 2
},
children:
<Button
style={{ marginBottom: '24px' }}
type="primary"
onClick={handleToAdd}
icon={<PlusOutlined />}
>
新建
</Button>
}}
formilyProps={{
layouts: {
order: 3
},
ctx: {
schema: {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'search',
"x-component-props": {
placeholder: '输入会员名称'
}
}
}
}
}
}}
/>
</Card>
)
}
export default List
import React, { Fragment, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Tabs, Form, Typography, Space } from 'antd';
import { history } from 'umi'
import { PublicApi } from '@/services/api';
import ReutrnEle from '@/components/ReturnEle';
import style from './components/index.less';
import ListLayout from '@/components/DetailLayout/components/listLayout';
import { ColumnType } from 'rc-table/lib/interface';
import { StandardTable } from 'god';
import { isEmpty } from '@formily/shared';
const layout: any = {
colon: false,
labelCol: { style: { width: "144px" } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const { TabPane } = Tabs;
type GetOrderPlatformPaymentDetailResponse = {
/**
* 支付策略Id
*/
paymentId: number
/**
* 指定会员
*/
allMembers?: boolean,
/**
* 支付策略名称
*/
name: string
/**
* 支付方式与支付渠道列表 ,PlatformPaymentPayTypeDetailVO
*/
payTypes: {
/**
* 支付方式枚举
*/
payType: number
/**
* 支付方式名称
*/
payTypeName: string
/**
* 资金归集模式列表 ,PlatformPaymentFundModeVO
*/
fundModes: {
/**
* 资金归集模式枚举
*/
fundMode?: number
/**
* 资金归集模式名称
*/
fundModeName?: string
}[]
/**
* 已选择的资金归集模式枚举值
*/
fundMode: number
/**
* 支付渠道列表 ,PlatformPaymentPayChannelVO
*/
channels: {
/**
* 支付渠道类型枚举
*/
payChannel?: number
/**
* 支付渠道类型名称
*/
payChannelName?: string
}[]
/**
* 已选择的支付渠道枚举值列表 ,Integer
*/
payChannels: number[]
}[]
}
const Preview = () => {
const {
query: {
id,
},
}: any = history.location;
const [data, setData] = useState<GetOrderPlatformPaymentDetailResponse>();
useEffect(() => {
if (id) {
PublicApi.getOrderPlatformPaymentDetail({ paymentId: id }).then(res => {
if (res.code !== 1000) {
return
}
const { data } = res;
setData(data)
})
}
}, [])
const columns: any[] = [
{
title: 'ID',
key: 'memberId',
dataIndex: 'memberId'
},
{
title: '会员名称',
key: 'name',
dataIndex: 'name'
},
{
title: '会员类型',
key: 'memberTypeName',
dataIndex: 'memberTypeName'
},
{
title: '会员角色',
key: 'roleName',
dataIndex: 'roleName'
},
{
title: '会员等级',
key: 'levelTag',
dataIndex: 'levelTag'
},
]
const fetchTableData = (params) => {
return new Promise(resolve => {
PublicApi.getOrderPlatformPaymentMemberPage({ paymentId: id, ...params }).then(res => {
if (res.code !== 1000) {
return
}
resolve(res.data);
})
})
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
>
<Card>
<Form
{...layout}
>
<Tabs>
<TabPane tab='适用会员' key={1} forceRender>
<StandardTable
columns={columns}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchTableData(params)}
/>
</TabPane>
<TabPane tab='适用商城' key={2} forceRender>
<StandardTable
columns={columns}
tableProps={{ rowKey: 'id' }}
fetchTableData={(params: any) => fetchTableData(params)}
/>
</TabPane>
</Tabs>
</Form>
</Card>
</PageHeaderWrapper>
)
}
export default Preview;
......@@ -2825,6 +2825,16 @@
lodash "^4.17.15"
redux "^4.0.5"
"@lingxi-disign/core@^1.0.5":
version "1.0.5"
resolved "http://10.0.0.19:4873/@lingxi-disign%2fcore/-/core-1.0.5.tgz#a3c5011283c87bb26ef1b776838db88e56cdacb0"
integrity sha512-NHQe4OkbBEoP0Uv29PuSyf5dzjhaNunshVsgqfyD3Hc47eAyw69i8xtpgg4MGddX95wJRDFirXHegkwWx7Um4Q==
dependencies:
"@lingxi-disign/utils" "^1.0.0"
immer "^6.0.5"
lodash "^4.17.15"
redux "^4.0.5"
"@lingxi-disign/hooks@^1.0.0", "@lingxi-disign/hooks@^1.0.0-alpha.16":
version "1.0.0"
resolved "http://10.0.0.19:4873/@lingxi-disign%2fhooks/-/hooks-1.0.0.tgz#5a273ac4014a8019ceeb4ef8829fa36f23934510"
......@@ -2865,12 +2875,12 @@
react-dom "^17.0.2"
sortablejs "^1.10.2"
"@lingxi-disign/react@^1.0.4":
version "1.0.4"
resolved "http://10.0.0.19:4873/@lingxi-disign%2freact/-/react-1.0.4.tgz#31b5fe11e4964a5390e6814da3ae83bda0e92d5b"
integrity sha512-lEZR0kzcWnp0rYwHAX0h2x9lW5cPBz7VzgKQWVA7kfY51uSspOiWqAiB8zBsLH5idQU/AV6+9K78TenrHuOKwg==
"@lingxi-disign/react@^1.0.5":
version "1.0.5"
resolved "http://10.0.0.19:4873/@lingxi-disign%2freact/-/react-1.0.5.tgz#0963c072f367ccd35853968d326c58ad1cef289a"
integrity sha512-PLrSiRfqQ5z32McL5naiK32XRd2qBGSNgmyQ6xCxSRGOsHYG9gpwchBJz3kuPetYwp4Pg0uTOnHBl+hC0tZOxQ==
dependencies:
"@lingxi-disign/core" "^1.0.1"
"@lingxi-disign/core" "^1.0.4"
"@lingxi-disign/hooks" "^1.0.0"
"@lingxi-disign/utils" "^1.0.0"
html2canvas "^1.0.0-rc.7"
......
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