Commit 9ea5327f authored by GuanHua's avatar GuanHua
parents d6da9da5 b37a6aee
import React, { useRef, useState, useImperativeHandle } from 'react'; import React, { useRef, useState, useImperativeHandle, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd'; import { Card } from 'antd';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
...@@ -52,13 +52,7 @@ const Table: React.FC<Iprops> = (props: any) => { ...@@ -52,13 +52,7 @@ const Table: React.FC<Iprops> = (props: any) => {
useStateEffects useStateEffects
} = props; } = props;
const tableRef = useRef<any>({}); const tableRef = useRef<any>({});
const [selectRow, selectRowFns] = useRowSelectionTable({ const [selectRow, selectRowFns] = useRowSelectionTable();
extendsSelection: {
onChange: () => {
fetchRowkeys(selectRowFns.selectedRowKeys)
},
}
});
/** 列表数据 */ /** 列表数据 */
const fetchData = (params?: any) => { const fetchData = (params?: any) => {
...@@ -102,6 +96,10 @@ const Table: React.FC<Iprops> = (props: any) => { ...@@ -102,6 +96,10 @@ const Table: React.FC<Iprops> = (props: any) => {
} }
useEffect(() => {
fetchRowkeys && fetchRowkeys(selectRowFns.selectedRowKeys)
}, [selectRowFns])
return ( return (
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
......
...@@ -24,7 +24,7 @@ const WaitAddedMarketing = () => { ...@@ -24,7 +24,7 @@ const WaitAddedMarketing = () => {
if (id) { if (id) {
res = await PublicApi.postMarketingPlatformActivitySubmit({ id: Number(id) }) res = await PublicApi.postMarketingPlatformActivitySubmit({ id: Number(id) })
} else { } else {
// res = await PublicApi.postPurchasePurchaseInquirySubmitBatch({ ids: rowkeys }); res = await PublicApi.postMarketingPlatformActivitySubmitBatch({ ids: rowkeys });
} }
if (res.code === 1000) { if (res.code === 1000) {
ref.current.reload(); ref.current.reload();
...@@ -263,14 +263,14 @@ const WaitAddedMarketing = () => { ...@@ -263,14 +263,14 @@ const WaitAddedMarketing = () => {
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
loading={loading} loading={loading}
onClick={() => fetchDeleteBatch()} onClick={() => fetchDeleteBatch()}
disabled={rowkeys.length !== 0} disabled={rowkeys.length === 0}
> >
批量删除 批量删除
</Button> </Button>
<Button <Button
loading={loading} loading={loading}
onClick={() => fetchSubmitBatch()} onClick={() => fetchSubmitBatch()}
disabled={rowkeys.length !== 0} disabled={rowkeys.length === 0}
> >
批量提交审核 批量提交审核
</Button> </Button>
......
...@@ -162,6 +162,15 @@ const MerchantMarketingSearch = () => { ...@@ -162,6 +162,15 @@ const MerchantMarketingSearch = () => {
}, },
enum: [], enum: [],
}, },
memberName: {
type: 'string',
'x-component-props': {
placeholder: '会员名称',
style: {
width: 160,
},
},
},
} }
}, },
sumbit: { sumbit: {
......
...@@ -175,6 +175,15 @@ const WaitAuditMerchantMarketing = () => { ...@@ -175,6 +175,15 @@ const WaitAuditMerchantMarketing = () => {
}, },
enum: [], enum: [],
}, },
memberName: {
type: 'string',
'x-component-props': {
placeholder: '会员名称',
style: {
width: 160,
},
},
},
} }
}, },
sumbit: { sumbit: {
......
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