| | |
| | | <link href="../../layuiadmin/ax/ax-response.css" rel="stylesheet" /> |
| | | <link href="../../layuiadmin/ax/ax.css" rel="stylesheet" /> |
| | | <link href="../../layuiadmin/ax/main.css" rel="stylesheet" /> |
| | | |
| | | <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"> |
| | |
| | | |
| | | <ul class="ax-row ax-tab-nav ax-menu-tab"> |
| | | <a href="###" class="ax-item ax-col" style="font-size: 20px;" id="HLogoLabel">智云迈思L-MES</a> |
| | | <!--<a href="###" class="ax-item">注册新用户</a>--> |
| | | <a class="ax-item FY_BT" id="Hlanguage" >语言</a> |
| | | <select id="HTranSlate" style="width: 18%; margin-right: 1%; padding-left: 1px; font-size: 13px;"> |
| | | <option value="1" selected>中文</option> |
| | | <option value="2">Eeglish</option> |
| | | <option value="3">Español</option> |
| | | </select> |
| | | <!--<li class="ax-col"></li>--> |
| | | </ul> |
| | | |
| | |
| | | <div class="ax-form-input"> |
| | | <span class="ax-pos-left" style="width: 2.4rem;"><i class="ax-iconfont ax-icon-me-f"></i></span> |
| | | <input name="LAY-user-login-username" value="" placeholder="输入登录名称" type="text" id="LAY-user-login-username"> |
| | | <span class="ax-pos-right" ><a href="###" class="ax-iconfont ax-icon-close ax-val-none"></a></span> |
| | | <span class="ax-pos-right"><a href="###" class="ax-iconfont ax-icon-close ax-val-none"></a></span> |
| | | </div> |
| | | <button type="button" lay-submit="" class="layui-btn layui-btn-sm" id="LAY-user-loginICCard-submit" name="LAY-user-loginICCard-submit" lay-filter="LAY-user-loginICCard-submit" style="position: absolute;margin-top:-3.5rem;margin-left:36rem"><i class="layui-icon layui-icon-layer"></i>刷卡</button> |
| | | <button type="button" lay-submit="" class="layui-btn layui-btn-sm" id="LAY-user-loginICCard-submit" name="LAY-user-loginICCard-submit" lay-filter="LAY-user-loginICCard-submit" style="position: absolute;margin-top:-3.5rem;margin-left:36rem"><i class="layui-icon layui-icon-layer" style="width:20px"></i></button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="ax-form-group"> |
| | | <div class="ax-flex-row"> |
| | | <div class="ax-flex-block"> |
| | | <div class="ax-form-input"><button type="button" lay-submit="" class="ax-btn ax-primary ax-full" id="LAY-user-login-submit" name="LAY-user-login-submit" lay-filter="LAY-user-login-submit">登录</button></div> |
| | | <div class="ax-form-input"><button type="button" lay-submit="" class="ax-btn ax-primary ax-full FY_BT" id="LAY-user-login-submit" name="LAY-user-login-submit" lay-filter="LAY-user-login-submit">登录</button></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/zgqCustom/zgqCustom.js" type="text/javascript"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util; |
| | | |
| | | var HModName = "login"; |
| | | //获取数据库名 |
| | | $.ajax({ |
| | | type: "get", |
| | |
| | | } |
| | | }) |
| | | |
| | | var login_data = localStorage.getItem("data"); |
| | | var login_data2 = []; |
| | | if (login_data != null) { |
| | | login_data2 = JSON.parse(login_data); |
| | | } |
| | | |
| | | //获取基础信息 |
| | | getBaseInfo(); |
| | | getBaseInfo(login_data2.HTranSlate); |
| | | |
| | | |
| | | if (login_data == null) { |
| | | initFunction(1,"login", 1); |
| | | } else { |
| | | initFunction(1,"login", login_data2.HTranSlate); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //获取登录页组织列 |
| | | var Organization = ''; |
| | |
| | | } |
| | | }) |
| | | |
| | | $("#HTranSlate").change(function () { |
| | | var select = $("#HTranSlate").val(); |
| | | getBaseInfo(select); |
| | | initFunction(1,HModName, select); |
| | | //sessionStorage["HTranSlate"] = select; |
| | | }) |
| | | |
| | | //读取配置文件 |
| | | function get_ReadConfigFile() { |
| | | //获取本地存储的数据 |
| | |
| | | var data2 = JSON.parse(data); |
| | | $("#LAY-user-login-username").val(data2["UserID"]); |
| | | $("#Organization").val(data2["OrgID"]); |
| | | $("#HTranSlate").val(data2["HTranSlate"]); |
| | | form.render('select'); |
| | | } |
| | | } |
| | |
| | | var data = { |
| | | UserID: sessionStorage["Czybm"] |
| | | , OrgID: sessionStorage["OrganizationID"] |
| | | , HTranSlate: sessionStorage["HTranSlate"] |
| | | } |
| | | //本地存储 |
| | | localStorage.setItem("data", JSON.stringify(data)); |
| | |
| | | function loging() { |
| | | if ($("#Organization").val() == 0) { |
| | | //playSound(); |
| | | layer.msg("请选择组织!"); |
| | | layer.msg(get_MessageError("[0000-1-071]请选择组织!", $("#HTranSlate").val())); |
| | | return; |
| | | } |
| | | var UserName = $("#LAY-user-login-username").val(); |
| | |
| | | data: { "UserName": UserName, "PassWord": PassWord, "HOrgName": $("#Organization").val() }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.msg(get_MessageError(result.Message, $("#HTranSlate").val()), { icon: 1 }); |
| | | //sessionStorage["HUserName"] = user.username; |
| | | sessionStorage["HCloudUserName"] = result.data[0].HCloudUserName;//金蝶云账号 |
| | | sessionStorage["HCloudUserPsd"] = result.data[0].HCloudUserPsd; |
| | |
| | | sessionStorage["login"] = "login"; |
| | | sessionStorage["OrganizationID"] = $("#Organization").val(); |
| | | sessionStorage["Organization"] = $("#Organization option:selected").text(); |
| | | sessionStorage["HTranSlate"] = $("#HTranSlate option:selected").val(); |
| | | //sessionStorage["IP"] = System.Configuration.ConfigurationSettings.AppSettings("name"); |
| | | get_WriteConfigFile(); |
| | | if (!judgeMorPCflag) {//移动端 |
| | | window.location.href = '../../views/index_Mobile.html' |
| | | } else {//PC端 |
| | | window.location.href = '../../views/indexMenu.html' |
| | | } |
| | | get_WriteConfigFile(); |
| | | |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(result.Message, { icon: 5 }); |
| | | layer.msg(get_MessageError(result.Message, $("#HTranSlate").val()), { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (result) { |
| | | layer.closeAll("loading"); |
| | | layer.msg("接口请求失败!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | layer.msg(get_MessageError("[0000-1-002]接口请求失败!", $("#HTranSlate").val()), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', $("#HTranSlate").val())], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨提示", $("#HTranSlate").val()) }); |
| | | //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 }); |
| | | } |
| | | }) |
| | |
| | | sessionStorage["login"] = "login"; |
| | | sessionStorage["OrganizationID"] = $("#Organization").val(); |
| | | sessionStorage["Organization"] = $("#Organization option:selected").text(); |
| | | sessionStorage["HTranSlate"] = $("#HTranSlate option:selected").val(); |
| | | //sessionStorage["IP"] = System.Configuration.ConfigurationSettings.AppSettings("name"); |
| | | if (!judgeMorPCflag) {//移动端 |
| | | window.location.href = '../../views/index_Mobile.html' |
| | |
| | | } |
| | | |
| | | //获取基础信息 |
| | | function getBaseInfo() { |
| | | function getBaseInfo(HTranSlate) { |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/BaseInfo", |
| | | async: false, |
| | | data: {}, |
| | | success: function (res) { |
| | | //查询成功 |
| | | if (res.count == 1) { |
| | | var data = res.data[0]; |
| | | console.log(data); |
| | | |
| | | //判断当前登录的语言类型 |
| | | var HLogoLabel = ""; |
| | | var HMenuLabel = ""; |
| | | if (HTranSlate == "1" || (login_data2.length == 0 && HTranSlate == undefined)) { |
| | | HLogoLabel = data.HLogoLabel; |
| | | HMenuLabel = data.HMenuLabel; |
| | | } else if (HTranSlate == "2") { |
| | | HLogoLabel = data.HLogoTranslationText_English; |
| | | HMenuLabel = data.HMenuTranslationText_English; |
| | | } else if (HTranSlate == "3") { |
| | | HLogoLabel = data.HLogoTranslationText_Spain; |
| | | HMenuLabel = data.HMenuTranslationText_Spain; |
| | | } |
| | | |
| | | sessionStorage["HCusName"] = data.HCusName; |
| | | sessionStorage["HLogoLabel"] = data.HLogoLabel; |
| | | sessionStorage["HMenuLabel"] = data.HMenuLabel; |
| | | $("#HLogoLabel").text(data.HLogoLabel); |
| | | sessionStorage["HLogoLabel"] = HLogoLabel; |
| | | sessionStorage["HMenuLabel"] = HMenuLabel; |
| | | $("#HLogoLabel").text(HLogoLabel); |
| | | } |
| | | } |
| | | }) |
| | |
| | | LoginData = obj; |
| | | } |
| | | </script> |
| | | |
| | | |
| | | </body> |
| | | |
| | | </html> |