Merge pull request 'fix: 提成设置可以输入两位小数' (#11) from feature/mall_product into master

Reviewed-on: http://117.33.142.185:3000/zenghuapei/cyywl_server/pulls/11
pull/12/head
tianyu 2023-06-02 09:53:09 +08:00
commit 1aca869225
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ export default {
callback(new Error('请输入值'));
return false
}
if (!/(^[0-9]\d*$)/.test(value)) {
callback(new Error('值只能为正整数'));
if (!/^([0-9]|[1-9]\d+)(\.\d{1,2})?$/.test(value)) {
callback(new Error('请输入有效数字,最多保留两位小数'));
return false
}
if (value < 0 || value > 100) {