Commit cd338a80 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复无法勾选父级的问题

parent 3434c348
...@@ -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: 2021-08-09 16:39:07 * @LastEditTime: 2021-08-10 11:29:44
* @Description: 维修商品抽屉组件 * @Description: 维修商品抽屉组件
*/ */
import React from 'react'; import React from 'react';
...@@ -179,6 +179,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> { ...@@ -179,6 +179,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
} }
this.setState({ loading: true }); this.setState({ loading: true });
try {
const orderListRes = await fetchOrderList({ const orderListRes = await fetchOrderList({
current: `${page}`, current: `${page}`,
pageSize: `${size}`, pageSize: `${size}`,
...@@ -188,6 +189,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> { ...@@ -188,6 +189,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
const { data, ...rest } = orderListRes; const { data, ...rest } = orderListRes;
const newData: { [key: string]: any }[] = data.map((item) => ({ const newData: { [key: string]: any }[] = data.map((item) => ({
...item, ...item,
id: item.orderId,
products: item.products.map(({ productId, ...rest }) => ({ products: item.products.map(({ productId, ...rest }) => ({
id: productId, id: productId,
...rest, ...rest,
...@@ -219,6 +221,9 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> { ...@@ -219,6 +221,9 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}, },
}); });
} }
} catch (error) {
console.warn('error', error);
}
this.setState({ loading: false }); this.setState({ loading: false });
}; };
......
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