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
ab8d6bf8
Commit
ab8d6bf8
authored
Apr 06, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理批量新增仓位报方式异常问题
parent
720c34c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
index.tsx
src/pages/priceManage/priceStrategy/index.tsx
+9
-9
batchAddRepository.tsx
src/pages/repositories/batchAddRepository.tsx
+1
-0
No files found.
src/pages/priceManage/priceStrategy/index.tsx
View file @
ab8d6bf8
...
...
@@ -34,7 +34,7 @@ const PriceManage: React.FC<{}> = () => {
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
:
any
,
record
:
any
)
=>
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/detail?id=${record.id}&preview=1`
}
...
...
@@ -90,7 +90,7 @@ const PriceManage: React.FC<{}> = () => {
title
:
intl
.
formatMessage
({
id
:
'priceManage.priceStrategy.columns.min'
}),
dataIndex
:
'min'
,
key
:
'min'
,
render
:
(
text
:
any
,
reocrd
:
any
)
=>
{
render
:
(
text
,
reocrd
)
=>
{
if
(
reocrd
.
priceType
===
1
)
{
if
(
reocrd
.
max
===
reocrd
.
min
)
return
<>
{
intl
.
formatMessage
({
id
:
'priceManage.priceStrategy.columns.currency'
})
}{
reocrd
.
min
}
</>
...
...
@@ -111,7 +111,7 @@ const PriceManage: React.FC<{}> = () => {
title
:
intl
.
formatMessage
({
id
:
'priceManage.priceStrategy.columns.isEnable'
}),
dataIndex
:
'isEnable'
,
key
:
'isEnable'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
,
record
)
=>
(
<
AuthButton
btnCode=
'priceManage.state'
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleUpdateState
(
record
)
}
...
...
@@ -138,7 +138,7 @@ const PriceManage: React.FC<{}> = () => {
title
:
intl
.
formatMessage
({
id
:
'priceManage.priceStrategy.columns.option'
}),
dataIndex
:
'option'
,
width
:
128
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
,
record
)
=>
{
return
(
<>
<
AuthButton
btnCode=
'priceManage.edit'
>
...
...
@@ -155,7 +155,7 @@ const PriceManage: React.FC<{}> = () => {
}
];
const
fetchData
=
(
params
:
any
)
=>
{
const
fetchData
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getProductCommodityGetUnitPriceStrategyList
(
params
).
then
(
res
=>
{
const
{
data
}
=
res
...
...
@@ -164,7 +164,7 @@ const PriceManage: React.FC<{}> = () => {
})
}
const
handleUpdateState
=
(
record
:
any
)
=>
{
const
handleUpdateState
=
(
record
)
=>
{
postProductCommodityUpdateUnitPriceStrategyStatus
({
id
:
record
.
id
,
isEnable
:
!
record
.
isEnable
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -174,11 +174,11 @@ const PriceManage: React.FC<{}> = () => {
})
}
const
handleModify
=
(
record
:
any
)
=>
{
const
handleModify
=
(
record
)
=>
{
history
.
push
(
`
${
history
.
location
.
pathname
}
/edit?id=
${
record
.
id
}
`
)
}
const
handleDelete
=
(
record
:
any
)
=>
{
const
handleDelete
=
(
record
)
=>
{
postProductCommodityDeleteUnitPriceStrategy
({
id
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -208,7 +208,7 @@ const PriceManage: React.FC<{}> = () => {
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
fetchTableData=
{
(
params
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
...
...
src/pages/repositories/batchAddRepository.tsx
View file @
ab8d6bf8
...
...
@@ -55,6 +55,7 @@ const BatchAddRepository: React.FC<{}> = () => {
addSchemaAction
.
getFieldState
(
'shopIds'
,
state
=>
{
params
[
'shopIds'
]
=
state
.
value
.
map
(
item
=>
state
.
props
[
'x-component-props'
].
dataSource
.
filter
(
_
=>
_
.
id
===
item
)[
0
])
})
params
[
'inventoryDeductWay'
]
=
1
let
res
=
await
postProductFreightSpaceAddBatch
(
params
)
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
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