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
a4139c58
Commit
a4139c58
authored
Sep 26, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复转单数据做了删除,再次切换角色无法请求回来订单数据的问题
parent
c6293f42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
index.tsx
src/pages/transaction/saleOrder/index.tsx
+5
-5
No files found.
src/pages/transaction/saleOrder/index.tsx
View file @
a4139c58
...
...
@@ -36,6 +36,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
const
ref
=
useRef
<
any
>
({})
const
destoryRef
=
useRef
<
any
>
({})
const
pauseRef
=
useRef
<
any
>
({})
const
orderIds
=
useRef
<
number
[]
>
([])
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderVendorCancel
)
const
{
run
:
runPause
,
loading
:
loadingEnd
}
=
useHttpRequest
(
PublicApi
.
postOrderVendorTerminate
)
const
{
transformRef
,
orderColumns
}
=
useTransformOrderTable
(
transformActions
)
...
...
@@ -105,6 +106,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
return
message
.
error
(
'当前登录会员,无服务消费者角色,无法进行转单'
)
}
const
firstRole
=
serversRoles
[
0
];
orderIds
.
current
=
selectRef
.
current
.
length
?
selectRef
.
current
:
(
orderId
?
[
orderId
]
:
[]);
if
(
orderId
)
{
const
{
code
,
data
}
=
await
PublicApi
.
postOrderVendorTransferPreview
({
roleId
:
firstRole
.
memberRoleId
,
orderIds
:
[
orderId
]
},
{
ctlType
:
'none'
})
if
(
code
===
1000
)
{
...
...
@@ -365,7 +367,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'
i
d'
,
rowKey
:
'
orderI
d'
,
columns
:
"{{orderColumns}}"
,
pagination
:
false
,
},
...
...
@@ -374,18 +376,16 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
}
}
effects=
{
(
$
,
actions
)
=>
{
$
(
'onFieldInputChange'
,
'roleId'
).
subscribe
(
async
(
state
)
=>
{
const
ordersValue
=
actions
.
getFieldValue
(
'orders'
);
actions
.
setFieldState
(
'roleId'
,
(
fieldState
)
=>
{
FormPath
.
setIn
(
fieldState
,
'props.x-props.hasFeedback'
,
true
);
FormPath
.
setIn
(
fieldState
,
'loading'
,
true
);
});
const
{
code
,
data
}
=
await
PublicApi
.
postOrderVendorTransferPreview
({
roleId
:
state
.
value
,
orderIds
:
order
sValue
.
map
((
item
)
=>
item
.
orderId
)
},
{
ctlType
:
'none'
})
const
{
code
,
data
}
=
await
PublicApi
.
postOrderVendorTransferPreview
({
roleId
:
state
.
value
,
orderIds
:
order
Ids
.
current
},
{
ctlType
:
'none'
})
if
(
code
===
1000
)
{
actions
.
setFieldValue
(
'orders'
,
data
)
actions
.
setFieldState
(
'NOT_SUBMIT_TITLE'
,
prevState
=>
{
prevState
.
props
[
'x-component-props'
].
number
=
order
sValue
.
length
prevState
.
props
[
'x-component-props'
].
number
=
order
Ids
.
current
})
}
...
...
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