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
2849fe6e
Commit
2849fe6e
authored
Feb 25, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 批量新增仓位保存按钮多次提交处理,商品上架引导查询交易流程配置添加shopType字段
parent
fd8930eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
index.tsx
src/pages/commodity/products/index.tsx
+2
-0
batchAddRepository.tsx
src/pages/repositories/batchAddRepository.tsx
+9
-4
No files found.
src/pages/commodity/products/index.tsx
View file @
2849fe6e
...
@@ -470,6 +470,7 @@ const Products: React.FC<{}> = () => {
...
@@ -470,6 +470,7 @@ const Products: React.FC<{}> = () => {
const
params
=
{
const
params
=
{
shopIds
:
shops
.
map
(
item
=>
item
.
shopId
),
shopIds
:
shops
.
map
(
item
=>
item
.
shopId
),
products
,
products
,
shopType
:
shops
.
map
(
item
=>
item
.
type
)[
0
]
}
}
const
{
data
,
code
}
=
await
postOrderCommonProductProcessFind
(
params
,
{
ctlType
:
'none'
})
const
{
data
,
code
}
=
await
postOrderCommonProductProcessFind
(
params
,
{
ctlType
:
'none'
})
if
(
code
===
1000
&&
data
.
length
>
0
)
{
if
(
code
===
1000
&&
data
.
length
>
0
)
{
...
@@ -485,6 +486,7 @@ const Products: React.FC<{}> = () => {
...
@@ -485,6 +486,7 @@ const Products: React.FC<{}> = () => {
const
executePutaway
=
(
params
)
=>
{
const
executePutaway
=
(
params
)
=>
{
const
fn
=
isBatch
?
postProductCommodityPublishCommodityBatch
:
postProductCommodityPublishCommodity
const
fn
=
isBatch
?
postProductCommodityPublishCommodityBatch
:
postProductCommodityPublishCommodity
const
shopId
=
shopIdRef
.
current
const
shopId
=
shopIdRef
.
current
console
.
log
(
shopId
,
'shopId'
)
// @ts-ignore
// @ts-ignore
fn
(
isBatch
?
{
storeId
:
shopId
[
'id'
],
storeName
:
shopId
[
'name'
],
storeLogo
:
shopId
[
'logo'
],
shopList
:
checkedValues
,
idList
:
RowCtl
.
selectedRowKeys
}
:
{
storeId
:
shopId
?.
id
||
null
,
storeName
:
shopId
?.
name
||
null
,
storeLogo
:
shopId
?.
logo
||
null
,
...
params
}).
then
((
res
)
=>
{
fn
(
isBatch
?
{
storeId
:
shopId
[
'id'
],
storeName
:
shopId
[
'name'
],
storeLogo
:
shopId
[
'logo'
],
shopList
:
checkedValues
,
idList
:
RowCtl
.
selectedRowKeys
}
:
{
storeId
:
shopId
?.
id
||
null
,
storeName
:
shopId
?.
name
||
null
,
storeLogo
:
shopId
?.
logo
||
null
,
...
params
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/repositories/batchAddRepository.tsx
View file @
2849fe6e
import
React
from
'react'
import
React
,
{
useState
}
from
'react'
import
{
history
,
useIntl
}
from
'umi'
import
{
history
,
useIntl
}
from
'umi'
import
{
Button
,
Card
,
message
}
from
'antd'
import
{
Button
,
Card
,
message
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
@@ -21,10 +21,12 @@ const BatchAddRepository: React.FC<{}> = (props) => {
...
@@ -21,10 +21,12 @@ const BatchAddRepository: React.FC<{}> = (props) => {
pageStatus
pageStatus
}
=
usePageStatus
()
}
=
usePageStatus
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
// 整体表单提交
// 整体表单提交
const
formSubmit
=
async
(
values
)
=>
{
const
formSubmit
=
async
(
values
)
=>
{
setLoading
(
true
)
const
params
=
{
...
values
}
const
params
=
{
...
values
}
console
.
log
(
params
,
'params'
)
if
(
params
[
'applyMember'
])
{
if
(
params
[
'applyMember'
])
{
params
[
'applyMember'
]
=
params
[
'applyMember'
]
params
[
'applyMember'
]
=
params
[
'applyMember'
]
}
}
...
@@ -41,7 +43,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
...
@@ -41,7 +43,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
}))
}))
}
}
if
(
!
params
[
'isAllMemberShare'
]
&&
!
params
[
'applyMember'
]?.
length
)
{
if
(
!
params
[
'isAllMemberShare'
]
&&
!
params
[
'applyMember'
]?.
length
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
'repositories.batchAddRepository.error'
}))
setLoading
(
false
)
return
message
.
error
(
intl
.
formatMessage
({
id
:
'repositories.batchAddRepository.error'
}))
}
else
{
}
else
{
addSchemaAction
.
getFieldState
(
'warehouseId'
,
prevState
=>
{
addSchemaAction
.
getFieldState
(
'warehouseId'
,
prevState
=>
{
if
(
prevState
.
value
)
{
if
(
prevState
.
value
)
{
...
@@ -56,6 +59,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
...
@@ -56,6 +59,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
history
.
goBack
()
},
1000
)
},
1000
)
}
else
{
setLoading
(
true
)
}
}
}
}
}
}
...
@@ -69,7 +74,7 @@ const BatchAddRepository: React.FC<{}> = (props) => {
...
@@ -69,7 +74,7 @@ const BatchAddRepository: React.FC<{}> = (props) => {
extra=
{
(
extra=
{
(
pageStatus
!==
PageStatus
.
PREVIEW
pageStatus
!==
PageStatus
.
PREVIEW
?
(
?
(
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'repositories.batchAddRepository.extra'
})
}
{
intl
.
formatMessage
({
id
:
'repositories.batchAddRepository.extra'
})
}
</
Button
>
</
Button
>
)
)
...
...
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