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

View File

@@ -1,26 +1,26 @@
<%@ page language="java" pageEncoding="utf-8"%>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<head>
<base href="<%=basePath%>">
<title>+</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<script type="text/javascript">
top.location.href="<%=basePath%>";
</script>
<br></body>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<script type="text/javascript">
top.location.href = "<%=basePath%>";
</script>
<br></body>
</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 basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #EAF2FD;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #FF0000;
text-decoration: underline;
}
a:active {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}
.STYLE7 {font-size: 12}
-->
</style>
</head>
<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>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #EAF2FD;
}
.STYLE1 {
font-size: 12px
}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #FF0000;
text-decoration: underline;
}
a:active {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}
.STYLE7 {
font-size: 12
}
-->
</style>
</head>
<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>

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,24 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ERP系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" />
</head>
<frameset frameborder="no" border="0" framespacing="0" id="framesetList">
<frame src="<%=path %>/pages/common/main.jsp" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
<body>
</body>
</noframes>
<head>
<title>ERP系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
</head>
<frameset frameborder="no" border="0" framespacing="0" id="framesetList">
<frame src="<%=path %>/pages/common/main.jsp" name="mainFrame" id="mainFrame" title="mainFrame"/>
</frameset>
<body>
</body>
</noframes>
</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 basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css" />
</head>
<body>
<div id="foot">Copyright © 2015 季圣华 版权所有 版本号 V1.0</div>
</body>
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/css.css"/>
</head>
<body>
<div id="foot">Copyright © 2015 季圣华 版权所有 版本号 V1.0</div>
</body>
</html>

View File

