Browse Source

修复商品表单物流信息模块js表单验证

antshop
linyaostalker 5 years ago
parent
commit
bfebc37a95
  1. 8
      backend/modules/goods/views/goods/express.php

8
backend/modules/goods/views/goods/express.php

@ -28,6 +28,10 @@ use backend\modules\shop\models\ars\ExpressTemplate;
<?php
$js =<<<JS
$(document).ready(function(){
if(!$("#goods-uniform_postage").val()){
$("#goods-uniform_postage").val("0.00")
}
$("input:radio[name='Goods[is_express]']").on('ifChecked', function(event){
if ($(this).val() === '1') {
$("#isExpress").show();
@ -45,6 +49,9 @@ use backend\modules\shop\models\ars\ExpressTemplate;
}
})
$("#goods-uniform_postage").blur(function(){
if(!$(this).val()){
$(this).val("0.00")
}
if(isNaN($(this).val())){
$(this).val("0.00")
}
@ -74,6 +81,7 @@ use backend\modules\shop\models\ars\ExpressTemplate;
}
return f;
}
})
JS;
$this->registerJs($js);
Loading…
Cancel
Save