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