Commit aff1a078 authored by XieZhiXiong's avatar XieZhiXiong

feat: 拆分可编辑状态

parent d6417922
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 15:16:18
* @LastEditTime: 2021-02-20 16:54:41
* @Description: 退款明细
*/
import React, { useState } from 'react';
......
......@@ -57,9 +57,21 @@ interface DetailInfoProps {
*/
id: string;
/**
* 是否是编辑的
* 是否是可编辑 是否需要退货
*/
isEdit?: boolean;
isEditReturn?: boolean;
/**
* 是否是 可以退款的
*/
isEditRefund?: boolean;
/**
* 是否是 可以编辑 地址的
*/
isEditAddress?: boolean;
/**
* 是否是 可以编辑 退货发货相关
*/
isEditRefundDeliver?: boolean;
/**
* 历史记录目标路径
*/
......@@ -72,7 +84,9 @@ interface DetailInfoProps {
const DetailInfo: React.FC<DetailInfoProps> = ({
id,
isEdit = false,
isEditRefund = false,
isEditAddress = false,
isEditRefundDeliver = false,
target,
headExtra = null,
}) => {
......@@ -413,7 +427,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
target={target}
isEdit={isEdit}
isEdit={isEditRefundDeliver}
/>
</Suspense>
</Col>
......@@ -440,7 +454,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
purchaserRoleId={detailInfo?.roleId}
supplierId={detailInfo?.parentMemberId}
supplierRoleId={detailInfo?.parentMemberRoleId}
isEdit={isEdit}
isEdit={isEditRefund}
isPurchaser
/>
</Suspense>
......@@ -459,6 +473,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</Col>
<Col span={detailInfo && detailInfo.outerStatus === RETURN_OUTER_STATUS_FINISHED ? 12 : 15}>
{/* 退货地址信息 */}
<Suspense fallback={null}>
<ReturnAddressInfo
deliveryAddress={{
......@@ -474,7 +489,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
fullAddress: detailInfo?.returnGoodsAddress?.sendAddress,
}}
onSubmit={() => {}}
isEdit={isEdit && detailInfo?.innerStatus === RETURN_INNER_STATUS_UNCOMMITTED}
isEdit={isEditAddress && detailInfo?.innerStatus === RETURN_INNER_STATUS_UNCOMMITTED}
/>
</Suspense>
</Col>
......
......@@ -141,7 +141,7 @@ const ReturnPrConfirmBackVerify: React.FC = () => {
</Space>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmBack"
isEdit
isEditRefundDeliver
/>
</>
);
......
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 16:56:18
* @Description:
*/
import React, { useState } from 'react';
import { Button } from 'antd';
import { history } from 'umi';
......@@ -43,7 +50,6 @@ const ReturnPrConfirmFinishVerify: React.FC = () => {
</Button>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmFinish"
isEdit
/>
<FinishedModal
......
......@@ -62,7 +62,7 @@ const ReturnPrConfirmResultVerify: React.FC = () => {
]
}}
target="/memberCenter/afterService/returnApplication/returnPrConfirmResult"
isEdit
isEditRefund
/>
</>
);
......
......@@ -52,7 +52,7 @@ const ReturnPrDeliverVerify: React.FC = () => {
</>
)}
target="/memberCenter/afterService/returnApplication/returnPrDeliver"
isEdit
isEditRefundDeliver
/>
<ManualDeliveryModal
......
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