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
shenshaokai
jinfa-platform
Commits
ca952db7
Commit
ca952db7
authored
Mar 23, 2022
by
前端-许冠华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cherry-pick' into 'v2'
fix: 修复新增营销活动新增商品搭配和不能设置两个相同门槛的优惠梯度 See merge request linkseeks-design/pro-platform!17
parents
10fbc7b0
2452f5b3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
4 deletions
+29
-4
index.tsx
...n/marketingAbility/components/couponsListLayout/index.tsx
+8
-0
index.tsx
...onents/listModalLayout/components/productLayout/index.tsx
+1
-1
index.tsx
...ion/marketingAbility/components/listModalLayout/index.tsx
+11
-3
index.tsx
...n/marketingAbility/components/productListLayout/index.tsx
+8
-0
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+1
-0
No files found.
src/pages/transaction/marketingAbility/components/couponsListLayout/index.tsx
View file @
ca952db7
...
@@ -109,7 +109,15 @@ const CouponsListLayout: React.FC<CouponsListLayoutProps> = (props: any) => {
...
@@ -109,7 +109,15 @@ const CouponsListLayout: React.FC<CouponsListLayoutProps> = (props: any) => {
message
.
warning
(
remind
.
message
[
2
])
message
.
warning
(
remind
.
message
[
2
])
return
return
}
}
let
limitValue
:
number
[]
=
[];
couponSource
.
forEach
(
_item
=>
{
limitValue
.
push
(
_item
.
limitValue
)
})
if
((
new
Set
(
limitValue
)).
size
!==
limitValue
.
length
)
{
message
.
error
(
`
${
remind
.
label
[
1
]}
阶梯必须大于或小于其他
${
remind
.
label
[
1
]}
阶梯`
)
}
else
{
onConfirm
(
couponSource
)
onConfirm
(
couponSource
)
}
})
})
}
}
...
...
src/pages/transaction/marketingAbility/components/listModalLayout/components/productLayout/index.tsx
View file @
ca952db7
...
@@ -81,7 +81,6 @@ const ProductLayout: React.FC<ProductLayoutProps> = (props: any) => {
...
@@ -81,7 +81,6 @@ const ProductLayout: React.FC<ProductLayoutProps> = (props: any) => {
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,3}
)?
$
)
|
(
^
\d\.\d
{1,3}$
)
/
;
const
pattern
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,3}
)?
$
)
|
(
^
\d\.\d
{1,3}$
)
/
;
const
pattern1
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,2}
)?
$
)
|
(
^
\d\.\d
{1,2}$
)
/
;
const
pattern1
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,2}
)?
$
)
|
(
^
\d\.\d
{1,2}$
)
/
;
console
.
log
(
remind
,
'remind'
)
if
(
!
value
)
{
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
remind
.
message
[
4
]));
return
Promise
.
reject
(
new
Error
(
remind
.
message
[
4
]));
}
}
...
@@ -114,6 +113,7 @@ const ProductLayout: React.FC<ProductLayoutProps> = (props: any) => {
...
@@ -114,6 +113,7 @@ const ProductLayout: React.FC<ProductLayoutProps> = (props: any) => {
rules=
{
[{
rules=
{
[{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
required
:
true
,
validator
:
(
_rule
,
value
)
=>
{
const
pattern
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,3}
)?
$
)
|
(
^
\d\.\d
{1,3}$
)
/
;
const
pattern
=
/
(
^
[
1-9
](\d
+
)?(\.\d
{1,3}
)?
$
)
|
(
^
\d\.\d
{1,3}$
)
/
;
const
v
=
form
.
getFieldValue
(
`swapPrice_${index}_${_index}`
).
validator
()
if
(
!
value
)
{
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
`${intl.formatMessage({ id: 'marketingAbility.qingshuruhuangoudanjia'})}`
));
return
Promise
.
reject
(
new
Error
(
`${intl.formatMessage({ id: 'marketingAbility.qingshuruhuangoudanjia'})}`
));
}
}
...
...
src/pages/transaction/marketingAbility/components/listModalLayout/index.tsx
View file @
ca952db7
...
@@ -143,15 +143,23 @@ const ListModalLayout: React.FC<ListModalLayoutProps> = (props: any) => {
...
@@ -143,15 +143,23 @@ const ListModalLayout: React.FC<ListModalLayoutProps> = (props: any) => {
message
.
warning
(
remind
.
message
[
2
])
message
.
warning
(
remind
.
message
[
2
])
return
return
}
}
let
limitValue
:
number
[]
=
[];
dataSource
.
forEach
(
_item
=>
{
limitValue
.
push
(
_item
.
limitValue
)
})
if
((
new
Set
(
limitValue
)).
size
!==
limitValue
.
length
)
{
message
.
error
(
`
${
remind
.
label
[
1
]}
阶梯必须大于或小于其他
${
remind
.
label
[
1
]}
阶梯`
)
}
else
{
onConfirm
(
dataSource
)
onConfirm
(
dataSource
)
}
})
})
}
}
const
renderFooter
=
()
=>
{
const
renderFooter
=
()
=>
{
return
(
return
(
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.quxiao'
})
}
</
Button
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.quxiao'
})
}
</
Button
>
<
Button
type=
"primary"
onClick=
{
handleClick
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.tijiao'
})
}
</
Button
>
<
Button
type=
"primary"
onClick=
{
handleClick
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.tijiao'
})
}
</
Button
>
</
div
>
</
div
>
)
)
}
}
...
@@ -295,7 +303,7 @@ const ListModalLayout: React.FC<ListModalLayoutProps> = (props: any) => {
...
@@ -295,7 +303,7 @@ const ListModalLayout: React.FC<ListModalLayoutProps> = (props: any) => {
))
}
))
}
</
Form
>
</
Form
>
{
/* 添加分组 */
}
{
/* 添加分组 */
}
{
!
isPreview
&&
<
Button
type=
"dashed"
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAppend
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.tianjia'
})
}
</
Button
>
}
{
!
isPreview
&&
<
Button
type=
"dashed"
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAppend
}
>
{
intl
.
formatMessage
({
id
:
'marketingAbility.tianjia'
})
}
</
Button
>
}
{
/* 弹框: -> 商品 */
}
{
/* 弹框: -> 商品 */
}
<
CollocationLayout
<
CollocationLayout
isGift=
{
isGift
}
isGift=
{
isGift
}
...
...
src/pages/transaction/marketingAbility/components/productListLayout/index.tsx
View file @
ca952db7
...
@@ -198,9 +198,14 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
...
@@ -198,9 +198,14 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
const
fields
=
[...
dataSource
];
const
fields
=
[...
dataSource
];
fields
.
forEach
(
item
=>
{
fields
.
forEach
(
item
=>
{
if
(
item
.
skuId
===
skuId
)
{
if
(
item
.
skuId
===
skuId
)
{
console
.
log
(
params
,
'params'
)
item
.
goodsSubsidiaryGroupList
=
[...
params
]
item
.
goodsSubsidiaryGroupList
=
[...
params
]
}
}
})
})
form
.
setFieldsValue
({
'productList'
:
fields
})
console
.
log
(
fields
,
'fields'
)
setListModalVisible
(
false
)
setListModalVisible
(
false
)
setDataSource
(
fields
)
setDataSource
(
fields
)
}
}
...
@@ -213,6 +218,9 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
...
@@ -213,6 +218,9 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
item
.
couponGroupList
=
[...
params
]
item
.
couponGroupList
=
[...
params
]
}
}
})
})
form
.
setFieldsValue
({
'productList'
:
fields
})
setListModalVisible
(
false
)
setListModalVisible
(
false
)
setDataSource
(
fields
)
setDataSource
(
fields
)
}
}
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
ca952db7
...
@@ -117,6 +117,7 @@ const AddedMarketing = () => {
...
@@ -117,6 +117,7 @@ const AddedMarketing = () => {
return
item
return
item
})
})
}
}
console
.
log
(
res
.
productList
,
1086
)
// if (res['activityDefined']['assembleTime']) {
// if (res['activityDefined']['assembleTime']) {
// params['activityDefined'].assembleTime = Number(moment(res['activityDefined']['assembleTime']).format('x'));
// params['activityDefined'].assembleTime = Number(moment(res['activityDefined']['assembleTime']).format('x'));
// }
// }
...
...
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