Merge remote-tracking branch 'origin/master'
commit
8e238acf95
10
README.md
10
README.md
|
@ -1,21 +1,21 @@
|
|||
|
||||
JEEWMSQQ交流群:335607153 有任何问题可以加群交流
|
||||
JEEWMSQQ交流群:335607153 有任何问题可以加群交流 基于JEECG-BOOT开发的前后端分离版本于20221111日发布,届时欢迎大家多多提意见
|
||||
**智能制造产品JEEMES已经开源** (https://gitee.com/erzhongxmu/jeemes) 欢迎大家STAR
|
||||
|
||||
测试系统地址 http://47.113.229.131:9080/wms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
||||
测试系统地址 http://47.113.229.131:9080/jeewms 用户名:test 密码:123456 本地启动的用户名:admin 密码:llg123
|
||||
android app也已经开源,近期更新会比较频繁 app开源地址 https://gitee.com/erzhongxmu/JeeWMSapp-uni
|
||||
大家看到了,star一下,谢谢,本团队会持续更新,一直开源!
|
||||
欢迎喜欢的朋友一起来优化功能。
|
||||
|
||||
开源不易,如果大家需要购买华为云可以通过我们的专属链接,优惠多多 [华为云服务器优惠购买](https://account.huaweicloud.com/obmgr/invitation/invitation.html?bpName=0000000100000002F529029E50A53299E1C24B9DC20691B285756AA52DA030F9E7013E8FF7E22C3EFF074BF9586E43C07842F8F96D38EC45878383D1D406B2F7341FC7D6635CED56&inviteCode=0000000100000002FC491B524CF3FDCE52F12DFD3BB98C8AB2DD5D05BA2CCD464D69E4293D91369A&bindType=1&isDefault=1)
|
||||
|
||||
一、项目简介:
|
||||
|
||||
jeewms在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
||||
JeeWMS在经过多家公司上线运行后,为了降低物流仓储企业的信息化成本,决定全面开源
|
||||
此产品。针对有特殊信息化需求的企业,提供高性价比的实施服务。
|
||||
|
||||
产品特点:
|
||||
1、适用范围:第三方物流仓储企业,冷链仓库,自营仓储等。
|
||||
2、技术特点:基于JAVA的WEB后台,基于ANDROID开发的PDA系统。
|
||||
2、技术特点:基于JAVA的WEB后台,基于UNIAPP开发的PDA系统。
|
||||
3、功能特点:涵盖订单管理系统(OMS),仓储管理系统(WMS),计费管理系统(BMS),现场作业系统(RF),第三方接口模块
|
||||
4、接口支持:已经对接:SAP ECC,SAP HANA 数据库,用友U8,百胜E3,UAS。
|
||||
|
||||
|
|
|
@ -1,141 +1,160 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum" %>
|
||||
<%@include file="/context/mytags.jsp" %>
|
||||
<%
|
||||
session.setAttribute("lang","zh-cn");
|
||||
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
||||
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
|
||||
session.setAttribute("lang", "zh-cn");
|
||||
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
||||
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta charset="utf-8" />
|
||||
<title><t:mutiLang langKey="jeect.platform"/></title>
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
||||
<!-- bootstrap & fontawesome -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="plug-in/ace/css/font-awesome.css" />
|
||||
<link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
|
||||
<!-- text fonts -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-fonts.css" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta charset="utf-8"/>
|
||||
<title><t:mutiLang langKey="jeect.platform"/></title>
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
|
||||
<!-- bootstrap & fontawesome -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/bootstrap.css"/>
|
||||
<link rel="stylesheet" href="plug-in/ace/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
|
||||
<!-- text fonts -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-fonts.css"/>
|
||||
|
||||
<link rel="stylesheet" href="plug-in/ace/css/jquery-ui.css" />
|
||||
<!-- ace styles -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-part2.css" class="ace-main-stylesheet" />
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/jquery-ui.css"/>
|
||||
<!-- ace styles -->
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace.css" class="ace-main-stylesheet" id="main-ace-style"/>
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-part2.css" class="ace-main-stylesheet"/>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-ie.css" />
|
||||
<![endif]-->
|
||||
<!-- ace settings handler -->
|
||||
<script src="plug-in/ace/js/ace-extra.js"></script>
|
||||
<!--[if lte IE 9]>
|
||||
<link rel="stylesheet" href="plug-in/ace/css/ace-ie.css"/>
|
||||
<![endif]-->
|
||||
<!-- ace settings handler -->
|
||||
<script src="plug-in/ace/js/ace-extra.js"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<script src="plug-in/ace/js/html5shiv.js"></script>
|
||||
<script src="plug-in/ace/js/respond.js"></script>
|
||||
<![endif]-->
|
||||
<!--[if lte IE 8]>
|
||||
<script src="plug-in/ace/js/html5shiv.js"></script>
|
||||
<script src="plug-in/ace/js/respond.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="login-layout light-login">
|
||||
<div class="main-container">
|
||||
<div class="main-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="login-container">
|
||||
<div class="center">
|
||||
<h1 id="id-text2" class="grey">
|
||||
<!-- <i class="ace-icon fa fa-leaf green"></i> -->
|
||||
<t:mutiLang langKey="com.sysname"/>
|
||||
</h1>
|
||||
<!-- <h4 class="blue" id="id-company-text">www.zzjee.org</h4> -->
|
||||
</div>
|
||||
<div class="space-6"></div>
|
||||
<div class="position-relative">
|
||||
<div id="login-box" class="login-box visible widget-box no-border">
|
||||
<div class="widget-body">
|
||||
<form id="loinForm" class="form-horizontal" check="loginController.do?checkuser" role="form" action="loginController.do?login" method="post">
|
||||
<div class="widget-main">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert" id="errMsgContiner">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<div id="showErrMsg"></div>
|
||||
</div>
|
||||
<h4 class="header blue lighter bigger">
|
||||
<i class="ace-icon fa fa-coffee green"></i>
|
||||
用户登录
|
||||
</h4>
|
||||
<div class="space-6"></div>
|
||||
<label class="block clearfix">
|
||||
<div class="main-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="login-container">
|
||||
<div class="center">
|
||||
<h1 id="id-text2" class="grey">
|
||||
<!-- <i class="ace-icon fa fa-leaf green"></i> -->
|
||||
<t:mutiLang langKey="com.sysname"/>
|
||||
</h1>
|
||||
<!-- <h4 class="blue" id="id-company-text">www.zzjee.org</h4> -->
|
||||
</div>
|
||||
<div class="space-6"></div>
|
||||
<div class="position-relative">
|
||||
<div id="login-box" class="login-box visible widget-box no-border">
|
||||
<div class="widget-body">
|
||||
<form id="loinForm" class="form-horizontal" check="loginController.do?checkuser"
|
||||
role="form" action="loginController.do?login" method="post">
|
||||
<div class="widget-main">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert"
|
||||
id="errMsgContiner">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<div id="showErrMsg"></div>
|
||||
</div>
|
||||
<h4 class="header blue lighter bigger">
|
||||
<i class="ace-icon fa fa-coffee green"></i>
|
||||
<t:mutiLang langKey="login.info"/>
|
||||
|
||||
|
||||
</h4>
|
||||
<div class="space-6"></div>
|
||||
<label class="block clearfix">
|
||||
<span class="block input-icon input-icon-right">
|
||||
<input type="text" name="userName" class="form-control" placeholder="请输入用户名" id="userName" value="admin"/>
|
||||
<input type="text" name="userName" class="form-control" id="userName"
|
||||
value="admin"/>
|
||||
<i class="ace-icon fa fa-user"></i>
|
||||
</span>
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
<span class="block input-icon input-icon-right">
|
||||
<input type="password" name="password" class="form-control" placeholder="请输入密码" id="password" value="llg123"/>
|
||||
<input type="password" name="password" class="form-control" id="password"
|
||||
value="llg123"/>
|
||||
<i class="ace-icon fa fa-lock"></i>
|
||||
</span>
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
<div class="input-group">
|
||||
<input type="text" style="width:150px" name="randCode" class="form-control" placeholder="请输入验证码" id="randCode"/>
|
||||
<span class="input-group-addon" style="padding: 0px;"><img id="randCodeImage" src="randCodeImage" /></span>
|
||||
</label>
|
||||
<label class="block clearfix">
|
||||
<div class="input-group">
|
||||
<input type="text" style="width:150px" name="randCode"
|
||||
class="form-control" id="randCode"/>
|
||||
<span class="input-group-addon" style="padding: 0px;"><img
|
||||
id="randCodeImage" src="randCodeImage"/></span>
|
||||
</div>
|
||||
</label>
|
||||
<div class="space"></div>
|
||||
<div class="clearfix">
|
||||
<label class="inline">
|
||||
<input type="checkbox" class="ace" id="on_off" name="remember"
|
||||
value="yes"/>
|
||||
<span class="lbl">
|
||||
<t:mutiLang langKey="login.saveusername"/>
|
||||
|
||||
</span>
|
||||
</label>
|
||||
<button type="button" id="but_login" onclick="checkUser()"
|
||||
class="width-35 pull-right btn btn-sm btn-primary">
|
||||
<i class="ace-icon fa fa-key"></i>
|
||||
<span class="bigger-110">
|
||||
<t:mutiLang langKey="login.login"/>
|
||||
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
|
||||
</div>
|
||||
<div class="toolbar clearfix">
|
||||
<div style="float: right">
|
||||
<a href="#" class="forgot-password-link">
|
||||
语言
|
||||
<i class="ace-icon fa fa-arrow-right"></i>
|
||||
<t:dictSelect id="langCode" field="langCode" typeGroupCode="lang"
|
||||
hasLabel="false"
|
||||
extendJson="{style:'padding:2px; width:80px;'}"
|
||||
defaultVal="zh-cn"></t:dictSelect>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<div class="space"></div>
|
||||
<div class="clearfix">
|
||||
<label class="inline">
|
||||
<input type="checkbox" class="ace" id="on_off" name="remember" value="yes"/>
|
||||
<span class="lbl">记住用户名</span>
|
||||
</label>
|
||||
<button type="button" id="but_login" onclick="checkUser()" class="width-35 pull-right btn btn-sm btn-primary">
|
||||
<i class="ace-icon fa fa-key"></i>
|
||||
<span class="bigger-110" >登录</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="space-4"></div>
|
||||
|
||||
<%-- <div class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
||||
<div class="navbar-fixed-top align-right">
|
||||
<br/>
|
||||
|
||||
<a id="btn-login-dark" class="blue" href="#" onclick="darkStyle()">Dark</a>
|
||||
|
||||
<span class="blue">/</span>
|
||||
|
||||
<a id="btn-login-blur" class="blue" href="#" onclick="blurStyle()">Blur</a>
|
||||
|
||||
<span class="blue">/</span>
|
||||
|
||||
<a id="btn-login-light" class="blue" href="#" onclick="lightStyle()">Light</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar clearfix">
|
||||
<div style="float: right">
|
||||
<a href="#" class="forgot-password-link">
|
||||
语言
|
||||
<i class="ace-icon fa fa-arrow-right"></i>
|
||||
<t:dictSelect id="langCode" field="langCode" typeGroupCode="lang" hasLabel="false" extendJson="{style:'padding:2px; width:80px;'}" defaultVal="zh-cn"></t:dictSelect>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="center"><h4 class="blue" id="id-company-text">© 本系统未在任何平台出售源码,版权归jeewms所有,如果需要服务请联系13850081872</h4></div>--%>
|
||||
<div class="navbar-fixed-top align-right">
|
||||
<br />
|
||||
|
||||
<a id="btn-login-dark" class="blue" href="#" onclick="darkStyle()">Dark</a>
|
||||
|
||||
<span class="blue">/</span>
|
||||
|
||||
<a id="btn-login-blur" class="blue" href="#" onclick="blurStyle()">Blur</a>
|
||||
|
||||
<span class="blue">/</span>
|
||||
|
||||
<a id="btn-login-light" class="blue" href="#" onclick="lightStyle()">Light</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.min.js"></script>
|
||||
|
@ -146,209 +165,214 @@
|
|||
<script type="text/javascript" src="plug-in/login/js/iphone.check.js"></script>
|
||||
<script type="text/javascript" src="plug-in/login/js/login.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
optErrMsg();
|
||||
});
|
||||
$("#errMsgContiner").hide();
|
||||
function optErrMsg(){
|
||||
$("#showErrMsg").html('');
|
||||
$("#errMsgContiner").hide();
|
||||
}
|
||||
|
||||
//输入验证码,回车登录
|
||||
$(document).keydown(function(e){
|
||||
if(e.keyCode == 13) {
|
||||
$("#but_login").click();
|
||||
}
|
||||
});
|
||||
|
||||
//验证用户信息
|
||||
function checkUser(){
|
||||
if(!validForm()){
|
||||
return false;
|
||||
}
|
||||
newLogin();
|
||||
}
|
||||
//表单验证
|
||||
function validForm(){
|
||||
if($.trim($("#userName").val()).length==0){
|
||||
showErrorMsg("请输入用户名");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($.trim($("#password").val()).length==0){
|
||||
showErrorMsg("请输入密码");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($.trim($("#randCode").val()).length==0){
|
||||
showErrorMsg("请输入验证码");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//登录处理函数
|
||||
function newLogin(orgId) {
|
||||
setCookie();
|
||||
var actionurl=$('form').attr('action');//提交路径
|
||||
var checkurl=$('form').attr('check');//验证路径
|
||||
var formData = new Object();
|
||||
var data=$(":input").each(function() {
|
||||
formData[this.name] =$("#"+this.name ).val();
|
||||
$(function () {
|
||||
optErrMsg();
|
||||
});
|
||||
formData['orgId'] = orgId ? orgId : "";
|
||||
//语言
|
||||
formData['langCode']=$("#langCode").val();
|
||||
formData['langCode'] = $("#langCode option:selected").val();
|
||||
$.ajax({
|
||||
async : false,
|
||||
cache : false,
|
||||
type : 'POST',
|
||||
url : checkurl,// 请求的action路径
|
||||
data : formData,
|
||||
error : function() {// 请求失败处理函数
|
||||
},
|
||||
success : function(data) {
|
||||
var d = $.parseJSON(data);
|
||||
if (d.success) {
|
||||
if (d.attributes.orgNum > 1) {
|
||||
//用户拥有多个部门,需选择部门进行登录
|
||||
var title, okButton;
|
||||
if($("#langCode").val() == 'en') {
|
||||
title = "Please select Org";
|
||||
okButton = "Ok";
|
||||
} else {
|
||||
title = "请选择组织机构";
|
||||
okButton = "确定";
|
||||
}
|
||||
$.dialog({
|
||||
id: 'LHG1976D',
|
||||
title: title,
|
||||
max: false,
|
||||
min: false,
|
||||
drag: false,
|
||||
resize: false,
|
||||
content: 'url:userController.do?userOrgSelect&userId=' + d.attributes.user.id,
|
||||
lock:true,
|
||||
button : [ {
|
||||
name : okButton,
|
||||
focus : true,
|
||||
callback : function() {
|
||||
iframe = this.iframe.contentWindow;
|
||||
var orgId = $('#orgId', iframe.document).val();
|
||||
$("#errMsgContiner").hide();
|
||||
|
||||
formData['orgId'] = orgId ? orgId : "";
|
||||
$.ajax({
|
||||
async : false,
|
||||
cache : false,
|
||||
type : 'POST',
|
||||
url : 'loginController.do?changeDefaultOrg',// 请求的action路径
|
||||
data : formData,
|
||||
error : function() {// 请求失败处理函数
|
||||
},
|
||||
success : function(data) {
|
||||
window.location.href = actionurl;
|
||||
}
|
||||
});
|
||||
|
||||
this.close();
|
||||
return false;
|
||||
}
|
||||
}],
|
||||
close: function(){
|
||||
setTimeout("window.location.href='"+actionurl+"'", 10);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window.location.href = actionurl;
|
||||
}
|
||||
} else {
|
||||
showErrorMsg(d.msg);
|
||||
if(d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
||||
reloadRandCodeImage();
|
||||
function optErrMsg() {
|
||||
$("#showErrMsg").html('');
|
||||
$("#errMsgContiner").hide();
|
||||
}
|
||||
|
||||
//输入验证码,回车登录
|
||||
$(document).keydown(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$("#but_login").click();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//登录提示消息显示
|
||||
function showErrorMsg(msg){
|
||||
$("#errMsgContiner").show();
|
||||
$("#showErrMsg").html(msg);
|
||||
window.setTimeout(optErrMsg,3000);
|
||||
}
|
||||
/**
|
||||
* 刷新验证码
|
||||
*/
|
||||
$('#randCodeImage').click(function(){
|
||||
reloadRandCodeImage();
|
||||
});
|
||||
function reloadRandCodeImage() {
|
||||
var date = new Date();
|
||||
var img = document.getElementById("randCodeImage");
|
||||
img.src='randCodeImage?a=' + date.getTime();
|
||||
}
|
||||
|
||||
function darkStyle(){
|
||||
$('body').attr('class', 'login-layout');
|
||||
$('#id-text2').attr('class', 'red');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
e.preventDefault();
|
||||
}
|
||||
function lightStyle(){
|
||||
$('body').attr('class', 'login-layout light-login');
|
||||
$('#id-text2').attr('class', 'grey');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
//验证用户信息
|
||||
function checkUser() {
|
||||
if (!validForm()) {
|
||||
return false;
|
||||
}
|
||||
newLogin();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
function blurStyle(){
|
||||
$('body').attr('class', 'login-layout blur-login');
|
||||
$('#id-text2').attr('class', 'white');
|
||||
$('#id-company-text').attr('class', 'light-blue');
|
||||
//表单验证
|
||||
function validForm() {
|
||||
if ($.trim($("#userName").val()).length == 0) {
|
||||
showErrorMsg("请输入用户名");
|
||||
return false;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
//设置cookie
|
||||
function setCookie()
|
||||
{
|
||||
if ($('#on_off').val() == '1') {
|
||||
$("input[iscookie='true']").each(function() {
|
||||
$.cookie(this.name, $("#"+this.name).val(), "/",24);
|
||||
$.cookie("COOKIE_NAME","true", "/",24);
|
||||
});
|
||||
} else {
|
||||
$("input[iscookie='true']").each(function() {
|
||||
$.cookie(this.name,null);
|
||||
$.cookie("COOKIE_NAME",null);
|
||||
});
|
||||
}
|
||||
}
|
||||
//读取cookie
|
||||
function getCookie()
|
||||
{
|
||||
var COOKIE_NAME=$.cookie("COOKIE_NAME");
|
||||
if (COOKIE_NAME !=null) {
|
||||
$("input[iscookie='true']").each(function() {
|
||||
$($("#"+this.name).val( $.cookie(this.name)));
|
||||
if("admin" == $.cookie(this.name)) {
|
||||
$("#randCode").focus();
|
||||
} else {
|
||||
$("#password").val("");
|
||||
$("#password").focus();
|
||||
}
|
||||
});
|
||||
$("#on_off").attr("checked", true);
|
||||
$("#on_off").val("1");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#on_off").attr("checked", false);
|
||||
$("#on_off").val("0");
|
||||
$("#randCode").focus();
|
||||
}
|
||||
}
|
||||
if ($.trim($("#password").val()).length == 0) {
|
||||
showErrorMsg("请输入密码");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($.trim($("#randCode").val()).length == 0) {
|
||||
showErrorMsg("请输入验证码");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//登录处理函数
|
||||
function newLogin(orgId) {
|
||||
setCookie();
|
||||
var actionurl = $('form').attr('action');//提交路径
|
||||
var checkurl = $('form').attr('check');//验证路径
|
||||
var formData = new Object();
|
||||
var data = $(":input").each(function () {
|
||||
formData[this.name] = $("#" + this.name).val();
|
||||
});
|
||||
formData['orgId'] = orgId ? orgId : "";
|
||||
//语言
|
||||
formData['langCode'] = $("#langCode").val();
|
||||
formData['langCode'] = $("#langCode option:selected").val();
|
||||
$.ajax({
|
||||
async: false,
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
url: checkurl,// 请求的action路径
|
||||
data: formData,
|
||||
error: function () {// 请求失败处理函数
|
||||
},
|
||||
success: function (data) {
|
||||
var d = $.parseJSON(data);
|
||||
if (d.success) {
|
||||
if (d.attributes.orgNum > 1) {
|
||||
//用户拥有多个部门,需选择部门进行登录
|
||||
var title, okButton;
|
||||
if ($("#langCode").val() == 'en') {
|
||||
title = "Please select Org";
|
||||
okButton = "Ok";
|
||||
} else {
|
||||
title = "请选择组织机构";
|
||||
okButton = "确定";
|
||||
}
|
||||
$.dialog({
|
||||
id: 'LHG1976D',
|
||||
title: title,
|
||||
max: false,
|
||||
min: false,
|
||||
drag: false,
|
||||
resize: false,
|
||||
content: 'url:userController.do?userOrgSelect&userId=' + d.attributes.user.id,
|
||||
lock: true,
|
||||
button: [{
|
||||
name: okButton,
|
||||
focus: true,
|
||||
callback: function () {
|
||||
iframe = this.iframe.contentWindow;
|
||||
var orgId = $('#orgId', iframe.document).val();
|
||||
|
||||
formData['orgId'] = orgId ? orgId : "";
|
||||
$.ajax({
|
||||
async: false,
|
||||
cache: false,
|
||||
type: 'POST',
|
||||
url: 'loginController.do?changeDefaultOrg',// 请求的action路径
|
||||
data: formData,
|
||||
error: function () {// 请求失败处理函数
|
||||
},
|
||||
success: function (data) {
|
||||
window.location.href = actionurl;
|
||||
}
|
||||
});
|
||||
|
||||
this.close();
|
||||
return false;
|
||||
}
|
||||
}],
|
||||
close: function () {
|
||||
setTimeout("window.location.href='" + actionurl + "'", 10);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window.location.href = actionurl;
|
||||
}
|
||||
} else {
|
||||
showErrorMsg(d.msg);
|
||||
if (d.msg === "用户名或密码错误" || d.msg === "验证码错误")
|
||||
reloadRandCodeImage();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//登录提示消息显示
|
||||
function showErrorMsg(msg) {
|
||||
$("#errMsgContiner").show();
|
||||
$("#showErrMsg").html(msg);
|
||||
window.setTimeout(optErrMsg, 3000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新验证码
|
||||
*/
|
||||
$('#randCodeImage').click(function () {
|
||||
reloadRandCodeImage();
|
||||
});
|
||||
|
||||
function reloadRandCodeImage() {
|
||||
var date = new Date();
|
||||
var img = document.getElementById("randCodeImage");
|
||||
img.src = 'randCodeImage?a=' + date.getTime();
|
||||
}
|
||||
|
||||
function darkStyle() {
|
||||
$('body').attr('class', 'login-layout');
|
||||
$('#id-text2').attr('class', 'red');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
function lightStyle() {
|
||||
$('body').attr('class', 'login-layout light-login');
|
||||
$('#id-text2').attr('class', 'grey');
|
||||
$('#id-company-text').attr('class', 'blue');
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
function blurStyle() {
|
||||
$('body').attr('class', 'login-layout blur-login');
|
||||
$('#id-text2').attr('class', 'white');
|
||||
$('#id-company-text').attr('class', 'light-blue');
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
//设置cookie
|
||||
function setCookie() {
|
||||
if ($('#on_off').val() == '1') {
|
||||
$("input[iscookie='true']").each(function () {
|
||||
$.cookie(this.name, $("#" + this.name).val(), "/", 24);
|
||||
$.cookie("COOKIE_NAME", "true", "/", 24);
|
||||
});
|
||||
} else {
|
||||
$("input[iscookie='true']").each(function () {
|
||||
$.cookie(this.name, null);
|
||||
$.cookie("COOKIE_NAME", null);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//读取cookie
|
||||
function getCookie() {
|
||||
var COOKIE_NAME = $.cookie("COOKIE_NAME");
|
||||
if (COOKIE_NAME != null) {
|
||||
$("input[iscookie='true']").each(function () {
|
||||
$($("#" + this.name).val($.cookie(this.name)));
|
||||
if ("admin" == $.cookie(this.name)) {
|
||||
$("#randCode").focus();
|
||||
} else {
|
||||
$("#password").val("");
|
||||
$("#password").focus();
|
||||
}
|
||||
});
|
||||
$("#on_off").attr("checked", true);
|
||||
$("#on_off").val("1");
|
||||
} else {
|
||||
$("#on_off").attr("checked", false);
|
||||
$("#on_off").val("0");
|
||||
$("#randCode").focus();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%=lhgdialogTheme %>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue