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

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

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