Commit b2a1f09a authored by XieZhiXiong's avatar XieZhiXiong

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

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