Commit f41afe39 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents a9d64e94 9eef4761
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-08-05 14:23:40 * @Date: 2021-08-05 14:23:40
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-09 16:53:25 * @LastEditTime: 2021-08-18 11:04:54
* @Description: 地址单选框组 * @Description: 地址单选框组
*/ */
import React, { useState, useEffect, useMemo } from 'react'; import React, { useState, useEffect, useMemo, useRef } from 'react';
import { Radio, Button, Modal, message, RadioChangeEvent } from 'antd'; import { Radio, Button, Modal, message, RadioChangeEvent } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons'; import { ExclamationCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
...@@ -86,6 +86,9 @@ const AddressRadioGroup: React.FC<IProps> = (props) => { ...@@ -86,6 +86,9 @@ const AddressRadioGroup: React.FC<IProps> = (props) => {
const context = React.useContext(AddressSelectContext); const context = React.useContext(AddressSelectContext);
// 记录是否是新增或编辑操作
const actionFlagRef = useRef<boolean>(false);
const triggerChange = (value: AddressValueType) => { const triggerChange = (value: AddressValueType) => {
if (onChange) { if (onChange) {
onChange(value); onChange(value);
...@@ -123,7 +126,7 @@ const AddressRadioGroup: React.FC<IProps> = (props) => { ...@@ -123,7 +126,7 @@ const AddressRadioGroup: React.FC<IProps> = (props) => {
triggerChange(undefined); triggerChange(undefined);
} }
if (isDefaultAddress && defaultItem) { if (isDefaultAddress && defaultItem && !actionFlagRef.current) {
const { shipperName, receiverName, ...rest } = defaultItem; const { shipperName, receiverName, ...rest } = defaultItem;
const next = { const next = {
name: shipperName || receiverName, name: shipperName || receiverName,
...@@ -141,8 +144,15 @@ const AddressRadioGroup: React.FC<IProps> = (props) => { ...@@ -141,8 +144,15 @@ const AddressRadioGroup: React.FC<IProps> = (props) => {
}); });
}; };
const refresh = () => { const refresh = (actionFlag?: boolean) => {
context ? context?.refresh() : getAddressList(); if (context) {
context?.refresh(actionFlag);
} {
// 重新获取列表,把新添加的内容加载出来
// 不触发默认值提交
actionFlagRef.current = true;
getAddressList();
}
}; };
useEffect(() => { useEffect(() => {
...@@ -224,7 +234,7 @@ const AddressRadioGroup: React.FC<IProps> = (props) => { ...@@ -224,7 +234,7 @@ const AddressRadioGroup: React.FC<IProps> = (props) => {
try { try {
const res = addressType === 2 ? await PublicApi.getLogisticsShipperAddressGet({ id: `${id}`}) : await PublicApi.getLogisticsReceiverAddressGet({ id: `${id}`}); const res = addressType === 2 ? await PublicApi.getLogisticsShipperAddressGet({ id: `${id}`}) : await PublicApi.getLogisticsReceiverAddressGet({ id: `${id}`});
if (res.code === 1000) { if (res.code === 1000) {
addressType === 2 const updateRes = addressType === 2
? await PublicApi.postLogisticsShipperAddressUpdate({ ? await PublicApi.postLogisticsShipperAddressUpdate({
...(res.data as GetLogisticsShipperAddressGetResponse), ...(res.data as GetLogisticsShipperAddressGetResponse),
isDefault: 1, isDefault: 1,
...@@ -233,6 +243,9 @@ const AddressRadioGroup: React.FC<IProps> = (props) => { ...@@ -233,6 +243,9 @@ const AddressRadioGroup: React.FC<IProps> = (props) => {
...(res.data as GetLogisticsReceiverAddressGetResponse), ...(res.data as GetLogisticsReceiverAddressGetResponse),
isDefault: 1, isDefault: 1,
}); });
if (updateRes.code === 1000) {
refresh(true);
}
} }
} catch (error) { } catch (error) {
console.warn(error); console.warn(error);
......
...@@ -256,7 +256,7 @@ const AddressSelect: React.FC<IProps> = (props) => { ...@@ -256,7 +256,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
name: values.name, name: values.name,
phone: values.phone, phone: values.phone,
}; };
// 重新获取列表,新添加的内容加载出来 // 重新获取列表,新添加的内容加载出来
// 不触发默认值提交 // 不触发默认值提交
actionFlagRef.current = true; actionFlagRef.current = true;
getAddressList(); getAddressList();
...@@ -295,7 +295,7 @@ const AddressSelect: React.FC<IProps> = (props) => { ...@@ -295,7 +295,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
name: values.name, name: values.name,
phone: values.phone, phone: values.phone,
}; };
// 重新获取列表,新添加的内容加载出来 // 重新获取列表,新添加的内容加载出来
// 不触发默认值提交 // 不触发默认值提交
actionFlagRef.current = true; actionFlagRef.current = true;
getAddressList(); getAddressList();
...@@ -437,6 +437,11 @@ const AddressSelect: React.FC<IProps> = (props) => { ...@@ -437,6 +437,11 @@ const AddressSelect: React.FC<IProps> = (props) => {
} }
}; };
const onRefresh = (actionFlag?: boolean) => {
actionFlagRef.current = !!actionFlag;
getAddressList();
};
const options = useMemo(() => { const options = useMemo(() => {
return list.map((item) => ({ return list.map((item) => ({
value: item.id, value: item.id,
...@@ -448,7 +453,7 @@ const AddressSelect: React.FC<IProps> = (props) => { ...@@ -448,7 +453,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
<AddressSelectContextProvider <AddressSelectContextProvider
value={{ value={{
addressList: list, addressList: list,
refresh: getAddressList, refresh: onRefresh,
}} }}
> >
<div className={styles['address-select']}> <div className={styles['address-select']}>
......
...@@ -15,5 +15,5 @@ export interface AddressSelectContextProps { ...@@ -15,5 +15,5 @@ export interface AddressSelectContextProps {
/** /**
* 重新加载列表 * 重新加载列表
*/ */
refresh: () => void, refresh: (actionFlag?: boolean) => void,
} }
\ No newline at end of file
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-08-17 10:22:51 * @Date: 2021-08-17 10:22:51
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-17 11:03:30 * @LastEditTime: 2021-08-17 16:11:31
* @Description: 退货发货抽屉 * @Description: 退货发货抽屉
*/ */
import React from 'react'; import React, { useEffect } from 'react';
import { import {
Drawer, Drawer,
Button, Button,
...@@ -130,11 +130,13 @@ type ProductListItemType = { ...@@ -130,11 +130,13 @@ type ProductListItemType = {
count: number, count: number,
} }
export type AfterType = 2 | 3
interface IProps { interface IProps {
/** /**
* 售后类型,2 换货,3 退货 * 售后类型,2 换货,3 退货
*/ */
afterType: 2 | 3, afterType: AfterType,
/** /**
* 流程类型,'returnDeliver' 退货发货,exchangeDeliver 换货发货 * 流程类型,'returnDeliver' 退货发货,exchangeDeliver 换货发货
* 换货流程包含两个退货步骤,一是 退货发货,二是 换货发货 * 换货流程包含两个退货步骤,一是 退货发货,二是 换货发货
...@@ -153,6 +155,22 @@ interface IProps { ...@@ -153,6 +155,22 @@ interface IProps {
* 商品列表 * 商品列表
*/ */
productList: ProductListItemType[], productList: ProductListItemType[],
/**
* 发货地址id
*/
returnDeliverAddress?: number,
/**
* 发货时间
*/
deliveryTime?: string,
/**
* 物流单号
*/
logisticsOrderNo?: string,
/**
* 物流公司id
*/
logisticsName?: number | string,
}, },
/** /**
* 配送方式 * 配送方式
...@@ -170,6 +188,14 @@ interface IProps { ...@@ -170,6 +188,14 @@ interface IProps {
* 确认按钮 loading * 确认按钮 loading
*/ */
submitLoading: boolean, submitLoading: boolean,
/**
* 是否可编辑商品相关,默认为 true
*/
ediableProduct?: boolean,
/**
* 是否可编辑物流相关,默认为 true
*/
ediableLogistics?: boolean,
} }
const DeliverDrawer: React.FC<IProps> = (props) => { const DeliverDrawer: React.FC<IProps> = (props) => {
...@@ -182,6 +208,8 @@ const DeliverDrawer: React.FC<IProps> = (props) => { ...@@ -182,6 +208,8 @@ const DeliverDrawer: React.FC<IProps> = (props) => {
onSubmit, onSubmit,
onClose, onClose,
submitLoading, submitLoading,
ediableProduct = true,
ediableLogistics = true,
} = props; } = props;
// 获取物流公司 // 获取物流公司
...@@ -207,6 +235,18 @@ const DeliverDrawer: React.FC<IProps> = (props) => { ...@@ -207,6 +235,18 @@ const DeliverDrawer: React.FC<IProps> = (props) => {
}); });
}; };
useEffect(() => {
formActions.setFieldState('productList.*.count', (fieldState) => {
fieldState.editable = ediableProduct;
});
}, [ediableProduct]);
useEffect(() => {
formActions.setFieldState('LOGISTICS_LAYOUT.*', (fieldState) => {
fieldState.editable = ediableLogistics;
});
}, [ediableLogistics]);
const handleClose = () => { const handleClose = () => {
if (onClose) { if (onClose) {
onClose(); onClose();
...@@ -258,7 +298,9 @@ const DeliverDrawer: React.FC<IProps> = (props) => { ...@@ -258,7 +298,9 @@ const DeliverDrawer: React.FC<IProps> = (props) => {
effects={($, { setFieldValue, getFieldValue, setFieldState }) => { effects={($, { setFieldValue, getFieldValue, setFieldState }) => {
const linkage = useLinkageUtils(); const linkage = useLinkageUtils();
if (!value.deliveryTime) {
useAsyncSelect('logisticsName', fetchLogisticsCompany, ['label', 'value']); useAsyncSelect('logisticsName', fetchLogisticsCompany, ['label', 'value']);
}
onFormInit$().subscribe(() => { onFormInit$().subscribe(() => {
// 自提隐藏物流编号、物流公司 // 自提隐藏物流编号、物流公司
......
...@@ -107,7 +107,7 @@ export const createSchema = (type: 2 | 3, flowType: 'returnDeliver' | 'exchangeD ...@@ -107,7 +107,7 @@ export const createSchema = (type: 2 | 3, flowType: 'returnDeliver' | 'exchangeD
}, },
} }
}, },
MEGA_LAYOUT: { LOGISTICS_LAYOUT: {
type: 'object', type: 'object',
'x-component': 'Mega-Layout', 'x-component': 'Mega-Layout',
'x-component-props': { 'x-component-props': {
......
...@@ -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-06-08 14:53:46 * @LastEditTime: 2021-08-18 10:42:45
* @Description: 换货发货统计、换货发货明细 * @Description: 换货发货统计、换货发货明细
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
...@@ -102,14 +102,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -102,14 +102,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => (
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</a>
),
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -176,14 +168,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -176,14 +168,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => (
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</a>
),
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -296,7 +280,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -296,7 +280,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
> >
{radioValue === '1' ? ( {radioValue === '1' ? (
<PolymericTable <PolymericTable
rowKey={record => `${record.orderNo}+${record.productId}`} rowKey={() => Math.random().toFixed(16).slice(2, 10)}
dataSource={summary} dataSource={summary}
columns={summaryColumns} columns={summaryColumns}
loading={false} loading={false}
...@@ -327,11 +311,26 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -327,11 +311,26 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
)} )}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="物流单号"> <Descriptions.Item label="物流单号">
{!isPurchaser ? (
<>
{item.logisticsId ? (
<Link <Link
to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`} to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`}
> >
{item.logisticsOrderNo} {item.logisticsOrderNo}
</Link> </Link>
) : (
<a
href={`https://www.kuaidi100.com/chaxun?nu=${item.logisticsOrderNo}`}
target="_blank"
>
{item.logisticsOrderNo}
</a>
)}
</>
) : (
item.logisticsOrderNo
)}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="换货入库单号"> <Descriptions.Item label="换货入库单号">
{isPurchaser ? ( {isPurchaser ? (
...@@ -358,7 +357,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -358,7 +357,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<Descriptions.Item label="内部状态"> <Descriptions.Item label="内部状态">
<Badge color={'#6C9CEB'} text={item.innerStatusName} /> <Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item> <Descriptions.Item contentStyle={{ display: 'block', textAlign: 'right' }}>
{( {(
isEdit && isEdit &&
!isPurchaser && !isPurchaser &&
...@@ -414,7 +413,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({ ...@@ -414,7 +413,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
</div> </div>
<PolymericTable <PolymericTable
rowKey={record => `${record.orderNo}+${record.productId}`} rowKey={() => Math.random().toFixed(16).slice(2, 10)}
dataSource={item.detailList} dataSource={item.detailList}
columns={detailedColumns} columns={detailedColumns}
loading={false} loading={false}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-30 18:19:05 * @Date: 2020-11-30 18:19:05
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-16 19:38:10 * @LastEditTime: 2021-08-18 10:43:40
* @Description: * @Description:
*/ */
export interface SummaryData { export interface SummaryData {
...@@ -58,6 +58,10 @@ export interface Detailed { ...@@ -58,6 +58,10 @@ export interface Detailed {
*/ */
deliveryId: number deliveryId: number
/** /**
* 退货发货单据Id
*/
deliveryNoId: number
/**
* 批次 * 批次
*/ */
batch: number batch: number
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15 * @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-09 18:09:01 * @LastEditTime: 2021-08-18 10:41:43
* @Description: 换货收货统计、换货发货明细 * @Description: 换货退货收货统计、换货退货发货明细
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
import { import {
...@@ -104,14 +104,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -104,14 +104,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => (
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</a>
),
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -178,14 +170,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -178,14 +170,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{ {
title: '订单号', title: '订单号',
dataIndex: 'orderNo', dataIndex: 'orderNo',
render: (text, record) => (
<a
href={`${target}/orderDetail?orderNo=${text}`}
target="_blank"
>
{text}
</a>
),
}, },
{ {
title: '商品ID', title: '商品ID',
...@@ -305,7 +289,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -305,7 +289,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
> >
{radioValue === '1' ? ( {radioValue === '1' ? (
<PolymericTable <PolymericTable
rowKey={record => `${record.orderNo}+${record.productId}`} rowKey={() => Math.random().toFixed(16).slice(2, 10)}
dataSource={summary} dataSource={summary}
columns={summaryColumns} columns={summaryColumns}
loading={false} loading={false}
...@@ -314,7 +298,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -314,7 +298,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
) : null} ) : null}
{radioValue === '2' ? ( {radioValue === '2' ? (
<> <>
<Tabs> <Tabs defaultActiveKey={detailed ? `${detailed[detailed.length - 1].batch}` : ''}>
{detailed.map((item) => ( {detailed.map((item) => (
<TabPane <TabPane
tab={`第 ${item.batch} 批次`} tab={`第 ${item.batch} 批次`}
...@@ -336,11 +320,27 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -336,11 +320,27 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
)} )}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="物流单号"> <Descriptions.Item label="物流单号">
{isPurchaser ? (
<>
{item.logisticsId ? (
<Link <Link
to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`} to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`}
> >
{item.logisticsOrderNo} {item.logisticsOrderNo}
</Link> </Link>
) : (
<a
href={`https://www.kuaidi100.com/chaxun?nu=${item.logisticsOrderNo}`}
target="_blank"
>
{item.logisticsOrderNo}
</a>
)}
</>
) : (
item.logisticsOrderNo
)}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="退货入库单号"> <Descriptions.Item label="退货入库单号">
{!isPurchaser ? ( {!isPurchaser ? (
...@@ -367,7 +367,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -367,7 +367,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<Descriptions.Item label="内部状态"> <Descriptions.Item label="内部状态">
<Badge color={'#6C9CEB'} text={item.innerStatusName} /> <Badge color={'#6C9CEB'} text={item.innerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item> <Descriptions.Item contentStyle={{ display: 'block', textAlign: 'right' }}>
{( {(
isEdit && isEdit &&
isPurchaser && isPurchaser &&
...@@ -423,7 +423,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({ ...@@ -423,7 +423,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</div> </div>
<PolymericTable <PolymericTable
rowKey={record => `${record.orderNo}+${record.productId}`} rowKey={() => Math.random().toFixed(16).slice(2, 10)}
dataSource={item.detailList} dataSource={item.detailList}
columns={detailedColumns} columns={detailedColumns}
loading={false} loading={false}
......
...@@ -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-08-16 15:02:26 * @LastEditTime: 2021-08-17 16:30:36
* @Description: 退货收货统计、退货发货明细 * @Description: 退货收货统计、退货发货明细
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
...@@ -34,6 +34,7 @@ import { ...@@ -34,6 +34,7 @@ import {
MAIL_INNER_STATUS_CONFIRMED_DELIVER, MAIL_INNER_STATUS_CONFIRMED_DELIVER,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING, MAIL_INNER_STATUS_CONFIRMED_RECEIVING,
} from '../../constants'; } from '../../constants';
import ReturnDeliverDrawer, { AfterType } from '../DeliverDrawer';
import styles from './index.less'; import styles from './index.less';
const { confirm } = Modal; const { confirm } = Modal;
...@@ -84,6 +85,16 @@ interface ReturnInfoProps extends MellowCardProps { ...@@ -84,6 +85,16 @@ interface ReturnInfoProps extends MellowCardProps {
* 是否可编辑 * 是否可编辑
*/ */
isEdit?: boolean; isEdit?: boolean;
/**
* 售后类型,2 换货,3 退货
*/
afterType: AfterType,
/**
* 退货配送方式
*/
deliveryType: number,
}; };
const ReturnInfo: React.FC<ReturnInfoProps> = ({ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...@@ -96,9 +107,14 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -96,9 +107,14 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
innerStatus, innerStatus,
target, target,
isEdit = false, isEdit = false,
afterType,
deliveryType,
...rest ...rest
}) => { }) => {
const [radioValue, setRadioValue] = useState<('1' | '2')>('2'); const [radioValue, setRadioValue] = useState<('1' | '2')>('2');
const [visible, setVisible] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const [currentDetailed, setCurrentDetailed] = useState<Detailed | null>(null);
const summaryColumns: EditableColumns[] = [ const summaryColumns: EditableColumns[] = [
{ {
...@@ -218,17 +234,13 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -218,17 +234,13 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
}, },
]; ];
const handleConfirmReturnDeliver = (id) => { const handleVisibleDrawer = flag => {
if (onConfirmReturnDeliver) { setVisible(!!flag);
confirm({ };
title: '提示',
icon: <ExclamationCircleOutlined />, const handleConfirmReturnDeliver = (record: Detailed) => {
content: `是否确认退货发货?`, setCurrentDetailed(record);
onOk() { handleVisibleDrawer(true);
return onConfirmReturnDeliver(id);
},
});
}
}; };
const handleConfirmReturnReceive = (id) => { const handleConfirmReturnReceive = (id) => {
...@@ -261,6 +273,15 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -261,6 +273,15 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
setRadioValue(value); setRadioValue(value);
}; };
const handleReturnDeliverSubmit = () => {
if (onConfirmReturnDeliver) {
setSubmitLoading(true);
onConfirmReturnDeliver(currentDetailed.deliveryId).finally(() => {
setSubmitLoading(false);
});
}
};
const options = [ const options = [
{ {
label: `退货${!isPurchaser ? '收货' : '发货'}统计`, label: `退货${!isPurchaser ? '收货' : '发货'}统计`,
...@@ -320,6 +341,8 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -320,6 +341,8 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
)} )}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="物流单号"> <Descriptions.Item label="物流单号">
{isPurchaser ? (
<>
{item.logisticsId ? ( {item.logisticsId ? (
<Link <Link
to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`} to={`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`}
...@@ -334,6 +357,10 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -334,6 +357,10 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{item.logisticsOrderNo} {item.logisticsOrderNo}
</a> </a>
)} )}
</>
) : (
item.logisticsOrderNo
)}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="退货入库单号"> <Descriptions.Item label="退货入库单号">
{!isPurchaser ? ( {!isPurchaser ? (
...@@ -372,7 +399,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -372,7 +399,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
textAlign: 'right', textAlign: 'right',
display: 'block', display: 'block',
}} }}
onClick={() => handleConfirmReturnDeliver(item.deliveryId)} onClick={() => handleConfirmReturnDeliver(item)}
> >
确认退货发货 确认退货发货
</a> </a>
...@@ -427,6 +454,38 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({ ...@@ -427,6 +454,38 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
</Tabs> </Tabs>
</> </>
) : null} ) : null}
<ReturnDeliverDrawer
afterType={afterType}
flowType="returnDeliver"
value={{
productList: currentDetailed?.detailList?.map((item) => ({
orderNo: item.orderNo,
productId: item.productId,
productName: item.productName,
category: item.category,
brand: item.brand,
unit: item.unit,
applyCount: item.count,
deliveryCount: item.deliveryCount,
noDeliveryCount: item.count - item.deliveryCount,
receiveCount: item.storageCount,
subCount: item.differenceCount,
count: item.deliveryCount,
})),
returnDeliverAddress: 0, // 缺少
deliveryTime: currentDetailed?.deliveryTime,
logisticsOrderNo: currentDetailed?.logisticsOrderNo,
logisticsName: currentDetailed?.logisticsName,
}}
deliveryType={deliveryType}
visible={visible}
onClose={() => handleVisibleDrawer(false)}
onSubmit={handleReturnDeliverSubmit}
submitLoading={submitLoading}
ediableProduct={false}
ediableLogistics={!!currentDetailed?.deliveryTime}
/>
</MellowCard> </MellowCard>
); );
}; };
......
...@@ -52,6 +52,49 @@ export interface SummaryData { ...@@ -52,6 +52,49 @@ export interface SummaryData {
differenceCount: number differenceCount: number
} }
export type DetailedListItem = {
/**
* 订单号
*/
orderNo?: string
/**
* 商品id
*/
productId?: string
/**
* 商品名称
*/
productName?: string
/**
* 品类
*/
category?: string
/**
* 品牌
*/
brand?: string
/**
* 单位
*/
unit?: string
/**
* 数量
*/
count?: number
/**
* 发货数量
*/
deliveryCount?: number
/**
* 入库数量
*/
storageCount?: number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount?: number
}
export interface Detailed { export interface Detailed {
/** /**
* 退货发货单号Id * 退货发货单号Id
...@@ -108,46 +151,5 @@ export interface Detailed { ...@@ -108,46 +151,5 @@ export interface Detailed {
/** /**
* 发货明细 ,DeliveryGoodsDetailVO * 发货明细 ,DeliveryGoodsDetailVO
*/ */
detailList: { detailList: DetailedListItem[]
/**
* 订单号
*/
orderNo?: string
/**
* 商品id
*/
productId?: string
/**
* 商品名称
*/
productName?: string
/**
* 品类
*/
category?: string
/**
* 品牌
*/
brand?: string
/**
* 单位
*/
unit?: string
/**
* 数量
*/
count?: number
/**
* 发货数量
*/
deliveryCount?: number
/**
* 入库数量
*/
storageCount?: number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount?: number
}[]
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34 * @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-07 17:08:04 * @LastEditTime: 2021-08-17 13:53:35
* @Description: * @Description:
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
...@@ -10,39 +10,56 @@ import { Button } from 'antd'; ...@@ -10,39 +10,56 @@ import { Button } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { SettingOutlined } from '@ant-design/icons'; import { SettingOutlined } from '@ant-design/icons';
import moment from 'moment';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { EXCHANGE_GOODS_MANUAL_DELIVERY, EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT } from '../../constants'; import { EXCHANGE_GOODS_MANUAL_DELIVERY, EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT } from '../../constants';
import ManualDeliveryModal from '../../components/ManualDeliveryModal';
import DetailInfo from '../components/DetailInfo'; import DetailInfo from '../components/DetailInfo';
import ReturnDeliverDrawer, { ValuesType } from '../../components/DeliverDrawer';
const ExchangePrDeliverVerify: React.FC = () => { const ExchangePrDeliverVerify: React.FC = () => {
const { id } = usePageStatus(); const { id } = usePageStatus();
const [modalVisible, setModalVisible] = useState(false); const [visible, setVisible] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false); const [submitLoading, setSubmitLoading] = useState(false);
const handleSubmit = values => { const handleSubmit = (values: ValuesType) => {
if (!id) { if (!id) {
return; return;
} }
const {
productList,
returnDeliverAddress,
deliveryTime,
logisticsNameTxt,
logisticsOrderNo,
} = values;
setSubmitLoading(true); setSubmitLoading(true);
PublicApi.postAsReplaceGoodsManualReturnDeliveryGoods({ PublicApi.postAsReplaceGoodsManualReturnDeliveryGoods({
dataId: id, dataId: +id,
...values, deliveryAddress: `${returnDeliverAddress.fullAddress} ${returnDeliverAddress.name}/${returnDeliverAddress.phone}`,
productList: productList.map((item) => ({
productId: item.productId,
returnCount: +item.count,
})),
deliveryTime: moment(deliveryTime).valueOf(),
logisticsName: logisticsNameTxt,
logisticsOrderNo,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
handleVisibleDrawer(false);
setTimeout(() => {
history.goBack(); history.goBack();
}, 800);
} }
}).finally(() => { }).finally(() => {
setSubmitLoading(false); setSubmitLoading(false);
}); });
}; };
const handleVisible = flag => { const handleVisibleDrawer = flag => {
setModalVisible(!!flag); setVisible(!!flag);
}; };
return ( return (
<>
<DetailInfo <DetailInfo
id={id} id={id}
headExtra={info => ( headExtra={info => (
...@@ -51,26 +68,46 @@ const ExchangePrDeliverVerify: React.FC = () => { ...@@ -51,26 +68,46 @@ const ExchangePrDeliverVerify: React.FC = () => {
<Button <Button
type="default" type="default"
icon={<SettingOutlined />} icon={<SettingOutlined />}
onClick={() => handleVisible(true)} onClick={() => handleVisibleDrawer(true)}
> >
手工退货发货 退货发货
</Button> </Button>
)} )}
<ReturnDeliverDrawer
afterType={2}
flowType="returnDeliver"
value={{
productList: (
info?.goodsDetailList
.filter((item) => item.isNeedReturn && item.noDeliveryCount > 0)
.map((item) => ({
orderNo: item.orderNo,
productId: item.productId,
productName: item.productName,
category: item.category,
brand: item.brand,
unit: item.unit,
applyCount: item.replaceCount,
deliveryCount: item.deliveryCount,
noDeliveryCount: item.noDeliveryCount,
receiveCount: item.receiveCount,
subCount: item.subCount,
count: item.noDeliveryCount,
}))
),
}}
deliveryType={info?.returnGoodsAddress.deliveryType}
visible={visible}
onClose={() => handleVisibleDrawer(false)}
onSubmit={handleSubmit}
submitLoading={submitLoading}
/>
</> </>
)} )}
target="/memberCenter/afterService/exchangeApplication/exchangePrDeliver" target="/memberCenter/afterService/exchangeApplication/exchangePrDeliver"
isEditRefundDeliver isEditRefundDeliver
/> />
<ManualDeliveryModal
title="退货发货处理"
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
isEdit={true}
/>
</>
); );
}; };
......
...@@ -2,88 +2,22 @@ ...@@ -2,88 +2,22 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34 * @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-07 19:36:18 * @LastEditTime: 2021-08-17 17:20:05
* @Description: * @Description:
*/ */
import React, { useState } from 'react'; import React from 'react';
import { Button } from 'antd';
import { history } from 'umi';
import { PublicApi } from '@/services/api';
import { SettingOutlined } from '@ant-design/icons';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import { EXCHANGE_GOODS_MANUAL_DELIVERY, EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT } from '../../constants';
import ManualDeliveryModal from '../../components/ManualDeliveryModal';
import DetailInfo from '../components/DetailInfo'; import DetailInfo from '../components/DetailInfo';
const ExchangePrReceivedVerify: React.FC = () => { const ExchangePrReceivedVerify: React.FC = () => {
const { id } = usePageStatus(); const { id } = usePageStatus();
const [modalVisible, setModalVisible] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
const handleSubmit = values => {
if (!id) {
return;
}
setSubmitLoading(true);
PublicApi.postAsReplaceGoodsConfirmManualReturnReceiveGoods({
dataId: +id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
}).finally(() => {
setSubmitLoading(false);
});
};
const handleVisible = flag => {
setModalVisible(!!flag);
};
return ( return (
<>
<DetailInfo <DetailInfo
id={id} id={id}
headExtra={info => {
const detailed = info || {};
// @ts-ignore
const { manualReturnGoodsAddress = {} } = detailed;
return (
<>
{(info && (info.taskType === EXCHANGE_GOODS_MANUAL_DELIVERY || info.taskType === EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT)) && (
<>
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleVisible(true)}
>
手工确认退货收货
</Button>
<ManualDeliveryModal
key="2"
value={{
deliveryAddressTxt: manualReturnGoodsAddress?.deliveryAddress,
deliveryTime: manualReturnGoodsAddress?.deliveryTime,
logisticsOrderNo: manualReturnGoodsAddress?.logisticsOrderNo,
logisticsNameTxt: manualReturnGoodsAddress?.logisticsName,
}}
visible={modalVisible}
confirmLoading={submitLoading}
onSubmit={handleSubmit}
onVisible={handleVisible}
isEdit={false}
/>
</>
)}
</>
)
}}
target="/memberCenter/afterService/exchangeManage/exchangePrReceived" target="/memberCenter/afterService/exchangeManage/exchangePrReceived"
isEditRefundDeliver isEditRefundDeliver
/> />
</>
); );
}; };
......
...@@ -608,6 +608,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -608,6 +608,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus={detailInfo?.innerStatus} innerStatus={detailInfo?.innerStatus}
target={target} target={target}
isEdit={isEditRefundDeliver} isEdit={isEditRefundDeliver}
afterType={3}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
id="returnDeliveryGoodsList" id="returnDeliveryGoodsList"
/> />
</Suspense> </Suspense>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-08-04 15:53:06 * @Date: 2021-08-04 15:53:06
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-12 16:28:45 * @LastEditTime: 2021-08-18 09:54:52
* @Description: 新增退货发货单 * @Description: 新增退货发货单
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
...@@ -59,7 +59,7 @@ const ReturnAddDeliverBill = () => { ...@@ -59,7 +59,7 @@ const ReturnAddDeliverBill = () => {
returnId: applyId, returnId: applyId,
deliveryTime: values.createTime ? moment(values.createTime).valueOf() : 0, deliveryTime: values.createTime ? moment(values.createTime).valueOf() : 0,
orderAbstract: values.digest, orderAbstract: values.digest,
remark: '', remark: values.remark,
inventoryName: values.inventoryName, inventoryName: values.inventoryName,
inventoryRole: values.inventoryRole, inventoryRole: values.inventoryRole,
detailList: values.billDetails.map((item) => ({ detailList: values.billDetails.map((item) => ({
......
import React, { useState } from 'react'; /*
import { Button, Space, Modal } from 'antd'; * @Author: XieZhiXiong
import { history } from 'umi'; * @Date: 2021-01-06 11:36:34
import { PublicApi } from '@/services/api'; * @LastEditors: XieZhiXiong
import { SettingOutlined, RollbackOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; * @LastEditTime: 2021-08-18 11:24:25
* @Description:
*/
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo'; import DetailInfo from '../components/DetailInfo';
const { confirm } = Modal;
const ReturnPrConfirmBackVerify: React.FC = () => { const ReturnPrConfirmBackVerify: React.FC = () => {
const { id } = usePageStatus(); const { id } = usePageStatus();
const [submitLoading, setSubmitLoading] = useState(false);
const handleSubmit = (info) => {
if (!id) {
return;
}
if (
info &&
info.returnDeliveryGoodsList &&
info.returnDeliveryGoodsList.length
) {
// 未退货发货数量有大于 0 时
if (
info.returnDeliveryGoodsList.some(item => {
return item.detailList.some(good => good.count - good.deliveryCount > 0)
})
) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `您还有未退货发货的商品,是否确认全部退货发货都已完成?`,
onOk() {
return PublicApi.postAsReturnGoodsConfirmAllReturnGoodsReceipt({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
});
},
});
}
// 未退货发货数量全部小于或等于 0 时
if (
info.returnDeliveryGoodsList.every(item => {
return item.detailList.every(good => good.count - good.deliveryCount <= 0)
})
) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否确认全部退货发货单已收到回单?`,
onOk() {
return PublicApi.postAsReturnGoodsConfirmAllReturnGoodsReceipt({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
});
},
});
}
}
};
const handleDeliverAgain = (info) => {
if (
info &&
info.returnDeliveryGoodsList &&
info.returnDeliveryGoodsList.length
) {
// 未退货发货数量全部小于或等于 0 时
if (
info.returnDeliveryGoodsList.every(item => {
return item.detailList.every(good => good.count - good.deliveryCount <= 0)
})
) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `您商品都已退货发货,是否确认还需要继续退货发货?`,
onOk() {
return PublicApi.postAsReturnGoodsContinueReturnDeliveryGoods({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
});
},
});
}
// 未退货发货数量有大于 0 时
if (
info.returnDeliveryGoodsList.some(item => {
return item.detailList.some(good => good.count - good.deliveryCount > 0)
})
) {
confirm({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否继续退货发货?`,
onOk() {
return PublicApi.postAsReturnGoodsContinueReturnDeliveryGoods({
dataId: id,
}).then(res => {
if (res.code === 1000) {
history.goBack();
}
});
},
});
}
}
};
return ( return (
<> <>
<DetailInfo <DetailInfo
id={id} id={id}
headExtra={detailInfo => (
<Space>
<Button
type="default"
icon={<SettingOutlined />}
onClick={() => handleSubmit(detailInfo)}
>
确认全部退货发货单已收到回单
</Button>
<Button
type="default"
icon={<RollbackOutlined />}
onClick={() => handleDeliverAgain(detailInfo)}
>
继续退货发货
</Button>
</Space>
)}
target="/memberCenter/afterService/returnApplication/returnPrConfirmBack" target="/memberCenter/afterService/returnApplication/returnPrConfirmBack"
isEditRefundDeliver isEditRefundDeliver
/> />
......
...@@ -647,6 +647,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -647,6 +647,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus={detailInfo?.innerStatus} innerStatus={detailInfo?.innerStatus}
target={target} target={target}
isEdit={isEditRefundDeliver} isEdit={isEditRefundDeliver}
afterType={3}
deliveryType={detailInfo?.returnGoodsAddress?.deliveryType}
id="returnDeliveryGoodsList" id="returnDeliveryGoodsList"
/> />
</Suspense> </Suspense>
......
...@@ -60,7 +60,7 @@ const ReturnAddWarehouseBill = () => { ...@@ -60,7 +60,7 @@ const ReturnAddWarehouseBill = () => {
returnId: applyId, returnId: applyId,
storageTime: values.createTime ? moment(values.createTime).valueOf() : 0, storageTime: values.createTime ? moment(values.createTime).valueOf() : 0,
orderAbstract: values.digest, orderAbstract: values.digest,
remark: '', remark: values.remark,
inventoryName: values.inventoryName, inventoryName: values.inventoryName,
inventoryRole: values.inventoryRole, inventoryRole: values.inventoryRole,
detailList: values.billDetails.map((item) => ({ detailList: values.billDetails.map((item) => ({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-07-09 11:09:36 * @Date: 2021-07-09 11:09:36
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-27 18:11:59 * @LastEditTime: 2021-08-18 11:47:31
* @Description: 会员详情信息 * @Description: 会员详情信息
*/ */
import React, { Ref } from 'react'; import React, { Ref } from 'react';
...@@ -116,8 +116,6 @@ const MemberProfile: React.FC<IProps> = (props) => { ...@@ -116,8 +116,6 @@ const MemberProfile: React.FC<IProps> = (props) => {
qualitiesRef, qualitiesRef,
} = props; } = props;
const depositDetails = dataSource?.depositDetailTexts || dataSource?.depositDetails || [];
const anchorsArr = [ const anchorsArr = [
{ {
key: 'verifySteps', key: 'verifySteps',
...@@ -148,8 +146,11 @@ const MemberProfile: React.FC<IProps> = (props) => { ...@@ -148,8 +146,11 @@ const MemberProfile: React.FC<IProps> = (props) => {
: [] : []
), ),
( (
depositDetails dataSource
&& depositDetails.length && (
dataSource.depositDetailTexts?.length
|| dataSource.depositDetails?.length
)
? { ? {
key: 'incomingInfo', key: 'incomingInfo',
name: '入库信息', name: '入库信息',
...@@ -329,12 +330,12 @@ const MemberProfile: React.FC<IProps> = (props) => { ...@@ -329,12 +330,12 @@ const MemberProfile: React.FC<IProps> = (props) => {
{/* 入库信息 */} {/* 入库信息 */}
{( {(
depositDetails.length > 0 dataSource?.depositDetailTexts?.length > 0
&& !editableDeposit && !editableDeposit
) ? ( ) ? (
<Col span={24}> <Col span={24}>
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={depositDetails} dataSource={dataSource?.depositDetailTexts || []}
showNew={showNew} showNew={showNew}
id="incomingInfo" id="incomingInfo"
/> />
...@@ -343,12 +344,12 @@ const MemberProfile: React.FC<IProps> = (props) => { ...@@ -343,12 +344,12 @@ const MemberProfile: React.FC<IProps> = (props) => {
{/* 入库信息,可编辑的 */} {/* 入库信息,可编辑的 */}
{( {(
depositDetails.length > 0 dataSource?.depositDetails?.length > 0
&& editableDeposit && editableDeposit
) ? ( ) ? (
<Col span={24}> <Col span={24}>
<MemberDocIncomingInfoForm <MemberDocIncomingInfoForm
groups={dataSource?.depositDetails} groups={dataSource?.depositDetails || []}
ref={depositRef} ref={depositRef}
onInputChange={handleDepositChange} onInputChange={handleDepositChange}
id="incomingInfo" id="incomingInfo"
......
...@@ -146,4 +146,8 @@ export type BillSubmitValuesType = RelatedInfoType & { ...@@ -146,4 +146,8 @@ export type BillSubmitValuesType = RelatedInfoType & {
* 关联对应单据会员名称 * 关联对应单据会员名称
*/ */
memberName: string, memberName: string,
/**
* 备注
*/
remark: string,
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-08-04 13:59:33 * @Date: 2021-08-04 13:59:33
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-16 15:28:50 * @LastEditTime: 2021-08-18 09:53:05
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -187,6 +187,17 @@ const createSchema = (billType: number): ISchema => { ...@@ -187,6 +187,17 @@ const createSchema = (billType: number): ISchema => {
}, },
], ],
}, },
remark: {
type: 'string',
title: '备注',
'x-component': 'textarea',
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 200,
}
],
},
// 收集值用 // 收集值用
inventoryName: { inventoryName: {
type: 'string', type: 'string',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-08-11 14:20:42 * @Date: 2021-08-11 14:20:42
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-11 15:28:33 * @LastEditTime: 2021-08-18 10:44:56
* @Description: 解释 Modal * @Description: 解释 Modal
*/ */
import React from 'react'; import React from 'react';
...@@ -67,6 +67,7 @@ const ExplainModal: React.FC<ExplainModalProps> = (props) => { ...@@ -67,6 +67,7 @@ const ExplainModal: React.FC<ExplainModalProps> = (props) => {
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
onOk={() => modalFormActions.submit()} onOk={() => modalFormActions.submit()}
onCancel={handleClose} onCancel={handleClose}
destroyOnClose
> >
<NiceForm <NiceForm
effects={() => { effects={() => {
......
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