Browse Source

修复js表单验证机制bug

antshop
linyaostalker 5 years ago
parent
commit
62f32a086b
  1. 5
      backend/modules/shop/views/express-template/express_area_form.php

5
backend/modules/shop/views/express-template/express_area_form.php

@ -71,7 +71,7 @@ function changeCalType(type){//当切换计算方式
$.each(formList[type],function(index,value){ //更改文字标题
$("." + index).children("label").html(value)
});
if(!$("#expressarea-basic_count").val()){
$("#expressarea-basic_count").val(udfVal[type][0])//重置初始值
}
@ -103,8 +103,7 @@ $(document).ready(function(){
$(this).val(1)
}
var basiccount = $(this).val();
// $(this).val(Math.floor(basiccount * 1) / 1);
$(this).val(basiccount.toString().match(/^\d+(?:\.\d{0,0})?/));
$(this).val(Math.floor(basiccount * 1) / 1);
}
})
$("#expressarea-basic_price").blur(function(){

Loading…
Cancel
Save