Commit 702eee1d authored by XieZhiXiong's avatar XieZhiXiong

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

parents eab6c9ba 666a9aee
...@@ -35,5 +35,6 @@ ...@@ -35,5 +35,6 @@
.content{ .content{
flex: 1; flex: 1;
margin: 0; margin: 0;
word-break: break-all;
} }
} }
\ No newline at end of file
...@@ -20,7 +20,7 @@ const BidLayout = () => { ...@@ -20,7 +20,7 @@ const BidLayout = () => {
extra={context.content && <Button type='link' onClick={() => setVisible(true)}>查看感谢函</Button>} extra={context.content && <Button type='link' onClick={() => setVisible(true)}>查看感谢函</Button>}
> >
{context.isPrize === 1 ? ( {context.isPrize === 1 ? (
<div style={{ whiteSpace: 'pre' }}>{context.awardResults}</div> <div style={{ whiteSpace: 'break-spaces' }}>{context.awardResults}</div>
) : ( ) : (
<Row> <Row>
<Col> <Col>
...@@ -47,7 +47,7 @@ const BidLayout = () => { ...@@ -47,7 +47,7 @@ const BidLayout = () => {
<h4>THANKS LETTER</h4> <h4>THANKS LETTER</h4>
<p className={style.name}>尊敬的{userInfo.name}</p> <p className={style.name}>尊敬的{userInfo.name}</p>
<p>{context.content}</p> <p>{context.content}</p>
<p className={style.company}>{context.createMemberName}</p> <p className={style.company}>{context.memberName}</p>
<p className={style.time}>{moment().format('YYYY-MM-DD')}</p> <p className={style.time}>{moment().format('YYYY-MM-DD')}</p>
</div> </div>
</Modal> </Modal>
......
...@@ -208,7 +208,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -208,7 +208,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
} else { } else {
const param = { ...soure } const param = { ...soure }
param[i] = null, param[i] = null,
setSoure(param); setSoure(param);
setRowSource(params); setRowSource(params);
} }
}) })
...@@ -272,7 +272,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -272,7 +272,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
{encrypt === PRICECONTRAST_TYPE.UNDECRYPTED && {encrypt === PRICECONTRAST_TYPE.UNDECRYPTED &&
<Button onClick={() => handleSubmit('key')}> <Button onClick={() => handleSubmit('key')}>
解密报价单 解密报价单
</Button>} </Button>}
<Button <Button
type='primary' type='primary'
disabled={disabled} disabled={disabled}
...@@ -292,7 +292,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -292,7 +292,7 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
data-index={index} data-index={index}
tab={`第${chNum[item]}轮`} tab={`第${chNum[item]}轮`}
> >
{(rowSource[idx] && rowSource[idx].length > 0 ) ? {(rowSource[idx] && rowSource[idx].length > 0) ?
<RowLayout <RowLayout
priceContrast={context.priceContrast} priceContrast={context.priceContrast}
encrypt={encrypt} rowSource={rowSource[idx]} encrypt={encrypt} rowSource={rowSource[idx]}
...@@ -316,8 +316,10 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -316,8 +316,10 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
&& ( && (
<> <>
<div className={style.divider}> <div className={style.divider}>
<Divider type='vertical' className={style.vertical} /> <div>
比价信息 <Divider type='vertical' className={style.vertical} />
比价信息
</div>
</div> </div>
<BidTable preview={bool ? bool : preview} redux={reduxFetch} /> <BidTable preview={bool ? bool : preview} redux={reduxFetch} />
</> </>
......
import React, { useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Drawer, Anchor, Row, Col, Divider, Typography } from 'antd'; import { Drawer, Anchor, Row, Col, Divider, Typography } from 'antd';
import style from './index.less'; import style from './index.less';
import { LinkOutlined } from '@ant-design/icons'; import { LinkOutlined } from '@ant-design/icons';
...@@ -35,6 +35,10 @@ const DetailDrawer: React.FC<IProps> = (props: any) => { ...@@ -35,6 +35,10 @@ const DetailDrawer: React.FC<IProps> = (props: any) => {
} }
} }
useEffect(() => {
setIsSeleted(1)
}, [visible])
return ( return (
<Drawer <Drawer
title={title} title={title}
......
...@@ -208,7 +208,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -208,7 +208,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
}, [visible]) }, [visible])
const handleSubmit = (val: any) => { const handleSubmit = (val: any) => {
if(confirmLoading){ if (confirmLoading) {
return; return;
} }
setConfirmLoading(true); setConfirmLoading(true);
...@@ -304,7 +304,16 @@ const ModalOperate: React.FC<IProps> = (props: any) => { ...@@ -304,7 +304,16 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
}} }}
x-rules={{ x-rules={{
max: maxNumber, max: maxNumber,
message: `原因最多${maxNumber}个汉字` message: `原因最多${maxNumber}个汉字`,
validator: (value) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > maxNumber * 2) {
return { type: 'error', message: `最长${maxNumber * 2}个字符,${maxNumber}个汉字`};
} else {
return null;
}
}
}} }}
/>)} />)}
</SchemaForm> </SchemaForm>
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { import { Drawer, Button, Form, Typography, Upload, message } from 'antd';
Drawer,
Anchor,
Menu,
Layout,
Button,
Form,
Divider,
Typography,
Upload,
message
} from 'antd';
import cx from 'classnames' import cx from 'classnames'
import style from './index.less'; import style from './index.less';
import { DeleteOutlined, LinkOutlined, PlusSquareOutlined, UploadOutlined } from '@ant-design/icons'; import { DeleteOutlined, LinkOutlined, PlusSquareOutlined, UploadOutlined } from '@ant-design/icons';
...@@ -18,9 +7,7 @@ import SelectProduct from './selectProduct'; ...@@ -18,9 +7,7 @@ import SelectProduct from './selectProduct';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import UploadProps from '@/pages/transaction/common/uploadProps'; import UploadProps from '@/pages/transaction/common/uploadProps';
const { Sider, Content } = Layout;
const { Text } = Typography; const { Text } = Typography;
const { Link } = Anchor;
export interface IProps { export interface IProps {
rel?: boolean, rel?: boolean,
preview?: boolean, preview?: boolean,
...@@ -37,14 +24,7 @@ const layout: any = { ...@@ -37,14 +24,7 @@ const layout: any = {
}; };
const CrossSellProducts: React.FC<IProps> = (props: any) => { const CrossSellProducts: React.FC<IProps> = (props: any) => {
const { const { rel, preview, visible, record, onClose, onClick } = props;
rel,
preview,
visible,
record,
onClose,
onClick
} = props;
const [flag, setFlag] = useState<boolean>(false); const [flag, setFlag] = useState<boolean>(false);
const [product, setProduct] = useState<any>({}); const [product, setProduct] = useState<any>({});
const [attribute, setAttribute] = useState<any>([]); const [attribute, setAttribute] = useState<any>([]);
...@@ -52,13 +32,11 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => { ...@@ -52,13 +32,11 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
const [loading, setloading] = useState(false); const [loading, setloading] = useState(false);
const [productId, setProductId] = useState<number>(0) const [productId, setProductId] = useState<number>(0)
const [isSeleted, setIsSeleted] = useState<any>(1); const [isSeleted, setIsSeleted] = useState<any>(1);
const handleAnchorClick = (e) => {
e.preventDefault()
};
const resetValue = () => { const resetValue = () => {
setProduct({}); setProduct({});
setAttribute([]) setAttribute([])
setIsSeleted(1)
} }
/**报价商品属性 */ /**报价商品属性 */
......
...@@ -31,7 +31,7 @@ const ReadyBid = () => { ...@@ -31,7 +31,7 @@ const ReadyBid = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/onlineBid/readyBid/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/onlineBid/readyBid/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
......
...@@ -31,7 +31,7 @@ const ReadySignUp = () => { ...@@ -31,7 +31,7 @@ const ReadySignUp = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/onlineBid/readySignUp/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/onlineBid/readySignUp/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
......
...@@ -30,7 +30,7 @@ const Search = () => { ...@@ -30,7 +30,7 @@ const Search = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
......
...@@ -82,7 +82,19 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => { ...@@ -82,7 +82,19 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => {
<Form.Item <Form.Item
label='授标意见' label='授标意见'
name='opinion' name='opinion'
rules={[{ required: true, message: '请输入授标意见' }]} rules={[
{ required: true, message: '请输入授标意见' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 200) {
return Promise.reject(new Error('最长200个字符,100个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<Input.TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" /> <Input.TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" />
</Form.Item> </Form.Item>
......
...@@ -214,9 +214,21 @@ const BasicInfo: React.FC<Iprops> = (props: any) => { ...@@ -214,9 +214,21 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label='竞价单摘要' label='竞价单摘要'
name='details' name='details'
rules={[{ required: true, message: '请输入竞价单摘要' }]} rules={[
{ required: true, message: '请输入竞价单摘要' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 60) {
return Promise.reject(new Error('最长60个字符,30个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<Input maxLength={30} placeholder='最长60个字符,30个汉字' /> <Input maxLength={60} placeholder='最长60个字符,30个汉字' />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={<Tooltip placement="right" title='设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'>适用地市<QuestionCircleOutlined style={{ marginLeft: '5px' }} /></Tooltip>} label={<Tooltip placement="right" title='设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'>适用地市<QuestionCircleOutlined style={{ marginLeft: '5px' }} /></Tooltip>}
...@@ -232,6 +244,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => { ...@@ -232,6 +244,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
onChange={(value) => { onChange={(value) => {
handProvince(value, idx, 1) handProvince(value, idx, 1)
}} }}
placeholder='请选择省'
> >
{province.map(items => { {province.map(items => {
return ( return (
...@@ -250,6 +263,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => { ...@@ -250,6 +263,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
onChange={(value) => { onChange={(value) => {
handProvince(value, idx, 2) handProvince(value, idx, 2)
}} }}
placeholder='请选择市'
> >
{(item.provinceCode && city.length > 0 && city[idx]) && city[idx].citydata.map(items => { {(item.provinceCode && city.length > 0 && city[idx]) && city[idx].citydata.map(items => {
return ( return (
......
...@@ -144,7 +144,19 @@ const BidRequirement: React.FC<Iprops> = (props: any) => { ...@@ -144,7 +144,19 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="报名要求" label="报名要求"
name="demand" name="demand"
rules={[{ required: true, message: '请输入报名要求' }]} rules={[
{ required: true, message: '请输入报名要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 200) {
return Promise.reject(new Error('最长200个字符,100个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" /> <TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" />
</Form.Item> </Form.Item>
...@@ -156,10 +168,10 @@ const BidRequirement: React.FC<Iprops> = (props: any) => { ...@@ -156,10 +168,10 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
<div className={styles.upload_data}> <div className={styles.upload_data}>
{files.length > 0 && files.map((v, index) => ( {files.length > 0 && files.map((v, index) => (
<div key={index} className={styles.upload_item}> <div key={index} className={styles.upload_item}>
<div className={styles.upload_left}> <a className={styles.upload_left} href={v.url} target='_blank'>
<LinkOutlined /> <LinkOutlined />
<span>{v.name}</span> <span>{v.name}</span>
</div> </a>
<div className={styles.upload_right} onClick={() => removeFiles(index)}> <div className={styles.upload_right} onClick={() => removeFiles(index)}>
<DeleteOutlined /> <DeleteOutlined />
</div> </div>
......
...@@ -167,7 +167,11 @@ const BidRules: React.FC<Iprops> = (props: any) => { ...@@ -167,7 +167,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
}) })
]} ]}
> >
<Input addonBefore={'¥'} value={startingPrice} onChange={(e) => { <Input
addonBefore={'¥'}
value={startingPrice}
placeholder='请输入起拍价'
onChange={(e) => {
let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'); let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1');
setStartingPrice(_val); setStartingPrice(_val);
form.setFieldsValue({ startingPrice: _val }); form.setFieldsValue({ startingPrice: _val });
...@@ -204,7 +208,11 @@ const BidRules: React.FC<Iprops> = (props: any) => { ...@@ -204,7 +208,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
}) })
]} ]}
> >
<Input addonBefore={'¥'} value={targetPrice} onChange={(e) => { <Input
addonBefore={'¥'}
value={targetPrice}
placeholder='请输入目标价'
onChange={(e) => {
let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'); let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1');
setTargetPrice(_val); setTargetPrice(_val);
form.setFieldsValue({ targetPrice: _val }); form.setFieldsValue({ targetPrice: _val });
...@@ -241,7 +249,11 @@ const BidRules: React.FC<Iprops> = (props: any) => { ...@@ -241,7 +249,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
}) })
]} ]}
> >
<Input addonBefore={'¥'} value={minPrice} onChange={(e) => { <Input
addonBefore={'¥'}
value={minPrice}
placeholder='请输入最小价差'
onChange={(e) => {
let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'); let _val = e.target.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1');
setMinPrice(_val); setMinPrice(_val);
form.setFieldsValue({ minPrice: _val }); form.setFieldsValue({ minPrice: _val });
...@@ -272,7 +284,10 @@ const BidRules: React.FC<Iprops> = (props: any) => { ...@@ -272,7 +284,10 @@ const BidRules: React.FC<Iprops> = (props: any) => {
}) })
]} ]}
> >
<Input value={allowPurchaseCount} onChange={(e) => { <Input
value={allowPurchaseCount}
placeholder='请输入报价次数'
onChange={(e) => {
let _val = e.target.value.replace(/[^\d]/g, '').replace(/^0{1,}/g, ''); let _val = e.target.value.replace(/[^\d]/g, '').replace(/^0{1,}/g, '');
setAllowPurchaseCount(_val); setAllowPurchaseCount(_val);
form.setFieldsValue({ allowPurchaseCount: _val }); form.setFieldsValue({ allowPurchaseCount: _val });
......
...@@ -121,7 +121,7 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -121,7 +121,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
> >
<DatePicker style={{ width: '100%' }} <DatePicker style={{ width: '100%' }}
disabledDate={(current) => { disabledDate={(current) => {
return current && current <= moment().startOf('day') return current && current <= moment().startOf('day')
}} }}
/> />
</Form.Item> </Form.Item>
...@@ -132,6 +132,7 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -132,6 +132,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
> >
<Select <Select
onSelect={handleSelectAddress} onSelect={handleSelectAddress}
placeholder='请选择交付地址'
> >
{address.map(v => ( {address.map(v => (
<Option key={v.id} value={v.id}>{v.fullAddress}</Option> <Option key={v.id} value={v.id}>{v.fullAddress}</Option>
...@@ -141,14 +142,38 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -141,14 +142,38 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="报价要求" label="报价要求"
name="offer" name="offer"
rules={[{ required: true, message: '请输入报价要求' }]} rules={[
{ required: true, message: '请输入报价要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="付款方式" label="付款方式"
name="paymentType" name="paymentType"
rules={[{ required: true, message: '请输入付款方式' }]} rules={[
{ required: true, message: '请输入付款方式' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
...@@ -156,7 +181,19 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -156,7 +181,19 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="税费要求" label="税费要求"
name="taxes" name="taxes"
rules={[{ required: true, message: '请输入税费要求' }]} rules={[
{ required: true, message: '请输入税费要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
...@@ -164,7 +201,19 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -164,7 +201,19 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="物流要求" label="物流要求"
name="logistics" name="logistics"
rules={[{ required: true, message: '请输入物流要求' }]} rules={[
{ required: true, message: '请输入物流要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
...@@ -172,7 +221,19 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -172,7 +221,19 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="包装要求" label="包装要求"
name="packRequire" name="packRequire"
rules={[{ required: true, message: '请输入包装要求' }]} rules={[
{ required: true, message: '请输入包装要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
...@@ -180,7 +241,19 @@ const Condition: React.FC<Iprops> = (props: any) => { ...@@ -180,7 +241,19 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item <Form.Item
label="其他要求" label="其他要求"
name="otherRequire" name="otherRequire"
rules={[{ required: true, message: '请输入其他要求' }]} rules={[
{ required: true, message: '请输入其他要求' }, () => ({
validator(_, value) {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 100) {
return Promise.reject(new Error('最长100个字符,50个汉字'));
} else {
return Promise.resolve();
}
},
})
]}
> >
<TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" /> <TextArea rows={3} maxLength={100} placeholder="最长100个字符,50个汉字" />
......
...@@ -90,10 +90,10 @@ const File: React.FC<IProps> = (props) => { ...@@ -90,10 +90,10 @@ const File: React.FC<IProps> = (props) => {
<div className={styles.upload_data}> <div className={styles.upload_data}>
{files.length > 0 && files.map((v, index) => ( {files.length > 0 && files.map((v, index) => (
<div key={index} className={styles.upload_item}> <div key={index} className={styles.upload_item}>
<div className={styles.upload_left}> <a className={styles.upload_left} href={v.url} target='_blank'>
<LinkOutlined /> <LinkOutlined />
<span>{v.name}</span> <span>{v.name}</span>
</div> </a>
<div className={styles.upload_right} onClick={() => removeFiles(index)}> <div className={styles.upload_right} onClick={() => removeFiles(index)}>
<DeleteOutlined /> <DeleteOutlined />
</div> </div>
......
...@@ -28,7 +28,7 @@ const ReadyAdd = () => { ...@@ -28,7 +28,7 @@ const ReadyAdd = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyAdd/detail?id=${record.id}&number=${text}&button=${record.button}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyAdd/detail?id=${record.id}&number=${text}&button=${record.button}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -32,7 +32,7 @@ const ReadyBid = () => { ...@@ -32,7 +32,7 @@ const ReadyBid = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyBid/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyBid/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -35,7 +35,7 @@ const ReadyConfirm = () => { ...@@ -35,7 +35,7 @@ const ReadyConfirm = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyConfirm/detail?id=${record.id}&number=${text}&memberName=${record.memberName}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyConfirm/detail?id=${record.id}&number=${text}&memberName=${record.memberName}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -31,7 +31,7 @@ const ReadyExamineOne = () => { ...@@ -31,7 +31,7 @@ const ReadyExamineOne = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineOne/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineOne/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -29,7 +29,7 @@ const ReadyExamineResultOne = () => { ...@@ -29,7 +29,7 @@ const ReadyExamineResultOne = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineResultOne/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineResultOne/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -30,7 +30,7 @@ const ReadyExamineResultTwo = () => { ...@@ -30,7 +30,7 @@ const ReadyExamineResultTwo = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineResultTwo/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineResultTwo/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -34,7 +34,7 @@ const ReadyExamineSignUp = () => { ...@@ -34,7 +34,7 @@ const ReadyExamineSignUp = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineSignUp/detail?id=${record.biddingId}&number=${text}&signUpId=${record.id}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineSignUp/detail?id=${record.biddingId}&number=${text}&signUpId=${record.id}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -30,7 +30,7 @@ const ReadyExamineTwo = () => { ...@@ -30,7 +30,7 @@ const ReadyExamineTwo = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineTwo/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readyExamineTwo/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -30,7 +30,7 @@ const ReadySubmit = () => { ...@@ -30,7 +30,7 @@ const ReadySubmit = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readySubmit/detail?id=${record.id}&number=${text}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readySubmit/detail?id=${record.id}&number=${text}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -32,7 +32,7 @@ const ReadySubmitExamineResult = () => { ...@@ -32,7 +32,7 @@ const ReadySubmitExamineResult = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readySubmitExamineResult/detail?id=${record.id}&number=${text}&button=${record.button}`}>{text}</EyePreview> <EyePreview url={`/memberCenter/procurementAbility/purchaseBid/readySubmitExamineResult/detail?id=${record.id}&number=${text}&button=${record.button}`}>{text}</EyePreview>
<Text type='secondary'>{record.details}</Text> <Text type='secondary'>{record.details}</Text>
</Space> </Space>
......
...@@ -33,7 +33,7 @@ const Search = () => { ...@@ -33,7 +33,7 @@ const Search = () => {
key: 'biddingNo', key: 'biddingNo',
dataIndex: 'biddingNo', dataIndex: 'biddingNo',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space direction='vertical'> <Space direction='vertical' style={{width: 300}}>
<EyePreview <EyePreview
url={`/memberCenter/procurementAbility/purchaseBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview> url={`/memberCenter/procurementAbility/purchaseBid/search/detail?id=${record.id}&number=${record.biddingNo}`}>{text}</EyePreview>
<Text type="secondary">{record.details}</Text> <Text type="secondary">{record.details}</Text>
......
...@@ -105,6 +105,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => { ...@@ -105,6 +105,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
useEffect(() => { useEffect(() => {
form.resetFields(); form.resetFields();
setFiles([]) setFiles([])
setIsSeleted(1)
searchCategoryTree(null); searchCategoryTree(null);
if (!isEmpty(edit)) { if (!isEmpty(edit)) {
console.log(edit) console.log(edit)
...@@ -156,11 +157,11 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => { ...@@ -156,11 +157,11 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
const handleSubmit = () => { const handleSubmit = () => {
form.validateFields().then((res: any) => { form.validateFields().then((res: any) => {
const data = { const data = {
goodsId: Object.keys(product).length > 0 && product.id, goodsId: Object.keys(product).length > 0 ? product.id : edit.goodsId,
itemNo: Object.keys(product).length > 0 ? product.code : res.number, itemNo: Object.keys(product).length > 0 ? product.code : res.number,
number: Object.keys(product).length > 0 ? product.code : res.number, number: Object.keys(product).length > 0 ? product.code : res.number,
name: Object.keys(product).length > 0 ? product.name : res.name, name: Object.keys(product).length > 0 ? product.name : res.name,
category: Object.keys(product).length > 0 && product.customerCategory.name, category: Object.keys(product).length > 0 ? product.customerCategory.name : edit.category,
ids: res.ids, ids: res.ids,
brand: res.brand, brand: res.brand,
model: res.model, model: res.model,
......
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