Aucune description

index.js 10KB

    /** * Created by TT on 2017/7/7. */ ; spa_define(function () { return $.use(["spa", "pagedatagrid", "util","win"], function (spa, pdgf, util,win) { return { main: function () { var root = spa.findInMain(".sys_userinfo_index"); var pdg = pdgf.build(root); // validate.form(pdg.form, { name: { required: "not null", len: { val: 5, msg: "我的中国心" } } }); root.find(".opt-query").on("click", function () { pdg.load(); }); root.find(".opt-new").on("click", function () { spa.showModal("sys_userinfo_new", function () { pdg.load() }); }); root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () { var $this = $(this); $this.toggleClass("checked"); if ($this.hasClass("checked")) { root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked"); } else { root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked"); } }); root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () { var $this = $(this); $this.toggleClass("checked"); }); root.find(".opt-edit").on("click", function () { var $org = root.find("td.opt-check>i.checked"); if ($org.length) { if ($org.length > 1) { util.alert("只能选择一个用户"); } else { util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) { if (data) { if (data.state == "1" || data.state == "4") { spa.showModal("sys_userinfo_edit", { data: data, hand: function () { pdg.load() } }) } else { util.alert("待审核和审核通过的不可修改。"); } } else { util.alert("用户不存在了", function () { pdg.load(); }); } }, {}); } } else { util.alert("请选择一个用户"); } }); root.find(".opt-del").on("click", function () { var $org = root.find("td.opt-check>i.checked"); if ($org.length) { if ($org.length > 1) { util.alert("只能选择一个用户"); } else { util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) { if (data) { if (data.state == "1" || data.state == "4") { util.boxMsg({ title: "确认删除", content: "您是否要删除选中的用户信息,信息删除后不可恢复。", btns: [{ caption: "删除", hand: function () { util.del("../ajax/userinfo/del/" + $org.attr("userId"), function (code) { if (code != 1) { if (code == 2) { util.alert("无法删除,请检查状态"); } if (code == 3) { util.alert("找不到该账户,请检查"); } } pdg.load() }, {}); } }, {caption: "取消"} ] }); } else { util.alert("待审核和审核通过的不可删除。"); } } else { util.alert("用户不存在了", function () { pdg.load(); }); } }, {}); } } else { util.alert("请选择一个用户"); } }); root.find(".opt-details").on("click", function () { var $org = root.find("td.opt-check>i.checked"); if ($org.length) { if ($org.length > 1) { util.alert("只能选择一个用户"); } else { util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) { if (data) { if (data.state == "1" || data.state == "4") { spa.showModal("sys_userinfo_details", { data: data, hand: function () { pdg.load() } }) } else { util.alert("待审核和审核通过的不可修改。"); } } else { util.alert("用户不存在了", function () { pdg.load(); }); } }, {}); } } else { util.alert("请选择一个用户"); } }); root.find(".opt-check").on("click", function () { var $check = root.find("td.opt-check>i.checked"); if ($check.length) { if ($check.length > 1) { util.alert("只能选择一个用户") } else { util.get("../ajax/userinfo/id/" + $check.attr("userId"), null, function (data) { if (data) { if (data.state == "1" || data.state == "4") { util.boxMsg({ title: "提交审核", content: "请确认提交审核,提交审核后不可修改!", btns: [{ caption: "确认提交", hand: function () { util.post("../ajax/userinfo/updateState", {id: $check.attr("userId")}, function () { pdg.load() }, {}); } }, {caption: "取消"} ] }); } else { util.alert("只有未提交、审核失败的可以点击"); } } else { util.alert("用户不存在了", function () { pdg.load(); }); } }); } } else { util.alert("请选择一名专家"); } }); root.find(".opt-photo").on("click", function () { var $org = root.find("td.opt-check>i.checked"); if ($org.length) { if ($org.length > 1) { util.alert("只能选择一个用户"); } else { util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) { if (data) { if (data.state === "1" || data.state === "4") { win.open('/html/model/sys/professornew/photo/photo-set.html?id=' + $org.attr("userId")); } else { util.alert("待审核和审核通过的不可修改。"); } } else { util.alert("用户不存在了", function () { pdg.load(); }); } }, {}); } } else { util.alert("请选择一个用户"); } }); pdg.code.listen($.dict.doTransfer); pdg.load(); }, mainDestory: function () { }, }; }); });
portal-front - Gogs: Go Git Service

portal html css js resource

fillinfo-select.html 3.8KB

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title>完善个人信息</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="css/reset.css"> <link type="text/css" rel="stylesheet" href="css/common.css"> <link type="text/css" rel="stylesheet" href="css/genindex.css"> <script type="text/javascript" src="js/jquery-1.11.1.js"></script> </head> <body class="covbodyBg"> <div class="containerCon"> <a href="index.html" class="headlogo signLogo"></a> </div> <!--中间--> <div id="container"> <div class="containerCon contConP"> <div class="covFrmblock"> <form class="cmpAllFrm"> <p class="h1Font alignCenter mainColor">完善个人信息</p> <div class="selectSortBox"> <div class="bindtip"><img src="images/sign_bg_tishi_1_nor.png" width="100%" /></div> <ul class="mui-table-view mui-grid-view mui-grid-9"> <li class="col-w-4" data-num="1"> <span class="selectSort sort-pro"></span> <div class="sortbody">科研工作者</div> </li> <li class="col-w-4" data-num="2"> <span class="selectSort sort-mana"></span> <div class="sortbody">企业高管</div> </li> <li class="col-w-4" data-num="3"> <span class="selectSort sort-stu"></span> <div class="sortbody">在校生</div> </li> <li class="col-w-4" data-num="4"> <span class="selectSort sort-skill"></span> <div class="sortbody">技术人员</div> </li> <li class="col-w-4" data-num="5"> <span class="selectSort sort-hr"></span> <div class="sortbody">HR/猎头</div> </li> <li class="col-w-4" data-num="6"> <span class="selectSort sort-sale"></span> <div class="sortbody">销售人员</div> </li> <li class="col-w-4" data-num="7"> <span class="selectSort sort-invest"></span> <div class="sortbody">投资方</div> </li> <li class="col-w-4" data-num="8"> <span class="selectSort sort-consult"></span> <div class="sortbody">咨询顾问</div> </li> <li class="col-w-4 selectNow" data-num="0"> <span class="selectSort sort-user"></span> <div class="sortbody">普通用户</div> <span class="selectNowicon"></span> </li> </ul> <div class="frmboxNew"> <button type="button" class="frmtype btnModel save-block headRadius" id="nextbut">下一步</button> </div> </div> </form> </div> </div> </div> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript"> $(function(){ var id=$.cookie('userid') $(".selectSortBox").on("click","li",function(){ var liAll = document.getElementsByTagName('li'); var slescted =document.createElement("span") slescted.className = "selectNowicon"; for(var i = 0;i <liAll.length;i++){ if(liAll[i].classList.contains("selectNow")){ liAll[i].classList.remove("selectNow"); liAll[i].removeChild(liAll[i].getElementsByTagName("span")[1]); } } this.classList.add("selectNow"); this.appendChild(slescted); }) $("#nextbut").on("click",function(){ var authentication = $(".selectNow").attr("data-num"); $.ajax({ "url":"../ajax/professor/authen", "type":"POST", "data":{"id":id,"authentication":authentication}, "success":function(data){ console.log(data); if(data.success){ $.cookie('authentication', authentication, {path: "/"}); location.href = "fillinfoNew.html"; } }, "error":function(){ $.MsgBox.Alert('消息', '服务器请求失败'); } }) }) }) </script> </body> </html>