Commit b5292951 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 修改新增询价单报价截止时间必须小于交付时间

parent 205d66f7
......@@ -133,4 +133,6 @@ export default {
'dealAbility.huiyuandengji':'Membership level',
'dealAbility.xuanzehuiyuan':'Select member',
'dealAbility.qingshuruxunjiadanzhaiyao':'Please enter the summary of the inquiry form',
'dealAbility.dayubaojiajiezhi': 'Delivery date must be greater than Quote deadline',
'dealAbility.xiaoyujiaofushijian': 'The deadline for quotation must be less than the delivery time',
}
......@@ -134,4 +134,6 @@ export default {
'dealAbility.huiyuandengji': '회원 등급',
'dealAbility.xuanzehuiyuan': '회원 선택',
'dealAbility.qingshuruxunjiadanzhaiyao': '문의서 요약을 입력하십시오.',
'dealAbility.dayubaojiajiezhi': '배송 날짜는 견적 마감 시간보다 커야 합니다.',
'dealAbility.xiaoyujiaofushijian': '견적 마감 시간은 제공 시간보다 작아야 합니다.',
}
......@@ -134,4 +134,7 @@ export default {
'dealAbility.huiyuandengji': '会员等级',
'dealAbility.xuanzehuiyuan': '选择会员',
'dealAbility.qingshuruxunjiadanzhaiyao': '请输入询价单摘要',
'dealAbility.dayubaojiajiezhi': '交付日期必须大于报价截止时间',
'dealAbility.xiaoyujiaofushijian': '报价截止时间必须小于交付时间',
}
......@@ -63,22 +63,22 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
const columns: any = [
{
title: intl.formatMessage({id: 'dealAbility.xuhao'}),
title: intl.formatMessage({ id: 'dealAbility.xuhao' }),
dataIndex: 'userId',
key: 'userId',
},
{
title: intl.formatMessage({id: 'dealAbility.yonghuxingming'}),
title: intl.formatMessage({ id: 'dealAbility.yonghuxingming' }),
dataIndex: 'name',
key: 'name',
},
{
title: intl.formatMessage({id: 'dealAbility.shoujihao'}),
title: intl.formatMessage({ id: 'dealAbility.shoujihao' }),
dataIndex: 'phone',
key: 'phone',
},
{
title: intl.formatMessage({id: 'dealAbility.suoshujigou'}),
title: intl.formatMessage({ id: 'dealAbility.suoshujigou' }),
dataIndex: 'orgName',
key: 'orgName',
},
......@@ -117,18 +117,34 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
return (
<Card
id="tradeTermsLayout"
title={intl.formatMessage({id: 'dealAbility.jiaoyitiaojian'})}
title={intl.formatMessage({ id: 'dealAbility.jiaoyitiaojian' })}
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label={intl.formatMessage({id: 'dealAbility.jiaofuriqi'})} name='deliveryTime' rules={[{ required: true, message: intl.formatMessage({id: 'dealAbility.qingxuanzejiaofuriqi'}) }]}>
<Form.Item
label={intl.formatMessage({ id: 'dealAbility.jiaofuriqi' })}
dependencies={['quotationAsTime']}
name='deliveryTime'
rules={[
{ required: true, message: intl.formatMessage({ id: 'dealAbility.qingxuanzejiaofuriqi' }) },
({ getFieldValue }) => ({
validator: (_rule, value) => {
const _startTime = getFieldValue('quotationAsTime');
if (_startTime && !moment(value).isAfter(_startTime)) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'dealAbility.dayubaojiajiezhi' })}`));
}
return Promise.resolve();
}
})
]}
>
<DatePicker
style={{ width: '100%' }}
disabledDate={disabledDate}
format="YYYY-MM-DD HH:mm:ss"
/>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'dealAbility.jiaofudizhi'})} className={style.address_style}>
<Form.Item label={intl.formatMessage({ id: 'dealAbility.jiaofudizhi' })} className={style.address_style}>
<AddressSelect
echo={isDefault}
value={isDefault ? fullAddress.fullAddress : address}
......@@ -138,7 +154,23 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
onChange={getFullAddress}
/>
</Form.Item>
<Form.Item label={intl.formatMessage({id: 'dealAbility.baojiajiezhishijian'})} name='quotationAsTime' rules={[{ required: true, message: intl.formatMessage({id: 'dealAbility.qingxuanzebaojiajiezhishi'}) }]}>
<Form.Item
label={intl.formatMessage({ id: 'dealAbility.baojiajiezhishijian' })}
name='quotationAsTime'
dependencies={['deliveryTime']}
rules={[
{ required: true, message: intl.formatMessage({ id: 'dealAbility.qingxuanzebaojiajiezhishi' }) },
({ getFieldValue }) => ({
validator: (_rule, value) => {
const _startTime = getFieldValue('deliveryTime');
if (_startTime && !moment(value).isBefore(_startTime)) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'dealAbility.xiaoyujiaofushijian' })}`));
}
return Promise.resolve();
}
})
]}
>
<DatePicker
style={{ width: '100%' }}
disabledDate={disabledDate}
......@@ -146,14 +178,14 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
/>
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'dealAbility.xunjialianxiren'})}
label={intl.formatMessage({ id: 'dealAbility.xunjialianxiren' })}
name='contactName'
rules={[{ required: true, message: intl.formatMessage({id: 'dealAbility.qingxuanzexunjialianxiren'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'dealAbility.qingxuanzexunjialianxiren' }) }]}
>
<Input.Search onSearch={() => toggle(true)} readOnly enterButton={<Button style={{ height: '31.19px' }} icon={<LinkOutlined />}>{intl.formatMessage({id: 'dealAbility.xuanze'})}</Button>} />
<Input.Search onSearch={() => toggle(true)} readOnly enterButton={<Button style={{ height: '31.19px' }} icon={<LinkOutlined />}>{intl.formatMessage({ id: 'dealAbility.xuanze' })}</Button>} />
</Form.Item>
<Form.Item
label={intl.formatMessage({id: 'dealAbility.lianxirendianhua'})}
label={intl.formatMessage({ id: 'dealAbility.lianxirendianhua' })}
required
style={{ marginBottom: '0px' }}
>
......@@ -161,7 +193,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
<Col span={8}>
<Form.Item
name='phoneCode'
rules={[{ required: true, message: intl.formatMessage({id: 'dealAbility.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'dealAbility.qingxuanze' }) }]}
initialValue={telCode[0]}
>
<Select>
......@@ -174,7 +206,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
<Col span={16}>
<Form.Item
name='contactPhone'
rules={[{ required: true, message: intl.formatMessage({id: 'dealAbility.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'dealAbility.qingxuanze' }) }]}
>
<Input type='number' maxLength={11} />
</Form.Item>
......@@ -182,7 +214,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
</Row>
</Form.Item>
<Form.Item label={intl.formatMessage({ id: 'dealAbility.fukuanfangshi' })
} name='paymentType'>
} name='paymentType'>
<Input.TextArea maxLength={50} autoSize placeholder={intl.formatMessage({ id: 'dealAbility.zuichang100gezifu50ge' })} />
</Form.Item>
</Col>
......@@ -208,7 +240,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
<TableModal
modalType="Drawer"
visible={visible}
title={intl.formatMessage({id: 'dealAbility.xuanzeyonghu'})}
title={intl.formatMessage({ id: 'dealAbility.xuanzeyonghu' })}
mode="radio"
tableProps={{
rowKey: 'userId',
......@@ -236,7 +268,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
},
"x-component-props": {
placeholder: intl.formatMessage({id: 'dealAbility.yonghuxingming'}),
placeholder: intl.formatMessage({ id: 'dealAbility.yonghuxingming' }),
align: 'flex-left',
}
}
......@@ -268,7 +300,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
orgName: {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({id: 'dealAbility.suoshujigou'})
placeholder: intl.formatMessage({ id: 'dealAbility.suoshujigou' })
}
},
}
......@@ -279,7 +311,7 @@ const TradeTermsLayout: React.FC<TradeTermsLayoutProps> = (props: any) => {
span: 1
},
"x-component-props": {
children: intl.formatMessage({id: 'dealAbility.chaxun'})
children: intl.formatMessage({ id: 'dealAbility.chaxun' })
}
}
}
......
......@@ -178,10 +178,11 @@ const WaitAddInquiry = () => {
icon={<PlusOutlined />}
onClick={() => history.push(`/memberCenter/tranactionAbility/productInquiry/waitAddInquiry/add`)}
>
{intl.formatMessage({ id: 'dealAbility.add' })}
{intl.formatMessage({ id: 'dealAbility.xinjian' })}
</Button>
</AuthButton>
<AuthButton btnCode='waitAddInquiry.batch' >
<Space direction="horizontal" size={16}>
<Button
loading={loading}
onClick={() => fetchSubmitBatch()}
......@@ -196,6 +197,7 @@ const WaitAddInquiry = () => {
>
{intl.formatMessage({ id: 'dealAbility.piliangshanchu' })}
</Button>
</Space>
</AuthButton>
</Space>
......
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