Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
d7e013f8
Commit
d7e013f8
authored
Jan 04, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
7c4e976a
397f432b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
138 additions
and
48 deletions
+138
-48
marketing.ts
src/constants/marketing.ts
+78
-0
index.tsx
...n/marketingAbility/components/productListLayout/index.tsx
+10
-10
remind.ts
...readySubmitExamine/components/productListLayout/remind.ts
+11
-10
constants.tsx
...tingAbility/paltformSign/readySubmitExamine/constants.tsx
+0
-0
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+6
-5
index.tsx
...t/readySubmitExamine/components/basicInfoLayout/index.tsx
+23
-20
index.tsx
...readySubmitExamine/components/partakeUserLayout/index.tsx
+6
-0
index.tsx
...t/readySubmitExamine/components/prizeListLayout/index.tsx
+4
-3
index.tsx
...ement/readySubmitExamine/components/rulesLayout/index.tsx
+0
-0
index.ts
...lity/selfManagement/readySubmitExamine/constants/index.ts
+0
-0
No files found.
src/constants/marketing.ts
View file @
d7e013f8
...
...
@@ -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
src/pages/transaction/marketingAbility/components/productListLayout/index.tsx
View file @
d7e013f8
...
...
@@ -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
({
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/components/productListLayout/remind.ts
View file @
d7e013f8
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
,
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/constants.tsx
View file @
d7e013f8
This diff is collapsed.
Click to expand it.
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
d7e013f8
...
...
@@ -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
,
getMarketing
PlatformMerchantActivityGetActivityTypeList
,
postMarketingMerchantActivityGetFilterSkuId
,
postMarketingMerchantActivitySave
,
postMarketingMerchantActivityUpdate
,
}
from
'@/services/MarketingV2Api'
;
import
{
getMarketingMerchantActivityDetail
,
getMarketingMerchantActivityDetailGoodsPage
,
getMarketing
MerchantActivityGetActivityTypeList
,
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
(()
=>
{
getMarketing
Platform
MerchantActivityGetActivityTypeList
().
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
>
}
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/basicInfoLayout/index.tsx
View file @
d7e013f8
...
...
@@ -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
>
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/partakeUserLayout/index.tsx
View file @
d7e013f8
...
...
@@ -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
]
}
>
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/prizeListLayout/index.tsx
View file @
d7e013f8
...
...
@@ -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}`
}
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/rulesLayout/index.tsx
View file @
d7e013f8
This diff is collapsed.
Click to expand it.
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/constants/index.ts
View file @
d7e013f8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment