Commit 083f2a1a authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复 退货配送方式为 自提是 发货单号与发货公司 未隐藏的问题

parent b1a98583
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:48:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-31 10:48:22
* @LastEditTime: 2021-04-06 10:39:52
* @Description: 手动发货弹窗
*/
import React from 'react';
......@@ -14,6 +14,7 @@ import NiceForm from '@/components/NiceForm';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { PublicApi } from '@/services/api';
import { useLinkageUtils } from '@/utils/formEffectUtils';
import { DELIVERY_TYPE_SELF_PICKUP } from '@/constants';
import { schema } from './schema';
import styles from './index.less';
......@@ -25,14 +26,38 @@ const {
} = FormEffectHooks;
interface VerifyModalProps {
/**
* 是否可见的
*/
visible: boolean;
/**
* 点击确认按钮的 loading 状态
*/
confirmLoading: boolean;
/**
* 提交事件
*/
onSubmit: (values: {[key: string]: any}) => void;
/**
* 隐藏事件
*/
onVisible: (flag: boolean) => void;
// 是否编辑的
/**
* 是否可编辑ide
*/
isEdit?: boolean;
/**
* Modal 标题
*/
title?: string;
/**
* 值
*/
value?: {[key: string]: any};
/**
* 配送方式
*/
deliveryType: number,
};
const VerifyModal: React.FC<VerifyModalProps> = ({
......@@ -43,6 +68,7 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
isEdit = true,
title = '换货发货处理',
value = {},
deliveryType,
}) => {
const handleSubmit = values => {
......@@ -158,6 +184,11 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
state.display = true;
});
}
// 配送方式为自提 隐藏 发货单号 与 物流公司
if (deliveryType === DELIVERY_TYPE_SELF_PICKUP) {
linkage.hide('*(logisticsOrderNo,logisticsName)');
}
});
}}
initialValues={{
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-20 17:18:35
* @LastEditTime: 2021-04-06 10:47:06
* @Description:
*/
import React, { useState } from 'react';
......@@ -48,28 +48,30 @@ const ExchangePrDeliverVerify: React.FC = () => {
headExtra={info => (
<>
{(info && info.taskType === EXCHANGE_GOODS_MANUAL_DELIVERY) && (
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工退货发货
</Button>
<>
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工退货发货
</Button>
<ManualDeliveryModal
title="退货发货处理"
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.returnGoodsAddress.deliveryType}
isEdit={true}
/>
</>
)}
</>
)}
target="/memberCenter/afterService/exchangeApplication/exchangePrDeliver"
isEditRefundDeliver
/>
<ManualDeliveryModal
title="退货发货处理"
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
isEdit={true}
/>
</>
);
};
......
......@@ -62,7 +62,6 @@ const ExchangePrReceivedVerify: React.FC = () => {
</Button>
<ManualDeliveryModal
key="2"
title="确认换货收货"
value={{
deliveryAddressTxt: manualReplaceGoodsAddress.deliveryAddress,
......@@ -74,6 +73,7 @@ const ExchangePrReceivedVerify: React.FC = () => {
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.replaceGoodsAddress.deliveryType}
isEdit={false}
/>
</>
......
......@@ -41,27 +41,30 @@ const ExchangePrDeliverVerify: React.FC = () => {
headExtra={info => (
<>
{(info && info.taskType === EXCHANGE_GOODS_MANUAL_DELIVERY) && (
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工换货发货
</Button>
<>
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工换货发货
</Button>
<ManualDeliveryModal
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.replaceGoodsAddress.deliveryType}
isEdit={true}
/>
</>
)}
</>
)}
target="/memberCenter/afterService/exchangeManage/exchangePrDeliver"
isEditExchangeDeliver
/>
<ManualDeliveryModal
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
isEdit={true}
/>
</>
);
};
......
......@@ -73,6 +73,7 @@ const ExchangePrReceivedVerify: React.FC = () => {
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.returnGoodsAddress.deliveryType}
isEdit={false}
/>
</>
......
......@@ -41,27 +41,30 @@ const ReturnPrDeliverVerify: React.FC = () => {
headExtra={info => (
<>
{(info && info.taskType === RETURN_GOODS_MANUAL_DELIVERY) && (
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工退货发货
</Button>
<>
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工退货发货
</Button>
<ManualDeliveryModal
value={{}}
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.returnGoodsAddress.deliveryType}
/>
</>
)}
</>
)}
target="/memberCenter/afterService/returnApplication/returnPrDeliver"
isEditRefundDeliver
/>
<ManualDeliveryModal
value={{}}
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
/>
</>
);
};
......
......@@ -63,7 +63,6 @@ const ReturnPrReceivedVerify: React.FC = () => {
</Button>
<ManualDeliveryModal
key="2"
value={{
deliveryAddressTxt: manualReturnGoodsAddress.deliveryAddress,
deliveryTime: manualReturnGoodsAddress.deliveryTime,
......@@ -74,6 +73,7 @@ const ReturnPrReceivedVerify: React.FC = () => {
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
deliveryType={info.returnGoodsAddress.deliveryType}
isEdit={false}
/>
</>
......
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