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
linweijiong
jinfa-platform
Commits
5998174e
Commit
5998174e
authored
Nov 15, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改营销活动bug
parent
3de74a52
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
37 deletions
+67
-37
index.tsx
src/pages/transaction/components/tableLayout/index.tsx
+4
-1
index.tsx
...n/marketingAbility/components/productListLayout/index.tsx
+24
-2
index.tsx
...n/marketingAbility/paltformSign/readyExamineOne/index.tsx
+1
-1
index.tsx
...n/marketingAbility/paltformSign/readyExamineTwo/index.tsx
+1
-1
index.tsx
...ction/marketingAbility/paltformSign/readySubmit/index.tsx
+1
-1
index.tsx
...arketingAbility/paltformSign/readySubmitExamine/index.tsx
+5
-0
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+1
-1
index.tsx
...ement/readySubmitExamine/components/rulesLayout/index.tsx
+30
-30
No files found.
src/pages/transaction/components/tableLayout/index.tsx
View file @
5998174e
...
@@ -38,6 +38,8 @@ interface Iprops {
...
@@ -38,6 +38,8 @@ interface Iprops {
useStateEffects
?:
()
=>
void
,
useStateEffects
?:
()
=>
void
,
/** rowKey */
/** rowKey */
rowKey
?:
string
,
rowKey
?:
string
,
/** 选择的keyId */
activeKey
?:
string
,
/** 禁用 */
/** 禁用 */
getCheckboxProps
?:
(
record
:
any
)
=>
void
,
getCheckboxProps
?:
(
record
:
any
)
=>
void
,
}
}
...
@@ -56,11 +58,12 @@ const Table: React.FC<Iprops> = (props: any) => {
...
@@ -56,11 +58,12 @@ const Table: React.FC<Iprops> = (props: any) => {
interiorStatusFetch
,
interiorStatusFetch
,
useStateEffects
,
useStateEffects
,
rowKey
,
rowKey
,
activeKey
,
getCheckboxProps
getCheckboxProps
}
=
props
;
}
=
props
;
const
tableRef
=
useRef
<
any
>
({});
const
tableRef
=
useRef
<
any
>
({});
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
row
Key
||
'id'
,
customKey
:
active
Key
||
'id'
,
extendsSelection
:
{
extendsSelection
:
{
getCheckboxProps
:
(
record
)
=>
getCheckboxProps
&&
getCheckboxProps
(
record
)
getCheckboxProps
:
(
record
)
=>
getCheckboxProps
&&
getCheckboxProps
(
record
)
}
}
...
...
src/pages/transaction/marketingAbility/components/productListLayout/index.tsx
View file @
5998174e
...
@@ -34,10 +34,12 @@ interface ProductListProps {
...
@@ -34,10 +34,12 @@ interface ProductListProps {
getActivityDefinedBO
?:
any
,
getActivityDefinedBO
?:
any
,
/** 过滤的filterSkuId */
/** 过滤的filterSkuId */
filterSkuId
?:
number
[],
filterSkuId
?:
number
[],
/** 是否商家自建营销活动 */
itrue
?:
boolean
,
}
}
const
ProductListLayout
:
React
.
FC
<
ProductListProps
>
=
(
props
:
any
)
=>
{
const
ProductListLayout
:
React
.
FC
<
ProductListProps
>
=
(
props
:
any
)
=>
{
const
{
activityId
,
form
,
focus$
,
shopIdList
,
fieldApi
,
getActivityDefinedBO
,
filterSkuId
}
=
props
;
const
{
activityId
,
form
,
focus$
,
shopIdList
,
fieldApi
,
getActivityDefinedBO
,
filterSkuId
,
itrue
}
=
props
;
const
[
value
,
setValue
]
=
useState
<
number
>
(
1
);
const
[
value
,
setValue
]
=
useState
<
number
>
(
1
);
const
[
productVisible
,
setProductVisible
]
=
useState
<
boolean
>
(
false
);
const
[
productVisible
,
setProductVisible
]
=
useState
<
boolean
>
(
false
);
const
[
listModalVisible
,
setListModalVisible
]
=
useState
<
boolean
>
(
false
);
const
[
listModalVisible
,
setListModalVisible
]
=
useState
<
boolean
>
(
false
);
...
@@ -128,7 +130,27 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
...
@@ -128,7 +130,27 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
if
(
value
===
15
)
{
if
(
value
===
15
)
{
setRemind
(
remindLayout
(
value
));
setRemind
(
remindLayout
(
value
));
}
}
setProductVisible
(
flag
)
if
(
itrue
&&
flag
)
{
if
(
form
.
getFieldValue
(
'activityDefined'
)
&&
form
.
getFieldValue
(
'startTime'
)
&&
form
.
getFieldValue
(
'endTime'
)
&&
form
.
getFieldValue
(
'activityType'
))
{
const
param
=
{
activityType
:
form
.
getFieldValue
(
'activityType'
),
activityDefined
:
form
.
getFieldValue
(
'activityDefined'
),
startTime
:
Number
(
form
.
getFieldValue
(
'startTime'
).
format
(
'x'
)),
endTime
:
Number
(
form
.
getFieldValue
(
'endTime'
).
format
(
'x'
))
}
PublicApi
.
postMarketingMerchantActivityGetFilterSkuId
(
param
,
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setIdNotInList
([...
res
.
data
.
filterSkuId
,
...
idNots
]);
setProductVisible
(
flag
)
})
}
else
{
message
.
warn
(
'请先完善活动时间和活动规则!'
)
}
}
else
{
setProductVisible
(
flag
)
}
}
}
const
handleSelectActiveProducts
=
(
params
)
=>
{
const
handleSelectActiveProducts
=
(
params
)
=>
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineOne/index.tsx
View file @
5998174e
...
@@ -131,7 +131,7 @@ const ReadyExamineOne = () => {
...
@@ -131,7 +131,7 @@ const ReadyExamineOne = () => {
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
columns=
{
columns
}
columns=
{
columns
}
effects=
"id"
effects=
"id"
rowKey=
"activityId"
//
rowKey="activityId"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep1
}
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep1
}
controllerBtns=
{
controllerBtns
}
controllerBtns=
{
controllerBtns
}
schema=
{
{
schema=
{
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineTwo/index.tsx
View file @
5998174e
...
@@ -131,7 +131,7 @@ const ReadyExamineTwo = () => {
...
@@ -131,7 +131,7 @@ const ReadyExamineTwo = () => {
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
columns=
{
columns
}
columns=
{
columns
}
effects=
"id"
effects=
"id"
rowKey=
"activityId"
//
rowKey="activityId"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep2
}
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep2
}
controllerBtns=
{
controllerBtns
}
controllerBtns=
{
controllerBtns
}
schema=
{
{
schema=
{
{
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmit/index.tsx
View file @
5998174e
...
@@ -123,7 +123,7 @@ const ReadySubmit = () => {
...
@@ -123,7 +123,7 @@ const ReadySubmit = () => {
reload=
{
ref
}
reload=
{
ref
}
columns=
{
columns
}
columns=
{
columns
}
effects=
"id"
effects=
"id"
rowKey=
"activityId"
//
rowKey="activityId"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeSubmitSignUp
}
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeSubmitSignUp
}
selectedRow=
{
true
}
selectedRow=
{
true
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/index.tsx
View file @
5998174e
...
@@ -145,11 +145,16 @@ const ReadySubmitExamine = () => {
...
@@ -145,11 +145,16 @@ const ReadySubmitExamine = () => {
})
})
}
}
const
getCheckboxProps
=
(
record
)
=>
{
return
{
disabled
:
!
record
.
id
}
}
return
(
return
(
<
TableLayout
<
TableLayout
reload=
{
ref
}
reload=
{
ref
}
selectedRow
selectedRow
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
getCheckboxProps=
{
getCheckboxProps
}
columns=
{
columns
}
columns=
{
columns
}
effects=
"id"
effects=
"id"
rowKey=
"activityId"
rowKey=
"activityId"
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
5998174e
...
@@ -291,7 +291,7 @@ const AddedMarketing = () => {
...
@@ -291,7 +291,7 @@ const AddedMarketing = () => {
<
BasicInfoLayout
form=
{
form
}
focus
$=
{
focus$
}
isEdit=
{
path
===
'edit'
?
true
:
false
}
/>
<
BasicInfoLayout
form=
{
form
}
focus
$=
{
focus$
}
isEdit=
{
path
===
'edit'
?
true
:
false
}
/>
<
ShopLayout
onGetShopList=
{
handleGetShopList
}
onSetShopList=
{
shopList
}
/>
<
ShopLayout
onGetShopList=
{
handleGetShopList
}
onSetShopList=
{
shopList
}
/>
<
RulesLayout
form=
{
form
}
focus
$=
{
focus$
}
/>
<
RulesLayout
form=
{
form
}
focus
$=
{
focus$
}
/>
{
value
!==
10
&&
(<
ProductListLayout
activityId=
{
activityId
&&
{
activityId
:
activityId
}
}
form=
{
form
}
focus
$=
{
value
}
shopIdList=
{
shopIdList
}
filterSkuId=
{
filterSkuId
}
fieldApi=
{
PublicApi
.
getMarketingMerchantActivityDetailGoodsPage
}
/>)
}
{
value
!==
10
&&
(<
ProductListLayout
itrue
activityId=
{
activityId
&&
{
activityId
:
activityId
}
}
form=
{
form
}
focus
$=
{
value
}
shopIdList=
{
shopIdList
}
fieldApi=
{
PublicApi
.
getMarketingMerchantActivityDetailGoodsPage
}
/>)
}
{
value
===
10
&&
(<
PrizeListLayout
form=
{
form
}
prizeList=
{
prizeList
}
focus
$=
{
value
}
/>)
}
{
value
===
10
&&
(<
PrizeListLayout
form=
{
form
}
prizeList=
{
prizeList
}
focus
$=
{
value
}
/>)
}
<
PartakeUserLayout
onGetLevel=
{
handleGetLevel
}
onSetLevel=
{
memberLevelList
}
setMemberType=
{
memberType
}
/>
<
PartakeUserLayout
onGetLevel=
{
handleGetLevel
}
onSetLevel=
{
memberLevelList
}
setMemberType=
{
memberType
}
/>
</
Form
>
</
Form
>
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/rulesLayout/index.tsx
View file @
5998174e
...
@@ -98,35 +98,35 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
...
@@ -98,35 +98,35 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
)
)
}
}
}
}
/** 超限规则 */
/
/ /
** 超限规则 */
const
exceedRule
=
(
int
=
1
)
=>
{
//
const exceedRule = (int = 1) => {
switch
(
int
)
{
//
switch (int) {
case
1
:
//
case 1:
case
2
:
//
case 2:
case
3
:
//
case 3:
case
8
:
//
case 8:
case
4
:
//
case 4:
case
5
:
//
case 5:
case
6
:
//
case 6:
case
7
:
//
case 7:
case
12
:
//
case 12:
case
13
:
//
case 13:
return
(
//
return (
<
Form
.
Item
//
<Form.Item
name=
{
[
'activityDefined'
,
'exceedRule'
]
}
//
name={['activityDefined', 'exceedRule']}
tooltip=
"超限规则表示超过个人限购数量时,超出部分可以设定为原价购买,也可以设定为不可购买"
//
tooltip="超限规则表示超过个人限购数量时,超出部分可以设定为原价购买,也可以设定为不可购买"
label=
"超限规则"
//
label="超限规则"
rules=
{
[{
required
:
true
,
message
:
'请选择超限规则'
}]
}
//
rules={[{ required: true, message: '请选择超限规则' }]}
>
//
>
<
Radio
.
Group
>
//
<Radio.Group>
{
OVERRUNRULETYPE
(
int
)?.
map
(
item
=>
(
//
{OVERRUNRULETYPE(int)?.map(item => (
<
Radio
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Radio
>
//
<Radio key={item.value} value={item.value}>{item.label}</Radio>
))
}
//
))}
</
Radio
.
Group
>
//
</Radio.Group>
</
Form
.
Item
>
//
</Form.Item>
)
//
)
}
//
}
}
//
}
/** 满量/满额/赠送促销类型 */
/** 满量/满额/赠送促销类型 */
const
type
=
(
int
=
1
)
=>
{
const
type
=
(
int
=
1
)
=>
{
switch
(
int
)
{
switch
(
int
)
{
...
@@ -1018,7 +1018,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
...
@@ -1018,7 +1018,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
{
allowActivity
(
option
?.
value
)
}
{
allowActivity
(
option
?.
value
)
}
{
allowCoupon
(
option
?.
value
)
}
{
allowCoupon
(
option
?.
value
)
}
{
grouPing
(
option
?.
value
)
}
{
grouPing
(
option
?.
value
)
}
{
exceedRule
(
option
?.
value
)
}
{
/* {exceedRule(option?.value)} */
}
{
probation
(
option
?.
value
)
}
{
probation
(
option
?.
value
)
}
{
lottery
(
option
?.
value
)
}
{
lottery
(
option
?.
value
)
}
{
advanceSale
(
option
?.
value
)
}
{
advanceSale
(
option
?.
value
)
}
...
...
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