| | |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/login.css" media="all"> |
| | | <style> |
| | | .layadmin-user-login-body .layui-form-item .layui-input { |
| | | color: blue; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;"> |
| | | <div class="layadmin-user-login-main"> |
| | | <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;background-image:url(../userfiles/images/2.jpg);background-size: 100%;"> |
| | | <div class="layadmin-user-login-main" style="margin: -5.8% auto;"> |
| | | <div class="layadmin-user-login-box layadmin-user-login-header"> |
| | | <h2>L-MES</h2> |
| | | <p>WMS条码系统</p> |
| | | <h2 style="color:white;">L-MES</h2> |
| | | <p style="color: white;">智云迈思LMES管理系统</p> |
| | | </div> |
| | | <div class="layadmin-user-login-box layadmin-user-login-body layui-form"> |
| | | <div class="layui-form-item"> |
| | | <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label> |
| | | <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名" class="layui-input"> |
| | | <label class="layui-form-label"></label> |
| | | <div class="layui-input-inline" style="width: 100%;"> |
| | | <select name="Organization" id="Organization" lay-verify="required" lay-search class="layui-input"> |
| | | <!--动态渲染组织--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label> |
| | | <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input"> |
| | | <label class="layadmin-user-login-icon layui-icon layui-icon-username login-input" for="LAY-user-login-password"></label> |
| | | <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名" class="layui-input" style="background-color:transparent;" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layadmin-user-login-icon layui-icon layui-icon-password login-input" for="LAY-user-login-password"></label> |
| | | <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input" style="background-color:transparent;" autocomplete="off"> |
| | | </div> |
| | | <!--<div class="layui-form-item" style="margin-bottom: 20px;"> |
| | | <input type="checkbox" name="remember" lay-skin="primary" title="记住密码"> |
| | | <a href="forget.html" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码?</a> |
| | | </div>--> |
| | | <input type="checkbox" name="remember" lay-skin="primary" title="记住密码"> |
| | | <a href="forget.html" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码?</a> |
| | | </div>--> |
| | | <div class="layui-form-item"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-btn-fluid" id="LAY-user-login-submit" name="LAY-user-login-submit" lay-filter="LAY-user-login-submit">登 入</button> |
| | | </div> |
| | |
| | | |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js" type="text/javascript"></script> |
| | | |
| | | <script> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | |
| | | } |
| | | }) |
| | | |
| | | //获取登录页组织列 |
| | | var Organization = '<option value="" style="color:red;">组织</option>'; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#Organization").append(Organization); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | |
| | | //form.render(); |
| | | |
| | | //判断用户是移动端还是PC端 |
| | |
| | | |
| | | //提交 |
| | | form.on("submit(LAY-user-login-submit)", function (obj) { |
| | | var user = obj.field; |
| | | layer.load(3) |
| | | //if (event.keyCode == 13) { |
| | | loging(); |
| | | }) |
| | | |
| | | //密码框回车执行登录 |
| | | $('#LAY-user-login-password').on('keydown', function (e) { |
| | | if (e.keyCode == 13) { |
| | | loging(); |
| | | } |
| | | }); |
| | | |
| | | //用户名框回车光标移到密码框 |
| | | $('#LAY-user-login-username').on('keydown', function (e) { |
| | | if (e.keyCode == 13) { |
| | | $("#LAY-user-login-password").focus(); |
| | | } |
| | | }) |
| | | |
| | | //登录 |
| | | function loging() { |
| | | var UserName = $("#LAY-user-login-username").val(); |
| | | var PassWord = $("#LAY-user-login-password").val(); |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "get", |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetUser", |
| | | url: GetWEBURL() + "/Web/GetUser", |
| | | data: { "UserName": user.username, "PassWord": user.password }, |
| | | data: { "UserName": UserName, "PassWord": PassWord }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | sessionStorage["HProcName"] = result.data[0].HProcName; |
| | | sessionStorage["HProcID"] = result.data[0].HProcID; |
| | | sessionStorage["login"] = "login"; |
| | | sessionStorage["OrganizationID"] = $("#Organization").val(); |
| | | sessionStorage["Organization"] = $("#Organization option:selected").text(); |
| | | //sessionStorage["IP"] = System.Configuration.ConfigurationSettings.AppSettings("name"); |
| | | if (!judgeMorPCflag) {//移动端 |
| | | window.location.href = '../../views/index_Mobile.html' |
| | |
| | | //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 }); |
| | | } |
| | | }) |
| | | //} |
| | | }) |
| | | |
| | | //密码框回车执行登录 |
| | | $('#LAY-user-login-password').on('keydown', function (e) { |
| | | if (e.keyCode == 13) { |
| | | var UserName = $("#LAY-user-login-username").val(); |
| | | var PassWord = $("#LAY-user-login-password").val(); |
| | | layer.load(3); |
| | | $.ajax({ |
| | | type: "get", |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetUser", |
| | | url: GetWEBURL() + "/Web/GetUser", |
| | | data: { "UserName": UserName, "PassWord": PassWord }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | sessionStorage["HUserName"] = result.data[0].Czymc;; |
| | | sessionStorage["HBillerID"] = result.data[0].HK3UserID; |
| | | sessionStorage["SourceFlag"] = false; |
| | | sessionStorage["HKeeperID"] = result.data[0].HKeeperID; |
| | | sessionStorage["HKeeper"] = result.data[0].HKeeper; |
| | | sessionStorage["HSecManagerID"] = result.data[0].HSecManagerID; |
| | | sessionStorage["HSecManager"] = result.data[0].HSecManager; |
| | | sessionStorage["HSellManID"] = result.data[0].HSellManID; |
| | | sessionStorage["HSellMan"] = result.data[0].HSellMan; |
| | | sessionStorage["HDeptID"] = result.data[0].HDeptID; |
| | | sessionStorage["HDept"] = result.data[0].HDept; |
| | | sessionStorage["HWHID"] = result.data[0].HWhID; |
| | | sessionStorage["HWHName"] = result.data[0].HWHName; |
| | | sessionStorage["HSPID"] = result.data[0].HSPID; |
| | | sessionStorage["HSPName"] = result.data[0].HSPName; |
| | | sessionStorage["HSupID"] = result.data[0].HSupID; |
| | | sessionStorage["HSupName"] = result.data[0].HSupName; |
| | | sessionStorage["Czmm"] = result.data[0].Czmm; |
| | | sessionStorage["Czybm"] = result.data[0].Czybm; |
| | | sessionStorage["HEmpID"] = result.data[0].HEmpID; |
| | | sessionStorage["HGroup"] = result.data[0].HGroup; |
| | | sessionStorage["HGroupID"] = result.data[0].HGroupID; |
| | | sessionStorage["HProc"] = result.data[0].HProc; |
| | | sessionStorage["HProcNo"] = result.data[0].HProcNo; |
| | | sessionStorage["HSource"] = result.data[0].HSource; |
| | | sessionStorage["HSourceID"] = result.data[0].HSourceID; |
| | | sessionStorage["HWorkCenter"] = result.data[0].HWorkCenter; |
| | | sessionStorage["HWorkCenterID"] = result.data[0].HWorkCenterID; |
| | | sessionStorage["HProcName"] = result.data[0].HProcName; |
| | | sessionStorage["HProcID"] = result.data[0].HProcID; |
| | | sessionStorage["login"] = "login"; |
| | | |
| | | //sessionStorage["IP"] = System.Configuration.ConfigurationSettings.AppSettings("name"); |
| | | |
| | | window.location.href = '../../views/index.html' |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(result.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | //用户名框回车光标移到密码框 |
| | | $('#LAY-user-login-username').on('keydown', function (e) { |
| | | if (e.keyCode == 13) { |
| | | $("#LAY-user-login-password").focus(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | }); |