ComplianceServer/oldcode/WEB/Views/Level2/L2RetPassword/Index.cshtml

97 lines
3.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using System.Collections;
@using System.Web.UI.WebControls;
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script type="text/javascript">
function onLoadSucced() {
}
var oInterval = "";
$(function () {
//密码重置
$("#btnRetPwd").click(function () {
var uname = $("#txt_userName").val();
var resid = $("#txt_resid").val();
//if (resid != "") {
if (uname != "") {
if (confirm("确认要重置密码吗?")) {
$.getJSON("/Level2/L2RetPassword/RetPaw?uname=" + uname + "&resid=" + resid + "&randnum=" + Math.floor(Math.random() * 1000 + 1), function (data) {
$.messageBox5s('提示', data.message);
//$("#callnum").empty();
//$("#callnum").append(data);
$("#lab_number").html(120);
$("#lab_number").show();
$("#lab_number1").show();
$("#btnRetPwd").attr('disabled', true);
oInterval = setInterval(CountDown, 1000);
});
}
} else {
$.messageBox5s('提示', "请输入用户名!");
}
//} else {
// $.messageBox5s('提示', "客户ID不能为空");
//}
});
});
//倒计时显示
function CountDown() {
var count = $("#lab_number").text();
count--;
if (count != 0) {
$("#lab_number").html(count);
} else {
$("#btnRetPwd").attr('disabled', false);
$("#lab_number").hide();
$("#lab_number1").hide();
clearInterval(oInterval);
};
}
</script>
<div style="height:100%;width:800px;margin: 0 auto;">
<fieldset style="width:760px;">
<legend>密码重置</legend>
<div style="width:760px;border-bottom:double 4px #097eb2; padding-bottom:10px;">
<div style="width:600px;margin: 0 auto; ">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul" style="display:none">
<li>客户ID<input type="text" id="txt_resid" name="txt_resid" />&nbsp;</li>
</ul>
<ul class="toolBar_ul">
<li>用户名:<input type="text" id="txt_userName" name="txt_userName" />&nbsp;</li>
</ul>
<table>
<tr>
<tb><input id="btnRetPwd" type="button" value="重置密码" /></tb>
<tb id="lab_number" style="margin-left: 30px; color: red;display: none;">120</tb>
<tb id="lab_number1" style="color: red;display: none">秒后才可重置密码</tb>
</tr>
</table>
@*<ul class="toolBar_ul">
<li>
<input id="btnRetPwd" type="button" value="重置密码" />
</li>
</ul>*@
</div>
@*<div id="callnum"></div>*@
</div>
</div>
</fieldset>
</div>