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
ed47b483
Commit
ed47b483
authored
Aug 02, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 展示适用会员等级
parent
2837281e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
17 deletions
+19
-17
index.tsx
...lity/components/FormilyFieldItem/TofuCheckGroup/index.tsx
+3
-2
index.tsx
...n/marketingAbility/components/TofuCheckboxGroup/index.tsx
+3
-3
index.tsx
...lity/merchantCoupon/components/ApplicableMember/index.tsx
+6
-7
index.tsx
...gAbility/merchantCoupon/components/CouponDetail/index.tsx
+0
-1
index.tsx
...merchantCouponUnsubmitted/components/CouponForm/index.tsx
+7
-4
No files found.
src/pages/transaction/marketingAbility/components/FormilyFieldItem/TofuCheckGroup/index.tsx
View file @
ed47b483
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-25 09:40:03
* @Date: 2021-06-25 09:40:03
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-25 11:28:05
* @LastEditTime: 2021-0
8-02 18:40:16
* @Description: formily 豆腐多选框
* @Description: formily 豆腐多选框
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -14,8 +14,9 @@ const FormilyTofuCheckboxGroup = connect()((props) => {
...
@@ -14,8 +14,9 @@ const FormilyTofuCheckboxGroup = connect()((props) => {
dataSource
,
dataSource
,
value
,
value
,
onChange
,
onChange
,
...
rest
}
=
props
;
}
=
props
;
return
<
TofuCheckboxGroup
options=
{
dataSource
}
value=
{
value
}
onChange=
{
onChange
}
/>
return
<
TofuCheckboxGroup
options=
{
dataSource
}
value=
{
value
}
onChange=
{
onChange
}
{
...
rest
}
/>
});
});
export
default
FormilyTofuCheckboxGroup
;
export
default
FormilyTofuCheckboxGroup
;
src/pages/transaction/marketingAbility/components/TofuCheckboxGroup/index.tsx
View file @
ed47b483
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-23 10:14:05
* @Date: 2021-06-23 10:14:05
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-02 1
7:42:33
* @LastEditTime: 2021-08-02 1
8:39:18
* @Description: 豆腐方块复选框
* @Description: 豆腐方块复选框
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
@@ -87,7 +87,7 @@ const TofuCheckboxGroup: React.FC<TofuCheckboxGroupProps> = (props) => {
...
@@ -87,7 +87,7 @@ const TofuCheckboxGroup: React.FC<TofuCheckboxGroupProps> = (props) => {
{
options
.
map
((
item
)
=>
{
{
options
.
map
((
item
)
=>
{
const
itemCls
=
classNames
(
styles
[
'tofuCheckbox-list-item'
],
{
const
itemCls
=
classNames
(
styles
[
'tofuCheckbox-list-item'
],
{
[
styles
[
'tofuCheckbox-list-item-checked'
]]:
Array
.
isArray
(
value
)
&&
value
.
includes
(
item
.
value
),
[
styles
[
'tofuCheckbox-list-item-checked'
]]:
Array
.
isArray
(
value
)
&&
value
.
includes
(
item
.
value
),
[
styles
[
'tofuCheckbox-list-item-disabled'
]]:
item
.
disabled
,
[
styles
[
'tofuCheckbox-list-item-disabled'
]]:
item
.
disabled
||
disabled
,
});
});
return
(
return
(
<
div
key=
{
item
.
value
}
className=
{
itemCls
}
>
<
div
key=
{
item
.
value
}
className=
{
itemCls
}
>
...
@@ -95,7 +95,7 @@ const TofuCheckboxGroup: React.FC<TofuCheckboxGroupProps> = (props) => {
...
@@ -95,7 +95,7 @@ const TofuCheckboxGroup: React.FC<TofuCheckboxGroupProps> = (props) => {
<
Checkbox
<
Checkbox
value=
{
item
.
value
}
value=
{
item
.
value
}
className=
{
styles
[
'tofuCheckbox-list-item-checkbox'
]
}
className=
{
styles
[
'tofuCheckbox-list-item-checkbox'
]
}
disabled=
{
item
.
disabled
}
disabled=
{
item
.
disabled
||
disabled
}
/>
/>
</
div
>
</
div
>
)
)
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/ApplicableMember/index.tsx
View file @
ed47b483
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-08-02 16:56:32
* @Date: 2021-08-02 16:56:32
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-02 1
7:48:07
* @LastEditTime: 2021-08-02 1
8:35:22
* @Description: 适用用户
* @Description: 适用用户
*/
*/
import
React
,
{
useMemo
}
from
'react'
;
import
React
,
{
useMemo
}
from
'react'
;
...
@@ -28,10 +28,6 @@ interface IProps extends MellowCardProps {
...
@@ -28,10 +28,6 @@ interface IProps extends MellowCardProps {
*/
*/
suitableMemberTypes
:
{}[],
suitableMemberTypes
:
{}[],
/**
/**
* 适用用户角色
*/
applicationUserRole
:
{}[],
/**
* 适用用户列表
* 适用用户列表
*/
*/
applicationMemberLevel
:
ApplicationMemberLevelType
[],
applicationMemberLevel
:
ApplicationMemberLevelType
[],
...
@@ -51,6 +47,10 @@ const ApplicableMember: React.FC<IProps> = (props) => {
...
@@ -51,6 +47,10 @@ const ApplicableMember: React.FC<IProps> = (props) => {
const
showApplicationMemberLevel
=
true
;
const
showApplicationMemberLevel
=
true
;
let
applicationUserRoleOptions
=
applicableMember
?.
applicationMemberLevel
?.
map
((
item
)
=>
({
label
:
item
.
roleName
,
value
:
item
.
id
}));
// 去重
applicationUserRoleOptions
=
applicationUserRoleOptions
?.
filter
((
item
,
index
)
=>
applicationUserRoleOptions
.
findIndex
(
item2
=>
item2
.
label
===
item
.
label
)
===
index
);
return
(
return
(
<
MellowCard
<
MellowCard
title=
"适用用户"
title=
"适用用户"
...
@@ -77,8 +77,7 @@ const ApplicableMember: React.FC<IProps> = (props) => {
...
@@ -77,8 +77,7 @@ const ApplicableMember: React.FC<IProps> = (props) => {
<>
<>
<
Field
<
Field
type=
"string"
type=
"string"
enum=
{
[]
}
enum=
{
applicationUserRoleOptions
}
default=
{
[
0
]
}
title=
"适用用户角色"
title=
"适用用户角色"
name=
"applicationUserRole"
name=
"applicationUserRole"
x
-
component=
"TofuCheckGroup"
x
-
component=
"TofuCheckGroup"
...
...
src/pages/transaction/marketingAbility/merchantCoupon/components/CouponDetail/index.tsx
View file @
ed47b483
...
@@ -330,7 +330,6 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
...
@@ -330,7 +330,6 @@ const MerchantCouponDetail: React.FC<IProps> = (props) => {
<
ApplicableMember
<
ApplicableMember
applicableMember=
{
{
applicableMember=
{
{
suitableMemberTypes
:
[],
suitableMemberTypes
:
[],
applicationUserRole
:
[],
applicationMemberLevel
:
dataSource
?.
suitableMemberLevelTypes
,
applicationMemberLevel
:
dataSource
?.
suitableMemberLevelTypes
,
}
}
}
}
id=
"applicableMember"
id=
"applicableMember"
...
...
src/pages/transaction/marketingAbility/merchantCoupon/merchantCouponUnsubmitted/components/CouponForm/index.tsx
View file @
ed47b483
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-24 13:47:47
* @Date: 2021-06-24 13:47:47
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-30 18:12:09
* @LastEditTime: 2021-0
8-02 17:58:54
* @Description: 新增/修改 优惠券表单
* @Description: 新增/修改 优惠券表单
*/
*/
import
React
,
{
useState
,
useMemo
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useMemo
,
useEffect
}
from
'react'
;
...
@@ -123,11 +123,15 @@ export type SubmitValueType = {
...
@@ -123,11 +123,15 @@ export type SubmitValueType = {
brand
:
number
,
brand
:
number
,
}[],
}[],
/**
/**
* 适用会员
*/
suitableMemberTypes
:
number
[],
/**
* 适用用户角色
* 适用用户角色
*/
*/
applicationUserRole
:
any
[],
applicationUserRole
:
any
[],
/**
/**
* 适用会员
* 适用会员
等级
*/
*/
applicationMemberLevel
:
number
[],
applicationMemberLevel
:
number
[],
/**
/**
...
@@ -198,7 +202,7 @@ const CouponForm: React.FC<IProps> = (props) => {
...
@@ -198,7 +202,7 @@ const CouponForm: React.FC<IProps> = (props) => {
applicableCategories
:
(
suitableCategoryList
as
any
)?.
map
((
item
)
=>
({
category
:
item
.
map
((
category
)
=>
`
${
category
.
id
}
`
)})),
applicableCategories
:
(
suitableCategoryList
as
any
)?.
map
((
item
)
=>
({
category
:
item
.
map
((
category
)
=>
`
${
category
.
id
}
`
)})),
applicableBrands
:
suitableBrandList
?.
map
((
item
)
=>
({
brand
:
item
.
id
})),
applicableBrands
:
suitableBrandList
?.
map
((
item
)
=>
({
brand
:
item
.
id
})),
applicationUserRole
:
[],
applicationUserRole
:
[],
applicationMemberLevel
:
suitableMemberLevelTypes
,
applicationMemberLevel
:
suitableMemberLevelTypes
?.
map
((
item
)
=>
item
.
id
)
,
suitableMallTypes
:
suitableMallTypes
?.
map
((
item
)
=>
item
.
id
),
suitableMallTypes
:
suitableMallTypes
?.
map
((
item
)
=>
item
.
id
),
denomination
:
`
${
denomination
}
`
,
denomination
:
`
${
denomination
}
`
,
quantity
:
`
${
quantity
}
`
,
quantity
:
`
${
quantity
}
`
,
...
@@ -282,7 +286,6 @@ const CouponForm: React.FC<IProps> = (props) => {
...
@@ -282,7 +286,6 @@ const CouponForm: React.FC<IProps> = (props) => {
);
);
const
handleSubmit
=
(
values
:
SubmitValueType
)
=>
{
const
handleSubmit
=
(
values
:
SubmitValueType
)
=>
{
console
.
log
(
'values'
,
values
)
const
{
const
{
receiveCondition
,
receiveCondition
,
useConditionMoney
,
useConditionMoney
,
...
...
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