Commit 1763e5c6 authored by XieZhiXiong's avatar XieZhiXiong

chore: 完善展示

parent 729b484d
......@@ -3,10 +3,11 @@
.changed {
width: 100%;
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
.new {
flex-shrink: 0;
padding: 0 2px;
color: #FFFFFF;
font-size: @font-size-sm;
......
......@@ -2,12 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 17:14:39
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-10 09:57:18
* @LastEditTime: 2021-07-03 14:57:41
* @Description: 会员入库信息
*/
import React from 'react';
import { Tooltip } from 'antd';
import CustomizeColumn, { IProps as CustomizeColumnProps, DataItem } from '@/components/CustomizeColumn';
import { renderFieldTypeContent, FieldType } from '../../utils';
import PicWrap from '../PicWrap';
import styles from './index.less';
interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
......@@ -39,6 +41,10 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
* 修改之前的值,如果没有为空字符串
*/
lastValue?: string,
/**
* 类型
*/
fieldType: FieldType,
}[],
}[],
}
......@@ -57,7 +63,8 @@ const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
title: ele.fieldLocalName,
value: (
<div className={styles.changed}>
{ele.fieldValue}
{/* {ele.fieldValue} */}
{renderFieldTypeContent(ele.fieldType, ele.fieldValue)}
{ele.lastValue && (
<Tooltip title={`变更前:${ele.lastValue}`}>
<span className={styles.new}>NEW</span>
......
......@@ -21,7 +21,12 @@
margin-right: @margin-sm;
width: 175px;
height: 120px;
border: 1px solid #EBECF0;
> img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
&-right {
......
......@@ -2,22 +2,13 @@
* @Author: XieZhiXiong
* @Date: 2021-05-21 17:25:39
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-18 17:47:44
* @LastEditTime: 2021-07-03 11:32:38
* @Description: 会员公司资质
*/
import React from 'react';
// import { Descriptions } from 'antd';
import {
createFormActions,
} from '@formily/antd';
import { DatePicker, Checkbox } from '@formily/antd-components';
import { normalizeFiledata } from '@/utils';
import NiceForm from '@/components/NiceForm';
import { Descriptions } from 'antd';
import MellowCard, { MellowCardProps } from '@/components/MellowCard';
import { schema } from './schema';
import QualitiesUpload from '../QualitiesUpload';
import QualitiesUploadFormItem from '../QualitiesUploadFormItem';
// import styles from './index.less';
import styles from './index.less';
export type ValueType = {
/**
......@@ -45,63 +36,31 @@ interface IProps extends MellowCardProps {
dataSource: ValueType[],
}
const formActions = createFormActions();
const MemberDocQualification: React.FC<IProps> = (props: IProps) => {
const { dataSource = [], ...rest } = props;
const qualities = (
Array.isArray(dataSource)
? dataSource.map((item) => ({
file: item.url ? [normalizeFiledata(item.url)] : [],
expireDay: item.expireDay,
permanent: item.permanent === 1 ? [item.permanent] : [],
}))
: []
);
return (
<MellowCard
title="资质证明"
bodyStyle={{
paddingBottom: 0,
}}
{...rest}
>
{/* <ul className={styles.qualification}>
<li className={styles['qualification-item']}>
<div className={styles['qualification-item-wrap']}>
<div className={styles['qualification-item-left']}>
</div>
<div className={styles['qualification-item-right']}>
<Descriptions column={1}>
<Descriptions.Item label="到期日">2022-10-01</Descriptions.Item>
<Descriptions.Item label="有效期" style={{ paddingBottom: 0 }}>长期有效</Descriptions.Item>
</Descriptions>
<ul className={styles.qualification}>
{dataSource.map((item, index) => (
<li key={index} className={styles['qualification-item']}>
<div className={styles['qualification-item-wrap']}>
<div className={styles['qualification-item-left']}>
<img src={item.url} />
</div>
<div className={styles['qualification-item-right']}>
<Descriptions column={1}>
<Descriptions.Item label="到期日">{item.expireDay || ''}</Descriptions.Item>
<Descriptions.Item label="有效期" style={{ paddingBottom: 0 }}>{item.permanent === 1 ? '长期有效' : ''}</Descriptions.Item>
</Descriptions>
</div>
</div>
</div>
</li>
</ul> */}
<NiceForm
previewPlaceholder=" "
initialValues={{
qualities,
}}
components={{
DatePicker,
Checkbox,
CheckboxGroup: Checkbox.Group,
QualitiesUpload,
QualitiesUploadFormItem,
}}
effects={() => {
}}
actions={formActions}
schema={schema}
editable={false}
/>
</li>
))}
</ul>
</MellowCard>
);
};
......
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