@@ -1,167 +1,161 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<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>
</head>
<body>
<div id="header">
<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="nav_top">
<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>|</li>
<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>
<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 id="2">|</li>
<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 id="4">|</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>|</li>
<li><a href="javascript:void(0)" id="navtop_help">帮助</a></li>
-->
<li id="6">|</li>
<li><a href="javascript:void(0)" id="navtop_logout">注销</a></li>
</ul>
</div>
</div>
<script type="text/javascript">
$(init);
//页面初始化
function init()
{
//初始化时间
showTime();
if('${sessionScope.user.loginame}'!= 'guest')
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").show();
else
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").hide();
}
function showDate()
{
var calendar = new Date();
var day = calendar.getDay();
var month = calendar.getMonth();
var date = calendar.getDate();
var year = calendar.getYear();
if (year< 1900)
{
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;";
}
else if(getOs().indexOf("Firefox") != -1)
{
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;");
message = year + "年 " + monthname[month]+ date + "日&nbsp;&nbsp;" + dayname[day]+"&nbsp;&nbsp;";
}
else
{
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
message = year + "年 " + monthname[month]+ date + "日&nbsp;&nbsp; " + dayname[day] + "&nbsp;&nbsp;";
}
return message;
}
function showTime()
{
var Digital=new Date();
var hours=Digital.getHours();
var minutes=Digital.getMinutes();
var seconds=Digital.getSeconds();
if(hours==0)
{
hours="00";
}
if(hours <= 9 && hours > 0)
{
hours="0"+hours;
}
if(minutes<=9)
minutes="0"+minutes;
if(seconds<=9)
seconds="0"+seconds;
var myclock=hours+":"+minutes+":"+seconds;
//定时器
setTimeout("showTime()",1000);
var message = showDate()+" "+myclock;
$("#showNowTime").empty().append(message);
}
//判断浏览器的类型
function getOs()
{
var OsObject = "";
if(navigator.userAgent.indexOf("MSIE")>0)
{
return "MSIE";
}
else if(navigator.userAgent.indexOf("Firefox")>0)
{
return "Firefox";
}
else if(navigator.userAgent.indexOf("Safari")>0)
{
return "Safari";
}
else if(navigator.userAgent.indexOf("Camino")>0)
{
return "Camino";
}
else if(navigator.userAgent.indexOf("Gecko/")>0)
{
return "Gecko";
}
else if(navigator.userAgent.indexOf("Opera/")>0)
{
return "Opera";
}
else
{
return "unknown";
}
}
//退出系统
$("#navtop_logout").bind({
click:function()
{
if(confirm("确认要退出系统吗?"))
{
window.location.href ="<%=path%>/user/logout.action?clientIp=<%=clientIp%>" ;
}
}
});
</script>
</body>
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<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>
</head>
<body>
<div id="header">
<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="nav_top">
<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>|</li>
<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>
<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 id="2">|</li>
<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 id="4">|</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>|</li>
<li><a href="javascript:void(0)" id="navtop_help">帮助</a></li>
-->
<li id="6">|</li>
<li><a href="javascript:void(0)" id="navtop_logout">注销</a></li>
</ul>
</div>
</div>
<script type="text/javascript">
$(init);
//页面初始化
function init() {
//初始化时间
showTime();
if ('${sessionScope.user.loginame}' != 'guest')
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").show();
else
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").hide();
}
function showDate() {
var calendar = new Date();
var day = calendar.getDay();
var month = calendar.getMonth();
var date = calendar.getDate();
var year = calendar.getYear();
if (year < 1900) {
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;";
}
else if (getOs().indexOf("Firefox") != -1) {
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;");
message = year + "年 " + monthname[month] + date + "日&nbsp;&nbsp;" + dayname[day] + "&nbsp;&nbsp;";
}
else {
$("#blankSpace").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
message = year + "年 " + monthname[month] + date + "日&nbsp;&nbsp; " + dayname[day] + "&nbsp;&nbsp;";
}
return message;
}
function showTime() {
var Digital = new Date();
var hours = Digital.getHours();
var minutes = Digital.getMinutes();
var seconds = Digital.getSeconds();
if (hours == 0) {
hours = "00";
}
if (hours <= 9 && hours > 0) {
hours = "0" + hours;
}
if (minutes <= 9)
minutes = "0" + minutes;
if (seconds <= 9)
seconds = "0" + seconds;
var myclock = hours + ":" + minutes + ":" + seconds;
//定时器
setTimeout("showTime()", 1000);
var message = showDate() + " " + myclock;
$("#showNowTime").empty().append(message);
}
//判断浏览器的类型
function getOs() {
var OsObject = "";
if (navigator.userAgent.indexOf("MSIE") > 0) {
return "MSIE";
}
else if (navigator.userAgent.indexOf("Firefox") > 0) {
return "Firefox";
}
else if (navigator.userAgent.indexOf("Safari") > 0) {
return "Safari";
}
else if (navigator.userAgent.indexOf("Camino") > 0) {
return "Camino";
}
else if (navigator.userAgent.indexOf("Gecko/") > 0) {
return "Gecko";
}
else if (navigator.userAgent.indexOf("Opera/") > 0) {
return "Opera";
}
else {
return "unknown";
}
}
//退出系统
$("#navtop_logout").bind({
click: function () {
if (confirm("确认要退出系统吗?")) {
window.location.href = "<%=path%>/user/logout.action?clientIp=<%=clientIp%>";
}
}
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
@@ -10,111 +10,122 @@
<head>
<meta charset="utf-8">
<title>ERP系统</title>
<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/js/HoorayLibs/hooraylibs.css" rel="stylesheet"/>
<link href="<%=path%>/js/HoorayOS_mini/img/ui/index.css" rel="stylesheet"/>
</head>
<body>
<div class="loading"></div>
<!-- 浏览器升级提示 -->
<div class="update_browser_box">
<div class="update_browser">
<div class="subtitle">您正在使用的IE浏览器版本过低<br>我们建议您升级或者更换浏览器,以便体验顺畅、兼容、安全的互联网。</div>
<div class="title">选择一款<span>新</span>浏览器吧</div>
<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://www.google.cn/chrome/" class="chrome" target="_blank" title="谷歌浏览器">谷歌浏览器</a>
<a href="http://www.firefox.com.cn" class="firefox" target="_blank" title="火狐浏览器">火狐浏览器</a>
<a href="http://www.opera.com" class="opera" target="_blank" title="opera浏览器">opera浏览器</a>
<a href="http://www.apple.com.cn/safari" class="safari" target="_blank" title="safari浏览器">safari浏览器</a>
</div>
<div class="bottomtitle">[&nbsp;<a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a>&nbsp;]</div>
<div class="loading"></div>
<!-- 浏览器升级提示 -->
<div class="update_browser_box">
<div class="update_browser">
<div class="subtitle">您正在使用的IE浏览器版本过低<br>我们建议您升级或者更换浏览器,以便体验顺畅、兼容、安全的互联网。</div>
<div class="title">选择一款<span>新</span>浏览器吧</div>
<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://www.google.cn/chrome/" class="chrome" target="_blank" title="谷歌浏览器">谷歌浏览器</a>
<a href="http://www.firefox.com.cn" class="firefox" target="_blank" title="火狐浏览器">火狐浏览器</a>
<a href="http://www.opera.com" class="opera" target="_blank" title="opera浏览器">opera浏览器</a>
<a href="http://www.apple.com.cn/safari" class="safari" target="_blank" title="safari浏览器">safari浏览器</a>
</div>
<div class="bottomtitle">[&nbsp;<a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a>&nbsp;]
</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="desk">
<div id="desk-1" class="desktop-container"><div class="scrollbar scrollbar-x"></div><div class="scrollbar scrollbar-y"></div></div>
<div id="dock-bar">
<div id="dock-container">
<div class="dock-middle">
<div class="dock-applist"></div>
<div class="dock-toollist">
<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 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="desk">
<div id="desk-1" class="desktop-container">
<div class="scrollbar scrollbar-x"></div>
<div class="scrollbar scrollbar-y"></div>
</div>
<div id="dock-bar">
<div id="dock-container">
<div class="dock-middle">
<div class="dock-applist"></div>
<div class="dock-toollist">
<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 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>
<script src="<%=path%>/js/HoorayOS_mini/js/jquery-1.8.3.min.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/templates.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/core.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.app.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>
<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>
<script src="<%=path%>/js/HoorayOS_mini/js/jquery-1.8.3.min.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/HoorayLibs/hooraylibs.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/templates.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/core.js"></script>
<script src="<%=path%>/js/HoorayOS_mini/js/hros.app.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>
<link href="<%=path%>/js/easyui-1.3.5/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<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"/>
<script>
$(function () {
$('#loginOut').click(function () {
if (confirm("确认要退出系统吗?"))
location.href = '<%=path%>/user/logout.action?clientIp=<%=clientIp%>';
})
//IE下禁止选中
document.body.onselectstart = document.body.ondrag = function () { return false; }
//隐藏加载遮罩层
$('.loading').hide();
//IE6升级提示
if ($.browser.msie && $.browser.version < 7) {
if ($.browser.version < 7) {
//虽然不支持IE6但还是得修复PNG图片透明的问题
DD_belatedPNG.fix('.update_browser .browser');
}
$('.update_browser_box').show();
} else {
$('#desktop').show();
//初始化一些桌面信息
HROS.CONFIG.wallpaper = '<%=path%>/js/HoorayOS_mini/img/wallpaper/wallpaper.jpg';
//加载桌面
HROS.base.init();
<script>
$(function () {
$('#loginOut').click(function () {
if (confirm("确认要退出系统吗?"))
location.href = '<%=path%>/user/logout.action?clientIp=<%=clientIp%>';
})
//IE下禁止选中
document.body.onselectstart = document.body.ondrag = function () {
return false;
}
//隐藏加载遮罩层
$('.loading').hide();
//IE6升级提示
if ($.browser.msie && $.browser.version < 7) {
if ($.browser.version < 7) {
//虽然不支持IE6但还是得修复PNG图片透明的问题
DD_belatedPNG.fix('.update_browser .browser');
}
//判断是否存在session如果不存在就跳到登录界面
function UserOut() {
var kid = ${sessionScope.user.id};
if (!kid){
top.location.href = '../../';
}
}
setInterval(UserOut, 5000); //每5秒检测一次
});
$('.update_browser_box').show();
} else {
$('#desktop').show();
//初始化一些桌面信息
HROS.CONFIG.wallpaper = '<%=path%>/js/HoorayOS_mini/img/wallpaper/wallpaper.jpg';
//加载桌面
HROS.base.init();
}
</script>
//判断是否存在session如果不存在就跳到登录界面
function UserOut() {
var kid = ${sessionScope.user.id};
if (!kid) {
top.location.href = '../../';
}
}
setInterval(UserOut, 5000); //每5秒检测一次
});
</script>
</body>
</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 basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/outlook.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/outlook.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script type="text/javascript">
function NewTab(name, url, funId) {
window.funId = funId;
window.funId = funId;
addTab(name, url, '');
}
</script>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
<script>
var pageid = getUrlParam('id'); //获取传值id
var id=${sessionScope.user.id};
//alert(pageid);
var pageid = getUrlParam('id'); //获取传值id
var id =${sessionScope.user.id};
//alert(pageid);
var userBusinessList = null;
var userBusinessID = null;
var type=null;
var options = "";
var kid=null;
var lei=null;
var last="";
var functions="";
var btnStrList = []; //按钮权限列表
var userBusinessList = null;
var userBusinessID = null;
var type = null;
var options = "";
var kid = null;
var lei = null;
var last = "";
var functions = "";
var btnStrList = []; //按钮权限列表
//初始化界面
$(function()
{
//初始化系统基础信息
initSystemData(id,'UserRole');
initSelectInfo(0);
initSelect();
//ceshi();
});
//初始化界面
$(function () {
//初始化系统基础信息
initSystemData(id, 'UserRole');
initSelectInfo(0);
//初始化系统基础信息
function initSystemData(kid,type)
{
$.ajax({
type:"post",
url: "<%=path%>/userBusiness/getBasicData.action",
data: ({
KeyId:kid,
Type:type
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
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]);
}
}
}
}
}
}
initSelect();
//初始化页面
function initSelect()
{
var arr = options.split('][');
for(var i in arr){
initSystemData(arr[i],'RoleAPP'); //根据角色找app
initSelectInfo(1);//app内列表赋值
//ceshi();
});
initSystemData(arr[i],'RoleFunctions'); //根据角色找functions
initSelectInfo(2); //功能菜单列表
initSelectInfo(3); //查询角色对应的按钮权限
}
if(last!="")
{
last="["+last.substring(0,last.length-1);
//alert(last);
//初始化系统基础信息
function initSystemData(kid, type) {
$.ajax({
type: "post",
url: "<%=path%>/userBusiness/getBasicData.action",
data: ({
KeyId: kid,
Type: type
}),
//设置为同步
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(last.indexOf("["+pageid+"]")!=-1)
{
//alert("存在");
$("#west").show();
$("#mainPanle").show();
$("#mm").show();
}
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
function ceshi()
{
$.ajax({
type:"post",
url: "<%=path%>/userBusiness/getceshi.action",
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]);
}
}
}
//初始化页面选项卡
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() {
var arr = options.split('][');
for (var i in arr) {
initSystemData(arr[i], 'RoleAPP'); //根据角色找app
initSelectInfo(1);//app内列表赋值
initSystemData(arr[i], 'RoleFunctions'); //根据角色找functions
initSelectInfo(2); //功能菜单列表
initSelectInfo(3); //查询角色对应的按钮权限
}
if (last != "") {
last = "[" + last.substring(0, last.length - 1);
//alert(last);
if (last.indexOf("[" + pageid + "]") != -1) {
//alert("存在");
$("#west").show();
$("#mainPanle").show();
$("#mm").show();
}
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
function ceshi() {
$.ajax({
type: "post",
url: "<%=path%>/userBusiness/getceshi.action",
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>
<div region="west" hide="true" split="true" title="导航菜单" style="width:125px;" id="west">
<div id="nav" fit="true" border="false">
<!-- 导航内容 -->
<div>
<ul id="tt"></ul>
<script>
var PNumber = getUrlParam('appID'); //获取传值appid
$(function(){
$('#tt').tree({
url:'<%=path%>/functions/findMenu.action?PNumber='+PNumber+'&hasFunctions='+functions,
animate:true
});
});
</script>
</div>
<div region="west" hide="true" split="true" title="导航菜单" style="width:125px;" id="west">
<div id="nav" fit="true" border="false">
<!-- 导航内容 -->
<div>
<ul id="tt"></ul>
<script>
var PNumber = getUrlParam('appID'); //获取传值appid
$(function () {
$('#tt').tree({
url: '<%=path%>/functions/findMenu.action?PNumber=' + PNumber + '&hasFunctions=' + functions,
animate: true
});
});
</script>
</div>
</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="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 id="mm" class="easyui-menu" style="width: 120px;">
<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 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>
</body>
</html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,152 +1,161 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>付款单</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>单据编号:</td>
<td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
</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>-</td>
<td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="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">
<form id="accountHeadFM" method="post" novalidate>
<table>
<tr>
<td style="width:60px;">收款单位:</td>
<td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select>
</td>
<td style="width:70px;">经手人</td>
<td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td>
<td style="width:70px;">单据日期</td>
<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;"/>
</td>
<td style="width:70px;">单据编号</td>
<td style="padding:5px;width:170px;">
<input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td>
<td style="width:100px;"></td>
</tr>
<tr>
<td colspan="9">
<!-- 单据列表table -->
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
<tr>
<td colspan="9">
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
</td>
</tr>
<tr>
<td>优惠金额:</td>
<td style="padding:5px">
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 110px;" />
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
</div>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table>
<tr>
<td style="width:60px;">收款单位:</td>
<td style="padding:5px;width:130px;">
<span id="OrganIdShow"></span>
</td>
<td style="width:70px;">经手人:</td>
<td style="padding:5px;width:130px;">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:130px;">
<span id="BillTimeShow"></span>
</td>
<td style="width:80px;">单据编号:</td>
<td style="padding:5px;width:140px;">
<span id="BillNoShow"></span>
</td>
<td style="width:100px;"></td>
</tr>
<tr>
<td colspan="9" style="width: 1130px;">
<!-- 单据列表table -->
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
<tr>
<td style="width:60px;">单据备注:</td>
<td colspan="8" style="height:35px;">
<span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
<tr>
<td>优惠金额:</td>
<td style="padding:5px;width:120px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
<head>
<title>付款单</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/financial/financial_base.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>单据编号:</td>
<td>
<input type="text" name="searchBillNo" id="searchBillNo" style="width:100px;"/>
</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>-</td>
<td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
class="txt Wdate" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="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">
<form id="accountHeadFM" method="post" novalidate>
<table>
<tr>
<td style="width:60px;">收款单位</td>
<td style="padding:5px;width:170px;">
<select name="OrganId" id="OrganId" style="width:130px;"></select>
</td>
<td style="width:70px;">经手人</td>
<td style="padding:5px;width:170px;">
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td>
<td style="width:70px;">单据日期</td>
<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;"/>
</td>
<td style="width:70px;">单据编号:</td>
<td style="padding:5px;width:170px;">
<input name="BillNo" id="BillNo" class="easyui-validatebox"
data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td>
<td style="width:100px;"></td>
</tr>
<tr>
<td colspan="9">
<!-- 单据列表table -->
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
<tr>
<td colspan="9">
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
style="width: 1130px; height:35px;"></textarea>
</td>
</tr>
<tr>
<td>优惠金额:</td>
<td style="padding:5px">
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
data-options="min:0,precision:2" style="width: 110px;"/>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
</div>
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table>
<tr>
<td style="width:60px;">收款单位:</td>
<td style="padding:5px;width:130px;">
<span id="OrganIdShow"></span>
</td>
<td style="width:70px;">经手人:</td>
<td style="padding:5px;width:130px;">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:130px;">
<span id="BillTimeShow"></span>
</td>
<td style="width:80px;">单据编号:</td>
<td style="padding:5px;width:140px;">
<span id="BillNoShow"></span>
</td>
<td style="width:100px;"></td>
</tr>
<tr>
<td colspan="9" style="width: 1130px;">
<!-- 单据列表table -->
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
<tr>
<td style="width:60px;">单据备注:</td>
<td colspan="8" style="height:35px;">
<span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td>
</tr>
<tr>
<td>优惠金额:</td>
<td style="padding:5px;width:120px;">
<span id="ChangeAmountShow"></span>
</td>
</tr>
</table>
</div>
</body>
</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 language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>资产管理</title>
<meta charset="utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<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">
<table id="searchTable">
<tr>
<td>类型名称:</td>
<td>
<input type="text" name="searchCategory" id="searchCategory" style="width:230px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchDescLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td>
<td>
<input type="text" name="searchDesc" id="searchDesc" style="width:230px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="categoryDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="categoryFM" method="post" novalidate>
<div class="fitem" style="padding:5px">
<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"/>
</div>
<div class="fitem" style="padding:5px;">
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
<textarea name="description" id="description" 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="saveCategory" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelCategory" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#categoryDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript">
//初始化界面
$(function()
{
initTableData();
ininPager();
initForm();
browserFit();
});
//浏览器适配
function browserFit()
{
if(getOs()=='MSIE')
{
$("#searchDescLabel").empty().append("描&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;述:");
$("#categoryNameLabel").empty().append("类型名称&nbsp;");
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
//防止表单提交重复
function initForm()
{
$('#categoryFM').form({
onSubmit: function(){
return false;
}
});
}
//初始化表格数据
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,
url:'<%=path %>/category/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: 'categoryname',width:200},
{ title: '描述',field: 'description',width:400},
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
{
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.categoryname + 'AaBb' + rec.isystem + 'AaBb' + rec.description;
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;';
}
return str;
}
}
]],
toolbar:[
{
id:'addSupplier',
text:'增加',
iconCls:'icon-add',
handler:function()
{
addCategory();
}
},
{
id:'deleteSupplier',
text:'删除',
iconCls:'icon-remove',
handler:function()
{
batDeleteCategory();
}
}
],
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=="categoryName"|| obj.id=="description" ))
{
$("#saveCategory").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)
{
$.messager.confirm('删除确认','确定要删除此资产类型信息吗?',function(r)
{
if (r)
{
$.ajax({
type:"post",
url: "<%=path %>/category/delete.action",
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;
}
});
<head>
<title>资产管理</title>
<meta charset="utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<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">
<table id="searchTable">
<tr>
<td>类型名称:</td>
<td>
<input type="text" name="searchCategory" id="searchCategory" style="width:230px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchDescLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td>
<td>
<input type="text" name="searchDesc" id="searchDesc" style="width:230px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="categoryDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="categoryFM" method="post" novalidate>
<div class="fitem" style="padding:5px">
<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"/>
</div>
<div class="fitem" style="padding:5px;">
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
<textarea name="description" id="description" 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="saveCategory" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelCategory" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#categoryDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript">
//初始化界面
$(function () {
initTableData();
ininPager();
initForm();
browserFit();
});
//浏览器适配
function browserFit() {
if (getOs() == 'MSIE') {
$("#searchDescLabel").empty().append("&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;述:");
$("#categoryNameLabel").empty().append("类型名称&nbsp;");
$("#descriptionLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
//防止表单提交重复
function initForm() {
$('#categoryFM').form({
onSubmit: function () {
return false;
}
});
}
//初始化表格数据
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,
url: '<%=path %>/category/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: 'categoryname', width: 200},
{title: '描述', field: 'description', width: 400},
{
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.categoryname + 'AaBb' + rec.isystem + 'AaBb' + rec.description;
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;';
}
return str;
}
}
]],
toolbar: [
{
id: 'addSupplier',
text: '增加',
iconCls: 'icon-add',
handler: function () {
addCategory();
}
},
{
id: 'deleteSupplier',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeleteCategory();
}
}
],
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 == "categoryName" || obj.id == "description")) {
$("#saveCategory").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) {
$.messager.confirm('删除确认', '确定要删除此资产类型信息吗?', function (r) {
if (r) {
$.ajax({
type: "post",
url: "<%=path %>/category/delete.action",
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()
{
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 %>/category/batchDelete.action",
dataType: "json",
async : false,
data: ({
categoryIDs : 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 categoryID = 0;
//保存编辑前的名称
var orgCategory = "";
function addCategory()
{
$("#clientIp").val('<%=clientIp %>');
$("#description").val("");
$('#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});
$("#categoryName").val("").focus();
//$('#categoryFM').form('clear');
orgCategory = "";
categoryID = 0;
url = '<%=path %>/category/create.action';
}
//保存信息
$("#saveCategory").unbind().bind({
click:function()
{
if(!$('#categoryFM').form('validate'))
return;
else if(checkCategoryName())
return;
else
{
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
categoryName : $.trim($("#categoryName").val()),
description : $.trim($("#description").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#categoryDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showCategoryDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存资产类别信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存资产类型信息异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息
function editCategory(categoryTotalInfo)
{
var categoryInfo = categoryTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#categoryName").focus().val(categoryInfo[1]);
$("#description").val(categoryInfo[3]);
orgCategory = categoryInfo[1];
$('#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});
categoryID = categoryInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#categoryName").val("").focus().val(categoryInfo[1]);
url = '<%=path %>/category/update.action?categoryID=' + categoryInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkCategoryName()
{
var categoryName = $.trim($("#categoryName").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(categoryName.length > 0 &&( orgCategory.length ==0 || categoryName != orgCategory))
{
$.ajax({
type:"post",
url: "<%=path %>/category/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
categoryID : categoryID,
categoryName : categoryName
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','资产类型名称已经存在','info');
//alert("供应商名称已经存在");
//$("#supplier").val("");
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查资产类型名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showCategoryDetails(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 showCategoryDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/category/findBy.action",
dataType: "json",
data: ({
categoryName:$.trim($("#searchCategory").val()),
description:$.trim($("#searchDesc").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchCategory").val("");
$("#searchDesc").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
</script>
</body>
}
});
}
//批量删除供应商
function batDeleteCategory() {
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 %>/category/batchDelete.action",
dataType: "json",
async: false,
data: ({
categoryIDs: 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 categoryID = 0;
//保存编辑前的名称
var orgCategory = "";
function addCategory() {
$("#clientIp").val('<%=clientIp %>');
$("#description").val("");
$('#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});
$("#categoryName").val("").focus();
//$('#categoryFM').form('clear');
orgCategory = "";
categoryID = 0;
url = '<%=path %>/category/create.action';
}
//保存信息
$("#saveCategory").unbind().bind({
click: function () {
if (!$('#categoryFM').form('validate'))
return;
else if (checkCategoryName())
return;
else {
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
categoryName: $.trim($("#categoryName").val()),
description: $.trim($("#description").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#categoryDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showCategoryDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存资产类别信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存资产类型信息异常,请稍后再试!', 'error');
return;
}
});
}
}
});
//编辑信息
function editCategory(categoryTotalInfo) {
var categoryInfo = categoryTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#categoryName").focus().val(categoryInfo[1]);
$("#description").val(categoryInfo[3]);
orgCategory = categoryInfo[1];
$('#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});
categoryID = categoryInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#categoryName").val("").focus().val(categoryInfo[1]);
url = '<%=path %>/category/update.action?categoryID=' + categoryInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkCategoryName() {
var categoryName = $.trim($("#categoryName").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (categoryName.length > 0 && (orgCategory.length == 0 || categoryName != orgCategory)) {
$.ajax({
type: "post",
url: "<%=path %>/category/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
categoryID: categoryID,
categoryName: categoryName
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '资产类型名称已经存在', 'info');
//alert("供应商名称已经存在");
//$("#supplier").val("");
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查资产类型名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showCategoryDetails(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 showCategoryDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/category/findBy.action",
dataType: "json",
data: ({
categoryName: $.trim($("#searchCategory").val()),
description: $.trim($("#searchDesc").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchCategory").val("");
$("#searchDesc").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
</script>
</body>
</html>

View File

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

View File

@@ -1,511 +1,496 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>仓库管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>仓库名称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td id="searchRemarkLabel">描述:</td>
<td>
<input type="text" name="searchRemark" id="searchRemark" style="width:100px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotFM" method="post" novalidate>
<table>
<tr>
<td>仓库名称</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>
</tr>
<tr>
<td>仓库地址</td>
<td style="padding:5px">
<input name="address" id="address" class="easyui-validatebox" data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr>
<tr>
<td>仓储费</td>
<td style="padding:5px">
<input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 175px;height: 20px"/>&nbsp;元/天/KG
</td>
</tr>
<tr>
<td>搬运费</td>
<td style="padding:5px">
<input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元" data-options="min:0,precision:2" style="width: 215px;height: 20px"/>&nbsp;元
</td>
</tr>
<tr>
<td>排序</td>
<td style="padding:5px">
<input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/>
</td>
</tr>
<tr>
<td>描述</td>
<td style="padding:5px">
<textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</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">
//初始化界面
$(function(){
initTableData();
ininPager();
initForm();
});
//防止表单提交重复
function initForm(){
$('#depotFM').form({
onSubmit: function(){
return false;
}
});
}
//初始化表格数据
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,
url:'<%=path %>/depot/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: 'op',align:"center",width:60,
formatter:function(value,rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb'
+ 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/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot('+ rec.id +');"/>';
}
return str;
}
},
{ title: '仓库名称',field: 'name',width:200},
{ title: '仓库地址',field: 'address',width:200},
{ title: '仓储费',field: 'warehousing',width:60},
{ title: '搬运费',field: 'truckage',width:60},
{ title: '排序',field: 'sort',width:60},
{ title: '描述',field: 'remark',width:120}
]],
toolbar:[
{
id:'addDepot',
text:'增加',
iconCls:'icon-add',
handler:function() {
addDepot();
}
},'-',
{
id:'deleteDepot',
text:'删除',
iconCls:'icon-remove',
handler:function() {
batDeleteDepot();
}
}
],
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=="name"||obj.id=="sort"|| obj.id=="remark" )) {
$("#saveDepot").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) {
$.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r) {
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;
}
});
<head>
<title>仓库管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>仓库名称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td id="searchRemarkLabel">描述:</td>
<td>
<input type="text" name="searchRemark" id="searchRemark" style="width:100px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="depotDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotFM" method="post" novalidate>
<table>
<tr>
<td>仓库名称</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>
</tr>
<tr>
<td>仓库地址</td>
<td style="padding:5px">
<input name="address" id="address" class="easyui-validatebox"
data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr>
<tr>
<td>仓储费</td>
<td style="padding:5px">
<input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2"
style="width: 175px;height: 20px"/>&nbsp;元/天/KG
</td>
</tr>
<tr>
<td>搬运费</td>
<td style="padding:5px">
<input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元"
data-options="min:0,precision:2" style="width: 215px;height: 20px"/>&nbsp;元
</td>
</tr>
<tr>
<td>排序</td>
<td style="padding:5px">
<input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/>
</td>
</tr>
<tr>
<td>描述</td>
<td style="padding:5px">
<textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</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">
//初始化界面
$(function () {
initTableData();
ininPager();
initForm();
});
//防止表单提交重复
function initForm() {
$('#depotFM').form({
onSubmit: function () {
return false;
}
});
}
//初始化表格数据
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,
url: '<%=path %>/depot/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: 'op', align: "center", width: 60,
formatter: function (value, rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb'
+ 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/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>';
}
return str;
}
},
{title: '仓库名称', field: 'name', width: 200},
{title: '仓库地址', field: 'address', width: 200},
{title: '仓储费', field: 'warehousing', width: 60},
{title: '搬运费', field: 'truckage', width: 60},
{title: '排序', field: 'sort', width: 60},
{title: '描述', field: 'remark', width: 120}
]],
toolbar: [
{
id: 'addDepot',
text: '增加',
iconCls: 'icon-add',
handler: function () {
addDepot();
}
}, '-',
{
id: 'deleteDepot',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeleteDepot();
}
}
],
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 == "name" || obj.id == "sort" || obj.id == "remark")) {
$("#saveDepot").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) {
$.messager.confirm('删除确认', '确定要删除此仓库信息吗?', function (r) {
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>

File diff suppressed because it is too large Load Diff

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 basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #EAF2FD;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #FF0000;
text-decoration: underline;
}
a:active {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}
.STYLE7 {font-size: 12}
-->
</style>
</head>
<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>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon"/>
<link href="css/admin.css" type="text/css" rel="stylesheet">
<title>首页说明</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #EAF2FD;
}
.STYLE1 {
font-size: 12px
}
.STYLE4 {
font-size: 12px;
color: #1F4A65;
font-weight: bold;
}
a:link {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:visited {
font-size: 12px;
color: #06482a;
text-decoration: none;
}
a:hover {
font-size: 12px;
color: #FF0000;
text-decoration: underline;
}
a:active {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}
.STYLE7 {
font-size: 12
}
-->
</style>
</head>
<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>

View File

@@ -1,513 +1,471 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
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);
%>
<!DOCTYPE html>
<html>
<head>
<title>收支项目</title>
<head>
<title>收支项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchTypeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
<td>
<select name="searchType" id="searchType" style="width:70px;">
<option value="">全部</option>
<option value="收入">收入</option>
<option value="支出">支出</option>
</select>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchRemarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<td>
<input type="text" name="searchRemark" id="searchRemark" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</table>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>名&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchTypeLabel">类&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
<td>
<select name="searchType" id="searchType" style="width:70px;">
<option value="">全部</option>
<option value="收入">收入</option>
<option value="支出">支出</option>
</select>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td id="searchRemarkLabel">备&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<td>
<input type="text" name="searchRemark" id="searchRemark" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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>
<!-- 数据显示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 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 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 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 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>
<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">
//初始化界面
$(function()
{
initTableData();
ininPager();
browserFit();
});
//浏览器适配
function browserFit()
{
if(getOs()=='MSIE')
<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">
//初始化界面
$(function () {
initTableData();
ininPager();
browserFit();
});
//浏览器适配
function browserFit() {
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;型:");
$("#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},
{ 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;
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;';
}
}
]],
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事件
$(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键盘事件
if(k == "13"&&(obj.id=="name" || obj.id=="remark"))
{
$("#saveInOutItem").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
});
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;
}
});
return str;
}
});
}
//批量删除收支项目
function batDeleteInOutItem()
{
var row = $('#tableData').datagrid('getChecked');
if(row.length == 0)
{
$.messager.alert('删除提示','没有记录被选中!','info');
return;
}
if(row.length > 0)
]],
toolbar: [
{
$.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;
}
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;
}
});
}
});
}
}
//增加收支项目
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;
id: 'addInOutItem',
text: '增加',
iconCls: 'icon-add',
handler: function () {
addInOutItem();
}
$('#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 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()
{
$.messager.alert('提示','检查收支项目名称是否存在异常,请稍后再试!','error');
return;
}
});
id: 'deleteInOutItem',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeleteInOutItem();
}
}
return flag;
],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showInOutItemDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
});
}
//初始化键盘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键盘事件
if (k == "13" && (obj.id == "name" || obj.id == "remark")) {
$("#saveInOutItem").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:1,
pageSize:initPageSize
});
{
pageNumber: pageNum,
pageSize: pageSize
});
showInOutItemDetails(pageNum, pageSize);
}
});
function showInOutItemDetails(pageNo,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/findBy.action",
type: "post",
url: "<%=path %>/inOutItem/delete.action",
dataType: "json",
data: ({
name:$.trim($("#searchName").val()),
type:$.trim($("#searchType").val()),
remark:$.trim($("#searchRemark").val()),
pageNo:pageNo,
pageSize:pageSize
inOutItemID: inOutItemTotalInfo[0],
name: inOutItemTotalInfo[1],
clientIp: '<%=clientIp %>'
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
success: function (tipInfo) {
var msg = tipInfo.showModel.msgTip;
if (msg == '成功')
//加载完以后重新初始化
$("#searchBtn").click();
else
$.messager.alert('删除提示', '删除收支项目失败,请稍后再试!', 'error');
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
error: function () {
$.messager.alert('删除提示', '删除收支项目异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchName").val("");
$("#searchType").val("");
$("#searchRemark").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
}
//批量删除收支项目
function batDeleteInOutItem() {
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;
}
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;
}
});
}
});
</script>
</body>
}
}
//增加收支项目
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', {
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 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 () {
$.messager.alert('提示', '检查收支项目名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
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>

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,138 +1,139 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>角色对应应用</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<head>
<title>角色对应应用</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id
var type="RoleAPP";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; }
else { return pnodes };
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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 type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id
var type = "RoleAPP";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
</script>
</body>
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') {
return cnodes;
}
else {
return pnodes
}
;
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>角色对应应用</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<head>
<title>角色对应应用</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id
var type="RoleFunctions";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; }
else { return pnodes };
};
$(function () {
$('#tt').tree({
url:'<%=path%>/functions/findRoleFunctions.action?UBType='+type+'&UBKeyId='+url_id,
animate:true,
checkbox:true
});
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id角色id
var type = "RoleFunctions";
var url;//定义链接地址
$("#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);
}
});
}
}
);
});
//检查记录是否存在
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;
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
</script>
</body>
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') {
return cnodes;
}
else {
return pnodes
}
;
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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>

