Commit 29109a26 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复操作按钮显示错误的问题

parent 28021cdf
...@@ -14,6 +14,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface'; ...@@ -14,6 +14,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable'; import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { import {
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT,
} from '@/constants';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER, MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING, MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
MAIL_INNER_STATUS_CONFIRMED_DELIVER, MAIL_INNER_STATUS_CONFIRMED_DELIVER,
...@@ -53,6 +58,11 @@ interface ExchangeDeliverInfoProps { ...@@ -53,6 +58,11 @@ interface ExchangeDeliverInfoProps {
* 确认退货收货 * 确认退货收货
*/ */
onConfirmExchangeReceive?: (id: number) => Promise<any>; onConfirmExchangeReceive?: (id: number) => Promise<any>;
/**
* 换货申请单内部状态
*/
innerStatus: number;
}; };
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
...@@ -62,6 +72,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -62,6 +72,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeBack, onConfirmExchangeBack,
onConfirmExchangeDeliver, onConfirmExchangeDeliver,
onConfirmExchangeReceive, onConfirmExchangeReceive,
innerStatus,
}) => { }) => {
const summaryColumns: EditableColumns[] = [ const summaryColumns: EditableColumns[] = [
...@@ -282,7 +293,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -282,7 +293,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<Badge color={'#6C9CEB'} text={item.innerStatusName} /> <Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item> <Descriptions.Item>
{item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER && ( {(
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -293,7 +308,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -293,7 +308,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
确认换货发货 确认换货发货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER && ( {(
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -304,7 +323,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -304,7 +323,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
确认换货收货 确认换货收货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING && ( {(
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15 * @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-08 16:29:30 * @LastEditTime: 2020-12-22 11:25:50
* @Description: 退货收货统计、退货发货明细 * @Description: 退货收货统计、退货发货明细
*/ */
import React from 'react'; import React from 'react';
...@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface'; ...@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable'; import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { import {
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
} from '@/constants';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER, MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_DELIVER, MAIL_INNER_STATUS_CONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING, MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
...@@ -56,6 +61,11 @@ interface ExchangeReceivedInfoProps { ...@@ -56,6 +61,11 @@ interface ExchangeReceivedInfoProps {
* 确认退货收货 * 确认退货收货
*/ */
onConfirmReturnReceive?: (id: number) => Promise<any>; onConfirmReturnReceive?: (id: number) => Promise<any>;
/**
* 换货申请单内部状态
*/
innerStatus: number;
}; };
const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
...@@ -65,6 +75,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -65,6 +75,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnBack, onConfirmReturnBack,
onConfirmReturnDeliver, onConfirmReturnDeliver,
onConfirmReturnReceive, onConfirmReturnReceive,
innerStatus,
}) => { }) => {
const summaryColumns: EditableColumns[] = [ const summaryColumns: EditableColumns[] = [
...@@ -292,7 +303,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -292,7 +303,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<Badge color={'#6C9CEB'} text={item.innerStatusName} /> <Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item> <Descriptions.Item>
{item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER && ( {(
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -303,7 +318,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -303,7 +318,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
确认退货发货 确认退货发货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER && ( {(
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -314,7 +333,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -314,7 +333,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
确认退货收货 确认退货收货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING && ( {(
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
......
...@@ -92,7 +92,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ ...@@ -92,7 +92,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
dataIndex: 'status', dataIndex: 'status',
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<StatusTag type={outerStatusMap[record.status] || 'default'} title={text} /> <StatusTag type={outerStatusMap[record.statusCode] || 'default'} title={text} />
), ),
}, },
{ {
......
...@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface'; ...@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable'; import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { import {
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY,
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE,
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT,
} from '@/constants';
import {
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER, MAIL_INNER_STATUS_UNCONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_DELIVER, MAIL_INNER_STATUS_CONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING, MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
...@@ -55,6 +60,11 @@ interface ReturnInfoProps { ...@@ -55,6 +60,11 @@ interface ReturnInfoProps {
* 确认退货收货 * 确认退货收货
*/ */
onConfirmReturnReceive?: (id: number) => Promise<any>; onConfirmReturnReceive?: (id: number) => Promise<any>;
/**
* 退货申请单内部状态
*/
innerStatus: number;
}; };
const ReturnInfo: React.FC<ReturnInfoProps> = ({ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...@@ -64,6 +74,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -64,6 +74,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
onConfirmReturnBack, onConfirmReturnBack,
onConfirmReturnDeliver, onConfirmReturnDeliver,
onConfirmReturnReceive, onConfirmReturnReceive,
innerStatus,
}) => { }) => {
const summaryColumns: EditableColumns[] = [ const summaryColumns: EditableColumns[] = [
...@@ -281,7 +292,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -281,7 +292,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
<Badge color={'#6C9CEB'} text={item.innerStatusName} /> <Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item> <Descriptions.Item>
{item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER && ( {(
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -292,7 +307,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -292,7 +307,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
确认退货发货 确认退货发货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER && ( {(
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
...@@ -303,7 +322,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -303,7 +322,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
确认退货收货 确认退货收货
</a> </a>
)} )}
{item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING && ( {(
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
) && (
<a <a
style={{ style={{
textAlign: 'right', textAlign: 'right',
......
...@@ -18,6 +18,8 @@ import { ...@@ -18,6 +18,8 @@ import {
PAY_CHANNEL_BALANCE, PAY_CHANNEL_BALANCE,
PAY_CHANNEL_CREDIT, PAY_CHANNEL_CREDIT,
PAY_CHANNEL_COD, PAY_CHANNEL_COD,
RETURN_INNER_STATUS_TO_BE_REFUNDED,
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED,
} from '@/constants'; } from '@/constants';
import Stamp from '../Stamp'; import Stamp from '../Stamp';
import CheckVoucherModal from '../CheckVoucherModal'; import CheckVoucherModal from '../CheckVoucherModal';
...@@ -51,6 +53,11 @@ interface ReturnDetailInfoProps { ...@@ -51,6 +53,11 @@ interface ReturnDetailInfoProps {
* 是否是采购商 * 是否是采购商
*/ */
isPurchaser?: boolean; isPurchaser?: boolean;
/**
* 退货申请单内部状态
*/
innerStatus: number;
}; };
const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
...@@ -58,6 +65,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({ ...@@ -58,6 +65,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund, onRefund,
onConfirm, onConfirm,
isPurchaser = false, isPurchaser = false,
innerStatus,
}) => { }) => {
const [visibleResult, setVisibleResult] = useState(false); const [visibleResult, setVisibleResult] = useState(false);
const [notReceivedLoading, setNotReceivedLoading] = useState(false); const [notReceivedLoading, setNotReceivedLoading] = useState(false);
...@@ -255,7 +263,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({ ...@@ -255,7 +263,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<div className={styles['deliver-item-actions']}> <div className={styles['deliver-item-actions']}>
{ {
!isPurchaser && ( !isPurchaser &&
innerStatus === RETURN_INNER_STATUS_TO_BE_REFUNDED && (
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED || item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED ||
item.innerStatus === REFUND_INNER_STATUS_NO_REFUND || item.innerStatus === REFUND_INNER_STATUS_NO_REFUND ||
item.innerStatus === REFUND_INNER_STATUS_REFUND_FAILED item.innerStatus === REFUND_INNER_STATUS_REFUND_FAILED
...@@ -272,7 +281,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({ ...@@ -272,7 +281,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
{item.channel === PAY_CHANNEL_OFFLINE && ( {item.channel === PAY_CHANNEL_OFFLINE && (
<> <>
{ {
isPurchaser && ( isPurchaser &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED && (
item.outerStatus === REFUND_OUTER_STATUS_UNCONFIRMED_REFUND || item.outerStatus === REFUND_OUTER_STATUS_UNCONFIRMED_REFUND ||
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED
) && ( ) && (
......
...@@ -352,6 +352,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -352,6 +352,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnDeliver={handleReceivedConfirmReturnDeliver} onConfirmReturnDeliver={handleReceivedConfirmReturnDeliver}
onConfirmReturnBack={handleConfirmReturnBack} onConfirmReturnBack={handleConfirmReturnBack}
isPurchaser={true} isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
...@@ -364,6 +365,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -364,6 +365,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed={detailInfo && detailInfo.replaceDeliveryGoodsList ? detailInfo.replaceDeliveryGoodsList : []} detailed={detailInfo && detailInfo.replaceDeliveryGoodsList ? detailInfo.replaceDeliveryGoodsList : []}
onConfirmExchangeReceive={handleConfirmExchangeReceive} onConfirmExchangeReceive={handleConfirmExchangeReceive}
isPurchaser={true} isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
......
...@@ -405,6 +405,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -405,6 +405,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
summary={detailInfo && detailInfo.returnStatisticsList ? detailInfo.returnStatisticsList : []} summary={detailInfo && detailInfo.returnStatisticsList ? detailInfo.returnStatisticsList : []}
detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []} detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []}
onConfirmReturnReceive={handleReceivedConfirmReturnReceive} onConfirmReturnReceive={handleReceivedConfirmReturnReceive}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
...@@ -417,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -417,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed={detailInfo && detailInfo.replaceDeliveryGoodsList ? detailInfo.replaceDeliveryGoodsList : []} detailed={detailInfo && detailInfo.replaceDeliveryGoodsList ? detailInfo.replaceDeliveryGoodsList : []}
onConfirmExchangeDeliver={handleConfirmExchangeDeliver} onConfirmExchangeDeliver={handleConfirmExchangeDeliver}
onConfirmExchangeBack={handleConfirmExchangeBack} onConfirmExchangeBack={handleConfirmExchangeBack}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
......
...@@ -390,6 +390,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -390,6 +390,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnDeliver={handleReceivedConfirmReturnDeliver} onConfirmReturnDeliver={handleReceivedConfirmReturnDeliver}
onConfirmReturnBack={handleConfirmReturnBack} onConfirmReturnBack={handleConfirmReturnBack}
isPurchaser={true} isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
...@@ -408,6 +409,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -408,6 +409,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<ReturnDetailInfo <ReturnDetailInfo
dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []} dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []}
onConfirm={handleConfirm} onConfirm={handleConfirm}
innerStatus={detailInfo?.innerStatus}
isPurchaser isPurchaser
/> />
</Suspense> </Suspense>
......
...@@ -7,7 +7,7 @@ import { history, Prompt } from 'umi'; ...@@ -7,7 +7,7 @@ import { history, Prompt } from 'umi';
import moment from 'moment'; import moment from 'moment';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined, PlusOutlined } from '@ant-design/icons'; import { SaveOutlined, PlusOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { GetAsReturnGoodsPageReturnedGoodsResponse } from '@/services/AfterServiceApi'; import { GetAsReturnGoodsPageReturnedGoodsResponse } from '@/services/AfterServiceApi';
import { normalizeFiledata, FileData, isJSONStr } from '@/utils'; import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
...@@ -497,7 +497,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -497,7 +497,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}; };
const handleReturnInfoSubmit = values => { const handleReturnInfoSubmit = values => {
const { getFieldValue, setFieldValue } = addSchemaAction; const { getFieldValue, setFieldValue, setFieldState } = addSchemaAction;
const { index } = orderInfo; const { index } = orderInfo;
const newData = [...getFieldValue('returnGoodsList')]; const newData = [...getFieldValue('returnGoodsList')];
newData.splice(index, 1, { newData.splice(index, 1, {
...@@ -511,6 +511,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -511,6 +511,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}, },
}); });
setFieldValue('returnGoodsList', newData); setFieldValue('returnGoodsList', newData);
addSchemaAction.clearErrors(`returnGoodsList.${index}.returnCount`);
addSchemaAction.clearErrors(`returnGoodsList.${index}.refundAmount`);
setVisibleReturnInfoDrawer(false); setVisibleReturnInfoDrawer(false);
}; };
...@@ -559,6 +561,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -559,6 +561,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...detailInfo, ...detailInfo,
returnGoodsList: returnGoodsList.data, returnGoodsList: returnGoodsList.data,
}} }}
previewPlaceholder=" "
expressionScope={{ expressionScope={{
TableAddButton, TableAddButton,
OuterStatus, OuterStatus,
......
...@@ -437,6 +437,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -437,6 +437,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
summary={detailInfo && detailInfo.returnStatisticsList ? detailInfo.returnStatisticsList : []} summary={detailInfo && detailInfo.returnStatisticsList ? detailInfo.returnStatisticsList : []}
detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []} detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []}
onConfirmReturnReceive={handleReceivedConfirmReturnReceive} onConfirmReturnReceive={handleReceivedConfirmReturnReceive}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
...@@ -455,6 +456,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -455,6 +456,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<ReturnDetailInfo <ReturnDetailInfo
dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []} dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []}
onRefund={handleRefund} onRefund={handleRefund}
innerStatus={detailInfo?.innerStatus}
/> />
</Suspense> </Suspense>
</Col> </Col>
......
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