Commit aa58403a authored by 前端-许冠华's avatar 前端-许冠华

Merge branch 'fix-v2' into 'v2'

fix: 修改营销能力新增拼团 团购价格保留4位小数 See merge request linkseeks-design/pro-platform!560 (cherry picked from commit 02874093b5e8de9d5e8ac7a99db981f0c430ea33) 367f816d fix: 修改营销能力新增拼图 团购价格保留4位小数
parent 527dd465
......@@ -73,12 +73,12 @@ const columns_5 = ({
name={`activityPrice_${_index}`}
rules={[{
required: true, validator: (_rule, value) => {
const pattern = /(^[1-9](\d+)?(\.\d{1,3})?$)|(^\d\.\d{1,3}$)/;
const pattern = /(^[1-9](\d+)?(\.\d{1,4})?$)|(^\d\.\d{1,4}$)/;
if (!value) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'marketingAbility.qingshurutuangoujiage'})}`));
}
if (!pattern.test(value) || (Number(value) >= Number(_record.price))) {
return Promise.reject(new Error(`${intl.formatMessage({ id: 'marketingAbility.bixudayu0qiexiaoyushangpinjiage'})}`));
return Promise.reject(new Error(`${intl.formatMessage({ id: 'marketingAbility.bixudayu0qiexiaoyushangpinjiage'})}${intl.formatMessage({ id: 'marketingAbility.zuiduobaoliu4weixiaoshu'})}`));
}
return Promise.resolve();
}
......
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