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
3a1a7b17
Commit
3a1a7b17
authored
Apr 12, 2022
by
前端-许冠华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-bug' into 'v2-220418'
fix: 修复代客进货单下单选择是自营商城时,商城id不对的问题 See merge request linkseeks-design/pro-platform!227
parents
b732aff5
7fa1a4b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
21 deletions
+35
-21
useAgentInfo.ts
...action/saleOrder/agentPurchaseOrder/hooks/useAgentInfo.ts
+5
-3
index.tsx
src/pages/transaction/saleOrder/agentPurchaseOrder/index.tsx
+30
-18
No files found.
src/pages/transaction/saleOrder/agentPurchaseOrder/hooks/useAgentInfo.ts
View file @
3a1a7b17
...
...
@@ -12,7 +12,7 @@ import { getTemplateWebMemberShopWebFindCurrMemberShop } from "@/services/Templa
/*
* @Author: GHua
* @Date: 2022-03-30 17:27:01
* @LastEditTime: 2022-04-
08 17:18:28
* @LastEditTime: 2022-04-
12 16:27:17
* @LastEditors: GHua
* @Description:
*/
...
...
@@ -61,8 +61,10 @@ const useAgentInfo = (props?: UseAgentInfoProps): UseAgentInfoRes => {
switch
(
action
.
type
)
{
case
'update'
:
sessionStorage
.
setItem
(
AGENT_ORDER_KEY
,
JSON
.
stringify
(
action
.
payload
))
state
.
agentOrderInfo
=
action
.
payload
return
state
return
{
...
state
,
agentOrderInfo
:
action
.
payload
}
default
:
throw
new
Error
();
}
...
...
src/pages/transaction/saleOrder/agentPurchaseOrder/index.tsx
View file @
3a1a7b17
/*
* @Author: GHua
* @Date: 2022-03-29 17:42:11
* @LastEditTime: 2022-04-
08 17:19:39
* @LastEditTime: 2022-04-
12 16:27:54
* @LastEditors: GHua
* @Description: 代客下单(进货单下单)
*/
...
...
@@ -18,7 +18,7 @@ import { getAuth } from '@/utils/auth'
import
{
GlobalConfig
}
from
'@/global/config'
import
styles
from
'./index.less'
import
{
MallItemType
,
MemberItemType
,
OptionType
}
from
'./types'
import
useAgentInfo
from
'./hooks/useAgentInfo'
import
useAgentInfo
,
{
AGENT_ORDER_KEY
}
from
'./hooks/useAgentInfo'
const
{
Link
}
=
Anchor
;
...
...
@@ -111,6 +111,14 @@ const AgentPurchaseOrder: React.FC = () => {
setSelectMember
(
options
)
};
const
waitMini
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
setTimeout
(()
=>
{
resolve
(
true
)
},
200
);
})
}
const
handleNextStep
=
async
()
=>
{
if
(
!
selectMall
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
'agentOrder.selectMall.required'
,
defaultMessage
:
'请选择需要下单的商城'
}))
...
...
@@ -129,26 +137,30 @@ const AgentPurchaseOrder: React.FC = () => {
setBtnLoading
(
false
)
return
}
}
else
{
await
waitMini
()
}
const
mallInfo
=
{
shopId
:
selectMall
.
id
,
shopName
:
selectMall
.
name
,
type
:
selectMall
.
type
,
isChannel
:
selectMall
.
type
===
3
||
selectMall
.
type
===
4
,
environment
:
selectMall
.
environment
,
property
:
selectMall
.
property
,
self
:
selectMall
.
self
,
memberOperate
:
selectMall
.
memberOperate
,
logoUrl
:
selectMall
.
logoUrl
,
memberId
:
selectMember
.
memberId
,
memberName
:
selectMember
.
name
,
roleId
:
selectMember
.
roleId
,
memberLevel
:
selectMember
.
level
,
storeId
,
}
dispatch
({
type
:
'update'
,
payload
:
{
shopId
:
selectMall
.
id
,
shopName
:
selectMall
.
name
,
type
:
selectMall
.
type
,
isChannel
:
selectMall
.
type
===
3
||
selectMall
.
type
===
4
,
environment
:
selectMall
.
environment
,
property
:
selectMall
.
property
,
self
:
selectMall
.
self
,
memberOperate
:
selectMall
.
memberOperate
,
logoUrl
:
selectMall
.
logoUrl
,
memberId
:
selectMember
.
memberId
,
memberName
:
selectMember
.
name
,
roleId
:
selectMember
.
roleId
,
memberLevel
:
selectMember
.
level
,
storeId
,
}
payload
:
mallInfo
})
history
.
push
(
`/memberCenter/order/saleOrder/agentPurchaseOrder/commodity`
)
setBtnLoading
(
false
)
...
...
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