
var layer_index;
function addUser(title, id) {
    $("#jswintitle").html(title);
    layer_index = layer.open({
        type: 1,
        title: false,
        closeBtn: 0,
        shift: false,
        content: $("#jsAddUser"),
    });
    //$("#id").val(id);
    ////如果是新增
    //if (id == "0")
    //{ $("#fvdxsm").val("无"); }
    //else
    //{//是修改，调用getuser()
    //    getuser(id);
    //}
}


//关闭弹出
function cansleAdd() {
    layer.close(layer_index);
    clearWin();
}
//清除窗体中内容
function clearWin() {
    $("#jsAddUser").find("input").each(function () {
        $(this).val("");
    });
}

function ZDELESELE(id) {
    layer.confirm('确认要删除吗？', {
        icon: 3, btn: ['确定', '取消'] //按钮
    }, function () {
        temp = ZQDdele(id);
    });
}

function ZQDdele(id) {//删除  ACC59F8CFF2E57194F624C1B62FA7A63
    var1 = "beduajax.aspx?ACT=28193B70D4B8F3CF4953247F48B67A1D&id=" + id;

    var temptext = "";
    var1 = encodeURI((var1));
    $.ajax({
        type: "Post",
        url: var1,
        data: { data1: '13D17C93EDB', },
        cache: false,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        success: function (temptext) {
            layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                if (temptext.indexOf("删除成功") > -1) {
                    window.location.reload();
                }
                return true;
            });
        }
    });


}

function ZWDSCZDGN(id) {//文档置顶
    var1 = "beduajax.aspx?ACT=6740967F5F45C3D65BF5825DEB9DAC4F&id=" + id;
    var temptext = "";
    var1 = encodeURI((var1));
    $.ajax({
        type: "Post",
        url: var1,
        data: { data1: '13D17C93EDB', },
        cache: false,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        success: function (temptext) {
            layer.msg(temptext, { icon: 1, btn: ['确定'] }, function () {
                if (temptext.indexOf("成功置顶") > -1) {
                    window.location.reload();
                }
                return true;
            });
        }
    });
   
}