tijian_tieying/web/dccdc/Views/Dictionaries/xgmm.cshtml
2025-02-20 12:14:39 +08:00

93 lines
3.3 KiB
Plaintext

@{
ViewBag.Title = "修改密码";
}
<table>
<tr>
<td class="ltd">原密码:</td>
<td class="rtd"><input type="password" id="ymm" /></td>
</tr>
<tr>
<td class="ltd">新密码:</td>
<td class="rtd"><input type="password" id="xmm1" /></td>
</tr>
<tr>
<td class="ltd">确认新密码:</td>
<td class="rtd"><input type="password" id="xmm2" /></td>
</tr>
<tr>
<td class="ltd"></td>
<td class="rtd"><div id="xg">修改</div></td>
</tr>
</table>
@section scripts{
<script type="text/javascript">
$(function () {
$("#ymm").ligerTextBox();
$("#xmm1").ligerTextBox();
$("#xmm2").ligerTextBox();
$("#xg").ligerButton({
click: function () {
var m_ymm=liger.get("ymm");
var m_xmm1=liger.get("xmm1");
var m_xmm2=liger.get("xmm2");
var edit;
var msg="";
if(!m_ymm.getValue())
{
msg+="原密码不能为空!<br/>";
edit=m_ymm.inputText;
}
if(!m_ymm.getValue())
{
msg+="新密码不能为空!<br/>";
if(!msg)
edit=m_ymm.inputText;
}
if(!m_ymm.getValue())
{
msg+="确认新密码不能为空!<br/>";
if(!msg)
edit=m_ymm.inputText;
}
if(msg)
{
$.ligerDialog.warn(msg);
return;
}
if (m_xmm1.getValue() != m_xmm2.getValue())
{
$.ligerDialog.warn("两次密码输入不一样!");
return;
}
$.ajax({
url: "@Url.Action("xgmm")",
type: "post",
dataType: "json",
data: { ymm: m_ymm.getValue(), xmm: m_xmm1.getValue() },
success: function (data) {
$.ligerDialog.closeWaitting();
if(data.State==1)
{
$.ligerDialog.success("修改密码成功!", "成功", function () {
if (window.parent.gb)
window.parent.gb();
});
}
else
{
$.ligerDialog.warn(data.Message);
}
},
error: function (data) {
$.ligerDialog.closeWaitting();
$.ligerDialog.warn(data);
},
beforeSend: function () {
$.ligerDialog.waitting("正在修改请稍后!");
}
});
}
});
});
</script>
}