Commit a35473d9 authored by XieZhiXiong's avatar XieZhiXiong

feat: 没有支付信息隐藏支付信息Tab

parent 98166728
......@@ -2,13 +2,13 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-17 14:34:06
* @LastEditTime: 2021-08-11 09:46:59
* @Description: 查看退货数量与退款金额 抽屉
*/
import React, { useEffect } from 'react';
import { Drawer, Button } from 'antd';
import NiceForm from '@/components/NiceForm';
import { createAsyncFormActions } from '@formily/antd';
import { createAsyncFormActions, FormEffectHooks } from '@formily/antd';
import {
ORDER_TYPE_INQUIRY_CONTRACT,
ORDER_TYPE_BIDDING_CONTRACT,
......@@ -21,7 +21,9 @@ import SteamerTicket from './components/SteamerTicket';
import styles from './index.less';
const schemaAction = createAsyncFormActions();
const {
onFormMount$,
} = FormEffectHooks;
export interface PayListItem {
/**
* 支付次数
......@@ -101,7 +103,7 @@ export interface OrderInfo {
/**
* 支付记录
*/
payList: PayListItem;
payList: PayListItem[];
/**
* 剩余可退货数量
*/
......@@ -141,7 +143,7 @@ interface ReturnInfoDrawerProps {
const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
visible = false,
orderInfo = {},
orderInfo,
onClose,
onSubmit,
isEdit = false,
......@@ -156,7 +158,16 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
|| orderType === ORDER_TYPE_TENDER_CONTRACT
);
if (isMateriel) {
if (
(
orderInfo
&& (
!orderInfo.payList
|| !orderInfo.payList.length
)
)
|| isMateriel
) {
setFieldState('REPOSIT_TABS', state => {
state.props['x-component-props'].hiddenKeys = ['tab-2'];
});
......
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