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
434f4005
Commit
434f4005
authored
May 17, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 跟进合同订单售后流程枚举从新接口获取
parent
cdf335d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
15 deletions
+39
-15
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+39
-15
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
434f4005
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-1
4 17:12:16
* @LastEditTime: 2021-05-1
7 16:20:49
* @Description: 维修商品抽屉组件
*/
import
React
from
'react'
;
...
...
@@ -187,13 +187,16 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
if
(
orderListRes
)
{
let
processEnumRes
=
{
data
:
[],
code
:
0
};
// 售后退货、换货才涉及工作流相关
// 售后退货、换货才涉及售后工作流相关
// 这里分两种状况,一种是普通的订单、而是合同订单
// 普通订单根据订单商品,请求商品的售后流程枚举组装数据
// 合同订单根据订单的合同id,请求合同的售后流程枚举组装数据
if
(
afterType
===
2
||
afterType
===
3
)
{
// 获取对应订单列表的工作流类型
// 获取对应订单列表的
售后
工作流类型
const
payload
=
[];
orderListRes
.
data
.
forEach
(
item
=>
{
if
(
item
.
productDateilss
)
{
if
(
!
isMateriel
&&
item
.
productDateilss
)
{
item
.
productDateilss
.
forEach
(
product
=>
{
const
atom
=
{
productId
:
product
.
productId
,
...
...
@@ -205,6 +208,15 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payload
.
push
(
atom
);
});
}
if
(
isMateriel
)
{
const
atom
=
{
contractId
:
item
.
contractId
,
memberId
:
item
.
memberId
,
memberRoleId
:
item
.
memberRoleId
,
type
:
afterType
,
// 流程类型
};
payload
.
push
(
atom
);
}
});
if
(
!
payload
.
length
)
{
...
...
@@ -215,16 +227,24 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
return
;
}
if
(
!
isMateriel
)
{
processEnumRes
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
},
{
ctlType
:
'none'
,
processEnumRes
=
(
!
isMateriel
?
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
},
{
ctlType
:
'none'
,
})
:
await
PublicApi
.
postManageRuleGetProcessEnums
({
processEnumRequests
:
payload
,
},
{
ctlType
:
'none'
,
})
);
if
(
processEnumRes
.
code
!==
1000
)
{
this
.
setState
({
loading
:
false
,
});
if
(
processEnumRes
.
code
!==
1000
)
{
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
return
;
}
return
;
}
}
...
...
@@ -235,10 +255,14 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
// 组装数据
let
i
=
0
;
orderListRes
.
data
.
forEach
(
item
=>
{
orderListRes
.
data
.
forEach
(
(
item
,
j
)
=>
{
if
(
item
.
productDateilss
)
{
item
.
productDateilss
.
forEach
(
product
=>
{
product
.
processEnum
=
!
isMateriel
?
processEnumRes
.
data
[
i
]
?
processEnumRes
.
data
[
i
].
processEnum
:
undefined
:
item
.
processEnum
;
if
(
!
isMateriel
)
{
product
.
processEnum
=
processEnumRes
.
data
[
i
]
?
processEnumRes
.
data
[
i
].
processEnum
:
undefined
;
}
else
{
product
.
processEnum
=
processEnumRes
.
data
[
j
]
?
processEnumRes
.
data
[
j
].
processEnum
:
undefined
;
}
// product.processEnum = mockMap[Math.floor(Math.random()*2 + 1)];
i
++
;
// 防止重复添加数据
...
...
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