Commit e52038b4 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(商家营销活动审核): 修改批量审核接口

parent 7440e1c0
......@@ -7,7 +7,7 @@ export interface ShopInfo {
describe: string;
state: number;
url: string;
isDefault: number;
isDefault?: any;
}
export interface OrderMode {
......@@ -28,7 +28,7 @@ export interface SiteInfo {
name: string;
logo: string;
siteUrl: string;
symbol: string;
symbol?: any;
}
export interface Site {
......
......@@ -15,6 +15,7 @@ const { onFormMount$ } = FormEffectHooks;
const WaitAuditMerchantMarketing = () => {
const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false);
const useStateEffects = () => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
......@@ -28,11 +29,26 @@ const WaitAuditMerchantMarketing = () => {
})
}
const fetchSubmitBatch = async () => {
const res = await PublicApi.postMarketingPlatformMerchantActivityExamineBatch({ ids: rowkeys });
setSubmitLoading(true)
if (res.code !== 1000) {
setSubmitLoading(false)
return
}
setSubmitLoading(false)
ref.current.reload();
setRowKeys([])
}
/* 操作按钮 */
const controllerBtns = (
<Row>
<Col span={6}>
<Button
disabled={rowkeys.length === 0}
loading={submitLoading}
onClick={() => fetchSubmitBatch()}
>
批量提交审核
</Button>
......@@ -98,6 +114,7 @@ const WaitAuditMerchantMarketing = () => {
effects="id"
fetch={PublicApi.getMarketingPlatformMerchantActivityPageTobeExam}
fetchRowkeys={(e) => setRowKeys(e)}
controllerBtns={controllerBtns}
schema={{
type: 'object',
properties: {
......@@ -109,11 +126,8 @@ const WaitAuditMerchantMarketing = () => {
},
properties: {
ctl: {
type: 'object',
"x-component": "Children",
"x-component-props": {
children: controllerBtns
}
type: "object",
"x-component": "controllerBtns",
},
id: {
type: 'string',
......
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