/*** Created by A.J on 2019/9/27.*/$(document).ready(function(){$("input.custom-control-input").on("click", function(){var tobj = $(this);var tid = $(this).attr("id");var farr = tid.split("_");var ischk = 0;if($(this).prop("checked") == true){ischk = 1;}$.post("manauser", { id: farr[1],opt: farr[0], chk: ischk, verification:$("#verification").text()}, function(data){if(data != 'ok'){if(ischk == 1){tobj.prop("checked", false);}else{tobj.prop("checked", true);}$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});var gupoval, gupobj;$(".yonghuzu").mouseenter(function(){gupoval = $(this).val();});$(".yonghuzu").change(function(){gupobj = $(this);if($(this).val() == 15){$('#vipmodal').modal('show');}else{$.setgroups(gupobj, gupoval);}});$(".closevip").on("click", function(){gupobj.val(gupoval);});$("#huiyuanleixing").change(function(){if($(this).val() == 3){$("#huiyuanqixiandiv").addClass("d-none");}else{$("#huiyuanqixiandiv").removeClass("d-none");}});$("#huiyuanqixianok").on("click", function(){$(this).children("i").removeClass("d-none");$.setgroups(gupobj, gupoval);});var gupobzval;$(".banzhuzu").mouseenter(function(){gupobzval = $(this).val();});$(".banzhuzu").change(function(){var gupobj = $(this);var oval = gupobzval;var gupval = $(this).val();$.post("setbzgroups", { id: $(this).next().val(),gup: gupval, verification:$("#verification").text()}, function(data){if(data != 'ok'){gupobj.val(oval);$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});});$.extend({"setgroups": function(gupobj, oval){$.post("setgroups", { id: gupobj.next().val(),gup: gupobj.val(),leixing: $("#huiyuanleixing").val(),shixian: $("#huiyuanqixian").val(), verification:$("#verification").text()}, function(data){$("#huiyuanqixianok").children("i").addClass("d-none");if(data != 'ok'){if(gupobj.val() != 15){gupobj.val(oval);}$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}else{if(gupobj.val() == 15){$('#vipmodal').modal('hide');}}});}});