Commit cbae8fcf authored by GuanHua's avatar GuanHua

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

parents caee12f7 c8b9b3fc
...@@ -29,6 +29,7 @@ import SmilingFace from './components/SmilingFace'; ...@@ -29,6 +29,7 @@ import SmilingFace from './components/SmilingFace';
import AntUpload from './components/AntUpload'; import AntUpload from './components/AntUpload';
import './index.less' import './index.less'
import { currentStateType, getCurrentState } from './utils/keepAlive'; import { currentStateType, getCurrentState } from './utils/keepAlive';
import { useRouteMatch } from 'umi';
export interface NiceFormProps extends IAntdSchemaFormProps {} export interface NiceFormProps extends IAntdSchemaFormProps {}
...@@ -102,15 +103,24 @@ export const componentExport = { ...@@ -102,15 +103,24 @@ export const componentExport = {
} }
const NiceForm: React.FC<NiceFormProps> = props => { const NiceForm: React.FC<NiceFormProps> = props => {
const { children, components, ...reset } = props; const { children, components, ...reset } = props;
const match = useRouteMatch();
const defineComponents = Object.assign(componentExport, components); const defineComponents = Object.assign(componentExport, components);
useEffect(() => { useEffect(() => {
let paginationInfo: currentStateType = getCurrentState(); let paginationInfo: currentStateType = getCurrentState();
// @ts-ignore // 一般 列表检索传入的 controlRender 的 NiceForm 是没有 value 或者 initialValues 的
reset.actions.setFormState( // value 或者 initialValues 的,表单页有
state => (state.values = paginationInfo.queryParams), if (
); paginationInfo && match.path === paginationInfo.pathname
&& !('value' in reset)
&& !('initialValues' in reset)
) {
// @ts-ignore
reset.actions.setFormState(
state => (state.values = paginationInfo.queryParams),
);
}
}, []) }, [])
return ( return (
......
...@@ -122,6 +122,10 @@ ...@@ -122,6 +122,10 @@
.ant-pro-basicLayout-content .ant-pro-page-header-wrap { .ant-pro-basicLayout-content .ant-pro-page-header-wrap {
margin: 0; margin: 0;
} }
// 处理因为antd版本不同导致anchor的背景色不同
.ant-anchor-wrapper{
background-color: #fff;
}
} }
.ant-descriptions-item-label { .ant-descriptions-item-label {
......
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
word-break: break-all; word-break: break-all;
} }
.titleTop {
font-size: 12px;
color: #303133;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
max-width: calc(100% - 20px);
}
.label{ .label{
width: 40%; width: 40%;
} }
......
import React from 'react'; import React from 'react';
import { Tabs, Table, Row, Col, Space, Typography, Button, Tooltip } from 'antd'; import { Typography, Tooltip } from 'antd';
import { LinkOutlined } from '@ant-design/icons'; import { LinkOutlined } from '@ant-design/icons';
import styles from './index.less'; import styles from './index.less';
...@@ -15,16 +15,14 @@ const MsgItem: React.FC<MsgItemPrpos> = (props: any) => { ...@@ -15,16 +15,14 @@ const MsgItem: React.FC<MsgItemPrpos> = (props: any) => {
return ( return (
<div className={styles.msgItem}> <div className={styles.msgItem}>
<div className={styles.msgItemRow}> <div className={styles.msgItemRow} style={{alignItems: 'center'}}>
<div className={styles.badge}>{rankNumber}</div> <div className={styles.badge}>{rankNumber}</div>
<div className={styles.title}>{data.memberName}</div> <Tooltip placement="top" title={data.memberName}><div className={styles.titleTop}>{data.memberName}</div></Tooltip>
</div> </div>
<div className={styles.msgItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{data.contacts}</div></div> <div className={styles.msgItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{data.contacts}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{data.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div> <div className={styles.msgItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{data.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div>
<div className={styles.msgItemRow}><div className={styles.label}>电子邮箱:</div><div className={styles.title}>{data.mail}</div></div> <div className={styles.msgItemRow}><div className={styles.label}>电子邮箱:</div><Tooltip placement="top" title={data.mail}><div className={styles.title}>{data.mail}</div></Tooltip></div>
<div className={styles.msgItemRow}><div className={styles.label}>联系地址:</div>{<Tooltip placement="top" title={data.address}> <div className={styles.msgItemRow}><div className={styles.label}>联系地址:</div><Tooltip placement="top" title={data.address}><div className={styles.title}>{data.address}</div></Tooltip></div>
<div className={styles.title}>{data.address}</div>
</Tooltip>}</div>
<div className={styles.msgItemRow}> <div className={styles.msgItemRow}>
<div className={styles.label}>报名文件:</div> <div className={styles.label}>报名文件:</div>
<div className={styles.files}> <div className={styles.files}>
......
.resultItem { .resultItem {
height: 131px; min-height: 131px;
background: #FAFBFC; background: #FAFBFC;
padding: 12px 14px; padding: 12px 14px;
.resultItemWinBid{ .resultItemWinBid {
position: absolute; position: absolute;
width: 40px; width: 40px;
right: 8px; right: 8px;
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
margin-bottom: 6px; margin-bottom: 6px;
font-size: 12px; font-size: 12px;
color: #909399; color: #909399;
word-break: break-all;
.money { .money {
color: #303133; color: #303133;
...@@ -36,27 +37,37 @@ ...@@ -36,27 +37,37 @@
line-height: 24px; line-height: 24px;
color: #909399; color: #909399;
font-size: 12px; font-size: 12px;
margin-left: 4px; margin-left: 8px;
display: inline-block; display: inline-block;
} }
.title { .title {
display: inline-block;
font-size: 12px; font-size: 12px;
color: #303133; color: #303133;
flex: 1;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
max-width: calc(100% - 32px);
}
img { img {
margin-left: 4px; margin-left: 8px;
width: 24px; width: 24px;
}
} }
.label { .label {
width: 40%; // width: 40%;
}
.text {
flex: 1;
font-size: 12px;
color: #303133;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
} }
} }
......
import React from 'react'; import React from 'react';
import { Divider, Button } from 'antd'; import { Divider, Button, Tooltip } from 'antd';
import { priceFormat } from '@/utils/numberFomat';
import level1 from '@/asserts/icons/the_first.png'; import level1 from '@/asserts/icons/the_first.png';
import level2 from '@/asserts/icons/the_second.png'; import level2 from '@/asserts/icons/the_second.png';
...@@ -33,16 +35,17 @@ const ResultItem: React.FC<ResultItemPrpos> = (props: any) => { ...@@ -33,16 +35,17 @@ const ResultItem: React.FC<ResultItemPrpos> = (props: any) => {
return ( return (
<div key={`msgItem_key_${itemIndex}`} className={styles.resultItem}> <div key={`msgItem_key_${itemIndex}`} className={styles.resultItem}>
{detail.isAward != 0 ? <img src={winBig} alt="授标" className={styles.resultItemWinBid} /> : null} {detail.isAward != 0 ? <img src={winBig} alt="授标" className={styles.resultItemWinBid} /> : null}
<div className={styles.resultItemRow}> <div className={styles.resultItemRow} style={{alignItems: 'center'}}>
<div className={styles.title}>{detail.memberName}{_returnBadge(detail?.purchaseRanking)}</div> <Tooltip placement="top" title={detail.memberName}><div className={styles.title}>{detail.memberName}</div></Tooltip>
{_returnBadge(detail.purchaseRanking)}
</div> </div>
<div className={styles.resultItemRow}> <div className={styles.resultItemRow}>
<div className={styles.money}>¥{detail.price}<span>(含税)</span></div> <div className={styles.money}>{detail.price ? `¥${priceFormat(detail.price)}` : '-'}<span>(含税)</span></div>
<Button type='link' onClick={() => { checkDetailFunc(detail.id) }}>查看报价明细</Button> <Button type='link' onClick={() => { checkDetailFunc(detail.id) }}>查看报价明细</Button>
</div> </div>
<Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} /> <Divider dashed style={{ color: '#EBECF0', margin: '6px 0' }} />
<div className={styles.resultItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.title}>{detail.contacts}</div></div> <div className={styles.resultItemRow}><div className={styles.label}>联系人姓名:</div><div className={styles.text}>{detail.contacts}</div></div>
<div className={styles.resultItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.title}>{detail.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div> <div className={styles.resultItemRow}><div className={styles.label}>联系人手机:</div><div className={styles.text}>{detail.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div></div>
</div> </div>
) )
} }
......
.revise_style {
:global {
.ant-form-item-label {
label {
&::before {
margin-left: 1px;
}
}
}
}
}
\ No newline at end of file
...@@ -7,6 +7,9 @@ import { ...@@ -7,6 +7,9 @@ import {
} from '@formily/antd' } from '@formily/antd'
import { Input, Radio, DatePicker, Checkbox } from '@formily/antd-components' import { Input, Radio, DatePicker, Checkbox } from '@formily/antd-components'
import moment from 'moment'; import moment from 'moment';
import styles from './index.less';
const actions = createFormActions() const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks; const { onFieldChange$ } = FormEffectHooks;
...@@ -179,6 +182,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -179,6 +182,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
afterClose={() => actions.reset()} afterClose={() => actions.reset()}
> >
<SchemaForm <SchemaForm
className={styles.revise_style}
layout="vertical" layout="vertical"
labelCol={6} labelCol={6}
components={{ components={{
......
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