| | |
| | | <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-flex-row"> |
| | | <div class="ax-form-con"> |
| | | <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></div> |
| | | <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> |
| | | </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> |
| | | </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 = ''; |
| | |
| | | loging(); |
| | | }) |
| | | |
| | | form.on("submit(LAY-user-loginICCard-submit)", function (obj) { |
| | | loginICCard(); |
| | | }) |
| | | //音频 |
| | | form.on("submit(LAY-user-login-yp)", function (obj) { |
| | | playSound(); |
| | |
| | | } |
| | | }) |
| | | |
| | | $("#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' |
| | | } |
| | | |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(get_MessageError(result.Message, $("#HTranSlate").val()), { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (result) { |
| | | layer.closeAll("loading"); |
| | | 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 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //刷卡登录 |
| | | function loginICCard() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | title: 'IC刷卡', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['30%', '30%'], |
| | | maxmin: true, |
| | | content: '../user/login_ICCard.html', |
| | | end: function () { |
| | | if (LoginData.data[0].Czybm != undefined && LoginData.data[0].Czybm != "") { |
| | | result = LoginData; |
| | | sessionStorage["HCloudUserName"] = result.data[0].HCloudUserName;//金蝶云账号 |
| | | sessionStorage["HCloudUserPsd"] = result.data[0].HCloudUserPsd; |
| | | sessionStorage["HMaker"] = result.data[0].Czymc; |
| | | 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["HEmpNumber"] = result.data[0].HEmpNumber; |
| | | sessionStorage["HEmpName"] = result.data[0].HEmpName; |
| | | 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["HCheckEmpID"] = result.data[0].HCheckEmpID; |
| | | sessionStorage["HCheckEmpName"] = result.data[0].HCheckEmpName; |
| | | 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' |
| | |
| | | } |
| | | get_WriteConfigFile(); |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(result.Message, { 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('获取采购订单出现异常', { icon: 2, time: 2000 }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | function playSound() { |
| | | var audio = document.getElementById("cs"); |
| | |
| | | } |
| | | |
| | | //获取基础信息 |
| | | 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); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | function getDataByICCard(obj) { |
| | | LoginData = obj; |
| | | } |
| | | </script> |
| | | |
| | | </body> |
| | | |
| | | </html> |