144 lines
5.1 KiB
Plaintext
144 lines
5.1 KiB
Plaintext
@model WX.CRM.Model.Entity.BAS_INNERUSER
|
|
@{
|
|
ViewBag.Title = "客户管理系统--登录";
|
|
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
}
|
|
|
|
|
|
<style type="text/css">
|
|
.login {
|
|
margin: 80px auto;
|
|
width: 549px;
|
|
height: 440px;
|
|
}
|
|
|
|
.login input {
|
|
height: 20px;
|
|
}
|
|
|
|
.login_top {
|
|
height: 80px;
|
|
width: 549px;
|
|
background: url("../../../Content/Images/Login_top2.jpg") no-repeat;
|
|
}
|
|
|
|
.loginbody {
|
|
padding-top: 80px;
|
|
width: 547px;
|
|
height: 230px;
|
|
background: #E4E9ED;
|
|
border: 1px solid #CACFD3;
|
|
}
|
|
|
|
.control {
|
|
margin-left: 160px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.meg {
|
|
font-size: 12px;
|
|
color: red;
|
|
}
|
|
</style>
|
|
|
|
<div>
|
|
|
|
<form id="loginForm" method="post"
|
|
action="@Url.Action("LogOn", "Account", new { returnUrl = this.ViewBag.ReturnUrl })">
|
|
@using (Html.BeginForm())
|
|
{
|
|
<div class=" login">
|
|
<div class="login_top"></div>
|
|
<div class="loginbody">
|
|
|
|
<div class="control">
|
|
<span>
|
|
@Html.LabelFor(m => m.map_EID)
|
|
</span>
|
|
@Html.TextBoxFor(m => m.map_EID, new { style = "width:160px;" })
|
|
<span>@Html.ValidationMessageFor(m => m.map_EID)</span>
|
|
|
|
</div>
|
|
<div class="control">
|
|
<span>@Html.LabelFor(m => m.map_PASSWORD2)</span>
|
|
@Html.PasswordFor(m => m.map_PASSWORD2, new { style = "width:160px;" })
|
|
<span>@Html.ValidationMessageFor(m => m.map_PASSWORD2)</span>
|
|
</div>
|
|
@if (ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.深海捷移动坐席 ||
|
|
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.深海捷固定坐席 ||
|
|
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.和声 ||
|
|
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.艾讯 ||
|
|
ViewBag.CTI_VER == (int)WX.CRM.Model.Enum.CTI_VER.艾讯new)
|
|
{
|
|
<div class="control">
|
|
<span>@Html.LabelFor(m => m.map_FJH)</span>
|
|
@Html.TextBoxFor(m => m.map_FJH, new { style = "width:150px;" })
|
|
<span>@Html.ValidationMessageFor(m => m.map_FJH)</span>
|
|
</div>
|
|
}
|
|
@if (ViewBag.ShowSnCode != null && ViewBag.ShowSnCode)
|
|
{
|
|
<div class="control" id="divSnCode">
|
|
<span>验证码:</span>
|
|
@Html.TextBoxFor(m => m.map_SnCode, new { style = "width:60px;" })
|
|
<img id="valiCode" style="cursor: pointer;vertical-align:text-bottom" onclick="ShowNewCode(this)" alt="验证码" />
|
|
<span>@Html.ValidationMessageFor(m => m.map_SnCode)</span>
|
|
</div>
|
|
}
|
|
|
|
<div class="control">
|
|
@*<input style="height:10px;line-height:10px;" name="RememberMe" type="checkbox" value="1" checked="checked" /><label>记住密码</label>*@
|
|
<input style="width:50px;height:30px; margin-left:70px;cursor:pointer;" type="submit" value="登录" />
|
|
</div>
|
|
<div style="margin-left: 150px;" class="meg">@this.ViewBag.LogOnError</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</form>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("html").die().live("keydown", function (event) {
|
|
if (event.keyCode == 13) {
|
|
//这里添加要处理的逻辑
|
|
$("#loginForm").submit();
|
|
}
|
|
});
|
|
$("#valiCode").attr("src", "/Account/GetValidateCode?y=" + GetGuid());
|
|
});
|
|
function ShowNewCode(img) {
|
|
$(img).attr("src", "/Account/GetValidateCode?y=" + GetGuid());
|
|
}
|
|
function GetGuid() {
|
|
var s4 = function () {
|
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
};
|
|
return s4() + s4() + s4() + "-" + s4();
|
|
}
|
|
function CHKFJHisLogin(success_function, fail_function)
|
|
{
|
|
var eid = $("#map_EID").val();
|
|
var fjh = $("#map_FJH").val();
|
|
var pwd = $("#map_PASSWORD2").val();
|
|
var isSNCode = $("#divSnCode").length == 0 || $("#map_SnCode").val();
|
|
var rst = true;
|
|
if (eid && fjh && pwd && isSNCode) {
|
|
var url = "/Base/Account/CHKFJHisLogin_BYCTI";
|
|
$.ajax({
|
|
url : url,
|
|
data:{eid:eid,fjh:fjh},
|
|
cache : false,
|
|
async : false,
|
|
type : "POST",
|
|
dataType : 'json'
|
|
}).done(function (rst) {
|
|
//console.log(rst)
|
|
if (!rst.rst) {
|
|
alert("该分机号已被"+rst.eid+"占用")
|
|
}
|
|
});
|
|
}
|
|
return rst;
|
|
}
|
|
</script>
|
|
|