Commit d7e013f8 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 7c4e976a 397f432b
......@@ -66,3 +66,81 @@ export const SUITABLE_TYPE_NEW_MEMBER = 3;
* 老会员(仅会员用户)
*/
export const SUITABLE_TYPE_OLD_MEMBER = 4;
/** 特价促销 */
export const ACTIVITY_TYPE_1 = 1
/** 直降促销 */
export const ACTIVITY_TYPE_2 = 2
/** 折价促销 */
export const ACTIVITY_TYPE_3 = 3
/** 满量促销 */
export const ACTIVITY_TYPE_4 = 4
/** 满额促销 */
export const ACTIVITY_TYPE_5 = 5
/** 赠送促销 */
export const ACTIVITY_TYPE_6 = 6
/** 多件促销 */
export const ACTIVITY_TYPE_7 = 7
/** 组合促销 */
export const ACTIVITY_TYPE_8 = 8
/** 拼团 */
export const ACTIVITY_TYPE_9 = 9
/** 抽奖 */
export const ACTIVITY_TYPE_10 = 10
/** 砍价 */
export const ACTIVITY_TYPE_11 = 11
/** 秒杀 */
export const ACTIVITY_TYPE_12 = 12
/** 换购 */
export const ACTIVITY_TYPE_13 = 13
/** 预售 */
export const ACTIVITY_TYPE_14 = 14
/** 套餐 */
export const ACTIVITY_TYPE_15 = 15
/** 试用 */
export const ACTIVITY_TYPE_16 = 16
/** 满量促销 - 满量减 1 */
export const MANLIANG_JIAN = 1
/** 满量促销 - 满量折 2 */
export const MANLIANG_ZHE = 2
/** 满额促销 - 满额减 1 */
export const MANE_JIAN = 1
/** 满额促销 - 满额折 2 */
export const MANE_ZHE = 2
/** 赠送促销 (赠送促销类型 - 满额赠 1) */
export const MANE_ZENG = 1
/** 赠送促销 (赠送促销类型 - 卖商品赠 2) */
export const BUYPRODUCT_ZENG = 2
/** 赠送促销 (赠品类型 - 赠商品 1) */
export const WHITGIFT_PRODUCT = 1
/** 赠送促销 (赠品类型 - 赠优惠券 2) */
export const BUYPRODUCT_WHITGIFT = 2
/** 砍价 (每次砍价金额 - 随机金额 1) */
export const RANDOM_AMOUNT = 1
/** 砍价 (每次砍价金额 - 固定金额 2) */
export const FIXATION_AMOUNT = 2
/** 抽奖 订单抽奖 1 */
export const LOTTERY_ORDERLOTTERY = 1
/** 抽奖 积分抽奖 2 */
export const LOTTERY_INTEGRALLOTTERY = 2
/** 抽奖 行为抽奖 3 */
export const LOTTERY_BEHAVIORLOTTERY = 3
/** 抽奖 活动抽奖 4 */
export const LOTTERY_ACTIVITYLOTTERY = 4
/** 抽奖 申请会员 1 */
export const LOTTERY_APPLYMEMBER = 1
/** 抽奖 签到 2 */
export const LOTTERY_SIGNIN= 2
/** 抽奖 抽奖次数 每日 1 */
export const EVERY_DAY= 1
/** 抽奖 抽奖次数 每周 2 */
export const EVERY_WEEK= 2
/** 抽奖 抽奖次数 每月 3 */
export const EVERY_MONTH= 3
/** 抽奖 抽奖次数 活动期内 4 */
export const SEASON_ENTO= 4
/** 换购 换购类型 满额换购 1 */
export const FULL_EXCHANGE= 1
/** 换购 换购类型 买商品换购 2 */
export const BUYPRODUCT_EXCHANGE= 2
......@@ -8,9 +8,9 @@ import ListModalLayout from '@/pages/transaction/marketingAbility/components/lis
import CollocationLayout from '@/pages/transaction/marketingAbility/components/collocationLayout';
import { remindLayout, RemindLayoutProps } from '@/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/components/productListLayout/remind';
import CouponsListLayout from '@/pages/transaction/marketingAbility/components/couponsListLayout';
import { number } from 'yargs';
import { postMarketingMerchantActivityGetFilterSkuId } from '@/services/MarketingV2Api';
import { getIntl } from 'umi';
import { ACTIVITY_TYPE_13, ACTIVITY_TYPE_15, ACTIVITY_TYPE_6 } from '@/constants/marketing';
type optionProps = {
/** key */
......@@ -114,25 +114,25 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
message.warning(`${intl.formatMessage({ id: 'marketingAbility.qingxuanzeshiyongshangcheng!' })}`);
return
}
if ((value === 6 || value === 13) && isEmpty(activityDefined)) {
if ((value === ACTIVITY_TYPE_6 || value === ACTIVITY_TYPE_13) && isEmpty(activityDefined)) {
message.warning(`${intl.formatMessage({ id: 'marketingAbility.qingxuanzehuodongguize!' })}`);
return
}
if ((value === 6) && !isEmpty(activityDefined) && (!activityDefined.giveType || !activityDefined.giftType)) {
if ((value === ACTIVITY_TYPE_6) && !isEmpty(activityDefined) && (!activityDefined.giveType || !activityDefined.giftType)) {
message.warning(`${intl.formatMessage({ id: 'marketingAbility.qingxuanzezengsongcuxiaoleixinghezengpinleixing!' })}`);
return
}
if ((value === 13) && !isEmpty(activityDefined) && !activityDefined.swapType) {
if ((value === ACTIVITY_TYPE_13) && !isEmpty(activityDefined) && !activityDefined.swapType) {
message.warning(`${intl.formatMessage({ id: 'marketingAbility.qingxuanzehuangouleixing!' })}`);
return
}
if (value === 6) {
if (value === ACTIVITY_TYPE_6) {
setRemind(remindLayout(value, activityDefined.giveType, activityDefined.giftType));
}
if (value === 13) {
if (value === ACTIVITY_TYPE_13) {
setRemind(remindLayout(value, activityDefined.swapType));
}
if (value === 15) {
if (value === ACTIVITY_TYPE_15) {
setRemind(remindLayout(value));
}
if (itrue && flag) {
......@@ -171,13 +171,13 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
return
}
const activityDefined = form.getFieldValue('activityDefined') || getActivityDefinedBO;
if (value === 6) {
if (value === ACTIVITY_TYPE_6) {
setRemind(remindLayout(value, activityDefined.giveType, activityDefined.giftType));
}
if (value === 13) {
if (value === ACTIVITY_TYPE_13) {
setRemind(remindLayout(value, activityDefined.swapType));
}
if (value === 15) {
if (value === ACTIVITY_TYPE_15) {
setRemind(remindLayout(value));
}
form.setFieldsValue({
......
import { ACTIVITY_TYPE_13, ACTIVITY_TYPE_15, ACTIVITY_TYPE_6, FULL_EXCHANGE, MANE_ZENG, WHITGIFT_PRODUCT } from '@/constants/marketing';
import { getIntl } from 'umi'
export type RemindLayoutProps = {
......@@ -24,7 +25,7 @@ export const remindLayout = (int, giveType?, giftType?) => {
const give = (giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.top-up'})}`: `${intl.formatMessage({ id: 'paltformSign.BuyGoods'})}`);
const gift = (giftType === 1 ? `${intl.formatMessage({ id: 'paltformSign.goods'})}` : `${intl.formatMessage({ id: 'paltformSign.coupon'})}`);
switch(int) {
case 6:
case ACTIVITY_TYPE_6:
return {
name: 'giveValue',
value: giftType,
......@@ -34,31 +35,31 @@ export const remindLayout = (int, giveType?, giftType?) => {
listTitle: `${give}${gift}`,
label: {
1: `${intl.formatMessage({ id: 'paltformSign.preferentialThreshold'})}`,
2: giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.yuan'})}` : `${intl.formatMessage({ id: 'paltformSign.a'})}`,
3: giftType === 1 ? `${intl.formatMessage({ id: 'paltformSign.freeGoods'})}` : `${intl.formatMessage({ id: 'paltformSign.coupons'})}`,
2: giveType === MANE_ZENG ? `${intl.formatMessage({ id: 'paltformSign.yuan'})}` : `${intl.formatMessage({ id: 'paltformSign.a'})}`,
3: giftType === WHITGIFT_PRODUCT ? `${intl.formatMessage({ id: 'paltformSign.freeGoods'})}` : `${intl.formatMessage({ id: 'paltformSign.coupons'})}`,
4: `${intl.formatMessage({ id: 'paltformSign.giveTheNumber'})}`,
5: `${intl.formatMessage({ id: 'paltformSign.buy'})}`,
6: '',
},
message: {
1: giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.pleaseSelectACommodity'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSelectTheCoupons'})}`,
2: giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.pleaseSetTheGoods'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSetTheCoupons'})}`,
3: giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.pleaseSelectACommodity'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSelectTheCoupons'})}`,
1: giveType === MANE_ZENG ? `${intl.formatMessage({ id: 'paltformSign.pleaseSelectACommodity'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSelectTheCoupons'})}`,
2: giveType === MANE_ZENG ? `${intl.formatMessage({ id: 'paltformSign.pleaseSetTheGoods'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSetTheCoupons'})}`,
3: giveType === MANE_ZENG ? `${intl.formatMessage({ id: 'paltformSign.pleaseSelectACommodity'})}` : `${intl.formatMessage({ id: 'paltformSign.pleaseSelectTheCoupons'})}`,
4: `${intl.formatMessage({ id: 'paltformSign.pleaseEnterADiscountThreshold'})}`,
5: `${intl.formatMessage({ id: 'paltformSign.pleaseEnterANumber'})}`,
}
}
case 13: {
case ACTIVITY_TYPE_13: {
return {
name: 'swapValue',
value: 1,
value: FULL_EXCHANGE,
type: 'limitValue',
modalTitle: `设置换购商品-${give}换购商品`,
buttonTitle: `${intl.formatMessage({ id: 'paltformSign.addBuyGoods'})}`,
listTitle: `${give}换购商品`,
label: {
1: `${intl.formatMessage({ id: 'paltformSign.redemptionThreshold'})}`,
2: giveType === 1 ? `${intl.formatMessage({ id: 'paltformSign.yuan'})}` : `${intl.formatMessage({ id: 'paltformSign.a'})}`,
2: giveType === FULL_EXCHANGE ? `${intl.formatMessage({ id: 'paltformSign.yuan'})}` : `${intl.formatMessage({ id: 'paltformSign.a'})}`,
3: `${intl.formatMessage({ id: 'paltformSign.buyGoods'})}`,
4: `${intl.formatMessage({ id: 'paltformSign.buyTheNumber'})}`,
5: intl.formatMessage({ id: 'paltformSign.fill' }),
......@@ -73,7 +74,7 @@ export const remindLayout = (int, giveType?, giftType?) => {
}
}
}
case 15:
case ACTIVITY_TYPE_15:
return {
name: 'groupValue',
value: 1,
......
......@@ -4,7 +4,8 @@ import { Space, Tooltip } from 'antd';
import StatusTag from '@/components/StatusTag';
import { format } from '@/pages/transaction/common/dateFormat';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { getIntl} from 'umi'
import { getIntl } from 'umi'
import { ACTIVITY_TYPE_1, ACTIVITY_TYPE_10, ACTIVITY_TYPE_11, ACTIVITY_TYPE_12, ACTIVITY_TYPE_13, ACTIVITY_TYPE_14, ACTIVITY_TYPE_15, ACTIVITY_TYPE_16, ACTIVITY_TYPE_2, ACTIVITY_TYPE_3, ACTIVITY_TYPE_4, ACTIVITY_TYPE_5, ACTIVITY_TYPE_6, ACTIVITY_TYPE_7, ACTIVITY_TYPE_8, ACTIVITY_TYPE_9, BUYPRODUCT_EXCHANGE, BUYPRODUCT_WHITGIFT, BUYPRODUCT_ZENG, FIXATION_AMOUNT, FULL_EXCHANGE, MANE_JIAN, MANE_ZENG, MANE_ZHE, MANLIANG_JIAN, MANLIANG_ZHE, RANDOM_AMOUNT, WHITGIFT_PRODUCT } from '@/constants/marketing';
const intl = getIntl();
/** * 活动类型 */
......@@ -44,336 +45,336 @@ export enum ACTIVITYTYPE {
}
/** 活动类型文字 */
export const ACTIVITYTYPENAME = {
1: `${intl.formatMessage({ id: 'paltformSign.noSales'})}`,
2: `${intl.formatMessage({ id: 'paltformSign.straightDownThePromotion'})}`,
3: `${intl.formatMessage({ id: 'paltformSigniscountSalesPromotion'})}`,
4: `${intl.formatMessage({ id: 'paltformSign.fullAmountOfThePromotion'})}`,
5: `${intl.formatMessage({ id: 'paltformSign.quotaPromotion'})}`,
6: `${intl.formatMessage({ id: 'paltformSign.giftPromotion'})}`,
7: `${intl.formatMessage({ id: 'paltformSign.moreThanAPromotion'})}`,
8: `${intl.formatMessage({ id: 'paltformSign.combinationOfPromotion'})}`,
9: `${intl.formatMessage({ id: 'paltformSign.spellGroup'})}`,
10: `${intl.formatMessage({ id: 'paltformSign.luckyDraw'})}`,
11: `${intl.formatMessage({ id: 'paltformSign.bargaining'})}`,
12: `${intl.formatMessage({ id: 'paltformSign.secondsKill'})}`,
13: `${intl.formatMessage({ id: 'paltformSign.buy'})}`,
14: `${intl.formatMessage({ id: 'paltformSign.openToBooking'})}`,
15: `${intl.formatMessage({ id: 'paltformSign.package'})}`,
16: `${intl.formatMessage({ id: 'paltformSign.theTrial'})}`,
1: `${intl.formatMessage({ id: 'paltformSign.noSales' })}`,
2: `${intl.formatMessage({ id: 'paltformSign.straightDownThePromotion' })}`,
3: `${intl.formatMessage({ id: 'paltformSigniscountSalesPromotion' })}`,
4: `${intl.formatMessage({ id: 'paltformSign.fullAmountOfThePromotion' })}`,
5: `${intl.formatMessage({ id: 'paltformSign.quotaPromotion' })}`,
6: `${intl.formatMessage({ id: 'paltformSign.giftPromotion' })}`,
7: `${intl.formatMessage({ id: 'paltformSign.moreThanAPromotion' })}`,
8: `${intl.formatMessage({ id: 'paltformSign.combinationOfPromotion' })}`,
9: `${intl.formatMessage({ id: 'paltformSign.spellGroup' })}`,
10: `${intl.formatMessage({ id: 'paltformSign.luckyDraw' })}`,
11: `${intl.formatMessage({ id: 'paltformSign.bargaining' })}`,
12: `${intl.formatMessage({ id: 'paltformSign.secondsKill' })}`,
13: `${intl.formatMessage({ id: 'paltformSign.buy' })}`,
14: `${intl.formatMessage({ id: 'paltformSign.openToBooking' })}`,
15: `${intl.formatMessage({ id: 'paltformSign.package' })}`,
16: `${intl.formatMessage({ id: 'paltformSign.theTrial' })}`,
}
const lotteryNumType = {
1: `${intl.formatMessage({ id: 'paltformSignaily'})}`,
2: `${intl.formatMessage({ id: 'paltformSign.onceAWeek'})}`,
3: `${intl.formatMessage({ id: 'paltformSign.aMonth'})}`,
4: `${intl.formatMessage({ id: 'paltformSign.thePeriodOfActivity'})}`,
1: `${intl.formatMessage({ id: 'paltformSignaily' })}`,
2: `${intl.formatMessage({ id: 'paltformSign.onceAWeek' })}`,
3: `${intl.formatMessage({ id: 'paltformSign.aMonth' })}`,
4: `${intl.formatMessage({ id: 'paltformSign.thePeriodOfActivity' })}`,
}
/** 活动类型 */
export const GeneralEffect = (int, data) => {
switch (Number(int)) {
case 1:
case 2:
case 3:
case ACTIVITY_TYPE_1:
case ACTIVITY_TYPE_2:
case ACTIVITY_TYPE_3:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}`
label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}`
},
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 4:
case 5:
case ACTIVITY_TYPE_4:
case ACTIVITY_TYPE_5:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.fill' })}${int === 4 ? `${intl.formatMessage({ id: 'paltformSign.theAmount'})}` : `${intl.formatMessage({ id: 'paltformSign.theForehead'})}`}${intl.formatMessage({ id: 'paltformSign.saleType' })}`, extra: <>
{(int === 4 && data.type === 1) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullAmountMinus'})} />}
{(int === 4 && data.type === 2) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullAmount'})} />}
{(int === 5 && data.type === 1) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.quotaReduction'})} />}
{(int === 5 && data.type === 2) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullFold'})} />}
label: `${intl.formatMessage({ id: 'paltformSign.fill' })}${int === ACTIVITY_TYPE_4 ? `${intl.formatMessage({ id: 'paltformSign.theAmount' })}` : `${intl.formatMessage({ id: 'paltformSign.theForehead' })}`}${intl.formatMessage({ id: 'paltformSign.saleType' })}`, extra: <>
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_JIAN) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullAmountMinus' })} />}
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_ZHE) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullAmount' })} />}
{(int === ACTIVITY_TYPE_5 && data.type === MANE_JIAN) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.quotaReduction' })} />}
{(int === ACTIVITY_TYPE_5 && data.type === MANE_ZHE) && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullFold' })} />}
</>
},
{
label: <>
{(int === 4 && data.type === 1) && `${intl.formatMessage({ id: 'paltformSign.fullAmountMinus'})}`}
{(int === 4 && data.type === 2) && `${intl.formatMessage({ id: 'paltformSign.fullAmount'})}`}
{(int === 5 && data.type === 1) && `${intl.formatMessage({ id: 'paltformSign.quotaReduction'})}`}
{(int === 5 && data.type === 2) && `${intl.formatMessage({ id: 'paltformSign.fullFold'})}`}
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_JIAN) && `${intl.formatMessage({ id: 'paltformSign.fullAmountMinus' })}`}
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_ZHE) && `${intl.formatMessage({ id: 'paltformSign.fullAmount' })}`}
{(int === ACTIVITY_TYPE_5 && data.type === MANE_JIAN) && `${intl.formatMessage({ id: 'paltformSign.quotaReduction' })}`}
{(int === ACTIVITY_TYPE_5 && data.type === MANE_ZHE) && `${intl.formatMessage({ id: 'paltformSign.fullFold' })}`}
</>, extra: <>
{(int === 4 && data.type === 1) && <Space direction='vertical'>
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_JIAN) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`${intl.formatMessage({ id: 'paltformSign.fill' })} ${item.key} ${intl.formatMessage({ id: 'paltformSign.indivual' })}, ${intl.formatMessage({ id: 'paltformSign.reduce' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div>))}
</Space>}
{(int === 4 && data.type === 2) && <Space direction='vertical'>
{(int === ACTIVITY_TYPE_4 && data.type === MANLIANG_ZHE) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`${intl.formatMessage({ id: 'paltformSign.fill' })} ${item.key} ${intl.formatMessage({ id: 'paltformSign.indivual' })}, ${intl.formatMessage({ id: 'paltformSign.give' })} ${item.value} ${intl.formatMessage({ id: 'paltformSign.foldMoney' })}`}</div>))}
</Space>}
{(int === 5 && data.type === 1) && <Space direction='vertical'>
{(int === ACTIVITY_TYPE_5 && data.type === MANE_JIAN) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`${intl.formatMessage({ id: 'paltformSign.fill' })} ${Number(item.key).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}, ${intl.formatMessage({ id: 'paltformSign.reduce' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div>))}
</Space>}
{(int === 5 && data.type === 2) && <Space direction='vertical'>
{(int === ACTIVITY_TYPE_5 && data.type === MANE_ZHE) && <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`${intl.formatMessage({ id: 'paltformSign.fill' })} ${Number(item.key).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}, ${intl.formatMessage({ id: 'paltformSign.give' })} ${item.value} ${intl.formatMessage({ id: 'paltformSign.foldMoney' })}`}</div>))}
</Space>}
</>
},
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 6:
case ACTIVITY_TYPE_6:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.giftPromotionType'})}`, extra: <>
{data.giveType === 1 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.giveFull' })} />}
{data.giveType === 2 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.buyGoodsGive' })} />}
label: `${intl.formatMessage({ id: 'paltformSign.giftPromotionType' })}`, extra: <>
{data.giveType === MANE_ZENG && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.giveFull' })} />}
{data.giveType === BUYPRODUCT_ZENG && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.buyGoodsGive' })} />}
</>
},
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.giftType'})}`, extra: <>
{data.giftType === 1 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.sendGoods' })} />}
{data.giftType === 2 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.aGiftCoupon' })} />}
label: `${intl.formatMessage({ id: 'paltformSign.giftType' })}`, extra: <>
{data.giftType === WHITGIFT_PRODUCT && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.sendGoods' })} />}
{data.giftType === BUYPRODUCT_WHITGIFT && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.aGiftCoupon' })} />}
</>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 7:
case ACTIVITY_TYPE_7:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.preferentialRules'})}`, extra: <Space direction='vertical'>
label: `${intl.formatMessage({ id: 'paltformSign.preferentialRules' })}`, extra: <Space direction='vertical'>
{data.ladderBOList.map(item => (<div>{`${intl.formatMessage({ id: 'paltformSign.fill' })} ${item.discount} ${intl.formatMessage({ id: 'paltformSign.jian' })}, ${intl.formatMessage({ id: 'paltformSign.give' })} ${item.num} ${intl.formatMessage({ id: 'paltformSign.foldMoney' })}`}</div>))}
</Space>
},
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 8:
case ACTIVITY_TYPE_8:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.preferentialRules'})}`, extra: `${intl.formatMessage({ id: 'paltformSign.Optional' })} ${data.num} ${intl.formatMessage({ id: 'paltformSign.jian' })}, ${intl.formatMessage({ id: 'paltformSign.pay' })} ${data.price} ${intl.formatMessage({ id: 'paltformSign.yuan' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.preferentialRules' })}`, extra: `${intl.formatMessage({ id: 'paltformSign.Optional' })} ${data.num} ${intl.formatMessage({ id: 'paltformSign.jian' })}, ${intl.formatMessage({ id: 'paltformSign.pay' })} ${data.price} ${intl.formatMessage({ id: 'paltformSign.yuan' })}` },
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 9:
case ACTIVITY_TYPE_9:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.theNumberOfClusters'})}`, extra: `${data.assembleNum} 人` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.theNumberOfClusters' })}`, extra: `${data.assembleNum} 人` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.cloudsOfTime'})}`, extra: data.assembleTime ? format(data.assembleTime) : `${ intl.formatMessage({ id: 'paltformSig.nontLimit'}) }` },
{ label: `${intl.formatMessage({ id: 'paltformSign.cloudsOfTime' })}`, extra: data.assembleTime ? format(data.assembleTime) : `${intl.formatMessage({ id: 'paltformSig.nontLimit' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.userTuxedoLimit'})}`, extra: data.joinAssembleNum ? `${data.joinAssembleNum} ${intl.formatMessage({ id: 'paltformSign.times' })}` : `${intl.formatMessage({ id: 'paltformSig.nontLimit'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.userTuxedoLimit' })}`, extra: data.joinAssembleNum ? `${data.joinAssembleNum} ${intl.formatMessage({ id: 'paltformSign.times' })}` : `${intl.formatMessage({ id: 'paltformSig.nontLimit' })}` },
]
},
]
case 10:
case ACTIVITY_TYPE_10:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSignrawType'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.lotteryNumber'})}`, extra: `${lotteryNumType[data.lotteryNumType]}限制${data.lotteryNum}${intl.formatMessage({ id: 'paltformSign.times' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe }
{ label: `${intl.formatMessage({ id: 'paltformSignrawType' })}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.lotteryNumber' })}`, extra: `${lotteryNumType[data.lotteryNumType]}限制${data.lotteryNum}${intl.formatMessage({ id: 'paltformSign.times' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe }
]
},
]
case 11:
case ACTIVITY_TYPE_11:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.everyTimeTheAmountOfBargaining'})}`, extra: <>
{data.type === 1 && <Space direction='vertical'><StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.aRandomAmount' })} /><div>{`${intl.formatMessage({ id: 'paltformSign.RandomAmountRange' })}${Number(data.randomStartPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })} ~ ${Number(data.randomEndPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div></Space>}
{data.type === 2 && <Space direction='vertical'><StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fixedAmount' })} /><div>{`${intl.formatMessage({ id: 'paltformSign.every' })}${intl.formatMessage({ id: 'paltformSign.times' })}${intl.formatMessage({ id: 'paltformSign.Bargaining' })}${Number(data.restrictPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div></Space>}
label: `${intl.formatMessage({ id: 'paltformSign.everyTimeTheAmountOfBargaining' })}`, extra: <>
{data.type === RANDOM_AMOUNT && <Space direction='vertical'><StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.aRandomAmount' })} /><div>{`${intl.formatMessage({ id: 'paltformSign.RandomAmountRange' })}${Number(data.randomStartPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })} ~ ${Number(data.randomEndPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div></Space>}
{data.type === FIXATION_AMOUNT && <Space direction='vertical'><StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fixedAmount' })} /><div>{`${intl.formatMessage({ id: 'paltformSign.every' })}${intl.formatMessage({ id: 'paltformSign.times' })}${intl.formatMessage({ id: 'paltformSign.Bargaining' })}${Number(data.restrictPrice).toFixed(2)} ${intl.formatMessage({ id: 'paltformSign.yuan' })}`}</div></Space>}
</>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.userLimitNumberOf'})}`, extra: `${intl.formatMessage({ id: 'paltformSign.SameUserLimit' })} ${data.restrictNum} ${intl.formatMessage({ id: 'paltformSign.times' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe }
{ label: `${intl.formatMessage({ id: 'paltformSign.userLimitNumberOf' })}`, extra: `${intl.formatMessage({ id: 'paltformSign.SameUserLimit' })} ${data.restrictNum} ${intl.formatMessage({ id: 'paltformSign.times' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe }
]
},
]
case 12:
case ACTIVITY_TYPE_12:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSignailySecondsToKillTime'})}`, extra: <>{format(data.startTime, 'HH:mm:ss')}~{format(data.endTime, 'HH:mm:ss')}</> },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe }
{ label: `${intl.formatMessage({ id: 'paltformSignailySecondsToKillTime' })}`, extra: <>{format(data.startTime, 'HH:mm:ss')}~{format(data.endTime, 'HH:mm:ss')}</> },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe }
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.theOriginalPriceToBuy' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 13:
case ACTIVITY_TYPE_13:
return [
{
col: [
{
label: `${intl.formatMessage({ id: 'paltformSign.buyType'})}`, extra: <>
{data.swapType === 1 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullRedemption' })} />}
{data.swapType === 2 && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.buyGoods' })} />}
label: `${intl.formatMessage({ id: 'paltformSign.buyType' })}`, extra: <>
{data.swapType === FULL_EXCHANGE && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.fullRedemption' })} />}
{data.swapType === BUYPRODUCT_EXCHANGE && <StatusTag type="default" title={intl.formatMessage({ id: 'paltformSign.buyGoods' })} />}
</>
},
{
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType'})}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: `${intl.formatMessage({ id: 'paltformSign.overlayTheActivityType' })}`, extra: <Space wrap>{data.allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
},
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules'})}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount'})}` : `${intl.formatMessage({ id: 'paltformSign.notBuy'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.transfiniteRules' })}`, extra: data.exceedRule === 1 ? `${intl.formatMessage({ id: 'paltformSign.accordingToTheIndividualPurchaseEnjoyTheHighestDiscount' })}` : `${intl.formatMessage({ id: 'paltformSign.notBuy' })}` },
]
}
]
case 14:
case ACTIVITY_TYPE_14:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.theDepositPaymentTime'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.theDepositPaymentTime' })}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.balancePaymentPaymentTime'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.balancePaymentPaymentTime' })}`, extra: '' },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.startTheDeliveryTime'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.startTheDeliveryTime' })}`, extra: '' },
]
}
]
case 15:
case ACTIVITY_TYPE_15:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons'})}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack'})}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack'})}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.superpositionOfCoupons' })}`, extra: data.allowCoupon ? `${intl.formatMessage({ id: 'paltformSign.allowTheStack' })}` : `${intl.formatMessage({ id: 'paltformSign.notAllowTheStack' })}` },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
}
]
case 16:
case ACTIVITY_TYPE_16:
return [
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.extractingUserTime'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription'})}`, extra: data.describe },
{ label: `${intl.formatMessage({ id: 'paltformSign.extractingUserTime' })}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.activityDescription' })}`, extra: data.describe },
]
},
{
col: [
{ label: `${intl.formatMessage({ id: 'paltformSign.endOfTheTrialTime'})}`, extra: '' },
{ label: `${intl.formatMessage({ id: 'paltformSign.endOfTheTrialTime' })}`, extra: '' },
]
}
]
......@@ -386,7 +387,7 @@ export const Columns = (int) => {
case 1:
return [
{
title: `${intl.formatMessage({ id: 'paltformSign.commodityImages'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.commodityImages' })}`,
key: '',
dataIndex: '',
},
......@@ -396,43 +397,43 @@ export const Columns = (int) => {
dataIndex: 'productId',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.nameOfCommodity'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.nameOfCommodity' })}`,
key: 'productName',
dataIndex: 'productName',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.category'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.category' })}`,
key: 'category',
dataIndex: 'category',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.brand'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.brand' })}`,
key: 'brand',
dataIndex: 'brand',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.unit'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.unit' })}`,
key: 'unit',
dataIndex: 'unit',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.commodityPrices'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.commodityPrices' })}`,
key: 'price',
dataIndex: 'price',
},
{
title: <Tooltip placement="top" title={intl.formatMessage({ id: 'paltformSign.activityPriceSaidMallDirectlyToTheCommoditiesPriceToSell'})}>{ intl.formatMessage({ id: 'paltformSign.activityPrice'}) }<QuestionCircleOutlined />
title: <Tooltip placement="top" title={intl.formatMessage({ id: 'paltformSign.activityPriceSaidMallDirectlyToTheCommoditiesPriceToSell' })}>{intl.formatMessage({ id: 'paltformSign.activityPrice' })}<QuestionCircleOutlined />
</Tooltip>,
key: 'activityPrice',
dataIndex: 'activityPrice',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.individualPurchaseQuantity'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.individualPurchaseQuantity' })}`,
key: 'restrictNum',
dataIndex: 'restrictNum',
},
{
title: `${intl.formatMessage({ id: 'paltformSign.theTotalNumberForPurchasingActivities'})}`,
title: `${intl.formatMessage({ id: 'paltformSign.theTotalNumberForPurchasingActivities' })}`,
key: 'restrictTotalNum',
dataIndex: 'restrictTotalNum',
},
......
......@@ -11,8 +11,9 @@ import ProductListLayout from '../../components/productListLayout';
import PartakeUserLayout from './components/partakeUserLayout';
import PrizeListLayout from './components/prizeListLayout';
import moment from 'moment';
import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, getMarketingPlatformMerchantActivityGetActivityTypeList, postMarketingMerchantActivityGetFilterSkuId, postMarketingMerchantActivitySave, postMarketingMerchantActivityUpdate, } from '@/services/MarketingV2Api';
import { getMarketingMerchantActivityDetail, getMarketingMerchantActivityDetailGoodsPage, getMarketingMerchantActivityGetActivityTypeList, postMarketingMerchantActivitySave, postMarketingMerchantActivityUpdate, } from '@/services/MarketingV2Api';
import { isEmpty } from 'lodash';
import { ACTIVITY_TYPE_10 } from '@/constants/marketing';
const layout: any = {
colon: false,
......@@ -230,7 +231,7 @@ const AddedMarketing = () => {
});
useEffect(() => {
getMarketingPlatformMerchantActivityGetActivityTypeList().then(res => {
getMarketingMerchantActivityGetActivityTypeList().then(res => {
if (res.code !== 1000) {
return
}
......@@ -278,11 +279,11 @@ const AddedMarketing = () => {
}
}}
>
<BasicInfoLayout form={form} focus$={focus$} isEdit={path === 'edit' ? true : false} />
<BasicInfoLayout avtivityTypes={avtivityTypes} form={form} focus$={focus$} isEdit={path === 'edit' ? true : false} />
<ShopLayout onGetShopList={handleGetShopList} onSetShopList={shopList} />
<RulesLayout form={form} focus$={focus$} getRule={handleGetRule} />
{value !== 10 && (<ProductListLayout refresh={refresh} itrue activityId={activityId && { activityId: activityId }} form={form} focus$={value} shopIdList={shopIdList} fieldApi={getMarketingMerchantActivityDetailGoodsPage} />)}
{value === 10 && (<PrizeListLayout form={form} prizeList={prizeList} focus$={value} />)}
{value !== ACTIVITY_TYPE_10 && (<ProductListLayout refresh={refresh} itrue activityId={activityId && { activityId: activityId }} form={form} focus$={value} shopIdList={shopIdList} fieldApi={getMarketingMerchantActivityDetailGoodsPage} />)}
{value === ACTIVITY_TYPE_10 && (<PrizeListLayout form={form} prizeList={prizeList} focus$={value} />)}
<PartakeUserLayout onGetLevel={handleGetLevel} onSetLevel={memberLevelList} setMemberType={memberType} />
</Form>
}
......
......@@ -5,9 +5,12 @@ import { EventEmitter } from '@umijs/hooks/lib/useEventEmitter'
import moment from 'moment';
import CardLayout from '../card';
import { getIntl} from 'umi'
import { isEmpty } from 'lodash';
const intl = getIntl();
interface BasicInfoProps {
/** 活动类型 */
avtivityTypes: any[],
focus$?: EventEmitter<void>,
/** FormInstance */
form?: FormInstance,
......@@ -15,27 +18,27 @@ interface BasicInfoProps {
isEdit?: boolean,
}
const avtivityTypes = [
{ lable: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.salesPromotion'})}`, value: 3 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 7 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 8 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.spellGroup'})}`, value: 9 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.luckyDraw'})}`, value: 10 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.bargaining'})}`, value: 11 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.secondsKill'})}`, value: 12 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.openToBooking'})}`, value: 14 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.package'})}`, value: 15 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.theTrial'})}`, value: 16 },
]
// const avtivityTypes = [
// { lable: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.salesPromotion'})}`, value: 3 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 7 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 8 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.spellGroup'})}`, value: 9 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.luckyDraw'})}`, value: 10 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.bargaining'})}`, value: 11 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.secondsKill'})}`, value: 12 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.openToBooking'})}`, value: 14 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.package'})}`, value: 15 },
// { lable: `${intl.formatMessage({ id: 'selfManagement.theTrial'})}`, value: 16 },
// ]
const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
const { focus$, form, isEdit } = props;
const { focus$, form, isEdit, avtivityTypes } = props;
const startTimeDisabled = (current, name) => {
const _endTime = form.getFieldValue(name);
if (_endTime) {
......@@ -95,7 +98,7 @@ const BasicInfoLayout: React.FC<BasicInfoProps> = (props: any) => {
rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectTheActivityType'})}` }]}
>
<Select onChange={handleChange} disabled={isEdit}>
{avtivityTypes.map((item) => <Select.Option key={'ACTIVITY_TYPE' + item.value} value={item.value}>{item.lable}</Select.Option>)}
{!isEmpty(avtivityTypes) && avtivityTypes.map((item) => <Select.Option key={'ACTIVITY_TYPE' + item.value} value={item.value}>{item.lable}</Select.Option>)}
</Select>
</Form.Item>
</Col>
......
......@@ -100,6 +100,12 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
{(!isEmpty(user) && !isEmpty(levelConfig)) && (
<Form.Item
name="memberLevelList"
rules={[
{
required: true,
message: `${intl.formatMessage({ id: 'common.text.pleaseSelect'})}`
}
]}
>
<Checkbox.Group onChange={handleLevelConfig}>
<Row gutter={[24, 24]}>
......
......@@ -9,6 +9,7 @@ import CouponsLayout from '../couponsLayout';
import moment from 'moment';
import { getMarketingMerchantActivityDetailGoodsCouponSelect, getMarketingMerchantActivityDetailPrizeCouponSelect } from '@/services/MarketingV2Api';
import { getIntl} from 'umi'
import { LOTTERY_BEHAVIORLOTTERY, LOTTERY_INTEGRALLOTTERY, LOTTERY_ORDERLOTTERY } from '@/constants/marketing';
const intl = getIntl();
const levelList = [
......@@ -230,7 +231,7 @@ const PrizeListLayout: React.FC<PrizeListProps> = (props: any) => {
noStyle
shouldUpdate={(prevValues, currentValues) => prevValues[`type_${_index}`] !== currentValues[`type_${_index}`]}
>
{({ getFieldValue }) => getFieldValue([`type_${_index}`]) === 1 ? (
{({ getFieldValue }) => getFieldValue([`type_${_index}`]) === LOTTERY_ORDERLOTTERY ? (
<Form.Item
style={{ margin: 0 }}
name={`prize_${_index}`}
......@@ -239,7 +240,7 @@ const PrizeListLayout: React.FC<PrizeListProps> = (props: any) => {
{!isEmpty(_record.coupon) && (<Typography.Text>{_record.coupon.id}/{_record.coupon.typeName}/{intl.formatMessage({ id: 'selfManagement.validTime' })}{format(_record.coupon.effectiveTimeStart)}{intl.formatMessage({ id: 'selfManagement.to' })}{format(_record.coupon.effectiveTimeEnd)}/{intl.formatMessage({ id: 'selfManagement.suitCommodity' })}{_record.coupon.suitableProduct?.productId}/{_record.coupon.suitableProduct?.productName}</Typography.Text>)}
<Button icon={<EditOutlined />} type='text' onClick={() => handleClickButton(getFieldValue([`type_${_index}`]), _index, _record)}>{!_record.coupon && `${intl.formatMessage({ id: 'selfManagement.0YuanBuyingBuckleSecurities'})}`}</Button>
</Form.Item>
) : getFieldValue([`type_${_index}`]) === 2 ? (
) : getFieldValue([`type_${_index}`]) === LOTTERY_INTEGRALLOTTERY ? (
<Form.Item
style={{ margin: 0 }}
name={`prize_${_index}`}
......@@ -248,7 +249,7 @@ const PrizeListLayout: React.FC<PrizeListProps> = (props: any) => {
{!isEmpty(_record.coupon) && (<Typography.Text>{_record.coupon.id}/{_record.coupon.typeName}/¥{Number(_record.coupon.useConditionMoney).toFixed(2)}/有效期:{format(_record.coupon.effectiveTimeStart)}{intl.formatMessage({ id: 'selfManagement.to' })}{format(_record.coupon.effectiveTimeEnd)}</Typography.Text>)}
<Button icon={<EditOutlined />} type='text' onClick={() => handleClickButton(getFieldValue([`type_${_index}`]), _index, _record)}>{!_record.coupon && `${intl.formatMessage({ id: 'selfManagement.chooseACoupon'})}`}</Button>
</Form.Item>
) : getFieldValue([`type_${_index}`]) === 3 ? (
) : getFieldValue([`type_${_index}`]) === LOTTERY_BEHAVIORLOTTERY ? (
<Form.Item
style={{ margin: 0 }}
name={`prize_${_index}`}
......
......@@ -9,6 +9,40 @@ import moment from 'moment';
import style from './index.less';
import CardLayout from '../card';
import { OVERLAYACTIVITYTYPE, PROMOTIONTYPE, LADDERBOLIST } from '../../constants';
import {
ACTIVITY_TYPE_1,
ACTIVITY_TYPE_2,
ACTIVITY_TYPE_3,
ACTIVITY_TYPE_4,
ACTIVITY_TYPE_5,
ACTIVITY_TYPE_6,
ACTIVITY_TYPE_7,
ACTIVITY_TYPE_8,
ACTIVITY_TYPE_9,
ACTIVITY_TYPE_10,
ACTIVITY_TYPE_11,
ACTIVITY_TYPE_12,
ACTIVITY_TYPE_13,
ACTIVITY_TYPE_14,
ACTIVITY_TYPE_15,
ACTIVITY_TYPE_16,
RANDOM_AMOUNT,
FIXATION_AMOUNT,
LOTTERY_ORDERLOTTERY,
LOTTERY_INTEGRALLOTTERY,
LOTTERY_BEHAVIORLOTTERY,
LOTTERY_ACTIVITYLOTTERY,
LOTTERY_APPLYMEMBER,
LOTTERY_SIGNIN,
EVERY_DAY,
EVERY_WEEK,
EVERY_MONTH,
SEASON_ENTO,
FULL_EXCHANGE,
BUYPRODUCT_EXCHANGE,
WHITGIFT_PRODUCT,
BUYPRODUCT_WHITGIFT,
} from '@/constants/marketing';
interface RulesLayoutProps {
/** umi-hooks */
......@@ -61,15 +95,15 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 叠加活动类型 */
const allowActivity = (int = 1) => {
switch (int) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 13:
case ACTIVITY_TYPE_1:
case ACTIVITY_TYPE_2:
case ACTIVITY_TYPE_3:
case ACTIVITY_TYPE_4:
case ACTIVITY_TYPE_5:
case ACTIVITY_TYPE_6:
case ACTIVITY_TYPE_7:
case ACTIVITY_TYPE_8:
case ACTIVITY_TYPE_13:
return (
<Form.Item
name={['activityDefined', 'allowActivity']}
......@@ -102,17 +136,17 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 叠加优惠券 */
const allowCoupon = (int = 1) => {
switch (int) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 12:
case 13:
case 15:
case ACTIVITY_TYPE_1:
case ACTIVITY_TYPE_2:
case ACTIVITY_TYPE_3:
case ACTIVITY_TYPE_4:
case ACTIVITY_TYPE_5:
case ACTIVITY_TYPE_6:
case ACTIVITY_TYPE_7:
case ACTIVITY_TYPE_8:
case ACTIVITY_TYPE_12:
case ACTIVITY_TYPE_13:
case ACTIVITY_TYPE_15:
return (
<Form.Item
name={['activityDefined', 'allowCoupon']}
......@@ -131,16 +165,16 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
// /** 超限规则 */
// const exceedRule = (int = 1) => {
// switch (int) {
// case 1:
// case 2:
// case 3:
// case 8:
// case 4:
// case 5:
// case 6:
// case 7:
// case 12:
// case 13:
// case ACTIVITY_TYPE_1:
// case ACTIVITY_TYPE_2:
// case ACTIVITY_TYPE_3:
// case ACTIVITY_TYPE_8:
// case ACTIVITY_TYPE_4:
// case ACTIVITY_TYPE_5:
// case ACTIVITY_TYPE_6:
// case ACTIVITY_TYPE_7:
// case ACTIVITY_TYPE_12:
// case ACTIVITY_TYPE_13:
// return (
// <Form.Item
// name={['activityDefined', 'exceedRule']}
......@@ -161,11 +195,11 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const type = (int = 1) => {
switch (int) {
/** 满量促销 */
case 4:
case ACTIVITY_TYPE_4:
/** 满额促销 */
case 5:
case ACTIVITY_TYPE_5:
/** 赠送促销 */
case 6:
case ACTIVITY_TYPE_6:
return (
<Form.Item
name={['activityDefined', PROMOTIONTYPE(int)!.name]}
......@@ -183,7 +217,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
</Form.Item>
)
/** 砍价 */
case 11:
case ACTIVITY_TYPE_11:
return (
<Form.Item
tooltip={intl.formatMessage({ id: 'selfManagement.negotiateMaximumAmountBargainingAmountAccordingAmountFixedRandomAmountAmountWithinRandomAmount' })}
......@@ -198,8 +232,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectA' })}` }]}
>
<Radio.Group>
<Radio.Button value={1}>{intl.formatMessage({ id: 'selfManagement.aRandomAmount' })}</Radio.Button>
<Radio.Button value={2}>{intl.formatMessage({ id: 'selfManagement.fixedAmount' })}</Radio.Button>
<Radio.Button value={RANDOM_AMOUNT}>{intl.formatMessage({ id: 'selfManagement.aRandomAmount' })}</Radio.Button>
<Radio.Button value={FIXATION_AMOUNT}>{intl.formatMessage({ id: 'selfManagement.fixedAmount' })}</Radio.Button>
</Radio.Group>
</Form.Item>
<Form.Item
......@@ -284,11 +318,11 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const ladderBOList = (int = 1, type) => {
switch (int) {
/** 满量促销 */
case 4:
case ACTIVITY_TYPE_4:
/** 满额促销 */
case 5:
case ACTIVITY_TYPE_5:
/** 多件促销 */
case 7:
case ACTIVITY_TYPE_7:
return (
<Form.List
name={['activityDefined', 'ladderList']}
......@@ -312,25 +346,25 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<Space key={key} style={{ display: 'flex', marginBottom: 8 }} align="center">{intl.formatMessage({ id: 'selfManagement.full' })}<Form.Item
{...restField}
style={{ margin: 0 }}
name={[name, `${int === 7 ? 'num' : 'key'}`]}
fieldKey={[fieldKey, `${int === 7 ? 'num' : 'key'}`]}
name={[name, `${int === ACTIVITY_TYPE_7 ? 'num' : 'key'}`]}
fieldKey={[fieldKey, `${int === ACTIVITY_TYPE_7 ? 'num' : 'key'}`]}
rules={[{
required: true, validator: (_rule, value) => {
const pattern1 = /^-?[1-9]\d*$/;
const pattern2 = /^-?[1-9]\d*(\.\d{1,2})?$/;
if (!value && int === 4) {
if (!value && int === ACTIVITY_TYPE_4) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.pleaseEnterTheNumberOf' })}`));
}
if (!value && int === 5) {
if (!value && int === ACTIVITY_TYPE_5) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.pleaseEnterTheAmount' })}`));
}
if (!value && int === 7) {
if (!value && int === ACTIVITY_TYPE_7) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.pleaseEnterTheNumber' })}`));
}
if (!pattern1.test(value) && (int === 4 || int === 7)) {
if (!pattern1.test(value) && (int === ACTIVITY_TYPE_4 || int === ACTIVITY_TYPE_7)) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.mustBeGreaterThanZero' })}`));
}
if (!pattern2.test(value) && int === 5) {
if (!pattern2.test(value) && int === ACTIVITY_TYPE_5) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'undefined' })}`));
}
return Promise.resolve();
......@@ -343,8 +377,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<Form.Item
{...restField}
style={{ margin: 0 }}
name={[name, `${int === 7 ? 'discount' : 'value'}`]}
fieldKey={[fieldKey, `${int === 7 ? 'discount' : 'value'}`]}
name={[name, `${int === ACTIVITY_TYPE_7 ? 'discount' : 'value'}`]}
fieldKey={[fieldKey, `${int === ACTIVITY_TYPE_7 ? 'discount' : 'value'}`]}
rules={[{
required: true, validator: (_rule, value) => {
const pattern1 = /^-?[1-9]\d*(\.\d{1,1})?$/;
......@@ -354,16 +388,16 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
if (!value) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.pleaseEnterThe' })}`));
}
if (!pattern1.test(value) && (int === 4 || int === 7)) {
if (!pattern1.test(value) && (int === ACTIVITY_TYPE_4 || int === ACTIVITY_TYPE_7)) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'undefined' })}`));
}
if (!pattern3.test(value) && (int === 4 || int === 7) && type === 2) {
if (!pattern3.test(value) && (int === ACTIVITY_TYPE_4 || int === ACTIVITY_TYPE_7) && type === 2) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'undefined' })}`));
}
if (!pattern2.test(value) && int === 5) {
if (!pattern2.test(value) && int === ACTIVITY_TYPE_5) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'undefined' })}`));
}
if (!pattern4.test(value) && int === 5 && type === 2) {
if (!pattern4.test(value) && int === ACTIVITY_TYPE_5 && type === 2) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'selfManagement.greaterDecimalPlaces' })}`));
}
return Promise.resolve();
......@@ -382,7 +416,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
</Form.List>
)
/** 组合促销 */
case 8:
case ACTIVITY_TYPE_8:
return (
<Form.Item
label={intl.formatMessage({ id: 'selfManagement.preferentialRules' })}
......@@ -432,7 +466,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const giftType = (int = 1) => {
switch (int) {
/** 赠品类型 */
case 6:
case ACTIVITY_TYPE_6:
return (
<Form.Item
name={['activityDefined', 'giftType']}
......@@ -442,8 +476,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
className={style.rulesLayout}
>
<Radio.Group onChange={() => getRule()}>
<Radio.Button value={1}>{intl.formatMessage({ id: 'selfManagement.sendGoods' })}</Radio.Button>
<Radio.Button value={2}>{intl.formatMessage({ id: 'selfManagement.aGiftCoupon' })}</Radio.Button>
<Radio.Button value={WHITGIFT_PRODUCT}>{intl.formatMessage({ id: 'selfManagement.sendGoods' })}</Radio.Button>
<Radio.Button value={BUYPRODUCT_WHITGIFT}>{intl.formatMessage({ id: 'selfManagement.aGiftCoupon' })}</Radio.Button>
</Radio.Group>
</Form.Item>
)
......@@ -453,7 +487,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const swapType = (int = 1) => {
switch (int) {
/** 换购类型 */
case 13:
case ACTIVITY_TYPE_13:
return (
<Form.Item
name={['activityDefined', 'swapType']}
......@@ -463,8 +497,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
className={style.rulesLayout}
>
<Radio.Group onChange={() => getRule()}>
<Radio.Button value={1}>{intl.formatMessage({ id: 'selfManagement.fullRedemption' })}</Radio.Button>
<Radio.Button value={2}>{intl.formatMessage({ id: 'selfManagement.buyGoods' })}</Radio.Button>
<Radio.Button value={FULL_EXCHANGE}>{intl.formatMessage({ id: 'selfManagement.fullRedemption' })}</Radio.Button>
<Radio.Button value={BUYPRODUCT_EXCHANGE}>{intl.formatMessage({ id: 'selfManagement.buyGoods' })}</Radio.Button>
</Radio.Group>
</Form.Item>
)
......@@ -474,7 +508,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
const restrictNum = (int = 1) => {
switch (int) {
/** 砍价 */
case 11:
case ACTIVITY_TYPE_11:
return (
<Form.Item
tooltip={intl.formatMessage({ id: 'selfManagement.negotiateMaximumDegree' })}
......@@ -508,7 +542,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 拼团 */
const grouPing = (int = 1) => {
switch (Number(int)) {
case 9:
case ACTIVITY_TYPE_9:
return (
<Fragment>
<Form.Item
......@@ -628,7 +662,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 秒杀 */
const secondKill = (int = 1) => {
switch (Number(int)) {
case 12:
case ACTIVITY_TYPE_12:
return (
<Form.Item
tooltip={intl.formatMessage({ id: 'selfManagement.secondsSecondBargainSecondsRestoreOriginal' })}
......@@ -677,7 +711,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 试用 */
const probation = (int = 1) => {
switch (Number(int)) {
case 16:
case ACTIVITY_TYPE_16:
return (
<Fragment>
<Form.Item
......@@ -721,7 +755,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 抽奖 */
const lottery = (int = 1) => {
switch (Number(int)) {
case 10:
case ACTIVITY_TYPE_10:
return (
<Fragment>
<Form.Item
......@@ -736,17 +770,17 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectALotteryTypes' })}` }]}
>
<Radio.Group>
<Radio.Button value={1}>{intl.formatMessage({ id: 'selfManagement.ordersForLuckyDraw' })}</Radio.Button>
<Radio.Button value={2}>{intl.formatMessage({ id: 'selfManagement.integralDraw' })}</Radio.Button>
<Radio.Button value={3}>{intl.formatMessage({ id: 'selfManagement.behaviorLottery' })}</Radio.Button>
<Radio.Button value={4}>{intl.formatMessage({ id: 'selfManagement.activitiesDraw' })}</Radio.Button>
<Radio.Button value={LOTTERY_ORDERLOTTERY}>{intl.formatMessage({ id: 'selfManagement.ordersForLuckyDraw' })}</Radio.Button>
<Radio.Button value={LOTTERY_INTEGRALLOTTERY}>{intl.formatMessage({ id: 'selfManagement.integralDraw' })}</Radio.Button>
<Radio.Button value={LOTTERY_BEHAVIORLOTTERY}>{intl.formatMessage({ id: 'selfManagement.behaviorLottery' })}</Radio.Button>
<Radio.Button value={LOTTERY_ACTIVITYLOTTERY}>{intl.formatMessage({ id: 'selfManagement.activitiesDraw' })}</Radio.Button>
</Radio.Group>
</Form.Item>
<Form.Item
noStyle
shouldUpdate={(prevValues, currentValues) => prevValues.activityDefined !== currentValues.activityDefined}
>
{({ getFieldValue }) => getFieldValue(['activityDefined', 'lotteryType']) === 1 ? (
{({ getFieldValue }) => getFieldValue(['activityDefined', 'lotteryType']) === LOTTERY_ORDERLOTTERY ? (
<Space style={{ display: 'flex' }}>{intl.formatMessage({ id: 'selfManagement.fullOrderAmount' })}<Form.Item
style={{ margin: 0 }}
name={['activityDefined', 'orderPrice']}
......@@ -765,7 +799,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
<Input style={{ width: '160px' }} addonAfter={intl.formatMessage({ id: 'selfManagement.yuan' })} />
</Form.Item>{intl.formatMessage({ id: 'selfManagement.participateSuccessfulPayment' })}</Space>
) : getFieldValue(['activityDefined', 'lotteryType']) === 2 ? (
) : getFieldValue(['activityDefined', 'lotteryType']) === LOTTERY_INTEGRALLOTTERY ? (
<Space style={{ display: 'flex' }}>{intl.formatMessage({ id: 'selfManagement.eachLotteryConsumption' })}<Form.Item
style={{ margin: 0 }}
name={['activityDefined', 'integral']}
......@@ -785,15 +819,15 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<Input style={{ width: '160px' }} addonAfter={intl.formatMessage({ id: 'selfManagement.integral' })} />
</Form.Item>
</Space>
) : getFieldValue(['activityDefined', 'lotteryType']) === 3 && (
) : getFieldValue(['activityDefined', 'lotteryType']) === LOTTERY_BEHAVIORLOTTERY && (
<Space style={{ display: 'flex' }}>{intl.formatMessage({ id: 'selfManagement.theUserHasFinished' })}<Form.Item
style={{ margin: 0 }}
name={['activityDefined', 'behavior']}
rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectA' })}` }]}
>
<Select style={{ width: 160 }} placeholder={intl.formatMessage({ id: 'selfManagement.pleaseSelectA' })}>
<Select.Option value={1}>{intl.formatMessage({ id: 'selfManagement.toApplyForMembership' })}</Select.Option>
<Select.Option value={2}>{intl.formatMessage({ id: 'selfManagement.signIn' })}</Select.Option>
<Select.Option value={LOTTERY_APPLYMEMBER}>{intl.formatMessage({ id: 'selfManagement.toApplyForMembership' })}</Select.Option>
<Select.Option value={LOTTERY_SIGNIN}>{intl.formatMessage({ id: 'selfManagement.signIn' })}</Select.Option>
</Select>
</Form.Item>{intl.formatMessage({ id: 'selfManagement.participateInLuckyDraw' })}</Space>
)}
......@@ -813,10 +847,10 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
rules={[{ required: true, message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectLotteryNumber' })}` }]}
>
<Select style={{ width: 160 }} placeholder={intl.formatMessage({ id: 'selfManagement.pleaseSelectA' })}>
<Select.Option value={1}>{intl.formatMessage({ id: 'selfManagement.daily' })}</Select.Option>
<Select.Option value={2}>{intl.formatMessage({ id: 'selfManagement.onceAWeek' })}</Select.Option>
<Select.Option value={3}>{intl.formatMessage({ id: 'selfManagement.aMonth' })}</Select.Option>
<Select.Option value={4}>{intl.formatMessage({ id: 'selfManagement.thePeriodOfActivity' })}</Select.Option>
<Select.Option value={EVERY_DAY}>{intl.formatMessage({ id: 'selfManagement.daily' })}</Select.Option>
<Select.Option value={EVERY_WEEK}>{intl.formatMessage({ id: 'selfManagement.onceAWeek' })}</Select.Option>
<Select.Option value={EVERY_MONTH}>{intl.formatMessage({ id: 'selfManagement.aMonth' })}</Select.Option>
<Select.Option value={SEASON_ENTO}>{intl.formatMessage({ id: 'selfManagement.thePeriodOfActivity' })}</Select.Option>
</Select>
</Form.Item>
<Form.Item
......@@ -847,7 +881,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
/** 预售 */
const advanceSale = (int = 1) => {
switch (Number(int)) {
case 14:
case ACTIVITY_TYPE_14:
return (
<Fragment>
<Form.Item
......@@ -1021,7 +1055,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
<CardLayout
id="rulesLayout"
weight
title={`${intl.formatMessage({id: 'paltformSign.activityRules'})}-${!isEmpty(option) ? option.children : `${intl.formatMessage({ id: 'selfManagement.noSales' })}`}`}
title={`${intl.formatMessage({ id: 'paltformSign.activityRules' })}-${!isEmpty(option) ? option.children : `${intl.formatMessage({ id: 'selfManagement.noSales' })}`}`}
>
{secondKill(option?.value)}
{type(option?.value)}
......
import { getIntl} from 'umi'
import { getIntl } from 'umi'
import {
ACTIVITY_TYPE_1,
ACTIVITY_TYPE_2,
ACTIVITY_TYPE_3,
ACTIVITY_TYPE_4,
ACTIVITY_TYPE_5,
ACTIVITY_TYPE_6,
ACTIVITY_TYPE_7,
ACTIVITY_TYPE_8,
ACTIVITY_TYPE_9,
ACTIVITY_TYPE_10,
ACTIVITY_TYPE_11,
ACTIVITY_TYPE_12,
ACTIVITY_TYPE_13,
ACTIVITY_TYPE_14,
ACTIVITY_TYPE_15,
ACTIVITY_TYPE_16,
MANLIANG_JIAN,
MANLIANG_ZHE,
MANE_JIAN,
MANE_ZHE,
MANE_ZENG,
BUYPRODUCT_ZENG,
} from '@/constants/marketing';
const intl = getIntl();
/**
......@@ -9,157 +33,157 @@ type activityType = {
value: number,
}[]
export const ACTIVITYTYPEARRAY: activityType = [
{ lable: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.salesPromotion'})}`, value: 3 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 7 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 8 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.spellGroup'})}`, value: 9 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.luckyDraw'})}`, value: 10 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.bargaining'})}`, value: 11 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.secondsKill'})}`, value: 12 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.openToBooking'})}`, value: 14 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.package'})}`, value: 15 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.theTrial'})}`, value: 16 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.noSales' })}`, value: ACTIVITY_TYPE_1 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion' })}`, value: ACTIVITY_TYPE_2 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.salesPromotion' })}`, value: ACTIVITY_TYPE_3 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion' })}`, value: ACTIVITY_TYPE_4 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion' })}`, value: ACTIVITY_TYPE_5 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.giftPromotion' })}`, value: ACTIVITY_TYPE_6 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion' })}`, value: ACTIVITY_TYPE_7 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion' })}`, value: ACTIVITY_TYPE_8 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.spellGroup' })}`, value: ACTIVITY_TYPE_9 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.luckyDraw' })}`, value: ACTIVITY_TYPE_10 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.bargaining' })}`, value: ACTIVITY_TYPE_11 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.secondsKill' })}`, value: ACTIVITY_TYPE_12 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_13 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.openToBooking' })}`, value: ACTIVITY_TYPE_14 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.package' })}`, value: ACTIVITY_TYPE_15 },
{ lable: `${intl.formatMessage({ id: 'selfManagement.theTrial' })}`, value: ACTIVITY_TYPE_16 },
]
/** 叠加活动类型 */
export const OVERLAYACTIVITYTYPE = (int) => {
switch (Number(int)) {
case 1:
case 2:
case 3:
case ACTIVITY_TYPE_1:
case ACTIVITY_TYPE_2:
case ACTIVITY_TYPE_3:
return {
B: [
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion' })}`, value: ACTIVITY_TYPE_4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion' })}`, value: ACTIVITY_TYPE_5 },
],
C: [
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion' })}`, value: ACTIVITY_TYPE_6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_13 },
]
}
case 4:
case 5:
case ACTIVITY_TYPE_4:
case ACTIVITY_TYPE_5:
return {
A: [
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion'})}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales' })}`, value: ACTIVITY_TYPE_1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion' })}`, value: ACTIVITY_TYPE_2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion' })}`, value: ACTIVITY_TYPE_3 },
],
B: [
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion' })}`, value: ACTIVITY_TYPE_6 },
],
C: [
{ label: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_13 },
],
}
case 6:
case ACTIVITY_TYPE_6:
return {
A: [
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion'})}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales' })}`, value: ACTIVITY_TYPE_1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion' })}`, value: ACTIVITY_TYPE_2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion' })}`, value: ACTIVITY_TYPE_3 },
],
B: [
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion' })}`, value: ACTIVITY_TYPE_4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion' })}`, value: ACTIVITY_TYPE_5 },
],
C: [
{ label: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 7 },
{ label: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 8 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ label: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion' })}`, value: ACTIVITY_TYPE_7 },
{ label: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion' })}`, value: ACTIVITY_TYPE_8 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_13 },
],
}
case 7:
case 8:
case ACTIVITY_TYPE_7:
case ACTIVITY_TYPE_8:
return {
B: [
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion'})}`, value: 6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.giftPromotion' })}`, value: ACTIVITY_TYPE_6 },
],
C: [
{ label: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 13 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_13 },
]
}
case 13:
case ACTIVITY_TYPE_13:
return {
A: [
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion'})}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'selfManagement.noSales' })}`, value: ACTIVITY_TYPE_1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.straightDownThePromotion' })}`, value: ACTIVITY_TYPE_2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.discountSalesPromotion' })}`, value: ACTIVITY_TYPE_3 },
],
B: [
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion'})}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion'})}`, value: 5 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountOfThePromotion' })}`, value: ACTIVITY_TYPE_4 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotion' })}`, value: ACTIVITY_TYPE_5 },
],
C: [
{ label: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion'})}`, value: 6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion'})}`, value: 7 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy'})}`, value: 8 },
{ label: `${intl.formatMessage({ id: 'selfManagement.moreThanAPromotion' })}`, value: ACTIVITY_TYPE_6 },
{ label: `${intl.formatMessage({ id: 'selfManagement.combinationOfPromotion' })}`, value: ACTIVITY_TYPE_7 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buy' })}`, value: ACTIVITY_TYPE_8 },
],
}
}
}
/** 超限规则 */
/** 超限规则 - 以作废 */
export const OVERRUNRULETYPE = (int) => {
switch (Number(int)) {
case 1:
case 2:
case 3:
case 8:
case 12:
case ACTIVITY_TYPE_1:
case ACTIVITY_TYPE_2:
case ACTIVITY_TYPE_3:
case ACTIVITY_TYPE_8:
case ACTIVITY_TYPE_12:
return [
{ label: `${intl.formatMessage({ id: 'selfManagement.theOriginalPriceToBuy'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.doNotBuy'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.theOriginalPriceToBuy' })}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.doNotBuy' })}`, value: 2 },
]
case 4:
case 5:
case 6:
case 7:
case 13:
case ACTIVITY_TYPE_4:
case ACTIVITY_TYPE_5:
case ACTIVITY_TYPE_6:
case ACTIVITY_TYPE_7:
case ACTIVITY_TYPE_13:
return [
{ label: `${intl.formatMessage({ id: 'selfManagement.doNotBuy'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.accordingIndividualPurchaseHighestDiscount'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.doNotBuy' })}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.accordingIndividualPurchaseHighestDiscount' })}`, value: 1 },
]
}
}
/** 满量/满额/赠送促销类型 */
export const PROMOTIONTYPE = (int) => {
switch (Number(int)) {
case 4:
case ACTIVITY_TYPE_4:
return {
name: "type",
tooltip: `${intl.formatMessage({ id: 'selfManagement.amountReducedRequirementsPurchaseNumberOrdersAmountDiscountAmountAmountAmountMultipliedDiscount'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.fullAmountPromotionalTypes'})}`,
message: `${intl.formatMessage({ id: 'undefined'})}`,
tooltip: `${intl.formatMessage({ id: 'selfManagement.amountReducedRequirementsPurchaseNumberOrdersAmountDiscountAmountAmountAmountMultipliedDiscount' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.fullAmountPromotionalTypes' })}`,
message: `${intl.formatMessage({ id: 'undefined' })}`,
radio: [
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountMinus'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmount'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmountMinus' })}`, value: MANLIANG_JIAN },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullAmount' })}`, value: MANLIANG_ZHE },
]
}
case 5:
case ACTIVITY_TYPE_5:
return {
name: "type",
tooltip: `${intl.formatMessage({ id: 'selfManagement.reducingAmountRequirementsPurchaseAmountDiscountAmountAmountMultipliedDiscount'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotionType'})}`,
message: `${intl.formatMessage({ id: 'undefined'})}`,
tooltip: `${intl.formatMessage({ id: 'selfManagement.reducingAmountRequirementsPurchaseAmountDiscountAmountAmountMultipliedDiscount' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.quotaPromotionType' })}`,
message: `${intl.formatMessage({ id: 'undefined' })}`,
radio: [
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaReduction'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullFold'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.quotaReduction' })}`, value: MANE_JIAN },
{ label: `${intl.formatMessage({ id: 'selfManagement.fullFold' })}`, value: MANE_ZHE },
]
}
case 6:
case ACTIVITY_TYPE_6:
return {
name: "giveType",
tooltip: `${intl.formatMessage({ id: 'selfManagement.purchasesRequirementsOfferingCouponPurchasesGoodsCoupon'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.giftPromotionType'})}`,
message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectPromotion'})}`,
tooltip: `${intl.formatMessage({ id: 'selfManagement.purchasesRequirementsOfferingCouponPurchasesGoodsCoupon' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.giftPromotionType' })}`,
message: `${intl.formatMessage({ id: 'selfManagement.pleaseSelectPromotion' })}`,
radio: [
{ label: `${intl.formatMessage({ id: 'selfManagement.giveFull'})}`, value: 1 },
{ label: `${intl.formatMessage({ id: 'selfManagement.buyGoodsGive'})}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'selfManagement.giveFull' })}`, value: MANE_ZENG },
{ label: `${intl.formatMessage({ id: 'selfManagement.buyGoodsGive' })}`, value: BUYPRODUCT_ZENG },
]
}
}
......@@ -167,32 +191,32 @@ export const PROMOTIONTYPE = (int) => {
/** 满量/额减 */
export const LADDERBOLIST = (int, type = 1) => {
switch (Number(int)) {
case 4:
case ACTIVITY_TYPE_4:
return {
tooltip: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.discountAmountAmountDiscount'})}` : `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.FullAmount' })}${type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`}`,
message: `${intl.formatMessage({ id: 'selfManagement.PleaseAddFullAmount' })}${type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`}`,
addon: `${intl.formatMessage({ id: 'selfManagement.theNumberOf'})}`,
addonAfter: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.play'})}`,
addonBefore: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.yuan'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`,
tooltip: type === MANLIANG_JIAN ? `${intl.formatMessage({ id: 'selfManagement.discountAmountAmountDiscount' })}` : `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.FullAmount' })}${type === MANLIANG_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`}`,
message: `${intl.formatMessage({ id: 'selfManagement.PleaseAddFullAmount' })}${type === MANLIANG_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`}`,
addon: `${intl.formatMessage({ id: 'selfManagement.theNumberOf' })}`,
addonAfter: type === MANLIANG_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.play' })}`,
addonBefore: type === MANLIANG_JIAN ? `${intl.formatMessage({ id: 'selfManagement.yuan' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`,
}
case 5:
case ACTIVITY_TYPE_5:
return {
tooltip: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.discountAmountAmountDiscount'})}` : `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.FullAmount2' })}${type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`}`,
message: `${intl.formatMessage({ id: 'selfManagement.PleaseAddFullAmount2' })}${type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`}`,
addon: `${intl.formatMessage({ id: 'selfManagement.yuan'})}`,
addonAfter: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.reductionOf'})}` : `${intl.formatMessage({ id: 'selfManagement.play'})}`,
addonBefore: type === 1 ? `${intl.formatMessage({ id: 'selfManagement.yuan'})}` : `${intl.formatMessage({ id: 'selfManagement.fold'})}`,
tooltip: type === MANE_JIAN ? `${intl.formatMessage({ id: 'selfManagement.discountAmountAmountDiscount' })}` : `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.FullAmount2' })}${type === MANE_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`}`,
message: `${intl.formatMessage({ id: 'selfManagement.PleaseAddFullAmount2' })}${type === MANE_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`}`,
addon: `${intl.formatMessage({ id: 'selfManagement.yuan' })}`,
addonAfter: type === MANE_JIAN ? `${intl.formatMessage({ id: 'selfManagement.reductionOf' })}` : `${intl.formatMessage({ id: 'selfManagement.play' })}`,
addonBefore: type === MANE_JIAN ? `${intl.formatMessage({ id: 'selfManagement.yuan' })}` : `${intl.formatMessage({ id: 'selfManagement.fold' })}`,
}
case 7:
case ACTIVITY_TYPE_7:
return {
tooltip: `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers'})}`,
label: `${intl.formatMessage({ id: 'selfManagement.preferentialRules'})}`,
addon: `${intl.formatMessage({ id: 'selfManagement.a'})}`,
message: `${intl.formatMessage({ id: 'selfManagement.pleaseAddPreferentialRules'})}`,
addonAfter: `${intl.formatMessage({ id: 'selfManagement.play'})}`,
addonBefore: `${intl.formatMessage({ id: 'selfManagement.fold'})}`,
tooltip: `${intl.formatMessage({ id: 'selfManagement.discountDiscountAmountOrderNumbers' })}`,
label: `${intl.formatMessage({ id: 'selfManagement.preferentialRules' })}`,
addon: `${intl.formatMessage({ id: 'selfManagement.a' })}`,
message: `${intl.formatMessage({ id: 'selfManagement.pleaseAddPreferentialRules' })}`,
addonAfter: `${intl.formatMessage({ id: 'selfManagement.play' })}`,
addonBefore: `${intl.formatMessage({ id: 'selfManagement.fold' })}`,
}
}
}
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