Commit 32294632 authored by 卢均锐's avatar 卢均锐

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

* 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: feat: 样式改版 feat: 更改样式 chore: 更改组件名 feat: 添加 AnchorPage 带锚点头部页面布局组件 feat: 添加 AnchorPageHeader组件
parents 88ac91dd 1226aa42
.mellow {
:global {
.ant-card {
border-radius: 8px;
&-head {
border-bottom: none;
&-title {
line-height: 24px;
// padding-bottom: 0;
font-size: 14px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
}
&-body {
padding: 14px 24px 24px;
}
}
}
&.fullHeight {
height: 100%;
:global {
.ant-card {
height: 100%;
display: flex;
flex-direction: column !important;
&-head {
flex-shrink: 0;
}
&-body {
flex: 1;
}
}
}
}
}
\ No newline at end of file
......@@ -2,15 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-08-26 17:32:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-29 14:47:49
* @LastEditTime: 2021-05-11 15:15:55
* @Description: 基于 antd Card 封装的适合项目 UI 的 Card,使用方式跟 antd Card 一样,这里只是修改了样式
*/
import React from 'react';
import { Card } from 'antd';
import classNames from 'classnames';
import { CardProps } from 'antd/lib/card';
import styled from 'styled-components'
import styles from './index.less';
import styled from 'styled-components';
const Wrap = styled(props => <div {...props}/>)`
> .ant-card {
......@@ -20,9 +19,8 @@ const Wrap = styled(props => <div {...props}/>)`
border-bottom: none;
.ant-card-head-title {
line-height: 24px;
padding-bottom: 0;
font-size: 16px;
padding-bottom: 9px;
font-size: 14px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
......@@ -53,12 +51,14 @@ const Wrap = styled(props => <div {...props}/>)`
`
export interface MellowCardProps extends CardProps {
blockClassName?: string;
fullHeight?: boolean; // 是否占满父级的高度,一般用于多列使用改组件的情况
/**
* 是否占满父级的高度,一般用于多列使用改组件的情况
*/
fullHeight?: boolean;
}
const MellowCard: React.FC<MellowCardProps> = props => {
const { children, blockClassName, fullHeight, ...rest } = props;
const { children, fullHeight, ...rest } = props;
const cls = classNames({
'fullHeight': fullHeight,
});
......
......@@ -49,4 +49,20 @@ export const ORDER_TYPE_BIDDING_CONTRACT = 10;
/**
* 采购招标合同
*/
export const ORDER_TYPE_TENDER_CONTRACT = 11;
\ No newline at end of file
export const ORDER_TYPE_TENDER_CONTRACT = 11;
/**
* 对应中文
*/
export const ORDER_TYPE = {
[ORDER_TYPE_INQUIRYT_PURCHASE]: '询价采购',
[ORDER_TYPE_DEMAND_PURCHASE]: '需求采购',
[ORDER_TYPE_STORE_PURCHASE]: '现货采购',
[ORDER_TYPE_CENTRAL_PURCHASE]: '集采',
[ORDER_TYPE_CHANNEL_DIRECT_MINING]: '渠道直采',
[ORDER_TYPE_CHANNEL_STORE]: '渠道现货',
[ORDER_TYPE_POINTS]: '积分兑换',
[ORDER_TYPE_CHANNEL_POINTS]: '渠道积分兑换',
[ORDER_TYPE_INQUIRY_CONTRACT]: '采购询价合同',
[ORDER_TYPE_BIDDING_CONTRACT]: '采购竞价合同',
[ORDER_TYPE_TENDER_CONTRACT]: '采购招标合同',
};
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-05-11 09:44:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-11 10:14:07
* @Description: 获取 DOM 节点的位置 或是 大小 hook
*/
import { useState, useCallback } from 'react';
interface RectData {
/**
* 元素高度
*/
height: number,
/**
* 元素宽度
*/
width: number,
/**
* 元素顶部距离视口的距离
*/
top: number,
/**
* 元素右侧距离视口的距离
*/
right: number,
/**
* 元素底部距离视口的距离
*/
bottom: number,
/**
* 元素左侧距离视口的距离
*/
left: number,
/**
* 元素距离左上角坐标 (0, 0)的 x 坐标值
*/
x: number,
/**
* 元素距离左上角坐标 (0, 0)的 y 坐标值
*/
y: number,
}
const useClientRect = (): [RectData, any] => {
const [rect, setRect] = useState({
height: 0,
width: 0,
top: 0,
right: 0,
bottom: 0,
left: 0,
x: 0,
y: 0,
});
const ref = useCallback(node => {
if (node !== null) {
setRect(node.getBoundingClientRect());
}
}, []);
return [rect, ref];
}
export default useClientRect;
@import '~antd/es/style/themes/default.less';
.anchor-page {
&-header {
background: #FFFFFF;
&-main {
padding: 0 16px;
display: flex;
}
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0 9px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
&-anchors {
display: flex;
align-items: center;
}
:global {
.ant-anchor {
&-link {
padding: 0 16px;
font-size: 14px;
font-weight: 400;
color: @text-color;
&-title {
padding: 16px 0;
border-bottom: 2px solid transparent;
}
&-active,
&:hover {
font-weight: 500;
color: @text-color;
.ant-anchor-link-title {
border-bottom: 2px solid @primary-color;
}
}
}
&-ink {
display: none;
}
}
}
}
&-content {
padding: 16px;
}
}
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-05-10 11:36:58
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-11 10:16:12
* @Description: 页面公用锚点头部
*/
import React, { useState } from 'react';
import { Anchor } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { history } from 'umi';
import useClientRect from '@/hooks/useClientRect';
import styles from './index.less';
export interface AnchorsItem {
/**
* 跳转标识
*/
key: string,
/**
* 名称
*/
name: React.ReactNode,
}
interface IProps {
/**
* 标题
*/
title: React.ReactNode,
/**
* 右侧拓展部分
*/
extra?: React.ReactNode,
/**
* 锚点数据
*/
anchors: AnchorsItem[],
/**
* 自定义样式
*/
customStyle?: React.CSSProperties,
children?: React.ReactNode,
}
const AnchorPage: React.FC<IProps> = (props: IProps) => {
const {
title,
extra,
anchors,
customStyle,
children,
} = props;
const firstKey = anchors.length ? `#${anchors[0].key}` : '';
const [current, setCurrent] = useState(firstKey);
const [rect, measuredRef] = useClientRect();
const handleBack = () => {
history.goBack();
};
const handleAnchorChange = (currentActiveLink: string) => {
if (currentActiveLink) {
setCurrent('');
return;
}
if (!currentActiveLink) {
setCurrent(firstKey);
}
};
const handleAnchorClick = (e: React.MouseEvent<HTMLElement>) => {
e.preventDefault();
};
return (
<div
className={styles['anchor-page']}
style={customStyle}
>
<div
className={styles['anchor-page-header']}
style={customStyle}
ref={measuredRef}
>
<Anchor
showInkInFixed={false}
targetOffset={rect.height}
onChange={handleAnchorChange}
onClick={handleAnchorClick}
>
<div className={styles['anchor-page-header-main']}>
<div className={styles['anchor-page-header-left']}>
<div className={styles['anchor-page-header-heading']}>
<ArrowLeftOutlined
className={styles['anchor-page-header-back']}
onClick={handleBack}
/>
<span className={styles['anchor-page-header-heading-title']}>
{title}
</span>
</div>
<div className={styles['anchor-page-header-content']}>
<div className={styles['anchor-page-header-anchors']}>
{anchors.map((item, index) => (
<Anchor.Link
className={current && index === 0 ? 'ant-anchor-link-active' : null}
key={item.key}
href={`#${item.key}`}
title={item.name}
/>
))}
</div>
</div>
</div>
{extra ? (
<div className={styles['anchor-page-header-right']}>
{extra}
</div>
) : null}
</div>
</Anchor>
</div>
<div className={styles['anchor-page-content']}>
{children}
</div>
</div>
);
};
AnchorPage.defaultProps = {
extra: null,
customStyle: {},
children: null,
};
export default AnchorPage;
.basicInfo {
:global {
.ant-descriptions-item-content {
white-space: break-spaces;
}
}
}
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2021-05-11 10:46:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-11 15:46:24
* @Description: 申请单基础信息
*/
import React, { CSSProperties } from 'react';
import { Descriptions } from 'antd';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import styles from './index.less';
export interface ColumnProps {
span?: number,
contentStyle?: CSSProperties,
labelStyle?: CSSProperties,
}
export interface DataItem {
/**
* 标题
*/
title: React.ReactNode,
/**
* 值
*/
value: React.ReactNode,
/**
* DescriptionItem props
*/
columnProps?: ColumnProps,
}
interface IProps extends MellowCardProps {
/**
* 数据
*/
data: DataItem[],
};
const defaultColumnProps: ColumnProps = {
labelStyle: {
width: 104,
},
};
const AfterServiceBasicInfo: React.FC<IProps> = (props: IProps) => {
const { data, ...rest } = props;
return (
<MellowCard
title="基本信息"
bodyStyle={{
paddingBottom: 0,
}}
className={styles.basicInfo}
{...rest}
>
<Descriptions column={3}>
{data.map((item, index) => (
<Descriptions.Item
key={index}
label={item.title}
{...({...defaultColumnProps, ...item.columnProps} || defaultColumnProps)}
>
{item.value}
</Descriptions.Item>
))}
</Descriptions>
</MellowCard>
);
};
export default AfterServiceBasicInfo;
......@@ -2,26 +2,27 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 11:49:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-02-09 14:41:48
* @LastEditTime: 2021-05-11 15:47:53
* @Description: 附件列表
*/
import React from 'react';
import { Upload } from 'antd';
import { FileData } from '@/utils';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import styles from './index.less';
interface FileListProps {
interface FileListProps extends MellowCardProps {
fileList: FileData[];
};
const FileList: React.FC<FileListProps> = ({
fileList = [],
fileList = [],
...rest
}) => {
return (
<MellowCard
title="相关不良原因举证附件"
fullHeight
{...rest}
>
<Upload
className={styles.file}
......
.flow-records {
:global {
.ant-radio-button-wrapper:hover {
color: #6B778C;
}
.ant-radio-group-solid {
.ant-radio-button-wrapper-checked {
background: #6B778C;
border-color: #6B778C;
&:hover {
background: #6B778C;
border-color: #6B778C;
}
}
}
}
}
\ No newline at end of file
import React, { useEffect, useState } from 'react';
import {
Tabs,
Badge,
Tabs,
Badge,
Radio,
} from 'antd';
import { RadioChangeEvent } from 'antd/lib/radio';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import StatusTag from '@/components/StatusTag';
import styles from './index.less';
......@@ -37,17 +39,15 @@ export interface InnerHistoryData {
totalCount: number,
};
interface FlowRecordsProps {
interface FlowRecordsProps extends MellowCardProps {
/**
* 获取外部流转记录
*/
fetchOuterHistory?: (params: { [key: string]: any }) => Promise<OuterHistoryData>;
/**
* 获取内部流转记录
*/
fetchInnerHistory: (params: { [key: string]: any }) => Promise<InnerHistoryData>;
/**
* 外部状态map
*/
......@@ -65,6 +65,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
fetchInnerHistory,
outerStatusMap = {},
innerStatusColorMap = {},
...rest
}) => {
const [outerPage, setOuterPage] = useState(1);
const [outerSize, setOuterSize] = useState(PAGE_SIZE);
......@@ -74,6 +75,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
const [innerSize, setInnerSize] = useState(PAGE_SIZE);
const [innerLoading, setInnerLoading] = useState(false);
const [innerData, setInnerData] = useState<InnerHistoryData>({ data: [], totalCount: 0 });
const [radioValue, setRadioValue] = useState<('inner' | 'outer')>('inner');
const outerColumns: EditableColumns[] = [
{
......@@ -217,11 +219,47 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
});
};
const handleRadioChange = (e: RadioChangeEvent) => {
const { value } = e.target;
setRadioValue(value);
};
const options = [
(
outerData.data
&& outerData.data.length
? {
label: '外部状态',
value: 'outer',
disabled: !outerData.data || !outerData.data.length,
}
: null
),
{
label: '内部状态',
value: 'inner',
},
].filter(Boolean);
return (
<MellowCard>
<Tabs onChange={() => {}}>
{outerData.data && outerData.data.length > 0 ? (
<Tabs.TabPane tab="外部流转记录" key="1">
<MellowCard
title="流转记录"
extra={(
<Radio.Group
options={options}
onChange={handleRadioChange}
value={radioValue}
optionType="button"
buttonStyle="solid"
size="small"
/>
)}
className={styles['flow-records']}
{...rest}
>
{outerData.data && outerData.data.length > 0 ? (
<>
{radioValue === 'outer' ? (
<PolymericTable
rowKey="step"
dataSource={outerData.data}
......@@ -234,23 +272,23 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
}}
onPaginationChange={handleOuterPaginationChange}
/>
</Tabs.TabPane>
) : null}
<Tabs.TabPane tab="内部流转记录" key="2">
<PolymericTable
rowKey="step"
dataSource={innerData.data}
columns={innerColumns}
loading={innerLoading}
pagination={{
current: innerPage,
pageSize: innerSize,
total: innerData.totalCount,
}}
onPaginationChange={handleInnerPaginationChange}
/>
</Tabs.TabPane>
</Tabs>
) : null}
</>
) : null}
{radioValue === 'inner' ? (
<PolymericTable
rowKey="step"
dataSource={innerData.data}
columns={innerColumns}
loading={innerLoading}
pagination={{
current: innerPage,
pageSize: innerSize,
total: innerData.totalCount,
}}
onPaginationChange={handleInnerPaginationChange}
/>
) : null}
</MellowCard>
);
};
......
......@@ -2,26 +2,35 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:47:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-06 11:44:39
* @LastEditTime: 2021-05-10 16:30:10
* @Description: 外部流转组件
*/
import React from 'react';
import React, { HTMLAttributes } from 'react';
import { Steps, Empty } from 'antd';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import styles from './index.less';
interface OuterCirculation {
steps: {
title: string,
description: string,
status: 'finish' | 'wait',
}[];
export interface StepsItem {
title: string,
description: string,
status: 'finish' | 'wait',
}
interface OuterCirculation extends MellowCardProps {
/**
* 步骤
*/
steps: StepsItem[];
/**
* 当前高亮
*/
current: number;
};
}
const OuterCirculation: React.FC<OuterCirculation> = ({
steps = [],
current,
current,
...rest
}) => {
if (!Array.isArray(steps)) {
......@@ -31,6 +40,7 @@ const OuterCirculation: React.FC<OuterCirculation> = ({
return (
<MellowCard
title="外部流转"
{...rest}
>
<div className={styles.steps}>
{(steps && steps.length > 0) ? (
......
......@@ -6,23 +6,36 @@
* @Description: 商品列表
*/
import React from 'react';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
interface HistoryListHistoryListProps {
interface HistoryListHistoryListProps extends MellowCardProps {
/**
* 数据
*/
dataSource: {
[key: string]: any,
}[];
// 标题
/**
* 标题
*/
title?: string;
// 表格列
/**
* 表格列
*/
columns: EditableColumns[];
// rowKey
/**
* 行 key
*/
rowKey?: string;
// 目标路径
/**
* 订单详情前缀
*/
target?: string;
// loading
/**
* Table loading
*/
loading?: boolean;
};
......@@ -33,11 +46,13 @@ const ProductList: React.FC<HistoryListHistoryListProps> = ({
rowKey = 'id',
target,
loading = false,
...rest
}) => {
return (
<MellowCard
title={title}
{...rest}
>
<PolymericTable
rowKey={rowKey}
......
......@@ -6,7 +6,7 @@
* @Description: 退货地址信息
*/
import React, { useEffect } from 'react';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { createAsyncFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
......@@ -31,47 +31,76 @@ export interface Values {
receiveUserTel: string | undefined,
};
interface ReturnAddressInfo {
// 是否是编辑的
interface ReturnAddressInfo extends MellowCardProps {
/**
* 是否可编辑的
*/
isEdit?: boolean;
// 退货收货地址
/**
* 退货收货地址
*/
deliveryAddress: {
// id
/**
* id
*/
id?: number;
// 配送方式
/**
* 配送方式
*/
deliveryType?: number;
// 收件人姓名
/**
* 收件人姓名
*/
name: string;
// phone
/**
* phone
*/
phone: string;
// 完整地址
/**
* 完整地址
*/
fullAddress: string;
},
// 退货发货地址
/**
* 退货发货地址
*/
shippingAddress: {
// id
/**
* id
*/
id?: number;
// 配送方式
/**
* 配送方式
*/
deliveryType?: number;
// 收件人姓名
/**
* 收件人姓名
*/
name: string;
// phone
/**
* phone
*/
phone: string;
// 完整地址
/**
* 完整地址
*/
fullAddress: string;
},
// onSubmit
onSubmit: (values: Values) => void;
/**
* 表单提交事件
*/
onFormSubmit: (values: Values) => void;
};
const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
isEdit = false,
deliveryAddress = {},
shippingAddress = {},
onSubmit,
onFormSubmit,
...rest
}) => {
useEffect(() => {
......@@ -137,6 +166,7 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
<MellowCard
title="退货收货地址"
fullHeight
{...rest}
>
<NiceForm
initialValues={{
......@@ -181,8 +211,8 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
const deliveryTypeValue = getFieldValue('deliveryType');
const fullData = originAsyncData.find(item => item.id === value);
if (onSubmit) {
onSubmit({
if (onFormSubmit) {
onFormSubmit({
deliveryType: deliveryTypeValue,
id: fullData ? fullData.id : undefined,
isDefault: fullData ? fullData.isDefault : undefined,
......
......@@ -6,14 +6,13 @@
* @Description: 退货收货统计、退货发货明细
*/
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import { Tabs, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import {
ClockCircleOutlined,
ExclamationCircleOutlined,
} from '@ant-design/icons';
import { Link } from 'umi';
import { SummaryData, Detailed } from './interface';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import EyePreview from '@/components/EyePreview';
......@@ -31,7 +30,7 @@ import styles from './index.less';
const { TabPane } = Tabs;
const { confirm } = Modal;
interface ReturnInfoProps {
interface ReturnInfoProps extends MellowCardProps {
/**
* 退货收货统计
*/
......@@ -88,6 +87,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
innerStatus,
target,
isEdit = false,
...rest
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -258,7 +258,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
};
return (
<MellowCard>
<MellowCard {...rest}>
<Tabs defaultActiveKey="2">
<TabPane
tab={`退货${!isPurchaser ? '收货' : '发货'}统计`}
......
......@@ -8,7 +8,7 @@
import React, { useState } from 'react';
import { Row, Col, Modal, Button, Upload, Descriptions } from 'antd';
import { CaretRightOutlined, CaretDownOutlined, RightOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
import PolymericTable from '@/components/PolymericTable';
import StatusTag from '@/components/StatusTag';
......@@ -24,7 +24,7 @@ import {
} from '@/constants';
import Stamp from '../Stamp';
import CheckVoucherModal from '../CheckVoucherModal';
import RefundModal, { RefundModalProps } from '../RefundModal';
import RefundModal from '../RefundModal';
import {
REFUND_INNER_STATUS_NO_REFUND,
REFUND_INNER_STATUS_REFUND_FAILED,
......@@ -37,11 +37,13 @@ import styles from './index.less';
const { confirm } = Modal;
interface ReturnDetailInfoProps {
interface ReturnDetailInfoProps extends MellowCardProps {
/**
* 数据
*/
dataSource: {
[key: string]: any,
}[];
/**
* 退款事件
*/
......@@ -54,11 +56,6 @@ interface ReturnDetailInfoProps {
* 是否是采购商
*/
isPurchaser?: boolean;
/**
* 退货申请单内部状态
*/
innerStatus: number;
/**
* 退货申请单外部状态
*/
......@@ -79,7 +76,6 @@ interface ReturnDetailInfoProps {
* 供应商角色id
*/
supplierRoleId: number,
/**
* 是否可操作的
*/
......@@ -97,6 +93,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
supplierId,
supplierRoleId,
isEdit = false,
...rest
}) => {
const [visibleResult, setVisibleResult] = useState(false);
const [notReceivedLoading, setNotReceivedLoading] = useState(false);
......@@ -278,7 +275,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
};
return (
<MellowCard title="退款明细">
<MellowCard title="退款明细" {...rest}>
<PolymericTable
rowKey={record => `${record.orderNo}+${record.productId}`}
dataSource={dataSource}
......
......@@ -6,7 +6,7 @@
* @Description: 评价
*/
import React from 'react';
import MellowCard from '@/components/MellowCard';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { Gauge } from '@/components/Charts';
// 满分 5分
......@@ -28,7 +28,7 @@ const TITLE_MAP = {
5: '非常满意',
};
interface ScoreProps {
interface ScoreProps extends MellowCardProps {
/**
* 分数
*/
......@@ -42,11 +42,12 @@ interface ScoreProps {
const Score: React.FC<ScoreProps> = ({
score = 0,
content,
...rest
}) => {
return (
<MellowCard
title="售后评价"
fullHeight
{...rest}
>
<Gauge
title={`${score}分`}
......
......@@ -483,7 +483,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
phone: detailInfo?.returnGoodsAddress?.sendUserTel,
fullAddress: detailInfo?.returnGoodsAddress?.sendAddress,
}}
onSubmit={() => {}}
onFormSubmit={() => {}}
isEdit={isEditAddress && detailInfo?.innerStatus === EXCHANGE_INNER_STATUS_UNCOMMITTED}
/>
</Suspense>
......
......@@ -546,7 +546,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
fullAddress: detailInfo?.returnGoodsAddress?.sendAddress,
}}
isEdit={isEditAddress && detailInfo?.innerStatus === EXCHANGE_INNER_STATUS_UNCOMMITTED}
onSubmit={handleReturnAddressSubmit}
onFormSubmit={handleReturnAddressSubmit}
/>
</Suspense>
</Col>
......
.detailInfo {
&-desc {
:global {
.ant-descriptions-item-content {
white-space: break-spaces;
}
}
}
}
\ No newline at end of file
......@@ -576,7 +576,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
phone: detailInfo?.returnGoodsAddress?.sendUserTel,
fullAddress: detailInfo?.returnGoodsAddress?.sendAddress,
}}
onSubmit={handleReturnAddressSubmit}
onFormSubmit={handleReturnAddressSubmit}
isEdit={isEditAddress && detailInfo?.innerStatus === RETURN_INNER_STATUS_UNCOMMITTED}
/>
</Suspense>
......
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