Commit bae7094c authored by XieZhiXiong's avatar XieZhiXiong
parents a4ba0c61 ab074862
...@@ -40,7 +40,7 @@ export const paltformSignRoute = [ ...@@ -40,7 +40,7 @@ export const paltformSignRoute = [
}, },
// 修改报名资料 // 修改报名资料
{ {
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/modify', path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit',
name: '修改报名资料', name: '修改报名资料',
component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add', component: '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add',
hideInMenu: true, hideInMenu: true,
...@@ -54,6 +54,14 @@ export const paltformSignRoute = [ ...@@ -54,6 +54,14 @@ export const paltformSignRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// 待提交审核报名资料详情
{
path: '/memberCenter/marketingAbility/paltformSign/readySubmitExamine/detail',
name: '待提交审核报名资料详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (一级) // 待审核报名资料 (一级)
{ {
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne', path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne',
...@@ -68,6 +76,13 @@ export const paltformSignRoute = [ ...@@ -68,6 +76,13 @@ export const paltformSignRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail',
name: '待审核报名资料 (一级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待审核报名资料 (二级) // 待审核报名资料 (二级)
{ {
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo', path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo',
...@@ -82,6 +97,13 @@ export const paltformSignRoute = [ ...@@ -82,6 +97,13 @@ export const paltformSignRoute = [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
{
path: '/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail',
name: '待审核报名资料 (二级)详情',
component: '@/pages/transaction/marketingAbility/paltformSign/detail',
hideInMenu: true,
noMargin: true,
},
// 待提交报名资料 // 待提交报名资料
{ {
path: '/memberCenter/marketingAbility/paltformSign/readySubmit', path: '/memberCenter/marketingAbility/paltformSign/readySubmit',
......
import React, { useEffect } from 'react'; import React, { useEffect, useState } from 'react';
import { Modal } from 'antd'; import { Modal } from 'antd';
import { import {
SchemaForm, SchemaMarkupField as Field, SchemaForm, SchemaMarkupField as Field,
...@@ -19,7 +19,7 @@ export interface IProps { ...@@ -19,7 +19,7 @@ export interface IProps {
visible: boolean, visible: boolean,
data?: any, data?: any,
id: number, id: number,
modalType: 'audit' | 'abandon' | 'date' | 'next' | 'key' | 'discard' | 'planAudit' | 'billBack', modalType: 'audit' | 'abandon' | 'date' | 'next' | 'key' | 'discard' | 'planAudit' | 'billBack' | 'merkeingAudit',
onCancel?: () => void, onCancel?: () => void,
onOk?: () => void, onOk?: () => void,
fetch?: () => Promise<unknown>, fetch?: () => Promise<unknown>,
...@@ -39,6 +39,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -39,6 +39,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
maxNumber, maxNumber,
} = props; } = props;
const [loading, setLoading] = useState<boolean>(false);
const useFormEffects = () => { const useFormEffects = () => {
const { setFieldState } = createFormActions() const { setFieldState } = createFormActions()
if (modalType === 'audit') { if (modalType === 'audit') {
...@@ -63,6 +64,19 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -63,6 +64,19 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
}) })
}) })
} }
if (modalType === 'merkeingAudit') {
onFieldChange$('agree').subscribe(({ value }) => {
setFieldState('reason', state => {
if (value == 1) {
state.visible = false
} else {
state.visible = true
}
})
})
}
if (modalType === 'date') { if (modalType === 'date') {
onFieldChange$('checkbox').subscribe(({ value }) => { onFieldChange$('checkbox').subscribe(({ value }) => {
if (value && value.length > 0) { if (value && value.length > 0) {
...@@ -189,6 +203,18 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -189,6 +203,18 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
x-component="Radio" x-component="Radio"
x-component-props={{}} x-component-props={{}}
/> />
case 'merkeingAudit':
return <Field
enum={
[
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 }
]}
name='agree'
required
x-component="Radio"
x-component-props={{}}
/>
} }
} }
...@@ -208,6 +234,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -208,6 +234,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
const handleSubmit = (val: any) => { const handleSubmit = (val: any) => {
let value = { ...val } let value = { ...val }
let params: any = {} let params: any = {}
setLoading(true)
if (modalType === 'audit') { if (modalType === 'audit') {
params.state = value.state; params.state = value.state;
value.state !== 1 && (params.auditOpinion = value.auditOpinion); value.state !== 1 && (params.auditOpinion = value.auditOpinion);
...@@ -228,13 +255,18 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -228,13 +255,18 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
} else if (modalType === 'billBack') { } else if (modalType === 'billBack') {
params.status = 0; params.status = 0;
params.cause = value.cause; params.cause = value.cause;
} else if (modalType === 'merkeingAudit') {
params.agree = value.agree;
params.reason = value.reason;
} else { } else {
params.password = value.password; params.password = value.password;
} }
fetch({ id, ...params }).then(res => { fetch({ id, ...params }).then(res => {
if (res.code === 1000) { if (res.code !== 1000) {
onOk && onOk() setLoading(false)
return
} }
onOk && onOk()
}) })
} }
...@@ -260,6 +292,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -260,6 +292,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
title={title} title={title}
visible={visible} visible={visible}
onCancel={handleClose} onCancel={handleClose}
confirmLoading={loading}
onOk={() => actions.submit()} onOk={() => actions.submit()}
afterClose={() => actions.reset()} afterClose={() => actions.reset()}
> >
...@@ -280,11 +313,12 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -280,11 +313,12 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
onSubmit={(values) => handleSubmit(values)} onSubmit={(values) => handleSubmit(values)}
initialValues={{ initialValues={{
state: 1, state: 1,
status: 1 status: 1,
agree: 1,
}} }}
> >
{modalNode()} {modalNode()}
{(modalType === 'audit' || modalType === 'abandon' || modalType === 'discard' || modalType === 'planAudit' || modalType === 'billBack') {(modalType === 'audit' || modalType === 'abandon' || modalType === 'discard' || modalType === 'planAudit' || modalType === 'billBack' || modalType === 'merkeingAudit')
&& (<Field && (<Field
title={modalText()} title={modalText()}
name={causeName(modalType)} name={causeName(modalType)}
......
import React, { useState, useEffect, useMemo } from 'react'; import React, { useState, useEffect, useMemo, useRef } from 'react';
import { Card, Spin, Button } from 'antd'; import { Card, Spin, Button } from 'antd';
import { history, Prompt } from 'umi'; import { history, Prompt } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
...@@ -44,6 +44,7 @@ interface AddressFormProps { ...@@ -44,6 +44,7 @@ interface AddressFormProps {
}; };
const AddressForm: React.FC<AddressFormProps> = (props: any) => { const AddressForm: React.FC<AddressFormProps> = (props: any) => {
const addressData = useRef<any[]>([])
const { id, isEdit, title, fetch, schema, detail } = props; const { id, isEdit, title, fetch, schema, detail } = props;
const [submitLoading, setSubmitLoading] = useState(false); const [submitLoading, setSubmitLoading] = useState(false);
const [unsaved, setUnsaved] = useState(false); const [unsaved, setUnsaved] = useState(false);
...@@ -56,48 +57,6 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => { ...@@ -56,48 +57,6 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
return data; return data;
}; };
/** 获取地区地址 */
const handleAddressSelesed = async () => {
await PublicApi.getManageAreaAll().then(res => {
const { code, data } = res
if (code !== 1000) {
return
}
formActions.setFieldState('provinceCode', targetState => {
targetState.originData = data;
targetState.props.enum = data.map(v => ({
label: v.name,
value: v.code,
}));
});
if (initialValue) {
const { provinceCode, cityCode } = initialValue
const cityData: any[] = data.find(v => v.code === provinceCode).areaResponses || []
formActions.setFieldState('cityCode', targetState => {
targetState.originData = cityData
targetState.props.enum = cityData.map(v => ({
label: v.name,
value: v.code,
}))
})
formActions.setFieldState('districtCode', targetState => {
const districtData: any[] = cityData.find(v => v.code === cityCode).areaResponses || []
targetState.originData = districtData
targetState.props.enum = districtData.map(v => ({
label: v.name,
value: v.code,
}))
})
}
}).catch(error => {
console.warn(error)
})
}
useEffect(() => {
handleAddressSelesed()
}, [initialValue])
const AddressLabel = ( const AddressLabel = (
<div className={styles.label}> <div className={styles.label}>
{title} {title}
...@@ -110,29 +69,36 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => { ...@@ -110,29 +69,36 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
</div> </div>
); );
const findAreaNameByCode = (dataSource, code) => {
return dataSource.find(v => v.code === code).name
}
const handleSubmit = (value: any) => { const handleSubmit = (value: any) => {
setSubmitLoading(true) setSubmitLoading(true)
const provinceName = formActions.getFieldState('provinceCode', ({ values }) => { const provinceCode = formActions.getFieldValue('provinceCode')
return { provinceName: values[1].title } const cityCode = formActions.getFieldValue('cityCode')
}) const districtCode = formActions.getFieldValue('districtCode')
const cityName = formActions.getFieldState('cityCode', ({ values }) => {
return { cityName: values[1].title } const provinceData = addressData.current
}) const cityData = provinceData.find(v => v.code === provinceCode).areaResponses
const districtName = formActions.getFieldState('districtCode', ({ values }) => { const districtData = cityData.find(v => v.code === cityCode).areaResponses
return { districtName: values[1].title } const provinceName = findAreaNameByCode(provinceData, provinceCode)
}) const cityName = findAreaNameByCode(cityData, cityCode)
const districtName = findAreaNameByCode(districtData, districtCode)
const params = { const params = {
...value, ...value,
isDefault: value.isDefault ? 1 : 0, isDefault: Number(!!value.isDefault),
...provinceName, provinceName,
...cityName, cityName,
...districtName districtName
} }
id && (params.id = id) id && (params.id = id)
fetch(params).then(res => { fetch(params).then(res => {
setUnsaved(false) setUnsaved(false)
setSubmitLoading(false) setSubmitLoading(false)
if (res.code !== 1000) { if (res.code !== 1000) {
setSubmitLoading(false)
return return
} }
history.goBack(); history.goBack();
...@@ -148,18 +114,22 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => { ...@@ -148,18 +114,22 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
return initialValue return initialValue
}, [initialValue]) }, [initialValue])
const getFetchData = async () => {
await detail({ id }).then(res => {
setInfoLoading(false)
if (res.code !== 1000) {
return
}
setTimeout(() => { setInitialValue(res.data) }, 500)
}).catch(error => {
console.warn(error)
})
}
useEffect(() => { useEffect(() => {
if (id) { if (id) {
setInfoLoading(true) setInfoLoading(true)
detail({ id }).then(res => { getFetchData()
setInfoLoading(false)
if (res.code !== 1000) {
return
}
setInitialValue(res.data)
}).catch(error => {
console.warn(error)
})
} }
}, []) }, [])
...@@ -189,7 +159,42 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => { ...@@ -189,7 +159,42 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
AddressLabel, AddressLabel,
PhoneLabel, PhoneLabel,
}} }}
effects={() => { effects={($, { setFieldState, setFieldValue }) => {
$('onFormMount').subscribe(async () => {
await PublicApi.getManageAreaAll().then(res => {
if (res.code === 1000) {
const { data } = res;
addressData.current = data
setFieldState('provinceCode', targetState => {
targetState.originData = data;
targetState.props.enum = data.map(v => ({
label: v.name,
value: v.code,
}));
});
if (initialValue) {
const { provinceCode, cityCode } = initialValue
const cityData: any[] = data.find(v => v.code === provinceCode).areaResponses || []
setFieldState('cityCode', targetState => {
targetState.originData = cityData
targetState.props.enum = cityData.map(v => ({
label: v.name,
value: v.code,
}))
})
setFieldState('districtCode', targetState => {
const districtData: any[] = cityData.find(v => v.code === cityCode).areaResponses || []
targetState.originData = districtData
targetState.props.enum = districtData.map(v => ({
label: v.name,
value: v.code,
}))
})
}
}
});
})
useLinkEnumEffect('areaResponses', result => useLinkEnumEffect('areaResponses', result =>
result.map(v => ({ result.map(v => ({
label: v.name, label: v.name,
...@@ -197,7 +202,15 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => { ...@@ -197,7 +202,15 @@ const AddressForm: React.FC<AddressFormProps> = (props: any) => {
})), })),
'code' 'code'
); );
useAsyncSelect('areaCode', fetchTelCode);
useAsyncSelect('areaCode', fetchTelCode)
$('onFieldChange', 'areaCode').subscribe(result => {
if (result.props.enum.length) {
setFieldValue('areaCode', '86')
}
})
onFormInputChange$().subscribe(() => { onFormInputChange$().subscribe(() => {
if (!unsaved) { if (!unsaved) {
setUnsaved(true); setUnsaved(true);
......
...@@ -54,7 +54,7 @@ export const shipperAddress: ISchema = { ...@@ -54,7 +54,7 @@ export const shipperAddress: ISchema = {
'x-linkages': [ 'x-linkages': [
{ {
type: 'value:linkage', type: 'value:linkage',
condition: '{{!!$value}}', condition: '{{!!$self.value}}',
origin: 'provinceCode', origin: 'provinceCode',
target: 'cityCode', target: 'cityCode',
}, },
...@@ -70,7 +70,7 @@ export const shipperAddress: ISchema = { ...@@ -70,7 +70,7 @@ export const shipperAddress: ISchema = {
'x-linkages': [ 'x-linkages': [
{ {
type: 'value:linkage', type: 'value:linkage',
condition: '{{!!$value}}', condition: '{{!!$self.value}}',
origin: 'cityCode', origin: 'cityCode',
target: 'districtCode', target: 'districtCode',
}, },
...@@ -235,7 +235,7 @@ export const receiverAddress: ISchema = { ...@@ -235,7 +235,7 @@ export const receiverAddress: ISchema = {
'x-linkages': [ 'x-linkages': [
{ {
type: 'value:linkage', type: 'value:linkage',
condition: '{{!!$value}}', condition: '{{!!$self.value}}',
origin: 'provinceCode', origin: 'provinceCode',
target: 'cityCode', target: 'cityCode',
}, },
...@@ -251,7 +251,7 @@ export const receiverAddress: ISchema = { ...@@ -251,7 +251,7 @@ export const receiverAddress: ISchema = {
'x-linkages': [ 'x-linkages': [
{ {
type: 'value:linkage', type: 'value:linkage',
condition: '{{!!$value}}', condition: '{{!!$self.value}}',
origin: 'cityCode', origin: 'cityCode',
target: 'districtCode', target: 'districtCode',
}, },
......
import React from 'react'; import React, { useEffect, useState } from 'react';
import { Row, Col, Space } from 'antd'; import { Row, Col, Space, Image } from 'antd';
import style from './index.less'; import style from './index.less';
import Card from '@/pages/transaction/components/card'; import Card from '@/pages/transaction/components/card';
import { isEmpty } from 'lodash';
import IMG_LEVEL1 from '@/assets/imgs/level1.png';
import IMG_LEVEL2 from '@/assets/imgs/level2.png';
import IMG_LEVEL3 from '@/assets/imgs/level3.png';
import IMG_LEVEL4 from '@/assets/imgs/level4.png';
interface ActivityUserLayoutProps { interface ActivityUserLayoutProps {
/** 标题 */ /** 标题 */
title?: string, title?: string,
/** 适用用户 */ /** 适用用户 */
isFlag?: boolean, isFlag?: boolean,
/** 数据回显 */
dataScoure?: any
} }
const PIC_MAP = {
1: IMG_LEVEL1,
2: IMG_LEVEL2,
3: IMG_LEVEL3,
4: IMG_LEVEL4,
};
const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => { const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => {
const { title, isFlag } = props; const { title, isFlag, dataScoure } = props;
const [data, setData] = useState<any>({});
const [memberLevelList, setMemberLevelList] = useState<any[]>([]);
useEffect(() => {
if (!isEmpty(dataScoure)) {
setData(dataScoure)
setMemberLevelList(dataScoure.memberLevelList || [])
}
}, [dataScoure])
return ( return (
<Card <Card
id="activityUserLayout" id="activityUserLayout"
...@@ -40,66 +63,38 @@ const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => { ...@@ -40,66 +63,38 @@ const ActivityUserLayout: React.FC<ActivityUserLayoutProps> = (props: any) => {
</Row> </Row>
{!isFlag && ( {!isFlag && (
<Row gutter={[24, 24]}> <Row gutter={[24, 24]}>
<Col span={12}> {memberLevelList.map((item: any) => (
<div className={style.colStyle}> <Col span={12} key={item.id}>
<Row> <div className={style.colStyle}>
<Col span={6}> <Row>
<div className={style.cell}> <Col span={6}>
<h5 className={style.label}>会员类型: </h5> <div className={style.cell}>
<h5 className={style.content}>企业会员</h5> <h5 className={style.label}>会员类型: </h5>
</div> <h5 className={style.content}>{item.memberTypeName}</h5>
</Col> </div>
<Col span={6}> </Col>
<div className={style.cell}> <Col span={6}>
<h5 className={style.label}>会员角色: </h5> <div className={style.cell}>
<h5 className={style.content}>采购商</h5> <h5 className={style.label}>会员角色: </h5>
</div> <h5 className={style.content}>{item.roleTypeName}</h5>
</Col> </div>
<Col span={6}> </Col>
<div className={style.cell}> <Col span={6}>
<h5 className={style.label}>等级类型: </h5> <div className={style.cell}>
<h5 className={style.content}>商户会员</h5> <h5 className={style.label}>等级类型: </h5>
</div> <h5 className={style.content}>{item.levelTypeName}</h5>
</Col> </div>
<Col span={6}> </Col>
<div className={style.cell}> <Col span={6}>
<h5 className={style.label}>等级标签: </h5> <div className={style.cell}>
<h5 className={style.content}>倔强青铜</h5> <h5 className={style.label}>等级标签: </h5>
</div> <h5 className={style.content}><Image width={56} height={16} preview={false} src={PIC_MAP[item.level]} /></h5>
</Col> </div>
</Row> </Col>
</div> </Row>
</Col> </div>
<Col span={12}> </Col>
<div className={style.colStyle}> ))}
<Row>
<Col span={6}>
<div className={style.cell}>
<h5 className={style.label}>会员类型: </h5>
<h5 className={style.content}>企业会员</h5>
</div>
</Col>
<Col span={6}>
<div className={style.cell}>
<h5 className={style.label}>会员角色: </h5>
<h5 className={style.content}>采购商</h5>
</div>
</Col>
<Col span={6}>
<div className={style.cell}>
<h5 className={style.label}>等级类型: </h5>
<h5 className={style.content}>商户会员</h5>
</div>
</Col>
<Col span={6}>
<div className={style.cell}>
<h5 className={style.label}>等级标签: </h5>
<h5 className={style.content}>倔强青铜</h5>
</div>
</Col>
</Row>
</div>
</Col>
</Row> </Row>
)} )}
......
import React, { Fragment, useCallback, useState } from 'react'; import React, { Fragment, useCallback, useMemo, useState } from 'react';
import { Tooltip } from 'antd'; import { Button } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import { Context } from '@/pages/transaction/components/detailLayout/components/context'; import { Context } from '@/pages/transaction/components/detailLayout/components/context';
import PeripheralLayout from '@/pages/transaction/components/detailLayout'; import PeripheralLayout from '@/pages/transaction/components/detailLayout';
...@@ -14,11 +14,11 @@ import { ACTIVITYTYPENAME, GeneralEffect } from './constants'; ...@@ -14,11 +14,11 @@ import { ACTIVITYTYPENAME, GeneralEffect } from './constants';
import ActivityUserLayout from '../../components/activityUserLayout'; import ActivityUserLayout from '../../components/activityUserLayout';
import DemandLayout from '../../components/demandLayout'; import DemandLayout from '../../components/demandLayout';
import ListLayout from '@/pages/transaction/components/detailLayout/components/listLayout'; import ListLayout from '@/pages/transaction/components/detailLayout/components/listLayout';
import { ColumnType } from 'antd/lib/table/interface'; import { Columns } from './columns';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { stringify } from 'query-string'; import { CheckCircleOutlined } from '@ant-design/icons';
import ModalOperate from '@/pages/transaction/components/modalOperate';
const TABLINK = [ const TABLINK = [
{ id: 'progressLayout', title: '流转进度' }, { id: 'progressLayout', title: '流转进度' },
...@@ -34,6 +34,7 @@ const DetialLayout = () => { ...@@ -34,6 +34,7 @@ const DetialLayout = () => {
const { query: { activityId, signUpId }, pathname } = history.location; const { query: { activityId, signUpId }, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]); const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]); const [pathPci] = useState(pathname.split('/')[pathname.split('/').length - 2]);
const [visible, setVisible] = useState<boolean>(false)
const format = (text, fmt?: string) => { const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</> return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
} }
...@@ -74,61 +75,6 @@ const DetialLayout = () => { ...@@ -74,61 +75,6 @@ const DetialLayout = () => {
} }
} }
const columns: ColumnType<any>[] = [
{
title: '商品图片',
key: '',
dataIndex: '',
},
{
title: '商品ID',
key: '',
dataIndex: '',
},
{
title: '商品名称',
key: '',
dataIndex: '',
},
{
title: '品类',
key: '',
dataIndex: '',
},
{
title: '品牌',
key: '',
dataIndex: '',
},
{
title: '单位',
key: '',
dataIndex: '',
},
{
title: '商品价格',
key: '',
dataIndex: '',
},
{
title: <Tooltip placement="top" title="活动价格表示商城直接以该商品的活动价格进行销售">
活动价格 <QuestionCircleOutlined />
</Tooltip>,
key: '',
dataIndex: '',
},
{
title: '个人限购数量',
key: '',
dataIndex: '',
},
{
title: '活动限购总数量',
key: '',
dataIndex: '',
},
]
const fetchDataSource = useCallback(async () => { const fetchDataSource = useCallback(async () => {
await PublicApi.getMarketingPlatformActivitySignupDetail({ activityId }).then((res: any) => { await PublicApi.getMarketingPlatformActivitySignupDetail({ activityId }).then((res: any) => {
if (res.code !== 1000) { if (res.code !== 1000) {
...@@ -157,13 +103,43 @@ const DetialLayout = () => { ...@@ -157,13 +103,43 @@ const DetialLayout = () => {
// handleGeneralEffect(_data); // handleGeneralEffect(_data);
}, []) }, [])
console.log(typeof JSON.parse(signUpId)) const columns = useMemo(() => {
return Columns(dataSource.activityType || 1)
}, [dataSource.activityType])
const fetchLink = () => {
let fetchSoure: any = null;
switch (pathPci) {
case 'readyExamineOne':
fetchSoure = PublicApi.postMarketingPlatformActivitySignupExamineStep1
break;
case 'readyExamineTwo':
fetchSoure = PublicApi.postMarketingPlatformActivitySignupExamineStep2
break;
}
return fetchSoure
}
return ( return (
<Context.Provider value={dataSource}> <Context.Provider value={dataSource}>
<PeripheralLayout <PeripheralLayout
no={dataSource.activityId} no={dataSource.activityId}
detail={dataSource.activityName} detail={dataSource.activityName}
tabLink={TABLINK} tabLink={TABLINK}
effect={
<>
{path === 'detail'
&& (
<Button
type='primary'
onClick={() => setVisible(true)}
>
<CheckCircleOutlined />
单据审核
</Button>
)}
</>
}
components={ components={
<Fragment> <Fragment>
<ProgressLayout /> <ProgressLayout />
...@@ -181,12 +157,22 @@ const DetialLayout = () => { ...@@ -181,12 +157,22 @@ const DetialLayout = () => {
fetch={PublicApi.getMarketingPlatformActivitySignupDetailGoodsPage} fetch={PublicApi.getMarketingPlatformActivitySignupDetailGoodsPage}
columns={columns} columns={columns}
/> />
<ActivityUserLayout /> <ActivityUserLayout dataScoure={dataSource} />
<DemandLayout storeList={dataSource.shopList} /> <DemandLayout storeList={dataSource.shopList} />
<RecordLyout /> <RecordLyout />
</Fragment> </Fragment>
} }
/> />
{/* 审核 */}
<ModalOperate
id={signUpId}
title="单据审核"
modalType="merkeingAudit"
visible={visible}
fetch={fetchLink()}
onCancel={() => setVisible(false)}
onOk={() => history.goBack()}
/>
</Context.Provider> </Context.Provider>
) )
} }
......
import React from 'react'; import React from 'react';
import { history } from 'umi';
import TableLayout from '../../../components/TableLayout'; import TableLayout from '../../../components/TableLayout';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -23,7 +24,7 @@ const ReadyExamineOne = () => { ...@@ -23,7 +24,7 @@ const ReadyExamineOne = () => {
title: '活动名称', title: '活动名称',
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text) => <EyePreview>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readyExamineOne/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: '活动类型',
...@@ -59,7 +60,7 @@ const ReadyExamineOne = () => { ...@@ -59,7 +60,7 @@ const ReadyExamineOne = () => {
title: '外部状态', title: '外部状态',
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (text, record) => ( render: (_, record) => (
<StatusTag type="danger" title={record.outerStatusName} /> <StatusTag type="danger" title={record.outerStatusName} />
) )
}, },
...@@ -67,7 +68,7 @@ const ReadyExamineOne = () => { ...@@ -67,7 +68,7 @@ const ReadyExamineOne = () => {
title: '内部状态', title: '内部状态',
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (text, record) => ( render: (_, record) => (
<StatusTag type="danger" title={record.innerStatusName} /> <StatusTag type="danger" title={record.innerStatusName} />
) )
}, },
...@@ -75,12 +76,7 @@ const ReadyExamineOne = () => { ...@@ -75,12 +76,7 @@ const ReadyExamineOne = () => {
title: '操作', title: '操作',
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (text, record) => ( render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineOne/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>审核</Button>
<>
<Button type='link'>提交审核</Button>
<Button type='link'>填写报名资料</Button>
</>
)
}, },
] ]
/* 多选返回的 */ /* 多选返回的 */
...@@ -111,6 +107,7 @@ const ReadyExamineOne = () => { ...@@ -111,6 +107,7 @@ const ReadyExamineOne = () => {
<TableLayout <TableLayout
columns={columns} columns={columns}
effects="id" effects="id"
rowKey="activityId"
fetch={PublicApi.getMarketingPlatformActivitySignupPageTobeExamineStep1} fetch={PublicApi.getMarketingPlatformActivitySignupPageTobeExamineStep1}
selectedRow={true} selectedRow={true}
fetchRowkeys={fetchRowkeys} fetchRowkeys={fetchRowkeys}
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import React from 'react'; import React from 'react';
import { history } from 'umi';
import TableLayout from '../../../components/TableLayout'; import TableLayout from '../../../components/TableLayout';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
...@@ -12,100 +13,74 @@ import { format } from '@/pages/transaction/common/dateFormat'; ...@@ -12,100 +13,74 @@ import { format } from '@/pages/transaction/common/dateFormat';
import { useLinkageUtils } from '@/utils/formEffectUtils'; import { useLinkageUtils } from '@/utils/formEffectUtils';
import { FormEffectHooks } from '@formily/antd'; import { FormEffectHooks } from '@formily/antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadyExamineTwo = () => { const ReadyExamineTwo = () => {
const columns: ColumnType<any>[] = [{ const columns: ColumnType<any>[] = [
title: 'ID', {
dataIndex: 'id', title: '活动ID',
align: 'left', key: 'activityId',
}, dataIndex: 'activityId',
{ },
title: '活动名称', {
dataIndex: 'activityName', title: '活动名称',
align: 'left', key: 'activityName',
render: (text) => dataIndex: 'activityName',
<span style={{ color: '#00B37A' }}>{text}</span> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: '活动类型',
dataIndex: 'activityType', key: 'activityType',
align: 'left', dataIndex: 'activityType',
}, render: (_text, record) => <>{record.activityTypeName}</>,
{ },
title: '活动开始时间', {
dataIndex: 'startTime', title: '活动开始时间',
align: 'left', key: 'startTime',
}, dataIndex: 'startTime',
{ render: (text) => format(text)
title: '活动结束时间', },
dataIndex: 'endTime', {
align: 'left', title: '活动结束时间',
}, key: 'endTime',
{ dataIndex: 'endTime',
title: '报名开始时间', render: (text) => format(text)
dataIndex: 'startTime', },
align: 'left', {
}, title: '报名开始时间',
{ key: 'signUpStartTime',
title: '报名结束时间', dataIndex: 'signUpStartTime',
dataIndex: 'endTime', render: (text) => format(text)
align: 'left', },
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'left',
render: (text) => (
<StatusTag type="danger" title={text} />
)
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'left',
},
{
title: '操作',
dataIndex: 'state',
align: 'left',
render: (_, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }}>提交</span>
</div>
)
}
}
]
const mokiData = [
{ {
id: '1', title: '报名结束时间',
activityName: 'tony', key: 'signUpEndTime',
activityType: '秒杀', dataIndex: 'signUpEndTime',
startTime: '2020-05-12 08:08', render: (text) => format(text)
endTime: '还剩 59 秒',
outerStatus: "待提交报平台审核",
innerStatus: '待提交审核',
}, },
{ {
id: '2', title: '外部状态',
activityName: 'tony', key: 'outerStatus',
activityType: '秒杀', dataIndex: 'outerStatus',
startTime: '2020-05-12 08:08', render: (_, record) => (
endTime: '还剩 59 秒', <StatusTag type="danger" title={record.outerStatusName} />
outerStatus: "待提交报平台审核", )
innerStatus: '待提交审核',
}, },
{ {
id: '3', title: '内部状态',
activityName: 'tony', key: 'innerStatus',
activityType: '秒杀', dataIndex: 'innerStatus',
startTime: '2020-05-12 08:08', render: (_, record) => (
endTime: '还剩 59 秒', <StatusTag type="danger" title={record.innerStatusName} />
outerStatus: "待提交报平台审核", )
innerStatus: '待提交审核', },
} {
title: '操作',
key: 'state',
dataIndex: 'state',
render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readyExamineTwo/detail?activityId=${record.activityId}&signUpId=${record.id}`)}>审核</Button>
},
] ]
/* 多选返回的 */ /* 多选返回的 */
const fetchRowkeys = (row) => { const fetchRowkeys = (row) => {
...@@ -135,6 +110,7 @@ const ReadyExamineTwo = () => { ...@@ -135,6 +110,7 @@ const ReadyExamineTwo = () => {
<TableLayout <TableLayout
columns={columns} columns={columns}
effects="id" effects="id"
rowKey="activityId"
fetch={PublicApi.getMarketingPlatformActivitySignupPageTobeExamineStep2} fetch={PublicApi.getMarketingPlatformActivitySignupPageTobeExamineStep2}
selectedRow={true} selectedRow={true}
fetchRowkeys={fetchRowkeys} fetchRowkeys={fetchRowkeys}
......
...@@ -28,7 +28,7 @@ const TABLINK = [ ...@@ -28,7 +28,7 @@ const TABLINK = [
] ]
const DetialLayout = () => { const DetialLayout = () => {
const { query: { activityId } } = history.location; const { query: { activityId, signUpId } } = history.location;
const [loading, setLoading] = useState<boolean>(false) const [loading, setLoading] = useState<boolean>(false)
const [unsaved, setUnsaved] = useState<boolean>(false); const [unsaved, setUnsaved] = useState<boolean>(false);
const [productList, setProductList] = useState<any[]>([]); const [productList, setProductList] = useState<any[]>([]);
...@@ -100,10 +100,11 @@ const DetialLayout = () => { ...@@ -100,10 +100,11 @@ const DetialLayout = () => {
}, []) }, [])
const handleSubmit = useCallback(async () => { const handleSubmit = useCallback(async () => {
const params = { const params: any = {
activityId, activityId,
productList, productList,
} }
signUpId !== null && (params.id = signUpId)
if (!isEmpty(productList)) { if (!isEmpty(productList)) {
setLoading(true) setLoading(true)
PublicApi.postMarketingPlatformActivitySignupSave({ ...params }).then(res => { PublicApi.postMarketingPlatformActivitySignupSave({ ...params }).then(res => {
...@@ -156,8 +157,8 @@ const DetialLayout = () => { ...@@ -156,8 +157,8 @@ const DetialLayout = () => {
anchor="activityRuleLayout" anchor="activityRuleLayout"
effect={generalEffect} effect={generalEffect}
/> />
<ProductListLayout data={dataSource} getDataSource={handleGetDataSoure} /> <ProductListLayout signUpId={signUpId !== 'null' && signUpId} data={dataSource} getDataSource={handleGetDataSoure} />
<ActivityUserLayout /> <ActivityUserLayout dataScoure={dataSource} />
<DemandLayout storeList={dataSource.shopList} /> <DemandLayout storeList={dataSource.shopList} />
<RecordLyout /> <RecordLyout />
</Fragment> </Fragment>
......
import React from 'react'; import React from 'react';
import { Tooltip, Popconfirm } from 'antd'; import { Tooltip, Image } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
export const Columns = (int) => { export const Columns = (int) => {
...@@ -8,8 +8,9 @@ export const Columns = (int) => { ...@@ -8,8 +8,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -64,16 +65,18 @@ export const Columns = (int) => { ...@@ -64,16 +65,18 @@ export const Columns = (int) => {
}, },
{ {
title: '操作', title: '操作',
key: '', key: 'operation',
dataIndex: '' dataIndex: 'operation',
operation: true,
}, },
] ]
case 2: case 2:
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -143,8 +146,9 @@ export const Columns = (int) => { ...@@ -143,8 +146,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -215,8 +219,9 @@ export const Columns = (int) => { ...@@ -215,8 +219,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -268,8 +273,9 @@ export const Columns = (int) => { ...@@ -268,8 +273,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -326,8 +332,9 @@ export const Columns = (int) => { ...@@ -326,8 +332,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -398,8 +405,9 @@ export const Columns = (int) => { ...@@ -398,8 +405,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -458,8 +466,9 @@ export const Columns = (int) => { ...@@ -458,8 +466,9 @@ export const Columns = (int) => {
return [ return [
{ {
title: '商品图片', title: '商品图片',
key: '', key: 'productImgUrl',
dataIndex: '' dataIndex: 'productImgUrl',
render: (text) => <Image width={32} height={32} src={text} />
}, },
{ {
title: '商品ID', title: '商品ID',
......
...@@ -54,6 +54,7 @@ const EditableCell = ({ ...@@ -54,6 +54,7 @@ const EditableCell = ({
margin: 0, margin: 0,
}} }}
name={dataIndex} name={dataIndex}
initialValue={record[dataIndex]}
rules={[ rules={[
{ {
required: true, required: true,
...@@ -86,11 +87,11 @@ interface ProductListLayoutProps { ...@@ -86,11 +87,11 @@ interface ProductListLayoutProps {
/** 返回表格数据给父级 */ /** 返回表格数据给父级 */
getDataSource?: (e: any[]) => void, getDataSource?: (e: any[]) => void,
/** ref */ /** ref */
currentRef?: any, signUpId?: string | number,
} }
/** 主体内容 */ /** 主体内容 */
const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => { const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
const { data, getDataSource, currentRef } = props; const { data, getDataSource, signUpId } = props;
const [type, setType] = useState<number>(0); const [type, setType] = useState<number>(0);
const [visible, setVisible] = useState<boolean>(false); const [visible, setVisible] = useState<boolean>(false);
const [dataSource, setDataSource] = useState<any>([]) const [dataSource, setDataSource] = useState<any>([])
...@@ -181,6 +182,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => { ...@@ -181,6 +182,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
category: item.categoryName, category: item.categoryName,
brand: item.brandName, brand: item.brandName,
status: item.status, status: item.status,
productImgUrl: item.mainPic,
unit: item.unitName,
price: item.unitPrice['0-0']
} }
}) })
}) })
...@@ -192,22 +196,23 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => { ...@@ -192,22 +196,23 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
const handleOk = (selectRowKeys: string[] | number[], selectRowRecord: any) => { const handleOk = (selectRowKeys: string[] | number[], selectRowRecord: any) => {
const rowRecord: any[] = [...selectRowRecord] const rowRecord: any[] = [...selectRowRecord]
console.log(rowRecord, 10086)
const productList = rowRecord.map(item => { const productList = rowRecord.map(item => {
return { return {
id: item.id, id: item.id,
productImgUrl: item.productImgUrl,
productId: item.productId, productId: item.productId,
productName: item.productName, productName: item.productName,
category: item.category, category: item.category,
brand: item.brand, brand: item.brand,
unit: "尺", unit: item.unit,
price: 20, price: item.price,
plummetPrice: "", plummetPrice: item.price,
activityPrice: "", activityPrice: item.activityPrice,
deductionPrice: "", deductionPrice: item.deductionPrice,
discount: "", discount: item.discount,
restrictNum: "", restrictNum: item.restrictNum,
restrictTotalNum: "", restrictTotalNum: item.restrictTotalNum,
} }
}) })
getDataSource(productList) getDataSource(productList)
...@@ -223,6 +228,18 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => { ...@@ -223,6 +228,18 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
} }
} }
useEffect(() => {
if (signUpId) {
PublicApi.getMarketingPlatformActivitySignupDetailGoodsPage({ signUpId, current: '1', pageSize: '999' }).then(res => {
if (res.code !== 1000) {
return
}
getDataSource(res.data.data)
setDataSource(res.data.data)
})
}
}, [signUpId])
return ( return (
<Card <Card
id="productListLayout" id="productListLayout"
...@@ -263,9 +280,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => { ...@@ -263,9 +280,9 @@ const ProductListLayout: React.FC<ProductListLayoutProps> = (props: any) => {
columns={TableModalColumns} columns={TableModalColumns}
mode="checkbox" mode="checkbox"
tableProps={{ tableProps={{
rowKey: 'id', rowKey: 'productId',
}} }}
customKey="id" customKey="productId"
onClose={() => toggle(false)} onClose={() => toggle(false)}
onOk={handleOk} onOk={handleOk}
effects={($, actions) => { effects={($, actions) => {
......
import React from 'react'; import React, { useRef } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import TableLayout from '../../../components/TableLayout'; import TableLayout from '../../../components/TableLayout';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import { Button, Space } from 'antd' import { Button, Space, Popconfirm } from 'antd'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { format } from '@/pages/transaction/common/dateFormat'; import { format } from '@/pages/transaction/common/dateFormat';
import { useLinkageUtils } from '@/utils/formEffectUtils'; import { useLinkageUtils } from '@/utils/formEffectUtils';
...@@ -14,6 +14,17 @@ import { PublicApi } from '@/services/api'; ...@@ -14,6 +14,17 @@ import { PublicApi } from '@/services/api';
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadySubmitExamine = () => { const ReadySubmitExamine = () => {
const ref = useRef<any>({});
/** 提交审核 */
const handleSubmit = async (signUpId?: number) => {
await PublicApi.postMarketingPlatformActivitySignupSubmit({ id: signUpId }).then(res => {
if (res.code !== 1000) {
return
}
ref.current.reload();
})
}
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: '活动ID',
...@@ -78,8 +89,13 @@ const ReadySubmitExamine = () => { ...@@ -78,8 +89,13 @@ const ReadySubmitExamine = () => {
dataIndex: 'state', dataIndex: 'state',
render: (text, record) => ( render: (text, record) => (
<> <>
<Button type='link'>提交审核</Button> <Popconfirm title="确定要提交吗?" disabled={!record.id} okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`)}>填写报名资料</Button> <Button type='link' disabled={!record.id}>
提交审核
</Button>
</Popconfirm>
{record.id && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit?activityId=${record.activityId}&signUpId=${record.id}`)}>修改报名资料</Button>}
{!record.id && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`)}>填写报名资料</Button>}
</> </>
) )
}, },
...@@ -110,6 +126,7 @@ const ReadySubmitExamine = () => { ...@@ -110,6 +126,7 @@ const ReadySubmitExamine = () => {
return ( return (
<TableLayout <TableLayout
reload={ref}
columns={columns} columns={columns}
effects="id" effects="id"
rowKey="activityId" rowKey="activityId"
......
...@@ -21,7 +21,7 @@ const Search = () => { ...@@ -21,7 +21,7 @@ const Search = () => {
title: '活动名称', title: '活动名称',
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/search/preview?activityId=${record.activityId}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/paltformSign/search/preview?activityId=${record.activityId}&signUpId=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: '活动类型',
......
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