View File

@@ -1,264 +1,265 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>角色分配按钮</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div id="pushList">
<!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list" closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
</div>
<head>
<title>角色分配按钮</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div id="pushList">
<!-- 数据显示table -->
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list"
closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
</div>
<script type="text/javascript">
var keyId = getUrlParam('id'); //获取传值id角色id
var pushBtnJSON;
var userBusinessId = 0; //关系id
var roleBtnStr = ""; //角色按钮权限
//初始化界面
$(function() {
initJSON();
initTableData();
ininPager();
showDetails(1,initPageSize);
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(){
<script type="text/javascript">
var keyId = getUrlParam('id'); //获取传值id角色id
var pushBtnJSON;
var userBusinessId = 0; //关系id
var roleBtnStr = ""; //角色按钮权限
//初始化界面
$(function () {
initJSON();
initTableData();
ininPager();
showDetails(1, initPageSize);
bindEvent();
});
}
});
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height:360,
rownumbers: true,
//动画效果
animate:false,
//交替出现背景
striped : true,
columns:[[
{ 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;
//初始化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 () {
}
}
else {
return "";
}
}
}
]],
onLoadError:function()
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
});
}
}
});
}
//分页信息处理
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 initTableData() {
$('#tableData').datagrid({
height: 360,
rownumbers: true,
//动画效果
animate: false,
//交替出现背景
striped: true,
columns: [[
{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;
function showDetails(pageNo,pageSize){
$.ajax({
url: "<%=path%>/userBusiness/getBasicData.action",
type: "get",
data: {
Type: 'RoleFunctions',
KeyId: keyId
},
success: function(res){
if(res && res.showModel && res.showModel.map && res.showModel.map.userBusinessList && res.showModel.map.userBusinessList[0]){
userBusinessId = res.showModel.map.userBusinessList[0].id;
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");
}
}
else {
return "";
}
}
}
]],
onLoadError: function () {
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
return;
}
});
}
//加载按钮信息到缓存中
if(roleBtnStr){
var roleBtnStrArr = JSON.parse(roleBtnStr);
bindBody.find(".datagrid-row").each(function() {
for(var i= 0; i<roleBtnStrArr.length; i++){
if(roleBtnStrArr[i] && roleBtnStrArr[i].funId){
var thisId = $(this).find("[field='Id']").text()-0;
if(roleBtnStrArr[i].funId == thisId){
$(this).find("[field='Id']").attr("data-btn", roleBtnStrArr[i].btnStr);
//加载勾选状态
$(this).find("[field='PushBtnList']").find("input").each(function () {
var thisValue = $(this).val(); //勾选的值
if(roleBtnStrArr[i].btnStr.indexOf(thisValue)>-1){
$(this).prop("checked","checked");
}
});
}
}
}
});
}
//分页信息处理
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');
}
}
//按钮勾选事件
bindBody.find("[field='PushBtnList']").find("input").off("click").on("click", function () {
var checkStr = "";
$(this).closest(".datagrid-cell").find("input").each(function () {
var thisValue = $(this).val(); //勾选的值
var isChecked = $(this).prop("checked");
if (isChecked) {
checkStr = checkStr + thisValue + ",";
}
});
if (checkStr) {
checkStr = checkStr.substring(0, checkStr.length - 1);
}
$(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr);
});
}, 500);
function showDetails(pageNo, pageSize) {
$.ajax({
url: "<%=path%>/userBusiness/getBasicData.action",
type: "get",
data: {
Type: 'RoleFunctions',
KeyId: keyId
},
success: function (res) {
if (res && res.showModel && res.showModel.map && res.showModel.map.userBusinessList && res.showModel.map.userBusinessList[0]) {
userBusinessId = res.showModel.map.userBusinessList[0].id;
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;
}
});
}
$("#btnOK").off("click").on("click", function() {
if (confirm("您确定要保存吗?")) {
var bindList = $("#pushList .datagrid-view2 .datagrid-body .datagrid-row");
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>
function bindEvent() {
setTimeout(function () {
var bindBody = $("#pushList .datagrid-view2 .datagrid-body");
//加载按钮信息到缓存中
if (roleBtnStr) {
var roleBtnStrArr = JSON.parse(roleBtnStr);
bindBody.find(".datagrid-row").each(function () {
for (var i = 0; i < roleBtnStrArr.length; i++) {
if (roleBtnStrArr[i] && roleBtnStrArr[i].funId) {
var thisId = $(this).find("[field='Id']").text() - 0;
if (roleBtnStrArr[i].funId == thisId) {
$(this).find("[field='Id']").attr("data-btn", roleBtnStrArr[i].btnStr);
//加载勾选状态
$(this).find("[field='PushBtnList']").find("input").each(function () {
var thisValue = $(this).val(); //勾选的值
if (roleBtnStrArr[i].btnStr.indexOf(thisValue) > -1) {
$(this).prop("checked", "checked");
}
});
}
}
}
});
}
//按钮勾选事件
bindBody.find("[field='PushBtnList']").find("input").off("click").on("click", function () {
var checkStr = "";
$(this).closest(".datagrid-cell").find("input").each(function () {
var thisValue = $(this).val(); //勾选的值
var isChecked = $(this).prop("checked");
if (isChecked) {
checkStr = checkStr + thisValue + ",";
}
});
if (checkStr) {
checkStr = checkStr.substring(0, checkStr.length - 1);
}
$(this).closest(".datagrid-row").find("[field='Id']").attr("data-btn", checkStr);
});
}, 500);
$("#btnOK").off("click").on("click", function () {
if (confirm("您确定要保存吗?")) {
var bindList = $("#pushList .datagrid-view2 .datagrid-body .datagrid-row");
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>

View File

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

View File

@@ -1,468 +1,455 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>计量单位管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>计量单位:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="unitDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="unitFM" method="post" novalidate>
<table>
<tr>
<td>基本单位</td>
<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"/>
基本单位应为最小度量单位
</td>
</tr>
<tr>
<td>副单位</td>
<td style="padding:5px">
<input name="otherName" id="otherName" class="easyui-validatebox" data-options="required:true,validType:'length[1,5]'" style="width: 100px;height: 20px"/>
=
<input name="otherNum" id="otherNum" class="easyui-validatebox" data-options="required:true,validType:'length[1,5]'" style="width: 50px;height: 20px"/>
<span id="unitName"></span>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</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">
//初始化界面
$(function()
{
initTableData();
ininPager();
initForm();
});
//防止表单提交重复
function initForm()
{
$('#unitFM').form({
onSubmit: function(){
return false;
}
});
}
//初始化表格数据
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,
url:'<%=path %>/unit/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: 'op',align:"center",width:60,
formatter:function(value,rec) {
var str = '';
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/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit('+ rec.id +');"/>';
}
return str;
}
},
{ title: '计量单位',field: 'UName',width:200}
]],
toolbar:[
{
id:'addUnit',
text:'增加',
iconCls:'icon-add',
handler:function() {
addUnit();
}
},'-',
{
id:'deleteUnit',
text:'删除',
iconCls:'icon-remove',
handler:function() {
batDeleteUnit();
}
}
],
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=="name")) {
$("#saveUnit").click();
}
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchName")) {
$("#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) {
$.messager.confirm('删除确认','确定要删除此计量单位吗?',function(r) {
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;
}
});
<head>
<title>计量单位管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>计量单位:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:100px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="unitDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="unitFM" method="post" novalidate>
<table>
<tr>
<td>基本单位</td>
<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"/>
基本单位应为最小度量单位
</td>
</tr>
<tr>
<td>副单位</td>
<td style="padding:5px">
<input name="otherName" id="otherName" class="easyui-validatebox"
data-options="required:true,validType:'length[1,5]'" style="width: 100px;height: 20px"/>
=
<input name="otherNum" id="otherNum" class="easyui-validatebox"
data-options="required:true,validType:'length[1,5]'" style="width: 50px;height: 20px"/>
<span id="unitName"></span>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</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">
//初始化界面
$(function () {
initTableData();
ininPager();
initForm();
});
//防止表单提交重复
function initForm() {
$('#unitFM').form({
onSubmit: function () {
return false;
}
});
}
//初始化表格数据
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,
url: '<%=path %>/unit/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: 'op', align: "center", width: 60,
formatter: function (value, rec) {
var str = '';
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/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
}
return str;
}
},
{title: '计量单位', field: 'UName', width: 200}
]],
toolbar: [
{
id: 'addUnit',
text: '增加',
iconCls: 'icon-add',
handler: function () {
addUnit();
}
}, '-',
{
id: 'deleteUnit',
text: '删除',
iconCls: 'icon-remove',
handler: function () {
batDeleteUnit();
}
}
],
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 == "name")) {
$("#saveUnit").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchName")) {
$("#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) {
$.messager.confirm('删除确认', '确定要删除此计量单位吗?', function (r) {
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() {
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 %>/unit/batchDelete.action",
dataType: "json",
async : false,
data: ({
unitIDs : 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 unitID = 0;
//保存编辑前的名称
var orgUnit = "";
function addUnit(){
$("#clientIp").val('<%=clientIp %>');
$('#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});
$('#unitFM').form('clear');
$("#name").focus();
$("#unitName").text("");
orgUnit = "";
unitID = 0;
url = '<%=path %>/unit/create.action';
}
//保存信息
$("#saveUnit").unbind().bind({
click:function()
{
if(!$('#unitFM').form('validate'))
return;
else if(checkUnitName())
return;
else
{
var basicName = $.trim($("#basicName").val());
var otherName = $.trim($("#otherName").val());
var otherNum = $.trim($("#otherNum").val());
var name = basicName + "," + otherName + "(1:" + otherNum + ")";
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
UName : name,
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#unitDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showUnitDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存计量单位失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存计量单位异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息
function editUnit(unitTotalInfo) {
var unitInfo = unitTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
orgUnit = unitInfo[1];
$('#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});
unitID = unitInfo[0];
//焦点在名称输入框==定焦在输入文字后面
var name = unitInfo[1];
var basicName = name.substring(0, name.indexOf(",")); //基础单位
$("#basicName").val(basicName);
var otherItem = name.substring(name.indexOf(",")+1);
var otherName = otherItem.substring(0,otherItem.indexOf("("));
$("#otherName").val(otherName);
var lastNum = otherItem.substring(otherItem.indexOf(":")+1);
lastNum = lastNum.replace(")","");
$("#otherNum").val(lastNum);
$("#unitName").text(basicName);
url = '<%=path %>/unit/update.action?unitID=' + unitInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkUnitName()
{
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(name.length > 0 &&( orgUnit.length ==0 || name != orgUnit))
{
$.ajax({
type:"post",
url: "<%=path %>/unit/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
unitID : unitID,
UName : name
}),
success: function (tipInfo){
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','计量单位名称已经存在','info');
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查计量单位名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showUnitDetails(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 showUnitDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/unit/findBy.action",
dataType: "json",
data: ({
UName:$.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();
}
});
}
});
}
//单位名称事件
$("#basicName").off("keyup").on("keyup", function(){
$("#unitName").text($(this).val());
});
</script>
</body>
//批量删除计量单位
function batDeleteUnit() {
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 %>/unit/batchDelete.action",
dataType: "json",
async: false,
data: ({
unitIDs: 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 unitID = 0;
//保存编辑前的名称
var orgUnit = "";
function addUnit() {
$("#clientIp").val('<%=clientIp %>');
$('#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});
$('#unitFM').form('clear');
$("#name").focus();
$("#unitName").text("");
orgUnit = "";
unitID = 0;
url = '<%=path %>/unit/create.action';
}
//保存信息
$("#saveUnit").unbind().bind({
click: function () {
if (!$('#unitFM').form('validate'))
return;
else if (checkUnitName())
return;
else {
var basicName = $.trim($("#basicName").val());
var otherName = $.trim($("#otherName").val());
var otherNum = $.trim($("#otherNum").val());
var name = basicName + "," + otherName + "(1:" + otherNum + ")";
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
UName: name,
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#unitDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showUnitDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存计量单位失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存计量单位异常,请稍后再试!', 'error');
return;
}
});
}
}
});
//编辑信息
function editUnit(unitTotalInfo) {
var unitInfo = unitTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
orgUnit = unitInfo[1];
$('#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});
unitID = unitInfo[0];
//焦点在名称输入框==定焦在输入文字后面
var name = unitInfo[1];
var basicName = name.substring(0, name.indexOf(",")); //基础单位
$("#basicName").val(basicName);
var otherItem = name.substring(name.indexOf(",") + 1);
var otherName = otherItem.substring(0, otherItem.indexOf("("));
$("#otherName").val(otherName);
var lastNum = otherItem.substring(otherItem.indexOf(":") + 1);
lastNum = lastNum.replace(")", "");
$("#otherNum").val(lastNum);
$("#unitName").text(basicName);
url = '<%=path %>/unit/update.action?unitID=' + unitInfo[0];
}
//检查名称是否存在 ++ 重名无法提示问题需要跟进
function checkUnitName() {
var name = $.trim($("#name").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (name.length > 0 && (orgUnit.length == 0 || name != orgUnit)) {
$.ajax({
type: "post",
url: "<%=path %>/unit/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
unitID: unitID,
UName: name
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '计量单位名称已经存在', 'info');
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查计量单位名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
return flag;
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showUnitDetails(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 showUnitDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/unit/findBy.action",
dataType: "json",
data: ({
UName: $.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();
}
});
//单位名称事件
$("#basicName").off("keyup").on("keyup", function () {
$("#unitName").text($(this).val());
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -1,34 +1,35 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>单据明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.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/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/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/bill_detail.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<head>
<title>单据明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.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/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/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/bill_detail.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<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"
closed="true" modal="true" cache="false" collapsible="false" closable="true">

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,297 +1,300 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>商品属性</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<title>商品属性</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>名称:</td>
<td>
<input name="searchNativeName" id="searchNativeName" style="width:120px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</table>
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>名称:</td>
<td>
<input name="searchNativeName" id="searchNativeName" style="width:120px;"/>
</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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 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="materialPropertyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="materialPropertyFM" method="post" novalidate>
<table>
<tr>
<td>名称</td>
<td style="padding:5px">
<span id="nativeName" />
</td>
</tr>
<tr>
<td>是否启用</td>
<td style="padding:5px">
<input name="enabled" id="enabled" type="checkbox" style="width: 50px;height: 20px"/>
</td>
</tr>
<tr>
<td>排序</td>
<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"/>
</td>
</tr>
<tr>
<td>别名</td>
<td style="padding:5px">
<input name="anotherName" id="anotherName" class="easyui-validatebox" data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="materialPropertyFM" method="post" novalidate>
<table>
<tr>
<td>名称</td>
<td style="padding:5px">
<span id="nativeName"/>
</td>
</tr>
<tr>
<td>是否启用</td>
<td style="padding:5px">
<input name="enabled" id="enabled" type="checkbox" style="width: 50px;height: 20px"/>
</td>
</tr>
<tr>
<td>排序</td>
<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"/>
</td>
</tr>
<tr>
<td>别名</td>
<td style="padding:5px">
<input name="anotherName" id="anotherName" class="easyui-validatebox"
data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<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="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>
</div>
<script type="text/javascript">
//初始化界面
$(function() {
initTableData();
ininPager();
initForm();
});
//初始化界面
$(function () {
initTableData();
ininPager();
initForm();
});
//防止表单提交重复
function initForm() {
$('#materialPropertyFM').form({
onSubmit: function(){
return false;
}
});
}
//防止表单提交重复
function initForm() {
$('#materialPropertyFM').form({
onSubmit: function () {
return false;
}
});
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
url:'<%=path %>/materialProperty/findBy.action?pageSize=' + initPageSize,
pagination: false,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
columns:[[
{ field: 'id',width:10,align:"center",hidden:true},
{ title: '名称',field: 'nativeName',width:100},
{ title: '是否启用',field: 'enabled',width:100,formatter:function(value,rec){
if(rec.enabled){
return "启用";
}
else {
return "禁用";
}
}},
{ title: '排序',field: 'sort',width:100},
{ title: '别名',field: 'anotherName',width:100},
{ title: '操作',field: 'op',align:"center",width:80,formatter:function(value,rec)
{
var 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');
return;
}
});
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
collapsible: false,
selectOnCheck: false,
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
url: '<%=path %>/materialProperty/findBy.action?pageSize=' + initPageSize,
pagination: false,
//交替出现背景
striped: true,
//loadFilter: pagerFilter,
columns: [[
{field: 'id', width: 10, align: "center", hidden: true},
{title: '名称', field: 'nativeName', width: 100},
{
title: '是否启用', field: 'enabled', width: 100, formatter: function (value, rec) {
if (rec.enabled) {
return "启用";
}
else {
return "禁用";
}
}
},
{title: '排序', field: 'sort', width: 100},
{title: '别名', field: 'anotherName', width: 100},
{
title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec) {
var 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');
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=="nativeName")) {
$("#saveMaterialProperty").click();
}
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchNativeName")) {
$("#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');
}
}
//初始化键盘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 == "nativeName")) {
$("#saveMaterialProperty").click();
}
//搜索按钮添加快捷键
if (k == "13" && (obj.id == "searchNativeName")) {
$("#searchBtn").click();
}
});
//增加
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({
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;
}
});
}
}
});
//增加
var url;
//编辑信息
function editMaterialProperty(totalInfo) {
var materialPropertyInfo = totalInfo.split("AaBb");
//保存信息
$("#saveMaterialProperty").unbind().bind({
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]);
$("#enabled").attr("checked",materialPropertyInfo[2]=='true'?true:false);
$("#sort").val(materialPropertyInfo[3]);
$("#anotherName").val(materialPropertyInfo[4]);
//编辑信息
function editMaterialProperty(totalInfo) {
var materialPropertyInfo = totalInfo.split("AaBb");
$('#materialPropertyDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品属性');
$(".window-mask").css({ width: webW ,height: webH});
//焦点在名称输入框==定焦在输入文字后面
$("#nativeName").val("").focus().val(materialPropertyInfo[1]);
url = '<%=path %>/materialProperty/update.action?id=' + materialPropertyInfo[0];
}
$("#clientIp").val('<%=clientIp %>');
$("#nativeName").text(materialPropertyInfo[1]);
$("#enabled").attr("checked", materialPropertyInfo[2] == 'true' ? true : false);
$("#sort").val(materialPropertyInfo[3]);
$("#anotherName").val(materialPropertyInfo[4]);
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showMaterialPropertyDetails(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
});
}
});
$('#materialPropertyDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品属性');
$(".window-mask").css({width: webW, height: webH});
//焦点在名称输入框==定焦在输入文字后面
$("#nativeName").val("").focus().val(materialPropertyInfo[1]);
url = '<%=path %>/materialProperty/update.action?id=' + materialPropertyInfo[0];
}
function showMaterialPropertyDetails(pageNo,pageSize) {
$.ajax({
type:"post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
data: ({
nativeName:$.trim($("#searchNativeName").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showMaterialPropertyDetails(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
});
}
});
//重置按钮
$("#searchResetBtn").off().on("click",function(){
$("#searchNativeName").val("");
//加载完以后重新初始化
$("#searchBtn").click();
});
function showMaterialPropertyDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
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>
</body>

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -1,510 +1,467 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>经手人管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>姓名:</td>
<td>
<input name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>类型:</td>
<td>
<select name="searchType" id="searchType" style="width:70px;">
<option value="">全部</option>
<option value="业务员">业务员</option>
<option value="仓管员">仓管员</option>
<option value="财务员">财务员</option>
</select>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="personDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="personFM" method="post" novalidate>
<table>
<tr>
<td>类型</td>
<td style="padding:5px">
<select name="Type" id="Type" style="width:230px;">
<option value="">请选择</option>
<option value="业务员">业务员</option>
<option value="仓管员">仓管员</option>
<option value="务员">务员</option>
</select>
</td>
</tr>
<tr>
<td>姓名</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>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="savePerson" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelPerson" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#personDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript">
var depotList = null;
var depotID = null;
//初始化界面
$(function()
{
//初始化系统基础信息
initSystemData();
initSelectInfo();
initTableData();
ininPager();
initForm();
});
//初始化系统基础信息
function initSystemData()
{
$.ajax({
type:"post",
url: "<%=path%>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo()
{
var options = "";
if(depotList !=null)
{
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);
}
}
//防止表单提交重复
function initForm()
{
$('#personFM').form({
onSubmit: function(){
return false;
}
});
}
//初始化表格数据
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,
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)
{
//兼容 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
});
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;
}
});
<head>
<title>经手人管理</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>姓名:</td>
<td>
<input name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>类型:</td>
<td>
<select name="searchType" id="searchType" style="width:70px;">
<option value="">全部</option>
<option value="业务员">业务员</option>
<option value="仓管员">仓管员</option>
<option value="财务员">财务员</option>
</select>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</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-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</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="personDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="personFM" method="post" novalidate>
<table>
<tr>
<td>类型</td>
<td style="padding:5px">
<select name="Type" id="Type" style="width:230px;">
<option value="">请选择</option>
<option value="务员">务员</option>
<option value="仓管员">仓管员</option>
<option value="财务员">财务员</option>
</select>
</td>
</tr>
<tr>
<td>姓名</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>
</tr>
</table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="savePerson" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelPerson" class="easyui-linkbutton" iconCls="icon-cancel"
onclick="javascript:$('#personDlg').dialog('close')">取消</a>
</div>
<script type="text/javascript">
var depotList = null;
var depotID = null;
//初始化界面
$(function () {
//初始化系统基础信息
initSystemData();
initSelectInfo();
initTableData();
ininPager();
initForm();
});
//初始化系统基础信息
function initSystemData() {
$.ajax({
type: "post",
url: "<%=path%>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo() {
var options = "";
if (depotList != null) {
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);
}
}
//防止表单提交重复
function initForm() {
$('#personFM').form({
onSubmit: function () {
return false;
}
});
}
//初始化表格数据
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,
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) {
//兼容 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
});
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()
{
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 %>/person/batchDelete.action",
dataType: "json",
async : false,
data: ({
personIDs : 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 personID = 0;
//保存编辑前的名称
var orgPerson = "";
function addPerson()
{
$("#clientIp").val('<%=clientIp %>');
$('#personFM').form('clear');
$('#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});
$("#name").val("").focus();
orgPerson = "";
personID = 0;
url = '<%=path %>/person/create.action';
}
//保存信息
$("#savePerson").unbind().bind({
click:function()
{
if(!$('#personFM').form('validate'))
return;
else
{
if(!$("#Type").val()){
$.messager.alert('提示','请选择类型!','warning');
return;
}
$.ajax({
type:"post",
url: url,
dataType: "json",
async : false,
data: ({
Type : $.trim($("#Type").val()),
Name : $.trim($("#Name").val()),
clientIp:'<%=clientIp %>'
}),
success: function (tipInfo)
{
if(tipInfo)
{
$('#personDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showPersonDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存经手人信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存经手人信息异常,请稍后再试!','error');
return;
}
});
}
}
});
//编辑信息
function editPerson(personTotalInfo)
{
var personInfo = personTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#Type").val(personInfo[1]);
$("#Name").val(personInfo[2]);
//orgPerson = personInfo[1];
$('#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});
personID = personInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(personInfo[2]);
url = '<%=path %>/person/update.action?personID=' + personInfo[0];
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
showPersonDetails(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 showPersonDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/person/findBy.action",
dataType: "json",
data: ({
Name:$.trim($("#searchName").val()),
Type:$.trim($("#searchType").val()),
pageNo:pageNo,
pageSize:pageSize
}),
success: function (data)
{
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
$("#searchProjectId").val("");
$("#searchType").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
</script>
</body>
}
});
}
//批量删除经手人
function batDeletePerson() {
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 %>/person/batchDelete.action",
dataType: "json",
async: false,
data: ({
personIDs: 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 personID = 0;
//保存编辑前的名称
var orgPerson = "";
function addPerson() {
$("#clientIp").val('<%=clientIp %>');
$('#personFM').form('clear');
$('#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});
$("#name").val("").focus();
orgPerson = "";
personID = 0;
url = '<%=path %>/person/create.action';
}
//保存信息
$("#savePerson").unbind().bind({
click: function () {
if (!$('#personFM').form('validate'))
return;
else {
if (!$("#Type").val()) {
$.messager.alert('提示', '请选择类型!', 'warning');
return;
}
$.ajax({
type: "post",
url: url,
dataType: "json",
async: false,
data: ({
Type: $.trim($("#Type").val()),
Name: $.trim($("#Name").val()),
clientIp: '<%=clientIp %>'
}),
success: function (tipInfo) {
if (tipInfo) {
$('#personDlg').dialog('close');
var opts = $("#tableData").datagrid('options');
showPersonDetails(opts.pageNumber, opts.pageSize);
}
else {
$.messager.show({
title: '错误提示',
msg: '保存经手人信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '保存经手人信息异常,请稍后再试!', 'error');
return;
}
});
}
}
});
//编辑信息
function editPerson(personTotalInfo) {
var personInfo = personTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#Type").val(personInfo[1]);
$("#Name").val(personInfo[2]);
//orgPerson = personInfo[1];
$('#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});
personID = personInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(personInfo[2]);
url = '<%=path %>/person/update.action?personID=' + personInfo[0];
}
//搜索处理
$("#searchBtn").unbind().bind({
click: function () {
showPersonDetails(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 showPersonDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/person/findBy.action",
dataType: "json",
data: ({
Name: $.trim($("#searchName").val()),
Type: $.trim($("#searchType").val()),
pageNo: pageNo,
pageSize: pageSize
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click: function () {
$("#searchProjectId").val("");
$("#searchType").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
</script>
</body>
</html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,138 +1,145 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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" />
<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>
<!-- 图片上次预览js开始 -->
<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/jquery.crop.js"></script>
<!-- 图片上次预览js结束 -->
<style type="text/css">
::-moz-focus-inner{
padding: 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;
}
<head>
<title>资产管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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"/>
<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>
<!-- 图片上次预览js开始 -->
<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/jquery.crop.js"></script>
<!-- 图片上次预览js结束 -->
.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>
<style type="text/css">
::-moz-focus-inner {
padding: 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 {
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 id="digiclock"></div>
<script type="text/javascript">
//初始化界面
$(function()
{
initColck();
//imagepreview(document.getElementById("file"), document.getElementById("preview"), function(info){
//alert("文件名:" + info.name + "\r\n图片原始高度:" + info.height + "\r\n图片原始宽度:" + info.width);
//这里若return false则不预览图片
//$("#preview").css({
//background: "none"
//});
<div id="digiclock"></div>
<script type="text/javascript">
//初始化界面
$(function () {
initColck();
//$("#preview").crop( function(e){
//$("input[type='hidden']").val([e.top, e.left, e.height, e.width].toString());
//}, ".thumb");
//imagepreview(document.getElementById("file"), document.getElementById("preview"), function(info){
//alert("文件名:" + info.name + "\r\n图片原始高度:" + info.height + "\r\n图片原始宽度:" + info.width);
//这里若return false则不预览图片
//$("#preview").css({
//background: "none"
//});
//$("#preview").crop( function(e){
//$("input[type='hidden']").val([e.top, e.left, e.height, e.width].toString());
//}, ".thumb");
//});
});
//初始化钟
function initColck()
{
$('#digiclock').jdigiclock({
clockImagesPath:"<%=path%>/js/jdigiclock/images/clock/",
weatherImagesPath:"<%=path%>/js/jdigiclock/images/weather/"
});
}
</script>
</body>
});
//初始化钟
function initColck() {
$('#digiclock').jdigiclock({
clockImagesPath: "<%=path%>/js/jdigiclock/images/clock/",
weatherImagesPath: "<%=path%>/js/jdigiclock/images/weather/"
});
}
</script>
</body>
</html>

View File

@@ -1,41 +1,42 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
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);
}
var map;
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>
</head>
<body>
<div id="map-canvas"></div>
</body>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>

View File

@@ -1,320 +1,316 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>结算账户查询</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>名称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>编号:</td>
<td>
<input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/>
</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<head>
<title>结算账户查询</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>名称:</td>
<td>
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>编号:</td>
<td>
<input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/>
</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
<div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true" modal="true" collapsible="false" closable="true">
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript">
//初始化界面
$(function()
{
initTableData();
ininPager();
print();
});
//初始化表格数据
function initTableData(){
$('#tableData').datagrid({
//iconCls:'icon-save',
//width:700,
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//fitColumns:true,
//单击行是否选中
checkOnSelect : false,
//交替出现背景
striped : true,
url:'<%=path %>/account/findBy.action?pageSize=' + initPageSize,
pagination: true,
//自动截取数据
//nowrap : true,
//loadFilter: pagerFilter,
pageSize: initPageSize,
pageList: initPageNum,
columns:[[
{ title: '名称',field: 'name',width:100},
{ title: '编号', field: 'serialNo',width:150,align:"center"},
{ title: '期初金额', field: 'initialAmount',width:100,align:"center"},
{ title: '本月发生额', field: 'thisMonthAmount',width:100,align:"center"},
{ title: '当前余额', field: 'currentAmount',width:100,align:"center"},
{ title: '操作', field: 'op',width:100,align:"center",formatter:function(value,rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name +'AaBb' + rec.serialNo +'AaBb' + rec.initialAmount +'AaBb' + rec.currentAmount;
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;
}
});
}
//初始化键盘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=="searchName"||obj.id=="searchSerialNo"))
{
$("#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)
{
$.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;
<!-- 数据显示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="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
modal="true" collapsible="false" closable="true">
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
</div>
<script type="text/javascript">
//初始化界面
$(function () {
initTableData();
ininPager();
print();
});
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
//iconCls:'icon-save',
//width:700,
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
collapsible: false,
selectOnCheck: false,
//fitColumns:true,
//单击行是否选中
checkOnSelect: false,
//交替出现背景
striped: true,
url: '<%=path %>/account/findBy.action?pageSize=' + initPageSize,
pagination: true,
//自动截取数据
//nowrap : true,
//loadFilter: pagerFilter,
pageSize: initPageSize,
pageList: initPageNum,
columns: [[
{title: '名称', field: 'name', width: 100},
{title: '编号', field: 'serialNo', width: 150, align: "center"},
{title: '期初金额', field: 'initialAmount', width: 100, align: "center"},
{title: '本月发生额', field: 'thisMonthAmount', width: 100, align: "center"},
{title: '当前余额', field: 'currentAmount', width: 100, align: "center"},
{
title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialNo + 'AaBb' + rec.initialAmount + 'AaBb' + rec.currentAmount;
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;
}
});
}
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);
}
//初始化键盘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 == "searchName" || obj.id == "searchSerialNo")) {
$("#searchBtn").click();
}
});
//初始化表格数据
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>";
//分页信息处理
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) {
$.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},
{
title: '金额', field: 'changeAmount', width: 80,
formatter: function (value, row) {
if (row.aList && row.amList) {
var aListArr = row.aList.toString().split(",");
var amListArr = row.amList.toString().split(",");
var res = "";
for (var i = 0; i < aListArr.length; i++) {
if (aListArr[i] == accountId) {
res = amListArr[i];
}
}
},
{ title: '类型', field: 'type',width:100},
{ title: '单位信息', field: 'supplierName',width:150},
{ title: '金额', field: 'changeAmount',width:80,
formatter: function (value, row) {
if(row.aList && row.amList) {
var aListArr = row.aList.toString().split(",");
var amListArr = row.amList.toString().split(",");
var res = "";
for(var i=0; i<aListArr.length; i++) {
if(aListArr[i] == accountId) {
res = amListArr[i];
}
}
return res + "[多账户]";
}
else {
return row.changeAmount;
}
}
},
{ title: '余额', field: 'balance',width:80},
{ title: '入库出库日期',field: 'operTime',width:180}
]],
onLoadError:function() {
$.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){
try {
var opts = $("#accountTableData").datagrid('options');
var pager = $("#accountTableData").datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber:pageNum,
pageSize:pageSize
});
getAccountInOutList(accountId,initialAmount,pageNum,pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//分页信息处理
function ininAccountDetailPager(accountId, initialAmount) {
try {
var opts = $("#accountTableData").datagrid('options');
var pager = $("#accountTableData").datagrid('getPager');
pager.pagination({
onSelectPage: function (pageNum, pageSize) {
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh', {
pageNumber: pageNum,
pageSize: pageSize
});
getAccountInOutList(accountId, initialAmount, pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
function getAccountInOutList(accountId,initialAmount,pageNo,pageSize){
$.ajax({
type:"get",
url: "<%=path %>/account/findAccountInOutList.action",
dataType: "json",
data: ({
accountID: accountId,
initialAmount: initialAmount,
pageNo:pageNo,
pageSize:pageSize
}),
success: function (res) {
$("#accountTableData").datagrid('loadData',res);
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
function getAccountInOutList(accountId, initialAmount, pageNo, pageSize) {
$.ajax({
type: "get",
url: "<%=path %>/account/findAccountInOutList.action",
dataType: "json",
data: ({
accountID: accountId,
initialAmount: initialAmount,
pageNo: pageNo,
pageSize: pageSize
}),
success: function (res) {
$("#accountTableData").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>
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html>

View File

@@ -1,266 +1,256 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>进货统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>月份:</td>
<td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
print();
});
<head>
<title>进货统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>月份:</td>
<td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
class="txt Wdate" style="width:180px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
//初始化商品属性
function initMProperty(){
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
pagination: true,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '名称',field: 'MaterialName',width:60},
{ title: '型号',field: 'MaterialModel',width:80},
{ title: '扩展信息',field: 'MaterialOther',width:150},
{ title: '单位',field: 'MaterialUnit',width:80},
{ title: '进货数量',field: 'InSum',width:60},
{ title: '进货金额',field: 'InSumPrice',width:60},
{ title: '退货数量',field: 'OutSum',width:60},
{ title: '退货金额',field: 'OutSumPrice',width:60}
]],
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=="searchMonth"))
{
$("#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');
}
}
<!-- 数据显示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>
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/findByMonth.action",
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) {
$.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);
},
//此处添加错误处理
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>
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
print();
});
//初始化商品属性
function initMProperty() {
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
pagination: true,
//交替出现背景
striped: true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10, 50, 100],
columns: [[
{title: '名称', field: 'MaterialName', width: 60},
{title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80},
{title: '进货数量', field: 'InSum', width: 60},
{title: '进货金额', field: 'InSumPrice', width: 60},
{title: '退货数量', field: 'OutSum', width: 60},
{title: '退货金额', field: 'OutSumPrice', width: 60}
]],
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 == "searchMonth")) {
$("#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);
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/findByMonth.action",
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) {
$.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);
},
//此处添加错误处理
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>

View File

@@ -1,368 +1,364 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>客户对账</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td>&nbsp;</td>
<td>
期初应收:<span class="first-total">0</span>&nbsp;&nbsp;
期末应收:<span class="last-total">0</span>
</td>
</tr>
</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>
<script type="text/javascript">
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
initSupplier(); //初始化客户信息
initTableData();
ininPager();
search();
print();
});
<head>
<title>客户对账</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td>&nbsp;</td>
<td>
期初应收:<span class="first-total">0</span>&nbsp;&nbsp;
期末应收:<span class="last-total">0</span>
</td>
</tr>
</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>
<script type="text/javascript">
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
initSupplier(); //初始化客户信息
initTableData();
ininPager();
search();
print();
});
//初始化客户
function initSupplier(){
$('#OrganId').combobox({
url: cusUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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>";
//初始化客户
function initSupplier() {
$('#OrganId').combobox({
url: cusUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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: '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},
{ 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 = "";
});
}
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//搜索处理
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>
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html>

View File

@@ -1,262 +1,264 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>礼品卡统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>礼品卡:</td>
<td>
<input id="searchGiftId" name="searchGiftId" style="width:110px;" />
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</td>
</tr>
</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>
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function(){
var userBusinessList=null;
var userdepot=null;
initGift();
initMProperty(); //初始化商品属性
initTableData();
ininPager();
});
<head>
<title>礼品卡统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>礼品卡:</td>
<td>
<input id="searchGiftId" name="searchGiftId" style="width:110px;"/>
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
</td>
</tr>
</table>
</div>
//初始化-礼品卡
function initGift(){
$('#searchGiftId').combobox({
url: "<%=path %>/depot/findGiftByType.action?type=1",
valueField:'id',
textField:'name'
});
<!-- 数据显示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>
//当会员卡号长度超过10位后自动点击下拉框用于兼容刷卡器
$("#searchGiftId").next().find("input").off("keyup").on("keyup",function(){
var self = this;
if($(this).val().length === 10){
setTimeout(function(){
$(".combo-panel .combobox-item-selected").click();
search();
},500);
}
});
}
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function () {
var userBusinessList = null;
var userdepot = null;
initGift();
initMProperty(); //初始化商品属性
initTableData();
ininPager();
});
//初始化商品属性
function initMProperty(){
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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 initGift() {
$('#searchGiftId').combobox({
url: "<%=path %>/depot/findGiftByType.action?type=1",
valueField: 'id',
textField: 'name'
});
//初始化表格数据
function initTableData(){
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
pagination: true,
//交替出现背景
striped : true,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '名称',field: 'MaterialName',width:60},
{ title: '型号',field: 'MaterialModel',width:80},
{ title: '扩展信息',field: 'MaterialOther',width:150},
{ title: '单位',field: 'MaterialUnit',width:80},
{ title: '结存数量',field: 'thisSum',width:80}
]],
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
});
showPersonDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//当会员卡号长度超过10位后自动点击下拉框用于兼容刷卡器
$("#searchGiftId").next().find("input").off("keyup").on("keyup", function () {
var self = this;
if ($(this).val().length === 10) {
setTimeout(function () {
$(".combo-panel .combobox-item-selected").click();
search();
}, 500);
}
});
}
//搜索处理
function search() {
showPersonDetails(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() {
var giftId = $('#searchGiftId').combobox('getValue'); //礼品卡Id
if(giftId) {
search();
}
else {
$.messager.alert('查询提示','请选择一张礼品卡!','warning');
}
}
});
function showPersonDetails(pageNo,pageSize) {
var searchGiftId = $("#searchGiftId").combobox("getValue");
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findGiftReport.action",
dataType: "json",
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) {
$.ajax({
type:"post",
url: "<%=path %>/depotItem/findGiftByAll.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
ProjectId: searchGiftId,
HeadIds: HeadIds,
MaterialIds: MIds,
mpList: mPropertyList
}),
success: function (data) {
$("#tableData").datagrid('loadData',data);
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
else {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
}
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
else {
$.messager.alert('查询提示','该礼品卡无数据!','warning');
}
},
//此处添加错误处理
error:function() {
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
}
</script>
</body>
//初始化商品属性
function initMProperty() {
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
pagination: true,
//交替出现背景
striped: true,
pageSize: 10,
pageList: [10, 50, 100],
columns: [[
{title: '名称', field: 'MaterialName', width: 60},
{title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80},
{title: '结存数量', field: 'thisSum', width: 80}
]],
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
});
showPersonDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//搜索处理
function search() {
showPersonDetails(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 () {
var giftId = $('#searchGiftId').combobox('getValue'); //礼品卡Id
if (giftId) {
search();
}
else {
$.messager.alert('查询提示', '请选择一张礼品卡!', 'warning');
}
}
});
function showPersonDetails(pageNo, pageSize) {
var searchGiftId = $("#searchGiftId").combobox("getValue");
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findGiftReport.action",
dataType: "json",
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) {
$.ajax({
type: "post",
url: "<%=path %>/depotItem/findGiftByAll.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
ProjectId: searchGiftId,
HeadIds: HeadIds,
MaterialIds: MIds,
mpList: mPropertyList
}),
success: function (data) {
$("#tableData").datagrid('loadData', data);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
else {
$.messager.alert('查询提示', '该礼品卡无数据!', 'warning');
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
</script>
</body>
</html>

View File

@@ -1,346 +1,332 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>入库明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList=null;
var userdepot=null;
initSupplier(); //初始化供应商信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
<head>
<title>入库明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
//初始化供应商
function initSupplier(){
$('#OrganId').combobox({
url: supUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
<!-- 数据显示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>
//初始化系统基础信息
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: uid,
Type:"UserDepot"
}),
//设置为同步
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;
}
}
});
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList = null;
var userdepot = null;
initSupplier(); //初始化供应商信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
}
//初始化页面选项卡
function initSelectInfo_UB(){
//初始化供应商
function initSupplier() {
$('#OrganId').combobox({
url: supUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
//用户对应的仓库列表 [1][2][3]...
userdepot =userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_UB() {
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: uid,
Type: "UserDepot"
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_UB() {
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
//用户对应的仓库列表 [1][2][3]...
userdepot = userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
//初始化系统基础信息
function initSystemData_depot() {
$.ajax({
type: "post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
//初始化页面选项卡
function initSelectInfo_depot() {
var options = "";
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
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);
}
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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)
{
//兼容 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 = "";
if (depotList != null) {
options = "";
for (var i = 0; i < depotList.length; i++) {
var depot = depotList[i];
//搜索处理
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/findInDetail.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>
if (userdepot != null) {
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
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);
}
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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) {
//兼容 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/findInDetail.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>

View File

@@ -1,336 +1,321 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>入库汇总</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var kid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList=null;
var userdepot=null;
initSupplier(); //初始化供应商信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
<head>
<title>入库汇总</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var kid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
//初始化供应商
function initSupplier(){
$('#OrganId').combobox({
url: supUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
<!-- 数据显示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>
//初始化系统基础信息
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId:kid,
Type:"UserDepot"
}),
//设置为同步
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;
}
}
});
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList = null;
var userdepot = null;
initSupplier(); //初始化供应商信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
}
//初始化页面选项卡
function initSelectInfo_UB(){
//初始化供应商
function initSupplier() {
$('#OrganId').combobox({
url: supUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
//用户对应的仓库列表 [1][2][3]...
userdepot =userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_UB() {
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: kid,
Type: "UserDepot"
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_UB() {
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
//用户对应的仓库列表 [1][2][3]...
userdepot = userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
//初始化系统基础信息
function initSystemData_depot() {
$.ajax({
type: "post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
//初始化页面选项卡
function initSelectInfo_depot() {
var options = "";
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
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);
}
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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)
{
//兼容 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 = "";
if (depotList != null) {
options = "";
for (var i = 0; i < depotList.length; i++) {
var depot = depotList[i];
//搜索处理
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/findInOutMaterialCount.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>
if (userdepot != null) {
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
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);
}
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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) {
//兼容 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/findInOutMaterialCount.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>

View File

@@ -1,444 +1,422 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>库存状况</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var kid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</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>&nbsp;</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-redo" id="exprotBtn">导出</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
&nbsp;&nbsp;<span class="total-count"></span>
</td>
</tr>
</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>
<script type="text/javascript">
var depotList = null;
var depotID = null;
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
var userBusinessList=null;
var userdepot=null;
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
exportExcel();
print();
});
//导出EXCEL
function exportExcel() {
$("#exprotBtn").off("click").on("click",function(){
if(!$("#searchPanel .total-count").text()) {
$.messager.alert('导出提示','请先选择月份再进行查询!','error');
}
else {
showEachDetails(1,3000);
//此处直接去做get请求用下面的查询每月统计的方法去获取list参数长度虽长但还是可以用get
//window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs();
}
});
}
<head>
<title>库存状况</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var kid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</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>&nbsp;</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-redo" id="exprotBtn">导出</a>
&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
&nbsp;&nbsp;<span class="total-count"></span>
</td>
</tr>
</table>
</div>
//初始化系统基础信息
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId:kid,
Type:"UserDepot"
}),
//设置为同步
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;
}
}
});
<!-- 数据显示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>
}
//初始化页面选项卡
function initSelectInfo_UB(){
<script type="text/javascript">
var depotList = null;
var depotID = null;
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
var userBusinessList = null;
var userdepot = null;
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
exportExcel();
print();
});
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
//用户对应的仓库列表 [1][2][3]...
userdepot =userBusinessList[0].value;
}
}
}
//导出EXCEL
function exportExcel() {
$("#exprotBtn").off("click").on("click", function () {
if (!$("#searchPanel .total-count").text()) {
$.messager.alert('导出提示', '请先选择月份再进行查询!', 'error');
}
else {
showEachDetails(1, 3000);
//此处直接去做get请求用下面的查询每月统计的方法去获取list参数长度虽长但还是可以用get
//window.location.href = "<%=path%>/depotItem/exportExcel.action?browserType=" + getOs();
}
});
}
//初始化系统基础信息
function initSystemData_UB() {
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: kid,
Type: "UserDepot"
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_UB() {
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
//用户对应的仓库列表 [1][2][3]...
userdepot = userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
//初始化系统基础信息
function initSystemData_depot() {
$.ajax({
type: "post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
//初始化页面选项卡
function initSelectInfo_depot() {
var options = "";
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
}
}
}
$("#searchProjectId").empty().append(options);
}
}
if (depotList != null) {
options = "";
for (var i = 0; i < depotList.length; i++) {
var depot = depotList[i];
//初始化商品属性
function initMProperty(){
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
pagination: true,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '名称',field: 'MaterialName',width:60},
{ title: '型号',field: 'MaterialModel',width:80},
{ title: '扩展信息',field: 'MaterialOther',width:150},
{ title: '单位',field: 'MaterialUnit',width:80},
{ title: '单价',field: 'UnitPrice',width:60,formatter: function(value,row,index){
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)
{
//兼容 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
});
showEachDetails(pageNum,pageSize);
}
});
}
catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
if (userdepot != null) {
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
}
}
}
$("#searchProjectId").empty().append(options);
}
}
//搜索处理
function search() {
showEachDetails(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 showEachDetails(pageNo,pageSize)
{
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findByMonth.action",
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);
},
//此处添加错误处理
error:function()
{
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
return;
}
});
//总金额
$.ajax({
type:"post",
url: "<%=path %>/depotItem/totalCountMoney.action",
dataType: "json",
data: ({
ProjectId: $.trim($("#searchProjectId").val()),
MonthTime:$("#searchMonth").val(),
HeadIds:HeadIds,
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>
//初始化商品属性
function initMProperty() {
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
pagination: true,
//交替出现背景
striped: true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10, 50, 100],
columns: [[
{title: '名称', field: 'MaterialName', width: 60},
{title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80},
{
title: '单价', field: 'UnitPrice', width: 60, formatter: function (value, row, index) {
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) {
//兼容 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
});
showEachDetails(pageNum, pageSize);
}
});
}
catch (e) {
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
}
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//搜索处理
function search() {
showEachDetails(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 showEachDetails(pageNo, pageSize) {
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findByMonth.action",
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);
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
//总金额
$.ajax({
type: "post",
url: "<%=path %>/depotItem/totalCountMoney.action",
dataType: "json",
data: ({
ProjectId: $.trim($("#searchProjectId").val()),
MonthTime: $("#searchMonth").val(),
HeadIds: HeadIds,
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>

View File

@@ -1,346 +1,332 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>出库明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
<head>
<title>出库明细</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<!-- 数据显示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>
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList=null;
var userdepot=null;
initSupplier(); //初始化客户信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList = null;
var userdepot = null;
initSupplier(); //初始化客户信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
//初始化客户
function initSupplier(){
$('#OrganId').combobox({
url: cusUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
//初始化客户
function initSupplier() {
$('#OrganId').combobox({
url: cusUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
//初始化系统基础信息
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: uid,
Type:"UserDepot"
}),
//设置为同步
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;
}
}
});
//初始化系统基础信息
function initSystemData_UB() {
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: uid,
Type: "UserDepot"
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_UB(){
}
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
//用户对应的仓库列表 [1][2][3]...
userdepot =userBusinessList[0].value;
}
}
}
//初始化页面选项卡
function initSelectInfo_UB() {
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
//用户对应的仓库列表 [1][2][3]...
userdepot = userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
//初始化系统基础信息
function initSystemData_depot() {
$.ajax({
type: "post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
//初始化页面选项卡
function initSelectInfo_depot() {
var options = "";
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
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 (depotList != null) {
options = "";
for (var i = 0; i < depotList.length; i++) {
var depot = depotList[i];
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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;
}
});
}
if (userdepot != null) {
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
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);
}
}
//初始化键盘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');
}
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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;
}
});
}
//增加
var url;
var personID = 0;
//保存编辑前的名称
var orgPerson = "";
//初始化键盘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 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 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 showDetails(pageNo,pageSize)
{
$.ajax({
type: "post",
url: "<%=path %>/depotHead/findInDetail.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>
//增加
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/findInDetail.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>

View File

@@ -1,336 +1,321 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>出库汇总</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</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>
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList=null;
var userdepot=null;
initSupplier(); //初始化客户信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
<head>
<title>出库汇总</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>客户:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</td>
<td>&nbsp;</td>
<td>仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
</tr>
</table>
</div>
//初始化客户
function initSupplier(){
$('#OrganId').combobox({
url: cusUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
<!-- 数据显示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>
//初始化系统基础信息
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId:uid,
Type:"UserDepot"
}),
//设置为同步
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;
}
}
});
<script type="text/javascript">
var depotList = null;
var depotID = null;
var depotString = ""; //仓库列表
var path = "<%=path %>";
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
var userBusinessList = null;
var userdepot = null;
initSupplier(); //初始化客户信息
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
initSelectInfo_depot();
initTableData();
ininPager();
search();
print();
});
}
//初始化页面选项卡
function initSelectInfo_UB(){
//初始化客户
function initSupplier() {
$('#OrganId').combobox({
url: cusUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
//用户对应的仓库列表 [1][2][3]...
userdepot =userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_UB() {
$.ajax({
type: "post",
url: "<%=path %>/userBusiness/getBasicData.action",
data: ({
KeyId: uid,
Type: "UserDepot"
}),
//设置为同步
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;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_UB() {
if (userBusinessList != null) {
if (userBusinessList.length > 0) {
//用户对应的仓库列表 [1][2][3]...
userdepot = userBusinessList[0].value;
}
}
}
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
success: function (systemInfo)
{
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if(msgTip == "exceptoin")
{
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
return;
}
}
});
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
//初始化系统基础信息
function initSystemData_depot() {
$.ajax({
type: "post",
url: "<%=path %>/depot/getBasicData.action",
//设置为同步
async: false,
dataType: "json",
success: function (systemInfo) {
depotList = systemInfo.showModel.map.depotList;
var msgTip = systemInfo.showModel.msgTip;
if (msgTip == "exceptoin") {
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
return;
}
}
});
}
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
//初始化页面选项卡
function initSelectInfo_depot() {
var options = "";
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
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);
}
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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)
{
//兼容 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 = "";
if (depotList != null) {
options = "";
for (var i = 0; i < depotList.length; i++) {
var depot = depotList[i];
//搜索处理
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/findInOutMaterialCount.action",
dataType: "json",
data: ({
pageNo:pageNo,
pageSize:pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>
if (userdepot != null) {
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
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);
}
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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) {
//兼容 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/findInOutMaterialCount.action",
dataType: "json",
data: ({
pageNo: pageNo,
pageSize: pageSize,
OrganId: $('#OrganId').combobox('getValue'),
ProjectId: $.trim($("#searchProjectId").val()),
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>

View File

@@ -1,269 +1,259 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>销售统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>月份:</td>
<td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td><span class="tip">注:此处包含零售+批发销售</span></td>
</tr>
</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>
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function()
{
$("#searchTable .tip").css("padding-left","15px").css("color","red");
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
print();
});
<head>
<title>销售统计</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/common/common.js"></script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>月份:</td>
<td>
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
class="txt Wdate" style="width:180px;"/>
</td>
<td>&nbsp;</td>
<td>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td><span class="tip">注:此处包含零售+批发销售</span></td>
</tr>
</table>
</div>
//初始化商品属性
function initMProperty(){
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
singleSelect : true,
pagination: true,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10,50,100],
columns:[[
{ title: '名称',field: 'MaterialName',width:60},
{ title: '型号',field: 'MaterialModel',width:80},
{ title: '扩展信息',field: 'MaterialOther',width:150},
{ title: '单位',field: 'MaterialUnit',width:80},
{ title: '销售数量',field: 'OutSum',width:60},
{ title: '销售金额',field: 'OutSumPrice',width:60},
{ title: '退货数量',field: 'InSum',width:60},
{ title: '退货金额',field: 'InSumPrice',width:60}
]],
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=="searchMonth"))
{
$("#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);
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/findByMonth.action",
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) {
$.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);
},
//此处添加错误处理
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>
<!-- 数据显示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>
<script type="text/javascript">
var mPropertyList = ""; //商品属性列表
//初始化界面
$(function () {
$("#searchTable .tip").css("padding-left", "15px").css("color", "red");
var thisDate = getNowFormatMonth(); //当前月份
$("#searchMonth").val(thisDate);
initMProperty(); //初始化商品属性
initTableData();
ininPager();
search();
print();
});
//初始化商品属性
function initMProperty() {
$.ajax({
type: "post",
url: "<%=path %>/materialProperty/findBy.action",
dataType: "json",
success: function (res) {
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() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
singleSelect: true,
pagination: true,
//交替出现背景
striped: true,
//loadFilter: pagerFilter,
pageSize: 10,
pageList: [10, 50, 100],
columns: [[
{title: '名称', field: 'MaterialName', width: 60},
{title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80},
{title: '销售数量', field: 'OutSum', width: 60},
{title: '销售金额', field: 'OutSumPrice', width: 60},
{title: '退货数量', field: 'InSum', width: 60},
{title: '退货金额', field: 'InSumPrice', width: 60}
]],
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 == "searchMonth")) {
$("#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);
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/findByMonth.action",
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) {
$.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);
},
//此处添加错误处理
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>

View File

@@ -1,368 +1,364 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>供应商对账</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;" />
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td>&nbsp;</td>
<td>
期初应付:<span class="first-total">0</span>&nbsp;&nbsp;
期末应付:<span class="last-total">0</span>
</td>
</tr>
</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>
<script type="text/javascript">
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function()
{
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
initSupplier(); //初始化供应商信息
initTableData();
ininPager();
search();
print();
});
<head>
<title>供应商对账</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/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/icon.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/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/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script>
var uid = ${sessionScope.user.id};
</script>
</head>
<body>
<!-- 查询 -->
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
closable="false">
<table id="searchTable">
<tr>
<td>供应商:</td>
<td>
<input id="OrganId" name="OrganId" style="width:120px;"/>
</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>-</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>&nbsp;</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-print" id="printBtn">打印</a>
</td>
<td>&nbsp;</td>
<td>
期初应付:<span class="first-total">0</span>&nbsp;&nbsp;
期末应付:<span class="last-total">0</span>
</td>
</tr>
</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>
<script type="text/javascript">
var path = "<%=path %>";
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
//初始化界面
$(function () {
var thisDate = getNowFormatMonth(); //当前月份
var thisDateTime = getNowFormatDateTime(); //当前时间
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
$("#searchEndTime").val(thisDateTime);
initSupplier(); //初始化供应商信息
initTableData();
ininPager();
search();
print();
});
//初始化供应商
function initSupplier(){
$('#OrganId').combobox({
url: supUrl,
valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) >-1;
}
});
}
//初始化表格数据
function initTableData()
{
$('#tableData').datagrid({
height:heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate:false,
//选中单行
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>";
//初始化供应商
function initSupplier() {
$('#OrganId').combobox({
url: supUrl,
valueField: 'id',
textField: 'supplier',
filter: function (q, row) {
var opts = $(this).combobox('options');
return row[opts.textField].indexOf(q) > -1;
}
});
}
//初始化表格数据
function initTableData() {
$('#tableData').datagrid({
height: heightInfo,
nowrap: false,
rownumbers: true,
//动画效果
animate: false,
//选中单行
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: '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},
{ 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 = "";
});
}
}
},
//此处添加错误处理
error: function () {
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
return;
}
});
}
//搜索处理
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>
//报表打印
function print() {
$("#printBtn").off("click").on("click", function () {
var path = "<%=path %>";
CreateFormPage('打印报表', $('#tableData'), path);
});
}
</script>
</body>
</html>

View File

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

View File

@@ -1,136 +1,137 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>用户对应客户</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<head>
<title>用户对应客户</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserCustomer";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; }
else { return pnodes };
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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 type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type = "UserCustomer";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
</script>
</body>
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') {
return cnodes;
}
else {
return pnodes
}
;
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>用户对应部门</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<head>
<title>用户对应部门</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserDepot";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; }
else { return pnodes };
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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 type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type = "UserDepot";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
</script>
</body>
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') {
return cnodes;
}
else {
return pnodes
}
;
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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>

View File

@@ -1,137 +1,138 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
<title>用户对应角色</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<head>
<title>用户对应角色</title>
<meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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>
<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 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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/js/common/common.js"></script>
</head>
<body>
<!-- 数据显示table -->
<div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div>
<div>
<ul id="tt"></ul>
</div>
<script type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type="UserRole";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { return cnodes; }
else { return pnodes };
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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 type="text/javascript">
var url_id = getUrlParam('id'); //获取传值id用户id
var type = "UserRole";
var url;//定义链接地址
function GetNode(ctype) {
var node = $('#tt').tree('getChecked');
var cnodes = '';
var pnodes = '';
var prevNode = ''; //保存上一步所选父节点
for (var i = 0; i < node.length; i++) {
if ($('#tt').tree('isLeaf', node[i].target)) {
cnodes += '[' + node[i].id + ']';
var pnode = $('#tt').tree('getParent', node[i].target); //获取当前节点的父节点
if (prevNode != pnode.id) //保证当前父节点与上一次父节点不同
{
pnodes += '[' + pnode.id + ']';
prevNode = pnode.id; //保存当前节点
}
}
}
</script>
</body>
//cnodes = cnodes.substring(0, cnodes.length - 1);
pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') {
return cnodes;
}
else {
return pnodes
}
;
};
$(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);
}
});
}
}
);
});
//检查记录是否存在
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>

View File

@@ -1,198 +1,188 @@
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.jsh.util.Tools" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getLocalIp(request);
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.css"/>
<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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<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 "
buttons="#dlg-buttons" iconCls="icon-comment" collapsible="true" closable="false">
<form id="usernameFM" method="post" novalidate action="<%=path %>/user/update.action">
<div class="fitem" style="padding:5px">
<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"/>
</div>
<div class="fitem" style="padding:5px">
<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}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="positionLabel">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;</label>
<input name="position" id="position" style="width: 230px;height: 20px" value="${sessionScope.user.position}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="phonenumLabel">联系电话&nbsp;&nbsp;</label>
<input name="phonenum" id="phonenum" class="easyui-numberbox" style="width: 230px;height: 20px" value="${sessionScope.user.phonenum}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="emailLabel">电子邮箱&nbsp;&nbsp;</label>
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 230px;height: 20px" value="${sessionScope.user.email}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
<textarea name="description" id="description" rows="3" cols="3" style="width: 230px;font-size: 12px;">${sessionScope.user.description}</textarea>
</div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<input type="hidden" name="userID" id="userID" value="${sessionScope.user.id}"/>
</form>
<div style="clear: both;">&nbsp;</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">
//初始化界面
$(function()
{
browserFit();
$("#userDlg").panel({height:webH-35});
});
//浏览器适配
function browserFit()
{
if(getOs()=='MSIE')
{
$("#usernameLabel").empty().append("用户名称&nbsp;&nbsp;");
$("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;");
$("#positionLabel").empty().append("职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;");
$("#phonenumLabel").empty().append("联系电话&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;");
$("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;");
$("#positionLabel").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({
click:function()
{
history.go(-1);
}
});
//初始化键盘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键盘事件
if(k == "13"&&(obj.id=="username" || obj.id=="department"|| obj.id=="phonenum"
|| obj.id=="email" || obj.id=="description" || obj.id=="position"))
{
$("#saveusername").click();
}
});
//保存用户信息
$("#saveusername").unbind().bind({
click:function()
{
if(checkusernameName())
return;
var reg = /^([0-9])+$/;
var phonenum = $.trim($("#phonenum").val());
if(phonenum.length>0 && !reg.test(phonenum))
{
$.messager.alert('提示','电话号码只能是数字','info');
$("#phonenum").val("").focus();
return;
}
$('#usernameFM').form('submit',{
onSubmit: function()
{
return $(this).form('validate');
},
success: function(result)
{
var result = eval('('+result+')');
if (!result)
{
$.messager.show({
title: '错误提示',
msg: '保存用户信息失败,请稍后重试!'
});
}
else
{
$.messager.alert('提示','修改个人资料成功!','info');
}
}
});
}
});
//检查用户 名称是否存在 ++ 重名无法提示问题需要跟进
function checkusernameName()
{
var username = $.trim($("#username").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if(username.length > 0 && username != '${sessionScope.user.username}')
{
$.ajax({
type:"post",
url: "<%=path %>/user/checkIsNameExist.action",
dataType: "json",
async : false,
data: ({
userID : '${sessionScope.user.id}',
username : username
}),
success: function (tipInfo)
{
flag = tipInfo;
if(tipInfo)
{
$.messager.alert('提示','用户名称已经存在','info');
//alert("用户名称已经存在");
//$("#username").val("");
return;
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','检查用户名称是否存在异常,请稍后再试!','error');
return;
}
});
}
return flag;
}
</script>
</body>
<head>
<title>个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<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/icon.css"/>
<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/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
</head>
<body>
<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 "
buttons="#dlg-buttons" iconCls="icon-comment" collapsible="true" closable="false">
<form id="usernameFM" method="post" novalidate action="<%=path %>/user/update.action">
<div class="fitem" style="padding:5px">
<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"/>
</div>
<div class="fitem" style="padding:5px">
<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}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="positionLabel">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;</label>
<input name="position" id="position" style="width: 230px;height: 20px"
value="${sessionScope.user.position}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="phonenumLabel">联系电话&nbsp;&nbsp;</label>
<input name="phonenum" id="phonenum" class="easyui-numberbox" style="width: 230px;height: 20px"
value="${sessionScope.user.phonenum}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="emailLabel">电子邮箱&nbsp;&nbsp;</label>
<input name="email" id="email" class="easyui-validatebox" validType="email"
style="width: 230px;height: 20px" value="${sessionScope.user.email}"/>
</div>
<div class="fitem" style="padding:5px">
<label id="descriptionLabel">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;</label>
<textarea name="description" id="description" rows="3" cols="3"
style="width: 230px;font-size: 12px;">${sessionScope.user.description}</textarea>
</div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<input type="hidden" name="userID" id="userID" value="${sessionScope.user.id}"/>
</form>
<div style="clear: both;">&nbsp;</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">
//初始化界面
$(function () {
browserFit();
$("#userDlg").panel({height: webH - 35});
});
//浏览器适配
function browserFit() {
if (getOs() == 'MSIE') {
$("#usernameLabel").empty().append("用户名称&nbsp;&nbsp;");
$("#departmentLabel").empty().append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
$("#positionLabel").empty().append("职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位&nbsp;&nbsp;");
$("#phonenumLabel").empty().append("联系电话&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;");
$("#departmentLabel").empty().append("部&nbsp;&nbsp;&nbsp;&nbsp;门&nbsp;");
$("#positionLabel").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({
click: function () {
history.go(-1);
}
});
//初始化键盘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键盘事件
if (k == "13" && (obj.id == "username" || obj.id == "department" || obj.id == "phonenum"
|| obj.id == "email" || obj.id == "description" || obj.id == "position")) {
$("#saveusername").click();
}
});
//保存用户信息
$("#saveusername").unbind().bind({
click: function () {
if (checkusernameName())
return;
var reg = /^([0-9])+$/;
var phonenum = $.trim($("#phonenum").val());
if (phonenum.length > 0 && !reg.test(phonenum)) {
$.messager.alert('提示', '电话号码只能是数字', 'info');
$("#phonenum").val("").focus();
return;
}
$('#usernameFM').form('submit', {
onSubmit: function () {
return $(this).form('validate');
},
success: function (result) {
var result = eval('(' + result + ')');
if (!result) {
$.messager.show({
title: '错误提示',
msg: '保存用户信息失败,请稍后重试!'
});
}
else {
$.messager.alert('提示', '修改个人资料成功!', 'info');
}
}
});
}
});
//检查用户 名称是否存在 ++ 重名无法提示问题需要跟进
function checkusernameName() {
var username = $.trim($("#username").val());
//表示是否存在 true == 存在 false = 不存在
var flag = false;
//开始ajax名称检验不能重名
if (username.length > 0 && username != '${sessionScope.user.username}') {
$.ajax({
type: "post",
url: "<%=path %>/user/checkIsNameExist.action",
dataType: "json",
async: false,
data: ({
userID: '${sessionScope.user.id}',
username: username
}),
success: function (tipInfo) {
flag = tipInfo;
if (tipInfo) {
$.messager.alert('提示', '用户名称已经存在', 'info');
//alert("用户名称已经存在");
//$("#username").val("");
return;
}
},
//此处添加错误处理
error: function () {
$.messager.alert('提示', '检查用户名称是否存在异常,请稍后再试!', 'error');
return;
}
});
}
return flag;
}
</script>
</body>
</html>