Commit 268915a0 authored by 卢均锐's avatar 卢均锐

fix: [19517]

parent da59818f
......@@ -77,8 +77,32 @@ const Add = () => {
}
const basicFormCol = [
{ label: intl.formatMessage({ id: 'balance.danjuzhaiyao' }), name: 'reconciliationAbstract', placeholder: '请输入对账单摘要', maxLength: 60, rules: [{ required: true, message: '请输入对账单摘要' }] },
{ label: intl.formatMessage({ id: 'balance.beizhu' }), name: 'remark', placeholder: '请输入对备注', maxLength: 120 },
{
label: intl.formatMessage({ id: 'balance.danjuzhaiyao' }), name: 'reconciliationAbstract', placeholder: '请输入对账单摘要', rules: [{ required: true, message: '请输入对账单摘要' }, {
validator: (_, value) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 30 * 2) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'detail.purchase.tips19' })}${30 * 2}${intl.formatMessage({ id: 'detail.purchase.tips20' })}${30}${intl.formatMessage({ id: 'detail.purchase.tips18' })}`))
} else {
return Promise.resolve();
}
}
}]
},
{ label: intl.formatMessage({ id: 'balance.beizhu' }), name: 'remark', placeholder: '请输入对备注',rules: [
{
validator: (_, value) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (value.length > 60 * 2) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'detail.purchase.tips19' })}${60 * 2}${intl.formatMessage({ id: 'detail.purchase.tips20' })}`))
} else {
return Promise.resolve();
}
}
}
] },
]
const basicFormColRight = [
......@@ -371,7 +395,7 @@ const Add = () => {
<Form.Item
{...item}
>
{_editAble ? <Input placeholder={item.placeholder} maxLength={item.maxLength} /> : dataSource[item.name]}
{_editAble ? <Input placeholder={item.placeholder} /> : dataSource[item.name]}
</Form.Item>
</Col>
))}
......
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