Commit 575e512f authored by unknown's avatar unknown

营销能力

parent 9cf6e782
...@@ -15,6 +15,7 @@ import accountSetting from './zh-CN/system/accountSetting' ...@@ -15,6 +15,7 @@ import accountSetting from './zh-CN/system/accountSetting'
import activityPage from './zh-CN/marketingAbility/activityPage' import activityPage from './zh-CN/marketingAbility/activityPage'
import merchantCoupon from './zh-CN/marketingAbility/merchantCoupon' import merchantCoupon from './zh-CN/marketingAbility/merchantCoupon'
import paltformSign from './zh-CN/marketingAbility/paltformSign' import paltformSign from './zh-CN/marketingAbility/paltformSign'
import selfManagement from './zh-CN/marketingAbility/selfManagement'
import logistics from './zh-CN/logistics' import logistics from './zh-CN/logistics'
import content from './zh-CN/content' import content from './zh-CN/content'
import commodity from './zh-CN/commodity' import commodity from './zh-CN/commodity'
...@@ -46,6 +47,7 @@ export default { ...@@ -46,6 +47,7 @@ export default {
...activityPage, ...activityPage,
...merchantCoupon, ...merchantCoupon,
...paltformSign, ...paltformSign,
...selfManagement,
...logistics, ...logistics,
...content, ...content,
...processRuleSetting, ...processRuleSetting,
......
This diff is collapsed.
...@@ -265,4 +265,4 @@ const EditDataComponent = (props) => { ...@@ -265,4 +265,4 @@ const EditDataComponent = (props) => {
) )
} }
export default EditDataComponent export default EditDataComponent
\ No newline at end of file
import { useIntl } from 'umi';
import React, { Fragment, useCallback, useMemo, useState } from 'react'; import React, { Fragment, useCallback, useMemo, useState } from 'react';
import { Button } from 'antd'; import { Button } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
...@@ -24,6 +25,7 @@ import PrizeList from './prizeList'; ...@@ -24,6 +25,7 @@ import PrizeList from './prizeList';
import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, postMarketingMerchantActivityExamineStep1, postMarketingMerchantActivityExamineStep2 } from '@/services/MarketingV2Api'; import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, postMarketingMerchantActivityExamineStep1, postMarketingMerchantActivityExamineStep2 } from '@/services/MarketingV2Api';
const DetialLayout = () => { const DetialLayout = () => {
const intl = useIntl();
const { query: { id }, pathname } = history.location; const { query: { id }, 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]);
...@@ -45,23 +47,23 @@ const DetialLayout = () => { ...@@ -45,23 +47,23 @@ const DetialLayout = () => {
setBasicEffect([ setBasicEffect([
{ {
col: [ col: [
{ label: '活动ID', extra: data.id }, { label: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`, extra: data.id },
{ label: '外部状态', extra: data.outerStatusName }, { label: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`, extra: data.outerStatusName },
{ label: '内部状态', extra: data.innerStatusName }, { label: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`, extra: data.innerStatusName },
] ]
}, },
{ {
col: [ col: [
{ label: '活动类型', extra: data.activityTypeName }, { label: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`, extra: data.activityTypeName },
{ label: '活动名称', extra: data.activityName }, { label: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`, extra: data.activityName },
{ label: '会员名称', extra: data.memberName }, { label: `${intl.formatMessage({ id: 'selfManagement.memberName'})}`, extra: data.memberName },
] ]
}, },
{ {
col: [ col: [
{ label: '活动开始时间', extra: format(data.startTime) }, { label: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`, extra: format(data.startTime) },
{ label: '活动结束时间', extra: format(data.endTime) }, { label: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`, extra: format(data.endTime) },
{ label: '创建时间', extra: format(data.createTime) }, { label: `${intl.formatMessage({ id: 'selfManagement.creationTime'})}`, extra: format(data.createTime) },
] ]
}, },
]) ])
...@@ -139,19 +141,19 @@ const DetialLayout = () => { ...@@ -139,19 +141,19 @@ const DetialLayout = () => {
data.interiorLogs = interiorLogs; data.interiorLogs = interiorLogs;
setAllusers([ setAllusers([
{ {
title: '适用用户', title: `${intl.formatMessage({ id: 'selfManagement.applyToTheUser'})}`,
value: [{ value: [{
key: data.newUser, key: data.newUser,
name: '新用户(不包含会员)' name: `${intl.formatMessage({ id: 'selfManagement.includeMember)'})}`
}, { }, {
key: data.oldUser, key: data.oldUser,
name: '老用户(不包含会员)' name: `${intl.formatMessage({ id: 'selfManagement.customersIncludeMember)'})}`
}, { }, {
key: data.newMember, key: data.newMember,
name: '新会员(仅会员用户)' name: `${intl.formatMessage({ id: 'selfManagement.newMembers(membersOnly)'})}`
}, { }, {
key: data.oldMember, key: data.oldMember,
name: '老会员(仅会员用户)' name: `${intl.formatMessage({ id: 'selfManagement.oldMembers(membersOnly)'})}`
}] }]
} }
]) ])
...@@ -213,13 +215,13 @@ const DetialLayout = () => { ...@@ -213,13 +215,13 @@ const DetialLayout = () => {
no={dataSource.activityId} no={dataSource.activityId}
detail={dataSource.activityName} detail={dataSource.activityName}
tabLink={[ tabLink={[
{ id: 'progressLayout', title: '流转进度' }, { id: 'progressLayout', title: `${intl.formatMessage({ id: 'selfManagement.theCirculationProgress'})}` },
{ id: 'basicLayout', title: '基本信息' }, { id: 'basicLayout', title: `${intl.formatMessage({ id: 'selfManagement.theBasicInformation'})}` },
{ id: 'activityRuleLayout', title: '活动规则' }, { id: 'activityRuleLayout', title: `${intl.formatMessage({ id: 'selfManagement.activityRules'})}` },
{ id: 'activityProductLayout', title: value === 10 ? '奖品' : '活动商品' }, { id: 'activityProductLayout', title: value === 10 ? `${intl.formatMessage({ id: 'selfManagement.thePrize'})}` : `${intl.formatMessage({ id: 'selfManagement.activitiesOfGoods'})}` },
{ id: 'activityUserLayout', title: '活动用户' }, { id: 'activityUserLayout', title: `${intl.formatMessage({ id: 'selfManagement.activeUsers'})}` },
{ id: 'applyMallLayout', title: '适用商城' }, { id: 'applyMallLayout', title: `${intl.formatMessage({ id: 'selfManagement.applyToMall'})}` },
{ id: 'recordLyout', title: '流转记录' }, { id: 'recordLyout', title: `${intl.formatMessage({ id: 'selfManagement.transferRecord'})}` },
]} ]}
effect={ effect={
<> <>
...@@ -229,9 +231,7 @@ const DetialLayout = () => { ...@@ -229,9 +231,7 @@ const DetialLayout = () => {
type='primary' type='primary'
onClick={() => setVisible(true)} onClick={() => setVisible(true)}
> >
<CheckCircleOutlined /> <CheckCircleOutlined />{ intl.formatMessage({ id: 'selfManagement.documentsReview'}) }</Button>
单据审核
</Button>
)} )}
</> </>
} }
...@@ -239,8 +239,8 @@ const DetialLayout = () => { ...@@ -239,8 +239,8 @@ const DetialLayout = () => {
<Fragment> <Fragment>
<ProgressLayout /> <ProgressLayout />
<BasicLayout effect={basicEffect} /> <BasicLayout effect={basicEffect} />
<GeneralLayout visible title={`活动规则-${ACTIVITYTYPENAME[dataSource.activityType]}`} anchor="activityRuleLayout" effect={generalEffect} /> <GeneralLayout visible title={`${intl.formatMessage({ id: 'selfManagement.ActivityRules' })}-${ACTIVITYTYPENAME[dataSource.activityType]}`} anchor="activityRuleLayout" effect={generalEffect} />
{value !== 10 && (<ListLayout anchor="activityProductLayout" ids={id !== 'null' && { activityId: id }} title='活动商品' fetch={getMarketingMerchantActivityDetailGoodsPage} columns={columns} />)} {value !== 10 && (<ListLayout anchor="activityProductLayout" ids={id !== 'null' && { activityId: id }} title={intl.formatMessage({ id: 'selfManagement.activitiesOfGoods' })} fetch={getMarketingMerchantActivityDetailGoodsPage} columns={columns} />)}
{value === 10 && (<PrizeList columns={columns} dataSource={prizeList} />)} {value === 10 && (<PrizeList columns={columns} dataSource={prizeList} />)}
<ActivityUserLayout dataScoure={dataSource} allUsers={allUsers} /> <ActivityUserLayout dataScoure={dataSource} allUsers={allUsers} />
<DemandLayout storeList={dataSource.shopList} /> <DemandLayout storeList={dataSource.shopList} />
...@@ -251,7 +251,7 @@ const DetialLayout = () => { ...@@ -251,7 +251,7 @@ const DetialLayout = () => {
{/* 审核 */} {/* 审核 */}
<ModalOperate <ModalOperate
id={id} id={id}
title="单据审核" title={intl.formatMessage({ id: 'selfManagement.documentsReview'})}
modalType="marketing" modalType="marketing"
visible={visible} visible={visible}
fetch={fetchLink()} fetch={fetchLink()}
......
import { useIntl } from 'umi';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Table } from 'antd'; import { Table } from 'antd';
import CardLayout from '../readySubmitExamine/components/card'; import CardLayout from '../readySubmitExamine/components/card';
...@@ -11,6 +12,7 @@ interface PrizeListProps { ...@@ -11,6 +12,7 @@ interface PrizeListProps {
} }
const PrizeList: React.FC<PrizeListProps> = (props: any) => { const PrizeList: React.FC<PrizeListProps> = (props: any) => {
const intl = useIntl();
const { columns, dataSource } = props; const { columns, dataSource } = props;
const [data, setData] = useState<any[]>([]) const [data, setData] = useState<any[]>([])
...@@ -22,7 +24,7 @@ const PrizeList: React.FC<PrizeListProps> = (props: any) => { ...@@ -22,7 +24,7 @@ const PrizeList: React.FC<PrizeListProps> = (props: any) => {
return ( return (
<CardLayout <CardLayout
id='activityProductLayout' id='activityProductLayout'
title='奖品' title={intl.formatMessage({ id: 'selfManagement.thePrize' })}
weight weight
> >
<Table <Table
......
import { useIntl } from 'umi';
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { history } from 'umi'; import { history } from 'umi';
...@@ -15,6 +16,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc ...@@ -15,6 +16,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadyExamineOne = () => { const ReadyExamineOne = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false); const [submitLoading, setSubmitLoading] = useState<boolean>(false);
...@@ -34,36 +36,36 @@ const ReadyExamineOne = () => { ...@@ -34,36 +36,36 @@ const ReadyExamineOne = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyExamineOne/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyExamineOne/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -71,7 +73,7 @@ const ReadyExamineOne = () => { ...@@ -71,7 +73,7 @@ const ReadyExamineOne = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -79,10 +81,10 @@ const ReadyExamineOne = () => { ...@@ -79,10 +81,10 @@ const ReadyExamineOne = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readyExamineOne/detail?id=${record.id}`)}>审核</Button> render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readyExamineOne/detail?id=${record.id}`)}>{ intl.formatMessage({ id: 'selfManagement.audit'}) }</Button>
}, },
] ]
...@@ -126,7 +128,7 @@ const ReadyExamineOne = () => { ...@@ -126,7 +128,7 @@ const ReadyExamineOne = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
}, },
}, },
} }
...@@ -156,7 +158,7 @@ const ReadyExamineOne = () => { ...@@ -156,7 +158,7 @@ const ReadyExamineOne = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -165,7 +167,7 @@ const ReadyExamineOne = () => { ...@@ -165,7 +167,7 @@ const ReadyExamineOne = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -174,7 +176,7 @@ const ReadyExamineOne = () => { ...@@ -174,7 +176,7 @@ const ReadyExamineOne = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -189,7 +191,7 @@ const ReadyExamineOne = () => { ...@@ -189,7 +191,7 @@ const ReadyExamineOne = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: '查询' children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
...@@ -203,9 +205,7 @@ const ReadyExamineOne = () => { ...@@ -203,9 +205,7 @@ const ReadyExamineOne = () => {
loading={submitLoading} loading={submitLoading}
onClick={fetchSubmitBatch} onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
> >{ intl.formatMessage({ id: 'selfManagement.batchSubmitAudit'}) }</Button>
批量提交审核
</Button>
</Col> </Col>
</Row> </Row>
} }
......
import { useIntl } from 'umi';
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { Button, Row, Col, Tag, Badge } from 'antd' import { Button, Row, Col, Tag, Badge } from 'antd'
import { history } from 'umi'; import { history } from 'umi';
...@@ -14,6 +15,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc ...@@ -14,6 +15,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadyExamineTwo = () => { const ReadyExamineTwo = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false); const [submitLoading, setSubmitLoading] = useState<boolean>(false);
...@@ -33,36 +35,36 @@ const ReadyExamineTwo = () => { ...@@ -33,36 +35,36 @@ const ReadyExamineTwo = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyExamineTwo/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyExamineTwo/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -70,7 +72,7 @@ const ReadyExamineTwo = () => { ...@@ -70,7 +72,7 @@ const ReadyExamineTwo = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -78,10 +80,10 @@ const ReadyExamineTwo = () => { ...@@ -78,10 +80,10 @@ const ReadyExamineTwo = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readyExamineTwo/detail?id=${record.id}`)}>审核</Button> render: (_, record) => <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readyExamineTwo/detail?id=${record.id}`)}>{ intl.formatMessage({ id: 'selfManagement.audit'}) }</Button>
} }
] ]
...@@ -125,7 +127,7 @@ const ReadyExamineTwo = () => { ...@@ -125,7 +127,7 @@ const ReadyExamineTwo = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
}, },
}, },
} }
...@@ -155,7 +157,7 @@ const ReadyExamineTwo = () => { ...@@ -155,7 +157,7 @@ const ReadyExamineTwo = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -164,7 +166,7 @@ const ReadyExamineTwo = () => { ...@@ -164,7 +166,7 @@ const ReadyExamineTwo = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -173,7 +175,7 @@ const ReadyExamineTwo = () => { ...@@ -173,7 +175,7 @@ const ReadyExamineTwo = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -188,7 +190,7 @@ const ReadyExamineTwo = () => { ...@@ -188,7 +190,7 @@ const ReadyExamineTwo = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: '查询' children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
...@@ -202,9 +204,7 @@ const ReadyExamineTwo = () => { ...@@ -202,9 +204,7 @@ const ReadyExamineTwo = () => {
loading={submitLoading} loading={submitLoading}
onClick={fetchSubmitBatch} onClick={fetchSubmitBatch}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
> >{ intl.formatMessage({ id: 'selfManagement.batchSubmitAudit'}) }</Button>
批量提交审核
</Button>
</Col> </Col>
</Row> </Row>
} }
......
import { useIntl } from 'umi';
import React, { Fragment, useRef, useState } from 'react'; import React, { Fragment, useRef, useState } from 'react';
import { Button, Row, Col, Popconfirm, Tag, Badge } from 'antd' import { Button, Row, Col, Popconfirm, Tag, Badge } from 'antd'
import TableLayout from '@/pages/transaction/components/tableLayout' import TableLayout from '@/pages/transaction/components/tableLayout'
...@@ -13,6 +14,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc ...@@ -13,6 +14,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadyLive = () => { const ReadyLive = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false); const [submitLoading, setSubmitLoading] = useState<boolean>(false);
...@@ -36,36 +38,36 @@ const ReadyLive = () => { ...@@ -36,36 +38,36 @@ const ReadyLive = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyLive/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readyLive/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -73,7 +75,7 @@ const ReadyLive = () => { ...@@ -73,7 +75,7 @@ const ReadyLive = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -81,16 +83,14 @@ const ReadyLive = () => { ...@@ -81,16 +83,14 @@ const ReadyLive = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text, _record) => ( render: (_text, _record) => (
<Fragment> <Fragment>
{_record.online && ( {_record.online && (
<Popconfirm okButtonProps={{ loading: submitLoading }} title="确定要上线活动吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(_record.id)}> <Popconfirm okButtonProps={{ loading: submitLoading }} title={intl.formatMessage({ id: 'selfManagement.launchActivities?'})} okText={intl.formatMessage({ id: 'selfManagement.is'})} cancelText={intl.formatMessage({ id: 'selfManagement.no'})} onConfirm={() => fetchSubmitBatch(_record.id)}>
<Button type='link'> <Button type='link'>{ intl.formatMessage({ id: 'selfManagement.onlineActivity'}) }</Button>
上线活动
</Button>
</Popconfirm> </Popconfirm>
)} )}
</Fragment> </Fragment>
...@@ -138,7 +138,7 @@ const ReadyLive = () => { ...@@ -138,7 +138,7 @@ const ReadyLive = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
}, },
}, },
} }
...@@ -168,7 +168,7 @@ const ReadyLive = () => { ...@@ -168,7 +168,7 @@ const ReadyLive = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -177,7 +177,7 @@ const ReadyLive = () => { ...@@ -177,7 +177,7 @@ const ReadyLive = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -186,7 +186,7 @@ const ReadyLive = () => { ...@@ -186,7 +186,7 @@ const ReadyLive = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -201,7 +201,7 @@ const ReadyLive = () => { ...@@ -201,7 +201,7 @@ const ReadyLive = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: '查询' children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
...@@ -215,9 +215,7 @@ const ReadyLive = () => { ...@@ -215,9 +215,7 @@ const ReadyLive = () => {
loading={submitLoading} loading={submitLoading}
onClick={() => fetchSubmitBatch()} onClick={() => fetchSubmitBatch()}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
> >{ intl.formatMessage({ id: 'selfManagement.batchOnlineActivities'}) }</Button>
批量上线活动
</Button>
</Col> </Col>
</Row> </Row>
} }
......
import { useIntl } from 'umi';
import React, { Fragment, useRef, useState } from 'react'; import React, { Fragment, useRef, useState } from 'react';
import { Button, Row, Col, Popconfirm, Tag, Badge } from 'antd' import { Button, Row, Col, Popconfirm, Tag, Badge } from 'antd'
import TableLayout from '@/pages/transaction/components/tableLayout' import TableLayout from '@/pages/transaction/components/tableLayout'
...@@ -13,6 +14,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc ...@@ -13,6 +14,7 @@ import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantAc
const { onFormMount$ } = FormEffectHooks; const { onFormMount$ } = FormEffectHooks;
const ReadySubmit = () => { const ReadySubmit = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [submitLoading, setSubmitLoading] = useState<boolean>(false); const [submitLoading, setSubmitLoading] = useState<boolean>(false);
...@@ -36,36 +38,36 @@ const ReadySubmit = () => { ...@@ -36,36 +38,36 @@ const ReadySubmit = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readySubmit/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readySubmit/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -73,7 +75,7 @@ const ReadySubmit = () => { ...@@ -73,7 +75,7 @@ const ReadySubmit = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -81,16 +83,14 @@ const ReadySubmit = () => { ...@@ -81,16 +83,14 @@ const ReadySubmit = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text, _record) => ( render: (_text, _record) => (
<Fragment> <Fragment>
{_record.submit && ( {_record.submit && (
<Popconfirm okButtonProps={{ loading: submitLoading }} title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(_record.id)}> <Popconfirm okButtonProps={{ loading: submitLoading }} title={intl.formatMessage({ id: 'selfManagement.sureYouWantToSubmit?'})} okText={intl.formatMessage({ id: 'selfManagement.is'})} cancelText={intl.formatMessage({ id: 'selfManagement.no'})} onConfirm={() => fetchSubmitBatch(_record.id)}>
<Button type='link'> <Button type='link'>{ intl.formatMessage({ id: 'selfManagement.submit'}) }</Button>
提交
</Button>
</Popconfirm> </Popconfirm>
)} )}
</Fragment> </Fragment>
...@@ -138,7 +138,7 @@ const ReadySubmit = () => { ...@@ -138,7 +138,7 @@ const ReadySubmit = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
}, },
}, },
} }
...@@ -168,7 +168,7 @@ const ReadySubmit = () => { ...@@ -168,7 +168,7 @@ const ReadySubmit = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -177,7 +177,7 @@ const ReadySubmit = () => { ...@@ -177,7 +177,7 @@ const ReadySubmit = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -186,7 +186,7 @@ const ReadySubmit = () => { ...@@ -186,7 +186,7 @@ const ReadySubmit = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -201,7 +201,7 @@ const ReadySubmit = () => { ...@@ -201,7 +201,7 @@ const ReadySubmit = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: '查询' children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
...@@ -215,9 +215,7 @@ const ReadySubmit = () => { ...@@ -215,9 +215,7 @@ const ReadySubmit = () => {
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
loading={submitLoading} loading={submitLoading}
onClick={() => fetchSubmitBatch()} onClick={() => fetchSubmitBatch()}
> >{ intl.formatMessage({ id: 'selfManagement.batchSubmitAudit'}) }</Button>
批量提交审核
</Button>
</Col> </Col>
</Row> </Row>
} }
......
import { useIntl } from 'umi';
import React, { Fragment, useEffect, useState } from 'react'; import React, { Fragment, useEffect, useState } from 'react';
import { Form, Button } from 'antd'; import { Form, Button } from 'antd';
import { history, Prompt } from 'umi'; import { history, Prompt } from 'umi';
...@@ -25,6 +26,7 @@ type objType = { ...@@ -25,6 +26,7 @@ type objType = {
} }
const AddedMarketing = () => { const AddedMarketing = () => {
const intl = useIntl();
const { query: { id }, pathname } = history.location; const { query: { id }, pathname } = history.location;
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]); const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const focus$ = useEventEmitter(); const focus$ = useEventEmitter();
...@@ -244,13 +246,13 @@ const AddedMarketing = () => { ...@@ -244,13 +246,13 @@ const AddedMarketing = () => {
return ( return (
<Fragment> <Fragment>
<PeripheralLayout <PeripheralLayout
detail='新增营销活动' detail={intl.formatMessage({ id: 'selfManagement.aNewMarketingCampaign' })}
tabLink={[ tabLink={[
{ id: 'basicInfoLayout', title: '基本信息' }, { id: 'basicInfoLayout', title: `${intl.formatMessage({ id: 'selfManagement.theBasicInformation'})}` },
{ id: 'shopLayout', title: '适用商城' }, { id: 'shopLayout', title: `${intl.formatMessage({ id: 'selfManagement.applyToMall'})}` },
{ id: 'rulesLayout', title: '活动规则' }, { id: 'rulesLayout', title: `${intl.formatMessage({ id: 'selfManagement.activityRules'})}` },
{ id: 'activityProductLayout', title: value === 10 ? '奖品设置' : '活动商品' }, { id: 'activityProductLayout', title: value === 10 ? `${intl.formatMessage({ id: 'selfManagement.thePrizeSet'})}` : `${intl.formatMessage({ id: 'selfManagement.activitiesOfGoods'})}` },
{ id: 'partakeUserLayout', title: '参与用户' }, { id: 'partakeUserLayout', title: `${intl.formatMessage({ id: 'selfManagement.participateInTheUser'})}` },
]} ]}
effect={ effect={
<Button <Button
...@@ -258,9 +260,7 @@ const AddedMarketing = () => { ...@@ -258,9 +260,7 @@ const AddedMarketing = () => {
icon={<SaveOutlined />} icon={<SaveOutlined />}
type="primary" type="primary"
onClick={handleSubmit} onClick={handleSubmit}
> >{ intl.formatMessage({ id: 'selfManagement.save'}) }</Button>
保存
</Button>
} }
hideBreak={true} hideBreak={true}
components={ components={
...@@ -282,7 +282,7 @@ const AddedMarketing = () => { ...@@ -282,7 +282,7 @@ const AddedMarketing = () => {
</Form> </Form>
} }
/> />
<Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" /> <Prompt when={unsaved} message={intl.formatMessage({ id: 'selfManagement.ifLeaveBecauseNotSave' })} />
</Fragment> </Fragment>
); );
} }
......
...@@ -4,6 +4,8 @@ import { FormInstance } from 'antd/es/form/Form'; ...@@ -4,6 +4,8 @@ import { FormInstance } from 'antd/es/form/Form';
import { EventEmitter } from '@umijs/hooks/lib/useEventEmitter' import { EventEmitter } from '@umijs/hooks/lib/useEventEmitter'
import moment from 'moment'; import moment from 'moment';
import CardLayout from '../card'; import CardLayout from '../card';
import { getIntl} from 'umi'
const intl = getIntl();
interface BasicInfoProps { interface BasicInfoProps {
focus$?: EventEmitter<void>, focus$?: EventEmitter<void>,
...@@ -14,22 +16,22 @@ interface BasicInfoProps { ...@@ -14,22 +16,22 @@ interface BasicInfoProps {
} }
const avtivityTypes = [ const avtivityTypes = [
{ lable: '特价促销', value: 1 }, { lable: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ lable: '直降促销', value: 2 }, { lable: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ lable: '折价促销', value: 3 }, { lable: `${intl.formatMessage({ id: 'selfManagement.salesPromotion'})}`, value: 3 },
{ lable: '满量促销', value: 4 }, { lable: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ lable: '满额促销', value: 5 }, { lable: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ lable: '赠送促销', value: 6 }, { lable: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ lable: '多件促销', value: 7 }, { lable: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 7 },
{ lable: '组合促销', value: 8 }, { lable: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 8 },
{ lable: '拼团', value: 9 }, { lable: `${intl.formatMessage({ id: 'selfManagement.spellGroup'})}`, value: 9 },
{ lable: '抽奖', value: 10 }, { lable: `${intl.formatMessage({ id: 'selfManagement.luckyDraw'})}`, value: 10 },
{ lable: '砍价', value: 11 }, { lable: `${intl.formatMessage({ id: 'selfManagement.bargaining'})}`, value: 11 },
{ lable: '秒杀', value: 12 }, { lable: `${intl.formatMessage({ id: 'selfManagement.secondsKill'})}`, value: 12 },
{ lable: '换购', value: 13 }, { lable: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ lable: '预售', value: 14 }, { lable: `${intl.formatMessage({ id: 'selfManagement.openToBooking'})}`, value: 14 },
{ lable: '套餐', value: 15 }, { lable: `${intl.formatMessage({ id: 'selfManagement.package'})}`, value: 15 },
{ lable: '试用', value: 16 }, { lable: `${intl.formatMessage({ id: 'selfManagement.theTrial'})}`, value: 16 },
] ]
const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => { const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
...@@ -73,24 +75,24 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -73,24 +75,24 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
return ( return (
<CardLayout <CardLayout
id="basicInfoLayout" id="basicInfoLayout"
title="基本信息" title={intl.formatMessage({ id: 'selfManagement.theBasicInformation'})}
weight weight
bodyStyle={{ paddingBottom: '0px' }} bodyStyle={{ paddingBottom: '0px' }}
> >
<Row gutter={[48, 24]}> <Row gutter={[48, 24]}>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
label="活动名称" label={intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}
name="activityName" name="activityName"
rules={[{ required: true, message: '请输入活动名称' }]} rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseEnterAName'})}` }]}
> >
<Input maxLength={30} placeholder="最长60字符,30个汉字" /> <Input maxLength={30} placeholder={intl.formatMessage({ id: 'selfManagement.longestCharactersCharacters'})} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="活动类型" label={intl.formatMessage({ id: 'selfManagement.theActivityType'})}
name="activityType" name="activityType"
initialValue={1} initialValue={1}
rules={[{ required: true, message: '请选择活动类型' }]} rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectTheActivityType'})}` }]}
> >
<Select onChange={handleChange} disabled={isEdit}> <Select onChange={handleChange} disabled={isEdit}>
{avtivityTypes.map((item) => <Select.Option key={'ACTIVITY_TYPE' + item.value} value={item.value}>{item.lable}</Select.Option>)} {avtivityTypes.map((item) => <Select.Option key={'ACTIVITY_TYPE' + item.value} value={item.value}>{item.lable}</Select.Option>)}
...@@ -99,7 +101,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -99,7 +101,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
label="活动时间" label={intl.formatMessage({ id: 'selfManagement.theActivityTime'})}
style={{ margin: 0 }} style={{ margin: 0 }}
required> required>
<Space style={{ display: 'flex' }} align='baseline'> <Space style={{ display: 'flex' }} align='baseline'>
...@@ -112,10 +114,10 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -112,10 +114,10 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
validator: (_, value) => { validator: (_, value) => {
const _signUpEndTime = form.getFieldValue('signUpEndTime'); const _signUpEndTime = form.getFieldValue('signUpEndTime');
if (!value) { if (!value) {
return Promise.reject(new Error('请选择活动开始时间')); return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.pleaseSelectStartTime'})}`));
} }
if (_signUpEndTime && !moment(value).isAfter(_signUpEndTime)) { if (_signUpEndTime && !moment(value).isAfter(_signUpEndTime)) {
return Promise.reject(new Error('活动开始时间必须大于报名结束时间')); return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.activitiesGreater'})}`));
} }
return Promise.resolve(); return Promise.resolve();
} }
...@@ -131,7 +133,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => { ...@@ -131,7 +133,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
~ ~
<Form.Item <Form.Item
name='endTime' name='endTime'
rules={[{ required: true, message: '请选择活动结束时间' }]}> rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectActivityOverTime'})}` }]}>
<DatePicker <DatePicker
showTime showTime
showNow={false} showNow={false}
......
import { useIntl } from 'umi';
import React, { useEffect, useState, useCallback } from 'react'; import React, { useEffect, useState, useCallback } from 'react';
import { Drawer, Space, Form, Select, Input, Button, Row, Col, Checkbox, Empty, Pagination, Radio } from 'antd'; import { Drawer, Space, Form, Select, Input, Button, Row, Col, Checkbox, Empty, Pagination, Radio } from 'antd';
import { CaretDownOutlined } from '@ant-design/icons'; import { CaretDownOutlined } from '@ant-design/icons';
...@@ -22,6 +23,7 @@ interface CouponsLayoutProps { ...@@ -22,6 +23,7 @@ interface CouponsLayoutProps {
} }
const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
const intl = useIntl();
const { visible, onClose, onSubmit, value, mode = 'checkbox', fieldApi } = props; const { visible, onClose, onSubmit, value, mode = 'checkbox', fieldApi } = props;
const [form] = Form.useForm(); const [form] = Form.useForm();
const [state, setState] = useState({ const [state, setState] = useState({
...@@ -92,12 +94,8 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { ...@@ -92,12 +94,8 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
const renderFooter = () => { const renderFooter = () => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<Button onClick={onClose} style={{ marginRight: 8 }}> <Button onClick={onClose} style={{ marginRight: 8 }}>{ intl.formatMessage({ id: 'selfManagement.cancel'}) }</Button>
取消 <Button onClick={handleOnOk} type="primary">{ intl.formatMessage({ id: 'selfManagement.submit'}) }</Button>
</Button>
<Button onClick={handleOnOk} type="primary">
提交
</Button>
</div> </div>
) )
} }
...@@ -158,7 +156,7 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { ...@@ -158,7 +156,7 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
return ( return (
<Drawer <Drawer
width={630} width={630}
title='选择优惠券' title={intl.formatMessage({ id: 'selfManagement.chooseACoupon' })}
visible={visible} visible={visible}
onClose={onClose} onClose={onClose}
footer={renderFooter()} footer={renderFooter()}
...@@ -176,7 +174,7 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { ...@@ -176,7 +174,7 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
> >
<Select <Select
style={{ width: '160px' }} style={{ width: '160px' }}
placeholder='优惠劵类型' placeholder={intl.formatMessage({ id: 'selfManagement.couponType' })}
options={options} options={options}
/> />
</Form.Item> </Form.Item>
...@@ -184,10 +182,10 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { ...@@ -184,10 +182,10 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
name='name' name='name'
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
<Input.Search onSearch={handleSubmit} placeholder='优惠劵名称' /> <Input.Search onSearch={handleSubmit} placeholder={intl.formatMessage({ id: 'selfManagement.theNameOfTheCoupon' })} />
</Form.Item> </Form.Item>
<Button onClick={changeFilterVisible}>高级筛选 <CaretDownOutlined rotate={state.filterSearch ? 180 : 0} /></Button> <Button onClick={changeFilterVisible}>{ intl.formatMessage({ id: 'selfManagement.advancedScreening'}) }<CaretDownOutlined rotate={state.filterSearch ? 180 : 0} /></Button>
<Button onClick={handleResetForm}>重置</Button> <Button onClick={handleResetForm}>{ intl.formatMessage({ id: 'selfManagement.reset'}) }</Button>
</Space> </Space>
{state.filterSearch && ( {state.filterSearch && (
<Space size={20} style={{ marginBottom: '24px' }}> <Space size={20} style={{ marginBottom: '24px' }}>
...@@ -195,9 +193,9 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => { ...@@ -195,9 +193,9 @@ const CouponsLayout: React.FC<CouponsLayoutProps> = (props: any) => {
name='id' name='id'
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
<Input style={{ width: '160px' }} placeholder='优惠劵ID' /> <Input style={{ width: '160px' }} placeholder={intl.formatMessage({ id: 'selfManagement.aCouponID' })} />
</Form.Item> </Form.Item>
<Button type='primary' htmlType="submit">查询</Button> <Button type='primary' htmlType="submit">{ intl.formatMessage({ id: 'selfManagement.theQuery'}) }</Button>
</Space> </Space>
)} )}
{/* 优惠券列表 */} {/* 优惠券列表 */}
......
import { ISchema } from "@formily/antd"; import { ISchema } from "@formily/antd";
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getIntl} from 'umi'
const intl = getIntl();
export const schema: ISchema = { export const schema: ISchema = {
type: 'object', type: 'object',
...@@ -14,7 +16,7 @@ export const schema: ISchema = { ...@@ -14,7 +16,7 @@ export const schema: ISchema = {
type: { type: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '优惠劵类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.couponType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -25,7 +27,7 @@ export const schema: ISchema = { ...@@ -25,7 +27,7 @@ export const schema: ISchema = {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '优惠劵名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheCoupon'})}`,
align: "flex-left", align: "flex-left",
}, },
}, },
...@@ -57,7 +59,7 @@ export const schema: ISchema = { ...@@ -57,7 +59,7 @@ export const schema: ISchema = {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -71,7 +73,7 @@ export const schema: ISchema = { ...@@ -71,7 +73,7 @@ export const schema: ISchema = {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: "查询" children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
......
import { useIntl } from 'umi';
import React, { useCallback, useState, useEffect } from 'react'; import React, { useCallback, useState, useEffect } from 'react';
import { Form, Checkbox, Row, Col, Image } from 'antd'; import { Form, Checkbox, Row, Col, Image } from 'antd';
import CardLayout from '../card'; import CardLayout from '../card';
...@@ -29,6 +30,7 @@ interface PartakeUserLayoutProps { ...@@ -29,6 +30,7 @@ interface PartakeUserLayoutProps {
const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => { const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
const { onGetLevel, onSetLevel, setMemberType } = props const { onGetLevel, onSetLevel, setMemberType } = props
const intl = useIntl();
const [allUser, setAllUser] = useState<any[]>([]); const [allUser, setAllUser] = useState<any[]>([]);
const [user, setUser] = useState<Number[]>([]); const [user, setUser] = useState<Number[]>([]);
const [levelConfig, setLevelConfig] = useState<any[]>([]); const [levelConfig, setLevelConfig] = useState<any[]>([]);
...@@ -79,14 +81,14 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => { ...@@ -79,14 +81,14 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
return ( return (
<CardLayout <CardLayout
id="partakeUserLayout" id="partakeUserLayout"
title="参与用户" title={intl.formatMessage({ id: 'selfManagement.participateInTheUser'})}
weight weight
> >
<Form.Item <Form.Item
name="allUser" name="allUser"
label="适用新老会员" label={intl.formatMessage({ id: 'selfManagement.members'})}
tooltip="当天平台审核通过的平台会员为新会员,非当天审核通过的平台会员为老会员" tooltip={intl.formatMessage({ id: 'selfManagement.reviewPlatformThroughPlatformMembersMemberThroughPlatformMembersMembers'})}
rules={[{ required: true, message: '请选择适用新老会员' }]} rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectMembers'})}` }]}
className={style.rulesLayout} className={style.rulesLayout}
> >
<Checkbox.Group onChange={handleChange}> <Checkbox.Group onChange={handleChange}>
...@@ -107,25 +109,25 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => { ...@@ -107,25 +109,25 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
<Row> <Row>
<Col span={6}> <Col span={6}>
<div className={style.cell}> <div className={style.cell}>
<h5 className={style.label}>会员类型: </h5> <h5 className={style.label}>{intl.formatMessage({ id: 'selfManagement.TypeMembership' })}: </h5>
<h5 className={style.content}>{item.memberTypeName}</h5> <h5 className={style.content}>{item.memberTypeName}</h5>
</div> </div>
</Col> </Col>
<Col span={6}> <Col span={6}>
<div className={style.cell}> <div className={style.cell}>
<h5 className={style.label}>会员角色: </h5> <h5 className={style.label}>{intl.formatMessage({ id: 'selfManagement.MemberRole' })}: </h5>
<h5 className={style.content}>{item.roleName}</h5> <h5 className={style.content}>{item.roleName}</h5>
</div> </div>
</Col> </Col>
<Col span={6}> <Col span={6}>
<div className={style.cell}> <div className={style.cell}>
<h5 className={style.label}>等级类型: </h5> <h5 className={style.label}>{intl.formatMessage({ id: 'selfManagement.GradeType' })}: </h5>
<h5 className={style.content}>{item.levelTypeName}</h5> <h5 className={style.content}>{item.levelTypeName}</h5>
</div> </div>
</Col> </Col>
<Col span={6}> <Col span={6}>
<div className={style.cell}> <div className={style.cell}>
<h5 className={style.label}>等级标签: </h5> <h5 className={style.label}>{intl.formatMessage({ id: 'selfManagement.LevelLabel' })}: </h5>
<h5 className={style.content}><Image width={56} height={16} preview={false} src={PIC_MAP[item.level]} /></h5> <h5 className={style.content}><Image width={56} height={16} preview={false} src={PIC_MAP[item.level]} /></h5>
</div> </div>
</Col> </Col>
......
import { useIntl } from 'umi';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Form, Row, Col, Image } from 'antd'; import { Form, Row, Col, Image } from 'antd';
import cx from 'classnames'; import cx from 'classnames';
...@@ -28,6 +29,7 @@ interface shopListProps { ...@@ -28,6 +29,7 @@ interface shopListProps {
} }
const ShopLayout: React.FC<shopListProps> = (props: any) => { const ShopLayout: React.FC<shopListProps> = (props: any) => {
const intl = useIntl();
const { onGetShopList, onSetShopList } = props; const { onGetShopList, onSetShopList } = props;
const [mallList, setMallList] = useState<ShopItem[]>([]); const [mallList, setMallList] = useState<ShopItem[]>([]);
...@@ -75,7 +77,7 @@ const ShopLayout: React.FC<shopListProps> = (props: any) => { ...@@ -75,7 +77,7 @@ const ShopLayout: React.FC<shopListProps> = (props: any) => {
return ( return (
<CardLayout <CardLayout
id="shopLayout" id="shopLayout"
title="适用商城" title={intl.formatMessage({ id: 'selfManagement.applyToMall'})}
weight weight
> >
<Form.Item <Form.Item
......
import { useIntl } from 'umi';
import React, { Fragment, useRef, useState } from 'react'; import React, { Fragment, useRef, useState } from 'react';
import { history } from 'umi'; import { history } from 'umi';
...@@ -19,6 +20,7 @@ import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor'; ...@@ -19,6 +20,7 @@ import { InnerStatusColor, OuterStatusColor } from '../../common/tagColor';
import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantActivityPageTobeSubmitExam, postMarketingMerchantActivityDelete, postMarketingMerchantActivityDeleteBatch, postMarketingMerchantActivitySubmitExamine, postMarketingMerchantActivitySubmitExamineBatch } from '@/services/MarketingV2Api'; import { getMarketingMerchantActivityGetActivityTypeList, getMarketingMerchantActivityPageTobeSubmitExam, postMarketingMerchantActivityDelete, postMarketingMerchantActivityDeleteBatch, postMarketingMerchantActivitySubmitExamine, postMarketingMerchantActivitySubmitExamineBatch } from '@/services/MarketingV2Api';
const ReadySubmitExamine = () => { const ReadySubmitExamine = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowkeys, setRowKeys] = useState<Array<number>>([]); const [rowkeys, setRowKeys] = useState<Array<number>>([]);
const [deleteLoading, setDeleteLoading] = useState<boolean>(false); const [deleteLoading, setDeleteLoading] = useState<boolean>(false);
...@@ -60,36 +62,36 @@ const ReadySubmitExamine = () => { ...@@ -60,36 +62,36 @@ const ReadySubmitExamine = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -97,7 +99,7 @@ const ReadySubmitExamine = () => { ...@@ -97,7 +99,7 @@ const ReadySubmitExamine = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -105,24 +107,20 @@ const ReadySubmitExamine = () => { ...@@ -105,24 +107,20 @@ const ReadySubmitExamine = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text, _record) => ( render: (_text, _record) => (
<Fragment> <Fragment>
{_record.submit && ( {_record.submit && (
<Popconfirm okButtonProps={{ loading: submitLoading }} title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => fetchSubmitBatch(_record.id)}> <Popconfirm okButtonProps={{ loading: submitLoading }} title={intl.formatMessage({ id: 'selfManagement.sureYouWantToSubmit?'})} okText={intl.formatMessage({ id: 'selfManagement.is'})} cancelText={intl.formatMessage({ id: 'selfManagement.no'})} onConfirm={() => fetchSubmitBatch(_record.id)}>
<Button type='link'> <Button type='link'>{ intl.formatMessage({ id: 'selfManagement.submit'}) }</Button>
提交
</Button>
</Popconfirm> </Popconfirm>
)} )}
{_record.update && (<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/edit?id=${_record.id}`)}>修改</Button>)} {_record.update && (<Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/edit?id=${_record.id}`)}>{ intl.formatMessage({ id: 'selfManagement.modifyThe'}) }</Button>)}
{_record.delete && ( {_record.delete && (
<Popconfirm okButtonProps={{ loading: deleteLoading }} title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => fetchDeleteBatch(_record.id)}> <Popconfirm okButtonProps={{ loading: deleteLoading }} title={intl.formatMessage({ id: 'selfManagement.sureYouWantToDelete?'})} okText={intl.formatMessage({ id: 'selfManagement.is'})} cancelText={intl.formatMessage({ id: 'selfManagement.no'})} onConfirm={() => fetchDeleteBatch(_record.id)}>
<Button type='link'> <Button type='link'>{ intl.formatMessage({ id: 'selfManagement.delete'}) }</Button>
删除
</Button>
</Popconfirm> </Popconfirm>
)} )}
</Fragment> </Fragment>
...@@ -170,7 +168,7 @@ const ReadySubmitExamine = () => { ...@@ -170,7 +168,7 @@ const ReadySubmitExamine = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
}, },
}, },
} }
...@@ -200,7 +198,7 @@ const ReadySubmitExamine = () => { ...@@ -200,7 +198,7 @@ const ReadySubmitExamine = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -209,7 +207,7 @@ const ReadySubmitExamine = () => { ...@@ -209,7 +207,7 @@ const ReadySubmitExamine = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -218,7 +216,7 @@ const ReadySubmitExamine = () => { ...@@ -218,7 +216,7 @@ const ReadySubmitExamine = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -233,7 +231,7 @@ const ReadySubmitExamine = () => { ...@@ -233,7 +231,7 @@ const ReadySubmitExamine = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: "查询" children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
...@@ -248,24 +246,18 @@ const ReadySubmitExamine = () => { ...@@ -248,24 +246,18 @@ const ReadySubmitExamine = () => {
type="primary" type="primary"
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/add`)} onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/add`)}
> >{ intl.formatMessage({ id: 'selfManagement.new'}) }</Button>
新增
</Button>
<Button <Button
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
loading={deleteLoading} loading={deleteLoading}
onClick={() => fetchDeleteBatch()} onClick={() => fetchDeleteBatch()}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
> >{ intl.formatMessage({ id: 'selfManagement.batchDelete'}) }</Button>
批量删除
</Button>
<Button <Button
loading={submitLoading} loading={submitLoading}
onClick={() => fetchSubmitBatch()} onClick={() => fetchSubmitBatch()}
disabled={rowkeys.length === 0} disabled={rowkeys.length === 0}
> >{ intl.formatMessage({ id: 'selfManagement.batchSubmitAudit'}) }</Button>
批量提交审核
</Button>
</Space> </Space>
</Col> </Col>
</Row> </Row>
......
import { useIntl } from 'umi';
import React, { Fragment, useRef, useState } from 'react'; import React, { Fragment, useRef, useState } from 'react';
import { Badge, Button, Tag } from 'antd'; import { Badge, Button, Tag } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
...@@ -24,6 +25,7 @@ type dateInfoProps = { ...@@ -24,6 +25,7 @@ type dateInfoProps = {
} }
const Search = () => { const Search = () => {
const intl = useIntl();
const ref = useRef<any>({}); const ref = useRef<any>({});
const [dateInfo, setDateInfo] = useState<dateInfoProps>(); const [dateInfo, setDateInfo] = useState<dateInfoProps>();
const [dateVisible, setDateVisible] = useState<boolean>(false); const [dateVisible, setDateVisible] = useState<boolean>(false);
...@@ -40,7 +42,7 @@ const Search = () => { ...@@ -40,7 +42,7 @@ const Search = () => {
const handleOperate = (record, operate) => { const handleOperate = (record, operate) => {
setDateInfo({ setDateInfo({
id: record.id, id: record.id,
title: operate === 'stop' ? '终止' : '启动', title: operate === 'stop' ? `${intl.formatMessage({ id: 'selfManagement.terminationOf'})}` : `${intl.formatMessage({ id: 'selfManagement.startThe'})}`,
fieldApi: Api(operate) fieldApi: Api(operate)
}) })
setDateVisible(true) setDateVisible(true)
...@@ -48,36 +50,36 @@ const Search = () => { ...@@ -48,36 +50,36 @@ const Search = () => {
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '活动ID', title: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
key: 'id', key: 'id',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '活动名称', title: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
key: 'activityName', key: 'activityName',
dataIndex: 'activityName', dataIndex: 'activityName',
render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/search/preview?id=${record.id}`}>{text}</EyePreview> render: (text, record) => <EyePreview url={`/memberCenter/marketingAbility/selfManagement/search/preview?id=${record.id}`}>{text}</EyePreview>
}, },
{ {
title: '活动类型', title: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
key: 'activityType', key: 'activityType',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (_text, record) => <>{record.activityTypeName}</>, render: (_text, record) => <>{record.activityTypeName}</>,
}, },
{ {
title: '活动开始时间', title: `${intl.formatMessage({ id: 'selfManagement.activitiesStartTime'})}`,
key: 'startTime', key: 'startTime',
dataIndex: 'startTime', dataIndex: 'startTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '活动结束时间', title: `${intl.formatMessage({ id: 'selfManagement.activityOverTime'})}`,
key: 'endTime', key: 'endTime',
dataIndex: 'endTime', dataIndex: 'endTime',
render: (text) => format(text) render: (text) => format(text)
}, },
{ {
title: '外部状态', title: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
key: 'outerStatus', key: 'outerStatus',
dataIndex: 'outerStatus', dataIndex: 'outerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -85,7 +87,7 @@ const Search = () => { ...@@ -85,7 +87,7 @@ const Search = () => {
) )
}, },
{ {
title: '内部状态', title: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
key: 'innerStatus', key: 'innerStatus',
dataIndex: 'innerStatus', dataIndex: 'innerStatus',
render: (_text, record) => ( render: (_text, record) => (
...@@ -93,14 +95,14 @@ const Search = () => { ...@@ -93,14 +95,14 @@ const Search = () => {
) )
}, },
{ {
title: '操作', title: `${intl.formatMessage({ id: 'selfManagement.operation'})}`,
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text, record) => ( render: (_text, record) => (
<Fragment> <Fragment>
{record.update && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/edit?id=${record.id}`)}>修改</Button>} {record.update && <Button type='link' onClick={() => history.push(`/memberCenter/marketingAbility/selfManagement/readySubmitExamine/edit?id=${record.id}`)}>{ intl.formatMessage({ id: 'selfManagement.modifyThe'}) }</Button>}
{record.stop && <Button type='link' onClick={() => handleOperate(record, 'stop')}>终止</Button>} {record.stop && <Button type='link' onClick={() => handleOperate(record, 'stop')}>{ intl.formatMessage({ id: 'selfManagement.terminationOf'}) }</Button>}
{record.restart && <Button type='link' onClick={() => handleOperate(record, 'start')}>重新启动</Button>} {record.restart && <Button type='link' onClick={() => handleOperate(record, 'start')}>{ intl.formatMessage({ id: 'selfManagement.restartThe'}) }</Button>}
</Fragment> </Fragment>
) )
} }
...@@ -157,7 +159,7 @@ const Search = () => { ...@@ -157,7 +159,7 @@ const Search = () => {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
placeholder: '活动ID', placeholder: `${intl.formatMessage({ id: 'selfManagement.activityID'})}`,
align: "flex-left", align: "flex-left",
}, },
}, },
...@@ -189,7 +191,7 @@ const Search = () => { ...@@ -189,7 +191,7 @@ const Search = () => {
activityName: { activityName: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动名称', placeholder: `${intl.formatMessage({ id: 'selfManagement.theNameOfTheEvent'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -198,7 +200,7 @@ const Search = () => { ...@@ -198,7 +200,7 @@ const Search = () => {
'[startTime,endTime]': { '[startTime,endTime]': {
type: 'daterange', type: 'daterange',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间', '结束时间'], placeholder: [`${intl.formatMessage({ id: 'selfManagement.theStartTime'})}`, `${intl.formatMessage({ id: 'selfManagement.theEndOfTime'})}`],
style: { style: {
width: 240, width: 240,
}, },
...@@ -207,7 +209,7 @@ const Search = () => { ...@@ -207,7 +209,7 @@ const Search = () => {
activityType: { activityType: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '活动类型', placeholder: `${intl.formatMessage({ id: 'selfManagement.theActivityType'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -217,7 +219,7 @@ const Search = () => { ...@@ -217,7 +219,7 @@ const Search = () => {
outerStatus: { outerStatus: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '外部状态', placeholder: `${intl.formatMessage({ id: 'selfManagement.externalState'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -227,7 +229,7 @@ const Search = () => { ...@@ -227,7 +229,7 @@ const Search = () => {
innerStatus: { innerStatus: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '内部状态', placeholder: `${intl.formatMessage({ id: 'selfManagement.internalState'})}`,
style: { style: {
width: 160, width: 160,
}, },
...@@ -242,7 +244,7 @@ const Search = () => { ...@@ -242,7 +244,7 @@ const Search = () => {
span: 1 span: 1
}, },
"x-component-props": { "x-component-props": {
children: "查询" children: `${intl.formatMessage({ id: 'selfManagement.theQuery'})}`
} }
} }
} }
......
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