function save(call) {
    if ($("#name").val() || (($("#name").val().length <= 10) && ($("#name").val().length >= 3))) {

    } else {
        layer.msg("名称为必填,角色名由3至10位字符组合构成");
        return;
    }

    if ($("#rolekey").val() == '') {
        layer.msg("角色编码不能为空");
        return;
    }

    var productForm = $('#form').serializeJson();
    $.ajax({
        url: g.ctx + 'pc/sys/role/update',
        method: "POST",
        data: productForm,
        success: function (data) {
            topWin.layer.alert("保存成功", {icon: 1}, function (idx) {
                topWin.layer.close(idx);
                call();
            });
        },
        error: function (data) {
            topWin.layer.alert(data.responseJSON.message, {icon: 2});
        }
    });
}