You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
339 lines
18 KiB
339 lines
18 KiB
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default_XG.aspx.cs" Inherits="SCP.default_XG" %>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head runat="server">
|
|
<title>系统登陆</title>
|
|
<link href="res/css/main2.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript">
|
|
// 本页面一定是顶层窗口,不会嵌在IFrame中
|
|
if (top.window != window) {
|
|
top.window.location.href = "../default.aspx";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div style="display:inline-block;width:6px;height:6px;border-radius:50%;background-color:coral;position:absolute;left:66%;top:60px"> </div>
|
|
<div style="display:inline-block;width:6px;height:6px;border-radius:50%;background-color:yellow;position:absolute;left:66%;top:105px"> </div>
|
|
<form id="form1" runat="server">
|
|
|
|
|
|
<div class="login">
|
|
|
|
<div class="factory" style="display:none" >
|
|
<p><%= GetResourceKey(GetFactoryName())%></p>
|
|
</div>
|
|
<div class="scpa" runat="server" id="scp" style="text-align:center ;color:gold; text-align:center;font-size:30px;font-weight:bold">
|
|
|
|
</div>
|
|
|
|
<%-- <p style="position:absolute;left:66%;color:yellow;font-size:50px;top:28px">.<p/>--%>
|
|
|
|
<p id="p_title6" runat="server" style="position:absolute;left:68%;font-size:26px;color:coral;top:25px"><a href="https://get.adobe.com/reader/?loc=cn" target="_blank" title="登录前请下载并安装系统插件" id="p_title5" runat="server" style="color:coral"><%= GetResourceKey("登录前请下载并安装系统插件") %></a></p>
|
|
<p id="p2" runat="server" style="position:absolute;left:68%;font-size:26px;color:coral;top:70px"><a href="https://get.adobe.com/reader/?loc=cn" target="_blank" title="供应商端系统操作指导下载" id="A1" runat="server" style="color:gold"><%= GetResourceKey("供应商端系统操作指导下载") %></a></p>
|
|
<p style="text-align: right; font-size: 38px; color:azure;position: absolute;left:25%;top:16%;" runat="server" id="P1">欢迎使用SCP系统</p>
|
|
<img src="res/images/air-balloon-1.png" style="position:absolute;top:26%;left:7%;width:55%;height:55%;"/>
|
|
<div class="box">
|
|
<div class="input">
|
|
|
|
|
|
<div class="name" runat="server" id="div1" >
|
|
<label runat="server" id="Label1" style="display:none">工厂名称</label>
|
|
<select id="factory" runat="server" style="display:none" onchange="getFactory();" >
|
|
|
|
</select>
|
|
|
|
</div>
|
|
<img src="res/images/air-balloon-2.png" style="width:97%;height:97%;text-align:center"/>
|
|
<img src="res/images/denglu.png" style="width:30%;height:30%;margin-top:5%;margin-left:38%"/>
|
|
<div class="name" runat="server" id="div_1" style="visibility:hidden ;" >
|
|
<label id="lb_name" runat="server"><%= GetResourceKey("姓名") %></label><input type="text" runat="server" class="text" id="textName" placeholder="姓 名" name="textName" tabindex="1">
|
|
</div>
|
|
<div class="name" runat="server" id="div_3" style="display:none" >
|
|
<label id="lb_mobile" runat="server"><%= GetResourceKey("手机号码") %></label><input type="number" runat="server" class="text" id="textMobile" placeholder="输入手机号" maxlength="11" name="textMobile" tabindex="2">
|
|
</div>
|
|
<div class="name" id="div_7">
|
|
<label id="lab1" runat="server" style="font-size:25px;left:11.8%;position: absolute;width:87px;top:37%">账   号:</label><input type="text" runat="server" class="text" id="textUserName" placeholder="" name="textUserName" tabindex="3" style="position: absolute;left:32.4%;height:5.5%;top:35.4%" >
|
|
</div>
|
|
<div class="name" id="div_9"style="display:none" >
|
|
<label > </label>
|
|
</div>
|
|
<div class="name" runat="server" id="div_2" style="visibility:hidden" >
|
|
<label id="lb_Mail" runat="server"><%= GetResourceKey("电子邮件") %></label><input type="email" runat="server" class="text" id="textEmail" placeholder="输入邮箱" name="textEmail" tabindex="4">
|
|
</div>
|
|
<div class="pwd" id="div_8">
|
|
<label runat="server" id="lab2" style="font-size:25px;left:11.8%;top:49.5%;position: absolute;width:87px">密   码:</label><input type="password" runat="server" class="text" id="textPassword" name="textPassword" tabindex="5" onkeydown="keyDown(event)" style="position: absolute;left:32.4%;top:48%;height:5.5%">
|
|
</div>
|
|
<div class="pwd" id="div_20">
|
|
<label runat="server" id="Label2" style="font-size:25px;left:12.1%;top:61.5%;position: absolute;width:87px"><%= GetResourceKey("验证码:") %></label><input runat="server" class="text" id="textyzm" name="textyzm" tabindex="5" onkeydown="keyDown(event)" style="position: absolute;left:32.4%;top:60%;height:5.5%;width:95px">
|
|
<canvas id="c1" width="100" height="30" style="position: absolute; left:58%;top:60%;height:7%;width:110px;border:1px solid black" runat="server" ></canvas>
|
|
</div>
|
|
<input type="text" value="" id="Text1" placeholder="验证码是否正确" runat="server" style="display:none">
|
|
<div class="name" runat="server" id="div_4" style="visibility:hidden" >
|
|
<label id="lb_PwdNew" runat="server"><%= GetResourceKey("新密码") %></label><input type="text" runat="server" class="text" id="textPassword1" placeholder="密码长度必须大于8位" maxlength="8" name="textPassword1" tabindex="6">
|
|
</div>
|
|
<div style="visibility:hidden" runat="server" id="div_5" class="name">
|
|
<label id="lb_PwdConf" runat="server"><%= GetResourceKey("确认新密码") %></label><input type="text" runat="server" class="text" id="textConfim" placeholder="密码长度必须大于8位" maxlength="8" name="textConfim" tabindex="7">
|
|
</div>
|
|
|
|
|
|
<div class="name">
|
|
<div ID="Button2" style="float : right;display:none">
|
|
<input type="button" id="btn_pass" class="submit" runat="server" value="找回密码" style="height: 25px" onclick="javascript: reset_click();">
|
|
</div>
|
|
<div ID="Button4" style="float : right; position:absolute;top:75%;left:10%">
|
|
<asp:Button ID="btn_Login" class ="submit" runat="server" Text=" 登 录 " style="background-color:royalblue;font-size:30px;height:52%" OnClick="btnSubmit_Click" />
|
|
</div>
|
|
<div ID="Button7" style="float : right; position:absolute;top:75%;left:50%">
|
|
<asp:Button ID="btn_cz" class ="submit" runat="server" Text=" 重 置 " style="background-color:royalblue;font-size:30px;height:52%" OnClick="btnCZ_Click" />
|
|
</div>
|
|
<a id="Button14" runat="server" href="#" onclick="javascript: reset_click()" style="position:absolute;top:88%;left:75%;font-size:20px;color:coral">忘记密码</a><br>
|
|
<div ID="Button3" style="visibility:collapse;float : right;">
|
|
<asp:Button ID="btn_MailLogin" style="height:25px" class ="submit" runat="server" Text="发送邮件" OnClick="btnResetPassWord_Click"/>
|
|
</div>
|
|
<div ID="Button1" style=" visibility:collapse;float:right;">
|
|
<input id="btn_back" type="button" class="submit" style="height: 25px" value="返回" runat="server" onclick="back_click();">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tip"></div>
|
|
</div>
|
|
|
|
</div>
|
|
<p style="text-align: right; font-size: 28px; color:azure;position: absolute;top:87%;left:29%" runat="server" id="P3">适用浏览器: 谷歌浏览器,不支持IE10及以下浏览器</p>
|
|
<div class="air-balloon ab-1 png"></div>
|
|
<div class="air-balloon ab-2 png"></div>
|
|
<div class="footer">
|
|
<input type="text" runat="server" id="factoryValue" style="display:none" >
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<f:PageManager ID="PageManager1" runat="server"></f:PageManager>
|
|
|
|
|
|
</form>
|
|
<script type="text/javascript" src="res/js/jQuery1.js"></script>
|
|
<script type="text/javascript" src="res/js/fun.base.js"></script>
|
|
<%--<script type="text/javascript" src="res/js/script.js"></script>--%>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
// 存放随机的验证码
|
|
var showNum = []
|
|
|
|
draw(showNum)
|
|
|
|
$("#c1").click(function () {
|
|
draw(showNum)
|
|
})
|
|
$("#btn_Login").click(function () {
|
|
var s = $("#textyzm").val().toLowerCase()
|
|
var s1 = showNum.join("")
|
|
if (s != s1) {
|
|
$("#Text1").val('false')
|
|
alert("验证码错误")
|
|
} else {
|
|
$("#Text1").val('')
|
|
}
|
|
draw(showNum)
|
|
})
|
|
|
|
|
|
// 封装一个把随机验证码放在画布上
|
|
function draw(showNum) {
|
|
// 获取canvas
|
|
var canvas = $("#c1")
|
|
var ctx = canvas[0].getContext("2d")
|
|
// 获取画布的宽高
|
|
var canvas_width = canvas.width()
|
|
var canvas_height = canvas.height()
|
|
// 清空之前绘制的内容
|
|
// 0,0清空的起始坐标
|
|
// 矩形的宽高
|
|
ctx.clearRect(0, 0, canvas_width, canvas_height)
|
|
// 开始绘制
|
|
var scode = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9,"
|
|
var arrCode = scode.split(",")
|
|
var arrLength = arrCode.length
|
|
for (var i = 0; i < 4; i++) {
|
|
var index = Math.floor(Math.random() * arrCode.length)
|
|
var txt = arrCode[index]//随机一个字符
|
|
showNum[i] = txt.toLowerCase()//转化为小写存入验证码数组
|
|
// 开始控制字符的绘制位置
|
|
var x = 10 + 20 * i //每一个验证码绘制的起始点x坐标
|
|
var y = 20 + Math.random() * 8// 起始点y坐标
|
|
|
|
ctx.font = "bold 20px 微软雅黑"
|
|
// 开始旋转字符
|
|
var deg = Math.random * -0.5
|
|
// canvas 要实现绘制内容具有倾斜的效果,必须先平移,目的是把旋转点移动到绘制内容的地方
|
|
ctx.translate(x, y)
|
|
ctx.rotate(deg)
|
|
// 设置绘制的随机颜色
|
|
ctx.fillStyle = randomColor()
|
|
ctx.fillText(txt, 0, 0)
|
|
|
|
// 把canvas复原
|
|
ctx.rotate(-deg)
|
|
ctx.translate(-x, -y)
|
|
|
|
}
|
|
for (var i = 0; i < 30; i++) {
|
|
if (i < 5) {
|
|
// 绘制线
|
|
ctx.strokeStyle = randomColor()
|
|
ctx.beginPath()
|
|
ctx.moveTo(Math.random() * canvas_width, Math.random() * canvas_height)
|
|
ctx.lineTo(Math.random() * canvas_width, Math.random() * canvas_height)
|
|
ctx.stroke()
|
|
}
|
|
// 绘制点
|
|
ctx.strokeStyle = randomColor()
|
|
ctx.beginPath()
|
|
var x = Math.random() * canvas_width
|
|
var y = Math.random() * canvas_height
|
|
ctx.moveTo(x, y)
|
|
ctx.lineTo(x + 1, y + 1)
|
|
ctx.stroke()
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// 随机颜色
|
|
function randomColor() {
|
|
var r = Math.floor(Math.random() * 256)
|
|
var g = Math.floor(Math.random() * 256)
|
|
var b = Math.floor(Math.random() * 256)
|
|
return `rgb(${r},${g},${b})`
|
|
|
|
}
|
|
|
|
})
|
|
var _factoryValue = '<%= factoryValue.ClientID %>';
|
|
window.onload = function () {
|
|
var obj = document.getElementById('factory');
|
|
|
|
for (var i = 0; obj.options.length; i++) {
|
|
if ('U32' == obj.options[i].value) {
|
|
obj.options[i].selected = true;
|
|
_factory = document.getElementById(_factoryValue);
|
|
_factory.value = 'U32';
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function keyDown(e) {
|
|
var ev = window.event || e;
|
|
if (ev.keyCode == 13) {
|
|
document.getElementById("btn_Login").focus();
|
|
}
|
|
}
|
|
function getFactory() {
|
|
_factory = document.getElementById(_factoryValue);
|
|
var obj = document.getElementById('factory');
|
|
var index = obj.selectedIndex; //序号,取当前选中选项的序号
|
|
var val = obj.options[index].value;
|
|
_factory.value = val;
|
|
|
|
}
|
|
|
|
function reset_click() {
|
|
//document.getElementById('div_1').style.visibility = "hidden";
|
|
//document.getElementById('div_2').style.visibility = "visible";
|
|
//document.getElementById('div_3').style.display = "none";
|
|
//document.getElementById('div_4').style.visibility = "hidden";
|
|
//document.getElementById('div_5').style.visibility = "hidden";
|
|
////document.getElementById('div_6').style.display = "none";
|
|
//document.getElementById('div_7').style.visibility = "visible";
|
|
//document.getElementById('div_8').style.display = "none";
|
|
//document.getElementById('div_9').style.display = "block";
|
|
//document.getElementById('Button1').style.visibility = "visible";
|
|
//document.getElementById('Button2').style.display = "none";
|
|
//document.getElementById('Button3').style.visibility = "visible";
|
|
//document.getElementById('Button4').style.display = "none";
|
|
|
|
}
|
|
|
|
function back_click() {
|
|
document.getElementById('div_1').style.visibility = "hidden";
|
|
document.getElementById('div_2').style.visibility = "hidden";
|
|
document.getElementById('div_3').style.display = "none";
|
|
document.getElementById('div_4').style.visibility = "hidden";
|
|
document.getElementById('div_5').style.visibility = "hidden";
|
|
// document.getElementById('div_6').style.display = "none";
|
|
document.getElementById('div_8').style.display = "block";
|
|
document.getElementById('div_9').style.display = "none";
|
|
document.getElementById('Button1').style.visibility = "hidden";
|
|
document.getElementById('Button3').style.visibility = "hidden";
|
|
document.getElementById('Button4').style.display = "block";
|
|
document.getElementById('Button2').style.display = "block";
|
|
|
|
}
|
|
|
|
|
|
|
|
//function on_change() {
|
|
// var objS = document.getElementById("textLANGUAGE");
|
|
// var value = objS.options[objS.selectedIndex].value;
|
|
// if (value == "CH") {
|
|
// $("#lab1").text("账号");
|
|
// $("#lab2").text("密码");
|
|
// document.getElementById("btn_Login").value = "登录";
|
|
// document.getElementById("btn_MailLogin").value = "邮件登录";
|
|
// document.getElementById("btn_back").value = "退回";
|
|
// document.getElementById("btn_pass").value = "找回密码"
|
|
// $("#lb_name").text("姓名");
|
|
// $("#lb_mobile").text("手机号");
|
|
// $("#lb_Mail").text("邮件");
|
|
// $("#lb_PwdNew").text("新密码");
|
|
// $("#lb_PwdConf").text("确认新密码");
|
|
// $("#p_content").text("适用浏览器:360、FireFox、搜狗、谷歌等. 不支持IE10及以下浏览器");
|
|
// $("#p_title1").text("①供应商操作视频下载");
|
|
// $("#p_title2").text("②物料计划员视频下载");
|
|
// $("#p_title3").text("③供应商请先安装报表插件下载");
|
|
// $("#p_title4").text("视频下载:");
|
|
|
|
// } else if (value == "EN") {
|
|
// $("#lab1").text("Account");
|
|
// $("#lab2").text("Password");
|
|
// document.getElementById("btn_Login").value = "Login";
|
|
// document.getElementById("btn_MailLogin").valuet = "Mail Login";
|
|
// document.getElementById("btn_back").value = "Back";
|
|
// document.getElementById("btn_pass").value = "Forgot Password"
|
|
// $("#lb_name").text("Name");
|
|
// $("#lb_mobile").text("Mobile");
|
|
// $("#lb_Mail").text("E-Mail");
|
|
// $("#lb_PwdNew").text("NewPassowd");
|
|
// $("#lb_PwdConf").text("Confirm");
|
|
// $("#p_content").text("Applicable browsers: 360, FireFox, Sogou, Google and so on. Do not support IE10 and the following browsers");
|
|
// $("#p_title1").text("①Video download of suppliers");
|
|
// $("#p_title2").text("②Video download of material planner");
|
|
// $("#p_title3").text("③suppliers first install the report plug-in to download");
|
|
// $("#p_title4").text("Teaching video download:");
|
|
|
|
|
|
|
|
// } else if (value == "DE") {
|
|
// document.getElementById("lab1").innerText = "Konto";
|
|
// document.getElementById("lab2").innerText = "Passwort";
|
|
// document.getElementById("btn_Login").value = "Login";
|
|
// document.getElementById("btn_MailLogin").value = "Email Login";
|
|
// document.getElementById("btn_pass").value = "Passwort vergessen "
|
|
// document.getElementById("btn_back").value = "Zurück";
|
|
// $("#lb_Mail").text("E-Mail");
|
|
// $("#lb_PwdNew").text("NeUe passwort");
|
|
// $("#lb_PwdConf").text("Passwort bestätigen");
|
|
// $("#p_content").text("Für den browser: 360, Firefox, sogou, Google und andere IE10 folgenden browser nicht unterstützt und.");
|
|
// $("#p_title1").text("①Die anbieter von video - Download");
|
|
// $("#p_title2").text("②Die planer der video - Download");
|
|
// $("#p_title3").text("③Bitte installieren sie den aussagen der anbieter plug - in herunterladen");
|
|
// $("#p_title4").text("Des video - Download:");
|
|
// }
|
|
|
|
//}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|