
function saveUser(call){

    if($("#accountName").val()==''){
        alert(XTJCGL.GYSYHGL_YHZHBNWK);
        return ;
    }

    if($("#username").val()==''){
        alert(XTJCGL.GYSYHGL_XMBNWK);
        return ;
    }
    var url = g.ctx + "pc/sys/user/update";
    var userForm = {
        id: $("#id").val(),
        username: $("#username").val(),
        sex: $("#sex option:selected").val(),
        userFlag: $("#userFlag option:selected").val(),
        email: $("#email").val(),
        cardId: $("#cardId").val(),
        birthday: $("#birthday").val(),
        educationalHistory: $("#educationalHistory").val(),
        professional: $("#professional").val(),
        position: $("#position").val(),
        phone: $("#phone").val(),
        startFromDate: $("#startFromDate").val(),
        description: $("#description").val()
    };
    $.ajax({
        url:  url,
        method:"POST",
        data: userForm,
        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});
        }
    });
}

