Authored by chenchao

check at front , do not reach 2 server

... ... @@ -126,14 +126,12 @@ $(document).on('click', '.edit-class-btn', function () {
url: '/erpproduct/standardSort/update',
data: (function () {
var input = $('#standardSortName').val();
if (input === '' || $.trim(input) === ''){
common.util.__tip("参数名称不能为空", "warning");
return false;
if (input === '' || $.trim(input) === ''){
return "参数名称不能为空";
}
var orderBy = $('#orderBy').val();
if (orderBy < 0)
{
common.util.__tip("排序不能为负数", "warning");
{
return "排序不能为负数";
}
return {
... ... @@ -171,20 +169,20 @@ $(document).on('click', '#add-btn', function () {
data: (function () {
if(smallSortId === 'undefined' || smallSortId <= 0 || smallSortId === null){
common.util.__tip("请选择分类", "warning");
return;
//common.util.__tip("请选择分类", "warning");
return "请选择分类";
}
var standardSortName = $('#standardSortName').val();
if (standardSortName === '' || $.trim(standardSortName) === '')
{
common.util.__tip("参数类别名称不能为空", "warning");
return;
//common.util.__tip("参数类别名称不能为空", "warning");
return "参数类别名称不能为空";
}
var orderBy = $('#orderBy').val();
if (orderBy < 0)
{
common.util.__tip("排序不能为负数", "warning");
return;
//common.util.__tip("排序不能为负数", "warning");
return "排序不能为负数";
}
return {
sortId: smallSortId,
... ...