Commit e3fccb17 authored by XieZhiXiong's avatar XieZhiXiong

chore: 修改判断条件

parent 724d6c4b
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 10:47:55
* @LastEditTime: 2021-01-18 17:50:38
* @Description: 退款明细
*/
import React, { useState } from 'react';
......@@ -18,8 +18,8 @@ import {
PAY_CHANNEL_BALANCE,
PAY_CHANNEL_CREDIT,
PAY_CHANNEL_COD,
RETURN_INNER_STATUS_TO_BE_REFUNDED,
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED,
RETURN_OUTER_STATUS_TO_BE_REFUNDED,
RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED,
} from '@/constants';
import Stamp from '../Stamp';
import CheckVoucherModal from '../CheckVoucherModal';
......@@ -59,6 +59,10 @@ interface ReturnDetailInfoProps {
*/
innerStatus: number;
/**
* 退货申请单外部状态
*/
outerStatus: number;
/**
* 采购商id
*/
purchaserId: number,
......@@ -81,7 +85,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund,
onConfirm,
isPurchaser = false,
innerStatus,
innerStatus,
outerStatus,
purchaserId,
purchaserRoleId,
supplierId,
......@@ -303,7 +308,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<div className={styles['deliver-item-actions']}>
{
!isPurchaser &&
innerStatus === RETURN_INNER_STATUS_TO_BE_REFUNDED &&
outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED &&
!!item.canRefund && (
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED ||
item.innerStatus === REFUND_INNER_STATUS_NO_REFUND ||
......@@ -322,7 +327,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<>
{
isPurchaser &&
innerStatus === RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED && (
outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED && (
item.outerStatus === REFUND_OUTER_STATUS_UNCONFIRMED_REFUND ||
item.outerStatus === REFUND_OUTER_STATUS_NOT_RECEIVED
) && (
......
......@@ -425,6 +425,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []}
onConfirm={handleConfirm}
innerStatus={detailInfo?.innerStatus}
outerStatus={detailInfo?.outerStatus}
purchaserId={detailInfo?.memberId}
purchaserRoleId={detailInfo?.roleId}
supplierId={detailInfo?.parentMemberId}
......
......@@ -471,6 +471,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataSource={detailInfo && detailInfo.refundList ? detailInfo.refundList : []}
onRefund={handleRefund}
innerStatus={detailInfo?.innerStatus}
outerStatus={detailInfo?.outerStatus}
purchaserId={detailInfo?.memberId}
purchaserRoleId={detailInfo?.roleId}
supplierId={detailInfo?.parentMemberId}
......
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