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
d16fb273
Commit
d16fb273
authored
Nov 23, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增价格策略移除会员必选
parent
8600a63d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
index.tsx
src/pages/priceManage/effect/index.tsx
+3
-1
setStrategy.tsx
src/pages/priceManage/priceStrategy/setStrategy.tsx
+5
-5
No files found.
src/pages/priceManage/effect/index.tsx
View file @
d16fb273
...
@@ -95,12 +95,13 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche
...
@@ -95,12 +95,13 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche
let
_params
:
any
=
{}
let
_params
:
any
=
{}
_params
[
"name"
]
=
data
.
name
_params
[
"name"
]
=
data
.
name
_params
[
"priceType"
]
=
data
.
priceType
_params
[
"priceType"
]
=
data
.
priceType
let
shopInfo
=
ctx
.
getFieldState
(
"shopId"
)
.
dataSource
[
0
]
let
shopInfo
=
ctx
.
getFieldState
(
"shopId"
)
[
'values'
][
1
]
_params
[
"shopId"
]
=
shopInfo
[
"id"
]
_params
[
"shopId"
]
=
shopInfo
[
"id"
]
_params
[
"type"
]
=
shopInfo
[
"type"
]
_params
[
"type"
]
=
shopInfo
[
"type"
]
_params
[
"environment"
]
=
shopInfo
[
"environment"
]
_params
[
"environment"
]
=
shopInfo
[
"environment"
]
_params
[
"commodity"
]
=
{
id
:
data
.
productId
}
_params
[
"commodity"
]
=
{
id
:
data
.
productId
}
if
(
data
?.
commodityMemberList
)
{
_params
[
"commodityMemberList"
]
=
data
.
commodityMemberList
.
map
(
item
=>
({
_params
[
"commodityMemberList"
]
=
data
.
commodityMemberList
.
map
(
item
=>
({
memberId
:
item
.
memberId
,
memberId
:
item
.
memberId
,
memberName
:
item
.
name
,
memberName
:
item
.
name
,
...
@@ -108,6 +109,7 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche
...
@@ -108,6 +109,7 @@ export const transformParamsForApi = (data: any, ctx: ISchemaFormActions | ISche
memberRoleId
:
item
.
roleId
,
memberRoleId
:
item
.
roleId
,
memberRoleName
:
item
.
roleName
,
memberRoleName
:
item
.
roleName
,
}))
}))
}
_params
[
"memberUnitPriceList"
]
=
data
.
memberUnitPriceList
.
map
(
item
=>
({
_params
[
"memberUnitPriceList"
]
=
data
.
memberUnitPriceList
.
map
(
item
=>
({
commodityUnitPrice
:
{
id
:
item
.
id
},
commodityUnitPrice
:
{
id
:
item
.
id
},
unitPrice
:
item
[
"单价"
]
unitPrice
:
item
[
"单价"
]
...
...
src/pages/priceManage/priceStrategy/setStrategy.tsx
View file @
d16fb273
...
@@ -27,10 +27,10 @@ const SetStrategy: React.FC<{}> = () => {
...
@@ -27,10 +27,10 @@ const SetStrategy: React.FC<{}> = () => {
const
formSubmit
=
useCallback
(
async
(
values
)
=>
{
const
formSubmit
=
useCallback
(
async
(
values
)
=>
{
setBtnLoading
(
true
)
setBtnLoading
(
true
)
if
(
!
values
[
'commodityMemberList'
]
&&
!
values
[
'commodityMemberList'
]?.
length
)
{
//
if(!values['commodityMemberList'] && !values['commodityMemberList']?.length) {
message
.
error
(
'请选择指定适用会员'
)
//
message.error('请选择指定适用会员')
setBtnLoading
(
false
)
//
setBtnLoading(false)
}
else
{
//
} else {
const
{
params
}
=
transformParamsForApi
(
values
,
addSchemaAction
)
const
{
params
}
=
transformParamsForApi
(
values
,
addSchemaAction
)
let
_params
=
{}
let
_params
=
{}
...
@@ -44,7 +44,7 @@ const SetStrategy: React.FC<{}> = () => {
...
@@ -44,7 +44,7 @@ const SetStrategy: React.FC<{}> = () => {
},
1000
)
},
1000
)
}
}
setBtnLoading
(
false
)
setBtnLoading
(
false
)
}
//
}
},
[])
},
[])
return
(
return
(
...
...
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