Commit b2a1f09a authored by XieZhiXiong's avatar XieZhiXiong

fix: 添加按钮是否可操作限制

parent 5da33494
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 18:01:26
* @LastEditTime: 2021-01-28 10:28:06
* @Description: 换货发货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -69,6 +69,11 @@ interface ExchangeDeliverInfoProps {
* 订单记录地址
*/
target: string;
/**
* 是否可操作
*/
isEdit?: boolean;
};
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
......@@ -80,6 +85,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeReceive,
innerStatus,
target,
isEdit = false,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -329,6 +335,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
</Descriptions.Item>
<Descriptions.Item>
{(
isEdit &&
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
......@@ -344,6 +351,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
</a>
)}
{(
isEdit &&
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
......@@ -359,6 +367,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
</a>
)}
{(
isEdit &&
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 15:36:57
* @LastEditTime: 2021-01-28 10:29:01
* @Description: 换货收货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -72,6 +72,11 @@ interface ExchangeReceivedInfoProps {
* 订单记录地址
*/
target: string;
/**
* 是否可操作
*/
isEdit?: boolean;
};
const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
......@@ -83,6 +88,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnReceive,
innerStatus,
target,
isEdit = false,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -339,6 +345,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</Descriptions.Item>
<Descriptions.Item>
{(
isEdit &&
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_UNCONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
......@@ -354,6 +361,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</a>
)}
{(
isEdit &&
!isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_DELIVER &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
......@@ -369,6 +377,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</a>
)}
{(
isEdit &&
isPurchaser &&
item.innerStatus === MAIL_INNER_STATUS_CONFIRMED_RECEIVING &&
innerStatus === EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
......
......@@ -419,6 +419,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnReceive={handleReceivedConfirmReturnReceive}
innerStatus={detailInfo?.innerStatus}
target={target}
isEdit={isEdit}
/>
</Suspense>
</Col>
......@@ -439,6 +440,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmExchangeBack={handleConfirmExchangeBack}
innerStatus={detailInfo?.innerStatus}
target={target}
isEdit={isEdit}
/>
</Suspense>
</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