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

fix: 营销活动修改

parent 0a299bff
/*
* @Author: XieZhiXiong
* @Date: 2021-06-30 15:25:03
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-08 14:01:28
* @Description: 营销活动相关常量
*/
/* --------------------------------- 商家优惠券类型 -------------------------------- */
/**
* 0元购买抵扣券
*/
export const MERCHANT_COUPON_TYPE_VOUCHER = 1;
/**
* 通用优惠券
*/
export const MERCHANT_COUPON_TYPE_UNIVERSAL = 2;
/**
* 品类优惠券
*/
export const MERCHANT_COUPON_TYPE_CATEGORY = 3;
/**
* 品牌优惠券
*/
export const MERCHANT_COUPON_TYPE_BRAND = 4;
/**
* 商品优惠券
*/
export const MERCHANT_COUPON_TYPE_PRODUCT = 5;
/* --------------------------------- 商家优惠券领取方式 -------------------------------- */
/**
* 前台用户领券
*/
export const MERCHANT_COUPON_RECEIVE_FRONT = 1;
/**
* 指定会员发券
*/
export const MERCHANT_COUPON_RECEIVE_DESIGNATED = 2;
/**
* 营销活动用券
*/
export const MERCHANT_COUPON_RECEIVE_ACTIVITY = 3;
/**
* 会员运营用券
*/
export const MERCHANT_COUPON_RECEIVE_OPERATE = 4;
/* --------------------------------- 商家优惠券适用用户 -------------------------------- */
/**
* 新用户(不包含会员)
*/
export const SUITABLE_TYPE_NEW_USER = 1;
/**
* 老用户(不包含会员)
*/
export const SUITABLE_TYPE_OLD_USER = 2;
/**
* 新会员(仅会员用户)
*/
export const SUITABLE_TYPE_NEW_MEMBER = 3;
/**
* 老会员(仅会员用户)
*/
export const SUITABLE_TYPE_OLD_MEMBER = 4;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-06-30 15:25:03
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-08 14:01:28
* @Description: 营销活动相关常量
*/
/* --------------------------------- 商家优惠券类型 -------------------------------- */
/**
* 0元购买抵扣券
*/
export const MERCHANT_COUPON_TYPE_VOUCHER = 1;
/**
* 通用优惠券
*/
export const MERCHANT_COUPON_TYPE_UNIVERSAL = 2;
/**
* 品类优惠券
*/
export const MERCHANT_COUPON_TYPE_CATEGORY = 3;
/**
* 品牌优惠券
*/
export const MERCHANT_COUPON_TYPE_BRAND = 4;
/**
* 商品优惠券
*/
export const MERCHANT_COUPON_TYPE_PRODUCT = 5;
/* --------------------------------- 商家优惠券领取方式 -------------------------------- */
/**
* 前台用户领券
*/
export const MERCHANT_COUPON_RECEIVE_FRONT = 1;
/**
* 指定会员发券
*/
export const MERCHANT_COUPON_RECEIVE_DESIGNATED = 2;
/**
* 营销活动用券
*/
export const MERCHANT_COUPON_RECEIVE_ACTIVITY = 3;
/**
* 会员运营用券
*/
export const MERCHANT_COUPON_RECEIVE_OPERATE = 4;
/* --------------------------------- 商家优惠券适用用户 -------------------------------- */
/**
* 新用户(不包含会员)
*/
export const SUITABLE_TYPE_NEW_USER = 1;
/**
* 老用户(不包含会员)
*/
export const SUITABLE_TYPE_OLD_USER = 2;
/**
* 新会员(仅会员用户)
*/
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,
......
......@@ -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}`}
......
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