diff --git a/js/car_basic/child/framework_contract_edit_oper.js b/js/car_basic/child/framework_contract_edit_oper.js index 3e227e1..82caae9 100644 --- a/js/car_basic/child/framework_contract_edit_oper.js +++ b/js/car_basic/child/framework_contract_edit_oper.js @@ -130,7 +130,7 @@ function checkValue2(that, type) { } } } else if (type === 3) { // 单项基准费用(元/吨*公里 - const regex = /^(?:(?:[1-9]\d{0,3}(?:\.\d{1,2})?)|(?:0\.(?:0[1-9]|[1-9]\d?))|10000(?:\.00?)?)$/; + const regex = /^(?:(?:[1-9]\d{0,3}(?:\.\d{1,3})?)|(?:0\.(?:00[1-9]|0[1-9]\d|[1-9]\d{2}))|10000(?:\.0{1,3})?)$/; if (!regex.test(value) && value) { $(that).val(''); return layer.msg('单项基准费用(元/吨*公里)范围在(必须大于0,小于等于10000),请重新输入!', { icon: 5 }) diff --git a/js/car_basic/child/framework_contract_oper.js b/js/car_basic/child/framework_contract_oper.js index 66c928f..1f0840e 100644 --- a/js/car_basic/child/framework_contract_oper.js +++ b/js/car_basic/child/framework_contract_oper.js @@ -125,7 +125,7 @@ function checkValue2(that, type) { } } } else if (type === 3) { // 单项基准费用(元/吨*公里 - const regex = /^(?:(?:[1-9]\d{0,3}(?:\.\d{1,2})?)|(?:0\.(?:0[1-9]|[1-9]\d?))|10000(?:\.00?)?)$/; + const regex = /^(?:(?:[1-9]\d{0,3}(?:\.\d{1,3})?)|(?:0\.(?:00[1-9]|0[1-9]\d|[1-9]\d{2}))|10000(?:\.0{1,3})?)$/; if (!regex.test(value) && value) { $(that).val(''); return layer.msg('单项基准费用(元/吨*公里)范围在(必须大于0,小于等于10000),请重新输入!', { icon: 5 })