format jsp

This commit is contained in:
AlanGao
2018-04-07 14:02:24 +08:00
parent 072599953e
commit 13c790147a
74 changed files with 22152 additions and 22659 deletions

View File

@@ -1,200 +1,184 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>ERP系统</title> <title>ERP系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body id="login_body"> <body id="login_body">
<form action="admin.html"> <form action="admin.html">
<div id="login_main"> <div id="login_main">
<div id="login"> <div id="login">
<p id="login_signal"><img src="<%=path%>/images/login_tip.jpg" width="108" height="29" alt="login" /></p> <p id="login_signal"><img src="<%=path%>/images/login_tip.jpg" width="108" height="29" alt="login"/></p>
<p id="txt_username"> <p id="txt_username">
<label for="user_name">用户名:</label> <label for="user_name">用户名:</label>
</p> </p>
<p id="txt_userpwd"> <p id="txt_userpwd">
<label for="user_vcode" id="user_vcodepwd">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label> <label for="user_vcode" id="user_vcodepwd">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
</p> </p>
<input type="text" id="user_name" /> <input type="text" id="user_name"/>
<input type="password" id="user_pwd" /> <input type="password" id="user_pwd"/>
<p id="tip_username" style="display: none"><span class="error_input">用户名不正确</span></p> <p id="tip_username" style="display: none"><span class="error_input">用户名不正确</span></p>
<p id="tip_userpwd" style="display: none">密码不能为空</p> <p id="tip_userpwd" style="display: none">密码不能为空</p>
<input type="button" value=" " id="btn_login" /> <input type="button" value=" " id="btn_login"/>
</div> </div>
<p id="copyright">Copyright © 2017-2020 季圣华(jishenghua) <a style="color:#00458a;" href="https://gitee.com/jishenghua/JSH_ERP" target="_blank">华夏ERP_v1.0</a></p> <p id="copyright">Copyright © 2017-2020 季圣华(jishenghua) <a style="color:#00458a;"
</div> href="https://gitee.com/jishenghua/JSH_ERP"
</form> target="_blank">华夏ERP_v1.0</a></p>
<script type="text/javascript"> </div>
//初始化界面 </form>
$(function() <script type="text/javascript">
{ //初始化界面
//进入页面聚焦在username输入框,方便 用户输入 $(function () {
$("#user_name").focus(); //进入页面聚焦在username输入框,方便 用户输入
browserFit(); $("#user_name").focus();
}); browserFit();
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE')
if(getOs()=='MSIE') $("#user_vcodepwd").empty().append("密&nbsp;&nbsp;&nbsp;&nbsp;码:");
$("#user_vcodepwd").empty().append("密&nbsp;&nbsp;&nbsp;&nbsp;码:"); else
else $("#user_vcodepwd").empty().append("密&nbsp;&nbsp;&nbsp;&nbsp;码:");
$("#user_vcodepwd").empty().append("密&nbsp;&nbsp;&nbsp;&nbsp;码:"); }
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是usename 和password的输入框才可以触发键盘事件 13键盘事件
//绑定键盘事件为 id是usename 和password的输入框才可以触发键盘事件 13键盘事件 if (k == "13" && (obj.id == "user_name" || obj.id == "user_pwd"))
if(k == "13"&&(obj.id=="user_name"||obj.id=="user_pwd")) checkUserInput();
checkUserInput(); });
});
//登录按钮绑定处理事件 //登录按钮绑定处理事件
$('#btn_login').bind({ $('#btn_login').bind({
click:checkUserInput click: checkUserInput
}); });
//检测用户输入数据 //检测用户输入数据
function checkUserInput () function checkUserInput() {
{ var username = $.trim($('#user_name').val());
var username = $.trim($('#user_name').val()); var password = $.trim($('#user_pwd').val());
var password = $.trim($('#user_pwd').val()); if (null == username || 0 == username.length) {
if(null == username ||0 == username.length) $("#user_name").val("").focus();
{ $("#tip_userpwd").hide();
$("#user_name").val("").focus(); $("#tip_username").empty().append('<span class="error_input">用户名不能为空</span>').show();
$("#tip_userpwd").hide(); return;
$("#tip_username").empty().append('<span class="error_input">用户名不能为空</span>').show(); }
return; else
} $("#tip_username").hide();
else
$("#tip_username").hide();
if(null == password || 0 == password.length) if (null == password || 0 == password.length) {
{ $("#user_pwd").val("").focus();
$("#user_pwd").val("").focus(); $("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show();
$("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show(); return;
return; }
} else
else $("#tip_userpwd").hide();
$("#tip_userpwd").hide(); if (username != null && username.length != 0
if(username != null&& username.length != 0 && password != null && password.length != 0) {
&&password != null&&password.length != 0) $("#user_name").focus();
{ $("#tip_username").hide();
$("#user_name").focus(); $("#tip_userpwd").hide();
$("#tip_username").hide(); $.ajax({
$("#tip_userpwd").hide(); type: "post",
$.ajax({ url: "<%=path%>/user/login.action",
type:"post", dataType: "json",
url: "<%=path%>/user/login.action", data: ({
dataType: "json", loginame: username,
data: ({ password: password,
loginame : username, clientIp: "<%=clientIp%>"
password : password, }),
clientIp:"<%=clientIp%>" success: function (loginInfo) {
}), var loginInfoTip = loginInfo.showModel.msgTip;
success: function (loginInfo){ //用户名不存在,清空输入框并定位到用户名输入框
var loginInfoTip = loginInfo.showModel.msgTip; if (loginInfoTip.indexOf("user is not exist") != -1) {
//用户名不存在,清空输入框并定位到用户名输入框 $("#user_pwd").val("");
if(loginInfoTip.indexOf("user is not exist") != -1) $("#user_name").val("").focus();
{ $("#tip_userpwd").hide();
$("#user_pwd").val(""); $("#tip_username").empty().append('<span class="error_input">用户名不存在</span>').show();
$("#user_name").val("").focus(); return;
$("#tip_userpwd").hide(); }
$("#tip_username").empty().append('<span class="error_input">用户名不存在</span>').show(); else if (loginInfoTip.indexOf("user password error") != -1) {
return; $("#user_pwd").val("").focus();
} $("#tip_userpwd").empty().append('<span class="error_input">用户密码错误</span>').show();
else if(loginInfoTip.indexOf("user password error") != -1) return;
{ }
$("#user_pwd").val("").focus(); else if (loginInfoTip.indexOf("access service error") != -1) {
$("#tip_userpwd").empty().append('<span class="error_input">用户密码错误</span>').show(); //$("#user_name").val("").focus();
return; $("#tip_userpwd").hide();
} $("#tip_username").empty().append('<span class="error_input">后台访问错误</span>').show();
else if(loginInfoTip.indexOf("access service error") != -1) return;
{ }
//$("#user_name").val("").focus(); //跳转到用户管理界面
$("#tip_userpwd").hide(); else if (loginInfoTip.indexOf("user can login") != -1 || loginInfoTip == "user already login") {
$("#tip_username").empty().append('<span class="error_input">后台访问错误</span>').show(); window.location.href = "<%=path%>/login.action";
return; }
} },
//跳转到用户管理界面 //此处添加错误处理
else if(loginInfoTip.indexOf("user can login") != -1||loginInfoTip == "user already login") error: function () {
{ alert("后台访问错误,请联系管理员!");
window.location.href="<%=path%>/login.action"; }
} });
}, }
//此处添加错误处理 }
error:function()
{
alert("后台访问错误,请联系管理员!");
}
});
}
}
//处理tip提示 //处理tip提示
//定义变量控制密码提示显示 //定义变量控制密码提示显示
var temp_value = ""; var temp_value = "";
$("#user_name").add("#user_pwd").unbind().bind({ $("#user_name").add("#user_pwd").unbind().bind({
'click keyup':function() 'click keyup': function () {
{ var value = $.trim($(this).val());
var value = $.trim($(this).val()); if (value.length > 0) {
if(value.length >0) $("#tip_username").hide();
{ $("#tip_userpwd").hide();
$("#tip_username").hide(); }
$("#tip_userpwd").hide(); },
} blur: function () {
}, //兼容 IE和firefox 事件
blur:function() var e = window.event || event;
{ //兼容 IE,firefox 兼容
//兼容 IE和firefox 事件 var obj = e.srcElement ? e.srcElement : e.target;
var e = window.event || event; var value = $.trim($(this).val());
//兼容 IE,firefox 兼容 if (obj.id == "user_name")
var obj = e.srcElement ? e.srcElement : e.target; temp_value = value;
var value = $.trim($(this).val()); if (value.length == 0) {
if(obj.id=="user_name") if (obj.id == "user_name")
temp_value = value; $("#tip_username").empty().append('<span class="error_input">用户名不能为空</span>').show();
if(value.length ==0)
{
if(obj.id=="user_name")
$("#tip_username").empty().append('<span class="error_input">用户名不能为空</span>').show();
if(obj.id=="user_pwd" &&temp_value.length>0) if (obj.id == "user_pwd" && temp_value.length > 0)
$("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show();; $("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show();
} ;
else }
{ else {
if(obj.id=="user_pwd"&&value.length>0&&temp_value.length ==0) if (obj.id == "user_pwd" && value.length > 0 && temp_value.length == 0) {
{ $("#tip_username").show();
$("#tip_username").show(); $("#tip_userpwd").hide();
$("#tip_userpwd").hide(); }
} else {
else $("#tip_username").hide();
{ $("#tip_userpwd").hide();
$("#tip_username").hide(); }
$("#tip_userpwd").hide(); }
} }
} });
} </script>
}); </body>
</script>
</body>
</html> </html>

View File

@@ -1,26 +1,26 @@
<%@ page language="java" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%> %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<base href="<%=basePath%>"> <base href="<%=basePath%>">
<title>+</title> <title>+</title>
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page"> <meta http-equiv="description" content="This is my page">
<!-- <!--
<link rel="stylesheet" type="text/css" href="styles.css"> <link rel="stylesheet" type="text/css" href="styles.css">
--> -->
</head> </head>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
top.location.href="<%=basePath%>"; top.location.href = "<%=basePath%>";
</script> </script>
<br></body> <br></body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +1,87 @@
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%> %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link href="css/admin.css" type="text/css" rel="stylesheet"> <link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title> <title>首页说明</title>
<style type="text/css"> <style type="text/css">
<!-- <!--
body { body {
margin-left: 0px; margin-left: 0px;
margin-top: 0px; margin-top: 0px;
margin-right: 0px; margin-right: 0px;
margin-bottom: 0px; margin-bottom: 0px;
background-color: #EAF2FD; background-color: #EAF2FD;
} }
.STYLE1 {font-size: 12px}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link { .STYLE1 {
font-size: 12px; font-size: 12px
color: #06482a; }
text-decoration: none;
} .STYLE4 {
a:visited { font-size: 12px;
font-size: 12px; color: #1F4A65;
color: #06482a; font-weight: bold;
text-decoration: none; }
}
a:hover { a:link {
font-size: 12px; font-size: 12px;
color: #FF0000; color: #06482a;
text-decoration: underline; text-decoration: none;
}
a:active { }
font-size: 12px;
color: #FF0000; a:visited {
text-decoration: none; font-size: 12px;
} color: #06482a;
.STYLE7 {font-size: 12} text-decoration: none;
--> }
</style>
</head> a:hover {
<body> font-size: 12px;
<table cellSpacing=0 cellPadding=0 width="100%" align=center border=0> color: #FF0000;
<tr height=28> text-decoration: underline;
<td width="1101" class="STYLE4"> }
&nbsp;&nbsp;<img src="<%=path%>/images/computer.png" width="16" height="16" />
<span >资产管理</span> a:active {
</td> font-size: 12px;
</tr> color: #FF0000;
<tr> text-decoration: none;
<td bgColor=#b1ceef height=1></td> }
</tr>
<tr height="5px"> .STYLE7 {
<td background=images/shadow_bg.jpg></td> font-size: 12
</tr> }
</table>
<p style="font-size: 12px;color: #1F4A65;padding: 10px"> -->
&nbsp;&nbsp;&nbsp;&nbsp; </style>
资产管理是记录资产明细,包括资产名称、资产类型、供应商、使用用户等信息,通过资产管理,可以记录平时资产明细,管理资产信息。资产管理包括增加,修改,删除、搜索消费信息等功能点。报表图表最多显示十条报表记录。 </head>
</p> <body>
</body> <table cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<tr height=28>
<td width="1101" class="STYLE4">
&nbsp;&nbsp;<img src="<%=path%>/images/computer.png" width="16" height="16"/>
<span>资产管理</span>
</td>
</tr>
<tr>
<td bgColor=#b1ceef height=1></td>
</tr>
<tr height="5px">
<td background=images/shadow_bg.jpg></td>
</tr>
</table>
<p style="font-size: 12px;color: #1F4A65;padding: 10px">
&nbsp;&nbsp;&nbsp;&nbsp;
资产管理是记录资产明细,包括资产名称、资产类型、供应商、使用用户等信息,通过资产管理,可以记录平时资产明细,管理资产信息。资产管理包括增加,修改,删除、搜索消费信息等功能点。报表图表最多显示十条报表记录。
</p>
</body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,24 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>ERP系统</title> <title>ERP系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
</head> </head>
<frameset frameborder="no" border="0" framespacing="0" id="framesetList"> <frameset frameborder="no" border="0" framespacing="0" id="framesetList">
<frame src="<%=path %>/pages/common/main.jsp" name="mainFrame" id="mainFrame" title="mainFrame" /> <frame src="<%=path %>/pages/common/main.jsp" name="mainFrame" id="mainFrame" title="mainFrame"/>
</frameset> </frameset>
<body> <body>
</body> </body>
</noframes> </noframes>
</html> </html>

View File

@@ -1,19 +1,19 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
</head> </head>
<body> <body>
<div id="foot">Copyright © 2015 季圣华 版权所有 版本号 V1.0</div> <div id="foot">Copyright © 2015 季圣华 版权所有 版本号 V1.0</div>
</body> </body>
</html> </html>

View File

@@ -1,167 +1,161 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
</head> </head>
<body> <body>
<div id="header"> <div id="header">
<div id="logo"><img src="<%=path%>/images/windvane.png" height="50" alt="资产管理" title="资产管理"/></div> <div id="logo"><img src="<%=path%>/images/windvane.png" height="50" alt="资产管理" title="资产管理"/></div>
<!-- <div id="logo"><img src="<%=path%>/images/suma_logo.png" height="45" alt="资产管理系统" title="资产管理系统"/></div> --> <!-- <div id="logo"><img src="<%=path%>/images/suma_logo.png" height="45" alt="资产管理系统" title="资产管理系统"/></div> -->
<div id="nav_top"> <div id="nav_top">
<ul> <ul>
<li><a href="<%=path%>/pages/other/clock.jsp" style="background:url(<%=path %>/images/clock.png) 0 1px no-repeat;color:#333;text-decoration:none;" target="mainFrame"><span id="showNowTime"></span></a></li> <li><a href="<%=path%>/pages/other/clock.jsp"
<li>|</li> style="background:url(<%=path %>/images/clock.png) 0 1px no-repeat;color:#333;text-decoration:none;"
<li><a href="javascript:void(0)" style="background:url(<%=path %>/images/user_business_boss.png) 0 1px no-repeat;color:#333;text-decoration:none;">用户名:${sessionScope.user.loginame}</a></li> target="mainFrame"><span id="showNowTime"></span></a></li>
<li>|</li> <li>|</li>
<li id="1"><a href="<%=path %>/pages/common/home.jsp" id="navtop_home" target="mainFrame" style="color:#333;text-decoration:none;">首页</a></li> <li><a href="javascript:void(0)"
<li id="2">|</li> style="background:url(<%=path %>/images/user_business_boss.png) 0 1px no-repeat;color:#333;text-decoration:none;">用户名:${sessionScope.user.loginame}</a>
<li id="3"><a href="<%=path %>/pages/user/userinfo.jsp" id="person_file" target="mainFrame" style="background:url(<%=path %>/images/comment.png) 0 1px no-repeat;color:#333;text-decoration:none;">个人资料</a></li> </li>
<li id="4">|</li> <li>|</li>
<li id="5"><a href="<%=path %>/pages/user/password.jsp" target="mainFrame" id="navtop_editpwd" style="background:url(<%=path %>/images/lock_unlock.png) 0 1px no-repeat;color:#333;text-decoration:none;">修改密码</a></li> <li id="1"><a href="<%=path %>/pages/common/home.jsp" id="navtop_home" target="mainFrame"
<!--<li>|</li> style="color:#333;text-decoration:none;">首页</a></li>
<li><a href="javascript:void(0)" id="navtop_help">帮助</a></li> <li id="2">|</li>
--> <li id="3"><a href="<%=path %>/pages/user/userinfo.jsp" id="person_file" target="mainFrame"
<li id="6">|</li> style="background:url(<%=path %>/images/comment.png) 0 1px no-repeat;color:#333;text-decoration:none;">个人资料</a>
<li><a href="javascript:void(0)" id="navtop_logout">注销</a></li> </li>
</ul> <li id="4">|</li>
</div> <li id="5"><a href="<%=path %>/pages/user/password.jsp" target="mainFrame" id="navtop_editpwd"
</div> style="background:url(<%=path %>/images/lock_unlock.png) 0 1px no-repeat;color:#333;text-decoration:none;">修改密码</a>
<script type="text/javascript"> </li>
$(init); <!--<li>|</li>
//页面初始化 <li><a href="javascript:void(0)" id="navtop_help">帮助</a></li>
function init() -->
{ <li id="6">|</li>
//初始化时间 <li><a href="javascript:void(0)" id="navtop_logout">注销</a></li>
showTime(); </ul>
if('${sessionScope.user.loginame}'!= 'guest') </div>
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").show(); </div>
else <script type="text/javascript">
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").hide(); $(init);
}
function showDate() //页面初始化
{ function init() {
var calendar = new Date(); //初始化时间
var day = calendar.getDay(); showTime();
var month = calendar.getMonth(); if ('${sessionScope.user.loginame}' != 'guest')
var date = calendar.getDate(); $("#1").add("#2").add("#3").add("#4").add("#5").add("#6").show();
var year = calendar.getYear(); else
if (year< 1900) $("#1").add("#2").add("#3").add("#4").add("#5").add("#6").hide();
{ }
year = 1900 + year;
}
var cent = parseInt(year/100);
var g = year % 19;
var k = parseInt((cent - 17)/25);
var i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
var j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4)) % 7;
var l = i - j;
var emonth = 3 + parseInt((l + 40)/44);
var edate = l + 28 - 31*parseInt((emonth/4));
emonth--;
var dayname = new Array ("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
var monthname =new Array ("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月" );
var message = "";
if(getOs().indexOf("MSIE")!= -1)
{
//控制时间和图片之间的距离
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
message = year + "年" + monthname[month]+ date + "日&nbsp;&nbsp;" + dayname[day]+"&nbsp;&nbsp;";
} function showDate() {
else if(getOs().indexOf("Firefox") != -1) var calendar = new Date();
{ var day = calendar.getDay();
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;"); var month = calendar.getMonth();
message = year + "年 " + monthname[month]+ date + "日&nbsp;&nbsp;" + dayname[day]+"&nbsp;&nbsp;"; var date = calendar.getDate();
} var year = calendar.getYear();
else if (year < 1900) {
{ year = 1900 + year;
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); }
message = year + "年 " + monthname[month]+ date + "日&nbsp;&nbsp; " + dayname[day] + "&nbsp;&nbsp;"; var cent = parseInt(year / 100);
} var g = year % 19;
return message; var k = parseInt((cent - 17) / 25);
} var i = (cent - parseInt(cent / 4) - parseInt((cent - k) / 3) + 19 * g + 15) % 30;
function showTime() i = i - parseInt(i / 28) * (1 - parseInt(i / 28) * parseInt(29 / (i + 1)) * parseInt((21 - g) / 11));
{ var j = (year + parseInt(year / 4) + i + 2 - cent + parseInt(cent / 4)) % 7;
var Digital=new Date(); var l = i - j;
var hours=Digital.getHours(); var emonth = 3 + parseInt((l + 40) / 44);
var minutes=Digital.getMinutes(); var edate = l + 28 - 31 * parseInt((emonth / 4));
var seconds=Digital.getSeconds(); emonth--;
if(hours==0) var dayname = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
{ var monthname = new Array("1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月");
hours="00"; var message = "";
} if (getOs().indexOf("MSIE") != -1) {
if(hours <= 9 && hours > 0) //控制时间和图片之间的距离
{ $("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
hours="0"+hours; message = year + "年" + monthname[month] + date + "日&nbsp;&nbsp;" + dayname[day] + "&nbsp;&nbsp;";
}
if(minutes<=9) }
minutes="0"+minutes; else if (getOs().indexOf("Firefox") != -1) {
if(seconds<=9) $("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;");
seconds="0"+seconds; message = year + "年 " + monthname[month] + date + "日&nbsp;&nbsp;" + dayname[day] + "&nbsp;&nbsp;";
var myclock=hours+":"+minutes+":"+seconds; }
//定时器 else {
setTimeout("showTime()",1000); $("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
var message = showDate()+" "+myclock; message = year + "年 " + monthname[month] + date + "日&nbsp;&nbsp; " + dayname[day] + "&nbsp;&nbsp;";
$("#showNowTime").empty().append(message); }
} return message;
//判断浏览器的类型 }
function getOs()
{ function showTime() {
var OsObject = ""; var Digital = new Date();
if(navigator.userAgent.indexOf("MSIE")>0) var hours = Digital.getHours();
{ var minutes = Digital.getMinutes();
return "MSIE"; var seconds = Digital.getSeconds();
} if (hours == 0) {
else if(navigator.userAgent.indexOf("Firefox")>0) hours = "00";
{ }
return "Firefox"; if (hours <= 9 && hours > 0) {
} hours = "0" + hours;
else if(navigator.userAgent.indexOf("Safari")>0) }
{ if (minutes <= 9)
return "Safari"; minutes = "0" + minutes;
} if (seconds <= 9)
else if(navigator.userAgent.indexOf("Camino")>0) seconds = "0" + seconds;
{ var myclock = hours + ":" + minutes + ":" + seconds;
return "Camino"; //定时器
} setTimeout("showTime()", 1000);
else if(navigator.userAgent.indexOf("Gecko/")>0) var message = showDate() + " " + myclock;
{ $("#showNowTime").empty().append(message);
return "Gecko"; }
}
else if(navigator.userAgent.indexOf("Opera/")>0) //判断浏览器的类型
{ function getOs() {
return "Opera"; var OsObject = "";
} if (navigator.userAgent.indexOf("MSIE") > 0) {
else return "MSIE";
{ }
return "unknown"; else if (navigator.userAgent.indexOf("Firefox") > 0) {
} return "Firefox";
} }
//退出系统 else if (navigator.userAgent.indexOf("Safari") > 0) {
$("#navtop_logout").bind({ return "Safari";
click:function() }
{ else if (navigator.userAgent.indexOf("Camino") > 0) {
if(confirm("确认要退出系统吗?")) return "Camino";
{ }
window.location.href ="<%=path%>/user/logout.action?clientIp=<%=clientIp%>" ; else if (navigator.userAgent.indexOf("Gecko/") > 0) {
} return "Gecko";
} }
}); else if (navigator.userAgent.indexOf("Opera/") > 0) {
</script> return "Opera";
</body> }
else {
return "unknown";
}
}
//退出系统
$("#navtop_logout").bind({
click: function () {
if (confirm("确认要退出系统吗?")) {
window.location.href = "<%=path%>/user/logout.action?clientIp=<%=clientIp%>";
}
}
});
</script>
</body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
@@ -10,111 +10,122 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>ERP系统</title> <title>ERP系统</title>
<link href="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.css" rel="stylesheet" /> <link href="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.css" rel="stylesheet"/>
<link href="<%=path%>/js/HoorayOS_mini/img/ui/index.css" rel="stylesheet" /> <link href="<%=path%>/js/HoorayOS_mini/img/ui/index.css" rel="stylesheet"/>
</head> </head>
<body> <body>
<div class="loading"></div> <div class="loading"></div>
<!-- 浏览器升级提示 --> <!-- 浏览器升级提示 -->
<div class="update_browser_box"> <div class="update_browser_box">
<div class="update_browser"> <div class="update_browser">
<div class="subtitle">您正在使用的IE浏览器版本过低<br>我们建议您升级或者更换浏览器,以便体验顺畅、兼容、安全的互联网。</div> <div class="subtitle">您正在使用的IE浏览器版本过低<br>我们建议您升级或者更换浏览器,以便体验顺畅、兼容、安全的互联网。</div>
<div class="title">选择一款<span>新</span>浏览器吧</div> <div class="title">选择一款<span>新</span>浏览器吧</div>
<div class="browser"> <div class="browser">
<a href="http://windows.microsoft.com/zh-CN/internet-explorer/downloads/ie" class="ie" target="_blank" title="ie浏览器">ie浏览器</a> <a href="http://windows.microsoft.com/zh-CN/internet-explorer/downloads/ie" class="ie" target="_blank"
<a href="http://www.google.cn/chrome/" class="chrome" target="_blank" title="谷歌浏览器">谷歌浏览器</a> title="ie浏览器">ie浏览器</a>
<a href="http://www.firefox.com.cn" class="firefox" target="_blank" title="火狐浏览器">火狐浏览器</a> <a href="http://www.google.cn/chrome/" class="chrome" target="_blank" title="谷歌浏览器">谷歌浏览器</a>
<a href="http://www.opera.com" class="opera" target="_blank" title="opera浏览器">opera浏览器</a> <a href="http://www.firefox.com.cn" class="firefox" target="_blank" title="火狐浏览器">火狐浏览器</a>
<a href="http://www.apple.com.cn/safari" class="safari" target="_blank" title="safari浏览器">safari浏览器</a> <a href="http://www.opera.com" class="opera" target="_blank" title="opera浏览器">opera浏览器</a>
</div> <a href="http://www.apple.com.cn/safari" class="safari" target="_blank" title="safari浏览器">safari浏览器</a>
<div class="bottomtitle">[&nbsp;<a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a>&nbsp;]</div> </div>
<div class="bottomtitle">[&nbsp;<a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a>&nbsp;]
</div> </div>
</div> </div>
<!-- 桌面 --> </div>
<div id="desktop"> <!-- 桌面 -->
<div id="zoom-tip"><div><i></i><span></span></div><a href="javascript:;" class="close" onclick="HROS.zoom.close();">×</a></div> <div id="desktop">
<div id="desk"> <div id="zoom-tip">
<div id="desk-1" class="desktop-container"><div class="scrollbar scrollbar-x"></div><div class="scrollbar scrollbar-y"></div></div> <div><i></i><span></span></div>
<div id="dock-bar"> <a href="javascript:;" class="close" onclick="HROS.zoom.close();">×</a></div>
<div id="dock-container"> <div id="desk">
<div class="dock-middle"> <div id="desk-1" class="desktop-container">
<div class="dock-applist"></div> <div class="scrollbar scrollbar-x"></div>
<div class="dock-toollist"> <div class="scrollbar scrollbar-y"></div>
<a id="loginOut" href="#"> </div>
<img src="<%=path%>/js/HoorayOS_mini/img/exit.png" style="height:50px;width:50px;"> <div id="dock-bar">
</a> <div id="dock-container">
<span style="text-align:center;color:white; position:absolute;top:435px; left:15px;"> <div class="dock-middle">
${sessionScope.user.username} <div class="dock-applist"></div>
</span> <div class="dock-toollist">
</div> <a id="loginOut" href="#">
<img src="<%=path%>/js/HoorayOS_mini/img/exit.png" style="height:50px;width:50px;">
</a>
<span style="text-align:center;color:white; position:absolute;top:435px; left:15px;">
${sessionScope.user.username}
</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="task-bar-bg1"></div>
<div id="task-bar-bg2"></div>
<div id="task-bar">
<div id="task-next"><a href="javascript:;" id="task-next-btn" hidefocus="true"></a></div>
<div id="task-content">
<div id="task-content-inner"></div>
</div>
<div id="task-pre"><a href="javascript:;" id="task-pre-btn" hidefocus="true"></a></div>
</div>
</div> </div>
<script src="<%=path%>/js/HoorayOS_mini/js/jquery-1.8.3.min.js"></script> <div id="task-bar-bg1"></div>
<script src="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.js"></script> <div id="task-bar-bg2"></div>
<script src="<%=path%>/js/HoorayOS_mini/js/templates.js"></script> <div id="task-bar">
<script src="<%=path%>/js/HoorayOS_mini/js/core.js"></script> <div id="task-next"><a href="javascript:;" id="task-next-btn" hidefocus="true"></a></div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.app.js"></script> <div id="task-content">
<script src="<%=path%>/js/HoorayOS_mini/js/hros.base.js"></script> <div id="task-content-inner"></div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.desktop.js"></script> </div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.dock.js"></script> <div id="task-pre"><a href="javascript:;" id="task-pre-btn" hidefocus="true"></a></div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.grid.js"></script> </div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.maskBox.js"></script> </div>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.taskbar.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/jquery-1.8.3.min.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.popupMenu.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.wallpaper.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/templates.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.widget.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/core.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.window.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/hros.app.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.zoom.js"></script> <script src="<%=path%>/js/HoorayOS_mini/js/hros.base.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.desktop.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.dock.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.grid.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.maskBox.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.taskbar.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.popupMenu.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.wallpaper.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.widget.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.window.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.zoom.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<link href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" rel="stylesheet" type="text/css" /> <link href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" rel="stylesheet" type="text/css"/>
<script> <script>
$(function () { $(function () {
$('#loginOut').click(function () { $('#loginOut').click(function () {
if (confirm("确认要退出系统吗?")) if (confirm("确认要退出系统吗?"))
location.href = '<%=path%>/user/logout.action?clientIp=<%=clientIp%>'; location.href = '<%=path%>/user/logout.action?clientIp=<%=clientIp%>';
}) })
//IE下禁止选中 //IE下禁止选中
document.body.onselectstart = document.body.ondrag = function () { return false; } document.body.onselectstart = document.body.ondrag = function () {
//隐藏加载遮罩层 return false;
$('.loading').hide(); }
//IE6升级提示 //隐藏加载遮罩层
if ($.browser.msie && $.browser.version < 7) { $('.loading').hide();
if ($.browser.version < 7) { //IE6升级提示
//虽然不支持IE6但还是得修复PNG图片透明的问题 if ($.browser.msie && $.browser.version < 7) {
DD_belatedPNG.fix('.update_browser .browser'); if ($.browser.version < 7) {
} //虽然不支持IE6但还是得修复PNG图片透明的问题
$('.update_browser_box').show(); DD_belatedPNG.fix('.update_browser .browser');
} else {
$('#desktop').show();
//初始化一些桌面信息
HROS.CONFIG.wallpaper = '<%=path%>/js/HoorayOS_mini/img/wallpaper/wallpaper.jpg';
//加载桌面
HROS.base.init();
} }
//判断是否存在session如果不存在就跳到登录界面 $('.update_browser_box').show();
function UserOut() { } else {
var kid = ${sessionScope.user.id}; $('#desktop').show();
if (!kid){ //初始化一些桌面信息
top.location.href = '../../'; HROS.CONFIG.wallpaper = '<%=path%>/js/HoorayOS_mini/img/wallpaper/wallpaper.jpg';
} //加载桌面
} HROS.base.init();
setInterval(UserOut, 5000); //每5秒检测一次 }
});
</script> //判断是否存在session如果不存在就跳到登录界面
function UserOut() {
var kid = ${sessionScope.user.id};
if (!kid) {
top.location.href = '../../';
}
}
setInterval(UserOut, 5000); //每5秒检测一次
});
</script>
</body> </body>
</html> </html>

View File

@@ -1,254 +1,237 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title></title> <title></title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/outlook.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/outlook.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function NewTab(name, url, funId) { function NewTab(name, url, funId) {
window.funId = funId; window.funId = funId;
addTab(name, url, ''); addTab(name, url, '');
} }
</script> </script>
</head> </head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no"> <body class="easyui-layout" style="overflow-y: hidden" scroll="no">
<script> <script>
var pageid = getUrlParam('id'); //获取传值id var pageid = getUrlParam('id'); //获取传值id
var id=${sessionScope.user.id}; var id =${sessionScope.user.id};
//alert(pageid); //alert(pageid);
var userBusinessList = null; var userBusinessList = null;
var userBusinessID = null; var userBusinessID = null;
var type=null; var type = null;
var options = ""; var options = "";
var kid=null; var kid = null;
var lei=null; var lei = null;
var last=""; var last = "";
var functions=""; var functions = "";
var btnStrList = []; //按钮权限列表 var btnStrList = []; //按钮权限列表
//初始化界面 //初始化界面
$(function() $(function () {
{ //初始化系统基础信息
//初始化系统基础信息 initSystemData(id, 'UserRole');
initSystemData(id,'UserRole'); initSelectInfo(0);
initSelectInfo(0);
initSelect(); initSelect();
//ceshi(); //ceshi();
}); });
//初始化系统基础信息 //初始化系统基础信息
function initSystemData(kid,type) function initSystemData(kid, type) {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path%>/userBusiness/getBasicData.action",
url: "<%=path%>/userBusiness/getBasicData.action", data: ({
data: ({ KeyId: kid,
KeyId:kid, Type: type
Type:type }),
}), //设置为同步
//设置为同步 async: false,
async:false, dataType: "json",
dataType: "json", success: function (systemInfo) {
success: function (systemInfo) if (systemInfo) {
{ userBusinessList = systemInfo.showModel.map.userBusinessList;
if(systemInfo) var msgTip = systemInfo.showModel.msgTip;
{ if (msgTip == "exceptoin") {
userBusinessList = systemInfo.showModel.map.userBusinessList; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
var msgTip = systemInfo.showModel.msgTip; return;
if(msgTip == "exceptoin") }
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); else {
return; userBusinessList = null;
} }
} }
else });
{
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo(lei) {
if(userBusinessList !=null) {
if(userBusinessList.length>0) {
options =userBusinessList[0].value;
if(options!="") {
options=options.substring(1,options.length-1);
}
//app内列表赋值
if(lei==1) {
last+=options+'][';
}
//功能菜单列表
else if(lei==2) {
functions+=options+'][';
}
//按钮权限列表
else if(lei==3) {
var btnStr =userBusinessList[0].btnStr;
if(btnStr!=null){
btnStr = JSON.parse(btnStr);
for(var j=0; j<btnStr.length; j++){
btnStrList.push(btnStr[j]);
}
}
}
}
}
}
//初始化页面 //初始化页面选项卡
function initSelect() function initSelectInfo(lei) {
{ if (userBusinessList != null) {
var arr = options.split(']['); if (userBusinessList.length > 0) {
for(var i in arr){ options = userBusinessList[0].value;
initSystemData(arr[i],'RoleAPP'); //根据角色找app if (options != "") {
initSelectInfo(1);//app内列表赋值 options = options.substring(1, options.length - 1);
}
//app内列表赋值
if (lei == 1) {
last += options + '][';
}
//功能菜单列表
else if (lei == 2) {
functions += options + '][';
}
//按钮权限列表
else if (lei == 3) {
var btnStr = userBusinessList[0].btnStr;
if (btnStr != null) {
btnStr = JSON.parse(btnStr);
for (var j = 0; j < btnStr.length; j++) {
btnStrList.push(btnStr[j]);
}
}
}
}
}
}
initSystemData(arr[i],'RoleFunctions'); //根据角色找functions //初始化页面
initSelectInfo(2); //功能菜单列表 function initSelect() {
initSelectInfo(3); //查询角色对应的按钮权限 var arr = options.split('][');
} for (var i in arr) {
if(last!="") initSystemData(arr[i], 'RoleAPP'); //根据角色找app
{ initSelectInfo(1);//app内列表赋值
last="["+last.substring(0,last.length-1);
//alert(last);
if(last.indexOf("["+pageid+"]")!=-1) initSystemData(arr[i], 'RoleFunctions'); //根据角色找functions
{ initSelectInfo(2); //功能菜单列表
//alert("存在"); initSelectInfo(3); //查询角色对应的按钮权限
$("#west").show(); }
$("#mainPanle").show(); if (last != "") {
$("#mm").show(); last = "[" + last.substring(0, last.length - 1);
} //alert(last);
else
{
//alert("不存在");
$("div").remove();
$("<div style='width:100%;text-align:center;padding-top:20px'><b>抱歉,您没有该权限!</b></div>").appendTo("body");
}
}
if(functions!="")
{
functions="["+functions.substring(0,functions.length-1);
//alert(functions);
}
if(btnStrList.length>0){
window.winBtnStrList = JSON.stringify(btnStrList); //将按钮功能列表存为全局变量
}
}
//测试自定义hql if (last.indexOf("[" + pageid + "]") != -1) {
function ceshi() //alert("存在");
{ $("#west").show();
$.ajax({ $("#mainPanle").show();
type:"post", $("#mm").show();
url: "<%=path%>/userBusiness/getceshi.action", }
data: ({ else {
Type:"UserRole" //alert("不存在");
}), $("div").remove();
//设置为同步 $("<div style='width:100%;text-align:center;padding-top:20px'><b>抱歉,您没有该权限!</b></div>").appendTo("body");
async:false, }
dataType: "json", }
success: function (systemInfo) if (functions != "") {
{ functions = "[" + functions.substring(0, functions.length - 1);
if(systemInfo) //alert(functions);
{ }
userBusinessList = systemInfo.showModel.map.userBusinessList; if (btnStrList.length > 0) {
var msgTip = systemInfo.showModel.msgTip; window.winBtnStrList = JSON.stringify(btnStrList); //将按钮功能列表存为全局变量
if(msgTip == "exceptoin") }
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error');
return;
}
}
else
{
userBusinessList=null;
}
}
});
if(userBusinessList !=null) //测试自定义hql
{ function ceshi() {
if(userBusinessList.length>0) $.ajax({
{ type: "post",
alert(userBusinessList[0][0]); url: "<%=path%>/userBusiness/getceshi.action",
alert(userBusinessList[0][1]); data: ({
} Type: "UserRole"
} }),
} //设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
if (systemInfo) {
userBusinessList = systemInfo.showModel.map.userBusinessList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
return;
}
}
else {
userBusinessList = null;
}
}
});
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
alert(userBusinessList[0][0]);
alert(userBusinessList[0][1]);
}
}
}
</script> </script>
<div region="west" hide="true" split="true" title="导航菜单" style="width:125px;" id="west"> <div region="west" hide="true" split="true" title="导航菜单" style="width:125px;" id="west">
<div id="nav" fit="true" border="false"> <div id="nav" fit="true" border="false">
<!-- 导航内容 --> <!-- 导航内容 -->
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
<script> <script>
var PNumber = getUrlParam('appID'); //获取传值appid var PNumber = getUrlParam('appID'); //获取传值appid
$(function(){ $(function () {
$('#tt').tree({ $('#tt').tree({
url:'<%=path%>/functions/findMenu.action?PNumber='+PNumber+'&hasFunctions='+functions, url: '<%=path%>/functions/findMenu.action?PNumber=' + PNumber + '&hasFunctions=' + functions,
animate:true animate: true
}); });
}); });
</script> </script>
</div>
</div> </div>
</div> </div>
<div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden"> </div>
<div id="tabs" class="easyui-tabs" fit="true" border="false"></div> <div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden">
<div id="tabs" class="easyui-tabs" fit="true" border="false"></div>
</div>
<div id="mm" class="easyui-menu" style="width: 120px;">
<div id="mm-tabupdate">
刷新
</div> </div>
<div id="mm" class="easyui-menu" style="width: 120px;"> <div class="menu-sep">
<div id="mm-tabupdate">
刷新
</div>
<div class="menu-sep">
</div>
<div id="mm-tabclose">
关闭
</div>
<div id="mm-tabcloseall">
全部关闭
</div>
<div id="mm-tabcloseother">
关闭其他页
</div>
<div class="menu-sep">
</div>
<div id="mm-tabcloseright">
关闭右侧页面
</div>
<div id="mm-tabcloseleft">
关闭左侧页面
</div>
<div class="menu-sep">
</div>
<div id="mm-version">
华夏ERP官网
</div>
</div> </div>
<div id="mm-tabclose">
关闭
</div>
<div id="mm-tabcloseall">
全部关闭
</div>
<div id="mm-tabcloseother">
关闭其他页
</div>
<div class="menu-sep">
</div>
<div id="mm-tabcloseright">
关闭右侧页面
</div>
<div id="mm-tabcloseleft">
关闭左侧页面
</div>
<div class="menu-sep">
</div>
<div id="mm-version">
华夏ERP官网
</div>
</div>
</body> </body>
</html> </html>

View File

@@ -1,34 +1,32 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
</head> </head>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ init();
init(); });
});
function init() function init() {
{
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,152 +1,162 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>收预付款</title> <title>收预付款</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收预付款列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收预付款列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">付款会员:</td> <td style="width:60px;">付款会员:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:110px;"></select> <select name="OrganId" id="OrganId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">经手人:</td> <td style="width:70px;">经手人:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select> <select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:80px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px;width:170px;"> </td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:80px;">单据编号:</td>
</td> <td style="padding:5px;width:170px;">
<td style="width:100px;"></td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 单据列表table --> </tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 单据列表table -->
<tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>优惠金额:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 110px;" /> </tr>
</td> <tr>
</tr> <td>优惠金额:</td>
</table> <td style="padding:5px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
</form> data-options="min:0,precision:2" style="width: 110px;"/>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">付款会员:</td> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:140px;"> </div>
<span id="OrganIdShow"></span> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">经手人:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="HandsPersonIdShow"></span> <td style="width:60px;">付款会员:</td>
</td> <td style="padding:5px;width:140px;">
<td style="width:70px;">单据日期:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:130px;"> </td>
<span id="BillTimeShow"></span> <td style="width:70px;">经手人:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="HandsPersonIdShow"></span>
<td style="padding:5px;width:130px;"> </td>
<span id="BillNoShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:100px;"></td> <span id="BillTimeShow"></span>
</tr> </td>
<tr> <td style="width:80px;">单据编号:</td>
<td colspan="9" style="width: 1130px;"> <td style="padding:5px;width:130px;">
<!-- 单据列表table --> <span id="BillNoShow"></span>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> </td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 单据列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>优惠金额</td> <td style="width:60px;">单据备注</td>
<td style="padding:5px;width:120px;"> <td colspan="8" style="height:35px;">
<span id="ChangeAmountShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
</tr> </tr>
</table> <tr>
</div> <td>优惠金额:</td>
</body> <td style="padding:5px;width:120px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,157 +1,167 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>转账单</title> <title>转账单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="转账单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="转账单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">经手人:</td> <td style="width:60px;">经手人:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select> <select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:80px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px;width:170px;"> </td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:80px;">单据编号:</td>
</td> <td style="padding:5px;width:170px;">
<td style="width:70px;"></td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
<td style="padding:5px"> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td> </td>
<td style="width:100px;"></td> <td style="width:70px;"></td>
</tr> <td style="padding:5px">
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 单据列表table --> </tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 单据列表table -->
<tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>付款账户:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<select id="AccountId" name="AccountId" style="width:110px;"></select> </tr>
</td> <tr>
<td>实付金额</td> <td>付款账户</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 110px;"></input> <select id="AccountId" name="AccountId" style="width:110px;"></select>
</td> </td>
</tr> <td>实付金额:</td>
</table> <td style="padding:5px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
</form> data-options="min:0,precision:2" style="width: 110px;"></input>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">经手人:</td> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="HandsPersonIdShow"></span> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">单据日期:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="BillTimeShow"></span> <td style="width:60px;">经手人:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="HandsPersonIdShow"></span>
<td style="padding:5px;width:130px;"> </td>
<span id="BillNoShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:50px;"></td> <span id="BillTimeShow"></span>
<td style="padding:5px;width:110px;"></td> </td>
<td style="width:100px;"></td> <td style="width:80px;">单据编号:</td>
</tr> <td style="padding:5px;width:130px;">
<tr> <span id="BillNoShow"></span>
<td colspan="9" style="width: 1130px;"> </td>
<!-- 单据列表table --> <td style="width:50px;"></td>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="padding:5px;width:110px;"></td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 单据列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>付款账户</td> <td style="width:60px;">单据备注</td>
<td style="padding:5px"> <td colspan="8" style="height:35px;">
<span id="AccountIdShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>实付金额:</td> </tr>
<td style="padding:5px"> <tr>
<span id="ChangeAmountShow"></span> <td>付款账户:</td>
</td> <td style="padding:5px">
</tr> <span id="AccountIdShow"></span>
</table> </td>
</div> <td>实付金额:</td>
</body> <td style="padding:5px">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,160 +1,170 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>收入单</title> <title>收入单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收入单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收入单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">往来单位:</td> <td style="width:60px;">往来单位:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select> <select name="OrganId" id="OrganId" style="width:130px;"></select>
</td> </td>
<td style="width:70px;">经手人:</td> <td style="width:70px;">经手人:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select> <select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px;width:170px;"> </td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px;width:170px;">
<td style="width:100px;"></td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 单据列表table --> </tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 单据列表table -->
<tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>收款账户:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<select id="AccountId" name="AccountId" style="width:110px;"></select> </tr>
</td> <tr>
<td>收款金额</td> <td>收款账户</td>
<td> <td style="padding:5px">
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 120px;" /> <select id="AccountId" name="AccountId" style="width:110px;"></select>
</td> </td>
</tr> <td>收款金额:</td>
</table> <td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
</form> data-options="min:0,precision:2" style="width: 120px;"/>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">往来单位:</td> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="OrganIdShow"></span> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">经手人:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="HandsPersonIdShow"></span> <td style="width:60px;">往来单位:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:70px;">单据日期:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:130px;"> </td>
<span id="BillTimeShow"></span> <td style="width:70px;">经手人:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="HandsPersonIdShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="BillNoShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:100px;"></td> <span id="BillTimeShow"></span>
</tr> </td>
<tr> <td style="width:80px;">单据编号:</td>
<td colspan="9" style="width: 1130px;"> <td style="padding:5px;width:140px;">
<!-- 单据列表table --> <span id="BillNoShow"></span>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> </td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 单据列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>收款账户</td> <td style="width:60px;">单据备注</td>
<td style="padding:5px;"> <td colspan="8" style="height:35px;">
<span id="AccountIdShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>收款金额:</td> </tr>
<td style="padding:5px;"> <tr>
<span id="ChangeAmountShow"></span> <td>收款账户:</td>
</td> <td style="padding:5px;">
</tr> <span id="AccountIdShow"></span>
</table> </td>
</div> <td>收款金额:</td>
</body> <td style="padding:5px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,157 +1,167 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>支出单</title> <title>支出单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="支出单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="支出单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">往来单位:</td> <td style="width:60px;">往来单位:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select> <select name="OrganId" id="OrganId" style="width:130px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px;width:170px;"> </td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px;width:170px;">
<td style="width:70px;"></td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
<td style="padding:5px"> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td> </td>
<td style="width:100px;"></td> <td style="width:70px;"></td>
</tr> <td style="padding:5px">
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 单据列表table --> </tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 单据列表table -->
<tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>付款账户:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<select id="AccountId" name="AccountId" style="width:110px;"></select> </tr>
</td> <tr>
<td>付款金额</td> <td>付款账户</td>
<td> <td style="padding:5px">
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 120px;" /> <select id="AccountId" name="AccountId" style="width:110px;"></select>
</td> </td>
</tr> <td>付款金额:</td>
</table> <td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
</form> data-options="min:0,precision:2" style="width: 120px;"/>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">往来单位:</td> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="OrganIdShow"></span> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">单据日期:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="BillTimeShow"></span> <td style="width:60px;">往来单位:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="BillNoShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:70px;"></td> <span id="BillTimeShow"></span>
<td style="width:140px;"></td> </td>
<td style="width:100px;"></td> <td style="width:80px;">单据编号:</td>
</tr> <td style="padding:5px;width:140px;">
<tr> <span id="BillNoShow"></span>
<td colspan="9" style="width: 1130px;"> </td>
<!-- 单据列表table --> <td style="width:70px;"></td>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:140px;"></td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 单据列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>付款账户</td> <td style="width:60px;">单据备注</td>
<td style="padding:5px;"> <td colspan="8" style="height:35px;">
<span id="AccountIdShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>付款金额:</td> </tr>
<td style="padding:5px;"> <tr>
<span id="ChangeAmountShow"></span> <td>付款账户:</td>
</td> <td style="padding:5px;">
</tr> <span id="AccountIdShow"></span>
</table> </td>
</div> <td>付款金额:</td>
</body> <td style="padding:5px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,152 +1,162 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>收款单</title> <title>收款单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收款单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收款单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">付款单位:</td> <td style="width:60px;">付款单位:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select> <select name="OrganId" id="OrganId" style="width:130px;"></select>
</td> </td>
<td style="width:70px;">经手人:</td> <td style="width:70px;">经手人:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select> <select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px;width:170px;"> </td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px;width:170px;">
<td style="width:100px;"></td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 单据列表table --> </tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 单据列表table -->
<tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>优惠金额:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 110px;" /> </tr>
</td> <tr>
</tr> <td>优惠金额:</td>
</table> <td style="padding:5px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
</form> data-options="min:0,precision:2" style="width: 110px;"/>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">付款单位:</td> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="OrganIdShow"></span> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">经手人:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="HandsPersonIdShow"></span> <td style="width:60px;">付款单位:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:70px;">单据日期:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:130px;"> </td>
<span id="BillTimeShow"></span> <td style="width:70px;">经手人:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="HandsPersonIdShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="BillNoShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:100px;"></td> <span id="BillTimeShow"></span>
</tr> </td>
<tr> <td style="width:80px;">单据编号:</td>
<td colspan="9" style="width: 1130px;"> <td style="padding:5px;width:140px;">
<!-- 单据列表table --> <span id="BillNoShow"></span>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> </td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 单据列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>优惠金额</td> <td style="width:60px;">单据备注</td>
<td style="padding:5px;width:120px;"> <td colspan="8" style="height:35px;">
<span id="ChangeAmountShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
</tr> </tr>
</table> <tr>
</div> <td>优惠金额:</td>
</body> <td style="padding:5px;width:120px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,152 +1,161 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>付款单</title> <title>付款单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script> <script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/> <td>
</td> <input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="付款单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="付款单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="accountHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="accountHeadFM" method="post" novalidate> <form id="accountHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">收款单位:</td> <td style="width:60px;">收款单位:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select> <select name="OrganId" id="OrganId" style="width:130px;"></select>
</td> </td>
<td style="width:70px;">经手人:</td> <td style="width:70px;">经手人:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select> <select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
</td> class="txt Wdate" style="width:140px;"/>
<td style="width:70px;">单据编号:</td> </td>
<td style="padding:5px;width:170px;"> <td style="width:70px;">单据编号:</td>
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="padding:5px;width:170px;">
</td> <input name="BillNo" id="BillNo" class="easyui-validatebox"
<td style="width:100px;"></td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</tr> </td>
<tr> <td style="width:100px;"></td>
<td colspan="9"> </tr>
<!-- 单据列表table --> <tr>
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table> <td colspan="9">
</td> <!-- 单据列表table -->
</tr> <table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<tr> </td>
<td colspan="9"> </tr>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> <tr>
</td> <td colspan="9">
</tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<tr> style="width: 1130px; height:35px;"></textarea>
<td>优惠金额:</td> </td>
<td style="padding:5px"> </tr>
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 110px;" /> <tr>
</td> <td>优惠金额:</td>
</tr> <td style="padding:5px">
</table> <input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> data-options="min:0,precision:2" style="width: 110px;"/>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
<td style="width:60px;">收款单位:</td> </div>
<td style="padding:5px;width:130px;"> <div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
<span id="OrganIdShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">经手人:</td> <tr>
<td style="padding:5px;width:130px;"> <td style="width:60px;">收款单位:</td>
<span id="HandsPersonIdShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OrganIdShow"></span>
<td style="width:70px;">单据日期:</td> </td>
<td style="padding:5px;width:130px;"> <td style="width:70px;">经手人:</td>
<span id="BillTimeShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="HandsPersonIdShow"></span>
<td style="width:80px;">单据编号:</td> </td>
<td style="padding:5px;width:140px;"> <td style="width:70px;">单据日期:</td>
<span id="BillNoShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="BillTimeShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td style="width:80px;">单据编号:</td>
<tr> <td style="padding:5px;width:140px;">
<td colspan="9" style="width: 1130px;"> <span id="BillNoShow"></span>
<!-- 单据列表table --> </td>
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 单据列表table -->
<td colspan="8" style="height:35px;"> <table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
<tr> <td style="width:60px;">单据备注:</td>
<td>优惠金额:</td> <td colspan="8" style="height:35px;">
<td style="padding:5px;width:120px;"> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
<span id="ChangeAmountShow"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td>优惠金额:</td>
</div> <td style="padding:5px;width:120px;">
</body> <span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,505 +1,460 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta charset="utf-8" /> <meta charset="utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<div id="position" class="easyui-panel" title="当前位置:系统管理 &gt; 资产类型" collapsible="false" closable="false"/> <div id="position" class="easyui-panel" title="当前位置:系统管理 &gt; 资产类型" collapsible="false" closable="false"/>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>类型名称:</td> <tr>
<td> <td>类型名称:</td>
<input type="text" name="searchCategory" id="searchCategory" style="width:230px;"/> <td>
</td> <input type="text" name="searchCategory" id="searchCategory" style="width:230px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td id="searchDescLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td> <td>&nbsp;</td>
<td> <td id="searchDescLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td>
<input type="text" name="searchDesc" id="searchDesc" style="width:230px;"/> <td>
</td> <input type="text" name="searchDesc" id="searchDesc" style="width:230px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="类型列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="类型列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="categoryDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="categoryDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="categoryFM" method="post" novalidate> <form id="categoryFM" method="post" novalidate>
<div class="fitem" style="padding:5px"> <div class="fitem" style="padding:5px">
<label id="categoryNameLabel">类型名称&nbsp;&nbsp;</label> <label id="categoryNameLabel">类型名称&nbsp;&nbsp;</label>
<input name="categoryName" id="categoryName" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/> <input name="categoryName" id="categoryName" class="easyui-validatebox"
</div> data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
<div class="fitem" style="padding:5px;"> </div>
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px;">
<textarea name="description" id="description" rows="2" cols="2" style="width: 230px;"></textarea> <label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
</div> <textarea name="description" id="description" rows="2" cols="2" style="width: 230px;"></textarea>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </div>
</form> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="dlg-buttons"> </div>
<a href="javascript:void(0)" id="saveCategory" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <div id="dlg-buttons">
<a href="javascript:void(0)" id="cancelCategory" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#categoryDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="saveCategory" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> <a href="javascript:void(0)" id="cancelCategory" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#categoryDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); initForm();
initForm(); browserFit();
browserFit(); });
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE') {
if(getOs()=='MSIE') $("#searchDescLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:");
{ $("#categoryNameLabel").empty().append("类型名称&nbsp;&nbsp;");
$("#searchDescLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述"); $("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;");
$("#categoryNameLabel").empty().append("类型名称&nbsp;&nbsp;"); }
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;"); else {
} $("#searchDescLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:");
else $("#categoryNameLabel").empty().append("类型名称&nbsp;");
{ $("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
$("#searchDescLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:"); }
$("#categoryNameLabel").empty().append("类型名称&nbsp;"); }
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
//防止表单提交重复 //防止表单提交重复
function initForm() function initForm() {
{ $('#categoryFM').form({
$('#categoryFM').form({ onSubmit: function () {
onSubmit: function(){ return false;
return false; }
} });
}); }
}
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ //title:'供应商列表',
//title:'供应商列表', //iconCls:'icon-save',
//iconCls:'icon-save', //width:700,
//width:700, height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: false,
rownumbers: false, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, collapsible: false,
collapsible:false, selectOnCheck: false,
selectOnCheck:false, //fitColumns:true,
//fitColumns:true, //单击行是否选中
//单击行是否选中 checkOnSelect: false,
checkOnSelect : false, url: '<%=path %>/category/findBy.action?pageSize=' + initPageSize,
url:'<%=path %>/category/findBy.action?pageSize=' + initPageSize, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: initPageSize,
pageSize: initPageSize, pageList: initPageNum,
pageList: initPageNum, columns: [[
columns:[[ {field: 'id', width: 35, align: "center", checkbox: true},
{ field: 'id',width:35,align:"center",checkbox:true}, {title: '资产类型', field: 'categoryname', width: 200},
{ title: '资产类型',field: 'categoryname',width:200}, {title: '描述', field: 'description', width: 400},
{ title: '描述',field: 'description',width:400}, {
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec) title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
{ var str = '';
var str = ''; var rowInfo = rec.id + 'AaBb' + rec.categoryname + 'AaBb' + rec.isystem + 'AaBb' + rec.description;
var rowInfo = rec.id + 'AaBb' + rec.categoryname + 'AaBb' + rec.isystem + 'AaBb' + rec.description; if (1 == value) {
if(1 == value) str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editCategory(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editCategory(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
{ str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteCategory(' + rec.id + ');"/>&nbsp;<a onclick="deleteCategory(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editCategory(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editCategory(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; }
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteCategory('+ rec.id +');"/>&nbsp;<a onclick="deleteCategory('+ rec.id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;'; return str;
} }
return str; }
} ]],
} toolbar: [
]], {
toolbar:[ id: 'addSupplier',
{ text: '增加',
id:'addSupplier', iconCls: 'icon-add',
text:'增加', handler: function () {
iconCls:'icon-add', addCategory();
handler:function() }
{ },
addCategory(); {
} id: 'deleteSupplier',
}, text: '删除',
{ iconCls: 'icon-remove',
id:'deleteSupplier', handler: function () {
text:'删除', batDeleteCategory();
iconCls:'icon-remove', }
handler:function() }
{ ],
batDeleteCategory(); onLoadError: function () {
} $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
], }
onLoadError:function() });
{ }
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 if (k == "13" && (obj.id == "categoryName" || obj.id == "description")) {
if(k == "13"&&(obj.id=="categoryName"|| obj.id=="description" )) $("#saveCategory").click();
{ }
$("#saveCategory").click(); //搜索按钮添加快捷键
} if (k == "13" && (obj.id == "searchCategory" || obj.id == "searchDesc")) {
//搜索按钮添加快捷键 $("#searchBtn").click();
if(k == "13"&&(obj.id=="searchCategory" || obj.id=="searchDesc" )) }
{ });
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showCategoryDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除供应商信息 //分页信息处理
function deleteCategory(categoryID) function ininPager() {
{ try {
$.messager.confirm('删除确认','确定要删除此资产类型信息吗?',function(r) var opts = $("#tableData").datagrid('options');
{ var pager = $("#tableData").datagrid('getPager');
if (r) pager.pagination({
{ onSelectPage: function (pageNum, pageSize) {
$.ajax({ opts.pageNumber = pageNum;
type:"post", opts.pageSize = pageSize;
url: "<%=path %>/category/delete.action", pager.pagination('refresh',
dataType: "json", {
data: ({ pageNumber: pageNum,
categoryID : categoryID, pageSize: pageSize
clientIp:'<%=clientIp %>' });
}), showCategoryDetails(pageNum, pageSize);
success: function (tipInfo) }
{ });
var msg = tipInfo.showModel.msgTip; }
if(msg == '成功') catch (e) {
{ $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
//加载完以后重新初始化 }
$("#searchBtn").click(); }
}
else //删除供应商信息
$.messager.alert('删除提示','删除资产类别信息失败,请稍后再试!','error'); function deleteCategory(categoryID) {
}, $.messager.confirm('删除确认', '确定要删除此资产类型信息吗?', function (r) {
//此处添加错误处理 if (r) {
error:function() $.ajax({
{ type: "post",
$.messager.alert('删除提示','删除资产类别信息异常,请稍后再试!','error'); url: "<%=path %>/category/delete.action",
return; dataType: "json",
} data: ({
}); categoryID: categoryID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除资产类别信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除资产类别信息异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
}
//批量删除供应商 //批量删除供应商
function batDeleteCategory() function batDeleteCategory() {
{ var row = $('#tableData').datagrid('getChecked');
var row = $('#tableData').datagrid('getChecked'); if (row.length == 0) {
if(row.length == 0) $.messager.alert('删除提示', '没有记录被选中!', 'info');
{ return;
$.messager.alert('删除提示','没有记录被选中!','info'); }
return; if (row.length > 0) {
} $.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条资产类别信息吗?', function (r) {
if(row.length > 0) if (r) {
{ var ids = "";
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条资产类别信息吗?',function(r) for (var i = 0; i < row.length; i++) {
{ if (i == row.length - 1) {
if (r) ids += row[i].id;
{ break;
var ids = ""; }
for(var i = 0;i < row.length; i ++) //alert(row[i].id);
{ ids += row[i].id + ",";
if(i == row.length-1) }
{ $.ajax({
ids += row[i].id; type: "post",
break; url: "<%=path %>/category/batchDelete.action",
} dataType: "json",
//alert(row[i].id); async: false,
ids += row[i].id + ","; data: ({
} categoryIDs: ids,
$.ajax({ clientIp: '<%=clientIp %>'
type:"post", }),
url: "<%=path %>/category/batchDelete.action", success: function (tipInfo) {
dataType: "json", var msg = tipInfo.showModel.msgTip;
async : false, if (msg == '成功') {
data: ({ //加载完以后重新初始化
categoryIDs : ids, $("#searchBtn").click();
clientIp:'<%=clientIp %>' $(":checkbox").attr("checked", false);
}), }
success: function (tipInfo) else
{ $.messager.alert('删除提示', '删除资产类别信息失败,请稍后再试!', 'error');
var msg = tipInfo.showModel.msgTip; },
if(msg == '成功') //此处添加错误处理
{ error: function () {
//加载完以后重新初始化 $.messager.alert('删除提示', '删除资产类别信息异常,请稍后再试!', 'error');
$("#searchBtn").click(); return;
$(":checkbox").attr("checked",false); }
} });
else }
$.messager.alert('删除提示','删除资产类别信息失败,请稍后再试!','error'); });
}, }
//此处添加错误处理 }
error:function()
{
$.messager.alert('删除提示','删除资产类别信息异常,请稍后再试!','error');
return;
}
});
}
});
}
}
//增加 //增加
var url; var url;
var categoryID = 0; var categoryID = 0;
//保存编辑前的名称 //保存编辑前的名称
var orgCategory = ""; var orgCategory = "";
function addCategory() function addCategory() {
{ $("#clientIp").val('<%=clientIp %>');
$("#clientIp").val('<%=clientIp %>'); $("#description").val("");
$("#description").val(""); $('#categoryDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加资产类型信息');
$('#categoryDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加资产类型信息'); $(".window-mask").css({width: webW, height: webH});
$(".window-mask").css({ width: webW ,height: webH}); $("#categoryName").val("").focus();
$("#categoryName").val("").focus(); //$('#categoryFM').form('clear');
//$('#categoryFM').form('clear');
orgCategory = ""; orgCategory = "";
categoryID = 0; categoryID = 0;
url = '<%=path %>/category/create.action'; url = '<%=path %>/category/create.action';
} }
//保存信息 //保存信息
$("#saveCategory").unbind().bind({ $("#saveCategory").unbind().bind({
click:function() click: function () {
{ if (!$('#categoryFM').form('validate'))
if(!$('#categoryFM').form('validate')) return;
return; else if (checkCategoryName())
else if(checkCategoryName()) return;
return; else {
else $.ajax({
{ type: "post",
$.ajax({ url: url,
type:"post", dataType: "json",
url: url, async: false,
dataType: "json", data: ({
async : false, categoryName: $.trim($("#categoryName").val()),
data: ({ description: $.trim($("#description").val()),
categoryName : $.trim($("#categoryName").val()), clientIp: '<%=clientIp %>'
description : $.trim($("#description").val()), }),
clientIp:'<%=clientIp %>' success: function (tipInfo) {
}), if (tipInfo) {
success: function (tipInfo) $('#categoryDlg').dialog('close');
{
if(tipInfo)
{
$('#categoryDlg').dialog('close');
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
showCategoryDetails(opts.pageNumber,opts.pageSize); showCategoryDetails(opts.pageNumber, opts.pageSize);
} }
else else {
{ $.messager.show({
$.messager.show({ title: '错误提示',
title: '错误提示', msg: '保存资产类别信息失败,请稍后重试!'
msg: '保存资产类别信息失败,请稍后重试!' });
}); }
} },
}, //此处添加错误处理
//此处添加错误处理 error: function () {
error:function() $.messager.alert('提示', '保存资产类型信息异常,请稍后再试!', 'error');
{ return;
$.messager.alert('提示','保存资产类型信息异常,请稍后再试!','error'); }
return; });
} }
}); }
} });
}
});
//编辑信息 //编辑信息
function editCategory(categoryTotalInfo) function editCategory(categoryTotalInfo) {
{ var categoryInfo = categoryTotalInfo.split("AaBb");
var categoryInfo = categoryTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
$("#categoryName").focus().val(categoryInfo[1]); $("#categoryName").focus().val(categoryInfo[1]);
$("#description").val(categoryInfo[3]); $("#description").val(categoryInfo[3]);
orgCategory = categoryInfo[1]; orgCategory = categoryInfo[1];
$('#categoryDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑资产类型信息'); $('#categoryDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑资产类型信息');
$(".window-mask").css({ width: webW ,height: webH}); $(".window-mask").css({width: webW, height: webH});
categoryID = categoryInfo[0]; categoryID = categoryInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#categoryName").val("").focus().val(categoryInfo[1]); $("#categoryName").val("").focus().val(categoryInfo[1]);
url = '<%=path %>/category/update.action?categoryID=' + categoryInfo[0]; url = '<%=path %>/category/update.action?categoryID=' + categoryInfo[0];
} }
//检查名称是否存在 ++ 重名无法提示问题需要跟进 //检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkCategoryName() function checkCategoryName() {
{ var categoryName = $.trim($("#categoryName").val());
var categoryName = $.trim($("#categoryName").val()); //表示是否存在 true == 存在 false = 不存在
//表示是否存在 true == 存在 false = 不存在 var flag = false;
var flag = false; //开始ajax名称检验不能重名
//开始ajax名称检验不能重名 if (categoryName.length > 0 && (orgCategory.length == 0 || categoryName != orgCategory)) {
if(categoryName.length > 0 &&( orgCategory.length ==0 || categoryName != orgCategory)) $.ajax({
{ type: "post",
$.ajax({ url: "<%=path %>/category/checkIsNameExist.action",
type:"post", dataType: "json",
url: "<%=path %>/category/checkIsNameExist.action", async: false,
dataType: "json", data: ({
async : false, categoryID: categoryID,
data: ({ categoryName: categoryName
categoryID : categoryID, }),
categoryName : categoryName success: function (tipInfo) {
}), flag = tipInfo;
success: function (tipInfo) if (tipInfo) {
{ $.messager.alert('提示', '资产类型名称已经存在', 'info');
flag = tipInfo; //alert("供应商名称已经存在");
if(tipInfo) //$("#supplier").val("");
{ return;
$.messager.alert('提示','资产类型名称已经存在','info'); }
//alert("供应商名称已经存在"); },
//$("#supplier").val(""); //此处添加错误处理
return; error: function () {
} $.messager.alert('提示', '检查资产类型名称是否存在异常,请稍后再试!', 'error');
}, return;
//此处添加错误处理 }
error:function() });
{ }
$.messager.alert('提示','检查资产类型名称是否存在异常,请稍后再试!','error'); return flag;
return; }
}
});
}
return flag;
}
//搜索处理 //搜索处理
$("#searchBtn").unbind().bind({ $("#searchBtn").unbind().bind({
click:function() click: function () {
{ showCategoryDetails(1, initPageSize);
showCategoryDetails(1,initPageSize); var opts = $("#tableData").datagrid('options');
var opts = $("#tableData").datagrid('options'); var pager = $("#tableData").datagrid('getPager');
var pager = $("#tableData").datagrid('getPager'); opts.pageNumber = 1;
opts.pageNumber = 1; opts.pageSize = initPageSize;
opts.pageSize = initPageSize; pager.pagination('refresh',
pager.pagination('refresh', {
{ pageNumber: 1,
pageNumber:1, pageSize: initPageSize
pageSize:initPageSize });
}); }
} });
});
function showCategoryDetails(pageNo,pageSize) function showCategoryDetails(pageNo, pageSize) {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path %>/category/findBy.action",
url: "<%=path %>/category/findBy.action", dataType: "json",
dataType: "json", data: ({
data: ({ categoryName: $.trim($("#searchCategory").val()),
categoryName:$.trim($("#searchCategory").val()), description: $.trim($("#searchDesc").val()),
description:$.trim($("#searchDesc").val()), pageNo: pageNo,
pageNo:pageNo, pageSize: pageSize
pageSize:pageSize }),
}), success: function (data) {
success: function (data) $("#tableData").datagrid('loadData', data);
{ },
$("#tableData").datagrid('loadData',data); //此处添加错误处理
}, error: function () {
//此处添加错误处理 $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
error:function() return;
{ }
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); });
return; }
}
});
}
//重置按钮 //重置按钮
$("#searchResetBtn").unbind().bind({ $("#searchResetBtn").unbind().bind({
click:function(){ click: function () {
$("#searchCategory").val(""); $("#searchCategory").val("");
$("#searchDesc").val(""); $("#searchDesc").val("");
//加载完以后重新初始化 //加载完以后重新初始化
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,185 +1,198 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>客户信息</title> <title>客户信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/manage/supplier.js"></script> <script src="<%=path %>/js/pages/manage/supplier.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td> <tr>
<td> <td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/> <td>
</td> <input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>手机号码:</td> <td>&nbsp;</td>
<td> <td>手机号码:</td>
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/> <td>
</td> <input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>联系电话:</td> <td>&nbsp;</td>
<td> <td>联系电话:</td>
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/> <td>
</td> <input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td> <td>&nbsp;</td>
<td> <td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/> <td>
</td> <input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户信息列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户信息列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px" </div>
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true"> <div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
<form id="supplierFM"> closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<table> <form id="supplierFM">
<tr> <table>
<td style="width: 80px;height: 20px">名称</td> <tr>
<td style="width: 180px;padding:1px"> <td style="width: 80px;height: 20px">名称</td>
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/> <td style="width: 180px;padding:1px">
</td> <input name="supplier" id="supplier" class="easyui-validatebox"
<td style="width: 60px;height: 20px">联系人</td> data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
<td style="width:180px;padding:1px;"> </td>
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="width: 60px;height: 20px">联系人</td>
</td> <td style="width:180px;padding:1px;">
</tr> <input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<tr> </td>
<td>手机号码</td> </tr>
<td style="padding:1px;"> <tr>
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>手机号码</td>
</td> <td style="padding:1px;">
<td>电子邮箱</td> <input name="telephone" id="telephone" class="easyui-validatebox"
<td style="padding:1px"> style="width: 160px;height: 20px"/>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/> </td>
</td> <td>电子邮箱</td>
</tr> <td style="padding:1px">
<tr> <input name="email" id="email" class="easyui-validatebox" validType="email"
<td>联系电话</td> style="width: 160px;height: 20px"/>
<td style="padding:1px;"> </td>
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
<td>传真</td> <td>联系电话</td>
<td style="padding:1px"> <td style="padding:1px;">
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/> <input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td> </td>
</tr> <td>传真</td>
<tr> <td style="padding:1px">
<td>期初应收</td> <input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> </tr>
</td> <tr>
<td>期初应</td> <td>期初应</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> <input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
</td> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</tr> </td>
<tr> <td>期初应付</td>
<td>累计应收</td> <td style="padding:1px">
<td style="padding:1px"> <input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px" readonly="readonly" /> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</td> </td>
<td>累计应付</td> </tr>
<td style="padding:1px"> <tr>
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px" readonly="readonly" /> <td>累计应收</td>
</td> <td style="padding:1px">
</tr> <input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
<tr> readonly="readonly"/>
<td>纳税人识别号</td> </td>
<td style="padding:1px"> <td>累计应付</td>
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="padding:1px">
</td> <input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
<td>税率</td> readonly="readonly"/>
<td style="padding:1px"> </td>
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>纳税人识别号</td>
<tr> <td style="padding:1px">
<td>开户行</td> <input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>税率</td>
</td> <td style="padding:1px">
<td>账号</td> <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>开户行</td>
<tr> <td style="padding:1px">
<td>地址</td> <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px" colspan="3"> </td>
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/> <td>账号</td>
</td> <td style="padding:1px">
</tr> <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
<tr> style="width: 160px;height: 20px"/>
<td>备注</td> </td>
<td style="padding:1px" colspan="3"> </tr>
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea> <tr>
</td> <td>地址</td>
</tr> <td style="padding:1px" colspan="3">
</table> <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> <tr>
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td>备注</td>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a> <td style="padding:1px" colspan="3">
</div> <textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
<!-- 导入excel表格 --> <!-- 导入excel表格 -->
<div id="importExcelDlg" style="padding:10px 20px"> <div id="importExcelDlg" style="padding:10px 20px">
<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/supplier/importExcelCustomer.action"> <form id="importExcelFM" method="post" enctype="multipart/form-data"
<div class="fitem" style="padding:5px"> action="<%=path%>/supplier/importExcelCustomer.action">
<label>文件名称&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px">
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/> <label>文件名称&nbsp;&nbsp;</label>
</div> <input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
<div class="fitem" style="padding:5px"> </div>
<label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span> <div class="fitem" style="padding:5px">
</div> <label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span>
<div class="fitem" style="padding:5px;display: none;"> </div>
<label>是否审查&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px;display: none;">
<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px"> <label>是否审查&nbsp;&nbsp;</label>
<option value="0">是</option> <select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
<option value="1" selected="selected"></option> <option value="0"></option>
</select> <option value="1" selected="selected">否</option>
</div> </select>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </div>
<div id="dlg-buttons5"> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a> <div id="dlg-buttons5">
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
</div> <a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
</form> onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
</div> </div>
</body> </form>
</div>
</body>
</html> </html>

View File

@@ -1,511 +1,496 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>仓库管理</title> <title>仓库管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>仓库名称:</td> <tr>
<td> <td>仓库名称:</td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td id="searchRemarkLabel">描述:</td> <td>&nbsp;</td>
<td> <td id="searchRemarkLabel">描述:</td>
<input type="text" name="searchRemark" id="searchRemark" style="width:100px;"/> <td>
</td> <input type="text" name="searchRemark" id="searchRemark" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="仓库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="仓库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotFM" method="post" novalidate> <form id="depotFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>仓库名称</td> <td>仓库名称</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/> <input name="name" id="name" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</tr> </td>
<tr> </tr>
<td>仓库地址</td> <tr>
<td style="padding:5px"> <td>仓库地址</td>
<input name="address" id="address" class="easyui-validatebox" data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/> <td style="padding:5px">
</td> <input name="address" id="address" class="easyui-validatebox"
</tr> data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
<tr> </td>
<td>仓储费</td> </tr>
<td style="padding:5px"> <tr>
<input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 175px;height: 20px"/>&nbsp;元/天/KG <td>仓储费</td>
</td> <td style="padding:5px">
</tr> <input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2"
<tr> style="width: 175px;height: 20px"/>&nbsp;元/天/KG
<td>搬运费</td> </td>
<td style="padding:5px"> </tr>
<input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元" data-options="min:0,precision:2" style="width: 215px;height: 20px"/>&nbsp;元 <tr>
</td> <td>搬运费</td>
</tr> <td style="padding:5px">
<tr> <input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元"
<td>排序</td> data-options="min:0,precision:2" style="width: 215px;height: 20px"/>&nbsp;元
<td style="padding:5px"> </td>
<input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>排序</td>
<tr> <td style="padding:5px">
<td>描述</td> <input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/>
<td style="padding:5px"> </td>
<textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea> </tr>
</td> <tr>
</tr> <td>描述</td>
</table> <td style="padding:5px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepot" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepot" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveDepot" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelDepot" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function(){ $(function () {
initTableData(); initTableData();
ininPager(); ininPager();
initForm(); initForm();
}); });
//防止表单提交重复 //防止表单提交重复
function initForm(){ function initForm() {
$('#depotFM').form({ $('#depotFM').form({
onSubmit: function(){ onSubmit: function () {
return false; return false;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() { function initTableData() {
$('#tableData').datagrid({ $('#tableData').datagrid({
//title:'仓库列表', //title:'仓库列表',
//iconCls:'icon-save', //iconCls:'icon-save',
//width:700, //width:700,
height:heightInfo, height: heightInfo,
nowrap: false, nowrap: false,
rownumbers: false, rownumbers: false,
//动画效果 //动画效果
animate:false, animate: false,
//选中单行 //选中单行
singleSelect : true, singleSelect: true,
collapsible:false, collapsible: false,
selectOnCheck:false, selectOnCheck: false,
//fitColumns:true, //fitColumns:true,
//单击行是否选中 //单击行是否选中
checkOnSelect : false, checkOnSelect: false,
url:'<%=path %>/depot/findBy.action?pageSize=' + initPageSize, url: '<%=path %>/depot/findBy.action?pageSize=' + initPageSize,
pagination: true, pagination: true,
//交替出现背景 //交替出现背景
striped : true, striped: true,
//loadFilter: pagerFilter, //loadFilter: pagerFilter,
pageSize: initPageSize, pageSize: initPageSize,
pageList: initPageNum, pageList: initPageNum,
columns:[[ columns: [[
{ field: 'id',width:35,align:"center",checkbox:true}, {field: 'id', width: 35, align: "center", checkbox: true},
{ title: '操作',field: 'op',align:"center",width:60, {
formatter:function(value,rec) { title: '操作', field: 'op', align: "center", width: 60,
var str = ''; formatter: function (value, rec) {
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb' var str = '';
+ rec.address + 'AaBb' + rec.warehousing + 'AaBb' + rec.truckage; var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb'
if(1 == value) + rec.address + 'AaBb' + rec.warehousing + 'AaBb' + rec.truckage;
{ if (1 == value) {
str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;'; str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot('+ rec.id +');"/>'; str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>';
} }
return str; return str;
} }
}, },
{ title: '仓库名称',field: 'name',width:200}, {title: '仓库名称', field: 'name', width: 200},
{ title: '仓库地址',field: 'address',width:200}, {title: '仓库地址', field: 'address', width: 200},
{ title: '仓储费',field: 'warehousing',width:60}, {title: '仓储费', field: 'warehousing', width: 60},
{ title: '搬运费',field: 'truckage',width:60}, {title: '搬运费', field: 'truckage', width: 60},
{ title: '排序',field: 'sort',width:60}, {title: '排序', field: 'sort', width: 60},
{ title: '描述',field: 'remark',width:120} {title: '描述', field: 'remark', width: 120}
]], ]],
toolbar:[ toolbar: [
{ {
id:'addDepot', id: 'addDepot',
text:'增加', text: '增加',
iconCls:'icon-add', iconCls: 'icon-add',
handler:function() { handler: function () {
addDepot(); addDepot();
} }
},'-', }, '-',
{ {
id:'deleteDepot', id: 'deleteDepot',
text:'删除', text: '删除',
iconCls:'icon-remove', iconCls: 'icon-remove',
handler:function() { handler: function () {
batDeleteDepot(); batDeleteDepot();
} }
} }
], ],
onLoadError:function() { onLoadError: function () {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) { $(document).keydown(function (event) {
//兼容 IE和firefox 事件 //兼容 IE和firefox 事件
var e = window.event || event; var e = window.event || event;
var k = e.keyCode||e.which||e.charCode; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="name"||obj.id=="sort"|| obj.id=="remark" )) { if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) {
$("#saveDepot").click(); $("#saveDepot").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" )) { if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//分页信息处理
function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber:pageNum,
pageSize:pageSize
});
showDepotDetails(pageNum,pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除供应商信息 //分页信息处理
function deleteDepot(depotID) { function ininPager() {
$.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r) { try {
if (r) { var opts = $("#tableData").datagrid('options');
$.ajax({ var pager = $("#tableData").datagrid('getPager');
type:"post", pager.pagination({
url: "<%=path %>/depot/delete.action", onSelectPage: function (pageNum, pageSize) {
dataType: "json", opts.pageNumber = pageNum;
data: ({ opts.pageSize = pageSize;
depotID : depotID, pager.pagination('refresh', {
clientIp:'<%=clientIp %>' pageNumber: pageNum,
}), pageSize: pageSize
success: function (tipInfo) { });
var msg = tipInfo.showModel.msgTip; showDepotDetails(pageNum, pageSize);
if(msg == '成功') }
{ });
//加载完以后重新初始化 }
$("#searchBtn").click(); catch (e) {
} $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
else }
$.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error'); }
},
//此处添加错误处理 //删除供应商信息
error:function() { function deleteDepot(depotID) {
$.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error'); $.messager.confirm('删除确认', '确定要删除仓库信息吗?', function (r) {
return; if (r) {
} $.ajax({
}); type: "post",
url: "<%=path %>/depot/delete.action",
dataType: "json",
data: ({
depotID: depotID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
//批量删除供应商 }
function batDeleteDepot() {
var row = $('#tableData').datagrid('getChecked');
if(row.length == 0) {
$.messager.alert('删除提示','没有记录被选中!','info');
return;
}
if(row.length > 0) {
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条仓库信息吗?',function(r) {
if (r)
{
var ids = "";
for(var i = 0;i < row.length; i ++)
{
if(i == row.length-1)
{
ids += row[i].id;
break;
}
//alert(row[i].id);
ids += row[i].id + ",";
}
$.ajax({
type:"post",
url: "<%=path %>/depot/batchDelete.action",
dataType: "json",
async : false,
data: ({
depotIDs : ids,
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
var msg = tipInfo.showModel.msgTip;
if(msg == '成功')
{
//加载完以后重新初始化
$("#searchBtn").click();
$(":checkbox").attr("checked",false);
}
else
$.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error');
return;
}
});
}
});
}
}
//增加
var url;
var depotID = 0;
//保存编辑前的名称
var orgDepot = "";
function addDepot()
{
$("#clientIp").val('<%=clientIp %>');
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息');
$(".window-mask").css({ width: webW ,height: webH});
$('#depotFM').form('clear');
$("#name").focus();
orgDepot = "";
depotID = 0;
url = '<%=path %>/depot/create.action';
}
//保存信息
$("#saveDepot").off("click").on("click",function() {
if(!$('#depotFM').form('validate'))
return;
else if(checkDepotName())
return;
else
{
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
name : $.trim($("#name").val()),
address: $.trim($("#address").val()),
warehousing: $.trim($("#warehousing").val()),
truckage: $.trim($("#truckage").val()),
type : 0,
sort : $.trim($("#sort").val()),
remark : $.trim($("#remark").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#depotDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存仓库信息异常,请稍后再试!','error');
return;
}
});
}
});
//编辑信息
function editDepot(depotTotalInfo)
{
var depotInfo = depotTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(depotInfo[1]);
$("#sort").val(depotInfo[2]);
$("#remark").val(depotInfo[3]);
$("#address").val(depotInfo[4]);
$("#warehousing").val(depotInfo[5]);
$("#truckage").val(depotInfo[6]);
orgDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
$(".window-mask").css({ width: webW ,height: webH});
depotID = depotInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(depotInfo[1]);
url = '<%=path %>/depot/update.action?depotID=' + depotInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkDepotName()
{
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(name.length > 0 &&( orgDepot.length ==0 || name != orgDepot))
{
$.ajax({
type:"post",
url: "<%=path %>/depot/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
depotID : depotID,
name : name
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','仓库名称已经存在','info');
//alert("仓库名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查仓库名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showDepotDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
});
function showDepotDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/depot/findBy.action",
dataType: "json",
data: ({
name:$.trim($("#searchName").val()),
type: 0, //仓库
remark:$.trim($("#searchRemark").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchName").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//查看单元(设置)
$('#setBuilding').click(function () {
var currentRow = $("#tableData").datagrid("getChecked");
if (currentRow.length == 0) {
alert("请选择一条数据再操作!");
return false;
}
parent.addTab(currentRow[0].id + "单元", "<%=path %>/pages/materials/building.jsp?ProjectId=" + currentRow[0].id, "");
//批量删除供应商
function batDeleteDepot() {
var row = $('#tableData').datagrid('getChecked');
if (row.length == 0) {
$.messager.alert('删除提示', '没有记录被选中!', 'info');
return;
}
if (row.length > 0) {
$.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条仓库信息吗?', function (r) {
if (r) {
var ids = "";
for (var i = 0; i < row.length; i++) {
if (i == row.length - 1) {
ids += row[i].id;
break;
}
//alert(row[i].id);
ids += row[i].id + ",";
}
$.ajax({
type: "post",
url: "<%=path %>/depot/batchDelete.action",
dataType: "json",
async: false,
data: ({
depotIDs: ids,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
$(":checkbox").attr("checked", false);
}
else
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
return;
}
});
}
}); });
</script> }
</body> }
//增加
var url;
var depotID = 0;
//保存编辑前的名称
var orgDepot = "";
function addDepot() {
$("#clientIp").val('<%=clientIp %>');
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息');
$(".window-mask").css({width: webW, height: webH});
$('#depotFM').form('clear');
$("#name").focus();
orgDepot = "";
depotID = 0;
url = '<%=path %>/depot/create.action';
}
//保存信息
$("#saveDepot").off("click").on("click", function () {
if (!$('#depotFM').form('validate'))
return;
else if (checkDepotName())
return;
else {
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
name: $.trim($("#name").val()),
address: $.trim($("#address").val()),
warehousing: $.trim($("#warehousing").val()),
truckage: $.trim($("#truckage").val()),
type: 0,
sort: $.trim($("#sort").val()),
remark: $.trim($("#remark").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#depotDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存仓库信息异常,请稍后再试!', 'error');
return;
}
});
}
});
//编辑信息
function editDepot(depotTotalInfo) {
var depotInfo = depotTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(depotInfo[1]);
$("#sort").val(depotInfo[2]);
$("#remark").val(depotInfo[3]);
$("#address").val(depotInfo[4]);
$("#warehousing").val(depotInfo[5]);
$("#truckage").val(depotInfo[6]);
orgDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
$(".window-mask").css({width: webW, height: webH});
depotID = depotInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(depotInfo[1]);
url = '<%=path %>/depot/update.action?depotID=' + depotInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkDepotName() {
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (name.length > 0 && (orgDepot.length == 0 || name != orgDepot)) {
$.ajax({
type: "post",
url: "<%=path %>/depot/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
depotID: depotID,
name: name
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '仓库名称已经存在', 'info');
//alert("仓库名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查仓库名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showDepotDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
});
function showDepotDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/depot/findBy.action",
dataType: "json",
data: ({
name: $.trim($("#searchName").val()),
type: 0, //仓库
remark: $.trim($("#searchRemark").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchName").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//查看单元(设置)
$('#setBuilding').click(function () {
var currentRow = $("#tableData").datagrid("getChecked");
if (currentRow.length == 0) {
alert("请选择一条数据再操作!");
return false;
}
parent.addTab(currentRow[0].id + "单元", "<%=path %>/pages/materials/building.jsp?ProjectId=" + currentRow[0].id, "");
});
</script>
</body>
</html> </html>

View File

@@ -1,529 +1,487 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>礼品卡管理</title> <title>礼品卡管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>礼品卡名称:</td> <tr>
<td> <td>礼品卡名称:</td>
<input type="text" name="searchName" id="searchName" style="width:150px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:150px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td id="searchRemarkLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td> <td>&nbsp;</td>
<td> <td id="searchRemarkLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td>
<input type="text" name="searchRemark" id="searchRemark" style="width:150px;"/> <td>
</td> <input type="text" name="searchRemark" id="searchRemark" style="width:150px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotFM" method="post" novalidate> <form id="depotFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td><label id="nameLabel">礼品卡名称&nbsp;&nbsp;</label></td> <td><label id="nameLabel">礼品卡名称&nbsp;&nbsp;</label></td>
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="name" id="name" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'"
<tr> style="width: 230px;height: 20px"/></td>
<td><label id="sortLabel">排&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;</label></td> </tr>
<td style="padding:5px"><input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <tr>
</tr> <td><label id="sortLabel">排&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;</label></td>
<tr> <td style="padding:5px"><input name="sort" id="sort" class="easyui-textbox"
<td><label id="remarkLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label></td> style="width: 230px;height: 20px"/></td>
<td style="padding:5px"><textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea></td> </tr>
</tr> <tr>
</table> <td><label id="remarkLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label></td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <td style="padding:5px"><textarea name="remark" id="remark" rows="2" cols="2"
</form> style="width: 230px;"></textarea></td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepot" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepot" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveDepot" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelDepot" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#depotDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); initForm();
initForm(); browserFit();
browserFit(); });
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE') {
if(getOs()=='MSIE') $("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:");
{ $("#nameLabel").empty().append("礼品卡名称&nbsp;&nbsp;");
$("#searchRemarkLabel").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:"); $("#sortLabel").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;");
$("#nameLabel").empty().append("礼品卡名称&nbsp;&nbsp;"); $("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;");
$("#sortLabel").empty().append("排&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;"); }
$("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;"); else {
} $("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:");
else $("#nameLabel").empty().append("礼品卡名称&nbsp;");
{ $("#sortLabel").empty().append("排&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;");
$("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述"); $("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
$("#nameLabel").empty().append("礼品卡名称&nbsp;"); }
$("#sortLabel").empty().append("排&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;"); }
$("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
//防止表单提交重复 //防止表单提交重复
function initForm() function initForm() {
{ $('#depotFM').form({
$('#depotFM').form({ onSubmit: function () {
onSubmit: function(){ return false;
return false; }
} });
}); }
}
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ //title:'仓库列表',
//title:'仓库列表', //iconCls:'icon-save',
//iconCls:'icon-save', //width:700,
//width:700, height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: false,
rownumbers: false, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, collapsible: false,
collapsible:false, selectOnCheck: false,
selectOnCheck:false, //fitColumns:true,
//fitColumns:true, //单击行是否选中
//单击行是否选中 checkOnSelect: false,
checkOnSelect : false, url: '<%=path %>/depot/findBy.action?type=1&pageSize=' + initPageSize,
url:'<%=path %>/depot/findBy.action?type=1&pageSize=' + initPageSize, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: initPageSize,
pageSize: initPageSize, pageList: initPageNum,
pageList: initPageNum, columns: [[
columns:[[ {field: 'id', width: 35, align: "center", checkbox: true},
{ field: 'id',width:35,align:"center",checkbox:true}, {title: '礼品卡名称', field: 'name', width: 200},
{ title: '礼品卡名称',field: 'name',width:200}, {title: '排序', field: 'sort', width: 200},
{ title: '排序',field: 'sort',width:200}, {title: '描述', field: 'remark', width: 200},
{ title: '描述',field: 'remark',width:200}, {
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec) title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
{ var str = '';
var str = ''; var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark;
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark; if (1 == value) {
if(1 == value) str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editDepot(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
{ str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>&nbsp;<a onclick="deleteDepot(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editDepot(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; }
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot('+ rec.id +');"/>&nbsp;<a onclick="deleteDepot('+ rec.id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;'; return str;
} }
return str; }
} ]],
} toolbar: [
]], {
toolbar:[ id: 'addDepot',
{ text: '增加',
id:'addDepot', iconCls: 'icon-add',
text:'增加', handler: function () {
iconCls:'icon-add', addDepot();
handler:function() }
{ },
addDepot(); {
} id: 'deleteDepot',
}, text: '删除',
{ iconCls: 'icon-remove',
id:'deleteDepot', handler: function () {
text:'删除', batDeleteDepot();
iconCls:'icon-remove', }
handler:function() }
{ ],
batDeleteDepot(); onLoadError: function () {
} $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
], }
onLoadError:function() });
{ }
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) {
if(k == "13"&&(obj.id=="name"||obj.id=="sort"|| obj.id=="remark" )) $("#saveDepot").click();
{ }
$("#saveDepot").click(); //搜索按钮添加快捷键
} if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
//搜索按钮添加快捷键 $("#searchBtn").click();
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" )) }
{ });
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDepotDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除供应商信息 //分页信息处理
function deleteDepot(depotID) function ininPager() {
{ try {
$.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r) var opts = $("#tableData").datagrid('options');
{ var pager = $("#tableData").datagrid('getPager');
if (r) pager.pagination({
{ onSelectPage: function (pageNum, pageSize) {
$.ajax({ opts.pageNumber = pageNum;
type:"post", opts.pageSize = pageSize;
url: "<%=path %>/depot/delete.action", pager.pagination('refresh',
dataType: "json", {
data: ({ pageNumber: pageNum,
depotID : depotID, pageSize: pageSize
clientIp:'<%=clientIp %>' });
}), showDepotDetails(pageNum, pageSize);
success: function (tipInfo) }
{ });
var msg = tipInfo.showModel.msgTip; }
if(msg == '成功') catch (e) {
{ $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
//加载完以后重新初始化 }
$("#searchBtn").click(); }
}
else //删除供应商信息
$.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error'); function deleteDepot(depotID) {
}, $.messager.confirm('删除确认', '确定要删除此仓库信息吗?', function (r) {
//此处添加错误处理 if (r) {
error:function() $.ajax({
{ type: "post",
$.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error'); url: "<%=path %>/depot/delete.action",
return; dataType: "json",
} data: ({
}); depotID: depotID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
//批量删除供应商 }
function batDeleteDepot()
{
var row = $('#tableData').datagrid('getChecked');
if(row.length == 0)
{
$.messager.alert('删除提示','没有记录被选中!','info');
return;
}
if(row.length > 0)
{
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条仓库信息吗?',function(r)
{
if (r)
{
var ids = "";
for(var i = 0;i < row.length; i ++)
{
if(i == row.length-1)
{
ids += row[i].id;
break;
}
//alert(row[i].id);
ids += row[i].id + ",";
}
$.ajax({
type:"post",
url: "<%=path %>/depot/batchDelete.action",
dataType: "json",
async : false,
data: ({
depotIDs : ids,
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
var msg = tipInfo.showModel.msgTip;
if(msg == '成功')
{
//加载完以后重新初始化
$("#searchBtn").click();
$(":checkbox").attr("checked",false);
}
else
$.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error');
return;
}
});
}
});
}
}
//增加
var url;
var depotID = 0;
//保存编辑前的名称
var orgDepot = "";
function addDepot()
{
$("#clientIp").val('<%=clientIp %>');
$("#sort").val("");
$("#remark").val("");
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息');
$(".window-mask").css({ width: webW ,height: webH});
$("#name").val("").focus();
//$('#depotFM').form('clear');
orgDepot = "";
depotID = 0;
url = '<%=path %>/depot/create.action';
}
//保存信息
$("#saveDepot").unbind().bind({
click:function()
{
if(!$('#depotFM').form('validate'))
return;
else if(checkDepotName())
return;
else
{
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
name : $.trim($("#name").val()),
type : 1,
sort : $.trim($("#sort").val()),
remark : $.trim($("#remark").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#depotDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存仓库信息异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息
function editDepot(depotTotalInfo)
{
var depotInfo = depotTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(depotInfo[1]);
$("#sort").val(depotInfo[2]);
$("#remark").val(depotInfo[3]);
orgDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
$(".window-mask").css({ width: webW ,height: webH});
depotID = depotInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(depotInfo[1]);
url = '<%=path %>/depot/update.action?depotID=' + depotInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkDepotName()
{
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(name.length > 0 &&( orgDepot.length ==0 || name != orgDepot))
{
$.ajax({
type:"post",
url: "<%=path %>/depot/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
depotID : depotID,
name : name
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','仓库名称已经存在','info');
//alert("仓库名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查仓库名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showDepotDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
});
function showDepotDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/depot/findBy.action",
dataType: "json",
data: ({
name:$.trim($("#searchName").val()),
type: 1, // 礼品卡
remark:$.trim($("#searchRemark").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchName").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//查看单元(设置)
$('#setBuilding').click(function () {
var currentRow = $("#tableData").datagrid("getChecked");
if (currentRow.length == 0) {
alert("请选择一条数据再操作!");
return false;
}
parent.addTab(currentRow[0].id + "单元", "<%=path %>/pages/materials/building.jsp?ProjectId=" + currentRow[0].id, "");
//批量删除供应商
function batDeleteDepot() {
var row = $('#tableData').datagrid('getChecked');
if (row.length == 0) {
$.messager.alert('删除提示', '没有记录被选中!', 'info');
return;
}
if (row.length > 0) {
$.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条仓库信息吗?', function (r) {
if (r) {
var ids = "";
for (var i = 0; i < row.length; i++) {
if (i == row.length - 1) {
ids += row[i].id;
break;
}
//alert(row[i].id);
ids += row[i].id + ",";
}
$.ajax({
type: "post",
url: "<%=path %>/depot/batchDelete.action",
dataType: "json",
async: false,
data: ({
depotIDs: ids,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
$(":checkbox").attr("checked", false);
}
else
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
return;
}
});
}
}); });
</script> }
</body> }
//增加
var url;
var depotID = 0;
//保存编辑前的名称
var orgDepot = "";
function addDepot() {
$("#clientIp").val('<%=clientIp %>');
$("#sort").val("");
$("#remark").val("");
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息');
$(".window-mask").css({width: webW, height: webH});
$("#name").val("").focus();
//$('#depotFM').form('clear');
orgDepot = "";
depotID = 0;
url = '<%=path %>/depot/create.action';
}
//保存信息
$("#saveDepot").unbind().bind({
click: function () {
if (!$('#depotFM').form('validate'))
return;
else if (checkDepotName())
return;
else {
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
name: $.trim($("#name").val()),
type: 1,
sort: $.trim($("#sort").val()),
remark: $.trim($("#remark").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#depotDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存仓库信息异常,请稍后再试!', 'error');
return;
}
});
}
}
});
//编辑信息
function editDepot(depotTotalInfo) {
var depotInfo = depotTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(depotInfo[1]);
$("#sort").val(depotInfo[2]);
$("#remark").val(depotInfo[3]);
orgDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
$(".window-mask").css({width: webW, height: webH});
depotID = depotInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(depotInfo[1]);
url = '<%=path %>/depot/update.action?depotID=' + depotInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkDepotName() {
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (name.length > 0 && (orgDepot.length == 0 || name != orgDepot)) {
$.ajax({
type: "post",
url: "<%=path %>/depot/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
depotID: depotID,
name: name
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '仓库名称已经存在', 'info');
//alert("仓库名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查仓库名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showDepotDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
});
function showDepotDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/depot/findBy.action",
dataType: "json",
data: ({
name: $.trim($("#searchName").val()),
type: 1, // 礼品卡
remark: $.trim($("#searchRemark").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchName").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//查看单元(设置)
$('#setBuilding').click(function () {
var currentRow = $("#tableData").datagrid("getChecked");
if (currentRow.length == 0) {
alert("请选择一条数据再操作!");
return false;
}
parent.addTab(currentRow[0].id + "单元", "<%=path %>/pages/materials/building.jsp?ProjectId=" + currentRow[0].id, "");
});
</script>
</body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +1,87 @@
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%> %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link href="css/admin.css" type="text/css" rel="stylesheet"> <link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title> <title>首页说明</title>
<style type="text/css"> <style type="text/css">
<!-- <!--
body { body {
margin-left: 0px; margin-left: 0px;
margin-top: 0px; margin-top: 0px;
margin-right: 0px; margin-right: 0px;
margin-bottom: 0px; margin-bottom: 0px;
background-color: #EAF2FD; background-color: #EAF2FD;
} }
.STYLE1 {font-size: 12px}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link { .STYLE1 {
font-size: 12px; font-size: 12px
color: #06482a; }
text-decoration: none;
} .STYLE4 {
a:visited { font-size: 12px;
font-size: 12px; color: #1F4A65;
color: #06482a; font-weight: bold;
text-decoration: none; }
}
a:hover { a:link {
font-size: 12px; font-size: 12px;
color: #FF0000; color: #06482a;
text-decoration: underline; text-decoration: none;
}
a:active { }
font-size: 12px;
color: #FF0000; a:visited {
text-decoration: none; font-size: 12px;
} color: #06482a;
.STYLE7 {font-size: 12} text-decoration: none;
--> }
</style>
</head> a:hover {
<body> font-size: 12px;
<table cellSpacing=0 cellPadding=0 width="100%" align=center border=0> color: #FF0000;
<tr height=28> text-decoration: underline;
<td width="1101" class="STYLE4"> }
&nbsp;&nbsp;<img src="<%=path%>/images/preferences1.png" width="16" height="16" />
<span >系统管理</span> a:active {
</td> font-size: 12px;
</tr> color: #FF0000;
<tr> text-decoration: none;
<td bgColor=#b1ceef height=1></td> }
</tr>
<tr height="5px"> .STYLE7 {
<td background=images/shadow_bg.jpg></td> font-size: 12
</tr> }
</table>
<p style="font-size: 12px;color: #1F4A65;padding: 10px"> -->
&nbsp;&nbsp;&nbsp;&nbsp; </style>
系统管理是管理系统中的基础数据设置信息,包括供应商、资产类型、资产名称、用户管理等,通过系统管理,可以为系统提供基础数据支持。日志管理主要包括供应商、资产类型、资产名称、用户管理等的增删改查等功能点。 </head>
</p> <body>
</body> <table cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<tr height=28>
<td width="1101" class="STYLE4">
&nbsp;&nbsp;<img src="<%=path%>/images/preferences1.png" width="16" height="16"/>
<span>系统管理</span>
</td>
</tr>
<tr>
<td bgColor=#b1ceef height=1></td>
</tr>
<tr height="5px">
<td background=images/shadow_bg.jpg></td>
</tr>
</table>
<p style="font-size: 12px;color: #1F4A65;padding: 10px">
&nbsp;&nbsp;&nbsp;&nbsp;
系统管理是管理系统中的基础数据设置信息,包括供应商、资产类型、资产名称、用户管理等,通过系统管理,可以为系统提供基础数据支持。日志管理主要包括供应商、资产类型、资产名称、用户管理等的增删改查等功能点。
</p>
</body>
</html> </html>

View File

@@ -1,513 +1,471 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>收支项目</title> <title>收支项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td> <tr>
<td> <td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td id="searchTypeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型:</td> <td id="searchTypeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
<td> <td>
<select name="searchType" id="searchType" style="width:70px;"> <select name="searchType" id="searchType" style="width:70px;">
<option value="">全部</option> <option value="">全部</option>
<option value="收入">收入</option> <option value="收入">收入</option>
<option value="支出">支出</option> <option value="支出">支出</option>
</select> </select>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td id="searchRemarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注:</td> <td id="searchRemarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<td> <td>
<input type="text" name="searchRemark" id="searchRemark" style="width:70px;"/> <input type="text" name="searchRemark" id="searchRemark" style="width:70px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</td> </td>
</tr> </tr>
</table> </table>
</div>
<!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收支项目" iconCls="icon-list"
collapsible="true" closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="inOutItemDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<form id="inOutItemFM" method="post" novalidate>
<div class="fitem" style="padding:5px">
<label id="nameLabel">名&nbsp;&nbsp;&nbsp;&nbsp;称</label>
<input name="name" id="name" class="easyui-validatebox"
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</div> </div>
<div class="fitem" style="padding:5px">
<!-- 数据显示table --> <label id="typeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型</label>
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收支项目" iconCls="icon-list" collapsible="true" closable="false"> <select name="type" id="type" style="width:230px;">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> <option value="收入">收入</option>
<option value="支出">支出</option>
</select>
</div> </div>
<div id="inOutItemDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div class="fitem" style="padding:5px">
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true"> <label id="remarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注</label>
<form id="inOutItemFM" method="post" novalidate> <textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
<div class="fitem" style="padding:5px">
<label id="nameLabel">名&nbsp;&nbsp;&nbsp;&nbsp;称</label>
<input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</div>
<div class="fitem" style="padding:5px">
<label id="typeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型</label>
<select name="type" id="type" style="width:230px;">
<option value="收入">收入</option>
<option value="支出">支出</option>
</select>
</div>
<div class="fitem" style="padding:5px">
<label id="remarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注</label>
<textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
</div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveInOutItem" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelInOutItem" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#inOutItemDlg').dialog('close')">取消</a>
</div> </div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveInOutItem" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelInOutItem" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#inOutItemDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); browserFit();
browserFit(); });
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE') {
if(getOs()=='MSIE') $("#searchTypeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型:");
$("#searchRemarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:");
$("#nameLabel").empty().append("名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称");
$("#typeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型");
$("#remarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注");
}
else {
$("#searchTypeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;型:");
$("#searchRemarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;注:");
$("#nameLabel").empty().append("名&nbsp;&nbsp;&nbsp;&nbsp;称");
$("#typeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;型");
$("#remarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;注");
}
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
//title:'收支项目',
//iconCls:'icon-save',
//width:700,
height: heightInfo,
nowrap: false,
rownumbers: false,
//动画效果
animate: false,
//选中单行
singleSelect: true,
collapsible: false,
selectOnCheck: false,
//fitColumns:true,
//单击行是否选中
checkOnSelect: false,
//交替出现背景
striped: true,
url: '<%=path %>/inOutItem/findBy.action?pageSize=' + initPageSize,
pagination: true,
//自动截取数据
//nowrap : true,
//loadFilter: pagerFilter,
pageSize: initPageSize,
pageList: initPageNum,
columns: [[
{field: 'id', width: 35, align: "center", checkbox: true},
{title: '名称', field: 'name', width: 200},
{title: '类型', field: 'type', width: 100, align: "center"},
{title: '描述', field: 'remark', width: 200},
{ {
$("#searchTypeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型:"); title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
$("#searchRemarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:"); var str = '';
$("#nameLabel").empty().append("名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称"); var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.type + 'AaBb' + rec.remark;
$("#typeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型"); if (1 == value) {
$("#remarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注"); str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
} str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="deleteInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
else
{
$("#searchTypeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;型:");
$("#searchRemarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;注:");
$("#nameLabel").empty().append("名&nbsp;&nbsp;&nbsp;&nbsp;称");
$("#typeLabel").empty().append("类&nbsp;&nbsp;&nbsp;&nbsp;型");
$("#remarkLabel").empty().append("备&nbsp;&nbsp;&nbsp;&nbsp;注");
}
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
//title:'收支项目',
//iconCls:'icon-save',
//width:700,
height:heightInfo,
nowrap: false,
rownumbers: false,
//动画效果
animate:false,
//选中单行
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//fitColumns:true,
//单击行是否选中
checkOnSelect : false,
//交替出现背景
striped : true,
url:'<%=path %>/inOutItem/findBy.action?pageSize=' + initPageSize,
pagination: true,
//自动截取数据
//nowrap : true,
//loadFilter: pagerFilter,
pageSize: initPageSize,
pageList: initPageNum,
columns:[[
{ field: 'id',width:35,align:"center",checkbox:true},
{ title: '名称',field: 'name',width:200},
{ title: '类型', field: 'type',width:100,align:"center"},
{ title: '描述',field: 'remark',width:200},
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
{
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name +'AaBb' + rec.type + 'AaBb'+ rec.remark;
if(1 == value)
{
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="deleteInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
}
return str;
} }
} return str;
]],
toolbar:[
{
id:'addInOutItem',
text:'增加',
iconCls:'icon-add',
handler:function()
{
addInOutItem();
}
},
{
id:'deleteInOutItem',
text:'删除',
iconCls:'icon-remove',
handler:function()
{
batDeleteInOutItem();
}
}
],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
} }
}); }
]],
toolbar: [
{
id: 'addInOutItem',
text: '增加',
iconCls: 'icon-add',
handler: function () {
addInOutItem();
}
},
{
id: 'deleteInOutItem',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeleteInOutItem();
}
}
],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
} }
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 if (k == "13" && (obj.id == "name" || obj.id == "remark")) {
if(k == "13"&&(obj.id=="name" || obj.id=="remark")) $("#saveInOutItem").click();
{ }
$("#saveInOutItem").click();
}
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark")) if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
{ $("#searchBtn").click();
$("#searchBtn").click(); }
} });
});
//分页信息处理 //分页信息处理
function ininPager() function ininPager() {
{ try {
try var opts = $("#tableData").datagrid('options');
{ var pager = $("#tableData").datagrid('getPager');
var opts = $("#tableData").datagrid('options'); pager.pagination({
var pager = $("#tableData").datagrid('getPager'); onSelectPage: function (pageNum, pageSize) {
pager.pagination({ opts.pageNumber = pageNum;
onSelectPage:function(pageNum, pageSize) opts.pageSize = pageSize;
pager.pagination('refresh',
{ {
opts.pageNumber = pageNum; pageNumber: pageNum,
opts.pageSize = pageSize; pageSize: pageSize
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showInOutItemDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除收支项目
function deleteInOutItem(inOutItemInfo)
{
$.messager.confirm('删除确认','确定要删除此收支项目吗?',function(r)
{
if (r)
{
var inOutItemTotalInfo = inOutItemInfo.split("AaBb");
$.ajax({
type:"post",
url: "<%=path %>/inOutItem/delete.action",
dataType: "json",
data: ({
inOutItemID : inOutItemTotalInfo[0],
name:inOutItemTotalInfo[1],
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
var msg = tipInfo.showModel.msgTip;
if(msg == '成功')
//加载完以后重新初始化
$("#searchBtn").click();
else
$.messager.alert('删除提示','删除收支项目失败,请稍后再试!','error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('删除提示','删除收支项目异常,请稍后再试!','error');
return;
}
}); });
showInOutItemDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//删除收支项目
function deleteInOutItem(inOutItemInfo) {
$.messager.confirm('删除确认', '确定要删除此收支项目吗?', function (r) {
if (r) {
var inOutItemTotalInfo = inOutItemInfo.split("AaBb");
$.ajax({
type: "post",
url: "<%=path %>/inOutItem/delete.action",
dataType: "json",
data: ({
inOutItemID: inOutItemTotalInfo[0],
name: inOutItemTotalInfo[1],
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功')
//加载完以后重新初始化
$("#searchBtn").click();
else
$.messager.alert('删除提示', '删除收支项目失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除收支项目异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
}
//批量删除收支项目 //批量删除收支项目
function batDeleteInOutItem() function batDeleteInOutItem() {
{ var row = $('#tableData').datagrid('getChecked');
var row = $('#tableData').datagrid('getChecked'); if (row.length == 0) {
if(row.length == 0) $.messager.alert('删除提示', '没有记录被选中!', 'info');
{ return;
$.messager.alert('删除提示','没有记录被选中!','info'); }
return; if (row.length > 0) {
} $.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条收支项目吗?', function (r) {
if(row.length > 0) if (r) {
{ var ids = "";
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条收支项目吗?',function(r) for (var i = 0; i < row.length; i++) {
{ if (i == row.length - 1) {
if (r) ids += row[i].id;
{ break;
var ids = "";
for(var i = 0;i < row.length; i ++)
{
if(i == row.length-1)
{
ids += row[i].id;
break;
}
ids += row[i].id + ",";
}
$.ajax({
type:"post",
url: "<%=path %>/inOutItem/batchDelete.action",
dataType: "json",
async : false,
data: ({
inOutItemIDs : ids,
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
var msg = tipInfo.showModel.msgTip;
if(msg == '成功')
{
//加载完以后重新初始化
$("#searchBtn").click();
$(":checkbox").attr("checked",false);
}
else
$.messager.alert('删除提示','删除收支项目失败,请稍后再试!','error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('删除提示','删除收支项目异常,请稍后再试!','error');
return;
}
});
} }
}); ids += row[i].id + ",";
}
}
//增加收支项目
var url;
var inOutItemID = 0;
//保存编辑前的名称
var orgInOutItem = "";
function addInOutItem()
{
$('#inOutItemDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加收支项目');
$(".window-mask").css({ width: webW ,height: webH});
$('#inOutItemFM').form('clear');
var row = {
clientIp:'<%=clientIp %>'
};
$('#inOutItemFM').form('load',row);
$("#inOutItem").focus();
orgInOutItem = "";
inOutItemID = 0;
url = '<%=path %>/inOutItem/create.action';
}
//保存收支项目
$("#saveInOutItem").unbind().bind({
click:function()
{
if(checkInOutItemName())
return;
if(!$("#type").val()){
$.messager.alert('提示','请选择类型!','warning');
return;
} }
$('#inOutItemFM').form('submit',{ $.ajax({
url: url, type: "post",
onSubmit: function() url: "<%=path %>/inOutItem/batchDelete.action",
{ dataType: "json",
return $(this).form('validate'); async: false,
}, data: ({
success: function(result) inOutItemIDs: ids,
{ clientIp: '<%=clientIp %>'
var result = eval('('+result+')'); }),
if (!result) success: function (tipInfo) {
{ var msg = tipInfo.showModel.msgTip;
$.messager.show({ if (msg == '成功') {
title: '错误提示', //加载完以后重新初始化
msg: '保存收支项目失败,请稍后重试!' $("#searchBtn").click();
}); $(":checkbox").attr("checked", false);
} }
else else
{ $.messager.alert('删除提示', '删除收支项目失败,请稍后再试!', 'error');
$('#inOutItemDlg').dialog('close');
//$('#tableData').datagrid('reload');
//加载完以后重新初始化
//$("#searchBtn").click();
var opts = $("#tableData").datagrid('options');
showInOutItemDetails(opts.pageNumber,opts.pageSize);
}
}
});
}
});
//编辑收支项目
function editInOutItem(inOutItemTotalInfo)
{
var inOutItemInfo = inOutItemTotalInfo.split("AaBb");
var row = {
name : inOutItemInfo[1],
type : inOutItemInfo[2],
remark : inOutItemInfo[3],
clientIp:'<%=clientIp %>'
};
orgInOutItem = inOutItemInfo[1];
$('#inOutItemDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑收支项目');
$(".window-mask").css({ width: webW ,height: webH});
$('#inOutItemFM').form('load',row);
inOutItemID = inOutItemInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#inOutItem").val("").focus().val(inOutItemInfo[1]);
url = '<%=path %>/inOutItem/update.action?inOutItemID=' + inOutItemInfo[0];
}
//检查收支项目 名称是否存在 ++ 重名无法提示问题需要跟进
function checkInOutItemName()
{
var inOutItemName = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(inOutItemName.length > 0 &&( orgInOutItem.length ==0 || inOutItemName != orgInOutItem))
{
$.ajax({
type:"post",
url: "<%=path %>/inOutItem/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
inOutItemID : inOutItemID,
name : inOutItemName
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','收支项目名称已经存在','info');
return;
}
}, },
//此处添加错误处理 //此处添加错误处理
error:function() error: function () {
{ $.messager.alert('删除提示', '删除收支项目异常,请稍后再试!', 'error');
$.messager.alert('提示','检查收支项目名称是否存在异常,请稍后再试!','error');
return; return;
} }
}); });
} }
return flag; });
} }
}
//搜索处理 //增加收支项目
$("#searchBtn").unbind().bind({ var url;
click:function() var inOutItemID = 0;
{ //保存编辑前的名称
showInOutItemDetails(1,initPageSize); var orgInOutItem = "";
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); function addInOutItem() {
opts.pageNumber = 1; $('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加收支项目');
opts.pageSize = initPageSize; $(".window-mask").css({width: webW, height: webH});
pager.pagination('refresh', $('#inOutItemFM').form('clear');
{
pageNumber:1, var row = {
pageSize:initPageSize clientIp: '<%=clientIp %>'
}); };
$('#inOutItemFM').form('load', row);
$("#inOutItem").focus();
orgInOutItem = "";
inOutItemID = 0;
url = '<%=path %>/inOutItem/create.action';
}
//保存收支项目
$("#saveInOutItem").unbind().bind({
click: function () {
if (checkInOutItemName())
return;
if (!$("#type").val()) {
$.messager.alert('提示', '请选择类型!', 'warning');
return;
}
$('#inOutItemFM').form('submit', {
url: url,
onSubmit: function () {
return $(this).form('validate');
},
success: function (result) {
var result = eval('(' + result + ')');
if (!result) {
$.messager.show({
title: '错误提示',
msg: '保存收支项目失败,请稍后重试!'
});
}
else {
$('#inOutItemDlg').dialog('close');
//$('#tableData').datagrid('reload');
//加载完以后重新初始化
//$("#searchBtn").click();
var opts = $("#tableData").datagrid('options');
showInOutItemDetails(opts.pageNumber, opts.pageSize);
}
} }
}); });
}
});
function showInOutItemDetails(pageNo,pageSize) //编辑收支项目
{ function editInOutItem(inOutItemTotalInfo) {
$.ajax({ var inOutItemInfo = inOutItemTotalInfo.split("AaBb");
type:"post", var row = {
url: "<%=path %>/inOutItem/findBy.action", name: inOutItemInfo[1],
dataType: "json", type: inOutItemInfo[2],
data: ({ remark: inOutItemInfo[3],
name:$.trim($("#searchName").val()), clientIp: '<%=clientIp %>'
type:$.trim($("#searchType").val()), };
remark:$.trim($("#searchRemark").val()), orgInOutItem = inOutItemInfo[1];
pageNo:pageNo, $('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑收支项目');
pageSize:pageSize $(".window-mask").css({width: webW, height: webH});
}), $('#inOutItemFM').form('load', row);
success: function (data) inOutItemID = inOutItemInfo[0];
{ //焦点在名称输入框==定焦在输入文字后面
$("#tableData").datagrid('loadData',data); $("#inOutItem").val("").focus().val(inOutItemInfo[1]);
}, url = '<%=path %>/inOutItem/update.action?inOutItemID=' + inOutItemInfo[0];
//此处添加错误处理 }
error:function()
{ //检查收支项目 名称是否存在 ++ 重名无法提示问题需要跟进
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); function checkInOutItemName() {
var inOutItemName = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (inOutItemName.length > 0 && (orgInOutItem.length == 0 || inOutItemName != orgInOutItem)) {
$.ajax({
type: "post",
url: "<%=path %>/inOutItem/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
inOutItemID: inOutItemID,
name: inOutItemName
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '收支项目名称已经存在', 'info');
return; return;
} }
}); },
} //此处添加错误处理
error: function () {
//重置按钮 $.messager.alert('提示', '检查收支项目名称是否存在异常,请稍后再试!', 'error');
$("#searchResetBtn").unbind().bind({ return;
click:function(){
$("#searchName").val("");
$("#searchType").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
} }
}); });
</script> }
</body> return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showInOutItemDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
});
function showInOutItemDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/inOutItem/findBy.action",
dataType: "json",
data: ({
name: $.trim($("#searchName").val()),
type: $.trim($("#searchType").val()),
remark: $.trim($("#searchRemark").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchName").val("");
$("#searchType").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
</script>
</body>
</html> </html>

View File

@@ -1,298 +1,281 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;position: center;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;position: center;" title="查询窗口" iconCls="icon-search"
<table id="searchTable"> collapsible="true" closable="false">
<tr> <table id="searchTable">
<td>操作模块:</td> <tr>
<td> <td>操作模块:</td>
<input type="text" name="searchOperation" id="searchOperation" style="width:90px;"/> <td>
</td> <input type="text" name="searchOperation" id="searchOperation" style="width:90px;"/>
</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>操作人员:</td> <td>操作人员:</td>
<td> <td>
<select name="searchUsernameID" id="searchUsernameID" style="width:90px;" /> <select name="searchUsernameID" id="searchUsernameID" style="width:90px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>操作IP</td> <td>操作IP</td>
<td> <td>
<input type="text" name="searchIP" id="searchIP" style="width:90px;"/> <input type="text" name="searchIP" id="searchIP" style="width:90px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>操作状态:</td> <td>操作状态:</td>
<td> <td>
<select name="searchStatus" id="searchStatus" style="width:90px;"> <select name="searchStatus" id="searchStatus" style="width:90px;">
<option value="">请选择</option> <option value="">请选择</option>
<option value="0">成功</option> <option value="0">成功</option>
<option value="1">失败</option> <option value="1">失败</option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>开始时间:</td> <td>开始时间:</td>
<td> <td>
<input type="text" name="searchBeginTime" id="searchBeginTime" class="easyui-datebox" style="width:90px;"/> <input type="text" name="searchBeginTime" id="searchBeginTime" class="easyui-datebox"
</td> style="width:90px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>结束时间:</td> <td>&nbsp;</td>
<td> <td>结束时间:</td>
<input type="text" name="searchEndTime" id="searchEndTime" class="easyui-datebox" style="width:90px;"/> <td>
</td> <input type="text" name="searchEndTime" id="searchEndTime" class="easyui-datebox" style="width:90px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>操作详情:</td> <td>&nbsp;</td>
<td> <td>操作详情:</td>
<input type="text" name="searchDesc" id="searchDesc" style="width:90px;"/> <td>
</td> <input type="text" name="searchDesc" id="searchDesc" style="width:90px;"/>
<td>&nbsp;</td> </td>
<td colspan="3"> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td colspan="3">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="操作日志列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="操作日志列表" iconCls="icon-list"
<table id="tableData" style="height:340px;top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="height:340px;top:300px;border-bottom-color:#FFFFFF"></table>
<script type="text/javascript"> </div>
var userList = null; <script type="text/javascript">
//初始化界面 var userList = null;
$(function() //初始化界面
{ $(function () {
initTableData(); initTableData();
ininPager(); ininPager();
//初始化系统基础信息 //初始化系统基础信息
initSystemData(); initSystemData();
//初始化页面系统基础信息选项卡 //初始化页面系统基础信息选项卡
initSelectInfo(); initSelectInfo();
}); });
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ //title:'供应商列表',
//title:'供应商列表', //iconCls:'icon-save',
//iconCls:'icon-save', //width:700,
//width:700, height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: true,
rownumbers: true, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, collapsible: false,
collapsible:false, selectOnCheck: false,
selectOnCheck:false, //fitColumns:true,
//fitColumns:true, //单击行是否选中
//单击行是否选中 checkOnSelect: false,
checkOnSelect : false, //交替出现背景
//交替出现背景 striped: true,
striped : true, url: '<%=path %>/log/findBy.action?pageSize=' + initPageSize,
url:'<%=path %>/log/findBy.action?pageSize=' + initPageSize, pagination: true,
pagination: true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: initPageSize,
pageSize: initPageSize, pageList: initPageNum,
pageList: initPageNum, columns: [[
columns:[[ {title: '操作模块', field: 'operation', width: 120},
{ title: '操作模块',field: 'operation',width:120}, {title: '操作人员', field: 'username', width: 100, align: "center"},
{ title: '操作人员', field: 'username',width:100,align:"center"}, {title: '操作IP', field: 'clientIP', width: 90, align: "center"},
{ title: '操作IP', field: 'clientIP',width:90,align:"center"}, {title: '操作时间', field: 'createTime', width: 150, align: "center"},
{ title: '操作时间',field: 'createTime',width:150,align:"center"}, {title: '操作详情', field: 'details', width: 380},
{ title: '操作详情',field: 'details',width:380}, {title: '操作状态', field: 'status', width: 70},
{ title: '操作状态',field: 'status',width:70}, {title: '备注', field: 'remark', width: 180}
{ title: '备注',field: 'remark',width:180} ]],
]], onLoadError: function () {
onLoadError:function() $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
{ return;
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); }
return; });
} }
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 //搜索按钮添加快捷键
//搜索按钮添加快捷键 if (k == "13" && (obj.id == "searchOperation" || obj.id == "searchUsernameID" || obj.id == "searchIP"
if(k == "13"&&(obj.id=="searchOperation" || obj.id=="searchUsernameID"|| obj.id=="searchIP" || obj.id == "searchStatus" || obj.id == "searchBeginTime" || obj.id == "searchEndTime"
|| obj.id=="searchStatus" || obj.id=="searchBeginTime" || obj.id=="searchEndTime" || obj.id == "searchDesc")) {
|| obj.id=="searchDesc")) $("#searchBtn").click();
{ }
$("#searchBtn").click(); });
}
}); //分页信息处理
//分页信息处理 function ininPager() {
function ininPager() try {
{ var opts = $("#tableData").datagrid('options');
try var pager = $("#tableData").datagrid('getPager');
{ pager.pagination({
var opts = $("#tableData").datagrid('options'); onSelectPage: function (pageNum, pageSize) {
var pager = $("#tableData").datagrid('getPager'); opts.pageNumber = pageNum;
pager.pagination({ opts.pageSize = pageSize;
onSelectPage:function(pageNum, pageSize) pager.pagination('refresh',
{ {
opts.pageNumber = pageNum; pageNumber: pageNum,
opts.pageSize = pageSize; pageSize: pageSize
pager.pagination('refresh', });
{ showLogDetails(pageNum, pageSize);
pageNumber:pageNum, }
pageSize:pageSize });
}); }
showLogDetails(pageNum,pageSize); catch (e) {
} $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}); }
} }
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData() function initSystemData() {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path%>/log/getBasicData.action",
url: "<%=path%>/log/getBasicData.action", //设置为同步
//设置为同步 async: false,
async:false, dataType: "json",
dataType: "json", success: function (systemInfo) {
success: function (systemInfo) //成功关闭loading
{ userList = systemInfo.showModel.map.userList;
//成功关闭loading var msgTip = systemInfo.showModel.msgTip;
userList = systemInfo.showModel.map.userList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; });
} }
}
});
}
//初始化页面选项卡 //初始化页面选项卡
function initSelectInfo() function initSelectInfo() {
{ var options = "";
var options = "";
if(userList !=null) if (userList != null) {
{ options = "";
options = ""; for (var i = 0; i < userList.length; i++) {
for(var i = 0 ;i < userList.length;i ++) var user = userList[i];
{ if (0 == i) {
var user = userList[i]; userID = user.id
if(0 == i) }
{ options += '<option value="' + user.id + '">' + user.username + '</option>';
userID = user.id }
} $("#searchUsernameID").empty().append('<option value="">请选择</option>').append(options);
options += '<option value="' + user.id + '">' + user.username + '</option>'; }
} }
$("#searchUsernameID").empty().append('<option value="">请选择</option>').append(options);
}
}
//搜索处理 //搜索处理
$("#searchBtn").unbind().bind({ $("#searchBtn").unbind().bind({
click:function() click: function () {
{ showLogDetails(1, initPageSize);
showLogDetails(1,initPageSize); var opts = $("#tableData").datagrid('options');
var opts = $("#tableData").datagrid('options'); var pager = $("#tableData").datagrid('getPager');
var pager = $("#tableData").datagrid('getPager'); opts.pageNumber = 1;
opts.pageNumber = 1; opts.pageSize = initPageSize;
opts.pageSize = initPageSize; pager.pagination('refresh',
pager.pagination('refresh', {
{ pageNumber: 1,
pageNumber:1, pageSize: initPageSize
pageSize:initPageSize });
}); }
} });
});
function showLogDetails(pageNo,pageSize) function showLogDetails(pageNo, pageSize) {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path %>/log/findBy.action",
url: "<%=path %>/log/findBy.action", dataType: "json",
dataType: "json", data: ({
data: ({ operation: $.trim($("#searchOperation").val()),
operation:$.trim($("#searchOperation").val()), usernameID: $.trim($("#searchUsernameID").val()),
usernameID:$.trim($("#searchUsernameID").val()), clientIp: $.trim($("#searchIP").val()),
clientIp:$.trim($("#searchIP").val()), status: $.trim($("#searchStatus").val()),
status:$.trim($("#searchStatus").val()), beginTime: $.trim($("#searchBeginTime").datebox("getValue")),
beginTime:$.trim($("#searchBeginTime").datebox("getValue")), endTime: $.trim($("#searchEndTime").datebox("getValue")),
endTime:$.trim($("#searchEndTime").datebox("getValue")), contentdetails: $.trim($("#searchDesc").val()),
contentdetails:$.trim($("#searchDesc").val()), pageNo: pageNo,
pageNo:pageNo, pageSize: pageSize
pageSize:pageSize }),
}), success: function (data) {
success: function (data) $("#tableData").datagrid('loadData', data);
{ //$('#tableData').datagrid('reload');
$("#tableData").datagrid('loadData',data); },
//$('#tableData').datagrid('reload'); //此处添加错误处理
}, error: function () {
//此处添加错误处理 $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
error:function() return;
{ }
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); });
return; }
}
});
}
//重置按钮 //重置按钮
$("#searchResetBtn").unbind().bind({ $("#searchResetBtn").unbind().bind({
click:function() click: function () {
{ $("#searchOperation").val("");
$("#searchOperation").val(""); $("#searchUsernameID").val("");
$("#searchUsernameID").val(""); $("#searchIP").val("");
$("#searchIP").val(""); $("#searchStatus").val("");
$("#searchStatus").val(""); $("#searchBeginTime").datebox("clear");
$("#searchBeginTime").datebox("clear"); $("#searchEndTime").datebox("clear");
$("#searchEndTime").datebox("clear"); $("#searchDesc").val("");
$("#searchDesc").val("");
//加载完以后重新初始化 //加载完以后重新初始化
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,185 +1,198 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>会员信息</title> <title>会员信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/manage/supplier.js"></script> <script src="<%=path %>/js/pages/manage/supplier.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td> <tr>
<td> <td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/> <td>
</td> <input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>手机号码:</td> <td>&nbsp;</td>
<td> <td>手机号码:</td>
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/> <td>
</td> <input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>联系电话:</td> <td>&nbsp;</td>
<td> <td>联系电话:</td>
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/> <td>
</td> <input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td> <td>&nbsp;</td>
<td> <td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/> <td>
</td> <input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="会员信息列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="会员信息列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
<div id="supplierDlg" class="easyui-dialog" style="width:600px;padding:10px 20px" </div>
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true"> <div id="supplierDlg" class="easyui-dialog" style="width:600px;padding:10px 20px"
<form id="supplierFM"> closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<table> <form id="supplierFM">
<tr> <table>
<td style="width: 80px;height: 20px">名称</td> <tr>
<td style="width: 180px;padding:1px"> <td style="width: 80px;height: 20px">名称</td>
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/> <td style="width: 180px;padding:1px">
</td> <input name="supplier" id="supplier" class="easyui-validatebox"
<td style="width: 60px;height: 20px">联系人</td> data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
<td style="width:180px;padding:1px;"> </td>
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="width: 60px;height: 20px">联系人</td>
</td> <td style="width:180px;padding:1px;">
</tr> <input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<tr> </td>
<td>手机号码</td> </tr>
<td style="padding:1px;"> <tr>
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>手机号码</td>
</td> <td style="padding:1px;">
<td>电子邮箱</td> <input name="telephone" id="telephone" class="easyui-validatebox"
<td style="padding:1px"> style="width: 160px;height: 20px"/>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/> </td>
</td> <td>电子邮箱</td>
</tr> <td style="padding:1px">
<tr> <input name="email" id="email" class="easyui-validatebox" validType="email"
<td>联系电话</td> style="width: 160px;height: 20px"/>
<td style="padding:1px;"> </td>
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
<td>传真</td> <td>联系电话</td>
<td style="padding:1px"> <td style="padding:1px;">
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/> <input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td> </td>
</tr> <td>传真</td>
<tr> <td style="padding:1px">
<td>期初应收</td> <input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> </tr>
</td> <tr>
<td>期初应</td> <td>期初应</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> <input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
</td> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</tr> </td>
<tr> <td>期初应付</td>
<td>累计应收</td> <td style="padding:1px">
<td style="padding:1px"> <input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px" readonly="readonly" /> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</td> </td>
<td>累计应付</td> </tr>
<td style="padding:1px"> <tr>
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px" readonly="readonly" /> <td>累计应收</td>
</td> <td style="padding:1px">
</tr> <input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
<tr> readonly="readonly"/>
<td>纳税人识别号</td> </td>
<td style="padding:1px"> <td>累计应付</td>
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="padding:1px">
</td> <input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
<td>税率</td> readonly="readonly"/>
<td style="padding:1px"> </td>
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>纳税人识别号</td>
<tr> <td style="padding:1px">
<td>开户行</td> <input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>税率</td>
</td> <td style="padding:1px">
<td>账号</td> <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>开户行</td>
<tr> <td style="padding:1px">
<td>地址</td> <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px" colspan="3"> </td>
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/> <td>账号</td>
</td> <td style="padding:1px">
</tr> <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
<tr> style="width: 160px;height: 20px"/>
<td>备注</td> </td>
<td style="padding:1px" colspan="3"> </tr>
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea> <tr>
</td> <td>地址</td>
</tr> <td style="padding:1px" colspan="3">
</table> <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> <tr>
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td>备注</td>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a> <td style="padding:1px" colspan="3">
</div> <textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
<!-- 导入excel表格 --> <!-- 导入excel表格 -->
<div id="importExcelDlg" style="padding:10px 20px"> <div id="importExcelDlg" style="padding:10px 20px">
<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/supplier/importExcelMember.action"> <form id="importExcelFM" method="post" enctype="multipart/form-data"
<div class="fitem" style="padding:5px"> action="<%=path%>/supplier/importExcelMember.action">
<label>文件名称&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px">
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/> <label>文件名称&nbsp;&nbsp;</label>
</div> <input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
<div class="fitem" style="padding:5px"> </div>
<label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span> <div class="fitem" style="padding:5px">
</div> <label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span>
<div class="fitem" style="padding:5px;display: none;"> </div>
<label>是否审查&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px;display: none;">
<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px"> <label>是否审查&nbsp;&nbsp;</label>
<option value="0">是</option> <select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
<option value="1" selected="selected"></option> <option value="0"></option>
</select> <option value="1" selected="selected">否</option>
</div> </select>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </div>
<div id="dlg-buttons5"> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a> <div id="dlg-buttons5">
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
</div> <a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
</form> onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
</div> </div>
</body> </form>
</div>
</body>
</html> </html>

View File

@@ -1,526 +1,482 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>角色管理</title> <title>角色管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/colorbox/jquery.colorbox-min.js"></script> <script type="text/javascript" src="<%=path %>/js/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="<%=path %>/js/colorbox/colorboxSet.js"></script> <script type="text/javascript" src="<%=path %>/js/colorbox/colorboxSet.js"></script>
<link href="<%=path %>/js/colorbox/colorbox.css" rel="stylesheet" type="text/css" /> <link href="<%=path %>/js/colorbox/colorbox.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>角色名称:</td> <tr>
<td> <td>角色名称:</td>
<input type="text" name="searchName" id="searchName" style="width:150px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:150px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a id="btnSetApp" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配应用'>分配应用</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;&nbsp;
<a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a>&nbsp;&nbsp; <a id="btnSetApp" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配应用'>分配应用</a>&nbsp;&nbsp;
<a id="btnSetPushBtn" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配按钮'>分配按钮</a> <a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a>&nbsp;&nbsp;
</td> <a id="btnSetPushBtn" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配按钮'>分配按钮</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="角色列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="角色列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="roleDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="roleDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="roleFM" method="post" novalidate> <form id="roleFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td><label id="nameLabel">角色名称&nbsp;&nbsp;</label></td> <td><label id="nameLabel">角色名称&nbsp;&nbsp;</label></td>
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="name" id="name" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'"
</table> style="width: 230px;height: 20px"/></td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </tr>
</form> </table>
</div> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<div id="dlg-buttons"> </form>
<a href="javascript:void(0)" id="saveRole" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </div>
<a href="javascript:void(0)" id="cancelRole" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#roleDlg').dialog('close')">取消</a> <div id="dlg-buttons">
</div> <a href="javascript:void(0)" id="saveRole" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelRole" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#roleDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); initForm();
initForm(); browserFit();
browserFit(); });
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE') {
if(getOs()=='MSIE') $("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:");
{ $("#nameLabel").empty().append("角色名称&nbsp;&nbsp;");
$("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:"); }
$("#nameLabel").empty().append("角色名称&nbsp;&nbsp;"); else {
} $("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:");
else $("#nameLabel").empty().append("角色名称&nbsp;");
{ }
$("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:"); }
$("#nameLabel").empty().append("角色名称&nbsp;");
}
}
//防止表单提交重复 //防止表单提交重复
function initForm() function initForm() {
{ $('#roleFM').form({
$('#roleFM').form({ onSubmit: function () {
onSubmit: function(){ return false;
return false; }
} });
}); }
}
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ //title:'角色列表',
//title:'角色列表', //iconCls:'icon-save',
//iconCls:'icon-save', //width:700,
//width:700, height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: false,
rownumbers: false, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, collapsible: false,
collapsible:false, //selectOnCheck:false,
//selectOnCheck:false, //fitColumns:true,
//fitColumns:true, //单击行是否选中
//单击行是否选中 //checkOnSelect : false,
//checkOnSelect : false, url: '<%=path %>/role/findBy.action?pageSize=' + initPageSize,
url:'<%=path %>/role/findBy.action?pageSize=' + initPageSize, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: initPageSize,
pageSize: initPageSize, pageList: initPageNum,
pageList: initPageNum, columns: [[
columns:[[ {field: 'Id', width: 35, align: "center", checkbox: true},
{ field: 'Id',width:35,align:"center",checkbox:true}, {title: '角色名称', field: 'Name', width: 200},
{ title: '角色名称',field: 'Name',width:200}, {
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec) title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
{ var str = '';
var str = ''; var rowInfo = rec.Id + 'AaBb' + rec.Name;
var rowInfo = rec.Id + 'AaBb' + rec.Name; if (1 == value) {
if(1 == value) str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editRole(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
{ str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole(' + rec.Id + ');"/>&nbsp;<a onclick="deleteRole(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editRole(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; }
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole('+ rec.Id +');"/>&nbsp;<a onclick="deleteRole('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;'; return str;
} }
return str; }
} ]],
} toolbar: [
]], {
toolbar:[ id: 'addRole',
{ text: '增加',
id:'addRole', iconCls: 'icon-add',
text:'增加', handler: function () {
iconCls:'icon-add', addRole();
handler:function() }
{ },
addRole(); {
} id: 'deleteRole',
}, text: '删除',
{ iconCls: 'icon-remove',
id:'deleteRole', handler: function () {
text:'删除', batDeleteRole();
iconCls:'icon-remove', }
handler:function() }
{ ],
batDeleteRole(); onLoadError: function () {
} $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
], }
onLoadError:function() });
{ }
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) {
if(k == "13"&&(obj.id=="name"||obj.id=="sort"|| obj.id=="remark" )) $("#saveRole").click();
{ }
$("#saveRole").click(); //搜索按钮添加快捷键
} if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
//搜索按钮添加快捷键 $("#searchBtn").click();
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" )) }
{ });
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showRoleDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除供应商信息 //分页信息处理
function deleteRole(roleID) function ininPager() {
{ try {
$.messager.confirm('删除确认','确定要删除此角色信息吗?',function(r) var opts = $("#tableData").datagrid('options');
{ var pager = $("#tableData").datagrid('getPager');
if (r) pager.pagination({
{ onSelectPage: function (pageNum, pageSize) {
$.ajax({ opts.pageNumber = pageNum;
type:"post", opts.pageSize = pageSize;
url: "<%=path %>/role/delete.action", pager.pagination('refresh',
dataType: "json", {
data: ({ pageNumber: pageNum,
roleID : roleID, pageSize: pageSize
clientIp:'<%=clientIp %>' });
}), showRoleDetails(pageNum, pageSize);
success: function (tipInfo) }
{ });
var msg = tipInfo.showModel.msgTip; }
if(msg == '成功') catch (e) {
{ $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
//加载完以后重新初始化 }
$("#searchBtn").click(); }
}
else //删除供应商信息
$.messager.alert('删除提示','删除角色信息失败,请稍后再试!','error'); function deleteRole(roleID) {
}, $.messager.confirm('删除确认', '确定要删除此角色信息吗?', function (r) {
//此处添加错误处理 if (r) {
error:function() $.ajax({
{ type: "post",
$.messager.alert('删除提示','删除角色信息异常,请稍后再试!','error'); url: "<%=path %>/role/delete.action",
return; dataType: "json",
} data: ({
}); roleID: roleID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除角色信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除角色信息异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
}
//批量删除供应商 //批量删除供应商
function batDeleteRole() function batDeleteRole() {
{ var row = $('#tableData').datagrid('getChecked');
var row = $('#tableData').datagrid('getChecked'); if (row.length == 0) {
if(row.length == 0) $.messager.alert('删除提示', '没有记录被选中!', 'info');
{ return;
$.messager.alert('删除提示','没有记录被选中!','info'); }
return; if (row.length > 0) {
} $.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条角色信息吗?', function (r) {
if(row.length > 0) if (r) {
{ var ids = "";
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条角色信息吗?',function(r) for (var i = 0; i < row.length; i++) {
{ if (i == row.length - 1) {
if (r) ids += row[i].Id;
{ break;
var ids = ""; }
for(var i = 0;i < row.length; i ++) //alert(row[i].id);
{ ids += row[i].Id + ",";
if(i == row.length-1) }
{ $.ajax({
ids += row[i].Id; type: "post",
break; url: "<%=path %>/role/batchDelete.action",
} dataType: "json",
//alert(row[i].id); async: false,
ids += row[i].Id + ","; data: ({
} roleIDs: ids,
$.ajax({ clientIp: '<%=clientIp %>'
type:"post", }),
url: "<%=path %>/role/batchDelete.action", success: function (tipInfo) {
dataType: "json", var msg = tipInfo.showModel.msgTip;
async : false, if (msg == '成功') {
data: ({ //加载完以后重新初始化
roleIDs : ids, $("#searchBtn").click();
clientIp:'<%=clientIp %>' $(":checkbox").attr("checked", false);
}), }
success: function (tipInfo) else
{ $.messager.alert('删除提示', '删除角色信息失败,请稍后再试!', 'error');
var msg = tipInfo.showModel.msgTip; },
if(msg == '成功') //此处添加错误处理
{ error: function () {
//加载完以后重新初始化 $.messager.alert('删除提示', '删除角色信息异常,请稍后再试!', 'error');
$("#searchBtn").click(); return;
$(":checkbox").attr("checked",false); }
} });
else }
$.messager.alert('删除提示','删除角色信息失败,请稍后再试!','error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('删除提示','删除角色信息异常,请稍后再试!','error');
return;
}
});
}
});
}
}
//增加
var url;
var roleID = 0;
//保存编辑前的名称
var orgRole = "";
function addRole()
{
$("#clientIp").val('<%=clientIp %>');
$("#sort").val("");
$("#remark").val("");
$('#roleDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加角色信息');
$(".window-mask").css({ width: webW ,height: webH});
$("#name").val("").focus();
//$('#roleFM').form('clear');
orgRole = "";
roleID = 0;
url = '<%=path %>/role/create.action';
}
//保存信息
$("#saveRole").unbind().bind({
click:function()
{
if(!$('#roleFM').form('validate'))
return;
else if(checkRoleName())
return;
else
{
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
name : $.trim($("#name").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#roleDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showRoleDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存角色信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存角色信息异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息
function editRole(roleTotalInfo)
{
var roleInfo = roleTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(roleInfo[1]);
orgRole = roleInfo[1];
$('#roleDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑角色信息');
$(".window-mask").css({ width: webW ,height: webH});
roleID = roleInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(roleInfo[1]);
url = '<%=path %>/role/update.action?roleID=' + roleInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkRoleName()
{
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(name.length > 0 &&( orgRole.length ==0 || name != orgRole))
{
$.ajax({
type:"post",
url: "<%=path %>/role/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
roleID : roleID,
name : name
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','角色名称已经存在','info');
//alert("角色名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查角色名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showRoleDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
});
function showRoleDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/role/findBy.action",
dataType: "json",
data: ({
name:$.trim($("#searchName").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchName").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//分配应用
$('#btnSetApp').click(function () {
var currentRow = $("#tableData").datagrid("getSelected");
if (currentRow == null) {
alert("请选择一条数据再操作!");
return false;
}
this.href = "<%=path %>/pages/manage/roleApp.jsp?id=" + currentRow.Id;
}); });
}
}
//分配功能 //增加
$('#btnSetFunctions').click(function () { var url;
var currentRow = $("#tableData").datagrid("getSelected"); var roleID = 0;
if (currentRow == null) { //保存编辑前的名称
alert("请选择一条数据再操作!"); var orgRole = "";
return false;
} function addRole() {
this.href = "<%=path %>/pages/manage/roleFunctions.jsp?id=" + currentRow.Id; $("#clientIp").val('<%=clientIp %>');
$("#sort").val("");
$("#remark").val("");
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加角色信息');
$(".window-mask").css({width: webW, height: webH});
$("#name").val("").focus();
//$('#roleFM').form('clear');
orgRole = "";
roleID = 0;
url = '<%=path %>/role/create.action';
}
//保存信息
$("#saveRole").unbind().bind({
click: function () {
if (!$('#roleFM').form('validate'))
return;
else if (checkRoleName())
return;
else {
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
name: $.trim($("#name").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#roleDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showRoleDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存角色信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存角色信息异常,请稍后再试!', 'error');
return;
}
});
}
}
});
//编辑信息
function editRole(roleTotalInfo) {
var roleInfo = roleTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#name").focus().val(roleInfo[1]);
orgRole = roleInfo[1];
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑角色信息');
$(".window-mask").css({width: webW, height: webH});
roleID = roleInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(roleInfo[1]);
url = '<%=path %>/role/update.action?roleID=' + roleInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkRoleName() {
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (name.length > 0 && (orgRole.length == 0 || name != orgRole)) {
$.ajax({
type: "post",
url: "<%=path %>/role/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
roleID: roleID,
name: name
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '角色名称已经存在', 'info');
//alert("角色名称已经存在");
//$("#name").val("");
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查角色名称是否存在异常,请稍后再试!', 'error');
return;
}
}); });
}
return flag;
}
//分配按钮 //搜索处理
$('#btnSetPushBtn').click(function () { $("#searchBtn").unbind().bind({
var currentRow = $("#tableData").datagrid("getSelected"); click: function () {
if (currentRow == null) { showRoleDetails(1, initPageSize);
alert("请选择一条数据再操作!"); var opts = $("#tableData").datagrid('options');
return false; var pager = $("#tableData").datagrid('getPager');
} opts.pageNumber = 1;
this.href = "<%=path %>/pages/manage/rolePushBtn.jsp?id=" + currentRow.Id; opts.pageSize = initPageSize;
}); pager.pagination('refresh',
</script> {
</body> pageNumber: 1,
pageSize: initPageSize
});
}
});
function showRoleDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/role/findBy.action",
dataType: "json",
data: ({
name: $.trim($("#searchName").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchName").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//分配应用
$('#btnSetApp').click(function () {
var currentRow = $("#tableData").datagrid("getSelected");
if (currentRow == null) {
alert("请选择一条数据再操作!");
return false;
}
this.href = "<%=path %>/pages/manage/roleApp.jsp?id=" + currentRow.Id;
});
//分配功能
$('#btnSetFunctions').click(function () {
var currentRow = $("#tableData").datagrid("getSelected");
if (currentRow == null) {
alert("请选择一条数据再操作!");
return false;
}
this.href = "<%=path %>/pages/manage/roleFunctions.jsp?id=" + currentRow.Id;
});
//分配按钮
$('#btnSetPushBtn').click(function () {
var currentRow = $("#tableData").datagrid("getSelected");
if (currentRow == null) {
alert("请选择一条数据再操作!");
return false;
}
this.href = "<%=path %>/pages/manage/rolePushBtn.jsp?id=" + currentRow.Id;
});
</script>
</body>
</html> </html>

View File

@@ -1,138 +1,139 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>角色对应应用</title> <title>角色对应应用</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id var url_id = getUrlParam('id'); //获取传值id角色id
var type="RoleAPP"; var type = "RoleAPP";
var url;//定义链接地址 var url;//定义链接地址
function GetNode(ctype) { function GetNode(ctype) {
var node = $('#tt').tree('getChecked'); var node = $('#tt').tree('getChecked');
var cnodes = ''; var cnodes = '';
var pnodes = ''; var pnodes = '';
var prevNode = ''; //保存上一步所选父节点 var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) { for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) { if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']'; cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点 var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同 if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{ {
pnodes += '[' + pnode.id + ']'; pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点 prevNode = pnode.id; //保存当前节点
} }
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; } if (ctype == 'child') {
else { return pnodes }; return cnodes;
}; }
else {
return pnodes
}
;
};
$(function () { $(function () {
$('#tt').tree({
url:'<%=path%>/app/findRoleAPP.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
$("#btnOK").click(
function() {
if(!checkRoleAPP())
{
url = '<%=path%>/userBusiness/create.action';
}
else
{
url = '<%=path%>/userBusiness/update.action';
}
if (confirm("您确定要保存吗?")) {
$.ajax({
type: "post",
url:url,
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
},
dataType: "json",
async : false,
success: function (tipInfo) {
if (tipInfo) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else
alert(tipInfo);
}
});
}
}
);
$('#tt').tree({
url: '<%=path%>/app/findRoleAPP.action?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
}); });
//检查记录是否存在
function checkRoleAPP() $("#btnOK").click(
{ function () {
//表示是否存在 true == 存在 false = 不存在 if (!checkRoleAPP()) {
var flag = false; url = '<%=path%>/userBusiness/create.action';
//开始ajax名称检验是否存在 }
$.ajax({ else {
type:"post", url = '<%=path%>/userBusiness/update.action';
url: "<%=path %>/userBusiness/checkIsValueExist.action", }
dataType: "json",
async : false, if (confirm("您确定要保存吗?")) {
data: ({
Type : type, $.ajax({
KeyId : url_id type: "post",
}), url: url,
success: function (tipInfo) data: {
{ Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
flag = tipInfo; },
}, dataType: "json",
//此处添加错误处理 async: false,
error:function() success: function (tipInfo) {
{ if (tipInfo) {
$.messager.alert('提示','检查角色对应应用是否存在异常,请稍后再试!','error'); self.parent.$.colorbox.close();
return; alert("操作成功!");
} }
}); else
return flag; alert(tipInfo);
} }
</script> });
</body> }
}
);
});
//检查记录是否存在
function checkRoleAPP() {
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验是否存在
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json",
async: false,
data: ({
Type: type,
KeyId: url_id
}),
success: function (tipInfo) {
flag = tipInfo;
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查角色对应应用是否存在异常,请稍后再试!', 'error');
return;
}
});
return flag;
}
</script>
</body>
</html> </html>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>角色对应应用</title> <title>角色对应应用</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id var url_id = getUrlParam('id'); //获取传值id角色id
var type="RoleFunctions"; var type = "RoleFunctions";
var url;//定义链接地址 var url;//定义链接地址
function GetNode(ctype) { function GetNode(ctype) {
var node = $('#tt').tree('getChecked'); var node = $('#tt').tree('getChecked');
var cnodes = ''; var cnodes = '';
var pnodes = ''; var pnodes = '';
var prevNode = ''; //保存上一步所选父节点 var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) { for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) { if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']'; cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点 var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同 if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{ {
pnodes += '[' + pnode.id + ']'; pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点 prevNode = pnode.id; //保存当前节点
} }
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; } if (ctype == 'child') {
else { return pnodes }; return cnodes;
}; }
else {
return pnodes
}
;
};
$(function () { $(function () {
$('#tt').tree({
url:'<%=path%>/functions/findRoleFunctions.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
$("#btnOK").click(
function() {
if(!checkRoleFunctions())
{
url = '<%=path%>/userBusiness/create.action';
}
else
{
url = '<%=path%>/userBusiness/update.action';
}
if (confirm("您确定要保存吗?")) {
$.ajax({
type: "post",
url:url,
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
},
dataType: "json",
async : false,
success: function (tipInfo) {
if (tipInfo) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else
alert(tipInfo);
}
});
}
}
);
$('#tt').tree({
url: '<%=path%>/functions/findRoleFunctions.action?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
}); });
//检查记录是否存在 $("#btnOK").click(
function checkRoleFunctions() function () {
{ if (!checkRoleFunctions()) {
//表示是否存在 true == 存在 false = 不存在 url = '<%=path%>/userBusiness/create.action';
var flag = false; }
//开始ajax名称检验是否存在 else {
$.ajax({ url = '<%=path%>/userBusiness/update.action';
type:"post", }
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json", if (confirm("您确定要保存吗?")) {
async : false,
data: ({ $.ajax({
Type : type, type: "post",
KeyId : url_id url: url,
}), data: {
success: function (tipInfo) Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
{ },
flag = tipInfo; dataType: "json",
}, async: false,
//此处添加错误处理 success: function (tipInfo) {
error:function() if (tipInfo) {
{ self.parent.$.colorbox.close();
$.messager.alert('提示','检查角色对应功能是否存在异常,请稍后再试!','error'); alert("操作成功!");
return; }
} else
}); alert(tipInfo);
return flag; }
} });
</script> }
</body> }
);
});
//检查记录是否存在
function checkRoleFunctions() {
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验是否存在
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json",
async: false,
data: ({
Type: type,
KeyId: url_id
}),
success: function (tipInfo) {
flag = tipInfo;
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查角色对应功能是否存在异常,请稍后再试!', 'error');
return;
}
});
return flag;
}
</script>
</body>
</html> </html>

View File

@@ -1,264 +1,265 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>角色分配按钮</title> <title>角色分配按钮</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div id="pushList"> <div id="pushList">
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div> </div>
</div>
<script type="text/javascript"> <script type="text/javascript">
var keyId = getUrlParam('id'); //获取传值id角色id var keyId = getUrlParam('id'); //获取传值id角色id
var pushBtnJSON; var pushBtnJSON;
var userBusinessId = 0; //关系id var userBusinessId = 0; //关系id
var roleBtnStr = ""; //角色按钮权限 var roleBtnStr = ""; //角色按钮权限
//初始化界面 //初始化界面
$(function() { $(function () {
initJSON(); initJSON();
initTableData(); initTableData();
ininPager(); ininPager();
showDetails(1,initPageSize); showDetails(1, initPageSize);
bindEvent(); bindEvent();
}); });
//初始化JSON
function initJSON(){
var url = '<%=path %>/js/pages/manage/pushBtn.json';
$.ajax({
url: url,
type: "get",
async: false,
success: function(res){
if(res){
pushBtnJSON = res;
}
},
error: function(){
} //初始化JSON
}); function initJSON() {
} var url = '<%=path %>/js/pages/manage/pushBtn.json';
//初始化表格数据 $.ajax({
function initTableData() { url: url,
$('#tableData').datagrid({ type: "get",
height:360, async: false,
rownumbers: true, success: function (res) {
//动画效果 if (res) {
animate:false, pushBtnJSON = res;
//交替出现背景 }
striped : true, },
columns:[[ error: function () {
{ field: 'Id',align:"center",hidden:true},
{ title: '名称',field: 'Name',width:100},
{ title: '按钮列表',field: 'PushBtnList',width:400,formatter:function(value,rec) {
var btnStr = rec.PushBtn;
if(btnStr != undefined){
var arr = btnStr.split(",");
if(arr.length){
var str = "";
for(var i=0; i<arr.length; i++){
for(var j=0; j<pushBtnJSON.length; j++){
if(pushBtnJSON[j].id === arr[i]-0){
str += "<input type='checkbox' value='" + pushBtnJSON[j].id + "' />" +pushBtnJSON[j].text;
}
}
}
return str;
} }
} });
else { }
return "";
}
}
}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//分页信息处理 //初始化表格数据
function ininPager() { function initTableData() {
try $('#tableData').datagrid({
{ height: 360,
var opts = $("#tableData").datagrid('options'); rownumbers: true,
var pager = $("#tableData").datagrid('getPager'); //动画效果
pager.pagination({ animate: false,
onSelectPage:function(pageNum, pageSize) //交替出现背景
{ striped: true,
opts.pageNumber = pageNum; columns: [[
opts.pageSize = pageSize; {field: 'Id', align: "center", hidden: true},
pager.pagination('refresh', {title: '名称', field: 'Name', width: 100},
{ {
pageNumber:pageNum, title: '按钮列表', field: 'PushBtnList', width: 400, formatter: function (value, rec) {
pageSize:pageSize var btnStr = rec.PushBtn;
}); if (btnStr != undefined) {
showDetails(pageNum,pageSize); var arr = btnStr.split(",");
} if (arr.length) {
}); var str = "";
} for (var i = 0; i < arr.length; i++) {
catch (e) for (var j = 0; j < pushBtnJSON.length; j++) {
{ if (pushBtnJSON[j].id === arr[i] - 0) {
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); str += "<input type='checkbox' value='" + pushBtnJSON[j].id + "' />" + pushBtnJSON[j].text;
} }
} }
}
return str;
function showDetails(pageNo,pageSize){ }
$.ajax({ }
url: "<%=path%>/userBusiness/getBasicData.action", else {
type: "get", return "";
data: { }
Type: 'RoleFunctions', }
KeyId: keyId }
}, ]],
success: function(res){ onLoadError: function () {
if(res && res.showModel && res.showModel.map && res.showModel.map.userBusinessList && res.showModel.map.userBusinessList[0]){ $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
userBusinessId = res.showModel.map.userBusinessList[0].id; return;
roleBtnStr = res.showModel.map.userBusinessList[0].btnStr; }
var getValue = res.showModel.map.userBusinessList[0].value; });
getValue = getValue.substring(1,getValue.length-1); }
if(getValue.indexOf("][")){
var arr = getValue.split("][");
arr = arr.toString();
$.ajax({
url: "<%=path%>/functions/findByIds.action",
type: "get",
data: {
FunctionsIDs: arr
},
success: function(rec){
$("#tableData").datagrid('loadData',JSON.parse(rec));
},
error: function(){
$.messager.alert('提示','查询数据异常,请稍后再试!','error');
return;
}
});
}
}
},
error: function(){
$.messager.alert('提示','查询数据异常,请稍后再试!','error');
return;
}
});
}
function bindEvent() {
setTimeout(function(){
var bindBody = $("#pushList .datagrid-view2 .datagrid-body");
//加载按钮信息到缓存中 //分页信息处理
if(roleBtnStr){ function ininPager() {
var roleBtnStrArr = JSON.parse(roleBtnStr); try {
bindBody.find(".datagrid-row").each(function() { var opts = $("#tableData").datagrid('options');
for(var i= 0; i<roleBtnStrArr.length; i++){ var pager = $("#tableData").datagrid('getPager');
if(roleBtnStrArr[i] && roleBtnStrArr[i].funId){ pager.pagination({
var thisId = $(this).find("[field='Id']").text()-0; onSelectPage: function (pageNum, pageSize) {
if(roleBtnStrArr[i].funId == thisId){ opts.pageNumber = pageNum;
$(this).find("[field='Id']").attr("data-btn", roleBtnStrArr[i].btnStr); opts.pageSize = pageSize;
//加载勾选状态 pager.pagination('refresh',
$(this).find("[field='PushBtnList']").find("input").each(function () { {
var thisValue = $(this).val(); //勾选的值 pageNumber: pageNum,
if(roleBtnStrArr[i].btnStr.indexOf(thisValue)>-1){ pageSize: pageSize
$(this).prop("checked","checked"); });
} showDetails(pageNum, pageSize);
}); }
} });
} }
} catch (e) {
}); $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
} }
}
//按钮勾选事件 function showDetails(pageNo, pageSize) {
bindBody.find("[field='PushBtnList']").find("input").off("click").on("click", function () { $.ajax({
var checkStr = ""; url: "<%=path%>/userBusiness/getBasicData.action",
$(this).closest(".datagrid-cell").find("input").each(function () { type: "get",
var thisValue = $(this).val(); //勾选的值 data: {
var isChecked = $(this).prop("checked"); Type: 'RoleFunctions',
if (isChecked) { KeyId: keyId
checkStr = checkStr + thisValue + ","; },
} success: function (res) {
}); if (res && res.showModel && res.showModel.map && res.showModel.map.userBusinessList && res.showModel.map.userBusinessList[0]) {
if (checkStr) { userBusinessId = res.showModel.map.userBusinessList[0].id;
checkStr = checkStr.substring(0, checkStr.length - 1); roleBtnStr = res.showModel.map.userBusinessList[0].btnStr;
} var getValue = res.showModel.map.userBusinessList[0].value;
$(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr); getValue = getValue.substring(1, getValue.length - 1);
}); if (getValue.indexOf("][")) {
}, 500); var arr = getValue.split("][");
arr = arr.toString();
$.ajax({
url: "<%=path%>/functions/findByIds.action",
type: "get",
data: {
FunctionsIDs: arr
},
success: function (rec) {
$("#tableData").datagrid('loadData', JSON.parse(rec));
},
error: function () {
$.messager.alert('提示', '查询数据异常,请稍后再试!', 'error');
return;
}
});
}
}
},
error: function () {
$.messager.alert('提示', '查询数据异常,请稍后再试!', 'error');
return;
}
});
}
$("#btnOK").off("click").on("click", function() { function bindEvent() {
if (confirm("您确定要保存吗?")) { setTimeout(function () {
var bindList = $("#pushList .datagrid-view2 .datagrid-body .datagrid-row"); var bindBody = $("#pushList .datagrid-view2 .datagrid-body");
var bindArr = [];
var btnStr = ""; //加载按钮信息到缓存中
bindList.each(function () { if (roleBtnStr) {
var funId = $(this).find("[field='Id']").text(); var roleBtnStrArr = JSON.parse(roleBtnStr);
var btnStr = $(this).find("[field='Id']").attr("data-btn"); bindBody.find(".datagrid-row").each(function () {
if (btnStr !== undefined && btnStr !== "") { for (var i = 0; i < roleBtnStrArr.length; i++) {
var bindJSON = {}; if (roleBtnStrArr[i] && roleBtnStrArr[i].funId) {
bindJSON.funId = funId; var thisId = $(this).find("[field='Id']").text() - 0;
bindJSON.btnStr = btnStr; if (roleBtnStrArr[i].funId == thisId) {
bindArr.push(bindJSON); $(this).find("[field='Id']").attr("data-btn", roleBtnStrArr[i].btnStr);
} //加载勾选状态
}); $(this).find("[field='PushBtnList']").find("input").each(function () {
if (bindArr.length) { var thisValue = $(this).val(); //勾选的值
btnStr = JSON.stringify(bindArr); if (roleBtnStrArr[i].btnStr.indexOf(thisValue) > -1) {
} $(this).prop("checked", "checked");
$.ajax({ }
url: "<%=path%>/userBusiness/updateBtnStr.action", });
type: "get", }
data: { }
UserBusinessID: userBusinessId, }
BtnStr: btnStr });
}, }
success: function (res) {
if (res) { //按钮勾选事件
self.parent.$.colorbox.close(); bindBody.find("[field='PushBtnList']").find("input").off("click").on("click", function () {
alert("操作成功!"); var checkStr = "";
} $(this).closest(".datagrid-cell").find("input").each(function () {
else { var thisValue = $(this).val(); //勾选的值
$.messager.show({ var isChecked = $(this).prop("checked");
title: '错误提示', if (isChecked) {
msg: '保存按钮权限信息失败,请稍后重试!' checkStr = checkStr + thisValue + ",";
}); }
} });
}, if (checkStr) {
error: function () { checkStr = checkStr.substring(0, checkStr.length - 1);
$.messager.alert('提示', '保存数据异常,请稍后再试!', 'error'); }
return; $(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr);
} });
}); }, 500);
}
}); $("#btnOK").off("click").on("click", function () {
} if (confirm("您确定要保存吗?")) {
</script> var bindList = $("#pushList .datagrid-view2 .datagrid-body .datagrid-row");
</body> var bindArr = [];
var btnStr = "";
bindList.each(function () {
var funId = $(this).find("[field='Id']").text();
var btnStr = $(this).find("[field='Id']").attr("data-btn");
if (btnStr !== undefined && btnStr !== "") {
var bindJSON = {};
bindJSON.funId = funId;
bindJSON.btnStr = btnStr;
bindArr.push(bindJSON);
}
});
if (bindArr.length) {
btnStr = JSON.stringify(bindArr);
}
$.ajax({
url: "<%=path%>/userBusiness/updateBtnStr.action",
type: "get",
data: {
UserBusinessID: userBusinessId,
BtnStr: btnStr
},
success: function (res) {
if (res) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else {
$.messager.show({
title: '错误提示',
msg: '保存按钮权限信息失败,请稍后重试!'
});
}
},
error: function () {
$.messager.alert('提示', '保存数据异常,请稍后再试!', 'error');
return;
}
});
}
});
}
</script>
</body>
</html> </html>

View File

@@ -1,141 +1,142 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>系统配置</title> <title>系统配置</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/colorbox/jquery.colorbox-min.js"></script> <script type="text/javascript" src="<%=path %>/js/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="<%=path %>/js/colorbox/colorboxSet.js"></script> <script type="text/javascript" src="<%=path %>/js/colorbox/colorboxSet.js"></script>
<link href="<%=path %>/js/colorbox/colorbox.css" rel="stylesheet" type="text/css" /> <link href="<%=path %>/js/colorbox/colorbox.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
$(function(){ $(function () {
//加载信息 //加载信息
function loadInfo() { function loadInfo() {
$.ajax({ $.ajax({
type:"get", type: "get",
url: "<%=path %>/systemConfig/findBy.action", url: "<%=path %>/systemConfig/findBy.action",
dataType: "json", dataType: "json",
success: function (res) { success: function (res) {
if(res && res.rows) { if (res && res.rows) {
var array = res.rows; var array = res.rows;
for(var i=0; i<array.length; i++){ for (var i = 0; i < array.length; i++) {
var name = array[i].name; var name = array[i].name;
$("." + name).val(array[i].value).attr("data-value",array[i].value).attr("data-id",array[i].id); $("." + name).val(array[i].value).attr("data-value", array[i].value).attr("data-id", array[i].id);
} }
} }
}, },
//此处添加错误处理 //此处添加错误处理
error:function() { error: function () {
$.messager.alert('查询失败','查询系统配置信息异常,请稍后再试!','error'); $.messager.alert('查询失败', '查询系统配置信息异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
loadInfo(); //加载信息 loadInfo(); //加载信息
$("#saveSystemConfig").off("click").on("click",function(){ $("#saveSystemConfig").off("click").on("click", function () {
var status = false; var status = false;
$("#searchTable input").each(function(){ $("#searchTable input").each(function () {
var thisId = $(this).attr("data-id"); var thisId = $(this).attr("data-id");
var thisValue = $(this).attr("data-value"); var thisValue = $(this).attr("data-value");
if($(this).val() != thisValue){ if ($(this).val() != thisValue) {
//更新修改过的单行信息 //更新修改过的单行信息
$.ajax({ $.ajax({
type: "post", type: "post",
url: "<%=path %>/systemConfig/update.action", url: "<%=path %>/systemConfig/update.action",
dataType: "json", dataType: "json",
data: { data: {
id: thisId, id: thisId,
value: $(this).val() value: $(this).val()
}, },
success: function (res) { success: function (res) {
if(res) { if (res) {
status = true; status = true;
} }
}, },
//此处添加错误处理 //此处添加错误处理
error: function () { error: function () {
$.messager.alert('保存失败', '保存系统配置信息失败,请稍后再试!', 'error'); $.messager.alert('保存失败', '保存系统配置信息失败,请稍后再试!', 'error');
return; return;
} }
}); });
} }
}); });
setTimeout(function(){ setTimeout(function () {
if(status) { if (status) {
$.messager.alert('保存成功','保存系统配置信息成功!','info'); $.messager.alert('保存成功', '保存系统配置信息成功!', 'info');
loadInfo(); //加载信息 loadInfo(); //加载信息
} }
else { else {
$.messager.alert('提示','信息未修改,无需保存!','info'); $.messager.alert('提示', '信息未修改,无需保存!', 'info');
} }
},1000); }, 1000);
}); });
}) })
</script> </script>
</head> </head>
<body> <body>
<div class="system-config"> <div class="system-config">
<table id="searchTable"> <table id="searchTable">
<tr> <tr>
<td>公司名称:</td> <td>公司名称:</td>
<td> <td>
<input type="text" class="company_name easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width:250px;"/> <input type="text" class="company_name easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td>联系人:</td> <tr>
<td> <td>联系人:</td>
<input type="text" class="company_contacts" style="width:250px;"/> <td>
</td> <input type="text" class="company_contacts" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td>公司地址:</td> <tr>
<td> <td>公司地址:</td>
<input type="text" class="company_address" style="width:250px;"/> <td>
</td> <input type="text" class="company_address" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td>公司电话:</td> <tr>
<td> <td>公司电话:</td>
<input type="text" class="company_tel" style="width:250px;"/> <td>
</td> <input type="text" class="company_tel" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td>公司传真:</td> <tr>
<td> <td>公司传真:</td>
<input type="text" class="company_fax" style="width:250px;"/> <td>
</td> <input type="text" class="company_fax" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td>公司邮编:</td> <tr>
<td> <td>公司邮编:</td>
<input type="text" class="company_post_code" style="width:250px;"/> <td>
</td> <input type="text" class="company_post_code" style="width:250px;"/>
</tr> </td>
<tr> </tr>
<td></td> <tr>
<td> <td></td>
<a href="javascript:void(0)" id="saveSystemConfig" class="easyui-linkbutton" iconCls="icon-ok">保存信息</a> <td>
</td> <a href="javascript:void(0)" id="saveSystemConfig" class="easyui-linkbutton" iconCls="icon-ok">保存信息</a>
</tr> </td>
</table> </tr>
</div> </table>
</body> </div>
</body>
</html> </html>

View File

@@ -1,468 +1,455 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>计量单位管理</title> <title>计量单位管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>计量单位:</td> <tr>
<td> <td>计量单位:</td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="计量单位列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="计量单位列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="unitDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="unitDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="unitFM" method="post" novalidate> <form id="unitFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>基本单位</td> <td>基本单位</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="basicName" id="basicName" class="easyui-validatebox" data-options="required:true,validType:'length[1,10]'" style="width: 100px;height: 20px"/> <input name="basicName" id="basicName" class="easyui-validatebox"
基本单位应为最小度量单位 data-options="required:true,validType:'length[1,10]'" style="width: 100px;height: 20px"/>
</td> 基本单位应为最小度量单位
</tr> </td>
<tr> </tr>
<td>副单位</td> <tr>
<td style="padding:5px"> <td>副单位</td>
<input name="otherName" id="otherName" class="easyui-validatebox" data-options="required:true,validType:'length[1,5]'" style="width: 100px;height: 20px"/> <td style="padding:5px">
= <input name="otherName" id="otherName" class="easyui-validatebox"
<input name="otherNum" id="otherNum" class="easyui-validatebox" data-options="required:true,validType:'length[1,5]'" style="width: 50px;height: 20px"/> data-options="required:true,validType:'length[1,5]'" style="width: 100px;height: 20px"/>
<span id="unitName"></span> =
</td> <input name="otherNum" id="otherNum" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[1,5]'" style="width: 50px;height: 20px"/>
</table> <span id="unitName"></span>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </td>
</form> </tr>
</div> </table>
<div id="dlg-buttons"> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="saveUnit" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </form>
<a href="javascript:void(0)" id="cancelUnit" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#unitDlg').dialog('close')">取消</a> </div>
</div> <div id="dlg-buttons">
<a href="javascript:void(0)" id="saveUnit" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelUnit" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#unitDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); initForm();
initForm(); });
});
//防止表单提交重复 //防止表单提交重复
function initForm() function initForm() {
{ $('#unitFM').form({
$('#unitFM').form({ onSubmit: function () {
onSubmit: function(){ return false;
return false; }
} });
}); }
}
//初始化表格数据 //初始化表格数据
function initTableData() { function initTableData() {
$('#tableData').datagrid({ $('#tableData').datagrid({
//title:'计量单位列表', //title:'计量单位列表',
//iconCls:'icon-save', //iconCls:'icon-save',
//width:700, //width:700,
height:heightInfo, height: heightInfo,
nowrap: false, nowrap: false,
rownumbers: false, rownumbers: false,
//动画效果 //动画效果
animate:false, animate: false,
//选中单行 //选中单行
singleSelect : true, singleSelect: true,
collapsible:false, collapsible: false,
selectOnCheck:false, selectOnCheck: false,
//fitColumns:true, //fitColumns:true,
//单击行是否选中 //单击行是否选中
checkOnSelect : false, checkOnSelect: false,
url:'<%=path %>/unit/findBy.action?pageSize=' + initPageSize, url: '<%=path %>/unit/findBy.action?pageSize=' + initPageSize,
pagination: true, pagination: true,
//交替出现背景 //交替出现背景
striped : true, striped: true,
//loadFilter: pagerFilter, //loadFilter: pagerFilter,
pageSize: initPageSize, pageSize: initPageSize,
pageList: initPageNum, pageList: initPageNum,
columns:[[ columns: [[
{ field: 'id',width:35,align:"center",checkbox:true}, {field: 'id', width: 35, align: "center", checkbox: true},
{ title: '操作',field: 'op',align:"center",width:60, {
formatter:function(value,rec) { title: '操作', field: 'op', align: "center", width: 60,
var str = ''; formatter: function (value, rec) {
var rowInfo = rec.id + 'AaBb' + rec.UName; var str = '';
if(1 == value) var rowInfo = rec.id + 'AaBb' + rec.UName;
{ if (1 == value) {
str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;'; str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit('+ rec.id +');"/>'; str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
} }
return str; return str;
} }
}, },
{ title: '计量单位',field: 'UName',width:200} {title: '计量单位', field: 'UName', width: 200}
]], ]],
toolbar:[ toolbar: [
{ {
id:'addUnit', id: 'addUnit',
text:'增加', text: '增加',
iconCls:'icon-add', iconCls: 'icon-add',
handler:function() { handler: function () {
addUnit(); addUnit();
} }
},'-', }, '-',
{ {
id:'deleteUnit', id: 'deleteUnit',
text:'删除', text: '删除',
iconCls:'icon-remove', iconCls: 'icon-remove',
handler:function() { handler: function () {
batDeleteUnit(); batDeleteUnit();
} }
} }
], ],
onLoadError:function() { onLoadError: function () {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) { $(document).keydown(function (event) {
//兼容 IE和firefox 事件 //兼容 IE和firefox 事件
var e = window.event || event; var e = window.event || event;
var k = e.keyCode||e.which||e.charCode; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="name")) { if (k == "13" && (obj.id == "name")) {
$("#saveUnit").click(); $("#saveUnit").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchName")) { if (k == "13" && (obj.id == "searchName")) {
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//分页信息处理
function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber:pageNum,
pageSize:pageSize
});
showUnitDetails(pageNum,pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//删除计量单位 //分页信息处理
function deleteUnit(unitID) { function ininPager() {
$.messager.confirm('删除确认','确定要删除此计量单位吗?',function(r) { try {
if (r) { var opts = $("#tableData").datagrid('options');
$.ajax({ var pager = $("#tableData").datagrid('getPager');
type:"post", pager.pagination({
url: "<%=path %>/unit/delete.action", onSelectPage: function (pageNum, pageSize) {
dataType: "json", opts.pageNumber = pageNum;
data: ({ opts.pageSize = pageSize;
unitID : unitID, pager.pagination('refresh', {
clientIp:'<%=clientIp %>' pageNumber: pageNum,
}), pageSize: pageSize
success: function (tipInfo) { });
var msg = tipInfo.showModel.msgTip; showUnitDetails(pageNum, pageSize);
if(msg == '成功') }
{ });
//加载完以后重新初始化 }
$("#searchBtn").click(); catch (e) {
} $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
else }
$.messager.alert('删除提示','删除计量单位失败,请稍后再试!','error'); }
},
//此处添加错误处理 //删除计量单位
error:function() { function deleteUnit(unitID) {
$.messager.alert('删除提示','删除计量单位异常,请稍后再试!','error'); $.messager.confirm('删除确认', '确定要删除计量单位吗?', function (r) {
return; if (r) {
} $.ajax({
}); type: "post",
url: "<%=path %>/unit/delete.action",
dataType: "json",
data: ({
unitID: unitID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除计量单位失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除计量单位异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
}
//批量删除计量单位 //批量删除计量单位
function batDeleteUnit() { function batDeleteUnit() {
var row = $('#tableData').datagrid('getChecked'); var row = $('#tableData').datagrid('getChecked');
if(row.length == 0) { if (row.length == 0) {
$.messager.alert('删除提示','没有记录被选中!','info'); $.messager.alert('删除提示', '没有记录被选中!', 'info');
return; return;
} }
if(row.length > 0) { if (row.length > 0) {
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条计量单位信息吗?',function(r) { $.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条计量单位信息吗?', function (r) {
if (r) if (r) {
{ var ids = "";
var ids = ""; for (var i = 0; i < row.length; i++) {
for(var i = 0;i < row.length; i ++) if (i == row.length - 1) {
{ ids += row[i].id;
if(i == row.length-1) break;
{ }
ids += row[i].id; //alert(row[i].id);
break; ids += row[i].id + ",";
} }
//alert(row[i].id); $.ajax({
ids += row[i].id + ","; type: "post",
} url: "<%=path %>/unit/batchDelete.action",
$.ajax({ dataType: "json",
type:"post", async: false,
url: "<%=path %>/unit/batchDelete.action", data: ({
dataType: "json", unitIDs: ids,
async : false, clientIp: '<%=clientIp %>'
data: ({ }),
unitIDs : ids, success: function (tipInfo) {
clientIp:'<%=clientIp %>' var msg = tipInfo.showModel.msgTip;
}), if (msg == '成功') {
success: function (tipInfo) { //加载完以后重新初始化
var msg = tipInfo.showModel.msgTip; $("#searchBtn").click();
if(msg == '成功'){ $(":checkbox").attr("checked", false);
//加载完以后重新初始化 }
$("#searchBtn").click(); else
$(":checkbox").attr("checked",false); $.messager.alert('删除提示', '删除计量单位失败,请稍后再试!', 'error');
} },
else //此处添加错误处理
$.messager.alert('删除提示','删除计量单位失败,请稍后再试!','error'); error: function () {
}, $.messager.alert('删除提示', '删除计量单位异常,请稍后再试!', 'error');
//此处添加错误处理 return;
error:function(){ }
$.messager.alert('删除提示','删除计量单位异常,请稍后再试!','error'); });
return; }
} });
}); }
} }
});
}
}
//增加 //增加
var url; var url;
var unitID = 0; var unitID = 0;
//保存编辑前的名称 //保存编辑前的名称
var orgUnit = ""; var orgUnit = "";
function addUnit(){ function addUnit() {
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
$('#unitDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加计量单位'); $('#unitDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加计量单位');
$(".window-mask").css({ width: webW ,height: webH}); $(".window-mask").css({width: webW, height: webH});
$('#unitFM').form('clear'); $('#unitFM').form('clear');
$("#name").focus(); $("#name").focus();
$("#unitName").text(""); $("#unitName").text("");
orgUnit = ""; orgUnit = "";
unitID = 0; unitID = 0;
url = '<%=path %>/unit/create.action'; url = '<%=path %>/unit/create.action';
} }
//保存信息 //保存信息
$("#saveUnit").unbind().bind({ $("#saveUnit").unbind().bind({
click:function() click: function () {
{ if (!$('#unitFM').form('validate'))
if(!$('#unitFM').form('validate')) return;
return; else if (checkUnitName())
else if(checkUnitName()) return;
return; else {
else var basicName = $.trim($("#basicName").val());
{ var otherName = $.trim($("#otherName").val());
var basicName = $.trim($("#basicName").val()); var otherNum = $.trim($("#otherNum").val());
var otherName = $.trim($("#otherName").val()); var name = basicName + "," + otherName + "(1:" + otherNum + ")";
var otherNum = $.trim($("#otherNum").val()); $.ajax({
var name = basicName + "," + otherName + "(1:" + otherNum + ")"; type: "post",
$.ajax({ url: url,
type:"post", dataType: "json",
url: url, async: false,
dataType: "json", data: ({
async : false, UName: name,
data: ({ clientIp: '<%=clientIp %>'
UName : name, }),
clientIp:'<%=clientIp %>' success: function (tipInfo) {
}), if (tipInfo) {
success: function (tipInfo) $('#unitDlg').dialog('close');
{
if(tipInfo)
{
$('#unitDlg').dialog('close');
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
showUnitDetails(opts.pageNumber,opts.pageSize); showUnitDetails(opts.pageNumber, opts.pageSize);
} }
else else {
{ $.messager.show({
$.messager.show({ title: '错误提示',
title: '错误提示', msg: '保存计量单位失败,请稍后重试!'
msg: '保存计量单位失败,请稍后重试!' });
}); }
} },
}, //此处添加错误处理
//此处添加错误处理 error: function () {
error:function() $.messager.alert('提示', '保存计量单位异常,请稍后再试!', 'error');
{ return;
$.messager.alert('提示','保存计量单位异常,请稍后再试!','error'); }
return; });
} }
}); }
} });
}
});
//编辑信息 //编辑信息
function editUnit(unitTotalInfo) { function editUnit(unitTotalInfo) {
var unitInfo = unitTotalInfo.split("AaBb"); var unitInfo = unitTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
orgUnit = unitInfo[1]; orgUnit = unitInfo[1];
$('#unitDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑计量单位'); $('#unitDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑计量单位');
$(".window-mask").css({ width: webW ,height: webH}); $(".window-mask").css({width: webW, height: webH});
unitID = unitInfo[0]; unitID = unitInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
var name = unitInfo[1]; var name = unitInfo[1];
var basicName = name.substring(0, name.indexOf(",")); //基础单位 var basicName = name.substring(0, name.indexOf(",")); //基础单位
$("#basicName").val(basicName); $("#basicName").val(basicName);
var otherItem = name.substring(name.indexOf(",")+1); var otherItem = name.substring(name.indexOf(",") + 1);
var otherName = otherItem.substring(0,otherItem.indexOf("(")); var otherName = otherItem.substring(0, otherItem.indexOf("("));
$("#otherName").val(otherName); $("#otherName").val(otherName);
var lastNum = otherItem.substring(otherItem.indexOf(":")+1); var lastNum = otherItem.substring(otherItem.indexOf(":") + 1);
lastNum = lastNum.replace(")",""); lastNum = lastNum.replace(")", "");
$("#otherNum").val(lastNum); $("#otherNum").val(lastNum);
$("#unitName").text(basicName); $("#unitName").text(basicName);
url = '<%=path %>/unit/update.action?unitID=' + unitInfo[0]; url = '<%=path %>/unit/update.action?unitID=' + unitInfo[0];
} }
//检查名称是否存在 ++ 重名无法提示问题需要跟进 //检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkUnitName() function checkUnitName() {
{ var name = $.trim($("#name").val());
var name = $.trim($("#name").val()); //表示是否存在 true == 存在 false = 不存在
//表示是否存在 true == 存在 false = 不存在 var flag = false;
var flag = false; //开始ajax名称检验不能重名
//开始ajax名称检验不能重名 if (name.length > 0 && (orgUnit.length == 0 || name != orgUnit)) {
if(name.length > 0 &&( orgUnit.length ==0 || name != orgUnit)) $.ajax({
{ type: "post",
$.ajax({ url: "<%=path %>/unit/checkIsNameExist.action",
type:"post", dataType: "json",
url: "<%=path %>/unit/checkIsNameExist.action", async: false,
dataType: "json", data: ({
async : false, unitID: unitID,
data: ({ UName: name
unitID : unitID, }),
UName : name success: function (tipInfo) {
}), flag = tipInfo;
success: function (tipInfo){ if (tipInfo) {
flag = tipInfo; $.messager.alert('提示', '计量单位名称已经存在', 'info');
if(tipInfo) return;
{ }
$.messager.alert('提示','计量单位名称已经存在','info'); },
return; //此处添加错误处理
} error: function () {
}, $.messager.alert('提示', '检查计量单位名称是否存在异常,请稍后再试!', 'error');
//此处添加错误处理 return;
error:function() }
{ });
$.messager.alert('提示','检查计量单位名称是否存在异常,请稍后再试!','error'); }
return; return flag;
} }
});
}
return flag;
}
//搜索处理 //搜索处理
$("#searchBtn").unbind().bind({ $("#searchBtn").unbind().bind({
click:function() click: function () {
{ showUnitDetails(1, initPageSize);
showUnitDetails(1,initPageSize); var opts = $("#tableData").datagrid('options');
var opts = $("#tableData").datagrid('options'); var pager = $("#tableData").datagrid('getPager');
var pager = $("#tableData").datagrid('getPager'); opts.pageNumber = 1;
opts.pageNumber = 1; opts.pageSize = initPageSize;
opts.pageSize = initPageSize; pager.pagination('refresh',
pager.pagination('refresh', {
{ pageNumber: 1,
pageNumber:1, pageSize: initPageSize
pageSize:initPageSize });
}); }
} });
});
function showUnitDetails(pageNo,pageSize) function showUnitDetails(pageNo, pageSize) {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path %>/unit/findBy.action",
url: "<%=path %>/unit/findBy.action", dataType: "json",
dataType: "json", data: ({
data: ({ UName: $.trim($("#searchName").val()),
UName:$.trim($("#searchName").val()), pageNo: pageNo,
pageNo:pageNo, pageSize: pageSize
pageSize:pageSize }),
}), success: function (data) {
success: function (data) $("#tableData").datagrid('loadData', data);
{ },
$("#tableData").datagrid('loadData',data); //此处添加错误处理
}, error: function () {
//此处添加错误处理 $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
error:function() return;
{ }
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); });
return; }
}
});
}
//重置按钮 //重置按钮
$("#searchResetBtn").unbind().bind({ $("#searchResetBtn").unbind().bind({
click:function(){ click: function () {
$("#searchName").val(""); $("#searchName").val("");
//加载完以后重新初始化 //加载完以后重新初始化
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//单位名称事件 //单位名称事件
$("#basicName").off("keyup").on("keyup", function(){ $("#basicName").off("keyup").on("keyup", function () {
$("#unitName").text($(this).val()); $("#unitName").text($(this).val());
}); });
</script> </script>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,186 +1,199 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>供应商信息</title> <title>供应商信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/manage/supplier.js"></script> <script src="<%=path %>/js/pages/manage/supplier.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td> <tr>
<td> <td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/> <td>
</td> <input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>手机号码:</td> <td>&nbsp;</td>
<td> <td>手机号码:</td>
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/> <td>
</td> <input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td>联系电话:</td> <td>&nbsp;</td>
<td> <td>联系电话:</td>
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/> <td>
</td> <input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td> <td>&nbsp;</td>
<td> <td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/> <td>
</td> <input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商信息列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商信息列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px" </div>
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true"> <div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
<form id="supplierFM"> closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<table> <form id="supplierFM">
<tr> <table>
<td style="width: 80px;height: 20px">名称</td> <tr>
<td style="width: 180px;padding:1px"> <td style="width: 80px;height: 20px">名称</td>
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/> <td style="width: 180px;padding:1px">
</td> <input name="supplier" id="supplier" class="easyui-validatebox"
<td style="width: 60px;height: 20px">联系人</td> data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
<td style="width:180px;padding:1px;"> </td>
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="width: 60px;height: 20px">联系人</td>
</td> <td style="width:180px;padding:1px;">
</tr> <input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<tr> </td>
<td>手机号码</td> </tr>
<td style="padding:1px;"> <tr>
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>手机号码</td>
</td> <td style="padding:1px;">
<td>电子邮箱</td> <input name="telephone" id="telephone" class="easyui-validatebox"
<td style="padding:1px"> style="width: 160px;height: 20px"/>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/> </td>
</td> <td>电子邮箱</td>
</tr> <td style="padding:1px">
<tr> <input name="email" id="email" class="easyui-validatebox" validType="email"
<td>联系电话</td> style="width: 160px;height: 20px"/>
<td style="padding:1px;"> </td>
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
<td>传真</td> <td>联系电话</td>
<td style="padding:1px"> <td style="padding:1px;">
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/> <input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td> </td>
</tr> <td>传真</td>
<tr> <td style="padding:1px">
<td>期初应收</td> <input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> </tr>
</td> <tr>
<td>期初应</td> <td>期初应</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" /> <input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
</td> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</tr> </td>
<tr> <td>期初应付</td>
<td>累计应收</td> <td style="padding:1px">
<td style="padding:1px"> <input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px" readonly="readonly" /> data-options="min:0,precision:2" style="width: 160px;height: 20px"/>
</td> </td>
<td>累计应付</td> </tr>
<td style="padding:1px"> <tr>
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px" readonly="readonly" /> <td>累计应收</td>
</td> <td style="padding:1px">
</tr> <input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
<tr> readonly="readonly"/>
<td>纳税人识别号</td> </td>
<td style="padding:1px"> <td>累计应付</td>
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="padding:1px">
</td> <input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
<td>税率</td> readonly="readonly"/>
<td style="padding:1px"> </td>
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>纳税人识别号</td>
<tr> <td style="padding:1px">
<td>开户行</td> <input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>税率</td>
</td> <td style="padding:1px">
<td>账号</td> <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>开户行</td>
<tr> <td style="padding:1px">
<td>地址</td> <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px" colspan="3"> </td>
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/> <td>账号</td>
</td> <td style="padding:1px">
</tr> <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
<tr> style="width: 160px;height: 20px"/>
<td>备注</td> </td>
<td style="padding:1px" colspan="3"> </tr>
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea> <tr>
</td> <td>地址</td>
</tr> <td style="padding:1px" colspan="3">
</table> <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> <tr>
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td>备注</td>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a> <td style="padding:1px" colspan="3">
</div> <textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
<!-- 导入excel表格 --> <!-- 导入excel表格 -->
<div id="importExcelDlg" style="padding:10px 20px"> <div id="importExcelDlg" style="padding:10px 20px">
<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/supplier/importExcelVendor.action"> <form id="importExcelFM" method="post" enctype="multipart/form-data"
<div class="fitem" style="padding:5px"> action="<%=path%>/supplier/importExcelVendor.action">
<label>文件名称&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px">
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/> <label>文件名称&nbsp;&nbsp;</label>
</div> <input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
<div class="fitem" style="padding:5px"> </div>
<label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span> <div class="fitem" style="padding:5px">
</div> <label><b>导入注意</b>&nbsp;&nbsp;</label><span>预收款、期初应收、期初应付、税率均为数值且要大于0另外期初应收、期初应付不能同时输入</span>
<div class="fitem" style="padding:5px;display: none;"> </div>
<label>是否审查&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px;display: none;">
<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px"> <label>是否审查&nbsp;&nbsp;</label>
<option value="0">是</option> <select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
<option value="1" selected="selected"></option> <option value="0"></option>
</select> <option value="1" selected="selected">否</option>
</div> </select>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </div>
<div id="dlg-buttons5"> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a> <div id="dlg-buttons5">
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
</div> <a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
</form> onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
</div> </div>
</form>
</div>
</body> </body>
</html> </html>

View File

@@ -1,137 +1,146 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>调拨出库</title> <title>调拨出库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="调拨出库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="调拨出库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">单据日期:</td> <td style="width:60px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width:140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:80px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px;width:170px;"></td> data-options="required:true,validType:'length[2,30]'" style="width:140px;"/>
<td style="width:70px;"></td> </td>
<td style="padding:5px"></td> <td style="width:80px;"></td>
<td style="width:100px;"></td> <td style="padding:5px;width:170px;"></td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px"></td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:60px;">单据日期:</td> </div>
<td style="padding:5px;width:130px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px"
<span id="OperTimeShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据编号:</td> <tr>
<td style="padding:5px;width:130px;"> <td style="width:60px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OperTimeShow"></span>
<td style="width:80px;"></td> </td>
<td style="padding:5px;width:140px;"></td> <td style="width:70px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"></td> <span id="NumberShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td style="width:80px;"></td>
<tr> <td style="padding:5px;width:140px;"></td>
<td colspan="9" style="width: 1130px;"> <td style="width:70px;"></td>
<!-- 商品列表table --> <td style="padding:5px;width:140px;"></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,137 +1,146 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>组装单</title> <title>组装单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="组装单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="组装单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">单据日期:</td> <td style="width:60px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width:140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:80px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px;width:170px;"></td> data-options="required:true,validType:'length[2,30]'" style="width:140px;"/>
<td style="width:70px;"></td> </td>
<td style="padding:5px"></td> <td style="width:80px;"></td>
<td style="width:100px;"></td> <td style="padding:5px;width:170px;"></td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px"></td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:60px;">单据日期:</td> </div>
<td style="padding:5px;width:130px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px"
<span id="OperTimeShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据编号:</td> <tr>
<td style="padding:5px;width:130px;"> <td style="width:60px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OperTimeShow"></span>
<td style="width:80px;"></td> </td>
<td style="padding:5px;width:140px;"></td> <td style="width:70px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"></td> <span id="NumberShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td style="width:80px;"></td>
<tr> <td style="padding:5px;width:140px;"></td>
<td colspan="9" style="width: 1130px;"> <td style="width:70px;"></td>
<!-- 商品列表table --> <td style="padding:5px;width:140px;"></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,34 +1,35 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>单据明细</title> <title>单据明细</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/bill_detail.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/bill_detail.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/bill_detail.js"></script> <script src="<%=path %>/js/pages/materials/bill_detail.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list" collapsible="true" closable="false"> <div id="bill" class="easyui-panel" style="padding:10px;height:500px;" title="单据明细" iconCls="icon-list"
collapsible="true" closable="false">
<%--零售出库--%> <%--零售出库--%>
<div class="retail_out" style="width:1100px;padding:10px 20px;top:50px" <div class="retail_out" style="width:1100px;padding:10px 20px;top:50px"
closed="true" modal="true" cache="false" collapsible="false" closable="true"> closed="true" modal="true" cache="false" collapsible="false" closable="true">

View File

@@ -1,137 +1,146 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>拆卸单</title> <title>拆卸单</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="拆卸单列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="拆卸单列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">单据日期:</td> <td style="width:60px;">单据日期:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width:140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:80px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px;width:170px;"></td> data-options="required:true,validType:'length[2,30]'" style="width:140px;"/>
<td style="width:70px;"></td> </td>
<td style="padding:5px"></td> <td style="width:80px;"></td>
<td style="width:100px;"></td> <td style="padding:5px;width:170px;"></td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px"></td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:60px;">单据日期:</td> </div>
<td style="padding:5px;width:130px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px"
<span id="OperTimeShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据编号:</td> <tr>
<td style="padding:5px;width:130px;"> <td style="width:60px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OperTimeShow"></span>
<td style="width:80px;"></td> </td>
<td style="padding:5px;width:140px;"></td> <td style="width:70px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"></td> <span id="NumberShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td style="width:80px;"></td>
<tr> <td style="padding:5px;width:140px;"></td>
<td colspan="9" style="width: 1130px;"> <td style="width:70px;"></td>
<!-- 商品列表table --> <td style="padding:5px;width:140px;"></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,137 +1,146 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>礼品销售</title> <title>礼品销售</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="礼品销售列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="礼品销售列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td></td> <input name="Number" id="Number" class="easyui-validatebox"
<td></td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<td></td> </td>
<td></td> <td></td>
<td style="width:100px;"></td> <td></td>
</tr> <td></td>
<tr> <td></td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:70px;">单据日期:</td> </div>
<td style="padding:5px;width:140px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
<span id="OperTimeShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据编号:</td> <tr>
<td style="padding:5px;width:140px;"> <td style="width:70px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:140px;">
</td> <span id="OperTimeShow"></span>
<td></td> </td>
<td></td> <td style="width:70px;">单据编号:</td>
<td></td> <td style="padding:5px;width:140px;">
<td></td> <span id="NumberShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td></td>
<tr> <td></td>
<td colspan="9" style="width: 1130px;"> <td></td>
<!-- 商品列表table --> <td></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,137 +1,146 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>礼品充值</title> <title>礼品充值</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品充值列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品充值列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width: 140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width: 140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td></td> <input name="Number" id="Number" class="easyui-validatebox"
<td></td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<td></td> </td>
<td></td> <td></td>
<td style="width:100px;"></td> <td></td>
</tr> <td></td>
<tr> <td></td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:70px;">单据日期:</td> </div>
<td style="padding:5px;width:140px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
<span id="OperTimeShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据编号:</td> <tr>
<td style="padding:5px;width:140px;"> <td style="width:70px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:140px;">
</td> <span id="OperTimeShow"></span>
<td></td> </td>
<td></td> <td style="width:70px;">单据编号:</td>
<td></td> <td style="padding:5px;width:140px;">
<td></td> <span id="NumberShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td></td>
<tr> <td></td>
<td colspan="9" style="width: 1130px;"> <td></td>
<!-- 商品列表table --> <td></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,297 +1,300 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>商品属性</title> <title>商品属性</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名称:</td> <tr>
<td> <td>名称:</td>
<input name="searchNativeName" id="searchNativeName" style="width:120px;"/> <td>
</td> <input name="searchNativeName" id="searchNativeName" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</table>
</div> </div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品属性列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品属性列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div> </div>
<div id="materialPropertyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="materialPropertyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="materialPropertyFM" method="post" novalidate> <form id="materialPropertyFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>名称</td> <td>名称</td>
<td style="padding:5px"> <td style="padding:5px">
<span id="nativeName" /> <span id="nativeName"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>是否启用</td> <td>是否启用</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="enabled" id="enabled" type="checkbox" style="width: 50px;height: 20px"/> <input name="enabled" id="enabled" type="checkbox" style="width: 50px;height: 20px"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>排序</td> <td>排序</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="sort" id="sort" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/> <input name="sort" id="sort" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</tr> </td>
<tr> </tr>
<td>别名</td> <tr>
<td style="padding:5px"> <td>别名</td>
<input name="anotherName" id="anotherName" class="easyui-validatebox" data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/> <td style="padding:5px">
</td> <input name="anotherName" id="anotherName" class="easyui-validatebox"
</tr> data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</table> </td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </tr>
</form> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div> </div>
<div id="dlg-buttons"> <div id="dlg-buttons">
<a href="javascript:void(0)" id="saveMaterialProperty" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a href="javascript:void(0)" id="saveMaterialProperty" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelMaterialProperty" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#materialPropertyDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="cancelMaterialProperty" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#materialPropertyDlg').dialog('close')">取消</a>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() { $(function () {
initTableData(); initTableData();
ininPager(); ininPager();
initForm(); initForm();
}); });
//防止表单提交重复 //防止表单提交重复
function initForm() { function initForm() {
$('#materialPropertyFM').form({ $('#materialPropertyFM').form({
onSubmit: function(){ onSubmit: function () {
return false; return false;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() { function initTableData() {
$('#tableData').datagrid({ $('#tableData').datagrid({
height:heightInfo, height: heightInfo,
nowrap: false, nowrap: false,
rownumbers: true, rownumbers: true,
//动画效果 //动画效果
animate:false, animate: false,
//选中单行 //选中单行
singleSelect : true, singleSelect: true,
collapsible:false, collapsible: false,
selectOnCheck:false, selectOnCheck: false,
//fitColumns:true, //fitColumns:true,
//单击行是否选中 //单击行是否选中
//checkOnSelect : false, //checkOnSelect : false,
url:'<%=path %>/materialProperty/findBy.action?pageSize=' + initPageSize, url: '<%=path %>/materialProperty/findBy.action?pageSize=' + initPageSize,
pagination: false, pagination: false,
//交替出现背景 //交替出现背景
striped : true, striped: true,
//loadFilter: pagerFilter, //loadFilter: pagerFilter,
columns:[[ columns: [[
{ field: 'id',width:10,align:"center",hidden:true}, {field: 'id', width: 10, align: "center", hidden: true},
{ title: '名称',field: 'nativeName',width:100}, {title: '名称', field: 'nativeName', width: 100},
{ title: '是否启用',field: 'enabled',width:100,formatter:function(value,rec){ {
if(rec.enabled){ title: '是否启用', field: 'enabled', width: 100, formatter: function (value, rec) {
return "启用"; if (rec.enabled) {
} return "启用";
else { }
return "禁用"; else {
} return "禁用";
}}, }
{ title: '排序',field: 'sort',width:100}, }
{ title: '别名',field: 'anotherName',width:100}, },
{ title: '操作',field: 'op',align:"center",width:80,formatter:function(value,rec) {title: '排序', field: 'sort', width: 100},
{ {title: '别名', field: 'anotherName', width: 100},
var str = ''; {
var rowInfo = rec.id + 'AaBb' + rec.nativeName + 'AaBb' + rec.enabled + 'AaBb' + rec.sort + 'AaBb' + rec.anotherName; title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec) {
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterialProperty(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editMaterialProperty(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; var str = '';
return str; var rowInfo = rec.id + 'AaBb' + rec.nativeName + 'AaBb' + rec.enabled + 'AaBb' + rec.sort + 'AaBb' + rec.anotherName;
} str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterialProperty(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editMaterialProperty(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
} return str;
]], }
onLoadError:function() }
{ ]],
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); onLoadError: function () {
return; $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
}); }
} });
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) { $(document).keydown(function (event) {
//兼容 IE和firefox 事件 //兼容 IE和firefox 事件
var e = window.event || event; var e = window.event || event;
var k = e.keyCode||e.which||e.charCode; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="nativeName")) { if (k == "13" && (obj.id == "nativeName")) {
$("#saveMaterialProperty").click(); $("#saveMaterialProperty").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchNativeName")) { if (k == "13" && (obj.id == "searchNativeName")) {
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//分页信息处理
function ininPager() {
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber:pageNum,
pageSize:pageSize
});
showMaterialPropertyDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加 //分页信息处理
var url; function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber: pageNum,
pageSize: pageSize
});
showMaterialPropertyDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//保存信息 //增加
$("#saveMaterialProperty").unbind().bind({ var url;
click:function() {
if(!$('#materialPropertyFM').form('validate'))
return;
else {
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
nativeName : $.trim($("#nativeName").val()),
enabled : $("#enabled").is(':checked'),
sort : $.trim($("#sort").val()),
anotherName : $.trim($("#anotherName").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo) {
if(tipInfo) {
$('#materialPropertyDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showMaterialPropertyDetails(opts.pageNumber,opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存商品属性失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function() {
$.messager.alert('提示','保存商品属性异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息 //保存信息
function editMaterialProperty(totalInfo) { $("#saveMaterialProperty").unbind().bind({
var materialPropertyInfo = totalInfo.split("AaBb"); click: function () {
if (!$('#materialPropertyFM').form('validate'))
return;
else {
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
nativeName: $.trim($("#nativeName").val()),
enabled: $("#enabled").is(':checked'),
sort: $.trim($("#sort").val()),
anotherName: $.trim($("#anotherName").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#materialPropertyDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showMaterialPropertyDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存商品属性失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存商品属性异常,请稍后再试!', 'error');
return;
}
});
}
}
});
$("#clientIp").val('<%=clientIp %>'); //编辑信息
$("#nativeName").text(materialPropertyInfo[1]); function editMaterialProperty(totalInfo) {
$("#enabled").attr("checked",materialPropertyInfo[2]=='true'?true:false); var materialPropertyInfo = totalInfo.split("AaBb");
$("#sort").val(materialPropertyInfo[3]);
$("#anotherName").val(materialPropertyInfo[4]);
$('#materialPropertyDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品属性'); $("#clientIp").val('<%=clientIp %>');
$(".window-mask").css({ width: webW ,height: webH}); $("#nativeName").text(materialPropertyInfo[1]);
//焦点在名称输入框==定焦在输入文字后面 $("#enabled").attr("checked", materialPropertyInfo[2] == 'true' ? true : false);
$("#nativeName").val("").focus().val(materialPropertyInfo[1]); $("#sort").val(materialPropertyInfo[3]);
url = '<%=path %>/materialProperty/update.action?id=' + materialPropertyInfo[0]; $("#anotherName").val(materialPropertyInfo[4]);
}
//搜索处理 $('#materialPropertyDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品属性');
$("#searchBtn").unbind().bind({ $(".window-mask").css({width: webW, height: webH});
click:function() //焦点在名称输入框==定焦在输入文字后面
{ $("#nativeName").val("").focus().val(materialPropertyInfo[1]);
showMaterialPropertyDetails(1,initPageSize); url = '<%=path %>/materialProperty/update.action?id=' + materialPropertyInfo[0];
var opts = $("#tableData").datagrid('options'); }
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh', {
pageNumber:1,
pageSize:initPageSize
});
}
});
function showMaterialPropertyDetails(pageNo,pageSize) { //搜索处理
$.ajax({ $("#searchBtn").unbind().bind({
type:"post", click: function () {
url: "<%=path %>/materialProperty/findBy.action", showMaterialPropertyDetails(1, initPageSize);
dataType: "json", var opts = $("#tableData").datagrid('options');
data: ({ var pager = $("#tableData").datagrid('getPager');
nativeName:$.trim($("#searchNativeName").val()), opts.pageNumber = 1;
pageNo:pageNo, opts.pageSize = initPageSize;
pageSize:pageSize pager.pagination('refresh', {
}), pageNumber: 1,
success: function (data) { pageSize: initPageSize
$("#tableData").datagrid('loadData',data); });
}, }
//此处添加错误处理 });
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮 function showMaterialPropertyDetails(pageNo, pageSize) {
$("#searchResetBtn").off().on("click",function(){ $.ajax({
$("#searchNativeName").val(""); type: "post",
//加载完以后重新初始化 url: "<%=path %>/materialProperty/findBy.action",
$("#searchBtn").click(); dataType: "json",
}); data: ({
nativeName: $.trim($("#searchNativeName").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").off().on("click", function () {
$("#searchNativeName").val("");
//加载完以后重新初始化
$("#searchBtn").click();
});
</script> </script>
</body> </body>

File diff suppressed because it is too large Load Diff

View File

@@ -1,147 +1,157 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>其它入库</title> <title>其它入库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它入库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它入库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">供应商:</td> <td style="width:60px;">供应商:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<div class="org-list"> <div class="org-list">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</div> </div>
<div class="add-org-btn"> <div class="add-org-btn">
<img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png" style="cursor: pointer;" alt="增加供应商" title="增加供应商" /> <img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png"
</div> style="cursor: pointer;" alt="增加供应商" title="增加供应商"/>
</td> </div>
<td style="width:70px;">单据日期:</td> </td>
<td style="padding:5px"> <td style="width:70px;">单据日期:</td>
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td style="padding:5px">
</td> <input type="text" name="OperTime" id="OperTime"
<td style="width:80px;">单据编号:</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="padding:5px"> style="width:140px;"/>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> </td>
</td> <td style="width:80px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px">
<td style="padding:5px"> <input name="Number" id="Number" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<td style="width:100px;"></td> </td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px">
<td colspan="9"> </td>
<!-- 商品列表table --> <td style="width:100px;"></td>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <!-- 商品列表table -->
<td colspan="9"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </td>
</td> </tr>
</tr> <tr>
</table> <td colspan="9">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
</form> style="width: 1130px; height:35px;"></textarea>
</div> </td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">供应商:</td> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="OrganIdShow"></span> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">单据日期:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="OperTimeShow"></span> <td style="width:60px;">供应商:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据编号:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="NumberShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:70px;"></td> <span id="OperTimeShow"></span>
<td style="padding:5px;width:140px;"></td> </td>
<td style="width:100px;"></td> <td style="width:80px;">单据编号:</td>
</tr> <td style="padding:5px;width:140px;">
<tr> <span id="NumberShow"></span>
<td colspan="9" style="width: 1130px;"> </td>
<!-- 商品列表table --> <td style="width:70px;"></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="padding:5px;width:140px;"></td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 商品列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
</table> <tr>
</div> <td style="width:60px;">单据备注:</td>
</body> <td colspan="8" style="height:35px;">
<span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,142 +1,151 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>其它出库</title> <title>其它出库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它出库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它出库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:60px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">客户:</td> <td style="width:60px;">客户:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:80px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:80px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:70px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px"> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td> </td>
<td style="width:100px;"></td> <td style="width:70px;"></td>
</tr> <td style="padding:5px">
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
</table> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> style="width: 1130px; height:35px;"></textarea>
</form> </td>
</div> </tr>
<div id="dlg-buttons"> </table>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </form>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px" <div id="dlg-buttons">
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<table> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<tr> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="width:60px;">客户:</td> </div>
<td style="padding:5px;width:130px;"> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:70px"
<span id="OrganIdShow"></span> closed="true" modal="true" cache="false" collapsible="false" closable="true">
</td> <table>
<td style="width:70px;">单据日期:</td> <tr>
<td style="padding:5px;width:130px;"> <td style="width:60px;">客户:</td>
<span id="OperTimeShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OrganIdShow"></span>
<td style="width:80px;">单据编号:</td> </td>
<td style="padding:5px;width:140px;"> <td style="width:70px;">单据日期:</td>
<span id="NumberShow"></span> <td style="padding:5px;width:130px;">
</td> <span id="OperTimeShow"></span>
<td style="width:70px;"></td> </td>
<td style="padding:5px;width:140px;"></td> <td style="width:80px;">单据编号:</td>
<td style="width:100px;"></td> <td style="padding:5px;width:140px;">
</tr> <span id="NumberShow"></span>
<tr> </td>
<td colspan="9" style="width: 1130px;"> <td style="width:70px;"></td>
<!-- 商品列表table --> <td style="padding:5px;width:140px;"></td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:100px;"></td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9" style="width: 1130px;">
<td style="width:60px;">单据备注:</td> <!-- 商品列表table -->
<td colspan="8" style="height:35px;"> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> </td>
</td> </tr>
</tr> <tr>
</table> <td style="width:60px;">单据备注:</td>
</div> <td colspan="8" style="height:35px;">
</body> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
</table>
</div>
</body>
</html> </html>

View File

@@ -1,510 +1,467 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>经手人管理</title> <title>经手人管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>姓名:</td> <tr>
<td> <td>姓名:</td>
<input name="searchName" id="searchName" style="width:70px;"/> <td>
</td> <input name="searchName" id="searchName" style="width:70px;"/>
<td>类型:</td> </td>
<td> <td>类型:</td>
<select name="searchType" id="searchType" style="width:70px;"> <td>
<option value="">全部</option> <select name="searchType" id="searchType" style="width:70px;">
<option value="业务员">业务员</option> <option value="">全部</option>
<option value="仓管员">仓管员</option> <option value="业务员">业务员</option>
<option value="财务员">财务员</option> <option value="仓管员">仓管员</option>
</select> <option value="财务员">财务员</option>
</td> </select>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="经手人列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="经手人列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="personDlg" class="easyui-dialog" style="width:380px;padding:10px 20px" <div id="personDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="personFM" method="post" novalidate> <form id="personFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>类型</td> <td>类型</td>
<td style="padding:5px"> <td style="padding:5px">
<select name="Type" id="Type" style="width:230px;"> <select name="Type" id="Type" style="width:230px;">
<option value="">请选择</option> <option value="">请选择</option>
<option value="业务员">业务员</option> <option value="业务员">业务员</option>
<option value="仓管员">仓管员</option> <option value="仓管员">仓管员</option>
<option value="财务员">财务员</option> <option value="财务员">财务员</option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>姓名</td> <td>姓名</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/> <input name="Name" id="Name" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</tr> </td>
</table> </tr>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </table>
</form> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="dlg-buttons"> </div>
<a href="javascript:void(0)" id="savePerson" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <div id="dlg-buttons">
<a href="javascript:void(0)" id="cancelPerson" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#personDlg').dialog('close')">取消</a> <a href="javascript:void(0)" id="savePerson" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> <a href="javascript:void(0)" id="cancelPerson" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#personDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
//初始化界面 //初始化界面
$(function() $(function () {
{ //初始化系统基础信息
//初始化系统基础信息 initSystemData();
initSystemData(); initSelectInfo();
initSelectInfo(); initTableData();
initTableData(); ininPager();
ininPager(); initForm();
initForm(); });
});
//初始化系统基础信息 //初始化系统基础信息
function initSystemData() function initSystemData() {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path%>/depot/getBasicData.action",
url: "<%=path%>/depot/getBasicData.action", //设置为同步
//设置为同步 async: false,
async:false, dataType: "json",
dataType: "json", success: function (systemInfo) {
success: function (systemInfo) depotList = systemInfo.showModel.map.depotList;
{ var msgTip = systemInfo.showModel.msgTip;
depotList = systemInfo.showModel.map.depotList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; });
} }
}
});
}
//初始化页面选项卡
function initSelectInfo()
{
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i ++)
{
var depot = depotList[i];
if(0 == i)
{
depotID = depot.id;
}
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
}
$("#ProjectId").empty().append(options);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//防止表单提交重复 if (depotList != null) {
function initForm() options = "";
{ for (var i = 0; i < depotList.length; i++) {
$('#personFM').form({ var depot = depotList[i];
onSubmit: function(){ if (0 == i) {
return false; depotID = depot.id;
} }
}); options += '<option value="' + depot.id + '">' + depot.name + '</option>';
} }
$("#ProjectId").empty().append(options);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化表格数据 //防止表单提交重复
function initTableData() function initForm() {
{ $('#personFM').form({
$('#tableData').datagrid({ onSubmit: function () {
//title:'经手人列表', return false;
//iconCls:'icon-save', }
//width:700, });
height:heightInfo, }
nowrap: false,
rownumbers: false,
//动画效果
animate:false,
//选中单行
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
url:'<%=path %>/person/findBy.action?pageSize=' + initPageSize,
pagination: true,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
pageSize: initPageSize,
pageList: initPageNum,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '姓名',field: 'Name',width:180},
{ title: '类型',field: 'Type',width:180},
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
{
var str = '';
var rowInfo = rec.Id + 'AaBb' + rec.Type+ 'AaBb' + rec.Name;
if(1 == value)
{
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editPerson(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editPerson(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deletePerson('+ rec.Id +');"/>&nbsp;<a onclick="deletePerson('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
}
return str;
}
}
]],
toolbar:[
{
id:'addPerson',
text:'增加',
iconCls:'icon-add',
handler:function()
{
addPerson();
}
},
{
id:'deletePerson',
text:'删除',
iconCls:'icon-remove',
handler:function()
{
batDeletePerson();
}
}
],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 //title:'经手人列表',
var e = window.event || event; //iconCls:'icon-save',
var k = e.keyCode||e.which||e.charCode; //width:700,
//兼容 IE,firefox 兼容 height: heightInfo,
var obj = e.srcElement ? e.srcElement : e.target; nowrap: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 rownumbers: false,
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) //动画效果
{ animate: false,
$("#savePerson").click(); //选中单行
} singleSelect: true,
//搜索按钮添加快捷键 collapsible: false,
if(k == "13"&&(obj.id=="searchType")) selectOnCheck: false,
{ //fitColumns:true,
$("#searchBtn").click(); //单击行是否选中
} //checkOnSelect : false,
}); url: '<%=path %>/person/findBy.action?pageSize=' + initPageSize,
//分页信息处理 pagination: true,
function ininPager() //交替出现背景
{ striped: true,
try //loadFilter: pagerFilter,
{ pageSize: initPageSize,
var opts = $("#tableData").datagrid('options'); pageList: initPageNum,
var pager = $("#tableData").datagrid('getPager'); columns: [[
pager.pagination({ {field: 'Id', width: 35, align: "center", checkbox: true},
onSelectPage:function(pageNum, pageSize) {title: '姓名', field: 'Name', width: 180},
{ {title: '类型', field: 'Type', width: 180},
opts.pageNumber = pageNum; {
opts.pageSize = pageSize; title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
pager.pagination('refresh', var str = '';
{ var rowInfo = rec.Id + 'AaBb' + rec.Type + 'AaBb' + rec.Name;
pageNumber:pageNum, if (1 == value) {
pageSize:pageSize str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editPerson(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editPerson(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
}); str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deletePerson(' + rec.Id + ');"/>&nbsp;<a onclick="deletePerson(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
showPersonDetails(pageNum,pageSize); }
} return str;
}); }
} }
catch (e) ]],
{ toolbar: [
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); {
} id: 'addPerson',
} text: '增加',
iconCls: 'icon-add',
handler: function () {
addPerson();
}
},
{
id: 'deletePerson',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeletePerson();
}
}
],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
}
});
}
//删除经手人信息 //初始化键盘enter事件
function deletePerson(personID) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
$.messager.confirm('删除确认','确定要删除此经手人信息吗?',function(r) var e = window.event || event;
{ var k = e.keyCode || e.which || e.charCode;
if (r) //兼容 IE,firefox 兼容
{ var obj = e.srcElement ? e.srcElement : e.target;
$.ajax({ //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
type:"post", if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
url: "<%=path %>/person/delete.action", $("#savePerson").click();
dataType: "json", }
data: ({ //搜索按钮添加快捷键
personID : personID, if (k == "13" && (obj.id == "searchType")) {
clientIp:'<%=clientIp %>' $("#searchBtn").click();
}), }
success: function (tipInfo) });
{
var msg = tipInfo.showModel.msgTip; //分页信息处理
if(msg == '成功') function ininPager() {
{ try {
//加载完以后重新初始化 var opts = $("#tableData").datagrid('options');
$("#searchBtn").click(); var pager = $("#tableData").datagrid('getPager');
} pager.pagination({
else onSelectPage: function (pageNum, pageSize) {
$.messager.alert('删除提示','删除经手人信息失败,请稍后再试!','error'); opts.pageNumber = pageNum;
}, opts.pageSize = pageSize;
//此处添加错误处理 pager.pagination('refresh',
error:function() {
{ pageNumber: pageNum,
$.messager.alert('删除提示','删除经手人信息异常,请稍后再试!','error'); pageSize: pageSize
return; });
} showPersonDetails(pageNum, pageSize);
}); }
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//删除经手人信息
function deletePerson(personID) {
$.messager.confirm('删除确认', '确定要删除此经手人信息吗?', function (r) {
if (r) {
$.ajax({
type: "post",
url: "<%=path %>/person/delete.action",
dataType: "json",
data: ({
personID: personID,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功') {
//加载完以后重新初始化
$("#searchBtn").click();
}
else
$.messager.alert('删除提示', '删除经手人信息失败,请稍后再试!', 'error');
},
//此处添加错误处理
error: function () {
$.messager.alert('删除提示', '删除经手人信息异常,请稍后再试!', 'error');
return;
} }
}); });
} }
});
}
//批量删除经手人 //批量删除经手人
function batDeletePerson() function batDeletePerson() {
{ var row = $('#tableData').datagrid('getChecked');
var row = $('#tableData').datagrid('getChecked'); if (row.length == 0) {
if(row.length == 0) $.messager.alert('删除提示', '没有记录被选中!', 'info');
{ return;
$.messager.alert('删除提示','没有记录被选中!','info'); }
return; if (row.length > 0) {
} $.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条经手人信息吗?', function (r) {
if(row.length > 0) if (r) {
{ var ids = "";
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条经手人信息吗?',function(r) for (var i = 0; i < row.length; i++) {
{ if (i == row.length - 1) {
if (r) ids += row[i].Id;
{ break;
var ids = ""; }
for(var i = 0;i < row.length; i ++) //alert(row[i].id);
{ ids += row[i].Id + ",";
if(i == row.length-1) }
{ $.ajax({
ids += row[i].Id; type: "post",
break; url: "<%=path %>/person/batchDelete.action",
} dataType: "json",
//alert(row[i].id); async: false,
ids += row[i].Id + ","; data: ({
} personIDs: ids,
$.ajax({ clientIp: '<%=clientIp %>'
type:"post", }),
url: "<%=path %>/person/batchDelete.action", success: function (tipInfo) {
dataType: "json", var msg = tipInfo.showModel.msgTip;
async : false, if (msg == '成功') {
data: ({ //加载完以后重新初始化
personIDs : ids, $("#searchBtn").click();
clientIp:'<%=clientIp %>' $(":checkbox").attr("checked", false);
}), }
success: function (tipInfo) else
{ $.messager.alert('删除提示', '删除经手人信息失败,请稍后再试!', 'error');
var msg = tipInfo.showModel.msgTip; },
if(msg == '成功') //此处添加错误处理
{ error: function () {
//加载完以后重新初始化 $.messager.alert('删除提示', '删除经手人信息异常,请稍后再试!', 'error');
$("#searchBtn").click(); return;
$(":checkbox").attr("checked",false); }
} });
else }
$.messager.alert('删除提示','删除经手人信息失败,请稍后再试!','error'); });
}, }
//此处添加错误处理 }
error:function()
{
$.messager.alert('删除提示','删除经手人信息异常,请稍后再试!','error');
return;
}
});
}
});
}
}
//增加 //增加
var url; var url;
var personID = 0; var personID = 0;
//保存编辑前的名称 //保存编辑前的名称
var orgPerson = ""; var orgPerson = "";
function addPerson() function addPerson() {
{ $("#clientIp").val('<%=clientIp %>');
$("#clientIp").val('<%=clientIp %>'); $('#personFM').form('clear');
$('#personFM').form('clear'); $('#personDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加经手人信息');
$('#personDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加经手人信息'); $(".window-mask").css({width: webW, height: webH});
$(".window-mask").css({ width: webW ,height: webH}); $("#name").val("").focus();
$("#name").val("").focus();
orgPerson = ""; orgPerson = "";
personID = 0; personID = 0;
url = '<%=path %>/person/create.action'; url = '<%=path %>/person/create.action';
} }
//保存信息 //保存信息
$("#savePerson").unbind().bind({ $("#savePerson").unbind().bind({
click:function() click: function () {
{ if (!$('#personFM').form('validate'))
if(!$('#personFM').form('validate')) return;
return; else {
else if (!$("#Type").val()) {
{ $.messager.alert('提示', '请选择类型!', 'warning');
if(!$("#Type").val()){ return;
$.messager.alert('提示','请选择类型!','warning'); }
return; $.ajax({
} type: "post",
$.ajax({ url: url,
type:"post", dataType: "json",
url: url, async: false,
dataType: "json", data: ({
async : false, Type: $.trim($("#Type").val()),
data: ({ Name: $.trim($("#Name").val()),
Type : $.trim($("#Type").val()), clientIp: '<%=clientIp %>'
Name : $.trim($("#Name").val()), }),
clientIp:'<%=clientIp %>' success: function (tipInfo) {
}), if (tipInfo) {
success: function (tipInfo) $('#personDlg').dialog('close');
{
if(tipInfo)
{
$('#personDlg').dialog('close');
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
showPersonDetails(opts.pageNumber,opts.pageSize); showPersonDetails(opts.pageNumber, opts.pageSize);
} }
else else {
{ $.messager.show({
$.messager.show({ title: '错误提示',
title: '错误提示', msg: '保存经手人信息失败,请稍后重试!'
msg: '保存经手人信息失败,请稍后重试!' });
}); }
} },
}, //此处添加错误处理
//此处添加错误处理 error: function () {
error:function() $.messager.alert('提示', '保存经手人信息异常,请稍后再试!', 'error');
{ return;
$.messager.alert('提示','保存经手人信息异常,请稍后再试!','error'); }
return; });
} }
}); }
} });
}
});
//编辑信息 //编辑信息
function editPerson(personTotalInfo) function editPerson(personTotalInfo) {
{ var personInfo = personTotalInfo.split("AaBb");
var personInfo = personTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
$("#Type").val(personInfo[1]); $("#Type").val(personInfo[1]);
$("#Name").val(personInfo[2]); $("#Name").val(personInfo[2]);
//orgPerson = personInfo[1]; //orgPerson = personInfo[1];
$('#personDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑经手人信息'); $('#personDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑经手人信息');
$(".window-mask").css({ width: webW ,height: webH}); $(".window-mask").css({width: webW, height: webH});
personID = personInfo[0]; personID = personInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(personInfo[2]); $("#Name").val("").focus().val(personInfo[2]);
url = '<%=path %>/person/update.action?personID=' + personInfo[0]; url = '<%=path %>/person/update.action?personID=' + personInfo[0];
} }
//搜索处理 //搜索处理
$("#searchBtn").unbind().bind({ $("#searchBtn").unbind().bind({
click:function() click: function () {
{ showPersonDetails(1, initPageSize);
showPersonDetails(1,initPageSize); var opts = $("#tableData").datagrid('options');
var opts = $("#tableData").datagrid('options'); var pager = $("#tableData").datagrid('getPager');
var pager = $("#tableData").datagrid('getPager'); opts.pageNumber = 1;
opts.pageNumber = 1; opts.pageSize = initPageSize;
opts.pageSize = initPageSize; pager.pagination('refresh',
pager.pagination('refresh', {
{ pageNumber: 1,
pageNumber:1, pageSize: initPageSize
pageSize:initPageSize });
}); }
} });
});
function showPersonDetails(pageNo,pageSize) function showPersonDetails(pageNo, pageSize) {
{ $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path %>/person/findBy.action",
url: "<%=path %>/person/findBy.action", dataType: "json",
dataType: "json", data: ({
data: ({ Name: $.trim($("#searchName").val()),
Name:$.trim($("#searchName").val()), Type: $.trim($("#searchType").val()),
Type:$.trim($("#searchType").val()), pageNo: pageNo,
pageNo:pageNo, pageSize: pageSize
pageSize:pageSize }),
}), success: function (data) {
success: function (data) $("#tableData").datagrid('loadData', data);
{ },
$("#tableData").datagrid('loadData',data); //此处添加错误处理
}, error: function () {
//此处添加错误处理 $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
error:function() return;
{ }
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); });
return; }
}
});
}
//重置按钮 //重置按钮
$("#searchResetBtn").unbind().bind({ $("#searchResetBtn").unbind().bind({
click:function(){ click: function () {
$("#searchProjectId").val(""); $("#searchProjectId").val("");
$("#searchType").val(""); $("#searchType").val("");
//加载完以后重新初始化 //加载完以后重新初始化
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,370 +1,390 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>采购退货</title> <title>采购退货</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购退货列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购退货列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">供应商:</td> <td style="width:60px;">供应商:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<div class="org-list"> <div class="org-list">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</div> </div>
<div class="add-org-btn"> <div class="add-org-btn">
<img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png" style="cursor: pointer;" alt="增加供应商" title="增加供应商" /> <img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png"
</div> style="cursor: pointer;" alt="增加供应商" title="增加供应商"/>
</td> </div>
<td style="width:70px;">单据日期:</td> </td>
<td style="padding:5px"> <td style="width:70px;">单据日期:</td>
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td style="padding:5px">
</td> <input type="text" name="OperTime" id="OperTime"
<td style="width:80px;">单据编号:</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="padding:5px"> style="width:140px;"/>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> </td>
</td> <td style="width:80px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px">
<td style="padding:5px"> <input name="Number" id="Number" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<td style="width:100px;"></td> </td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px">
<td colspan="9"> </td>
<!-- 商品列表table --> <td style="width:100px;"></td>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <!-- 商品列表table -->
<td colspan="9"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9">
<td>优惠率:</td> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td style="padding:5px"> style="width: 1130px; height:35px;"></textarea>
<input id="Discount" name="Discount" style="width:110px;" /> </td>
% </tr>
</td> <tr>
<td>退款优惠:</td> <td>优惠</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;" /> <input id="Discount" name="Discount" style="width:110px;"/>
</td> %
<td>优惠后金额:</td> </td>
<td style="padding:5px"> <td>退款优惠:</td>
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;" /> <td style="padding:5px">
</td> <input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
<td>本次退款:</td> </td>
<td style="padding:5px"> <td>优惠后金额:</td>
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;" /> <td style="padding:5px">
</td> <input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
<td style="width:100px;"></td> </td>
</tr> <td>本次退款:</td>
<tr> <td style="padding:5px">
<td>结算账户:</td> <input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
<td style="padding:5px"> </td>
<select name="AccountId" id="AccountId" style="width:110px;"></select> <td style="width:100px;"></td>
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> </tr>
</td> <tr>
<td>本次欠款</td> <td>结算账户</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;" /> <select name="AccountId" id="AccountId" style="width:110px;"></select>
</td> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
<td>采购费用:</td> style="display: none;"/>
<td style="padding:5px"> </td>
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly" /> <td>本次欠款:</td>
<img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" /> <td style="padding:5px">
</td> <input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
<td></td> </td>
<td style="padding:5px"> <td>采购费用:</td>
</td> <td style="padding:5px">
<td style="width:100px;"></td> <input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
</tr> <img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
</table> </td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <td></td>
</form> <td style="padding:5px">
</div> </td>
<div id="dlg-buttons"> <td style="width:100px;"></td>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </tr>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </table>
</div> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </form>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> </div>
<table> <div id="dlg-buttons">
<tr> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:60px;">供应商:</td> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="padding:5px;width:130px;"> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<span id="OrganIdShow"></span> </div>
</td> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
<td style="width:70px;">单据日期:</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="padding:5px;width:130px;"> <table>
<span id="OperTimeShow"></span> <tr>
</td> <td style="width:60px;">供应商:</td>
<td style="width:80px;">单据编号:</td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"> <span id="OrganIdShow"></span>
<span id="NumberShow"></span> </td>
</td> <td style="width:70px;">单据日期:</td>
<td style="width:70px;"></td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"></td> <span id="OperTimeShow"></span>
<td style="width:100px;"></td> </td>
</tr> <td style="width:80px;">单据编号:</td>
<tr> <td style="padding:5px;width:140px;">
<td colspan="9" style="width: 1130px;"> <span id="NumberShow"></span>
<!-- 商品列表table --> </td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="width:70px;"></td>
</td> <td style="padding:5px;width:140px;"></td>
</tr> <td style="width:100px;"></td>
<tr> </tr>
<td style="width:60px;">单据备注:</td> <tr>
<td colspan="8" style="height:35px;"> <td colspan="9" style="width: 1130px;">
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <!-- 商品列表table -->
</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</tr> </td>
<tr> </tr>
<td>优惠率:</td> <tr>
<td> <td style="width:60px;">单据备注:</td>
<span id="DiscountShow" style="width: 110px;"></span> <td colspan="8" style="height:35px;">
% <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>付款优惠:</td> </tr>
<td> <tr>
<span id="DiscountMoneyShow" style="width: 120px;"></span> <td>优惠率:</td>
</td> <td>
<td>优惠后金额:</td> <span id="DiscountShow" style="width: 110px;"></span>
<td> %
<span id="DiscountLastMoneyShow" style="width: 120px;"></span> </td>
</td> <td>付款优惠:</td>
<td>本次付款:</td> <td>
<td style="padding:5px"> <span id="DiscountMoneyShow" style="width: 120px;"></span>
<span id="ChangeAmountShow"></span> </td>
</td> <td>优惠后金额:</td>
<td style="width:100px;"></td> <td>
</tr> <span id="DiscountLastMoneyShow" style="width: 120px;"></span>
<tr> </td>
<td>结算账户</td> <td>本次付款</td>
<td style="padding:5px"> <td style="padding:5px">
<span id="AccountIdShow"></span> <span id="ChangeAmountShow"></span>
</td> </td>
<td>本次欠款:</td> <td style="width:100px;"></td>
<td style="padding:5px"> </tr>
<span id="DebtShow"></span> <tr>
</td> <td>结算账户:</td>
<td>采购费用:</td> <td style="padding:5px">
<td style="padding:5px"> <span id="AccountIdShow"></span>
<span id="OtherMoneyShow"></span> </td>
</td> <td>本次欠款:</td>
<td></td> <td style="padding:5px">
<td style="padding:5px"> <span id="DebtShow"></span>
</td> </td>
<td style="width:100px;"></td> <td>采购费用:</td>
</tr> <td style="padding:5px">
</table> <span id="OtherMoneyShow"></span>
</div> </td>
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" <td></td>
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true"> <td style="padding:5px">
<table class="account-dlg"> </td>
<tr class="account-head-tmp"> <td style="width:100px;"></td>
<td style="width:30px;"></td> </tr>
<td style="width:140px; padding:5px;">结算账户</td> </table>
<td style="width:100px; padding:5px;">金额</td> </div>
</tr> <div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<tr> closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
<td style="width:30px;"></td> <table class="account-dlg">
<td style="width:140px;text-align: center;">合计:</td> <tr class="account-head-tmp">
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td> <td style="width:30px;"></td>
</tr> <td style="width:140px; padding:5px;">结算账户</td>
</table> <td style="width:100px; padding:5px;">金额</td>
<table class="tabs-tmp"> </tr>
<tr class="account-content-tmp"> <tr>
<td style="width:30px;"></td> <td style="width:30px;"></td>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;" /></td> <td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
</tr> </tr>
</table> </table>
</div> <table class="tabs-tmp">
<div id="accountDlgButtons"> <tr class="account-content-tmp">
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
</div> <td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" </tr>
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true"> </table>
<table class="money-dlg"> </div>
<tr class="money-head-tmp"> <div id="accountDlgButtons">
<td style="width:30px;"></td> <a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:140px; padding:5px;">结算账户</td> <a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
<td style="width:100px; padding:5px;">金额</td> </div>
</tr> <div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<tr> closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
<td style="width:30px;"></td> <table class="money-dlg">
<td style="width:140px;text-align: center;">合计:</td> <tr class="money-head-tmp">
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td> <td style="width:30px;"></td>
</tr> <td style="width:140px; padding:5px;">结算账户</td>
</table> <td style="width:100px; padding:5px;">金额</td>
<table class="tabs-tmp"> </tr>
<tr class="money-content-tmp"> <tr>
<td style="width:30px;"></td> <td style="width:30px;"></td>
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;" /></td> <td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
</tr> </tr>
</table> </table>
</div> <table class="tabs-tmp">
<div id="otherMoneyDlgBtn"> <tr class="money-content-tmp">
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
</div> <td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px" </tr>
closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true"> </table>
<form id="supplierFM"> </div>
<table> <div id="otherMoneyDlgBtn">
<tr> <a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width: 80px;height: 20px">名称</td> <a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
<td style="width: 180px;padding:1px"> </div>
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/> <div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
</td> closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true">
<td style="width: 60px;height: 20px">联系人</td> <form id="supplierFM">
<td style="width:180px;padding:1px;"> <table>
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/> <tr>
</td> <td style="width: 80px;height: 20px">名称</td>
</tr> <td style="width: 180px;padding:1px">
<tr> <input name="supplier" id="supplier" class="easyui-validatebox"
<td>联系电话</td> data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
<td style="padding:1px;"> </td>
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="width: 60px;height: 20px">联系人</td>
</td> <td style="width:180px;padding:1px;">
<td>手机</td> <input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px;"> </td>
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>联系电话</td>
<tr> <td style="padding:1px;">
<td>电子邮箱</td> <input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px"> </td>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/> <td>手机</td>
</td> <td style="padding:1px;">
<td>传真</td> <input name="telephone" id="telephone" class="easyui-validatebox"
<td style="padding:1px"> style="width: 160px;height: 20px"/>
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/> </td>
</td> </tr>
</tr> <tr>
<tr> <td>电子邮箱</td>
<td>期初应收</td> <td style="padding:1px">
<td style="padding:1px"> <input name="email" id="email" class="easyui-validatebox" validType="email"
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input> style="width: 160px;height: 20px"/>
</td> </td>
<td>期初应付</td> <td>传真</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input> <input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>累计应收</td> <td>期初应收</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input> <input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
</td> data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
<td>累计应付</td> </td>
<td style="padding:1px"> <td>期初应付</td>
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input> <td style="padding:1px">
</td> <input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
</tr> data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
<tr> </td>
<td>纳税人识别号</td> </tr>
<td style="padding:1px"> <tr>
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td>累计应收</td>
</td> <td style="padding:1px">
<td>税率</td> <input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox"
<td style="padding:1px"> data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/> </td>
</td> <td>累计应付</td>
</tr> <td style="padding:1px">
<tr> <input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox"
<td>开户行</td> data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
<td style="padding:1px"> </td>
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/> </tr>
</td> <tr>
<td>账号</td> <td>纳税人识别号</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/> <input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td> </td>
</tr> <td>税率</td>
<tr> <td style="padding:1px">
<td>地址</td> <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px" colspan="3"> </td>
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/> </tr>
</td> <tr>
</tr> <td>开户行</td>
<tr> <td style="padding:1px">
<td>备注</td> <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<td style="padding:1px" colspan="3"> </td>
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea> <td>账号</td>
</td> <td style="padding:1px">
</tr> <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
</table> style="width: 160px;height: 20px"/>
</form> </td>
</div> </tr>
<div id="supplierDlgBtn"> <tr>
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td>地址</td>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a> <td style="padding:1px" colspan="3">
</div> <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</body> </td>
</tr>
<tr>
<td>备注</td>
<td style="padding:1px" colspan="3">
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="supplierDlgBtn">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
</body>
</html> </html>

View File

@@ -1,372 +1,393 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>采购入库</title> <title>采购入库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购入库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购入库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">供应商:</td> <td style="width:60px;">供应商:</td>
<td style="padding:5px;width:170px;"> <td style="padding:5px;width:170px;">
<div class="org-list"> <div class="org-list">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</div> </div>
<div class="add-org-btn"> <div class="add-org-btn">
<img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png" style="cursor: pointer;" alt="增加供应商" title="增加供应商" /> <img id="addOrgan" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png"
</div> style="cursor: pointer;" alt="增加供应商" title="增加供应商"/>
</td> </div>
<td style="width:70px;">单据日期:</td> </td>
<td style="padding:5px"> <td style="width:70px;">单据日期:</td>
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td style="padding:5px">
</td> <input type="text" name="OperTime" id="OperTime"
<td style="width:80px;">单据编号:</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="padding:5px"> style="width:140px;"/>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> </td>
</td> <td style="width:80px;">单据编号:</td>
<td style="width:70px;"></td> <td style="padding:5px">
<td style="padding:5px"> <input name="Number" id="Number" class="easyui-validatebox"
</td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<td style="width:100px;"></td> </td>
</tr> <td style="width:70px;"></td>
<tr> <td style="padding:5px">
<td colspan="9"> </td>
<!-- 商品列表table --> <td style="width:100px;"></td>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <!-- 商品列表table -->
<td colspan="9"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="9">
<td>优惠率:</td> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td style="padding:5px"> style="width: 1130px; height:35px;"></textarea>
<input id="Discount" name="Discount" style="width:110px;" /> </td>
% </tr>
</td> <tr>
<td>付款优惠:</td> <td>优惠</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;" /> <input id="Discount" name="Discount" style="width:110px;"/>
</td> %
<td>优惠后金额:</td> </td>
<td style="padding:5px"> <td>付款优惠:</td>
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;" /> <td style="padding:5px">
</td> <input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
<td>本次付款:</td> </td>
<td style="padding:5px"> <td>优惠后金额:</td>
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;" /> <td style="padding:5px">
</td> <input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
<td style="width:100px;"></td> </td>
</tr> <td>本次付款:</td>
<tr> <td style="padding:5px">
<td>结算账户:</td> <input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
<td style="padding:5px"> </td>
<select name="AccountId" id="AccountId" style="width:110px;"></select> <td style="width:100px;"></td>
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> </tr>
</td> <tr>
<td>本次欠款</td> <td>结算账户</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;" /> <select name="AccountId" id="AccountId" style="width:110px;"></select>
</td> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
<td>采购费用:</td> style="display: none;"/>
<td style="padding:5px"> </td>
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly" /> <td>本次欠款:</td>
<img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" /> <td style="padding:5px">
</td> <input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
<td>结算天数:</td> </td>
<td style="padding:5px"> <td>采购费用:</td>
<input id="AccountDay" name="AccountDay" class="easyui-validatebox" data-options="validType:'length[1,3]'" style="width:120px;" /> <td style="padding:5px">
</td> <input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
<td style="width:100px;"></td> <img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
</tr> </td>
</table> <td>结算天数:</td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <td style="padding:5px">
</form> <input id="AccountDay" name="AccountDay" class="easyui-validatebox"
</div> data-options="validType:'length[1,3]'" style="width:120px;"/>
<div id="dlg-buttons"> </td>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:100px;"></td>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </tr>
</div> </table>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> </form>
<table> </div>
<tr> <div id="dlg-buttons">
<td style="width:60px;">供应商:</td> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="padding:5px;width:130px;"> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<span id="OrganIdShow"></span> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
</td> </div>
<td style="width:70px;">单据日期:</td> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
<td style="padding:5px;width:130px;"> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<span id="OperTimeShow"></span> <table>
</td> <tr>
<td style="width:80px;">单据编号</td> <td style="width:60px;">供应商</td>
<td style="padding:5px;width:140px;"> <td style="padding:5px;width:130px;">
<span id="NumberShow"></span> <span id="OrganIdShow"></span>
</td> </td>
<td style="width:70px;"></td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:140px;"></td> <td style="padding:5px;width:130px;">
<td style="width:100px;"></td> <span id="OperTimeShow"></span>
</tr> </td>
<tr> <td style="width:80px;">单据编号:</td>
<td colspan="9" style="width: 1130px;"> <td style="padding:5px;width:140px;">
<!-- 商品列表table --> <span id="NumberShow"></span>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> </td>
</td> <td style="width:70px;"></td>
</tr> <td style="padding:5px;width:140px;"></td>
<tr> <td style="width:100px;"></td>
<td style="width:60px;">单据备注:</td> </tr>
<td colspan="8" style="height:35px;"> <tr>
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <td colspan="9" style="width: 1130px;">
</td> <!-- 商品列表table -->
</tr> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<tr> </td>
<td>优惠率:</td> </tr>
<td> <tr>
<span id="DiscountShow" style="width: 110px;"></span> <td style="width:60px;">单据备注:</td>
% <td colspan="8" style="height:35px;">
</td> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
<td>付款优惠:</td> </td>
<td> </tr>
<span id="DiscountMoneyShow" style="width: 120px;"></span> <tr>
</td> <td>优惠率:</td>
<td>优惠后金额:</td> <td>
<td> <span id="DiscountShow" style="width: 110px;"></span>
<span id="DiscountLastMoneyShow" style="width: 120px;"></span> %
</td> </td>
<td>本次付款</td> <td>付款优惠</td>
<td style="padding:5px"> <td>
<span id="ChangeAmountShow"></span> <span id="DiscountMoneyShow" style="width: 120px;"></span>
</td> </td>
<td style="width:100px;"></td> <td>优惠后金额:</td>
</tr> <td>
<tr> <span id="DiscountLastMoneyShow" style="width: 120px;"></span>
<td>结算账户:</td> </td>
<td style="padding:5px"> <td>本次付款:</td>
<span id="AccountIdShow"></span> <td style="padding:5px">
</td> <span id="ChangeAmountShow"></span>
<td>本次欠款:</td> </td>
<td style="padding:5px"> <td style="width:100px;"></td>
<span id="DebtShow"></span> </tr>
</td> <tr>
<td>采购费用</td> <td>结算账户</td>
<td style="padding:5px"> <td style="padding:5px">
<span id="OtherMoneyShow"></span> <span id="AccountIdShow"></span>
</td> </td>
<td>结算天数</td> <td>本次欠款</td>
<td style="padding:5px"> <td style="padding:5px">
<span id="AccountDayShow"></span> <span id="DebtShow"></span>
</td> </td>
<td style="width:100px;"></td> <td>采购费用:</td>
</tr> <td style="padding:5px">
</table> <span id="OtherMoneyShow"></span>
</div> </td>
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" <td>结算天数:</td>
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true"> <td style="padding:5px">
<table class="account-dlg"> <span id="AccountDayShow"></span>
<tr class="account-head-tmp"> </td>
<td style="width:30px;"></td> <td style="width:100px;"></td>
<td style="width:140px; padding:5px;">结算账户</td> </tr>
<td style="width:100px; padding:5px;">金额</td> </table>
</tr> </div>
<tr> <div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<td style="width:30px;"></td> closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
<td style="width:140px;text-align: center;">合计:</td> <table class="account-dlg">
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td> <tr class="account-head-tmp">
</tr> <td style="width:30px;"></td>
</table> <td style="width:140px; padding:5px;">结算账户</td>
<table class="tabs-tmp"> <td style="width:100px; padding:5px;">金额</td>
<tr class="account-content-tmp"> </tr>
<td style="width:30px;"></td> <tr>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td> <td style="width:30px;"></td>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;" /></td> <td style="width:140px;text-align: center;">合计:</td>
</tr> <td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
</table> </tr>
</div> </table>
<div id="accountDlgButtons"> <table class="tabs-tmp">
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <tr class="account-content-tmp">
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:30px;"></td>
</div> <td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" <td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true"> </tr>
<table class="money-dlg"> </table>
<tr class="money-head-tmp"> </div>
<td style="width:30px;"></td> <div id="accountDlgButtons">
<td style="width:140px; padding:5px;">结算账户</td> <a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:100px; padding:5px;">金额</td> <a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</tr> </div>
<tr> <div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<td style="width:30px;"></td> closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
<td style="width:140px;text-align: center;">合计:</td> <table class="money-dlg">
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td> <tr class="money-head-tmp">
</tr> <td style="width:30px;"></td>
</table> <td style="width:140px; padding:5px;">结算账户</td>
<table class="tabs-tmp"> <td style="width:100px; padding:5px;">金额</td>
<tr class="money-content-tmp"> </tr>
<td style="width:30px;"></td> <tr>
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td> <td style="width:30px;"></td>
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;" /></td> <td style="width:140px;text-align: center;">合计:</td>
</tr> <td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
</table> </tr>
</div> </table>
<div id="otherMoneyDlgBtn"> <table class="tabs-tmp">
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <tr class="money-content-tmp">
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:30px;"></td>
</div> <td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px" <td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true"> </tr>
<form id="supplierFM"> </table>
<table> </div>
<tr> <div id="otherMoneyDlgBtn">
<td style="width: 80px;height: 20px">名称</td> <a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width: 180px;padding:1px"> <a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/> </div>
</td> <div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
<td style="width: 60px;height: 20px">联系人</td> closed="true" buttons="#supplierDlgBtn" modal="true" collapsible="false" closable="true">
<td style="width:180px;padding:1px;"> <form id="supplierFM">
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/> <table>
</td> <tr>
</tr> <td style="width: 80px;height: 20px">名称</td>
<tr> <td style="width: 180px;padding:1px">
<td>联系电话</td> <input name="supplier" id="supplier" class="easyui-validatebox"
<td style="padding:1px;"> data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/> </td>
</td> <td style="width: 60px;height: 20px">联系人</td>
<td>手机</td> <td style="width:180px;padding:1px;">
<td style="padding:1px;"> <input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/> </td>
</td> </tr>
</tr> <tr>
<tr> <td>联系电话</td>
<td>电子邮箱</td> <td style="padding:1px;">
<td style="padding:1px"> <input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/> </td>
</td> <td>手机</td>
<td>传真</td> <td style="padding:1px;">
<td style="padding:1px"> <input name="telephone" id="telephone" class="easyui-validatebox"
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/> style="width: 160px;height: 20px"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>期初应收</td> <td>电子邮箱</td>
<td style="padding:1px"> <td style="padding:1px">
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input> <input name="email" id="email" class="easyui-validatebox" validType="email"
</td> style="width: 160px;height: 20px"/>
<td>期初应付</td> </td>
<td style="padding:1px"> <td>传真</td>
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input> <td style="padding:1px">
</td> <input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</tr> </td>
<tr> </tr>
<td>累计应收</td> <tr>
<td style="padding:1px"> <td>期初应收</td>
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input> <td style="padding:1px">
</td> <input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox"
<td>累计应付</td> data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
<td style="padding:1px"> </td>
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input> <td>期初应付</td>
</td> <td style="padding:1px">
</tr> <input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox"
<tr> data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
<td>纳税人识别号</td> </td>
<td style="padding:1px"> </tr>
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/> <tr>
</td> <td>累计应收</td>
<td>税率</td> <td style="padding:1px">
<td style="padding:1px"> <input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox"
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/> data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
</td> </td>
</tr> <td>累计应付</td>
<tr> <td style="padding:1px">
<td>开户行</td> <input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox"
<td style="padding:1px"> data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/> </td>
</td> </tr>
<td>账号</td> <tr>
<td style="padding:1px"> <td>纳税人识别号</td>
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/> <td style="padding:1px">
</td> <input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</tr> </td>
<tr> <td>税率</td>
<td>地址</td> <td style="padding:1px">
<td style="padding:1px" colspan="3"> <input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/> </td>
</td> </tr>
</tr> <tr>
<tr> <td>开户行</td>
<td>备注</td> <td style="padding:1px">
<td style="padding:1px" colspan="3"> <input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea> </td>
</td> <td>账号</td>
</tr> <td style="padding:1px">
</table> <input name="accountNumber" id="accountNumber" class="easyui-validatebox"
</form> style="width: 160px;height: 20px"/>
</div> </td>
<div id="supplierDlgBtn"> </tr>
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <tr>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a> <td>地址</td>
</div> <td style="padding:1px" colspan="3">
</body> <input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</td>
</tr>
<tr>
<td>备注</td>
<td style="padding:1px" colspan="3">
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="supplierDlgBtn">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
</body>
</html> </html>

View File

@@ -1,208 +1,222 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>零售退货</title> <title>零售退货</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售退货列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售退货列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:40px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:40px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;height:50px;">会员卡号:</td> <td style="width:60px;height:50px;">会员卡号:</td>
<td style="padding:5px;width:200px;"> <td style="padding:5px;width:200px;">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width: 140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:80px;">单据编号:</td> style="width: 140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:80px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:70px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px;width:150px;"></td> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</tr> </td>
<tr> <td style="width:70px;"></td>
<td colspan="6" valign="top"> <td style="padding:5px;width:150px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="6" valign="top">
<td colspan="2" valign="top"> <!-- 商品列表table -->
<table width="100%" class="retail-amount"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<tr> </td>
<td colspan="2">实付金额</td> <td colspan="2" valign="top">
</tr> <table width="100%" class="retail-amount">
<tr> <tr>
<td colspan="2"> <td colspan="2">实付金额</td>
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly" data-changeamount="0" /> </tr>
</td> <tr>
</tr> <td colspan="2">
<tr> <input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly"
<td colspan="2">付款金额</td> data-changeamount="0"/>
</tr> </td>
<tr> </tr>
<td colspan="2"> <tr>
<input id="getAmount" name="getAmount" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))" class="get-amount" data-changeamount="0" /> <td colspan="2">付款金额</td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="2">
<td colspan="2">找零</td> <input id="getAmount" name="getAmount"
</tr> onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
<tr> class="get-amount" data-changeamount="0"/>
<td colspan="2"> </td>
<input id="backAmount" name="backAmount" class="back-amount" readonly="readonly" data-changeamount="0" /> </tr>
</td> <tr>
</tr> <td colspan="2">找零</td>
<tr> </tr>
<td>付款账户:</td> <tr>
<td> <td colspan="2">
<select name="AccountId" id="AccountId" style="width:110px;"></select> <input id="backAmount" name="backAmount" class="back-amount" readonly="readonly"
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> data-changeamount="0"/>
</td> </td>
</tr> </tr>
</table> <tr>
</td> <td>付款账户:</td>
</tr> <td>
<tr> <select name="AccountId" id="AccountId" style="width:110px;"></select>
<td colspan="8"> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> style="display: none;"/>
</td> </td>
</tr> </tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </td>
</form> </tr>
</div> <tr>
<div id="dlg-buttons"> <td colspan="8">
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> style="width: 1130px; height:35px;"></textarea>
</div> </td>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px" </tr>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> </table>
<table> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<tr> </form>
<td style="width:60px;height:50px;">会员卡号:</td> </div>
<td style="padding:5px;width:200px;"> <div id="dlg-buttons">
<span id="OrganIdShow"></span> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</td> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:70px;">单据日期:</td> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:200px;"> </div>
<span id="OperTimeShow"></span> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:80px;">单据编号:</td> <table>
<td style="padding:5px;width:200px;"> <tr>
<span id="NumberShow"></span> <td style="width:60px;height:50px;">会员卡号:</td>
</td> <td style="padding:5px;width:200px;">
<td style="width:70px;"></td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:150px;"> </td>
</td> <td style="width:70px;">单据日期:</td>
</tr> <td style="padding:5px;width:200px;">
<tr> <span id="OperTimeShow"></span>
<td colspan="6"> </td>
<!-- 商品列表table --> <td style="width:80px;">单据编号:</td>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <td style="padding:5px;width:200px;">
</td> <span id="NumberShow"></span>
<td colspan="2" valign="top"> </td>
<table width="100%" class="retail-amount-show"> <td style="width:70px;"></td>
<tr> <td style="padding:5px;width:150px;">
<td colspan="2">实付金额</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="6">
<span id="ChangeAmountShow" class="change-amount-show"></span> <!-- 商品列表table -->
</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</tr> </td>
<tr> <td colspan="2" valign="top">
<td colspan="2">付款金额</td> <table width="100%" class="retail-amount-show">
</tr> <tr>
<tr> <td colspan="2">实付金额</td>
<td colspan="2"> </tr>
<span id="getAmountShow" class="get-amount-show"></span> <tr>
</td> <td colspan="2">
</tr> <span id="ChangeAmountShow" class="change-amount-show"></span>
<tr> </td>
<td colspan="2">找零</td> </tr>
</tr> <tr>
<tr> <td colspan="2">付款金额</td>
<td colspan="2"> </tr>
<span id="backAmountShow" class="back-amount-show"></span> <tr>
</td> <td colspan="2">
</tr> <span id="getAmountShow" class="get-amount-show"></span>
<tr> </td>
<td>付款账户:</td> </tr>
<td align="left" style="width:110px;"> <tr>
<span id="AccountIdShow"></span> <td colspan="2">找零</td>
</td> </tr>
</tr> <tr>
</table> <td colspan="2">
</td> <span id="backAmountShow" class="back-amount-show"></span>
</tr> </td>
<tr> </tr>
<td colspan="8" style="width: 1130px; height:35px;"> <tr>
<span id="RemarkShow"></span> <td>付款账户:</td>
</td> <td align="left" style="width:110px;">
</tr> <span id="AccountIdShow"></span>
</table> </td>
</div> </tr>
</table>
</td>
</tr>
<tr>
<td colspan="8" style="width: 1130px; height:35px;">
<span id="RemarkShow"></span>
</td>
</tr>
</table>
</div>
</body> </body>
</html> </html>

View File

@@ -1,239 +1,253 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>零售出库</title> <title>零售出库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售出库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售出库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:40px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:40px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;height:50px;">会员卡号:</td> <td style="width:60px;height:50px;">会员卡号:</td>
<td style="padding:5px;width:200px;"> <td style="padding:5px;width:200px;">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</td> </td>
<td style="width:70px;">单据日期:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width: 140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:80px;">单据编号:</td> style="width: 140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:80px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:70px;">付款类型:</td> <input name="Number" id="Number" class="easyui-validatebox"
<td style="padding:5px;width:150px;"> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<select name="payType" id="payType" style="width:145px;"> </td>
<option value="现付">现付</option> <td style="width:70px;">付款类型:</td>
</select> <td style="padding:5px;width:150px;">
</td> <select name="payType" id="payType" style="width:145px;">
</tr> <option value="现付">现付</option>
<tr> </select>
<td colspan="6" valign="top"> </td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="6" valign="top">
<td colspan="2" valign="top"> <!-- 商品列表table -->
<table width="100%" class="retail-amount"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<tr> </td>
<td colspan="2">实收金额</td> <td colspan="2" valign="top">
</tr> <table width="100%" class="retail-amount">
<tr> <tr>
<td colspan="2"> <td colspan="2">实收金额</td>
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly" data-changeamount="0" /> </tr>
</td> <tr>
</tr> <td colspan="2">
<tr> <input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly"
<td colspan="2">收款金额</td> data-changeamount="0"/>
</tr> </td>
<tr> </tr>
<td colspan="2"> <tr>
<input id="getAmount" name="getAmount" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))" class="get-amount" data-changeamount="0" /> <td colspan="2">收款金额</td>
</td> </tr>
</tr> <tr>
<tr> <td colspan="2">
<td colspan="2">找零</td> <input id="getAmount" name="getAmount"
</tr> onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
<tr> class="get-amount" data-changeamount="0"/>
<td colspan="2"> </td>
<input id="backAmount" name="backAmount" class="back-amount" readonly="readonly" data-changeamount="0" /> </tr>
</td> <tr>
</tr> <td colspan="2">找零</td>
<tr> </tr>
<td>收款账户:</td> <tr>
<td> <td colspan="2">
<select name="AccountId" id="AccountId" style="width:110px;"></select> <input id="backAmount" name="backAmount" class="back-amount" readonly="readonly"
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> data-changeamount="0"/>
</td> </td>
</tr> </tr>
</table> <tr>
</td> <td>收款账户:</td>
</tr> <td>
<tr> <select name="AccountId" id="AccountId" style="width:110px;"></select>
<td colspan="8"> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> style="display: none;"/>
</td> </td>
</tr> </tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> </td>
</form> </tr>
</div> <tr>
<div id="dlg-buttons"> <td colspan="8">
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> style="width: 1130px; height:35px;"></textarea>
</div> </td>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px" </tr>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> </table>
<table> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<tr> </form>
<td style="width:60px;height:50px;">会员卡号:</td> </div>
<td style="padding:5px;width:200px;"> <div id="dlg-buttons">
<span id="OrganIdShow"></span> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</td> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:70px;">单据日期:</td> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:200px;"> </div>
<span id="OperTimeShow"></span> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:80px;">单据编号:</td> <table>
<td style="padding:5px;width:200px;"> <tr>
<span id="NumberShow"></span> <td style="width:60px;height:50px;">会员卡号:</td>
</td> <td style="padding:5px;width:200px;">
<td style="width:70px;">付款类型:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:150px;"> </td>
<span id="payTypeShow"></span> <td style="width:70px;">单据日期:</td>
</td> <td style="padding:5px;width:200px;">
</tr> <span id="OperTimeShow"></span>
<tr> </td>
<td colspan="6"> <td style="width:80px;">单据编号:</td>
<!-- 商品列表table --> <td style="padding:5px;width:200px;">
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <span id="NumberShow"></span>
</td> </td>
<td colspan="2" valign="top"> <td style="width:70px;">付款类型:</td>
<table width="100%" class="retail-amount-show"> <td style="padding:5px;width:150px;">
<tr> <span id="payTypeShow"></span>
<td colspan="2">实收金额</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="6">
<span id="ChangeAmountShow" class="change-amount-show"></span> <!-- 商品列表table -->
</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</tr> </td>
<tr> <td colspan="2" valign="top">
<td colspan="2">收款金额</td> <table width="100%" class="retail-amount-show">
</tr> <tr>
<tr> <td colspan="2">实收金额</td>
<td colspan="2"> </tr>
<span id="getAmountShow" class="get-amount-show"></span> <tr>
</td> <td colspan="2">
</tr> <span id="ChangeAmountShow" class="change-amount-show"></span>
<tr> </td>
<td colspan="2">找零</td> </tr>
</tr> <tr>
<tr> <td colspan="2">收款金额</td>
<td colspan="2"> </tr>
<span id="backAmountShow" class="back-amount-show"></span> <tr>
</td> <td colspan="2">
</tr> <span id="getAmountShow" class="get-amount-show"></span>
<tr> </td>
<td>收款账户:</td> </tr>
<td align="left" style="width:110px;"> <tr>
<span id="AccountIdShow"></span> <td colspan="2">找零</td>
</td> </tr>
</tr> <tr>
</table> <td colspan="2">
</td> <span id="backAmountShow" class="back-amount-show"></span>
</tr> </td>
<tr> </tr>
<td colspan="8" style="width: 1130px; height:35px;"> <tr>
<span id="RemarkShow"></span> <td>收款账户:</td>
</td> <td align="left" style="width:110px;">
</tr> <span id="AccountIdShow"></span>
</table> </td>
</div> </tr>
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" </table>
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true"> </td>
<table class="account-dlg"> </tr>
<tr class="account-head-tmp"> <tr>
<td style="width:30px;"></td> <td colspan="8" style="width: 1130px; height:35px;">
<td style="width:140px; padding:5px;">结算账户</td> <span id="RemarkShow"></span>
<td style="width:100px; padding:5px;">金额</td> </td>
</tr> </tr>
<tr> </table>
<td style="width:30px;"></td> </div>
<td style="width:140px;text-align: center;">合计:</td> <div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td> closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
</tr> <table class="account-dlg">
</table> <tr class="account-head-tmp">
<table class="tabs-tmp"> <td style="width:30px;"></td>
<tr class="account-content-tmp"> <td style="width:140px; padding:5px;">结算账户</td>
<td style="width:30px;"></td> <td style="width:100px; padding:5px;">金额</td>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td> </tr>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;" /></td> <tr>
</tr> <td style="width:30px;"></td>
</table> <td style="width:140px;text-align: center;">合计:</td>
</div> <td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
<div id="accountDlgButtons"> </tr>
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <table class="tabs-tmp">
</div> <tr class="account-content-tmp">
</body> <td style="width:30px;"></td>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
</tr>
</table>
</div>
<div id="accountDlgButtons">
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</div>
</body>
</html> </html>

View File

@@ -1,275 +1,285 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>销售退货</title> <title>销售退货</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售退货列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售退货列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>客户:</td> <td>客户:</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:110px;" /> <input id="OrganId" name="OrganId" style="width:110px;"/>
</td> </td>
<td style="width:70px;">销售人员:</td> <td style="width:70px;">销售人员:</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="Salesman" name="Salesman" style="width:130px;" /> <input id="Salesman" name="Salesman" style="width:130px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td>单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td>单据编号:</td>
</td> <td style="padding:5px">
<td style="width:100px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>优惠率:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<input id="Discount" name="Discount" style="width:110px;" /> </tr>
% <tr>
</td> <td>优惠率:</td>
<td>退款优惠:</td> <td style="padding:5px">
<td style="padding:5px"> <input id="Discount" name="Discount" style="width:110px;"/>
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;" /> %
</td> </td>
<td>优惠后金额</td> <td>退款优惠</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;" /> <input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
</td> </td>
<td>本次退款</td> <td>优惠后金额</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;" /> <input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
</td> </td>
<td style="width:100px;"></td> <td>本次退款:</td>
</tr> <td style="padding:5px">
<tr> <input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
<td>结算账户:</td> </td>
<td style="padding:5px"> <td style="width:100px;"></td>
<select name="AccountId" id="AccountId" style="width:120px;"></select> </tr>
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> <tr>
</td> <td>结算账户:</td>
<td>本次欠款:</td> <td style="padding:5px">
<td style="padding:5px"> <select name="AccountId" id="AccountId" style="width:120px;"></select>
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;" /> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
</td> style="display: none;"/>
<td>销售费用:</td> </td>
<td style="padding:5px"> <td>本次欠款:</td>
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly" /> <td style="padding:5px">
<img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" /> <input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
</td> </td>
<td></td> <td>销售费用:</td>
<td style="padding:5px"> <td style="padding:5px">
</td> <input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
<td style="width:100px;"></td> <img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
</tr> </td>
</table> <td></td>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <td style="padding:5px">
</form> </td>
</div> <td style="width:100px;"></td>
<div id="dlg-buttons"> </tr>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </table>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </div>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> <div id="dlg-buttons">
<table> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<tr> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="width:60px;">客户:</td> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<td style="padding:5px;width:130px;"> </div>
<span id="OrganIdShow"></span> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="width:70px;">销售人员:</td> <table>
<td style="padding:5px;width:130px;"> <tr>
<span id="SalesmanShow"></span> <td style="width:60px;">客户:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:80px;">单据日期:</td> <span id="OrganIdShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="OperTimeShow"></span> <td style="width:70px;">销售人员:</td>
</td> <td style="padding:5px;width:130px;">
<td style="width:70px;">单据编号:</td> <span id="SalesmanShow"></span>
<td style="padding:5px;width:140px;"> </td>
<span id="NumberShow"></span> <td style="width:80px;">单据日期:</td>
</td> <td style="padding:5px;width:140px;">
<td style="width:100px;"></td> <span id="OperTimeShow"></span>
</tr> </td>
<tr> <td style="width:70px;">单据编号:</td>
<td colspan="9" style="width: 1130px;"> <td style="padding:5px;width:140px;">
<!-- 商品列表table --> <span id="NumberShow"></span>
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> </td>
</td> <td style="width:100px;"></td>
</tr> </tr>
<tr> <tr>
<td style="width:60px;">单据备注:</td> <td colspan="9" style="width: 1130px;">
<td colspan="8" style="height:35px;"> <!-- 商品列表table -->
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>优惠率</td> <td style="width:60px;">单据备注</td>
<td> <td colspan="8" style="height:35px;">
<span id="DiscountShow" style="width: 110px;"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
% </td>
</td> </tr>
<td>退款优惠:</td> <tr>
<td> <td>优惠率:</td>
<span id="DiscountMoneyShow" style="width: 120px;"></span> <td>
</td> <span id="DiscountShow" style="width: 110px;"></span>
<td>优惠后金额:</td> %
<td> </td>
<span id="DiscountLastMoneyShow" style="width: 120px;"></span> <td>退款优惠:</td>
</td> <td>
<td>本次退款:</td> <span id="DiscountMoneyShow" style="width: 120px;"></span>
<td style="padding:5px"> </td>
<span id="ChangeAmountShow"></span> <td>优惠后金额:</td>
</td> <td>
<td style="width:100px;"></td> <span id="DiscountLastMoneyShow" style="width: 120px;"></span>
</tr> </td>
<tr> <td>本次退款:</td>
<td>结算账户:</td> <td style="padding:5px">
<td style="padding:5px"> <span id="ChangeAmountShow"></span>
<span id="AccountIdShow"></span> </td>
</td> <td style="width:100px;"></td>
<td>本次欠款:</td> </tr>
<td style="padding:5px"> <tr>
<span id="DebtShow"></span> <td>结算账户:</td>
</td> <td style="padding:5px">
<td>销售费用:</td> <span id="AccountIdShow"></span>
<td style="padding:5px"> </td>
<span id="OtherMoneyShow"></span> <td>本次欠款:</td>
</td> <td style="padding:5px">
<td></td> <span id="DebtShow"></span>
<td style="padding:5px"> </td>
</td> <td>销售费用:</td>
<td style="width:100px;"></td> <td style="padding:5px">
</tr> <span id="OtherMoneyShow"></span>
</table> </td>
</div> <td></td>
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" <td style="padding:5px">
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true"> </td>
<table class="account-dlg"> <td style="width:100px;"></td>
<tr class="account-head-tmp"> </tr>
<td style="width:30px;"></td> </table>
<td style="width:140px; padding:5px;">结算账户</td> </div>
<td style="width:100px; padding:5px;">金额</td> <div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
</tr> closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
<tr> <table class="account-dlg">
<td style="width:30px;"></td> <tr class="account-head-tmp">
<td style="width:140px;text-align: center;">合计:</td> <td style="width:30px;"></td>
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td> <td style="width:140px; padding:5px;">结算账户</td>
</tr> <td style="width:100px; padding:5px;">金额</td>
</table> </tr>
<table class="tabs-tmp"> <tr>
<tr class="account-content-tmp"> <td style="width:30px;"></td>
<td style="width:30px;"></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td> <td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;" /></td> </tr>
</tr> </table>
</table> <table class="tabs-tmp">
</div> <tr class="account-content-tmp">
<div id="accountDlgButtons"> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
</div> </tr>
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" </table>
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true"> </div>
<table class="money-dlg"> <div id="accountDlgButtons">
<tr class="money-head-tmp"> <a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:30px;"></td> <a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
<td style="width:140px; padding:5px;">结算账户</td> </div>
<td style="width:100px; padding:5px;">金额</td> <div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
</tr> closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
<tr> <table class="money-dlg">
<td style="width:30px;"></td> <tr class="money-head-tmp">
<td style="width:140px;text-align: center;">合计:</td> <td style="width:30px;"></td>
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td> <td style="width:140px; padding:5px;">结算账户</td>
</tr> <td style="width:100px; padding:5px;">金额</td>
</table> </tr>
<table class="tabs-tmp"> <tr>
<tr class="money-content-tmp"> <td style="width:30px;"></td>
<td style="width:30px;"></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td> <td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;" /></td> </tr>
</tr> </table>
</table> <table class="tabs-tmp">
</div> <tr class="money-content-tmp">
<div id="otherMoneyDlgBtn"> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
</div> </tr>
</body> </table>
</div>
<div id="otherMoneyDlgBtn">
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</div>
</body>
</html> </html>

View File

@@ -1,278 +1,289 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>销售出库</title> <title>销售出库</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/in_out.css"/>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script> <script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script> <script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
var path = "<%=path%>"; var path = "<%=path%>";
var clientIp = "<%=clientIp%>"; var clientIp = "<%=clientIp%>";
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>单据编号:</td> <tr>
<td> <td>单据编号:</td>
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/> <td>
</td> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
<td>商品信息:</td> </td>
<td> <td>商品信息:</td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/> <td>
</td> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
<td>单据日期:</td> </td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
<td> class="txt Wdate" style="width:100px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp; </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <td>&nbsp;</td>
</td> <td>
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售出库列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售出库列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td style="width:60px;">客户:</td> <td style="width:60px;">客户:</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:130px;" /> <input id="OrganId" name="OrganId" style="width:130px;"/>
</td> </td>
<td style="width:70px;">销售人员:</td> <td style="width:70px;">销售人员:</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="Salesman" name="Salesman" style="width:130px;" /> <input id="Salesman" name="Salesman" style="width:130px;"/>
</td> </td>
<td style="width:80px;">单据日期:</td> <td style="width:80px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <input type="text" name="OperTime" id="OperTime"
</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
<td style="width:70px;">单据编号:</td> style="width:140px;"/>
<td style="padding:5px"> </td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/> <td style="width:70px;">单据编号:</td>
</td> <td style="padding:5px">
<td style="width:100px;"></td> <input name="Number" id="Number" class="easyui-validatebox"
</tr> data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
<tr> </td>
<td colspan="9"> <td style="width:100px;"></td>
<!-- 商品列表table --> </tr>
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table> <tr>
</td> <td colspan="9">
</tr> <!-- 商品列表table -->
<tr> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td colspan="9"> </td>
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea> </tr>
</td> <tr>
</tr> <td colspan="9">
<tr> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
<td>优惠率:</td> style="width: 1130px; height:35px;"></textarea>
<td style="padding:5px"> </td>
<input id="Discount" name="Discount" style="width:110px;" /> </tr>
% <tr>
</td> <td>优惠率:</td>
<td>收款优惠:</td> <td style="padding:5px">
<td style="padding:5px"> <input id="Discount" name="Discount" style="width:110px;"/>
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;" /> %
</td> </td>
<td>优惠后金额</td> <td>收款优惠</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;" /> <input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
</td> </td>
<td>本次收款</td> <td>优惠后金额</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;" /> <input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
</td> </td>
<td style="width:100px;"></td> <td>本次收款:</td>
</tr> <td style="padding:5px">
<tr> <input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
<td>结算账户:</td> </td>
<td style="padding:5px"> <td style="width:100px;"></td>
<select name="AccountId" id="AccountId" style="width:120px;"></select> </tr>
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" style="display: none;"/> <tr>
</td> <td>结算账户:</td>
<td>本次欠款:</td> <td style="padding:5px">
<td style="padding:5px"> <select name="AccountId" id="AccountId" style="width:120px;"></select>
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;" /> <img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
</td> style="display: none;"/>
<td>销售费用:</td> </td>
<td style="padding:5px"> <td>本次欠款:</td>
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly" /> <td style="padding:5px">
<img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg" /> <input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
</td> </td>
<td>结算天数</td> <td>销售费用</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="AccountDay" name="AccountDay" class="easyui-numberbox" data-options="validType:'length[1,3]'" style="width:120px;" /> <input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
</td> <img class="other-money-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
<td style="width:100px;"></td> </td>
</tr> <td>结算天数:</td>
</table> <td style="padding:5px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input id="AccountDay" name="AccountDay" class="easyui-numberbox"
</form> data-options="validType:'length[1,3]'" style="width:120px;"/>
</div> </td>
<div id="dlg-buttons"> <td style="width:100px;"></td>
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> </tr>
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a> </table>
</div> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px" </form>
closed="true" modal="true" cache="false" collapsible="false" closable="true"> </div>
<table> <div id="dlg-buttons">
<tr> <a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:60px;">客户:</td> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
<td style="padding:5px;width:130px;"> onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
<span id="OrganIdShow"></span> </div>
</td> <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
<td style="width:70px;">销售人员:</td> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<td style="padding:5px;width:130px;"> <table>
<span id="SalesmanShow"></span> <tr>
</td> <td style="width:60px;">客户:</td>
<td style="width:80px;">单据日期:</td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"> <span id="OrganIdShow"></span>
<span id="OperTimeShow"></span> </td>
</td> <td style="width:70px;">销售人员:</td>
<td style="width:70px;">单据编号:</td> <td style="padding:5px;width:130px;">
<td style="padding:5px;width:140px;"> <span id="SalesmanShow"></span>
<span id="NumberShow"></span> </td>
</td> <td style="width:80px;">单据日期:</td>
<td style="width:100px;"></td> <td style="padding:5px;width:140px;">
</tr> <span id="OperTimeShow"></span>
<tr> </td>
<td colspan="9" style="width: 1130px;"> <td style="width:70px;">单据编号:</td>
<!-- 商品列表table --> <td style="padding:5px;width:140px;">
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table> <span id="NumberShow"></span>
</td> </td>
</tr> <td style="width:100px;"></td>
<tr> </tr>
<td style="width:60px;">单据备注:</td> <tr>
<td colspan="8" style="height:35px;"> <td colspan="9" style="width: 1130px;">
<span id="RemarkShow" style="width: 1070px; height:35px;"></span> <!-- 商品列表table -->
</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</tr> </td>
<tr> </tr>
<td>优惠率:</td> <tr>
<td> <td style="width:60px;">单据备注:</td>
<span id="DiscountShow" style="width: 110px;"></span> <td colspan="8" style="height:35px;">
% <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>收款优惠:</td> </tr>
<td> <tr>
<span id="DiscountMoneyShow" style="width: 120px;"></span> <td>优惠率:</td>
</td> <td>
<td>优惠后金额:</td> <span id="DiscountShow" style="width: 110px;"></span>
<td> %
<span id="DiscountLastMoneyShow" style="width: 120px;"></span> </td>
</td> <td>收款优惠:</td>
<td>本次收款:</td> <td>
<td style="padding:5px"> <span id="DiscountMoneyShow" style="width: 120px;"></span>
<span id="ChangeAmountShow"></span> </td>
</td> <td>优惠后金额:</td>
<td style="width:100px;"></td> <td>
</tr> <span id="DiscountLastMoneyShow" style="width: 120px;"></span>
<tr> </td>
<td>结算账户</td> <td>本次收款</td>
<td style="padding:5px"> <td style="padding:5px">
<span id="AccountIdShow"></span> <span id="ChangeAmountShow"></span>
</td> </td>
<td>本次欠款:</td> <td style="width:100px;"></td>
<td style="padding:5px"> </tr>
<span id="DebtShow"></span> <tr>
</td> <td>结算账户:</td>
<td>销售费用:</td> <td style="padding:5px">
<td style="padding:5px"> <span id="AccountIdShow"></span>
<span id="OtherMoneyShow"></span> </td>
</td> <td>本次欠款:</td>
<td>结算天数:</td> <td style="padding:5px">
<td style="padding:5px"> <span id="DebtShow"></span>
<span id="AccountDayShow"></span> </td>
</td> <td>销售费用:</td>
<td style="width:100px;"></td> <td style="padding:5px">
</tr> <span id="OtherMoneyShow"></span>
</table> </td>
</div> <td>结算天数:</td>
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" <td style="padding:5px">
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true"> <span id="AccountDayShow"></span>
<table class="account-dlg"> </td>
<tr class="account-head-tmp"> <td style="width:100px;"></td>
<td style="width:30px;"></td> </tr>
<td style="width:140px; padding:5px;">结算账户</td> </table>
<td style="width:100px; padding:5px;">金额</td> </div>
</tr> <div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<tr> closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
<td style="width:30px;"></td> <table class="account-dlg">
<td style="width:140px;text-align: center;">合计:</td> <tr class="account-head-tmp">
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td> <td style="width:30px;"></td>
</tr> <td style="width:140px; padding:5px;">结算账户</td>
</table> <td style="width:100px; padding:5px;">金额</td>
<table class="tabs-tmp"> </tr>
<tr class="account-content-tmp"> <tr>
<td style="width:30px;"></td> <td style="width:30px;"></td>
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;" /></td> <td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
</tr> </tr>
</table> </table>
</div> <table class="tabs-tmp">
<div id="accountDlgButtons"> <tr class="account-content-tmp">
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
</div> <td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px" </tr>
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true"> </table>
<table class="money-dlg"> </div>
<tr class="money-head-tmp"> <div id="accountDlgButtons">
<td style="width:30px;"></td> <a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<td style="width:140px; padding:5px;">结算账户</td> <a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
<td style="width:100px; padding:5px;">金额</td> </div>
</tr> <div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
<tr> closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
<td style="width:30px;"></td> <table class="money-dlg">
<td style="width:140px;text-align: center;">合计:</td> <tr class="money-head-tmp">
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td> <td style="width:30px;"></td>
</tr> <td style="width:140px; padding:5px;">结算账户</td>
</table> <td style="width:100px; padding:5px;">金额</td>
<table class="tabs-tmp"> </tr>
<tr class="money-content-tmp"> <tr>
<td style="width:30px;"></td> <td style="width:30px;"></td>
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td> <td style="width:140px;text-align: center;">合计:</td>
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;" /></td> <td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
</tr> </tr>
</table> </table>
</div> <table class="tabs-tmp">
<div id="otherMoneyDlgBtn"> <tr class="money-content-tmp">
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <td style="width:30px;"></td>
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
</div> <td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
</tr>
</table>
</div>
<div id="otherMoneyDlgBtn">
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</div>
</body> </body>
</html> </html>

View File

@@ -1,138 +1,145 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>资产管理</title> <title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/jdigiclock/css/jquery.jdigiclock.css" /> <link rel="stylesheet" type="text/css" href="<%=path %>/js/jdigiclock/css/jquery.jdigiclock.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/jdigiclock/lib/jquery.jdigiclock.js"></script> <script type="text/javascript" src="<%=path %>/js/jdigiclock/lib/jquery.jdigiclock.js"></script>
<!-- 图片上次预览js开始 --> <!-- 图片上次预览js开始 -->
<link rel="stylesheet" type="text/css" href="<%=path %>/js/imgpreview/imgup.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/imgpreview/imgup.css"/>
<script type="text/javascript" src="<%=path %>/js/imgpreview/imagepreview.js"></script> <script type="text/javascript" src="<%=path %>/js/imgpreview/imagepreview.js"></script>
<script type="text/javascript" src="<%=path %>/js/imgpreview/jquery.crop.js"></script> <script type="text/javascript" src="<%=path %>/js/imgpreview/jquery.crop.js"></script>
<!-- 图片上次预览js结束 --> <!-- 图片上次预览js结束 -->
<style type="text/css"> <style type="text/css">
::-moz-focus-inner{ ::-moz-focus-inner {
padding: 0; padding: 0;
border: 0; border: 0;
} }
.ui_button,
.ui_fileup {
vertical-align: middle;
border: 1px solid #ccc;
display: inline-block;
padding: 5px 10px;
background: #FFF;
font-size: 12px;
*overflow: visible;
*display: inline;
*zoom: 1;
}
.ui_fileup {
position: relative;
overflow: hidden;
}
.ui_fileup input {
filter: alpha(opacity=1);
position: absolute;
background: #fff;
font-size: 60px;
cursor: default;
width: auto;
opacity: 0;
z-index: 1;
left: auto;
right: 0;
top: 0;
}
.avataria .cont { .ui_button,
text-align: center; .ui_fileup {
min-height: 1%; vertical-align: middle;
margin: 25px; border: 1px solid #ccc;
width: 302px; display: inline-block;
_zoom: 1; padding: 5px 10px;
} background: #FFF;
.avataria form { font-size: 12px;
text-align: left; *overflow: visible;
overflow: hidden; *display: inline;
} *zoom: 1;
.avataria .cont:after { }
content: "";
display: block;
overflow: hidden;
height: 0;
clear: both;
}
.thumb {
float: right;
height: 120px;
width: 120px;
}
.cropaera {
clear: both;
}
.preview {
height: 300px;
width: 300px;
}
</style>
</head>
<body>
<!-- <div class="avataria" title="头像上传前预览"> .ui_fileup {
<div class="cont"> position: relative;
<div class="thumb"></div> overflow: hidden;
<form enctype="application/x-www-form-urlencoded"> }
<div class="ui_fileup"><input type="file" id="file" accept="image/*" onerror="alert('请选择一个图片')">浏览</div>
&nbsp; .ui_fileup input {
<input type="submit" class="ui_button" value="保存"> filter: alpha(opacity=1);
<input name="crop" type="hidden"> position: absolute;
</form> background: #fff;
</div> font-size: 60px;
<div class="cont"> cursor: default;
<div id="preview" class="preview"></div> width: auto;
</div> opacity: 0;
z-index: 1;
left: auto;
right: 0;
top: 0;
}
.avataria .cont {
text-align: center;
min-height: 1%;
margin: 25px;
width: 302px;
_zoom: 1;
}
.avataria form {
text-align: left;
overflow: hidden;
}
.avataria .cont:after {
content: "";
display: block;
overflow: hidden;
height: 0;
clear: both;
}
.thumb {
float: right;
height: 120px;
width: 120px;
}
.cropaera {
clear: both;
}
.preview {
height: 300px;
width: 300px;
}
</style>
</head>
<body>
<!-- <div class="avataria" title="头像上传前预览">
<div class="cont">
<div class="thumb"></div>
<form enctype="application/x-www-form-urlencoded">
<div class="ui_fileup"><input type="file" id="file" accept="image/*" onerror="alert('请选择一个图片')">浏览</div>
&nbsp;
<input type="submit" class="ui_button" value="保存">
<input name="crop" type="hidden">
</form>
</div>
<div class="cont">
<div id="preview" class="preview"></div>
</div>
</div> --> </div> -->
<div id="digiclock"></div> <div id="digiclock"></div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initColck();
initColck();
//imagepreview(document.getElementById("file"), document.getElementById("preview"), function(info){ //imagepreview(document.getElementById("file"), document.getElementById("preview"), function(info){
//alert("文件名:" + info.name + "\r\n图片原始高度:" + info.height + "\r\n图片原始宽度:" + info.width); //alert("文件名:" + info.name + "\r\n图片原始高度:" + info.height + "\r\n图片原始宽度:" + info.width);
//这里若return false则不预览图片 //这里若return false则不预览图片
//$("#preview").css({ //$("#preview").css({
//background: "none" //background: "none"
//}); //});
//$("#preview").crop( function(e){ //$("#preview").crop( function(e){
//$("input[type='hidden']").val([e.top, e.left, e.height, e.width].toString()); //$("input[type='hidden']").val([e.top, e.left, e.height, e.width].toString());
//}, ".thumb"); //}, ".thumb");
//}); //});
}); });
//初始化钟
function initColck() //初始化钟
{ function initColck() {
$('#digiclock').jdigiclock({ $('#digiclock').jdigiclock({
clockImagesPath:"<%=path%>/js/jdigiclock/images/clock/", clockImagesPath: "<%=path%>/js/jdigiclock/images/clock/",
weatherImagesPath:"<%=path%>/js/jdigiclock/images/weather/" weatherImagesPath: "<%=path%>/js/jdigiclock/images/weather/"
}); });
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,41 +1,42 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Simple Map</title> <title>Simple Map</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8"> <meta charset="utf-8">
<style> <style>
html, body, #map-canvas { html, body, #map-canvas {
height: 100%; height: 100%;
margin: 0px; margin: 0px;
padding: 0px padding: 0px
} }
</style> </style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script> <script>
var map; var map;
function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644)
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize); function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644)
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script> </script>
</head> </head>
<body> <body>
<div id="map-canvas"></div> <div id="map-canvas"></div>
</body> </body>
</html> </html>

View File

@@ -1,320 +1,316 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>结算账户查询</title> <title>结算账户查询</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script> <script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>名称:</td> <tr>
<td> <td>名称:</td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/> <td>
</td> <input type="text" name="searchName" id="searchName" style="width:70px;"/>
<td>&nbsp;</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>编号:</td> <td>&nbsp;</td>
<td> <td>编号:</td>
<input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/> <td>
</td> <input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td>
&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> &nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true" modal="true" collapsible="false" closable="true"> <div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table> modal="true" collapsible="false" closable="true">
</div> <table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ initTableData();
initTableData(); ininPager();
ininPager(); print();
print(); });
});
//初始化表格数据 //初始化表格数据
function initTableData(){ function initTableData() {
$('#tableData').datagrid({ $('#tableData').datagrid({
//iconCls:'icon-save', //iconCls:'icon-save',
//width:700, //width:700,
height:heightInfo, height: heightInfo,
nowrap: false, nowrap: false,
rownumbers: true, rownumbers: true,
//动画效果 //动画效果
animate:false, animate: false,
//选中单行 //选中单行
singleSelect : true, singleSelect: true,
collapsible:false, collapsible: false,
selectOnCheck:false, selectOnCheck: false,
//fitColumns:true, //fitColumns:true,
//单击行是否选中 //单击行是否选中
checkOnSelect : false, checkOnSelect: false,
//交替出现背景 //交替出现背景
striped : true, striped: true,
url:'<%=path %>/account/findBy.action?pageSize=' + initPageSize, url: '<%=path %>/account/findBy.action?pageSize=' + initPageSize,
pagination: true, pagination: true,
//自动截取数据 //自动截取数据
//nowrap : true, //nowrap : true,
//loadFilter: pagerFilter, //loadFilter: pagerFilter,
pageSize: initPageSize, pageSize: initPageSize,
pageList: initPageNum, pageList: initPageNum,
columns:[[ columns: [[
{ title: '名称',field: 'name',width:100}, {title: '名称', field: 'name', width: 100},
{ title: '编号', field: 'serialNo',width:150,align:"center"}, {title: '编号', field: 'serialNo', width: 150, align: "center"},
{ title: '期初金额', field: 'initialAmount',width:100,align:"center"}, {title: '期初金额', field: 'initialAmount', width: 100, align: "center"},
{ title: '本月发生额', field: 'thisMonthAmount',width:100,align:"center"}, {title: '本月发生额', field: 'thisMonthAmount', width: 100, align: "center"},
{ title: '当前余额', field: 'currentAmount',width:100,align:"center"}, {title: '当前余额', field: 'currentAmount', width: 100, align: "center"},
{ title: '操作', field: 'op',width:100,align:"center",formatter:function(value,rec) { {
var str = ''; title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) {
var rowInfo = rec.id + 'AaBb' + rec.name +'AaBb' + rec.serialNo +'AaBb' + rec.initialAmount +'AaBb' + rec.currentAmount; var str = '';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>&nbsp;&nbsp;'; var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialNo + 'AaBb' + rec.initialAmount + 'AaBb' + rec.currentAmount;
return str; str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>&nbsp;&nbsp;';
} return str;
}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
} }
}); }
]],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
} }
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //搜索按钮添加快捷键
//搜索按钮添加快捷键 if (k == "13" && (obj.id == "searchName" || obj.id == "searchSerialNo")) {
if(k == "13"&&(obj.id=="searchName"||obj.id=="searchSerialNo")) $("#searchBtn").click();
{ }
$("#searchBtn").click(); });
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showAccountDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showAccountDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
});
function showAccountDetails(pageNo,pageSize) //分页信息处理
{ function ininPager() {
$.ajax({ try {
type:"post", var opts = $("#tableData").datagrid('options');
url: "<%=path %>/account/findBy.action", var pager = $("#tableData").datagrid('getPager');
dataType: "json", pager.pagination({
data: ({ onSelectPage: function (pageNum, pageSize) {
name:$.trim($("#searchName").val()), opts.pageNumber = pageNum;
serialNo:$.trim($("#searchSerialNo").val()), opts.pageSize = pageSize;
pageNo:pageNo, pager.pagination('refresh',
pageSize:pageSize {
}), pageNumber: pageNum,
success: function (data) pageSize: pageSize
{ });
$("#tableData").datagrid('loadData',data); showAccountDetails(pageNum, pageSize);
}, }
//此处添加错误处理 });
error:function() }
{ catch (e) {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
return; }
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showAccountDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
});
function showAccountDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/account/findBy.action",
dataType: "json",
data: ({
name: $.trim($("#searchName").val()),
serialNo: $.trim($("#searchSerialNo").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
function showAccountInOutList(accountInfo) {
var info = accountInfo.split("AaBb");
var accountId = info[0];
var initialAmount = info[3];
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;查看账户流水');
$(".window-mask").css({width: webW, height: webH});
initAccountDetailData(accountId);
getAccountInOutList(accountId, initialAmount, 1, initPageSize);
ininAccountDetailPager(accountId, initialAmount);
}
//初始化表格数据
function initAccountDetailData(accountId) {
$('#accountTableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: false,
//动画效果
animate: false,
//选中单行
singleSelect: true,
collapsible: false,
selectOnCheck: false,
//单击行是否选中
checkOnSelect: false,
//交替出现背景
striped: true,
pagination: true,
pageSize: initPageSize,
pageList: initPageNum,
columns: [[
{
title: '单据编号', field: 'number', width: 150,
formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>";
} }
}); },
} {title: '类型', field: 'type', width: 100},
{title: '单位信息', field: 'supplierName', width: 150},
function showAccountInOutList(accountInfo){ {
var info = accountInfo.split("AaBb"); title: '金额', field: 'changeAmount', width: 80,
var accountId = info[0]; formatter: function (value, row) {
var initialAmount = info[3]; if (row.aList && row.amList) {
$('#accountDetailListDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;查看账户流水'); var aListArr = row.aList.toString().split(",");
$(".window-mask").css({ width: webW ,height: webH}); var amListArr = row.amList.toString().split(",");
initAccountDetailData(accountId); var res = "";
getAccountInOutList(accountId,initialAmount,1,initPageSize); for (var i = 0; i < aListArr.length; i++) {
ininAccountDetailPager(accountId,initialAmount); if (aListArr[i] == accountId) {
} res = amListArr[i];
}
//初始化表格数据
function initAccountDetailData(accountId){
$('#accountTableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: false,
//动画效果
animate:false,
//选中单行
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//单击行是否选中
checkOnSelect : false,
//交替出现背景
striped : true,
pagination: true,
pageSize: initPageSize,
pageList: initPageNum,
columns:[[
{ title: '单据编号',field: 'number',width:150,
formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>";
} }
}, return res + "[多账户]";
{ title: '类型', field: 'type',width:100}, }
{ title: '单位信息', field: 'supplierName',width:150}, else {
{ title: '金额', field: 'changeAmount',width:80, return row.changeAmount;
formatter: function (value, row) { }
if(row.aList && row.amList) { }
var aListArr = row.aList.toString().split(","); },
var amListArr = row.amList.toString().split(","); {title: '余额', field: 'balance', width: 80},
var res = ""; {title: '入库出库日期', field: 'operTime', width: 180}
for(var i=0; i<aListArr.length; i++) { ]],
if(aListArr[i] == accountId) { onLoadError: function () {
res = amListArr[i]; $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
} }
return res + "[多账户]"; });
} }
else {
return row.changeAmount;
}
}
},
{ title: '余额', field: 'balance',width:80},
{ title: '入库出库日期',field: 'operTime',width:180}
]],
onLoadError:function() {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//分页信息处理 //分页信息处理
function ininAccountDetailPager(accountId,initialAmount){ function ininAccountDetailPager(accountId, initialAmount) {
try { try {
var opts = $("#accountTableData").datagrid('options'); var opts = $("#accountTableData").datagrid('options');
var pager = $("#accountTableData").datagrid('getPager'); var pager = $("#accountTableData").datagrid('getPager');
pager.pagination({ pager.pagination({
onSelectPage:function(pageNum, pageSize) { onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum; opts.pageNumber = pageNum;
opts.pageSize = pageSize; opts.pageSize = pageSize;
pager.pagination('refresh', { pager.pagination('refresh', {
pageNumber:pageNum, pageNumber: pageNum,
pageSize:pageSize pageSize: pageSize
}); });
getAccountInOutList(accountId,initialAmount,pageNum,pageSize); getAccountInOutList(accountId, initialAmount, pageNum, pageSize);
} }
}); });
} }
catch (e) { catch (e) {
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
} }
} }
function getAccountInOutList(accountId,initialAmount,pageNo,pageSize){ function getAccountInOutList(accountId, initialAmount, pageNo, pageSize) {
$.ajax({ $.ajax({
type:"get", type: "get",
url: "<%=path %>/account/findAccountInOutList.action", url: "<%=path %>/account/findAccountInOutList.action",
dataType: "json", dataType: "json",
data: ({ data: ({
accountID: accountId, accountID: accountId,
initialAmount: initialAmount, initialAmount: initialAmount,
pageNo:pageNo, pageNo: pageNo,
pageSize:pageSize pageSize: pageSize
}), }),
success: function (res) { success: function (res) {
$("#accountTableData").datagrid('loadData',res); $("#accountTableData").datagrid('loadData', res);
}, },
//此处添加错误处理 //此处添加错误处理
error:function() { error: function () {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//报表打印 //报表打印
function print() { function print() {
$("#printBtn").off("click").on("click",function(){ $("#printBtn").off("click").on("click", function () {
var path = "<%=path %>"; var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path); CreateFormPage('打印报表', $('#tableData'), path);
}); });
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,266 +1,256 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>进货统计</title> <title>进货统计</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>月份:</td> <tr>
<td> <td>月份:</td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/> <td>
</td> <input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
<td>&nbsp;</td> class="txt Wdate" style="width:180px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td>&nbsp;</td>
&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</td> &nbsp;&nbsp;
</tr> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</table> </td>
</div> </tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="进货统计列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="进货统计列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var mPropertyList = ""; //商品属性列表 var mPropertyList = ""; //商品属性列表
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 $("#searchMonth").val(thisDate);
$("#searchMonth").val(thisDate); initMProperty(); //初始化商品属性
initMProperty(); //初始化商品属性 initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化商品属性 //初始化商品属性
function initMProperty(){ function initMProperty() {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "<%=path %>/materialProperty/findBy.action", url: "<%=path %>/materialProperty/findBy.action",
dataType: "json", dataType: "json",
success: function (res) { success: function (res) {
if (res && res.rows) { if (res && res.rows) {
var thisRows = res.rows; var thisRows = res.rows;
for(var i=0; i < thisRows.length; i++) { for (var i = 0; i < thisRows.length; i++) {
if(thisRows[i].enabled){ if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativeName +","; mPropertyList += thisRows[i].nativeName + ",";
} }
} }
if(mPropertyList){ if (mPropertyList) {
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1); mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
} }
} }
}, },
//此处添加错误处理 //此处添加错误处理
error:function() { error: function () {
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error'); $.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: true,
rownumbers: true, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: 10,
pageSize: 10, pageList: [10, 50, 100],
pageList: [10,50,100], columns: [[
columns:[[ {title: '名称', field: 'MaterialName', width: 60},
{ title: '名称',field: 'MaterialName',width:60}, {title: '型号', field: 'MaterialModel', width: 80},
{ title: '型号',field: 'MaterialModel',width:80}, {title: '扩展信息', field: 'MaterialOther', width: 150},
{ title: '扩展信息',field: 'MaterialOther',width:150}, {title: '单位', field: 'MaterialUnit', width: 80},
{ title: '单位',field: 'MaterialUnit',width:80}, {title: '进货数量', field: 'InSum', width: 60},
{ title: '进货数量',field: 'InSum',width:60}, {title: '进货金额', field: 'InSumPrice', width: 60},
{ title: '进货金额',field: 'InSumPrice',width:60}, {title: '退货数量', field: 'OutSum', width: 60},
{ title: '退货数量',field: 'OutSum',width:60}, {title: '退货金额', field: 'OutSumPrice', width: 60}
{ title: '退货金额',field: 'OutSumPrice',width:60} ]],
]], onLoadError: function () {
onLoadError:function() $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
{ return;
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); }
return; });
} }
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //搜索按钮添加快捷键
//搜索按钮添加快捷键 if (k == "13" && (obj.id == "searchMonth")) {
if(k == "13"&&(obj.id=="searchMonth")) $("#searchBtn").click();
{ }
$("#searchBtn").click(); });
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
function search() { //分页信息处理
showDetails(1,initPageSize); function ininPager() {
var opts = $("#tableData").datagrid('options'); try {
var pager = $("#tableData").datagrid('getPager'); var opts = $("#tableData").datagrid('options');
opts.pageNumber = 1; var pager = $("#tableData").datagrid('getPager');
opts.pageSize = initPageSize; pager.pagination({
pager.pagination('refresh', { onSelectPage: function (pageNum, pageSize) {
pageNumber:1, opts.pageNumber = pageNum;
pageSize:initPageSize opts.pageSize = pageSize;
}); pager.pagination('refresh',
} {
//搜索处理 pageNumber: pageNum,
$("#searchBtn").unbind().bind({ pageSize: pageSize
click:function() });
{ showDetails(pageNum, pageSize);
search(); }
} });
}); }
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) { function search() {
$.ajax({ showDetails(1, initPageSize);
type:"post", var opts = $("#tableData").datagrid('options');
url: "<%=path %>/depotHead/findByMonth.action", var pager = $("#tableData").datagrid('getPager');
dataType: "json", opts.pageNumber = 1;
data: ({ opts.pageSize = initPageSize;
MonthTime:$("#searchMonth").val() pager.pagination('refresh', {
}), pageNumber: 1,
success: function (res) pageSize: initPageSize
{ });
var HeadIds = res.HeadIds; }
if(HeadIds) {
//获取排序后的产品ID
$.ajax({
type:"post",
url: "<%=path %>/material/findByOrder.action",
dataType: "json",
success: function (resNew)
{
var MIds = resNew.mIds;
if(MIds) {
$.ajax({
type:"post",
url: "<%=path %>/depotItem/buyIn.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
MonthTime:$("#searchMonth").val(),
HeadIds:HeadIds,
MaterialIds:MIds,
mpList: mPropertyList
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
}, //搜索处理
//此处添加错误处理 $("#searchBtn").unbind().bind({
error:function() click: function () {
{ search();
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); }
return; });
}
}); function showDetails(pageNo, pageSize) {
} $.ajax({
else { type: "post",
$.messager.alert('查询提示','本月无数据!','error'); url: "<%=path %>/depotHead/findByMonth.action",
} dataType: "json",
}, data: ({
//此处添加错误处理 MonthTime: $("#searchMonth").val()
error:function() }),
{ success: function (res) {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); var HeadIds = res.HeadIds;
return; if (HeadIds) {
} //获取排序后的产品ID
}); $.ajax({
} type: "post",
else { url: "<%=path %>/material/findByOrder.action",
$.messager.alert('查询提示','本月无数据!','error'); dataType: "json",
} success: function (resNew) {
}, var MIds = resNew.mIds;
//此处添加错误处理 if (MIds) {
error:function() $.ajax({
{ type: "post",
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); url: "<%=path %>/depotItem/buyIn.action",
return; dataType: "json",
} data: ({
}); pageNo: pageNo,
} pageSize: pageSize,
//报表打印 MonthTime: $("#searchMonth").val(),
function print() { HeadIds: HeadIds,
$("#printBtn").off("click").on("click",function(){ MaterialIds: MIds,
var path = "<%=path %>"; mpList: mPropertyList
CreateFormPage('打印报表', $('#tableData'), path); }),
}); success: function (data) {
} $("#tableData").datagrid('loadData', data);
</script>
</body> },
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,368 +1,364 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>客户对账</title> <title>客户对账</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script> <script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var uid = ${sessionScope.user.id}; var uid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>客户:</td> <tr>
<td> <td>客户:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
<td>&nbsp;</td> &nbsp;&nbsp;
<td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
期初应收:<span class="first-total">0</span>&nbsp;&nbsp; </td>
期末应收:<span class="last-total">0</span> <td>&nbsp;</td>
</td> <td>
</tr> 期初应收:<span class="first-total">0</span>&nbsp;&nbsp;
</table> 期末应收:<span class="last-total">0</span>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户对账列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户对账列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var path = "<%=path %>"; var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口 var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); initSupplier(); //初始化客户信息
initSupplier(); //初始化客户信息 initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化客户 //初始化客户
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: cusUrl, url: cusUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: true,
rownumbers: true, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, pageSize: 10,
pageSize: 10, pageList: [10, 50, 100],
pageList: [10,50,100], columns: [[
columns:[[ {
{ title: '单据编号',field: 'number',width:140, title: '单据编号', field: 'number', width: 140,
formatter: function (value, row) { formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">" return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>"; + row.number + "</a>";
}
},
{title: '类型', field: 'type', width: 100},
{title: '单位名称', field: 'supplierName', width: 200},
{title: '单据金额', field: 'discountLastMoney', width: 80},
{title: '实际支付', field: 'changeAmount', width: 80},
{title: '本期变化', field: 'allPrice', width: 80},
{title: '单据日期', field: 'operTime', width: 140}
]],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
}
});
}
//初始化键盘enter事件
$(document).keydown(function (event) {
//兼容 IE和firefox 事件
var e = window.event || event;
var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber: pageNum,
pageSize: pageSize
});
showDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//搜索处理
function search() {
showDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
$("#searchBtn").unbind().bind({
click: function () {
search();
}
});
function showDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findStatementAccount.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
OrganId: $('#OrganId').combobox('getValue'),
supType: "客户"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
//如果选择了单位信息,就进行计算期初和期末
var supplierId = $('#OrganId').combobox('getValue');
if (supplierId) {
//先查找期初信息
var beginNeedGet = 0;
var beginNeedPay = 0;
$.ajax({
type: "post",
url: "<%=path %>/supplier/findById.action",
dataType: "json",
async: false,
data: ({
supplierID: supplierId
}),
success: function (res) {
if (res && res.rows && res.rows[0]) {
if (res.rows[0].BeginNeedGet) {
beginNeedGet = res.rows[0].BeginNeedGet;
}
if (res.rows[0].BeginNeedPay) {
beginNeedPay = res.rows[0].BeginNeedPay;
}
//显示期初结存
var searchBeginTime = $("#searchBeginTime").val(); //开始时间
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchBeginTime,
supType: "customer"
}),
success: function (res) {
if (res) {
var moneyA = res.getAllMoney.toFixed(2) - 0;
$.ajax({
type: "post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchBeginTime,
supType: "customer"
}),
success: function (res) {
if (res) {
var moneyB = res.getAllMoney.toFixed(2) - 0;
var money = moneyA + moneyB;
var moneyBeginNeedGet = beginNeedGet - 0; //期初应收
var moneyBeginNeedPay = beginNeedPay - 0; //期初应付
money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2);
$(".first-total").text(money); //期初结存
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
});
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
})
//显示期末合计
var searchEndTime = $("#searchEndTime").val(); //结束时间
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchEndTime,
supType: "customer"
}),
success: function (res) {
if (res) {
var moneyA = res.getAllMoney.toFixed(2) - 0;
$.ajax({
type: "post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchEndTime,
supType: "customer"
}),
success: function (res) {
if (res) {
var moneyB = res.getAllMoney.toFixed(2) - 0;
var money = moneyA + moneyB;
var moneyBeginNeedGet = beginNeedGet - 0; //期初应收
var moneyBeginNeedPay = beginNeedPay - 0; //期初应付
money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2);
$(".last-total").text(money); //期末合计
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
});
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
})
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
} }
}, });
{ title: '类型',field: 'type',width:100}, }
{ title: '单位名称',field: 'supplierName',width:200}, }
{ title: '单据金额',field: 'discountLastMoney',width:80}, },
{ title: '实际支付',field: 'changeAmount',width:80}, //此处添加错误处理
{ title: '本期变化',field: 'allPrice',width:80}, error: function () {
{ title: '单据日期',field: 'operTime',width:140} $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
]], return;
onLoadError:function() }
{ });
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); }
return;
}
});
}
//初始化键盘enter事件 //报表打印
$(document).keydown(function(event) function print() {
{ $("#printBtn").off("click").on("click", function () {
//兼容 IE和firefox 事件 var path = "<%=path %>";
var e = window.event || event; CreateFormPage('打印报表', $('#tableData'), path);
var k = e.keyCode||e.which||e.charCode; });
//兼容 IE,firefox 兼容 }
var obj = e.srcElement ? e.srcElement : e.target; </script>
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 </body>
if(k == "13"&&(obj.id=="Type"||obj.id=="Name"))
{
$("#savePerson").click();
}
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchType"))
{
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//搜索处理
function search() {
showDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
$("#searchBtn").unbind().bind({
click:function()
{
search();
}
});
function showDetails(pageNo,pageSize)
{
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findStatementAccount.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
OrganId: $('#OrganId').combobox('getValue'),
supType: "客户"
}),
success: function (res) {
if(res){
$("#tableData").datagrid('loadData',res);
//如果选择了单位信息,就进行计算期初和期末
var supplierId = $('#OrganId').combobox('getValue');
if(supplierId) {
//先查找期初信息
var beginNeedGet = 0;
var beginNeedPay = 0;
$.ajax({
type:"post",
url: "<%=path %>/supplier/findById.action",
dataType: "json",
async: false,
data: ({
supplierID: supplierId
}),
success: function(res){
if(res && res.rows && res.rows[0]) {
if(res.rows[0].BeginNeedGet) {
beginNeedGet = res.rows[0].BeginNeedGet;
}
if(res.rows[0].BeginNeedPay) {
beginNeedPay = res.rows[0].BeginNeedPay;
}
//显示期初结存
var searchBeginTime = $("#searchBeginTime").val(); //开始时间
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchBeginTime,
supType: "customer"
}),
success: function(res){
if(res) {
var moneyA = res.getAllMoney.toFixed(2)-0;
$.ajax({
type:"post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchBeginTime,
supType: "customer"
}),
success: function(res){
if(res) {
var moneyB = res.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = beginNeedGet-0; //期初应收
var moneyBeginNeedPay = beginNeedPay-0; //期初应付
money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2);
$(".first-total").text(money); //期初结存
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
})
//显示期末合计
var searchEndTime = $("#searchEndTime").val(); //结束时间
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchEndTime,
supType: "customer"
}),
success: function(res){
if(res) {
var moneyA = res.getAllMoney.toFixed(2)-0;
$.ajax({
type:"post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchEndTime,
supType: "customer"
}),
success: function(res){
if(res) {
var moneyB = res.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = beginNeedGet-0; //期初应收
var moneyBeginNeedPay = beginNeedPay-0; //期初应付
money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2);
$(".last-total").text(money); //期末合计
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
})
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
}
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,262 +1,264 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>礼品卡统计</title> <title>礼品卡统计</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>礼品卡:</td> <tr>
<td> <td>礼品卡:</td>
<input id="searchGiftId" name="searchGiftId" style="width:110px;" /> <td>
</td> <input id="searchGiftId" name="searchGiftId" style="width:110px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</tr> </td>
</table> </tr>
</div> </table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡统计列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡统计列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var mPropertyList = ""; //商品属性列表 var mPropertyList = ""; //商品属性列表
//初始化界面 //初始化界面
$(function(){ $(function () {
var userBusinessList=null; var userBusinessList = null;
var userdepot=null; var userdepot = null;
initGift(); initGift();
initMProperty(); //初始化商品属性 initMProperty(); //初始化商品属性
initTableData(); initTableData();
ininPager(); ininPager();
}); });
//初始化-礼品卡 //初始化-礼品卡
function initGift(){ function initGift() {
$('#searchGiftId').combobox({ $('#searchGiftId').combobox({
url: "<%=path %>/depot/findGiftByType.action?type=1", url: "<%=path %>/depot/findGiftByType.action?type=1",
valueField:'id', valueField: 'id',
textField:'name' textField: 'name'
}); });
//当会员卡号长度超过10位后自动点击下拉框用于兼容刷卡器 //当会员卡号长度超过10位后自动点击下拉框用于兼容刷卡器
$("#searchGiftId").next().find("input").off("keyup").on("keyup",function(){ $("#searchGiftId").next().find("input").off("keyup").on("keyup", function () {
var self = this; var self = this;
if($(this).val().length === 10){ if ($(this).val().length === 10) {
setTimeout(function(){ setTimeout(function () {
$(".combo-panel .combobox-item-selected").click(); $(".combo-panel .combobox-item-selected").click();
search(); search();
},500); }, 500);
} }
}); });
} }
//初始化商品属性 //初始化商品属性
function initMProperty(){ function initMProperty() {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "<%=path %>/materialProperty/findBy.action", url: "<%=path %>/materialProperty/findBy.action",
dataType: "json", dataType: "json",
success: function (res) { success: function (res) {
if (res && res.rows) { if (res && res.rows) {
var thisRows = res.rows; var thisRows = res.rows;
for(var i=0; i < thisRows.length; i++) { for (var i = 0; i < thisRows.length; i++) {
if(thisRows[i].enabled){ if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativeName +","; mPropertyList += thisRows[i].nativeName + ",";
} }
} }
if(mPropertyList){ if (mPropertyList) {
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1); mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
} }
} }
}, },
//此处添加错误处理 //此处添加错误处理
error:function() { error: function () {
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error'); $.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData(){ function initTableData() {
$('#tableData').datagrid({ $('#tableData').datagrid({
height:heightInfo, height: heightInfo,
nowrap: false, nowrap: false,
rownumbers: true, rownumbers: true,
//动画效果 //动画效果
animate:false, animate: false,
//选中单行 //选中单行
singleSelect : true, singleSelect: true,
pagination: true, pagination: true,
//交替出现背景 //交替出现背景
striped : true, striped: true,
pageSize: 10, pageSize: 10,
pageList: [10,50,100], pageList: [10, 50, 100],
columns:[[ columns: [[
{ title: '名称',field: 'MaterialName',width:60}, {title: '名称', field: 'MaterialName', width: 60},
{ title: '型号',field: 'MaterialModel',width:80}, {title: '型号', field: 'MaterialModel', width: 80},
{ title: '扩展信息',field: 'MaterialOther',width:150}, {title: '扩展信息', field: 'MaterialOther', width: 150},
{ title: '单位',field: 'MaterialUnit',width:80}, {title: '单位', field: 'MaterialUnit', width: 80},
{ title: '结存数量',field: 'thisSum',width:80} {title: '结存数量', field: 'thisSum', width: 80}
]], ]],
onLoadError:function() { onLoadError: function () {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) { $(document).keydown(function (event) {
//兼容 IE和firefox 事件 //兼容 IE和firefox 事件
var e = window.event || event; var e = window.event || event;
var k = e.keyCode||e.which||e.charCode; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) { if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click(); $("#savePerson").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchType")) { if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//分页信息处理
function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showPersonDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//搜索处理 //分页信息处理
function search() { function ininPager() {
showPersonDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', { opts.pageNumber = pageNum;
pageNumber:1, opts.pageSize = pageSize;
pageSize:initPageSize pager.pagination('refresh',
}); {
} pageNumber: pageNum,
$("#searchBtn").unbind().bind({ pageSize: pageSize
click:function() { });
var giftId = $('#searchGiftId').combobox('getValue'); //礼品卡Id showPersonDetails(pageNum, pageSize);
if(giftId) { }
search(); });
} }
else { catch (e) {
$.messager.alert('查询提示','请选择一张礼品卡!','warning'); $.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
} }
} }
});
function showPersonDetails(pageNo,pageSize) { //搜索处理
var searchGiftId = $("#searchGiftId").combobox("getValue"); function search() {
$.ajax({ showPersonDetails(1, initPageSize);
type:"post", var opts = $("#tableData").datagrid('options');
url: "<%=path %>/depotHead/findGiftReport.action", var pager = $("#tableData").datagrid('getPager');
dataType: "json", opts.pageNumber = 1;
success: function (res) { opts.pageSize = initPageSize;
var HeadIds = res.HeadIds; pager.pagination('refresh', {
if(HeadIds) { pageNumber: 1,
//获取排序后的产品ID pageSize: initPageSize
$.ajax({ });
type:"post", }
url: "<%=path %>/material/findByOrder.action",
dataType: "json", $("#searchBtn").unbind().bind({
success: function (resNew) { click: function () {
var MIds = resNew.mIds; var giftId = $('#searchGiftId').combobox('getValue'); //礼品卡Id
if(MIds) { if (giftId) {
$.ajax({ search();
type:"post", }
url: "<%=path %>/depotItem/findGiftByAll.action", else {
dataType: "json", $.messager.alert('查询提示', '请选择一张礼品卡!', 'warning');
data: ({ }
pageNo:pageNo, }
pageSize:pageSize, });
ProjectId: searchGiftId,
HeadIds: HeadIds, function showPersonDetails(pageNo, pageSize) {
MaterialIds: MIds, var searchGiftId = $("#searchGiftId").combobox("getValue");
mpList: mPropertyList $.ajax({
}), type: "post",
success: function (data) { url: "<%=path %>/depotHead/findGiftReport.action",
$("#tableData").datagrid('loadData',data); dataType: "json",
}, success: function (res) {
//此处添加错误处理 var HeadIds = res.HeadIds;
error:function() { if (HeadIds) {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); //获取排序后的产品ID
return; $.ajax({
} type: "post",
}); url: "<%=path %>/material/findByOrder.action",
} dataType: "json",
else { success: function (resNew) {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); var MIds = resNew.mIds;
} if (MIds) {
}, $.ajax({
//此处添加错误处理 type: "post",
error:function() { url: "<%=path %>/depotItem/findGiftByAll.action",
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); dataType: "json",
return; data: ({
} pageNo: pageNo,
}); pageSize: pageSize,
} ProjectId: searchGiftId,
else { HeadIds: HeadIds,
$.messager.alert('查询提示','该礼品卡无数据!','warning'); MaterialIds: MIds,
} mpList: mPropertyList
}, }),
//此处添加错误处理 success: function (data) {
error:function() { $("#tableData").datagrid('loadData', data);
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); },
return; //此处添加错误处理
} error: function () {
}); $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
} return;
</script> }
</body> });
}
else {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '该礼品卡无数据!', 'warning');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
</script>
</body>
</html> </html>

View File

@@ -1,346 +1,332 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>入库明细</title> <title>入库明细</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script> <script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var uid = ${sessionScope.user.id}; var uid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>供应商:</td> <tr>
<td> <td>供应商:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>仓库:</td> <td>&nbsp;</td>
<td> <td>仓库:</td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select> <td>
</td> <select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</tr> &nbsp;&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库明细列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库明细列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
var depotString = ""; //仓库列表 var depotString = ""; //仓库列表
var path = "<%=path %>"; var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口 var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); var userBusinessList = null;
var userBusinessList=null; var userdepot = null;
var userdepot=null; initSupplier(); //初始化供应商信息
initSupplier(); //初始化供应商信息 initSystemData_UB();
initSystemData_UB(); initSelectInfo_UB();
initSelectInfo_UB(); initSystemData_depot();
initSystemData_depot(); initSelectInfo_depot();
initSelectInfo_depot(); initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化供应商 //初始化供应商
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: supUrl, url: supUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/userBusiness/getBasicData.action", url: "<%=path %>/userBusiness/getBasicData.action",
data: ({ data: ({
KeyId: uid, KeyId: uid,
Type:"UserDepot" Type: "UserDepot"
}), }),
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ if (systemInfo) {
if(systemInfo) userBusinessList = systemInfo.showModel.map.userBusinessList;
{ var msgTip = systemInfo.showModel.msgTip;
userBusinessList = systemInfo.showModel.map.userBusinessList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); }
return; else {
} userBusinessList = null;
} }
else }
{ });
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo_UB(){
if(userBusinessList !=null) //初始化页面选项卡
{ function initSelectInfo_UB() {
if(userBusinessList.length>0)
{ if (userBusinessList != null) {
//用户对应的仓库列表 [1][2][3]... if (userBusinessList.length > 0) {
userdepot =userBusinessList[0].value; //用户对应的仓库列表 [1][2][3]...
} userdepot = userBusinessList[0].value;
} }
} }
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_depot(){ function initSystemData_depot() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/depot/getBasicData.action", url: "<%=path %>/depot/getBasicData.action",
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ depotList = systemInfo.showModel.map.depotList;
depotList = systemInfo.showModel.map.depotList; var msgTip = systemInfo.showModel.msgTip;
var msgTip = systemInfo.showModel.msgTip; if (msgTip == "exceptoin") {
if(msgTip == "exceptoin") $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
{ return;
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; }
} });
} }
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo_depot() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
if(userdepot!=null) if (depotList != null) {
{ options = "";
if(userdepot.indexOf("["+depot.id+"]")!=-1) for (var i = 0; i < depotList.length; i++) {
{ var depot = depotList[i];
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
depotString = depotString + depot.id + ",";
}
}
}
depotString = depotString.substring(0, depotString.length-1);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化表格数据 if (userdepot != null) {
function initTableData() if (userdepot.indexOf("[" + depot.id + "]") != -1) {
{ options += '<option value="' + depot.id + '">' + depot.name + '</option>';
$('#tableData').datagrid({ depotString = depotString + depot.id + ",";
height:heightInfo, }
nowrap: false, }
rownumbers: true, }
//动画效果 depotString = depotString.substring(0, depotString.length - 1);
animate:false, $("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
//选中单行 }
singleSelect : true, }
pagination: true,
//交替出现背景
striped : true,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '单据编号',field: 'number',width:140,
formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>";
}
},
{ title: '商品名称',field: 'materialName',width:120},
{ title: '商品型号',field: 'materialModel',width:100},
{ title: '单价',field: 'unitPrice',width:60},
{ title: '入库数量',field: 'operNumber',width:60},
{ title: '金额',field: 'allPrice',width:60},
{ title: '供应商',field: 'supplierName',width:200},
{ title: '仓库',field: 'depotName',width:120},
{ title: '入库日期',field: 'operTime',width:80},
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 height: heightInfo,
var e = window.event || event; nowrap: false,
var k = e.keyCode||e.which||e.charCode; rownumbers: true,
//兼容 IE,firefox 兼容 //动画效果
var obj = e.srcElement ? e.srcElement : e.target; animate: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //选中单行
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) singleSelect: true,
{ pagination: true,
$("#savePerson").click(); //交替出现背景
} striped: true,
//搜索按钮添加快捷键 pageSize: 10,
if(k == "13"&&(obj.id=="searchType")) pageList: [10, 50, 100],
{ columns: [[
$("#searchBtn").click(); {
} title: '单据编号', field: 'number', width: 140,
}); formatter: function (value, row) {
//分页信息处理 return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
function ininPager() + row.number + "</a>";
{ }
try },
{ {title: '商品名称', field: 'materialName', width: 120},
var opts = $("#tableData").datagrid('options'); {title: '商品型号', field: 'materialModel', width: 100},
var pager = $("#tableData").datagrid('getPager'); {title: '单价', field: 'unitPrice', width: 60},
pager.pagination({ {title: '入库数量', field: 'operNumber', width: 60},
onSelectPage:function(pageNum, pageSize) {title: '金额', field: 'allPrice', width: 60},
{ {title: '供应商', field: 'supplierName', width: 200},
opts.pageNumber = pageNum; {title: '仓库', field: 'depotName', width: 120},
opts.pageSize = pageSize; {title: '入库日期', field: 'operTime', width: 80},
pager.pagination('refresh', ]],
{ onLoadError: function () {
pageNumber:pageNum, $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
pageSize:pageSize return;
}); }
showDetails(pageNum,pageSize); });
} }
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加 //初始化键盘enter事件
var url; $(document).keydown(function (event) {
var personID = 0; //兼容 IE和firefox 事件
//保存编辑前的名称 var e = window.event || event;
var orgPerson = ""; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//搜索处理 //分页信息处理
function search() { function ininPager() {
showDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() showDetails(pageNum, pageSize);
{ }
search(); });
} }
}); catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) //增加
{ var url;
$.ajax({ var personID = 0;
type: "post", //保存编辑前的名称
url: "<%=path %>/depotHead/findInDetail.action", var orgPerson = "";
dataType: "json",
data: ({ //搜索处理
pageNo:pageNo, function search() {
pageSize:pageSize, showDetails(1, initPageSize);
OrganId: $('#OrganId').combobox('getValue'), var opts = $("#tableData").datagrid('options');
ProjectId: $.trim($("#searchProjectId").val()), var pager = $("#tableData").datagrid('getPager');
DepotIds: depotString, opts.pageNumber = 1;
BeginTime: $("#searchBeginTime").val(), opts.pageSize = initPageSize;
EndTime: $("#searchEndTime").val(), pager.pagination('refresh',
Type: "入库" {
}), pageNumber: 1,
success: function (res) { pageSize: initPageSize
if(res){ });
$("#tableData").datagrid('loadData',res); }
}
}, $("#searchBtn").unbind().bind({
//此处添加错误处理 click: function () {
error:function() { search();
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); }
return; });
}
}); function showDetails(pageNo, pageSize) {
} $.ajax({
//报表打印 type: "post",
function print() { url: "<%=path %>/depotHead/findInDetail.action",
$("#printBtn").off("click").on("click",function(){ dataType: "json",
var path = "<%=path %>"; data: ({
CreateFormPage('打印报表', $('#tableData'), path); pageNo: pageNo,
}); pageSize: pageSize,
} OrganId: $('#OrganId').combobox('getValue'),
</script> ProjectId: $.trim($("#searchProjectId").val()),
</body> DepotIds: depotString,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
Type: "入库"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,336 +1,321 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>入库汇总</title> <title>入库汇总</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>供应商:</td> <tr>
<td> <td>供应商:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>仓库:</td> <td>&nbsp;</td>
<td> <td>仓库:</td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select> <td>
</td> <select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</tr> &nbsp;&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库汇总列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库汇总列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
var depotString = ""; //仓库列表 var depotString = ""; //仓库列表
var path = "<%=path %>"; var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口 var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); var userBusinessList = null;
var userBusinessList=null; var userdepot = null;
var userdepot=null; initSupplier(); //初始化供应商信息
initSupplier(); //初始化供应商信息 initSystemData_UB();
initSystemData_UB(); initSelectInfo_UB();
initSelectInfo_UB(); initSystemData_depot();
initSystemData_depot(); initSelectInfo_depot();
initSelectInfo_depot(); initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化供应商 //初始化供应商
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: supUrl, url: supUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/userBusiness/getBasicData.action", url: "<%=path %>/userBusiness/getBasicData.action",
data: ({ data: ({
KeyId:kid, KeyId: kid,
Type:"UserDepot" Type: "UserDepot"
}), }),
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ if (systemInfo) {
if(systemInfo) userBusinessList = systemInfo.showModel.map.userBusinessList;
{ var msgTip = systemInfo.showModel.msgTip;
userBusinessList = systemInfo.showModel.map.userBusinessList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); }
return; else {
} userBusinessList = null;
} }
else }
{ });
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo_UB(){
if(userBusinessList !=null) //初始化页面选项卡
{ function initSelectInfo_UB() {
if(userBusinessList.length>0)
{ if (userBusinessList != null) {
//用户对应的仓库列表 [1][2][3]... if (userBusinessList.length > 0) {
userdepot =userBusinessList[0].value; //用户对应的仓库列表 [1][2][3]...
} userdepot = userBusinessList[0].value;
} }
} }
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_depot(){ function initSystemData_depot() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/depot/getBasicData.action", url: "<%=path %>/depot/getBasicData.action",
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ depotList = systemInfo.showModel.map.depotList;
depotList = systemInfo.showModel.map.depotList; var msgTip = systemInfo.showModel.msgTip;
var msgTip = systemInfo.showModel.msgTip; if (msgTip == "exceptoin") {
if(msgTip == "exceptoin") $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
{ return;
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; }
} });
} }
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo_depot() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
if(userdepot!=null) if (depotList != null) {
{ options = "";
if(userdepot.indexOf("["+depot.id+"]")!=-1) for (var i = 0; i < depotList.length; i++) {
{ var depot = depotList[i];
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
depotString = depotString + depot.id + ",";
}
}
}
depotString = depotString.substring(0, depotString.length-1);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化表格数据 if (userdepot != null) {
function initTableData() if (userdepot.indexOf("[" + depot.id + "]") != -1) {
{ options += '<option value="' + depot.id + '">' + depot.name + '</option>';
$('#tableData').datagrid({ depotString = depotString + depot.id + ",";
height:heightInfo, }
nowrap: false, }
rownumbers: true, }
//动画效果 depotString = depotString.substring(0, depotString.length - 1);
animate:false, $("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
//选中单行 }
singleSelect : true, }
pagination: true,
//交替出现背景
striped : true,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '商品名称',field: 'mName',width:150},
{ title: '商品型号',field: 'Model',width:150},
{ title: '商品类型',field: 'categoryName',width:120},
{ title: '入库数量',field: 'numSum',width:120},
{ title: '入库金额',field: 'priceSum',width:120}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 height: heightInfo,
var e = window.event || event; nowrap: false,
var k = e.keyCode||e.which||e.charCode; rownumbers: true,
//兼容 IE,firefox 兼容 //动画效果
var obj = e.srcElement ? e.srcElement : e.target; animate: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //选中单行
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) singleSelect: true,
{ pagination: true,
$("#savePerson").click(); //交替出现背景
} striped: true,
//搜索按钮添加快捷键 pageSize: 10,
if(k == "13"&&(obj.id=="searchType")) pageList: [10, 50, 100],
{ columns: [[
$("#searchBtn").click(); {title: '商品名称', field: 'mName', width: 150},
} {title: '商品型号', field: 'Model', width: 150},
}); {title: '商品类型', field: 'categoryName', width: 120},
//分页信息处理 {title: '入库数量', field: 'numSum', width: 120},
function ininPager() {title: '入库金额', field: 'priceSum', width: 120}
{ ]],
try onLoadError: function () {
{ $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
var opts = $("#tableData").datagrid('options'); return;
var pager = $("#tableData").datagrid('getPager'); }
pager.pagination({ });
onSelectPage:function(pageNum, pageSize) }
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加 //初始化键盘enter事件
var url; $(document).keydown(function (event) {
var personID = 0; //兼容 IE和firefox 事件
//保存编辑前的名称 var e = window.event || event;
var orgPerson = ""; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//搜索处理 //分页信息处理
function search() { function ininPager() {
showDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() showDetails(pageNum, pageSize);
{ }
search(); });
} }
}); catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) //增加
{ var url;
$.ajax({ var personID = 0;
type: "post", //保存编辑前的名称
url: "<%=path %>/depotHead/findInOutMaterialCount.action", var orgPerson = "";
dataType: "json",
data: ({ //搜索处理
pageNo:pageNo, function search() {
pageSize:pageSize, showDetails(1, initPageSize);
OrganId: $('#OrganId').combobox('getValue'), var opts = $("#tableData").datagrid('options');
ProjectId: $.trim($("#searchProjectId").val()), var pager = $("#tableData").datagrid('getPager');
DepotIds: depotString, opts.pageNumber = 1;
BeginTime: $("#searchBeginTime").val(), opts.pageSize = initPageSize;
EndTime: $("#searchEndTime").val(), pager.pagination('refresh',
Type: "入库" {
}), pageNumber: 1,
success: function (res) { pageSize: initPageSize
if(res){ });
$("#tableData").datagrid('loadData',res); }
}
}, $("#searchBtn").unbind().bind({
//此处添加错误处理 click: function () {
error:function() { search();
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); }
return; });
}
}); function showDetails(pageNo, pageSize) {
} $.ajax({
//报表打印 type: "post",
function print() { url: "<%=path %>/depotHead/findInOutMaterialCount.action",
$("#printBtn").off("click").on("click",function(){ dataType: "json",
var path = "<%=path %>"; data: ({
CreateFormPage('打印报表', $('#tableData'), path); pageNo: pageNo,
}); pageSize: pageSize,
} OrganId: $('#OrganId').combobox('getValue'),
</script> ProjectId: $.trim($("#searchProjectId").val()),
</body> DepotIds: depotString,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
Type: "入库"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,444 +1,422 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>库存状况</title> <title>库存状况</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var kid = ${sessionScope.user.id}; var kid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>仓库:</td> <tr>
<td> <td>仓库:</td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select> <td>
</td> <select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
<td>&nbsp;</td> </td>
<td>月份:</td> <td>&nbsp;</td>
<td> <td>月份:</td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/> <td>
</td> <input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
<td>&nbsp;</td> class="txt Wdate" style="width:180px;"/>
<td> </td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td>&nbsp;</td>
&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="exprotBtn">导出</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
&nbsp;&nbsp; &nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="exprotBtn">导出</a>
&nbsp;&nbsp;<span class="total-count"></span> &nbsp;&nbsp;
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</tr> &nbsp;&nbsp;<span class="total-count"></span>
</table> </td>
</div> </tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="库存状况列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="库存状况列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
var mPropertyList = ""; //商品属性列表 var mPropertyList = ""; //商品属性列表
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 $("#searchMonth").val(thisDate);
$("#searchMonth").val(thisDate); var userBusinessList = null;
var userBusinessList=null; var userdepot = null;
var userdepot=null; initSystemData_UB();
initSystemData_UB(); initSelectInfo_UB();
initSelectInfo_UB(); initSystemData_depot();
initSystemData_depot(); initSelectInfo_depot();
initSelectInfo_depot(); initMProperty(); //初始化商品属性
initMProperty(); //初始化商品属性 initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); exportExcel();
exportExcel(); print();
print(); });
});
//导出EXCEL //导出EXCEL
function exportExcel() { function exportExcel() {
$("#exprotBtn").off("click").on("click",function(){ $("#exprotBtn").off("click").on("click", function () {
if(!$("#searchPanel .total-count").text()) { if (!$("#searchPanel .total-count").text()) {
$.messager.alert('导出提示','请先选择月份再进行查询!','error'); $.messager.alert('导出提示', '请先选择月份再进行查询!', 'error');
} }
else { else {
showEachDetails(1,3000); showEachDetails(1, 3000);
//此处直接去做get请求用下面的查询每月统计的方法去获取list参数长度虽长但还是可以用get //此处直接去做get请求用下面的查询每月统计的方法去获取list参数长度虽长但还是可以用get
//window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs(); //window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs();
} }
}); });
} }
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/userBusiness/getBasicData.action", url: "<%=path %>/userBusiness/getBasicData.action",
data: ({ data: ({
KeyId:kid, KeyId: kid,
Type:"UserDepot" Type: "UserDepot"
}), }),
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ if (systemInfo) {
if(systemInfo) userBusinessList = systemInfo.showModel.map.userBusinessList;
{ var msgTip = systemInfo.showModel.msgTip;
userBusinessList = systemInfo.showModel.map.userBusinessList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); }
return; else {
} userBusinessList = null;
} }
else }
{ });
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo_UB(){
if(userBusinessList !=null) //初始化页面选项卡
{ function initSelectInfo_UB() {
if(userBusinessList.length>0)
{ if (userBusinessList != null) {
//用户对应的仓库列表 [1][2][3]... if (userBusinessList.length > 0) {
userdepot =userBusinessList[0].value; //用户对应的仓库列表 [1][2][3]...
} userdepot = userBusinessList[0].value;
} }
} }
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_depot(){ function initSystemData_depot() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/depot/getBasicData.action", url: "<%=path %>/depot/getBasicData.action",
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ depotList = systemInfo.showModel.map.depotList;
depotList = systemInfo.showModel.map.depotList; var msgTip = systemInfo.showModel.msgTip;
var msgTip = systemInfo.showModel.msgTip; if (msgTip == "exceptoin") {
if(msgTip == "exceptoin") $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
{ return;
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; }
} });
} }
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo_depot() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
if(userdepot!=null) if (depotList != null) {
{ options = "";
if(userdepot.indexOf("["+depot.id+"]")!=-1) for (var i = 0; i < depotList.length; i++) {
{ var depot = depotList[i];
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
}
}
}
$("#searchProjectId").empty().append(options);
}
}
//初始化商品属性 if (userdepot != null) {
function initMProperty(){ if (userdepot.indexOf("[" + depot.id + "]") != -1) {
$.ajax({ options += '<option value="' + depot.id + '">' + depot.name + '</option>';
type: "post", }
url: "<%=path %>/materialProperty/findBy.action", }
dataType: "json", }
success: function (res) { $("#searchProjectId").empty().append(options);
if (res && res.rows) { }
var thisRows = res.rows; }
for(var i=0; i < thisRows.length; i++) {
if(thisRows[i].enabled){
mPropertyList += thisRows[i].nativeName +",";
}
}
if(mPropertyList){
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1);
}
}
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error');
return;
}
});
}
//初始化表格数据 //初始化商品属性
function initTableData() function initMProperty() {
{ $.ajax({
$('#tableData').datagrid({ type: "post",
height:heightInfo, url: "<%=path %>/materialProperty/findBy.action",
nowrap: false, dataType: "json",
rownumbers: true, success: function (res) {
//动画效果 if (res && res.rows) {
animate:false, var thisRows = res.rows;
//选中单行 for (var i = 0; i < thisRows.length; i++) {
singleSelect : true, if (thisRows[i].enabled) {
pagination: true, mPropertyList += thisRows[i].nativeName + ",";
//交替出现背景 }
striped : true, }
//loadFilter: pagerFilter, if (mPropertyList) {
pageSize: 10, mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
pageList: [10,50,100], }
columns:[[ }
{ title: '名称',field: 'MaterialName',width:60}, },
{ title: '型号',field: 'MaterialModel',width:80}, //此处添加错误处理
{ title: '扩展信息',field: 'MaterialOther',width:150}, error: function () {
{ title: '单位',field: 'MaterialUnit',width:80}, $.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
{ title: '单价',field: 'UnitPrice',width:60,formatter: function(value,row,index){ return;
return value.toFixed(2); }
} });
}, }
{ title: '上月结存数量',field: 'prevSum',width:80},
{ title: '入库数量',field: 'InSum',width:60},
{ title: '出库数量',field: 'OutSum',width:60},
{ title: '本月结存数量',field: 'thisSum',width:80},
{ title: '结存金额',field: 'thisAllPrice',width:60,
formatter: function(value,row,index){
return value.toFixed(2);
}
}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 height: heightInfo,
var e = window.event || event; nowrap: false,
var k = e.keyCode||e.which||e.charCode; rownumbers: true,
//兼容 IE,firefox 兼容 //动画效果
var obj = e.srcElement ? e.srcElement : e.target; animate: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //选中单行
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) singleSelect: true,
{ pagination: true,
$("#savePerson").click(); //交替出现背景
} striped: true,
//搜索按钮添加快捷键 //loadFilter: pagerFilter,
if(k == "13"&&(obj.id=="searchType")) pageSize: 10,
{ pageList: [10, 50, 100],
$("#searchBtn").click(); columns: [[
} {title: '名称', field: 'MaterialName', width: 60},
}); {title: '型号', field: 'MaterialModel', width: 80},
//分页信息处理 {title: '扩展信息', field: 'MaterialOther', width: 150},
function ininPager() {title: '单位', field: 'MaterialUnit', width: 80},
{ {
try title: '单价', field: 'UnitPrice', width: 60, formatter: function (value, row, index) {
{ return value.toFixed(2);
var opts = $("#tableData").datagrid('options'); }
var pager = $("#tableData").datagrid('getPager'); },
pager.pagination({ {title: '上月结存数量', field: 'prevSum', width: 80},
onSelectPage:function(pageNum, pageSize) {title: '入库数量', field: 'InSum', width: 60},
{ {title: '出库数量', field: 'OutSum', width: 60},
opts.pageNumber = pageNum; {title: '本月结存数量', field: 'thisSum', width: 80},
opts.pageSize = pageSize; {
pager.pagination('refresh', title: '结存金额', field: 'thisAllPrice', width: 60,
{ formatter: function (value, row, index) {
pageNumber:pageNum, return value.toFixed(2);
pageSize:pageSize }
}); }
showEachDetails(pageNum,pageSize); ]],
} onLoadError: function () {
}); $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
} return;
catch (e) }
{ });
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); }
}
}
//增加 //初始化键盘enter事件
var url; $(document).keydown(function (event) {
var personID = 0; //兼容 IE和firefox 事件
//保存编辑前的名称 var e = window.event || event;
var orgPerson = ""; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//搜索处理 //分页信息处理
function search() { function ininPager() {
showEachDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() showEachDetails(pageNum, pageSize);
{ }
search(); });
} }
}); catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showEachDetails(pageNo,pageSize) //增加
{ var url;
$.ajax({ var personID = 0;
type:"post", //保存编辑前的名称
url: "<%=path %>/depotHead/findByMonth.action", var orgPerson = "";
dataType: "json",
data: ({
MonthTime:$("#searchMonth").val()
}),
success: function (res)
{
var HeadIds = res.HeadIds;
if(HeadIds) {
//获取排序后的产品ID
$.ajax({
type:"post",
url: "<%=path %>/material/findByOrder.action",
dataType: "json",
success: function (resNew)
{
var MIds = resNew.mIds;
if(MIds) {
if(pageSize === 3000) {
window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs() + "&pageNo=" + pageNo + "&pageSize=" + pageSize + "&ProjectId="+ $.trim($("#searchProjectId").val()) +"&MonthTime=" + $("#searchMonth").val() + "&HeadIds=" + HeadIds + "&MaterialIds=" + MIds;
}
else {
$.ajax({
type:"post",
url: "<%=path %>/depotItem/findByAll.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
ProjectId: $.trim($("#searchProjectId").val()),
MonthTime:$("#searchMonth").val(),
HeadIds:HeadIds,
MaterialIds:MIds,
mpList: mPropertyList
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
}, //搜索处理
//此处添加错误处理 function search() {
error:function() showEachDetails(1, initPageSize);
{ var opts = $("#tableData").datagrid('options');
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); var pager = $("#tableData").datagrid('getPager');
return; opts.pageNumber = 1;
} opts.pageSize = initPageSize;
}); pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
//总金额 $("#searchBtn").unbind().bind({
$.ajax({ click: function () {
type:"post", search();
url: "<%=path %>/depotItem/totalCountMoney.action", }
dataType: "json", });
data: ({
ProjectId: $.trim($("#searchProjectId").val()), function showEachDetails(pageNo, pageSize) {
MonthTime:$("#searchMonth").val(), $.ajax({
HeadIds:HeadIds, type: "post",
MaterialIds:MIds url: "<%=path %>/depotHead/findByMonth.action",
}), dataType: "json",
success: function (data) data: ({
{ MonthTime: $("#searchMonth").val()
if(data && data.totalCount) { }),
var count = data.totalCount.toString(); success: function (res) {
if(count.lastIndexOf('.')>-1){ var HeadIds = res.HeadIds;
count = count.substring(0,count.lastIndexOf('.')+3); if (HeadIds) {
} //获取排序后的产品ID
$("#searchPanel .total-count").text("本月合计金额:" + count + "元");//本月合计金额 $.ajax({
} type: "post",
}, url: "<%=path %>/material/findByOrder.action",
//此处添加错误处理 dataType: "json",
error:function() success: function (resNew) {
{ var MIds = resNew.mIds;
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); if (MIds) {
return; if (pageSize === 3000) {
} window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs() + "&pageNo=" + pageNo + "&pageSize=" + pageSize + "&ProjectId=" + $.trim($("#searchProjectId").val()) + "&MonthTime=" + $("#searchMonth").val() + "&HeadIds=" + HeadIds + "&MaterialIds=" + MIds;
}); }
} else {
} $.ajax({
else { type: "post",
$.messager.alert('查询提示','本月无数据!','error'); url: "<%=path %>/depotItem/findByAll.action",
} dataType: "json",
}, data: ({
//此处添加错误处理 pageNo: pageNo,
error:function() pageSize: pageSize,
{ ProjectId: $.trim($("#searchProjectId").val()),
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); MonthTime: $("#searchMonth").val(),
return; HeadIds: HeadIds,
} MaterialIds: MIds,
}); mpList: mPropertyList
} }),
else { success: function (data) {
$.messager.alert('查询提示','本月无数据!','error'); $("#tableData").datagrid('loadData', data);
}
}, },
//此处添加错误处理 //此处添加错误处理
error:function() error: function () {
{ $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); return;
return; }
} });
});
} //总金额
//报表打印 $.ajax({
function print() { type: "post",
$("#printBtn").off("click").on("click",function(){ url: "<%=path %>/depotItem/totalCountMoney.action",
var path = "<%=path %>"; dataType: "json",
CreateFormPage('打印报表', $('#tableData'), path); data: ({
}); ProjectId: $.trim($("#searchProjectId").val()),
} MonthTime: $("#searchMonth").val(),
</script> HeadIds: HeadIds,
</body> MaterialIds: MIds
}),
success: function (data) {
if (data && data.totalCount) {
var count = data.totalCount.toString();
if (count.lastIndexOf('.') > -1) {
count = count.substring(0, count.lastIndexOf('.') + 3);
}
$("#searchPanel .total-count").text("本月合计金额:" + count + "元");//本月合计金额
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,346 +1,332 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>出库明细</title> <title>出库明细</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script> <script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var uid = ${sessionScope.user.id}; var uid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>客户:</td> <tr>
<td> <td>客户:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>仓库:</td> <td>&nbsp;</td>
<td> <td>仓库:</td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select> <td>
</td> <select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</tr> &nbsp;&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库明细列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库明细列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
var depotString = ""; //仓库列表 var depotString = ""; //仓库列表
var path = "<%=path %>"; var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口 var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); var userBusinessList = null;
var userBusinessList=null; var userdepot = null;
var userdepot=null; initSupplier(); //初始化客户信息
initSupplier(); //初始化客户信息 initSystemData_UB();
initSystemData_UB(); initSelectInfo_UB();
initSelectInfo_UB(); initSystemData_depot();
initSystemData_depot(); initSelectInfo_depot();
initSelectInfo_depot(); initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化客户 //初始化客户
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: cusUrl, url: cusUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/userBusiness/getBasicData.action", url: "<%=path %>/userBusiness/getBasicData.action",
data: ({ data: ({
KeyId: uid, KeyId: uid,
Type:"UserDepot" Type: "UserDepot"
}), }),
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ if (systemInfo) {
if(systemInfo) userBusinessList = systemInfo.showModel.map.userBusinessList;
{ var msgTip = systemInfo.showModel.msgTip;
userBusinessList = systemInfo.showModel.map.userBusinessList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); }
return; else {
} userBusinessList = null;
} }
else }
{ });
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo_UB(){
if(userBusinessList !=null) //初始化页面选项卡
{ function initSelectInfo_UB() {
if(userBusinessList.length>0)
{ if (userBusinessList != null) {
//用户对应的仓库列表 [1][2][3]... if (userBusinessList.length > 0) {
userdepot =userBusinessList[0].value; //用户对应的仓库列表 [1][2][3]...
} userdepot = userBusinessList[0].value;
} }
} }
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_depot(){ function initSystemData_depot() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/depot/getBasicData.action", url: "<%=path %>/depot/getBasicData.action",
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ depotList = systemInfo.showModel.map.depotList;
depotList = systemInfo.showModel.map.depotList; var msgTip = systemInfo.showModel.msgTip;
var msgTip = systemInfo.showModel.msgTip; if (msgTip == "exceptoin") {
if(msgTip == "exceptoin") $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
{ return;
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; }
} });
} }
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo_depot() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
if(userdepot!=null) if (depotList != null) {
{ options = "";
if(userdepot.indexOf("["+depot.id+"]")!=-1) for (var i = 0; i < depotList.length; i++) {
{ var depot = depotList[i];
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
depotString = depotString + depot.id + ",";
}
}
}
depotString = depotString.substring(0, depotString.length-1);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化表格数据 if (userdepot != null) {
function initTableData() if (userdepot.indexOf("[" + depot.id + "]") != -1) {
{ options += '<option value="' + depot.id + '">' + depot.name + '</option>';
$('#tableData').datagrid({ depotString = depotString + depot.id + ",";
height:heightInfo, }
nowrap: false, }
rownumbers: true, }
//动画效果 depotString = depotString.substring(0, depotString.length - 1);
animate:false, $("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
//选中单行 }
singleSelect : true, }
pagination: true,
//交替出现背景
striped : true,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '单据编号',field: 'number',width:140,
formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>";
}
},
{ title: '商品名称',field: 'materialName',width:120},
{ title: '商品型号',field: 'materialModel',width:100},
{ title: '单价',field: 'unitPrice',width:60},
{ title: '出库数量',field: 'operNumber',width:60},
{ title: '金额',field: 'allPrice',width:60},
{ title: '客户',field: 'supplierName',width:200},
{ title: '仓库',field: 'depotName',width:120},
{ title: '出库日期',field: 'operTime',width:80},
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 height: heightInfo,
var e = window.event || event; nowrap: false,
var k = e.keyCode||e.which||e.charCode; rownumbers: true,
//兼容 IE,firefox 兼容 //动画效果
var obj = e.srcElement ? e.srcElement : e.target; animate: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //选中单行
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) singleSelect: true,
{ pagination: true,
$("#savePerson").click(); //交替出现背景
} striped: true,
//搜索按钮添加快捷键 pageSize: 10,
if(k == "13"&&(obj.id=="searchType")) pageList: [10, 50, 100],
{ columns: [[
$("#searchBtn").click(); {
} title: '单据编号', field: 'number', width: 140,
}); formatter: function (value, row) {
//分页信息处理 return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
function ininPager() + row.number + "</a>";
{ }
try },
{ {title: '商品名称', field: 'materialName', width: 120},
var opts = $("#tableData").datagrid('options'); {title: '商品型号', field: 'materialModel', width: 100},
var pager = $("#tableData").datagrid('getPager'); {title: '单价', field: 'unitPrice', width: 60},
pager.pagination({ {title: '出库数量', field: 'operNumber', width: 60},
onSelectPage:function(pageNum, pageSize) {title: '金额', field: 'allPrice', width: 60},
{ {title: '客户', field: 'supplierName', width: 200},
opts.pageNumber = pageNum; {title: '仓库', field: 'depotName', width: 120},
opts.pageSize = pageSize; {title: '出库日期', field: 'operTime', width: 80},
pager.pagination('refresh', ]],
{ onLoadError: function () {
pageNumber:pageNum, $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
pageSize:pageSize return;
}); }
showDetails(pageNum,pageSize); });
} }
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加 //初始化键盘enter事件
var url; $(document).keydown(function (event) {
var personID = 0; //兼容 IE和firefox 事件
//保存编辑前的名称 var e = window.event || event;
var orgPerson = ""; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//搜索处理 //分页信息处理
function search() { function ininPager() {
showDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() showDetails(pageNum, pageSize);
{ }
search(); });
} }
}); catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) //增加
{ var url;
$.ajax({ var personID = 0;
type: "post", //保存编辑前的名称
url: "<%=path %>/depotHead/findInDetail.action", var orgPerson = "";
dataType: "json",
data: ({ //搜索处理
pageNo:pageNo, function search() {
pageSize:pageSize, showDetails(1, initPageSize);
OrganId: $('#OrganId').combobox('getValue'), var opts = $("#tableData").datagrid('options');
ProjectId: $.trim($("#searchProjectId").val()), var pager = $("#tableData").datagrid('getPager');
DepotIds: depotString, opts.pageNumber = 1;
BeginTime: $("#searchBeginTime").val(), opts.pageSize = initPageSize;
EndTime: $("#searchEndTime").val(), pager.pagination('refresh',
Type: "出库" {
}), pageNumber: 1,
success: function (res) { pageSize: initPageSize
if(res){ });
$("#tableData").datagrid('loadData',res); }
}
}, $("#searchBtn").unbind().bind({
//此处添加错误处理 click: function () {
error:function() { search();
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); }
return; });
}
}); function showDetails(pageNo, pageSize) {
} $.ajax({
//报表打印 type: "post",
function print() { url: "<%=path %>/depotHead/findInDetail.action",
$("#printBtn").off("click").on("click",function(){ dataType: "json",
var path = "<%=path %>"; data: ({
CreateFormPage('打印报表', $('#tableData'), path); pageNo: pageNo,
}); pageSize: pageSize,
} OrganId: $('#OrganId').combobox('getValue'),
</script> ProjectId: $.trim($("#searchProjectId").val()),
</body> DepotIds: depotString,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
Type: "出库"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,336 +1,321 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>出库汇总</title> <title>出库汇总</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var uid = ${sessionScope.user.id}; var uid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>客户:</td> <tr>
<td> <td>客户:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>仓库:</td> <td>&nbsp;</td>
<td> <td>仓库:</td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select> <td>
</td> <select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</tr> &nbsp;&nbsp;
</table> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库汇总列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库汇总列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var depotList = null; var depotList = null;
var depotID = null; var depotID = null;
var depotString = ""; //仓库列表 var depotString = ""; //仓库列表
var path = "<%=path %>"; var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口 var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); var userBusinessList = null;
var userBusinessList=null; var userdepot = null;
var userdepot=null; initSupplier(); //初始化客户信息
initSupplier(); //初始化客户信息 initSystemData_UB();
initSystemData_UB(); initSelectInfo_UB();
initSelectInfo_UB(); initSystemData_depot();
initSystemData_depot(); initSelectInfo_depot();
initSelectInfo_depot(); initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化客户 //初始化客户
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: cusUrl, url: cusUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_UB(){ function initSystemData_UB() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/userBusiness/getBasicData.action", url: "<%=path %>/userBusiness/getBasicData.action",
data: ({ data: ({
KeyId:uid, KeyId: uid,
Type:"UserDepot" Type: "UserDepot"
}), }),
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ if (systemInfo) {
if(systemInfo) userBusinessList = systemInfo.showModel.map.userBusinessList;
{ var msgTip = systemInfo.showModel.msgTip;
userBusinessList = systemInfo.showModel.map.userBusinessList; if (msgTip == "exceptoin") {
var msgTip = systemInfo.showModel.msgTip; $.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
if(msgTip == "exceptoin") return;
{ }
$.messager.alert('提示','查找UserBusiness异常,请与管理员联系!','error'); }
return; else {
} userBusinessList = null;
} }
else }
{ });
userBusinessList=null;
}
}
});
} }
//初始化页面选项卡
function initSelectInfo_UB(){
if(userBusinessList !=null) //初始化页面选项卡
{ function initSelectInfo_UB() {
if(userBusinessList.length>0)
{ if (userBusinessList != null) {
//用户对应的仓库列表 [1][2][3]... if (userBusinessList.length > 0) {
userdepot =userBusinessList[0].value; //用户对应的仓库列表 [1][2][3]...
} userdepot = userBusinessList[0].value;
} }
} }
}
//初始化系统基础信息 //初始化系统基础信息
function initSystemData_depot(){ function initSystemData_depot() {
$.ajax({ $.ajax({
type:"post", type: "post",
url: "<%=path %>/depot/getBasicData.action", url: "<%=path %>/depot/getBasicData.action",
//设置为同步 //设置为同步
async:false, async: false,
dataType: "json", dataType: "json",
success: function (systemInfo) success: function (systemInfo) {
{ depotList = systemInfo.showModel.map.depotList;
depotList = systemInfo.showModel.map.depotList; var msgTip = systemInfo.showModel.msgTip;
var msgTip = systemInfo.showModel.msgTip; if (msgTip == "exceptoin") {
if(msgTip == "exceptoin") $.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
{ return;
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error'); }
return; }
} });
} }
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
if(depotList !=null) //初始化页面选项卡
{ function initSelectInfo_depot() {
options = ""; var options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
if(userdepot!=null) if (depotList != null) {
{ options = "";
if(userdepot.indexOf("["+depot.id+"]")!=-1) for (var i = 0; i < depotList.length; i++) {
{ var depot = depotList[i];
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
depotString = depotString + depot.id + ",";
}
}
}
depotString = depotString.substring(0, depotString.length-1);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化表格数据 if (userdepot != null) {
function initTableData() if (userdepot.indexOf("[" + depot.id + "]") != -1) {
{ options += '<option value="' + depot.id + '">' + depot.name + '</option>';
$('#tableData').datagrid({ depotString = depotString + depot.id + ",";
height:heightInfo, }
nowrap: false, }
rownumbers: true, }
//动画效果 depotString = depotString.substring(0, depotString.length - 1);
animate:false, $("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
//选中单行 }
singleSelect : true, }
pagination: true,
//交替出现背景
striped : true,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '商品名称',field: 'mName',width:150},
{ title: '商品型号',field: 'Model',width:150},
{ title: '商品类型',field: 'categoryName',width:120},
{ title: '出库数量',field: 'numSum',width:120},
{ title: '出库金额',field: 'priceSum',width:120}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
//初始化键盘enter事件 //初始化表格数据
$(document).keydown(function(event) function initTableData() {
{ $('#tableData').datagrid({
//兼容 IE和firefox 事件 height: heightInfo,
var e = window.event || event; nowrap: false,
var k = e.keyCode||e.which||e.charCode; rownumbers: true,
//兼容 IE,firefox 兼容 //动画效果
var obj = e.srcElement ? e.srcElement : e.target; animate: false,
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //选中单行
if(k == "13"&&(obj.id=="Type"||obj.id=="Name")) singleSelect: true,
{ pagination: true,
$("#savePerson").click(); //交替出现背景
} striped: true,
//搜索按钮添加快捷键 pageSize: 10,
if(k == "13"&&(obj.id=="searchType")) pageList: [10, 50, 100],
{ columns: [[
$("#searchBtn").click(); {title: '商品名称', field: 'mName', width: 150},
} {title: '商品型号', field: 'Model', width: 150},
}); {title: '商品类型', field: 'categoryName', width: 120},
//分页信息处理 {title: '出库数量', field: 'numSum', width: 120},
function ininPager() {title: '出库金额', field: 'priceSum', width: 120}
{ ]],
try onLoadError: function () {
{ $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
var opts = $("#tableData").datagrid('options'); return;
var pager = $("#tableData").datagrid('getPager'); }
pager.pagination({ });
onSelectPage:function(pageNum, pageSize) }
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加 //初始化键盘enter事件
var url; $(document).keydown(function (event) {
var personID = 0; //兼容 IE和firefox 事件
//保存编辑前的名称 var e = window.event || event;
var orgPerson = ""; var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//搜索处理 //分页信息处理
function search() { function ininPager() {
showDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() showDetails(pageNum, pageSize);
{ }
search(); });
} }
}); catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) //增加
{ var url;
$.ajax({ var personID = 0;
type: "post", //保存编辑前的名称
url: "<%=path %>/depotHead/findInOutMaterialCount.action", var orgPerson = "";
dataType: "json",
data: ({ //搜索处理
pageNo:pageNo, function search() {
pageSize:pageSize, showDetails(1, initPageSize);
OrganId: $('#OrganId').combobox('getValue'), var opts = $("#tableData").datagrid('options');
ProjectId: $.trim($("#searchProjectId").val()), var pager = $("#tableData").datagrid('getPager');
DepotIds: depotString, opts.pageNumber = 1;
BeginTime: $("#searchBeginTime").val(), opts.pageSize = initPageSize;
EndTime: $("#searchEndTime").val(), pager.pagination('refresh',
Type: "出库" {
}), pageNumber: 1,
success: function (res) { pageSize: initPageSize
if(res){ });
$("#tableData").datagrid('loadData',res); }
}
}, $("#searchBtn").unbind().bind({
//此处添加错误处理 click: function () {
error:function() { search();
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); }
return; });
}
}); function showDetails(pageNo, pageSize) {
} $.ajax({
//报表打印 type: "post",
function print() { url: "<%=path %>/depotHead/findInOutMaterialCount.action",
$("#printBtn").off("click").on("click",function(){ dataType: "json",
var path = "<%=path %>"; data: ({
CreateFormPage('打印报表', $('#tableData'), path); pageNo: pageNo,
}); pageSize: pageSize,
} OrganId: $('#OrganId').combobox('getValue'),
</script> ProjectId: $.trim($("#searchProjectId").val()),
</body> DepotIds: depotString,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
Type: "出库"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,269 +1,259 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>销售统计</title> <title>销售统计</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>月份:</td> <tr>
<td> <td>月份:</td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/> <td>
</td> <input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
<td>&nbsp;</td> class="txt Wdate" style="width:180px;"/>
<td>&nbsp;</td> </td>
<td> <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> <td>&nbsp;</td>
&nbsp;&nbsp; <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</td> &nbsp;&nbsp;
<td><span class="tip">注:此处包含零售+批发销售</span></td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
</tr> </td>
</table> <td><span class="tip">注:此处包含零售+批发销售</span></td>
</div> </tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="销售统计列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="销售统计列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var mPropertyList = ""; //商品属性列表 var mPropertyList = ""; //商品属性列表
//初始化界面 //初始化界面
$(function() $(function () {
{ $("#searchTable .tip").css("padding-left", "15px").css("color", "red");
$("#searchTable .tip").css("padding-left","15px").css("color","red"); var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 $("#searchMonth").val(thisDate);
$("#searchMonth").val(thisDate); initMProperty(); //初始化商品属性
initMProperty(); //初始化商品属性 initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化商品属性 //初始化商品属性
function initMProperty(){ function initMProperty() {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "<%=path %>/materialProperty/findBy.action", url: "<%=path %>/materialProperty/findBy.action",
dataType: "json", dataType: "json",
success: function (res) { success: function (res) {
if (res && res.rows) { if (res && res.rows) {
var thisRows = res.rows; var thisRows = res.rows;
for(var i=0; i < thisRows.length; i++) { for (var i = 0; i < thisRows.length; i++) {
if(thisRows[i].enabled){ if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativeName +","; mPropertyList += thisRows[i].nativeName + ",";
} }
} }
if(mPropertyList){ if (mPropertyList) {
mPropertyList = mPropertyList.substring(0,mPropertyList.length-1); mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
} }
} }
}, },
//此处添加错误处理 //此处添加错误处理
error:function() { error: function () {
$.messager.alert('查询提示','查询信息异常,请稍后再试!','error'); $.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
return; return;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: true,
rownumbers: true, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, //loadFilter: pagerFilter,
//loadFilter: pagerFilter, pageSize: 10,
pageSize: 10, pageList: [10, 50, 100],
pageList: [10,50,100], columns: [[
columns:[[ {title: '名称', field: 'MaterialName', width: 60},
{ title: '名称',field: 'MaterialName',width:60}, {title: '型号', field: 'MaterialModel', width: 80},
{ title: '型号',field: 'MaterialModel',width:80}, {title: '扩展信息', field: 'MaterialOther', width: 150},
{ title: '扩展信息',field: 'MaterialOther',width:150}, {title: '单位', field: 'MaterialUnit', width: 80},
{ title: '单位',field: 'MaterialUnit',width:80}, {title: '销售数量', field: 'OutSum', width: 60},
{ title: '销售数量',field: 'OutSum',width:60}, {title: '销售金额', field: 'OutSumPrice', width: 60},
{ title: '销售金额',field: 'OutSumPrice',width:60}, {title: '退货数量', field: 'InSum', width: 60},
{ title: '退货数量',field: 'InSum',width:60}, {title: '退货金额', field: 'InSumPrice', width: 60}
{ title: '退货金额',field: 'InSumPrice',width:60} ]],
]], onLoadError: function () {
onLoadError:function() $.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
{ return;
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); }
return; });
} }
});
}
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //搜索按钮添加快捷键
//搜索按钮添加快捷键 if (k == "13" && (obj.id == "searchMonth")) {
if(k == "13"&&(obj.id=="searchMonth")) $("#searchBtn").click();
{ }
$("#searchBtn").click(); });
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//搜索处理 //分页信息处理
function search() { function ininPager() {
showDetails(1,initPageSize); try {
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1; pager.pagination({
opts.pageSize = initPageSize; onSelectPage: function (pageNum, pageSize) {
pager.pagination('refresh', opts.pageNumber = pageNum;
{ opts.pageSize = pageSize;
pageNumber:1, pager.pagination('refresh',
pageSize:initPageSize {
}); pageNumber: pageNum,
} pageSize: pageSize
$("#searchBtn").unbind().bind({ });
click:function() { showDetails(pageNum, pageSize);
search(); }
} });
}); }
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function showDetails(pageNo,pageSize) //搜索处理
{ function search() {
$.ajax({ showDetails(1, initPageSize);
type:"post", var opts = $("#tableData").datagrid('options');
url: "<%=path %>/depotHead/findByMonth.action", var pager = $("#tableData").datagrid('getPager');
dataType: "json", opts.pageNumber = 1;
data: ({ opts.pageSize = initPageSize;
MonthTime:$("#searchMonth").val() pager.pagination('refresh',
}), {
success: function (res) pageNumber: 1,
{ pageSize: initPageSize
var HeadIds = res.HeadIds; });
if(HeadIds) { }
//获取排序后的产品ID
$.ajax({
type:"post",
url: "<%=path %>/material/findByOrder.action",
dataType: "json",
success: function (resNew)
{
var MIds = resNew.mIds;
if(MIds) {
$.ajax({
type:"post",
url: "<%=path %>/depotItem/saleOut.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
MonthTime:$("#searchMonth").val(),
HeadIds:HeadIds,
MaterialIds:MIds,
mpList: mPropertyList
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
}, $("#searchBtn").unbind().bind({
//此处添加错误处理 click: function () {
error:function() search();
{ }
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); });
return;
} function showDetails(pageNo, pageSize) {
}); $.ajax({
} type: "post",
else { url: "<%=path %>/depotHead/findByMonth.action",
$.messager.alert('查询提示','本月无数据!','error'); dataType: "json",
} data: ({
}, MonthTime: $("#searchMonth").val()
//此处添加错误处理 }),
error:function() success: function (res) {
{ var HeadIds = res.HeadIds;
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); if (HeadIds) {
return; //获取排序后的产品ID
} $.ajax({
}); type: "post",
} url: "<%=path %>/material/findByOrder.action",
else { dataType: "json",
$.messager.alert('查询提示','本月无数据!','error'); success: function (resNew) {
} var MIds = resNew.mIds;
}, if (MIds) {
//此处添加错误处理 $.ajax({
error:function() type: "post",
{ url: "<%=path %>/depotItem/saleOut.action",
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); dataType: "json",
return; data: ({
} pageNo: pageNo,
}); pageSize: pageSize,
} MonthTime: $("#searchMonth").val(),
//报表打印 HeadIds: HeadIds,
function print() { MaterialIds: MIds,
$("#printBtn").off("click").on("click",function(){ mpList: mPropertyList
var path = "<%=path %>"; }),
CreateFormPage('打印报表', $('#tableData'), path); success: function (data) {
}); $("#tableData").datagrid('loadData', data);
}
</script> },
</body> //此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '本月无数据!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,368 +1,364 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>供应商对账</title> <title>供应商对账</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/print/print.js"></script> <script type="text/javascript" src="<%=path %>/js/print/print.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css"/>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script> <script type="text/javascript" src="<%=path %>/js/common/outlook_in.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script> <script>
var uid = ${sessionScope.user.id}; var uid = ${sessionScope.user.id};
</script> </script>
</head> </head>
<body> <body>
<!-- 查询 --> <!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
<table id="searchTable"> closable="false">
<tr> <table id="searchTable">
<td>供应商:</td> <tr>
<td> <td>供应商:</td>
<input id="OrganId" name="OrganId" style="width:120px;" /> <td>
</td> <input id="OrganId" name="OrganId" style="width:120px;"/>
<td>&nbsp;</td> </td>
<td>单据日期:</td> <td>&nbsp;</td>
<td> <td>单据日期:</td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>
</td> <input type="text" name="searchBeginTime" id="searchBeginTime"
<td>-</td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<td> </td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/> <td>-</td>
</td> <td>
<td>&nbsp;</td> <input type="text" name="searchEndTime" id="searchEndTime"
<td> onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a> </td>
&nbsp;&nbsp; <td>&nbsp;</td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a> <td>
</td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
<td>&nbsp;</td> &nbsp;&nbsp;
<td> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
期初应付:<span class="first-total">0</span>&nbsp;&nbsp; </td>
期末应付:<span class="last-total">0</span> <td>&nbsp;</td>
</td> <td>
</tr> 期初应付:<span class="first-total">0</span>&nbsp;&nbsp;
</table> 期末应付:<span class="last-total">0</span>
</div> </td>
</tr>
</table>
</div>
<!-- 数据显示table --> <!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商对账列表" iconCls="icon-list" collapsible="true" closable="false"> <div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商对账列表" iconCls="icon-list"
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> collapsible="true" closable="false">
</div> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript"> <script type="text/javascript">
var path = "<%=path %>"; var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口 var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面 //初始化界面
$(function() $(function () {
{ var thisDate = getNowFormatMonth(); //当前月份
var thisDate = getNowFormatMonth(); //当前月份 var thisDateTime = getNowFormatDateTime(); //当前时间
var thisDateTime = getNowFormatDateTime(); //当前时间 $("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchBeginTime").val(thisDate + "-01 00:00:00"); $("#searchEndTime").val(thisDateTime);
$("#searchEndTime").val(thisDateTime); initSupplier(); //初始化供应商信息
initSupplier(); //初始化供应商信息 initTableData();
initTableData(); ininPager();
ininPager(); search();
search(); print();
print(); });
});
//初始化供应商 //初始化供应商
function initSupplier(){ function initSupplier() {
$('#OrganId').combobox({ $('#OrganId').combobox({
url: supUrl, url: supUrl,
valueField:'id', valueField: 'id',
textField:'supplier', textField: 'supplier',
filter: function(q, row){ filter: function (q, row) {
var opts = $(this).combobox('options'); var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1; return row[opts.textField].indexOf(q) > -1;
} }
}); });
} }
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{ $('#tableData').datagrid({
$('#tableData').datagrid({ height: heightInfo,
height:heightInfo, nowrap: false,
nowrap: false, rownumbers: true,
rownumbers: true, //动画效果
//动画效果 animate: false,
animate:false, //选中单行
//选中单行 singleSelect: true,
singleSelect : true, pagination: true,
pagination: true, //交替出现背景
//交替出现背景 striped: true,
striped : true, pageSize: 10,
pageSize: 10, pageList: [10, 50, 100],
pageList: [10,50,100], columns: [[
columns:[[ {
{ title: '单据编号',field: 'number',width:140, title: '单据编号', field: 'number', width: 140,
formatter: function (value, row) { formatter: function (value, row) {
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">" return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.jsp?n=" + row.number + "&type=" + row.type + "','')\">"
+ row.number + "</a>"; + row.number + "</a>";
}
},
{title: '类型', field: 'type', width: 100},
{title: '单位名称', field: 'supplierName', width: 200},
{title: '单据金额', field: 'discountLastMoney', width: 80},
{title: '实际支付', field: 'changeAmount', width: 80},
{title: '本期变化', field: 'allPrice', width: 80},
{title: '单据日期', field: 'operTime', width: 140}
]],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
}
});
}
//初始化键盘enter事件
$(document).keydown(function (event) {
//兼容 IE和firefox 事件
var e = window.event || event;
var k = e.keyCode || e.which || e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
$("#savePerson").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchType")) {
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager() {
try {
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber: pageNum,
pageSize: pageSize
});
showDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//搜索处理
function search() {
showDetails(1, initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber: 1,
pageSize: initPageSize
});
}
$("#searchBtn").unbind().bind({
click: function () {
search();
}
});
function showDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findStatementAccount.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
OrganId: $('#OrganId').combobox('getValue'),
supType: "供应商"
}),
success: function (res) {
if (res) {
$("#tableData").datagrid('loadData', res);
//如果选择了单位信息,就进行计算期初和期末
var supplierId = $('#OrganId').combobox('getValue');
if (supplierId) {
//先查找期初信息
var beginNeedGet = 0;
var beginNeedPay = 0;
$.ajax({
type: "post",
url: "<%=path %>/supplier/findById.action",
dataType: "json",
async: false,
data: ({
supplierID: supplierId
}),
success: function (res) {
if (res && res.rows && res.rows[0]) {
if (res.rows[0].BeginNeedGet) {
beginNeedGet = res.rows[0].BeginNeedGet;
}
if (res.rows[0].BeginNeedPay) {
beginNeedPay = res.rows[0].BeginNeedPay;
}
//显示期初结存
var searchBeginTime = $("#searchBeginTime").val(); //开始时间
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchBeginTime,
supType: "vendor"
}),
success: function (res) {
if (res) {
var moneyA = res.getAllMoney.toFixed(2) - 0;
$.ajax({
type: "post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchBeginTime,
supType: "vendor"
}),
success: function (res) {
if (res) {
var moneyB = res.getAllMoney.toFixed(2) - 0;
var money = moneyA + moneyB;
var moneyBeginNeedGet = beginNeedGet - 0; //期初应收
var moneyBeginNeedPay = beginNeedPay - 0; //期初应付
money = (money + moneyBeginNeedPay - moneyBeginNeedGet).toFixed(2);
$(".first-total").text(money); //期初结存
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
});
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
})
//显示期末合计
var searchEndTime = $("#searchEndTime").val(); //结束时间
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchEndTime,
supType: "vendor"
}),
success: function (res) {
if (res) {
var moneyA = res.getAllMoney.toFixed(2) - 0;
$.ajax({
type: "post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime: searchEndTime,
supType: "vendor"
}),
success: function (res) {
if (res) {
var moneyB = res.getAllMoney.toFixed(2) - 0;
var money = moneyA + moneyB;
var moneyBeginNeedGet = beginNeedGet - 0; //期初应收
var moneyBeginNeedPay = beginNeedPay - 0; //期初应付
money = (money + moneyBeginNeedPay - moneyBeginNeedGet).toFixed(2);
$(".last-total").text(money); //期末合计
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
});
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
}
})
}
},
error: function () {
$.messager.alert('提示', '网络异常请稍后再试!', 'error');
return;
} }
}, });
{ title: '类型',field: 'type',width:100}, }
{ title: '单位名称',field: 'supplierName',width:200}, }
{ title: '单据金额',field: 'discountLastMoney',width:80}, },
{ title: '实际支付',field: 'changeAmount',width:80}, //此处添加错误处理
{ title: '本期变化',field: 'allPrice',width:80}, error: function () {
{ title: '单据日期',field: 'operTime',width:140} $.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
]], return;
onLoadError:function() }
{ });
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); }
return;
}
});
}
//初始化键盘enter事件 //报表打印
$(document).keydown(function(event) function print() {
{ $("#printBtn").off("click").on("click", function () {
//兼容 IE和firefox 事件 var path = "<%=path %>";
var e = window.event || event; CreateFormPage('打印报表', $('#tableData'), path);
var k = e.keyCode||e.which||e.charCode; });
//兼容 IE,firefox 兼容 }
var obj = e.srcElement ? e.srcElement : e.target; </script>
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 </body>
if(k == "13"&&(obj.id=="Type"||obj.id=="Name"))
{
$("#savePerson").click();
}
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchType"))
{
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
try
{
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize)
{
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',
{
pageNumber:pageNum,
pageSize:pageSize
});
showDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//搜索处理
function search() {
showDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
$("#searchBtn").unbind().bind({
click:function()
{
search();
}
});
function showDetails(pageNo,pageSize)
{
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findStatementAccount.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
BeginTime: $("#searchBeginTime").val(),
EndTime: $("#searchEndTime").val(),
OrganId: $('#OrganId').combobox('getValue'),
supType: "供应商"
}),
success: function (res) {
if(res){
$("#tableData").datagrid('loadData',res);
//如果选择了单位信息,就进行计算期初和期末
var supplierId = $('#OrganId').combobox('getValue');
if(supplierId) {
//先查找期初信息
var beginNeedGet = 0;
var beginNeedPay = 0;
$.ajax({
type:"post",
url: "<%=path %>/supplier/findById.action",
dataType: "json",
async: false,
data: ({
supplierID: supplierId
}),
success: function(res){
if(res && res.rows && res.rows[0]) {
if(res.rows[0].BeginNeedGet) {
beginNeedGet = res.rows[0].BeginNeedGet;
}
if(res.rows[0].BeginNeedPay) {
beginNeedPay = res.rows[0].BeginNeedPay;
}
//显示期初结存
var searchBeginTime = $("#searchBeginTime").val(); //开始时间
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchBeginTime,
supType: "vendor"
}),
success: function(res){
if(res) {
var moneyA = res.getAllMoney.toFixed(2)-0;
$.ajax({
type:"post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchBeginTime,
supType: "vendor"
}),
success: function(res){
if(res) {
var moneyB = res.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = beginNeedGet-0; //期初应收
var moneyBeginNeedPay = beginNeedPay-0; //期初应付
money = (money + moneyBeginNeedPay - moneyBeginNeedGet).toFixed(2);
$(".first-total").text(money); //期初结存
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
})
//显示期末合计
var searchEndTime = $("#searchEndTime").val(); //结束时间
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchEndTime,
supType: "vendor"
}),
success: function(res){
if(res) {
var moneyA = res.getAllMoney.toFixed(2)-0;
$.ajax({
type:"post",
url: "<%=path %>/accountHead/findTotalPay.action",
dataType: "json",
async: false,
data: ({
supplierId: supplierId,
EndTime:searchEndTime,
supType: "vendor"
}),
success: function(res){
if(res) {
var moneyB = res.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = beginNeedGet-0; //期初应收
var moneyBeginNeedPay = beginNeedPay-0; //期初应付
money = (money + moneyBeginNeedPay - moneyBeginNeedGet).toFixed(2);
$(".last-total").text(money); //期末合计
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
})
}
},
error: function(){
$.messager.alert('提示','网络异常请稍后再试!','error');
return;
}
});
}
}
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//报表打印
function print() {
$("#printBtn").off("click").on("click",function(){
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html> </html>

View File

@@ -1,138 +1,135 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>个人资料</title> <title>个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<div id="userDlg" class="easyui-panel" title="修改密码" style="height:370px;background-color:#EAF2FD; " <div id="userDlg" class="easyui-panel" title="修改密码" style="height:370px;background-color:#EAF2FD; "
iconCls="icon-unlock" collapsible="true" closable="false"> iconCls="icon-unlock" collapsible="true" closable="false">
<form id="passwordFM" method="post" novalidate> <form id="passwordFM" method="post" novalidate>
<div class="fitem" style="padding:10px"> <div class="fitem" style="padding:10px">
<label id="passwordLabel">原始密码&nbsp;&nbsp;</label> <label id="passwordLabel">原始密码&nbsp;&nbsp;</label>
<input type="password" name="orgpassword" id="orgpassword" class="easyui-validatebox" data-options="required:true,validType:'length[5,20]'" style="width: 230px;height: 20px" missingMessage="请输入原始密码"/> <input type="password" name="orgpassword" id="orgpassword" class="easyui-validatebox"
<span id="orgTipMsg"></span> data-options="required:true,validType:'length[5,20]'" style="width: 230px;height: 20px"
</div> missingMessage="请输入原始密码"/>
<div class="fitem" style="padding:10px"> <span id="orgTipMsg"></span>
<label id="newPassword">重设密码&nbsp;&nbsp;</label> </div>
<input type="password" name="password" id="password" class="easyui-validatebox" data-options="required:true,validType:'length[5,20]'" style="width: 230px;height: 20px" missingMessage="请填写新密码"/> <div class="fitem" style="padding:10px">
<span id="orgTipMsg"></span> <label id="newPassword">重设密码&nbsp;&nbsp;</label>
</div> <input type="password" name="password" id="password" class="easyui-validatebox"
<div class="fitem" style="padding:10px"> data-options="required:true,validType:'length[5,20]'" style="width: 230px;height: 20px"
<label id="repasswordLabel">再输一遍&nbsp;&nbsp;</label> missingMessage="请填写新密码"/>
<input type="password" name="repassword" id="repassword" class="easyui-validatebox" style="width: 230px;height: 20px" required="true" class="easyui-validatebox" validType="equals['#password']" missingMessage="请再次填写新密码" invalidMessage="两次密码输入不一致"/> <span id="orgTipMsg"></span>
<span id="tipMsg"></span> </div>
</div> <div class="fitem" style="padding:10px">
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <label id="repasswordLabel">再输一遍&nbsp;&nbsp;</label>
</form> <input type="password" name="repassword" id="repassword" class="easyui-validatebox"
<div style="clear: both;">&nbsp;</div> style="width: 230px;height: 20px" required="true" class="easyui-validatebox"
<div id="dlg-buttons"> validType="equals['#password']" missingMessage="请再次填写新密码" invalidMessage="两次密码输入不一致"/>
<a href="javascript:void(0)" id="savepassword" class="easyui-linkbutton" iconCls="icon-save">保存</a> <span id="tipMsg"></span>
<a href="javascript:void(0)" id="cancelpassword" class="easyui-linkbutton" iconCls="icon-redo">重置</a> </div>
</div> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</div> </form>
<div style="clear: both;">&nbsp;</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="savepassword" class="easyui-linkbutton" iconCls="icon-save">保存</a>
<a href="javascript:void(0)" id="cancelpassword" class="easyui-linkbutton" iconCls="icon-redo">重置</a>
</div>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ $("#orgpassword").focus();
$("#orgpassword").focus(); $('#passwordFM').form({
$('#passwordFM').form({ onSubmit: function () {
onSubmit: function(){ return false;
return false; }
} });
}); $("#userDlg").panel({height: webH - 3, width: webW + 15});
$("#userDlg").panel({height:webH-3, width:webW+15}); $("#dlg-buttons").css("padding-left", "65px");
$("#dlg-buttons").css("padding-left","65px"); });
}); //重置
//重置 $("#cancelpassword").off("click").on("click", function () {
$("#cancelpassword").off("click").on("click",function(){ $("#orgpassword").val("");
$("#orgpassword").val(""); $("#password").val("");
$("#password").val(""); $("#repassword").val("");
$("#repassword").val(""); });
}); //初始化键盘enter事件
//初始化键盘enter事件 $(document).keydown(function (event) {
$(document).keydown(function(event) //兼容 IE和firefox 事件
{ var e = window.event || event;
//兼容 IE和firefox 事件 var k = e.keyCode || e.which || e.charCode;
var e = window.event || event; //兼容 IE,firefox 兼容
var k = e.keyCode||e.which||e.charCode; var obj = e.srcElement ? e.srcElement : e.target;
//兼容 IE,firefox 兼容 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
var obj = e.srcElement ? e.srcElement : e.target; if (k == "13" && (obj.id == "orgpassword" || obj.id == "password" || obj.id == "repassword"))
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 $("#savepassword").click();
if(k == "13"&&(obj.id=="orgpassword" || obj.id=="password"|| obj.id=="repassword")) });
$("#savepassword").click();
});
$("#savepassword").unbind().bind({ $("#savepassword").unbind().bind({
click:function() click: function () {
{ if (!$('#passwordFM').form('validate'))
if(!$('#passwordFM').form('validate')) return;
return; $.ajax({
$.ajax({ type: "post",
type:"post", url: "<%=path %>/user/updatePwd.action",
url: "<%=path %>/user/updatePwd.action", dataType: "json",
dataType: "json", async: false,
async : false, data: ({
data: ({ userID: '${sessionScope.user.id}',
userID : '${sessionScope.user.id}', password: $.trim($("#password").val()),
password : $.trim($("#password").val()), orgpwd: $.trim($("#orgpassword").val())
orgpwd : $.trim($("#orgpassword").val()) }),
}), success: function (tipInfo) {
success: function (tipInfo) if (1 == tipInfo)
{ //回退到上次访问页面
if(1 == tipInfo) history.go(-1);
//回退到上次访问页面 else if (2 == tipInfo) {
history.go(-1); $("#orgTipMsg").empty().append("<font color='red'>原始密码输入错误</font>");
else if(2 == tipInfo) return;
{ }
$("#orgTipMsg").empty().append("<font color='red'>原始密码输入错误</font>"); else {
return; $.messager.alert('提示', '更新密码异常,请稍后再试!', 'error');
} return;
else }
{ },
$.messager.alert('提示','更新密码异常,请稍后再试!','error'); //此处添加错误处理
return; error: function () {
} $.messager.alert('提示', '更新密码异常,请稍后再试!', 'error');
}, return;
//此处添加错误处理 }
error:function() });
{ }
$.messager.alert('提示','更新密码异常,请稍后再试!','error'); });
return;
}
});
}
});
//处理tip提示 //处理tip提示
$("#orgpassword").unbind().bind({ $("#orgpassword").unbind().bind({
'click keyup':function() 'click keyup': function () {
{ $("#orgTipMsg").empty();
$("#orgTipMsg").empty(); },
}, 'blur': function () {
'blur':function() $("#orgTipMsg").empty();
{ }
$("#orgTipMsg").empty(); });
}
});
</script> </script>
</body> </body>
</html> </html>

View File

@@ -1,136 +1,137 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>用户对应客户</title> <title>用户对应客户</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserCustomer"; var type = "UserCustomer";
var url;//定义链接地址 var url;//定义链接地址
function GetNode(ctype) { function GetNode(ctype) {
var node = $('#tt').tree('getChecked'); var node = $('#tt').tree('getChecked');
var cnodes = ''; var cnodes = '';
var pnodes = ''; var pnodes = '';
var prevNode = ''; //保存上一步所选父节点 var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) { for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) { if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']'; cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点 var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同 if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{ {
pnodes += '[' + pnode.id + ']'; pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点 prevNode = pnode.id; //保存当前节点
} }
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; } if (ctype == 'child') {
else { return pnodes }; return cnodes;
}; }
else {
return pnodes
}
;
};
$(function () { $(function () {
$('#tt').tree({
url:'<%=path%>/supplier/findUserCustomer.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
$("#btnOK").click(
function() {
if(!checkUserDepot())
{
url = '<%=path%>/userBusiness/create.action';
}
else
{
url = '<%=path%>/userBusiness/update.action';
}
if (confirm("您确定要保存吗?")) {
$.ajax({
type: "post",
url:url,
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
},
dataType: "json",
async : false,
success: function (tipInfo) {
if (tipInfo) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else
alert(tipInfo);
}
});
}
}
);
$('#tt').tree({
url: '<%=path%>/supplier/findUserCustomer.action?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
}); });
//检查记录是否存在
function checkUserDepot() $("#btnOK").click(
{ function () {
//表示是否存在 true == 存在 false = 不存在 if (!checkUserDepot()) {
var flag = false; url = '<%=path%>/userBusiness/create.action';
//开始ajax名称检验是否存在 }
$.ajax({ else {
type:"post", url = '<%=path%>/userBusiness/update.action';
url: "<%=path %>/userBusiness/checkIsValueExist.action", }
dataType: "json",
async : false, if (confirm("您确定要保存吗?")) {
data: ({
Type : type, $.ajax({
KeyId : url_id type: "post",
}), url: url,
success: function (tipInfo) data: {
{ Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
flag = tipInfo; },
}, dataType: "json",
//此处添加错误处理 async: false,
error:function() success: function (tipInfo) {
{ if (tipInfo) {
$.messager.alert('提示','检查用户对应功能是否存在异常,请稍后再试!','error'); self.parent.$.colorbox.close();
return; alert("操作成功!");
} }
}); else
return flag; alert(tipInfo);
} }
</script> });
</body> }
}
);
});
//检查记录是否存在
function checkUserDepot() {
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验是否存在
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json",
async: false,
data: ({
Type: type,
KeyId: url_id
}),
success: function (tipInfo) {
flag = tipInfo;
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
return;
}
});
return flag;
}
</script>
</body>
</html> </html>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>用户对应部门</title> <title>用户对应部门</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserDepot"; var type = "UserDepot";
var url;//定义链接地址 var url;//定义链接地址
function GetNode(ctype) { function GetNode(ctype) {
var node = $('#tt').tree('getChecked'); var node = $('#tt').tree('getChecked');
var cnodes = ''; var cnodes = '';
var pnodes = ''; var pnodes = '';
var prevNode = ''; //保存上一步所选父节点 var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) { for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) { if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']'; cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点 var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同 if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{ {
pnodes += '[' + pnode.id + ']'; pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点 prevNode = pnode.id; //保存当前节点
} }
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; } if (ctype == 'child') {
else { return pnodes }; return cnodes;
}; }
else {
return pnodes
}
;
};
$(function () { $(function () {
$('#tt').tree({
url:'<%=path%>/depot/findUserDepot.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
$("#btnOK").click(
function() {
if(!checkUserDepot())
{
url = '<%=path%>/userBusiness/create.action';
}
else
{
url = '<%=path%>/userBusiness/update.action';
}
if (confirm("您确定要保存吗?")) {
$.ajax({
type: "post",
url:url,
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
},
dataType: "json",
async : false,
success: function (tipInfo) {
if (tipInfo) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else
alert(tipInfo);
}
});
}
}
);
$('#tt').tree({
url: '<%=path%>/depot/findUserDepot.action?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
}); });
//检查记录是否存在
function checkUserDepot() $("#btnOK").click(
{ function () {
//表示是否存在 true == 存在 false = 不存在 if (!checkUserDepot()) {
var flag = false; url = '<%=path%>/userBusiness/create.action';
//开始ajax名称检验是否存在 }
$.ajax({ else {
type:"post", url = '<%=path%>/userBusiness/update.action';
url: "<%=path %>/userBusiness/checkIsValueExist.action", }
dataType: "json",
async : false, if (confirm("您确定要保存吗?")) {
data: ({
Type : type, $.ajax({
KeyId : url_id type: "post",
}), url: url,
success: function (tipInfo) data: {
{ Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
flag = tipInfo; },
}, dataType: "json",
//此处添加错误处理 async: false,
error:function() success: function (tipInfo) {
{ if (tipInfo) {
$.messager.alert('提示','检查用户对应功能是否存在异常,请稍后再试!','error'); self.parent.$.colorbox.close();
return; alert("操作成功!");
} }
}); else
return flag; alert(tipInfo);
} }
</script> });
</body> }
}
);
});
//检查记录是否存在
function checkUserDepot() {
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验是否存在
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json",
async: false,
data: ({
Type: type,
KeyId: url_id
}),
success: function (tipInfo) {
flag = tipInfo;
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
return;
}
});
return flag;
}
</script>
</body>
</html> </html>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>用户对应角色</title> <title>用户对应角色</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css" /> <link rel="stylesheet" type="text/css" href="<%=path%>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css" /> <link type="text/css" rel="stylesheet" href="<%=path%>/css/common.css"/>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path%>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script> <script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserRole"; var type = "UserRole";
var url;//定义链接地址 var url;//定义链接地址
function GetNode(ctype) { function GetNode(ctype) {
var node = $('#tt').tree('getChecked'); var node = $('#tt').tree('getChecked');
var cnodes = ''; var cnodes = '';
var pnodes = ''; var pnodes = '';
var prevNode = ''; //保存上一步所选父节点 var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) { for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) { if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']'; cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点 var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同 if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{ {
pnodes += '[' + pnode.id + ']'; pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点 prevNode = pnode.id; //保存当前节点
} }
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; } if (ctype == 'child') {
else { return pnodes }; return cnodes;
}; }
else {
return pnodes
}
;
};
$(function () { $(function () {
$('#tt').tree({
url:'<%=path%>/role/findUserRole.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
$("#btnOK").click(
function() {
if(!checkUserRole())
{
url = '<%=path%>/userBusiness/create.action';
}
else
{
url = '<%=path%>/userBusiness/update.action';
}
if (confirm("您确定要保存吗?")) {
$.ajax({
type: "post",
url:url,
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
},
dataType: "json",
async : false,
success: function (tipInfo) {
if (tipInfo) {
self.parent.$.colorbox.close();
alert("操作成功!");
}
else
alert(tipInfo);
}
});
}
}
);
$('#tt').tree({
url: '<%=path%>/role/findUserRole.action?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
}); });
//检查记录是否存在
function checkUserRole() $("#btnOK").click(
{ function () {
//表示是否存在 true == 存在 false = 不存在 if (!checkUserRole()) {
var flag = false; url = '<%=path%>/userBusiness/create.action';
//开始ajax名称检验是否存在 }
$.ajax({ else {
type:"post", url = '<%=path%>/userBusiness/update.action';
url: "<%=path %>/userBusiness/checkIsValueExist.action", }
dataType: "json",
async : false, if (confirm("您确定要保存吗?")) {
data: ({
Type : type, $.ajax({
KeyId : url_id type: "post",
}), url: url,
success: function (tipInfo) data: {
{ Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
flag = tipInfo; },
}, dataType: "json",
//此处添加错误处理 async: false,
error:function() success: function (tipInfo) {
{ if (tipInfo) {
$.messager.alert('提示','检查用户对应功能是否存在异常,请稍后再试!','error'); self.parent.$.colorbox.close();
return; alert("操作成功!");
} }
}); else
return flag; alert(tipInfo);
} }
</script> });
</body> }
}
);
});
//检查记录是否存在
function checkUserRole() {
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验是否存在
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/checkIsValueExist.action",
dataType: "json",
async: false,
data: ({
Type: type,
KeyId: url_id
}),
success: function (tipInfo) {
flag = tipInfo;
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
return;
}
});
return flag;
}
</script>
</body>
</html> </html>

View File

@@ -1,198 +1,188 @@
<%@page import="com.jsh.util.Tools"%> <%@page import="com.jsh.util.Tools" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" pageEncoding="utf-8" %>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request); String clientIp = Tools.getLocalIp(request);
%> %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>个人资料</title> <title>个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/> <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head> </head>
<body> <body>
<div id="position" class="easyui-panel" title="当前位置:系统管理 &gt; 个人资料" collapsible="false" closable="false"/> <div id="position" class="easyui-panel" title="当前位置:系统管理 &gt; 个人资料" collapsible="false" closable="false"/>
<div id="userDlg" class="easyui-panel" title="个人资料" style="height:400px;padding:10px 20px;background-color:#EAF2FD " <div id="userDlg" class="easyui-panel" title="个人资料" style="height:400px;padding:10px 20px;background-color:#EAF2FD "
buttons="#dlg-buttons" iconCls="icon-comment" collapsible="true" closable="false"> buttons="#dlg-buttons" iconCls="icon-comment" collapsible="true" closable="false">
<form id="usernameFM" method="post" novalidate action="<%=path %>/user/update.action"> <form id="usernameFM" method="post" novalidate action="<%=path %>/user/update.action">
<div class="fitem" style="padding:5px"> <div class="fitem" style="padding:5px">
<label id="usernameLabel">用户名称&nbsp;&nbsp;</label> <label id="usernameLabel">用户名称&nbsp;&nbsp;</label>
<input name="username" id="username" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" value="${sessionScope.user.username}" style="width: 230px;height: 20px"/> <input name="username" id="username" class="easyui-validatebox"
</div> data-options="required:true,validType:'length[2,30]'" value="${sessionScope.user.username}"
style="width: 230px;height: 20px"/>
</div>
<div class="fitem" style="padding:5px"> <div class="fitem" style="padding:5px">
<label id="departmentLabel">部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;</label> <label id="departmentLabel">部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;</label>
<input name="department" id="department" style="width: 230px;height: 20px" value="${sessionScope.user.department}"/> <input name="department" id="department" style="width: 230px;height: 20px"
</div> value="${sessionScope.user.department}"/>
<div class="fitem" style="padding:5px"> </div>
<label id="positionLabel">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;</label> <div class="fitem" style="padding:5px">
<input name="position" id="position" style="width: 230px;height: 20px" value="${sessionScope.user.position}"/> <label id="positionLabel">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;</label>
</div> <input name="position" id="position" style="width: 230px;height: 20px"
<div class="fitem" style="padding:5px"> value="${sessionScope.user.position}"/>
<label id="phonenumLabel">联系电话&nbsp;&nbsp;</label> </div>
<input name="phonenum" id="phonenum" class="easyui-numberbox" style="width: 230px;height: 20px" value="${sessionScope.user.phonenum}"/> <div class="fitem" style="padding:5px">
</div> <label id="phonenumLabel">联系电话&nbsp;&nbsp;</label>
<div class="fitem" style="padding:5px"> <input name="phonenum" id="phonenum" class="easyui-numberbox" style="width: 230px;height: 20px"
<label id="emailLabel">电子邮箱&nbsp;&nbsp;</label> value="${sessionScope.user.phonenum}"/>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 230px;height: 20px" value="${sessionScope.user.email}"/> </div>
</div> <div class="fitem" style="padding:5px">
<div class="fitem" style="padding:5px"> <label id="emailLabel">电子邮箱&nbsp;&nbsp;</label>
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label> <input name="email" id="email" class="easyui-validatebox" validType="email"
<textarea name="description" id="description" rows="3" cols="3" style="width: 230px;font-size: 12px;">${sessionScope.user.description}</textarea> style="width: 230px;height: 20px" value="${sessionScope.user.email}"/>
</div> </div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <div class="fitem" style="padding:5px">
<input type="hidden" name="userID" id="userID" value="${sessionScope.user.id}"/> <label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
</form> <textarea name="description" id="description" rows="3" cols="3"
<div style="clear: both;">&nbsp;</div> style="width: 230px;font-size: 12px;">${sessionScope.user.description}</textarea>
<div id="dlg-buttons"> </div>
<a href="javascript:void(0)" id="saveusername" class="easyui-linkbutton" iconCls="icon-save">修改</a> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<a href="javascript:void(0)" id="cancelusername" class="easyui-linkbutton" iconCls="icon-cancel">取消</a> <input type="hidden" name="userID" id="userID" value="${sessionScope.user.id}"/>
</div> </form>
</div> <div style="clear: both;">&nbsp;</div>
</div> <div id="dlg-buttons">
<a href="javascript:void(0)" id="saveusername" class="easyui-linkbutton" iconCls="icon-save">修改</a>
<a href="javascript:void(0)" id="cancelusername" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
</div>
</div>
</div>
<script type="text/javascript"> <script type="text/javascript">
//初始化界面 //初始化界面
$(function() $(function () {
{ browserFit();
browserFit(); $("#userDlg").panel({height: webH - 35});
$("#userDlg").panel({height:webH-35}); });
});
//浏览器适配 //浏览器适配
function browserFit() function browserFit() {
{ if (getOs() == 'MSIE') {
if(getOs()=='MSIE') $("#usernameLabel").empty().append("用户名称&nbsp;&nbsp;");
{ $("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;");
$("#usernameLabel").empty().append("用户名称&nbsp;&nbsp;"); $("#positionLabel").empty().append("职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;");
$("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;"); $("#phonenumLabel").empty().append("联系电话&nbsp;&nbsp;");
$("#positionLabel").empty().append("职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;"); $("#emailLabel").empty().append("电子邮箱&nbsp;&nbsp;");
$("#phonenumLabel").empty().append("联系电话&nbsp;&nbsp;"); $("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;");
$("#emailLabel").empty().append("电子邮箱&nbsp;&nbsp;"); }
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;"); else {
} $("#usernameLabel").empty().append("用户名称&nbsp;");
else $("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;");
{ $("#positionLabel").empty().append("职&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;");
$("#usernameLabel").empty().append("用户名称&nbsp;"); $("#phonenumLabel").empty().append("联系电话&nbsp;");
$("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;"); $("#emailLabel").empty().append("电子邮箱&nbsp;");
$("#positionLabel").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); $("#descriptionLabel").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
$("#phonenumLabel").empty().append("联系电话&nbsp;"); }
$("#emailLabel").empty().append("电子邮箱&nbsp;"); }
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
$("#cancelusername").unbind().bind({ $("#cancelusername").unbind().bind({
click:function() click: function () {
{ history.go(-1);
history.go(-1); }
} });
});
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function (event) {
{ //兼容 IE和firefox 事件
//兼容 IE和firefox 事件 var e = window.event || event;
var e = window.event || event; var k = e.keyCode || e.which || e.charCode;
var k = e.keyCode||e.which||e.charCode; //兼容 IE,firefox 兼容
//兼容 IE,firefox 兼容 var obj = e.srcElement ? e.srcElement : e.target;
var obj = e.srcElement ? e.srcElement : e.target; //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 if (k == "13" && (obj.id == "username" || obj.id == "department" || obj.id == "phonenum"
if(k == "13"&&(obj.id=="username" || obj.id=="department"|| obj.id=="phonenum" || obj.id == "email" || obj.id == "description" || obj.id == "position")) {
|| obj.id=="email" || obj.id=="description" || obj.id=="position")) $("#saveusername").click();
{ }
$("#saveusername").click(); });
}
});
//保存用户信息 //保存用户信息
$("#saveusername").unbind().bind({ $("#saveusername").unbind().bind({
click:function() click: function () {
{ if (checkusernameName())
if(checkusernameName()) return;
return;
var reg = /^([0-9])+$/; var reg = /^([0-9])+$/;
var phonenum = $.trim($("#phonenum").val()); var phonenum = $.trim($("#phonenum").val());
if(phonenum.length>0 && !reg.test(phonenum)) if (phonenum.length > 0 && !reg.test(phonenum)) {
{ $.messager.alert('提示', '电话号码只能是数字', 'info');
$.messager.alert('提示','电话号码只能是数字','info'); $("#phonenum").val("").focus();
$("#phonenum").val("").focus(); return;
return; }
}
$('#usernameFM').form('submit',{ $('#usernameFM').form('submit', {
onSubmit: function() onSubmit: function () {
{ return $(this).form('validate');
return $(this).form('validate'); },
}, success: function (result) {
success: function(result) var result = eval('(' + result + ')');
{ if (!result) {
var result = eval('('+result+')'); $.messager.show({
if (!result) title: '错误提示',
{ msg: '保存用户信息失败,请稍后重试!'
$.messager.show({ });
title: '错误提示', }
msg: '保存用户信息失败,请稍后重试!' else {
}); $.messager.alert('提示', '修改个人资料成功!', 'info');
} }
else }
{ });
$.messager.alert('提示','修改个人资料成功!','info'); }
} });
}
}); //检查用户 名称是否存在 ++ 重名无法提示问题需要跟进
} function checkusernameName() {
}); var username = $.trim($("#username").val());
//检查用户 名称是否存在 ++ 重名无法提示问题需要跟进 //表示是否存在 true == 存在 false = 不存在
function checkusernameName() var flag = false;
{ //开始ajax名称检验不能重名
var username = $.trim($("#username").val()); if (username.length > 0 && username != '${sessionScope.user.username}') {
//表示是否存在 true == 存在 false = 不存在 $.ajax({
var flag = false; type: "post",
//开始ajax名称检验不能重名 url: "<%=path %>/user/checkIsNameExist.action",
if(username.length > 0 && username != '${sessionScope.user.username}') dataType: "json",
{ async: false,
$.ajax({ data: ({
type:"post", userID: '${sessionScope.user.id}',
url: "<%=path %>/user/checkIsNameExist.action", username: username
dataType: "json", }),
async : false, success: function (tipInfo) {
data: ({ flag = tipInfo;
userID : '${sessionScope.user.id}', if (tipInfo) {
username : username $.messager.alert('提示', '用户名称已经存在', 'info');
}), //alert("用户名称已经存在");
success: function (tipInfo) //$("#username").val("");
{ return;
flag = tipInfo; }
if(tipInfo) },
{ //此处添加错误处理
$.messager.alert('提示','用户名称已经存在','info'); error: function () {
//alert("用户名称已经存在"); $.messager.alert('提示', '检查用户名称是否存在异常,请稍后再试!', 'error');
//$("#username").val(""); return;
return; }
} });
}, }
//此处添加错误处理 return flag;
error:function() }
{ </script>
$.messager.alert('提示','检查用户名称是否存在异常,请稍后再试!','error'); </body>
return;
}
});
}
return flag;
}
</script>
</body>
</html> </html>