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
47f0f20f
Commit
47f0f20f
authored
Dec 15, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
售后维修不需要工作流相关
parent
e5d82bda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+12
-3
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
47f0f20f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-1
4 15:33:42
* @LastEditTime: 2020-12-1
5 10:08:13
* @Description: 维修商品抽屉组件
* @Description: 维修商品抽屉组件
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
@@ -226,6 +226,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
@@ -226,6 +226,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
searchVal
,
...
searchVal
,
});
});
if
(
orderListRes
)
{
if
(
orderListRes
)
{
let
processEnumRes
=
{
data
:
[],
code
:
0
};
// 售后退货、换货才涉及工作流相关
if
(
type
===
2
||
type
===
3
)
{
// 获取对应订单列表的工作流类型
// 获取对应订单列表的工作流类型
const
payload
=
[];
const
payload
=
[];
...
@@ -242,7 +246,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
@@ -242,7 +246,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
});
});
});
});
const
processEnumRes
:
any
=
await
PublicApi
.
postOrderGetProcessEnum
({
processEnumRes
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
list
:
payload
,
},
{
},
{
ctlType
:
'none'
,
ctlType
:
'none'
,
...
@@ -251,6 +255,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
@@ -251,6 +255,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
return
;
return
;
}
}
}
// const mockMap = {
// const mockMap = {
// 1: 18,
// 1: 18,
...
@@ -261,7 +266,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
@@ -261,7 +266,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
let
i
=
0
;
let
i
=
0
;
orderListRes
.
data
.
forEach
(
item
=>
{
orderListRes
.
data
.
forEach
(
item
=>
{
item
.
productDateilss
.
forEach
(
product
=>
{
item
.
productDateilss
.
forEach
(
product
=>
{
product
.
processEnum
=
processEnumRes
.
data
[
i
]
.
processEnum
;
product
.
processEnum
=
processEnumRes
.
data
[
i
]
?
processEnumRes
.
data
[
i
].
processEnum
:
undefined
;
// product.processEnum = mockMap[Math.floor(Math.random()*2 + 1)];
// product.processEnum = mockMap[Math.floor(Math.random()*2 + 1)];
i
++
;
i
++
;
// 防止重复添加数据
// 防止重复添加数据
...
@@ -512,6 +517,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
...
@@ -512,6 +517,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
// 过滤工作流不同的 商品
// 过滤工作流不同的 商品
filterProductByProcessEnum
=
(
data
)
=>
{
filterProductByProcessEnum
=
(
data
)
=>
{
// 售后退货、换货才涉及工作流相关
if
(
this
.
props
.
type
!==
2
&&
this
.
props
.
type
!==
3
)
{
return
data
;
}
const
first
=
data
.
length
?
data
[
0
]
:
null
;
const
first
=
data
.
length
?
data
[
0
]
:
null
;
if
(
!
first
)
{
if
(
!
first
)
{
...
...
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