Commit 47f0f20f authored by XieZhiXiong's avatar XieZhiXiong

售后维修不需要工作流相关

parent e5d82bda
...@@ -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-14 15:33:42 * @LastEditTime: 2020-12-15 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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment