Commit c8d9ed11 authored by XieZhiXiong's avatar XieZhiXiong

fix:修复点击批次,对应批次信息不显示的问题

parent ab3dd248
......@@ -2,10 +2,10 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-03 20:47:30
* @LastEditTime: 2020-12-23 10:48:05
* @Description: 换货发货统计、换货发货明细
*/
import React from 'react';
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { SummaryData, Detailed } from './interface';
......@@ -74,6 +74,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeReceive,
innerStatus,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
const summaryColumns: EditableColumns[] = [
{
......@@ -198,8 +199,8 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
},
];
const handleBatchChange = value => {
const handleBatchChange = e => {
setCurrentBatch(e.target.value);
};
const handleConfirmExchangeDeliver = (id) => {
......@@ -260,13 +261,18 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
value: item.batch,
}))
}
defaultValue={1}
defaultValue={currentBatch}
onChange={handleBatchChange}
optionType="button"
/>
{detailed.map(item => (
<div key={item.batch}>
<div
key={item.batch}
style={{
display: item.batch === currentBatch ? 'block' : 'none',
}}
>
<div className={styles.detailedWrap}>
<Row align="middle">
<Col span={16}>
......
......@@ -5,7 +5,7 @@
* @LastEditTime: 2020-12-22 11:25:50
* @Description: 退货收货统计、退货发货明细
*/
import React from 'react';
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import {
ClockCircleOutlined,
......@@ -77,6 +77,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnReceive,
innerStatus,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
const summaryColumns: EditableColumns[] = [
{
......@@ -201,8 +202,8 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
},
];
const handleBatchChange = value => {
const handleBatchChange = e => {
setCurrentBatch(e.target.value);
};
const handleConfirmReturnDeliver = (id) => {
......@@ -270,13 +271,18 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
value: item.batch,
}))
}
defaultValue={1}
defaultValue={currentBatch}
onChange={handleBatchChange}
optionType="button"
/>
{detailed.map(item => (
<div key={item.batch}>
<div
key={item.batch}
style={{
display: item.batch === currentBatch ? 'block' : 'none',
}}
>
<div className={styles.detailedWrap}>
<Row align="middle">
<Col span={16}>
......
......@@ -2,10 +2,10 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-22 13:34:38
* @LastEditTime: 2020-12-23 10:45:27
* @Description: 退货收货统计、退货发货明细
*/
import React from 'react';
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import {
ClockCircleOutlined,
......@@ -76,6 +76,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
onConfirmReturnReceive,
innerStatus,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
const summaryColumns: EditableColumns[] = [
{
......@@ -200,8 +201,8 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
},
];
const handleBatchChange = value => {
const handleBatchChange = e => {
setCurrentBatch(e.target.value);
};
const handleConfirmReturnDeliver = (id) => {
......@@ -269,13 +270,18 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
value: item.batch,
}))
}
defaultValue={1}
defaultValue={currentBatch}
onChange={handleBatchChange}
optionType="button"
/>
{detailed.map(item => (
<div key={item.batch}>
<div
key={item.batch}
style={{
display: item.batch === currentBatch ? 'block' : 'none',
}}
>
<div className={styles.detailedWrap}>
<Row align="middle">
<Col span={16}>
......
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