format jsp
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -34,21 +34,21 @@
|
||||
<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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
//进入页面聚焦在username输入框,方便 用户输入
|
||||
$("#user_name").focus();
|
||||
browserFit();
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE')
|
||||
$("#user_vcodepwd").empty().append("密 码:");
|
||||
else
|
||||
@@ -56,8 +56,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -74,12 +73,10 @@
|
||||
});
|
||||
|
||||
//检测用户输入数据
|
||||
function checkUserInput ()
|
||||
{
|
||||
function checkUserInput() {
|
||||
var username = $.trim($('#user_name').val());
|
||||
var password = $.trim($('#user_pwd').val());
|
||||
if(null == username ||0 == username.length)
|
||||
{
|
||||
if (null == username || 0 == username.length) {
|
||||
$("#user_name").val("").focus();
|
||||
$("#tip_userpwd").hide();
|
||||
$("#tip_username").empty().append('<span class="error_input">用户名不能为空</span>').show();
|
||||
@@ -88,8 +85,7 @@
|
||||
else
|
||||
$("#tip_username").hide();
|
||||
|
||||
if(null == password || 0 == password.length)
|
||||
{
|
||||
if (null == password || 0 == password.length) {
|
||||
$("#user_pwd").val("").focus();
|
||||
$("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show();
|
||||
return;
|
||||
@@ -97,8 +93,7 @@
|
||||
else
|
||||
$("#tip_userpwd").hide();
|
||||
if (username != null && username.length != 0
|
||||
&&password != null&&password.length != 0)
|
||||
{
|
||||
&& password != null && password.length != 0) {
|
||||
$("#user_name").focus();
|
||||
$("#tip_username").hide();
|
||||
$("#tip_userpwd").hide();
|
||||
@@ -114,36 +109,31 @@
|
||||
success: function (loginInfo) {
|
||||
var loginInfoTip = loginInfo.showModel.msgTip;
|
||||
//用户名不存在,清空输入框并定位到用户名输入框
|
||||
if(loginInfoTip.indexOf("user is not exist") != -1)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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")
|
||||
{
|
||||
else if (loginInfoTip.indexOf("user can login") != -1 || loginInfoTip == "user already login") {
|
||||
window.location.href = "<%=path%>/login.action";
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
alert("后台访问错误,请联系管理员!");
|
||||
}
|
||||
});
|
||||
@@ -154,17 +144,14 @@
|
||||
//定义变量控制密码提示显示
|
||||
var temp_value = "";
|
||||
$("#user_name").add("#user_pwd").unbind().bind({
|
||||
'click keyup':function()
|
||||
{
|
||||
'click keyup': function () {
|
||||
var value = $.trim($(this).val());
|
||||
if(value.length >0)
|
||||
{
|
||||
if (value.length > 0) {
|
||||
$("#tip_username").hide();
|
||||
$("#tip_userpwd").hide();
|
||||
}
|
||||
},
|
||||
blur:function()
|
||||
{
|
||||
blur: function () {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
//兼容 IE,firefox 兼容
|
||||
@@ -172,23 +159,20 @@
|
||||
var value = $.trim($(this).val());
|
||||
if (obj.id == "user_name")
|
||||
temp_value = value;
|
||||
if(value.length ==0)
|
||||
{
|
||||
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();;
|
||||
$("#tip_userpwd").empty().append('<span class="error_input">密码不能为空</span>').show();
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(obj.id=="user_pwd"&&value.length>0&&temp_value.length ==0)
|
||||
{
|
||||
else {
|
||||
if (obj.id == "user_pwd" && value.length > 0 && temp_value.length == 0) {
|
||||
$("#tip_username").show();
|
||||
$("#tip_userpwd").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#tip_username").hide();
|
||||
$("#tip_userpwd").hide();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,11 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
|
||||
margin-bottom: 0px;
|
||||
background-color: #EAF2FD;
|
||||
}
|
||||
.STYLE1 {font-size: 12px}
|
||||
|
||||
.STYLE1 {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.STYLE4 {
|
||||
font-size: 12px;
|
||||
color: #1F4A65;
|
||||
@@ -34,22 +38,29 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
|
||||
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}
|
||||
|
||||
.STYLE7 {
|
||||
font-size: 12
|
||||
}
|
||||
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,13 +23,30 @@
|
||||
<script type="text/javascript" src="<%=path%>/js/StringBuffer.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
<style>
|
||||
body{ margin:0; height:100%}
|
||||
html{ height:100%} /*兼容firefox的div高度100%*/
|
||||
#left{ width:150px; height:100%; float:left; _margin-right:-3px;}
|
||||
#right{ height:100%;}
|
||||
<!--页面展示特殊要求-->
|
||||
.datagrid-body,.datagrid-footer,.datagrid-pager ,.datagrid-view
|
||||
{
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%
|
||||
}
|
||||
|
||||
/*兼容firefox的div高度100%*/
|
||||
#left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
_margin-right: -3px;
|
||||
}
|
||||
|
||||
#right {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
<!--
|
||||
页面展示特殊要求-- >
|
||||
.datagrid-body, .datagrid-footer, .datagrid-pager, .datagrid-view {
|
||||
background-color: #EAF2FD;
|
||||
}
|
||||
</style>
|
||||
@@ -37,7 +54,8 @@
|
||||
<body>
|
||||
<div id="position" class="easyui-panel" title="当前位置:资产管理 > 资产报表" collapsible="false" closable="false"/>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>资产名称:</td>
|
||||
@@ -110,18 +128,23 @@
|
||||
<%-- <table id="tableData" style="height:360px;top:300px;border-bottom-color:#FFFFFF"></table>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产报表" iconCls="icon-chart-column" collapsible="true" maximizable="false" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产报表" iconCls="icon-chart-column"
|
||||
collapsible="true" maximizable="false" closable="false">
|
||||
<div id="left" class="easyui-tabs" style="padding:1px;">
|
||||
<div title="综合图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;" data-options="iconCls:'icon-chart-zonghe'">
|
||||
<div title="综合图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;"
|
||||
data-options="iconCls:'icon-chart-zonghe'">
|
||||
<div id="zongheContainer">综合图</div>
|
||||
</div>
|
||||
<div title="柱状图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;" data-options="iconCls:'icon-chart-statistics'">
|
||||
<div title="柱状图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;"
|
||||
data-options="iconCls:'icon-chart-statistics'">
|
||||
<div id="culumnContainer">柱状图</div>
|
||||
</div>
|
||||
<div title="饼状图" data-options="iconCls:'icon-chart-pie'" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div title="饼状图" data-options="iconCls:'icon-chart-pie'"
|
||||
style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div id="pieContainer">饼状图</div>
|
||||
</div>
|
||||
<div title="折线图" data-options="iconCls:'icon-chart-polygram'" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div title="折线图" data-options="iconCls:'icon-chart-polygram'"
|
||||
style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div id="zxianContainer">折现图</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,8 +173,7 @@
|
||||
//报表显示个数
|
||||
var showNum = 10;
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//progress();
|
||||
//页面自定义高度
|
||||
heightInfo = heightInfo - 50;
|
||||
@@ -181,15 +203,12 @@
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchStatusLabel").empty().append("状 态:");
|
||||
$("#searchSupplierIDLabel").empty().append("供 应 商:");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchStatusLabel").empty().append("状 态:");
|
||||
$("#searchSupplierIDLabel").empty().append("供 应 商:");
|
||||
}
|
||||
@@ -198,8 +217,8 @@
|
||||
$("#left").tabs({width: 630});
|
||||
|
||||
var chartHight;
|
||||
function initChartsHight()
|
||||
{
|
||||
|
||||
function initChartsHight() {
|
||||
|
||||
$("#zxianContainer").add("#pieContainer").add("#culumnContainer")
|
||||
.add("#zongheContainer").css({height: heightInfo});
|
||||
@@ -208,8 +227,7 @@
|
||||
}
|
||||
|
||||
//是否限制条件
|
||||
function initShowDataNum()
|
||||
{
|
||||
function initShowDataNum() {
|
||||
var type = $("#searchTopten").val();
|
||||
if (0 == type)
|
||||
showNum = 10;
|
||||
@@ -219,8 +237,7 @@
|
||||
}
|
||||
|
||||
//加载进度条
|
||||
function progress()
|
||||
{
|
||||
function progress() {
|
||||
$.messager.progress({
|
||||
title: '请稍候',
|
||||
msg: '数据加载ing...'
|
||||
@@ -229,9 +246,9 @@
|
||||
$.messager.progress('close');
|
||||
}, 3300)
|
||||
}
|
||||
|
||||
//获取查询数据
|
||||
function getDataInfo()
|
||||
{
|
||||
function getDataInfo() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/report/find.action",
|
||||
@@ -246,12 +263,10 @@
|
||||
supplierID: $.trim($("#searchSupplierID").val()),
|
||||
reportType: $.trim($("#searchReportType").val()),
|
||||
}),
|
||||
success: function (reportInfo)
|
||||
{
|
||||
success: function (reportInfo) {
|
||||
pageData = reportInfo.showModel.reportData;
|
||||
var msgTip = reportInfo.showModel.msgTip;
|
||||
if(msgTip == "get report data exception")
|
||||
{
|
||||
if (msgTip == "get report data exception") {
|
||||
alert("查找报表信息异常,请与管理员联系!");
|
||||
return;
|
||||
}
|
||||
@@ -260,8 +275,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'资产列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -294,8 +308,7 @@
|
||||
{title: getReportType() + '类型', id: "dataTypeColumn", width: 300, field: 'name', align: "center"},
|
||||
{title: '总数', field: 'sum', width: 130, align: "center"}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -304,8 +317,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -314,31 +326,27 @@
|
||||
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchSupplier" || obj.id == "searchCategoryID" || obj.id == "searchUsernameID"
|
||||
|| obj.id=="searchStatus" || obj.id=="searchSupplierID" ))
|
||||
{
|
||||
|| obj.id == "searchStatus" || obj.id == "searchSupplierID")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData()
|
||||
{
|
||||
function initSystemData() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/asset/getBasicData.action",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
userList = systemInfo.showModel.map.userList;
|
||||
categoryList = systemInfo.showModel.map.categoryList;
|
||||
supplierList = systemInfo.showModel.map.supplierList;
|
||||
nameList = systemInfo.showModel.map.assetnameList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -347,16 +355,12 @@
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo()
|
||||
{
|
||||
function initSelectInfo() {
|
||||
var options = "";
|
||||
if(nameList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < nameList.length;i ++)
|
||||
{
|
||||
if (nameList != null) {
|
||||
for (var i = 0; i < nameList.length; i++) {
|
||||
var nameInfo = nameList[i];
|
||||
if(0== i)
|
||||
{
|
||||
if (0 == i) {
|
||||
nameID = nameInfo.id;
|
||||
}
|
||||
options += '<option value="' + nameInfo.id + '">' + nameInfo.assetname + '</option>';
|
||||
@@ -364,14 +368,11 @@
|
||||
$("#searchAssetNameID").empty().append('<option value="">请选择</option>').append(options);
|
||||
}
|
||||
|
||||
if(userList !=null)
|
||||
{
|
||||
if (userList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < userList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < userList.length; i++) {
|
||||
var user = userList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
userID = user.id
|
||||
}
|
||||
options += '<option value="' + user.id + '">' + user.username + '</option>';
|
||||
@@ -380,14 +381,11 @@
|
||||
|
||||
}
|
||||
|
||||
if(categoryList !=null)
|
||||
{
|
||||
if (categoryList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < categoryList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < categoryList.length; i++) {
|
||||
var category = categoryList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
categoryID = category.id;
|
||||
}
|
||||
options += '<option value="' + category.id + '">' + category.assetname + '</option>';
|
||||
@@ -395,14 +393,11 @@
|
||||
$("#searchCategoryID").empty().append('<option value="">请选择</option>').append(options);
|
||||
}
|
||||
|
||||
if(supplierList !=null)
|
||||
{
|
||||
if (supplierList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < supplierList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < supplierList.length; i++) {
|
||||
var supplier = supplierList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
supplierID = supplier.id;
|
||||
}
|
||||
options += '<option value="' + supplier.id + '">' + supplier.supplier + '</option>';
|
||||
@@ -414,8 +409,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
//是否限制条件 默认限制
|
||||
initShowDataNum();
|
||||
//系统基础数据
|
||||
@@ -461,8 +455,7 @@
|
||||
|
||||
|
||||
//饼状图
|
||||
function showPieChart()
|
||||
{
|
||||
function showPieChart() {
|
||||
//解决初始化范围变小问题
|
||||
$("#pieContainer").empty();
|
||||
var getReportTypeInfo = getReportType();
|
||||
@@ -475,13 +468,11 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0;i < showNumInfo; i++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var dataInfo = new Array();
|
||||
var totalInfo = pageData[i]
|
||||
|
||||
if(reportType == 0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
if (0 == totalInfo[1])
|
||||
dataInfo.push("在库");
|
||||
else if (1 == totalInfo[1])
|
||||
@@ -537,8 +528,7 @@
|
||||
}
|
||||
|
||||
//综合图
|
||||
function showComboChart()
|
||||
{
|
||||
function showComboChart() {
|
||||
//解决初始化范围变小问题
|
||||
$("#zongheContainer").empty();
|
||||
var getReportTypeInfo = getReportType();
|
||||
@@ -555,13 +545,11 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var eachData = pageData[i];
|
||||
var sum = eachData[0];
|
||||
var totalInfo = eachData[1];
|
||||
if(reportType == 0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
if (0 == totalInfo)
|
||||
xName.push("在库");
|
||||
else if (1 == totalInfo)
|
||||
@@ -709,8 +697,7 @@
|
||||
}
|
||||
|
||||
//折线图
|
||||
function showSpline()
|
||||
{
|
||||
function showSpline() {
|
||||
//解决初始化范围变小问题
|
||||
$("#zxianContainer").empty();
|
||||
var getReportTypeInfo = getReportType();
|
||||
@@ -724,12 +711,10 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var totalInfo = pageData[i]
|
||||
dataInfo.push(totalInfo[0]);
|
||||
if(reportType == 0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
if (0 == totalInfo[1])
|
||||
nameData.push("在库");
|
||||
else if (1 == totalInfo[1])
|
||||
@@ -745,8 +730,7 @@
|
||||
marker: {
|
||||
symbol: 'square',
|
||||
labels: {
|
||||
formatter: function()
|
||||
{
|
||||
formatter: function () {
|
||||
return this.value + '个';
|
||||
}
|
||||
}
|
||||
@@ -818,8 +802,7 @@
|
||||
}
|
||||
|
||||
//柱状图
|
||||
function showHistogram()
|
||||
{
|
||||
function showHistogram() {
|
||||
//解决初始化范围变小问题
|
||||
$("#culumnContainer").empty();
|
||||
var getReportTypeInfo = getReportType();
|
||||
@@ -833,12 +816,10 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var totalInfo = pageData[i]
|
||||
dataInfo.push(totalInfo[0]);
|
||||
if(reportType == 0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
if (0 == totalInfo[1])
|
||||
nameData.push("在库");
|
||||
else if (1 == totalInfo[1])
|
||||
@@ -914,8 +895,7 @@
|
||||
}
|
||||
|
||||
//填充表格数据
|
||||
function initTableDetails()
|
||||
{
|
||||
function initTableDetails() {
|
||||
var reportType = $("#searchReportType").val();
|
||||
var dataJson = {};
|
||||
dataJson.total = pageData.length;
|
||||
@@ -929,12 +909,10 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var totalInfo = pageData[i];
|
||||
var name = "";
|
||||
if(reportType == 0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
if (0 == totalInfo[1])
|
||||
name = "在库";
|
||||
else if (1 == totalInfo[1])
|
||||
@@ -961,28 +939,23 @@
|
||||
dataJson.footer = footerArray;
|
||||
return dataJson;
|
||||
}
|
||||
|
||||
//返回统计类型字符串
|
||||
function getReportType()
|
||||
{
|
||||
function getReportType() {
|
||||
var reportType = $("#searchReportType").val();
|
||||
if(reportType==0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
return '按资产状态统计';
|
||||
}
|
||||
else if(reportType==1)
|
||||
{
|
||||
else if (reportType == 1) {
|
||||
return '按资产类型统计';
|
||||
}
|
||||
else if(reportType==2)
|
||||
{
|
||||
else if (reportType == 2) {
|
||||
return '按供应商统计';
|
||||
}
|
||||
else if(reportType==3)
|
||||
{
|
||||
else if (reportType == 3) {
|
||||
return '按资产名称统计';
|
||||
}
|
||||
else if(reportType==4)
|
||||
{
|
||||
else if (reportType == 4) {
|
||||
return '按所属用户统计';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ 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 + "/";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -22,15 +22,24 @@
|
||||
<!-- <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><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><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="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="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 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>
|
||||
-->
|
||||
@@ -41,9 +50,9 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(init);
|
||||
|
||||
//页面初始化
|
||||
function init()
|
||||
{
|
||||
function init() {
|
||||
//初始化时间
|
||||
showTime();
|
||||
if ('${sessionScope.user.loginame}' != 'guest')
|
||||
@@ -52,15 +61,13 @@
|
||||
$("#1").add("#2").add("#3").add("#4").add("#5").add("#6").hide();
|
||||
}
|
||||
|
||||
function showDate()
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (year < 1900) {
|
||||
year = 1900 + year;
|
||||
}
|
||||
var cent = parseInt(year / 100);
|
||||
@@ -76,37 +83,32 @@
|
||||
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)
|
||||
{
|
||||
if (getOs().indexOf("MSIE") != -1) {
|
||||
//控制时间和图片之间的距离
|
||||
$("#blankSpace").empty().append(" ");
|
||||
message = year + "年" + monthname[month] + date + "日 " + dayname[day] + " ";
|
||||
|
||||
}
|
||||
else if(getOs().indexOf("Firefox") != -1)
|
||||
{
|
||||
else if (getOs().indexOf("Firefox") != -1) {
|
||||
$("#blankSpace").empty().append(" ");
|
||||
message = year + "年 " + monthname[month] + date + "日 " + dayname[day] + " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#blankSpace").empty().append(" ");
|
||||
message = year + "年 " + monthname[month] + date + "日 " + dayname[day] + " ";
|
||||
}
|
||||
return message;
|
||||
}
|
||||
function showTime()
|
||||
{
|
||||
|
||||
function showTime() {
|
||||
var Digital = new Date();
|
||||
var hours = Digital.getHours();
|
||||
var minutes = Digital.getMinutes();
|
||||
var seconds = Digital.getSeconds();
|
||||
if(hours==0)
|
||||
{
|
||||
if (hours == 0) {
|
||||
hours = "00";
|
||||
}
|
||||
if(hours <= 9 && hours > 0)
|
||||
{
|
||||
if (hours <= 9 && hours > 0) {
|
||||
hours = "0" + hours;
|
||||
}
|
||||
if (minutes <= 9)
|
||||
@@ -119,45 +121,37 @@
|
||||
var message = showDate() + " " + myclock;
|
||||
$("#showNowTime").empty().append(message);
|
||||
}
|
||||
|
||||
//判断浏览器的类型
|
||||
function getOs()
|
||||
{
|
||||
function getOs() {
|
||||
var OsObject = "";
|
||||
if(navigator.userAgent.indexOf("MSIE")>0)
|
||||
{
|
||||
if (navigator.userAgent.indexOf("MSIE") > 0) {
|
||||
return "MSIE";
|
||||
}
|
||||
else if(navigator.userAgent.indexOf("Firefox")>0)
|
||||
{
|
||||
else if (navigator.userAgent.indexOf("Firefox") > 0) {
|
||||
return "Firefox";
|
||||
}
|
||||
else if(navigator.userAgent.indexOf("Safari")>0)
|
||||
{
|
||||
else if (navigator.userAgent.indexOf("Safari") > 0) {
|
||||
return "Safari";
|
||||
}
|
||||
else if(navigator.userAgent.indexOf("Camino")>0)
|
||||
{
|
||||
else if (navigator.userAgent.indexOf("Camino") > 0) {
|
||||
return "Camino";
|
||||
}
|
||||
else if(navigator.userAgent.indexOf("Gecko/")>0)
|
||||
{
|
||||
else if (navigator.userAgent.indexOf("Gecko/") > 0) {
|
||||
return "Gecko";
|
||||
}
|
||||
else if(navigator.userAgent.indexOf("Opera/")>0)
|
||||
{
|
||||
else if (navigator.userAgent.indexOf("Opera/") > 0) {
|
||||
return "Opera";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
//退出系统
|
||||
$("#navtop_logout").bind({
|
||||
click:function()
|
||||
{
|
||||
if(confirm("确认要退出系统吗?"))
|
||||
{
|
||||
click: function () {
|
||||
if (confirm("确认要退出系统吗?")) {
|
||||
window.location.href = "<%=path%>/user/logout.action?clientIp=<%=clientIp%>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -25,15 +25,41 @@
|
||||
<script type="text/javascript" src="<%=path%>/js/highcharts/highcharts.js"></script>
|
||||
<script type="text/javascript" src="<%=path%>/js/highcharts/exporting.js"></script>
|
||||
<style>
|
||||
body{ margin:0; height:100%}
|
||||
html{ height:100%} /*兼容firefox的div高度100%*/
|
||||
#left{ width:150px; height:100%; float:left; _margin-right:-3px;}
|
||||
#right{ height:100%;}
|
||||
#leftdown{ width:150px; height:100%; float:left; _margin-right:-3px;}
|
||||
#rightdown{ height:100%;}
|
||||
<!--页面展示特殊要求-->
|
||||
.datagrid-body,.datagrid-footer,.datagrid-pager ,.datagrid-view
|
||||
{
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%
|
||||
}
|
||||
|
||||
/*兼容firefox的div高度100%*/
|
||||
#left {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
_margin-right: -3px;
|
||||
}
|
||||
|
||||
#right {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#leftdown {
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
_margin-right: -3px;
|
||||
}
|
||||
|
||||
#rightdown {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
<!--
|
||||
页面展示特殊要求-- >
|
||||
.datagrid-body, .datagrid-footer, .datagrid-pager, .datagrid-view {
|
||||
background-color: #EAF2FD;
|
||||
}
|
||||
</style>
|
||||
@@ -41,31 +67,37 @@
|
||||
<body>
|
||||
<div id="position" class="easyui-panel" title="当前位置: <%=location %>" collapsible="false" closable="false"/>
|
||||
<!--按月统计资产柱状图 -->
|
||||
<div id = "tablePanel0" class="easyui-panel" style="padding:1px;top:300px;" title="资产报表" iconCls="icon-chart-column" collapsible="true" maximizable="false" closable="false">
|
||||
<div id="tablePanel0" class="easyui-panel" style="padding:1px;top:300px;" title="资产报表" iconCls="icon-chart-column"
|
||||
collapsible="true" maximizable="false" closable="false">
|
||||
<div id="left" class="easyui-tabs" style="width:630px;height:auto;padding:1px;">
|
||||
<div title="综合图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;" data-options="iconCls:'icon-chart-zonghe'">
|
||||
<div title="综合图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;"
|
||||
data-options="iconCls:'icon-chart-zonghe'">
|
||||
<div id="zongheContainer" style="height: 340px;">综合图</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="right" class="easyui-tabs" style="height:auto;padding:1px;">
|
||||
<div title="柱状图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;" data-options="iconCls:'icon-chart-statistics'">
|
||||
<div title="柱状图" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;"
|
||||
data-options="iconCls:'icon-chart-statistics'">
|
||||
<div id="culumnContainer" style="height: 340px;">柱状图</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="leftdown" class="easyui-tabs" style="width:630px;height:auto;padding:1px;">
|
||||
<div title="折线图" data-options="iconCls:'icon-chart-polygram'" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div title="折线图" data-options="iconCls:'icon-chart-polygram'"
|
||||
style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div id="zxianContainer" style="height: 340px;">折现图</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rightdown" class="easyui-tabs" style="height:auto;padding:1px;">
|
||||
<div title="饼状图" data-options="iconCls:'icon-chart-pie'" style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div title="饼状图" data-options="iconCls:'icon-chart-pie'"
|
||||
style="padding:10px;background-color: #EAF2FD;height:340px;top:300px;">
|
||||
<div id="pieContainer" style="height: 340px;">饼状图</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="height:360px;top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,8 +105,7 @@
|
||||
//控制图表显示个数
|
||||
var showNum = 10;
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//progress();
|
||||
$.messager.progress({
|
||||
title: '请稍候',
|
||||
@@ -94,8 +125,7 @@
|
||||
});
|
||||
|
||||
//加载进度条
|
||||
function progress()
|
||||
{
|
||||
function progress() {
|
||||
var win = $.messager.progress({
|
||||
title: '请稍候',
|
||||
msg: '数据加载ing...'
|
||||
@@ -106,8 +136,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'资产列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -150,8 +179,7 @@
|
||||
{title: '标签', field: 'labels', width: 180, align: "center"},
|
||||
{title: '描述', field: 'description', width: 300}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -159,15 +187,12 @@
|
||||
}
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -179,14 +204,12 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
function showAssetDetails(pageNo,pageSize)
|
||||
{
|
||||
function showAssetDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/asset/findBy.action",
|
||||
@@ -200,14 +223,12 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
//$('#tableData').datagrid('reload');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -227,8 +248,7 @@
|
||||
|
||||
|
||||
//饼状图
|
||||
function showPieChart()
|
||||
{
|
||||
function showPieChart() {
|
||||
var pageData = null;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -239,12 +259,10 @@
|
||||
data: ({
|
||||
reportType: 2,
|
||||
}),
|
||||
success: function (reportInfo)
|
||||
{
|
||||
success: function (reportInfo) {
|
||||
pageData = reportInfo.showModel.reportData;
|
||||
var msgTip = reportInfo.showModel.msgTip;
|
||||
if(msgTip == "get report data exception")
|
||||
{
|
||||
if (msgTip == "get report data exception") {
|
||||
alert("查找报表信息异常,请与管理员联系!");
|
||||
return;
|
||||
}
|
||||
@@ -255,8 +273,7 @@
|
||||
var getReportTypeInfo = "按供应商统计";
|
||||
//封装数据到数组中
|
||||
var allDataInfo = new Array();
|
||||
for(var i = 0;i < pageData.length; i++)
|
||||
{
|
||||
for (var i = 0; i < pageData.length; i++) {
|
||||
var dataInfo = new Array();
|
||||
var totalInfo = pageData[i]
|
||||
|
||||
@@ -307,8 +324,7 @@
|
||||
}
|
||||
|
||||
//综合图
|
||||
function showComboChart()
|
||||
{
|
||||
function showComboChart() {
|
||||
var pageData = null;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -319,12 +335,10 @@
|
||||
data: ({
|
||||
reportType: 0
|
||||
}),
|
||||
success: function (reportInfo)
|
||||
{
|
||||
success: function (reportInfo) {
|
||||
pageData = reportInfo.showModel.reportData;
|
||||
var msgTip = reportInfo.showModel.msgTip;
|
||||
if(msgTip == "get report data exception")
|
||||
{
|
||||
if (msgTip == "get report data exception") {
|
||||
alert("查找报表信息异常,请与管理员联系!");
|
||||
return;
|
||||
}
|
||||
@@ -345,8 +359,7 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var eachData = pageData[i];
|
||||
var sum = eachData[0];
|
||||
var totalInfo = eachData[1];
|
||||
@@ -474,8 +487,7 @@
|
||||
}
|
||||
|
||||
//折线图
|
||||
function showSpline()
|
||||
{
|
||||
function showSpline() {
|
||||
var pageData = null;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -486,12 +498,10 @@
|
||||
data: ({
|
||||
reportType: 1
|
||||
}),
|
||||
success: function (reportInfo)
|
||||
{
|
||||
success: function (reportInfo) {
|
||||
pageData = reportInfo.showModel.reportData;
|
||||
var msgTip = reportInfo.showModel.msgTip;
|
||||
if(msgTip == "get report data exception")
|
||||
{
|
||||
if (msgTip == "get report data exception") {
|
||||
alert("查找报表信息异常,请与管理员联系!");
|
||||
return;
|
||||
}
|
||||
@@ -510,8 +520,7 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var totalInfo = pageData[i]
|
||||
dataInfo.push(totalInfo[0]);
|
||||
nameData.push(totalInfo[1]);
|
||||
@@ -521,8 +530,7 @@
|
||||
marker: {
|
||||
symbol: 'square',
|
||||
labels: {
|
||||
formatter: function()
|
||||
{
|
||||
formatter: function () {
|
||||
return this.value + '个';
|
||||
}
|
||||
}
|
||||
@@ -593,8 +601,7 @@
|
||||
}
|
||||
|
||||
//柱状图
|
||||
function showHistogram()
|
||||
{
|
||||
function showHistogram() {
|
||||
var pageData = null;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -605,12 +612,10 @@
|
||||
data: ({
|
||||
reportType: 3,
|
||||
}),
|
||||
success: function (reportInfo)
|
||||
{
|
||||
success: function (reportInfo) {
|
||||
pageData = reportInfo.showModel.reportData;
|
||||
var msgTip = reportInfo.showModel.msgTip;
|
||||
if(msgTip == "get report data exception")
|
||||
{
|
||||
if (msgTip == "get report data exception") {
|
||||
alert("查找报表信息异常,请与管理员联系!");
|
||||
return;
|
||||
}
|
||||
@@ -628,8 +633,7 @@
|
||||
showNumInfo = 10;
|
||||
else
|
||||
showNumInfo = pageData.length;
|
||||
for(var i = 0 ;i < showNumInfo;i ++)
|
||||
{
|
||||
for (var i = 0; i < showNumInfo; i++) {
|
||||
var totalInfo = pageData[i];
|
||||
dataInfo.push(totalInfo[0]);
|
||||
nameData.push(totalInfo[1]);
|
||||
@@ -698,27 +702,21 @@
|
||||
}
|
||||
|
||||
//返回统计类型字符串
|
||||
function getReportType()
|
||||
{
|
||||
function getReportType() {
|
||||
var reportType = $("#searchReportType").val();
|
||||
if(reportType==0)
|
||||
{
|
||||
if (reportType == 0) {
|
||||
return '按资产状态统计';
|
||||
}
|
||||
else if(reportType==1)
|
||||
{
|
||||
else if (reportType == 1) {
|
||||
return '按资产类型统计';
|
||||
}
|
||||
else if(reportType==2)
|
||||
{
|
||||
else if (reportType == 2) {
|
||||
return '按供应商统计';
|
||||
}
|
||||
else if(reportType==3)
|
||||
{
|
||||
else if (reportType == 3) {
|
||||
return '按资产名称统计';
|
||||
}
|
||||
else if(reportType==4)
|
||||
{
|
||||
else if (reportType == 4) {
|
||||
return '按所属用户统计';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -21,20 +21,27 @@
|
||||
<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://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">[ <a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a> ]</div>
|
||||
<div class="bottomtitle">[ <a href="http://www.baidu.com/search/theie6countdown.html" target="_blank">对IE6说再见</a> ]
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 桌面 -->
|
||||
<div id="desktop">
|
||||
<div id="zoom-tip"><div><i></i><span></span></div><a href="javascript:;" class="close" onclick="HROS.zoom.close();">×</a></div>
|
||||
<div id="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="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">
|
||||
@@ -88,7 +95,9 @@
|
||||
location.href = '<%=path%>/user/logout.action?clientIp=<%=clientIp%>';
|
||||
})
|
||||
//IE下禁止选中
|
||||
document.body.onselectstart = document.body.ondrag = function () { return false; }
|
||||
document.body.onselectstart = document.body.ondrag = function () {
|
||||
return false;
|
||||
}
|
||||
//隐藏加载遮罩层
|
||||
$('.loading').hide();
|
||||
//IE6升级提示
|
||||
@@ -105,6 +114,7 @@
|
||||
//加载桌面
|
||||
HROS.base.init();
|
||||
}
|
||||
|
||||
//判断是否存在session,如果不存在就跳到登录界面
|
||||
function UserOut() {
|
||||
var kid = ${sessionScope.user.id};
|
||||
@@ -112,6 +122,7 @@
|
||||
top.location.href = '../../';
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(UserOut, 5000); //每5秒检测一次
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ 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 + "/";
|
||||
@@ -43,8 +43,7 @@ var functions="";
|
||||
var btnStrList = []; //按钮权限列表
|
||||
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//初始化系统基础信息
|
||||
initSystemData(id, 'UserRole');
|
||||
initSelectInfo(0);
|
||||
@@ -55,8 +54,7 @@ $(function()
|
||||
});
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData(kid,type)
|
||||
{
|
||||
function initSystemData(kid, type) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/userBusiness/getBasicData.action",
|
||||
@@ -67,26 +65,23 @@ function initSystemData(kid,type)
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo(lei) {
|
||||
if (userBusinessList != null) {
|
||||
@@ -118,8 +113,7 @@ function initSelectInfo(lei) {
|
||||
}
|
||||
|
||||
//初始化页面
|
||||
function initSelect()
|
||||
{
|
||||
function initSelect() {
|
||||
var arr = options.split('][');
|
||||
for (var i in arr) {
|
||||
initSystemData(arr[i], 'RoleAPP'); //根据角色找app
|
||||
@@ -129,27 +123,23 @@ function initSelect()
|
||||
initSelectInfo(2); //功能菜单列表
|
||||
initSelectInfo(3); //查询角色对应的按钮权限
|
||||
}
|
||||
if(last!="")
|
||||
{
|
||||
if (last != "") {
|
||||
last = "[" + last.substring(0, last.length - 1);
|
||||
//alert(last);
|
||||
|
||||
if(last.indexOf("["+pageid+"]")!=-1)
|
||||
{
|
||||
if (last.indexOf("[" + pageid + "]") != -1) {
|
||||
//alert("存在");
|
||||
$("#west").show();
|
||||
$("#mainPanle").show();
|
||||
$("#mm").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
//alert("不存在");
|
||||
$("div").remove();
|
||||
$("<div style='width:100%;text-align:center;padding-top:20px'><b>抱歉,您没有该权限!</b></div>").appendTo("body");
|
||||
}
|
||||
}
|
||||
if(functions!="")
|
||||
{
|
||||
if (functions != "") {
|
||||
functions = "[" + functions.substring(0, functions.length - 1);
|
||||
//alert(functions);
|
||||
}
|
||||
@@ -159,8 +149,7 @@ function initSelect()
|
||||
}
|
||||
|
||||
//测试自定义hql
|
||||
function ceshi()
|
||||
{
|
||||
function ceshi() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/userBusiness/getceshi.action",
|
||||
@@ -170,29 +159,23 @@ function ceshi()
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
alert(userBusinessList[0][0]);
|
||||
alert(userBusinessList[0][1]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -20,13 +20,11 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
init();
|
||||
});
|
||||
|
||||
function init()
|
||||
{
|
||||
function init() {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收预付款列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收预付款列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,11 +77,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -89,13 +96,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<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;" />
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 110px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -104,7 +113,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="转账单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="转账单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -69,11 +73,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -88,7 +95,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -98,7 +106,8 @@
|
||||
</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>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 110px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -107,7 +116,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收入单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收入单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,11 +77,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -89,7 +96,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -99,7 +107,8 @@
|
||||
</td>
|
||||
<td>收款金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 120px;" />
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 120px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -108,7 +117,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="支出单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="支出单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -69,11 +73,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -88,7 +95,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -98,7 +106,8 @@
|
||||
</td>
|
||||
<td>付款金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 120px;" />
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 120px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -107,7 +116,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收款单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收款单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,11 +77,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -89,13 +96,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<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;" />
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 110px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -104,7 +113,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -29,7 +29,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -54,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="付款单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="付款单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,11 +77,13 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -89,13 +95,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<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;" />
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 110px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -104,7 +112,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名 称:</td>
|
||||
@@ -54,7 +55,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="accountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
|
||||
@@ -62,19 +64,23 @@
|
||||
<form id="accountFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="nameLabel">名称</label>
|
||||
<input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="name" id="name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="serialNoLabel">编号</label>
|
||||
<input name="serialNo" id="serialNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="serialNo" id="serialNo" 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="initialAmountLabel">期初金额</label>
|
||||
<input name="initialAmount" id="initialAmount" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 230px;height: 20px"></input>
|
||||
<input name="initialAmount" id="initialAmount" type="text" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 230px;height: 20px"></input>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="currentAmountLabel">当前余额</label>
|
||||
<input name="currentAmount" id="currentAmount" type="text" disabled="disabled" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 230px;height: 20px"></input>
|
||||
<input name="currentAmount" id="currentAmount" type="text" disabled="disabled" class="easyui-numberbox"
|
||||
data-options="min:0,precision:2" style="width: 230px;height: 20px"></input>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="remarkLabel">备注</label>
|
||||
@@ -85,9 +91,11 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccount" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccount" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelAccount" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#accountDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true" modal="true" collapsible="false" closable="true">
|
||||
<div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
|
||||
modal="true" collapsible="false" closable="true">
|
||||
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -121,7 +129,8 @@
|
||||
{title: '编号', field: 'serialNo', width: 150, align: "center"},
|
||||
{title: '期初金额', field: 'initialAmount', width: 100, align: "center"},
|
||||
{title: '当前余额', field: 'currentAmount', width: 100, align: "center"},
|
||||
{ title: '是否默认', field: 'isDefault',width:100,align:"center",
|
||||
{
|
||||
title: '是否默认', field: 'isDefault', width: 100, align: "center",
|
||||
formatter: function (value, rec) {
|
||||
if (rec.isDefault) {
|
||||
return "<b style='color:green'>是</b>";
|
||||
@@ -132,12 +141,11 @@
|
||||
}
|
||||
},
|
||||
{title: '备注', field: 'remark', width: 100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 180, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialNo + 'AaBb' + rec.initialAmount + 'AaBb' + rec.currentAmount + 'AaBb' + rec.remark;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/> <a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccount(\'' + rowInfo + '\');"/> <a onclick="editAccount(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccount(\'' + rowInfo + '\');"/> <a onclick="deleteAccount(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
@@ -151,8 +159,7 @@
|
||||
id: 'addAccount',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addAccount();
|
||||
}
|
||||
},
|
||||
@@ -160,8 +167,7 @@
|
||||
id: 'deleteAccount',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteAccount();
|
||||
}
|
||||
},
|
||||
@@ -169,14 +175,12 @@
|
||||
id: 'setAccountIsDefault',
|
||||
text: '设为默认',
|
||||
iconCls: 'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
setAccountIsDefault();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -191,26 +195,23 @@
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
|
||||
if(k == "13"&&(obj.id=="name" || obj.id=="serialNo" || obj.id=="initialAmount" || obj.id=="currentAmount" || obj.id=="remark"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "name" || obj.id == "serialNo" || obj.id == "initialAmount" || obj.id == "currentAmount" || obj.id == "remark")) {
|
||||
$("#saveAccount").click();
|
||||
}
|
||||
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchSerialNo" || obj.id=="searchRemark"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchSerialNo" || obj.id == "searchRemark")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try
|
||||
{
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -222,18 +223,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除结算账户
|
||||
function deleteAccount(accountInfo) {
|
||||
$.messager.confirm('删除确认','确定要删除此结算账户吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.messager.confirm('删除确认', '确定要删除此结算账户吗?', function (r) {
|
||||
if (r) {
|
||||
var accountTotalInfo = accountInfo.split("AaBb");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -244,8 +242,7 @@
|
||||
name: accountTotalInfo[1],
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if (msg == '成功')
|
||||
//加载完以后重新初始化
|
||||
@@ -254,8 +251,7 @@
|
||||
$.messager.alert('删除提示', '删除结算账户失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除结算账户异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -267,22 +263,16 @@
|
||||
//批量删除结算账户
|
||||
function batDeleteAccount() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条结算账户吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -297,11 +287,9 @@
|
||||
accountIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -310,8 +298,7 @@
|
||||
$.messager.alert('删除提示', '删除结算账户失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除结算账户异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -347,13 +334,11 @@
|
||||
function setAccountIsDefault() {
|
||||
var allRow = $('#tableData').datagrid('getRows');
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('设置提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
if (row.length > 0) {
|
||||
function setDefault(accountID, isDefault) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -374,13 +359,13 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除结算账户异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (row.length == 1) {
|
||||
setDefault(row[0].id, true); //设置默认
|
||||
for (var i = 0; i < allRow.length; i++) {
|
||||
@@ -399,29 +384,24 @@
|
||||
|
||||
//保存结算账户
|
||||
$("#saveAccount").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (checkAccountName())
|
||||
return;
|
||||
|
||||
$('#accountFM').form('submit', {
|
||||
url: url,
|
||||
onSubmit: function()
|
||||
{
|
||||
onSubmit: function () {
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(result)
|
||||
{
|
||||
success: function (result) {
|
||||
var result = eval('(' + result + ')');
|
||||
if (!result)
|
||||
{
|
||||
if (!result) {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存结算账户失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$('#accountDlg').dialog('close');
|
||||
//$('#tableData').datagrid('reload');
|
||||
//加载完以后重新初始化
|
||||
@@ -461,8 +441,7 @@
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(accountName.length > 0 &&( orgAccount.length ==0 || accountName != orgAccount))
|
||||
{
|
||||
if (accountName.length > 0 && (orgAccount.length == 0 || accountName != orgAccount)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/account/checkIsNameExist.action",
|
||||
@@ -472,18 +451,15 @@
|
||||
accountID: accountID,
|
||||
name: accountName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '结算账户名称已经存在', 'info');
|
||||
return;
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查结算账户名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -494,8 +470,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showAccountDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -521,13 +496,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -565,7 +538,8 @@
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:150,
|
||||
{
|
||||
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>";
|
||||
@@ -573,7 +547,8 @@
|
||||
},
|
||||
{title: '类型', field: 'type', width: 100},
|
||||
{title: '单位信息', field: 'supplierName', width: 150},
|
||||
{ title: '金额', field: 'changeAmount',width:80,
|
||||
{
|
||||
title: '金额', field: 'changeAmount', width: 80,
|
||||
formatter: function (value, row) {
|
||||
if (row.aList && row.amList) {
|
||||
var aListArr = row.aList.toString().split(",");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -26,7 +26,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
@@ -51,7 +52,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="应用列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="应用列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -61,43 +63,59 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 50px;height: 20px">代号</td>
|
||||
<td style="padding:1px"><input name="Number" id="Number" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Number" id="Number" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td style="width: 50px;height: 20px">名称</td>
|
||||
<td style="padding:1px"><input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Name" id="Name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td style="width: 50px;height: 20px">拉伸</td>
|
||||
<td style="padding:1px"><input name="ReSize" id="ReSize" type="checkbox" style="width: 50px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="ReSize" id="ReSize" type="checkbox"
|
||||
style="width: 50px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td style="padding:1px"><input name="Type" id="Type" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Type" id="Type" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>链接</td>
|
||||
<td style="padding:1px"><input name="URL" id="URL" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="URL" id="URL" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>最大化</td>
|
||||
<td style="padding:1px"><input name="OpenMax" id="OpenMax" type="checkbox" style="width: 50px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="OpenMax" id="OpenMax" type="checkbox"
|
||||
style="width: 50px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>宽度</td>
|
||||
<td style="padding:1px"><input name="Width" id="Width" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Width" id="Width" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>高度</td>
|
||||
<td style="padding:1px"><input name="Height" id="Height" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Height" id="Height" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>Flash</td>
|
||||
<td style="padding:1px"><input name="Flash" id="Flash" type="checkbox" style="width: 50px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Flash" id="Flash" type="checkbox"
|
||||
style="width: 50px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>排序号</td>
|
||||
<td style="padding:1px"><input name="Sort" id="Sort" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Sort" id="Sort" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>种类</td>
|
||||
<td style="padding:1px"><input name="ZL" id="ZL" class="easyui-textbox" style="width: 150px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="ZL" id="ZL" class="easyui-textbox"
|
||||
style="width: 150px;height: 20px"/></td>
|
||||
<td>启用</td>
|
||||
<td style="padding:1px"><input name="Enabled" id="Enabled" type="checkbox" style="width: 50px;height: 20px"/></td>
|
||||
<td style="padding:1px"><input name="Enabled" id="Enabled" type="checkbox"
|
||||
style="width: 50px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td style="padding:1px" colspan="5"><input name="Remark" id="Remark" class="easyui-textbox" style="width: 480px;height: 20px"/></td>
|
||||
<td style="padding:1px" colspan="5"><input name="Remark" id="Remark" class="easyui-textbox"
|
||||
style="width: 480px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>图标</td>
|
||||
<td style="padding:1px" colspan="5"><div id="Icon" class="fileUploadContent"></div></td>
|
||||
<td style="padding:1px" colspan="5">
|
||||
<div id="Icon" class="fileUploadContent"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
@@ -105,13 +123,13 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveApp" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelApp" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#appDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelApp" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#appDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
@@ -119,8 +137,7 @@
|
||||
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#appFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -129,8 +146,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'应用列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -159,10 +175,9 @@
|
||||
{title: '代号', field: 'Number', width: 50},
|
||||
{title: '应用名称', field: 'Name', width: 100},
|
||||
{title: '类型', field: 'Type', width: 50},
|
||||
{ title: '图标',field: 'Icon',width:100,formatter:function(value,row)
|
||||
{
|
||||
if (value!= null)
|
||||
{
|
||||
title: '图标', field: 'Icon', width: 100, formatter: function (value, row) {
|
||||
if (value != null) {
|
||||
return "<img alt='图标' style='width:32px;height:32px;' src=\"../../upload/images/deskIcon/" + value + "\" />";
|
||||
}
|
||||
}
|
||||
@@ -170,29 +185,36 @@
|
||||
{title: '链接', field: 'URL', width: 100},
|
||||
{title: '宽度', field: 'Width', width: 50},
|
||||
{title: '高度', field: 'Height', width: 50},
|
||||
{ title: '拉伸',field: 'ReSize',width:50,formatter:function(value){
|
||||
{
|
||||
title: '拉伸', field: 'ReSize', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}},
|
||||
{ title: '最大化',field: 'OpenMax',width:50,formatter:function(value){
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '最大化', field: 'OpenMax', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}},
|
||||
{ title: 'Flash',field: 'Flash',width:50,formatter:function(value){
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Flash', field: 'Flash', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}},
|
||||
}
|
||||
},
|
||||
{title: '种类', field: 'ZL', width: 50},
|
||||
{title: '排序号', field: 'Sort', width: 50},
|
||||
{title: '备注', field: 'Remark', width: 50},
|
||||
{ title: '启用',field: 'Enabled',width:50,formatter:function(value){
|
||||
return value? "开":"关";
|
||||
}},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '启用', field: 'Enabled', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.Number + 'AaBb' + rec.Name + 'AaBb' + rec.Type + 'AaBb' + rec.Icon
|
||||
+ 'AaBb' + rec.URL + 'AaBb' + rec.Width + 'AaBb' + rec.Height + 'AaBb' + rec.ReSize + 'AaBb' + rec.OpenMax
|
||||
+ 'AaBb' + rec.Flash + 'AaBb' + rec.ZL + 'AaBb' + rec.Sort + 'AaBb' + rec.Remark + 'AaBb' + rec.Enabled;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editApp(\'' + rowInfo + '\');"/> <a onclick="editApp(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteApp(' + rec.Id + ');"/> <a onclick="deleteApp(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -205,8 +227,7 @@
|
||||
id: 'addApp',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addApp();
|
||||
}
|
||||
},
|
||||
@@ -214,14 +235,12 @@
|
||||
id: 'deleteApp',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteApp();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -229,8 +248,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -238,27 +256,22 @@
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Number" || obj.id == "Name" || obj.id == "Type" || obj.id == "Icon" || obj.id == "URL"
|
||||
||obj.id=="Width"|| obj.id=="Height"||obj.id=="ZL"|| obj.id=="Sort"||obj.id=="Remark"))
|
||||
{
|
||||
|| obj.id == "Width" || obj.id == "Height" || obj.id == "ZL" || obj.id == "Sort" || obj.id == "Remark")) {
|
||||
$("#saveApp").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchType" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -270,19 +283,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除应用信息
|
||||
function deleteApp(appID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此应用信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteApp(appID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此应用信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/app/delete.action",
|
||||
@@ -291,11 +300,9 @@
|
||||
appID: appID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -303,8 +310,7 @@
|
||||
$.messager.alert('删除提示', '删除应用信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除应用信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -314,25 +320,18 @@
|
||||
}
|
||||
|
||||
//批量删除
|
||||
function batDeleteApp()
|
||||
{
|
||||
function batDeleteApp() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条应用信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -348,11 +347,9 @@
|
||||
appIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -361,8 +358,7 @@
|
||||
$.messager.alert('删除提示', '删除应用信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除应用信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -378,8 +374,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgApp = "";
|
||||
|
||||
function addApp()
|
||||
{
|
||||
function addApp() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#appFM').form('clear');
|
||||
$('#appDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加应用信息');
|
||||
@@ -406,14 +401,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveApp").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#appFM').form('validate'))
|
||||
return;
|
||||
else if (checkAppName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -437,17 +430,14 @@
|
||||
Enabled: $("#Enabled").is(':checked'),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#appDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAppDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存应用信息失败,请稍后重试!'
|
||||
@@ -455,8 +445,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存应用信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -466,8 +455,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editApp(appTotalInfo)
|
||||
{
|
||||
function editApp(appTotalInfo) {
|
||||
var appInfo = appTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#Number").focus().val(appInfo[1]);
|
||||
@@ -495,14 +483,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkAppName()
|
||||
{
|
||||
function checkAppName() {
|
||||
var name = $.trim($("#Name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgApp.length ==0 || name != orgApp))
|
||||
{
|
||||
if (name.length > 0 && (orgApp.length == 0 || name != orgApp)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/app/checkIsNameExist.action",
|
||||
@@ -512,11 +498,9 @@
|
||||
appID: appID,
|
||||
name: name
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '应用名称已经存在', 'info');
|
||||
//alert("应用名称已经存在");
|
||||
//$("#name").val("");
|
||||
@@ -524,8 +508,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查应用名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -536,8 +519,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showAppDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -551,8 +533,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showAppDetails(pageNo,pageSize)
|
||||
{
|
||||
function showAppDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/app/findBy.action",
|
||||
@@ -563,13 +544,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -24,7 +24,8 @@
|
||||
<body>
|
||||
<div id="position" class="easyui-panel" title="当前位置:系统管理 > 资产名称" collapsible="false" closable="false"/>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>类型名称:</td>
|
||||
@@ -69,21 +70,25 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产名称列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="资产名称列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="assetnameDlg" class="easyui-dialog" style="padding: 10px 20px;" closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<div id="assetnameDlg" class="easyui-dialog" style="padding: 10px 20px;" closed="true" buttons="#dlg-buttons"
|
||||
modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="assetnameFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="assetNameLabel">资产名称 </label>
|
||||
<input name="assetName" id="assetName" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="assetName" id="assetName" 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="categoryLabel">资产类型 </label>
|
||||
<select name="category" id="category" style="width:230px;height: 20px">
|
||||
</select>
|
||||
<img id="addCategory" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png" style="cursor: pointer;" alt="增加资产类型" title="增加资产类型" />
|
||||
<img id="addCategory" src="<%=path %>/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||
style="cursor: pointer;" alt="增加资产类型" title="增加资产类型"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="consumableLabel">是否耗材 </label>
|
||||
@@ -101,14 +106,17 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAssetName" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAssetName" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#assetnameDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelAssetName" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#assetnameDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<!--增加类型信息 -->
|
||||
<div id="categoryDlg" class="easyui-dialog" style="padding: 10px 20px;" closed="true" buttons="#dlg-buttons1" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<div id="categoryDlg" class="easyui-dialog" style="padding: 10px 20px;" closed="true" buttons="#dlg-buttons1"
|
||||
modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="categoryFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="categoryNameLabel">类型名称 </label>
|
||||
<input name="categoryName" id="categoryName" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="categoryName" id="categoryName" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;">
|
||||
<label id="catedescriptionLabel">描 述 </label>
|
||||
@@ -119,14 +127,14 @@
|
||||
</div>
|
||||
<div id="dlg-buttons1">
|
||||
<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>
|
||||
<a href="javascript:void(0)" id="cancelCategory" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#categoryDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var categoryList = null;
|
||||
var categoryID = null;
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//初始化系统基础信息
|
||||
initSystemData();
|
||||
initSelectInfo();
|
||||
@@ -137,10 +145,8 @@
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchDescLabel").empty().append("描 述:");
|
||||
$("#descriptionLabel").empty().append("描 述 ");
|
||||
$("#assetNameLabel").empty().append("资产名称 ");
|
||||
@@ -151,8 +157,7 @@
|
||||
$("#catedescriptionLabel").empty().append("描 述 ");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchDescLabel").empty().append("描 述:");
|
||||
$("#descriptionLabel").empty().append("描 述 ");
|
||||
$("#assetNameLabel").empty().append("资产名称 ");
|
||||
@@ -165,39 +170,33 @@
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData()
|
||||
{
|
||||
function initSystemData() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/asset/getBasicData.action",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
categoryList = systemInfo.showModel.map.categoryList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo()
|
||||
{
|
||||
function initSelectInfo() {
|
||||
var options = "";
|
||||
|
||||
if(categoryList !=null)
|
||||
{
|
||||
if (categoryList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < categoryList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < categoryList.length; i++) {
|
||||
var category = categoryList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
categoryID = category.id;
|
||||
}
|
||||
options += '<option value="' + category.id + '">' + category.assetname + '</option>';
|
||||
@@ -206,9 +205,9 @@
|
||||
$("#searchCategory").empty().append('<option value="">请选择</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#assetnameFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -223,8 +222,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'资产名称列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -254,12 +252,11 @@
|
||||
{title: '资产类型', field: 'category', width: 200},
|
||||
{title: '是否耗材', field: 'consumable', width: 100, align: "center"},
|
||||
{title: '描述', field: 'description', width: 400},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.assetname + 'AaBb' + rec.consumableStatus + 'AaBb' + rec.isystem + 'AaBb' + rec.description + 'AaBb' + rec.categoryID;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAssetName(\'' + rowInfo + '\');"/> <a onclick="editAssetName(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAssetName(' + rec.id + ');"/> <a onclick="deleteAssetName(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -272,8 +269,7 @@
|
||||
id: 'addAssetName',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addAssetName();
|
||||
}
|
||||
},
|
||||
@@ -281,14 +277,12 @@
|
||||
id: 'deleteAssetName',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteAssetName();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -296,35 +290,30 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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=="assetName"|| obj.id=="description"|| obj.id=="consumable" || obj.id=="category" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "assetName" || obj.id == "description" || obj.id == "consumable" || obj.id == "category")) {
|
||||
$("#saveAssetName").click();
|
||||
}
|
||||
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="categoryName"|| obj.id=="description" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "categoryName" || obj.id == "description")) {
|
||||
$("#saveCategory").click();
|
||||
}
|
||||
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchAssetName" || obj.id=="searchDesc" || obj.id=="searchCategory" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchAssetName" || obj.id == "searchDesc" || obj.id == "searchCategory")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#addCategory").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#categoryName").val("").focus();
|
||||
$("#descriptioncate").val("");
|
||||
@@ -335,14 +324,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveCategory").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#categoryFM').form('validate'))
|
||||
return;
|
||||
else if (checkCategoryName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: '<%=path %>/category/create.action',
|
||||
@@ -353,17 +340,14 @@
|
||||
description: $.trim($("#descriptioncate").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#categoryDlg').dialog('close');
|
||||
//初始化系统基础信息
|
||||
initSystemData();
|
||||
initSelectInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存资产类别信息失败,请稍后重试!'
|
||||
@@ -371,8 +355,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存资产类型信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -382,14 +365,12 @@
|
||||
});
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkCategoryName()
|
||||
{
|
||||
function checkCategoryName() {
|
||||
var categoryName = $.trim($("#categoryName").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(categoryName.length > 0)
|
||||
{
|
||||
if (categoryName.length > 0) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/category/checkIsNameExist.action",
|
||||
@@ -399,11 +380,9 @@
|
||||
categoryID: 0,
|
||||
categoryName: categoryName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '资产类型名称已经存在', 'info');
|
||||
//alert("资产名称名称已经存在");
|
||||
//$("#supplier").val("");
|
||||
@@ -411,8 +390,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查资产类型名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -422,15 +400,12 @@
|
||||
}
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -442,19 +417,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除资产名称信息
|
||||
function deleteAssetName(assetNameID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此资产名称信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteAssetName(assetNameID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此资产名称信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/assetname/delete.action",
|
||||
@@ -463,11 +434,9 @@
|
||||
assetNameID: assetNameID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -475,8 +444,7 @@
|
||||
$.messager.alert('删除提示', '删除资产名称信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除资产名称信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -486,25 +454,18 @@
|
||||
}
|
||||
|
||||
//批量删除资产名称
|
||||
function batDeleteAssetName()
|
||||
{
|
||||
function batDeleteAssetName() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条资产名称信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -520,11 +481,9 @@
|
||||
assetNameIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -533,8 +492,7 @@
|
||||
$.messager.alert('删除提示', '删除资产名称信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除资产名称信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -550,8 +508,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgAssetName = "";
|
||||
|
||||
function addAssetName()
|
||||
{
|
||||
function addAssetName() {
|
||||
$('#assetnameDlg').dialog({width: 390}).dialog('open')
|
||||
.dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加资产名称信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
@@ -570,14 +527,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveAssetName").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#assetnameFM').form('validate'))
|
||||
return;
|
||||
else if (checkAssetName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -590,17 +545,14 @@
|
||||
clientIp: '<%=clientIp %>',
|
||||
categoryID: $.trim($("#category").val()),
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#assetnameDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAssetNameDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存资产名称信息失败,请稍后重试!'
|
||||
@@ -608,8 +560,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存资产名称信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -619,8 +570,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAssetName(assetNameTotalInfo)
|
||||
{
|
||||
function editAssetName(assetNameTotalInfo) {
|
||||
var assetnameInfo = assetNameTotalInfo.split("AaBb");
|
||||
var row = {
|
||||
assetName: assetnameInfo[1],
|
||||
@@ -643,14 +593,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkAssetName()
|
||||
{
|
||||
function checkAssetName() {
|
||||
var assetName = $.trim($("#assetName").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(assetName.length > 0 &&( orgAssetName.length ==0 || assetName != orgAssetName))
|
||||
{
|
||||
if (assetName.length > 0 && (orgAssetName.length == 0 || assetName != orgAssetName)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/assetname/checkIsNameExist.action",
|
||||
@@ -660,18 +608,15 @@
|
||||
assetNameID: assetNameID,
|
||||
assetName: assetName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '资产名称已经存在', 'info');
|
||||
return;
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查资产名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -682,8 +627,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showAssetNameDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -697,8 +641,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showAssetNameDetails(pageNo,pageSize)
|
||||
{
|
||||
function showAssetNameDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/assetname/findBy.action",
|
||||
@@ -711,13 +654,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -24,7 +24,8 @@
|
||||
<body>
|
||||
<div id="position" class="easyui-panel" title="当前位置:系统管理 > 资产类型" collapsible="false" closable="false"/>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>类型名称:</td>
|
||||
@@ -49,7 +50,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="类型列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="类型列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +60,8 @@
|
||||
<form id="categoryFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="categoryNameLabel">类型名称 </label>
|
||||
<input name="categoryName" id="categoryName" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="categoryName" id="categoryName" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;">
|
||||
<label id="descriptionLabel">描 述 </label>
|
||||
@@ -69,13 +72,13 @@
|
||||
</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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
@@ -83,16 +86,13 @@
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchDescLabel").empty().append("描 述:");
|
||||
$("#categoryNameLabel").empty().append("类型名称 ");
|
||||
$("#descriptionLabel").empty().append("描 述 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchDescLabel").empty().append("描 述:");
|
||||
$("#categoryNameLabel").empty().append("类型名称 ");
|
||||
$("#descriptionLabel").empty().append("描 述 ");
|
||||
@@ -100,8 +100,7 @@
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#categoryFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -110,8 +109,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'供应商列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -139,12 +137,11 @@
|
||||
{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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editCategory(\'' + rowInfo + '\');"/> <a onclick="editCategory(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteCategory(' + rec.id + ');"/> <a onclick="deleteCategory(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -157,8 +154,7 @@
|
||||
id: 'addSupplier',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addCategory();
|
||||
}
|
||||
},
|
||||
@@ -166,14 +162,12 @@
|
||||
id: 'deleteSupplier',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteCategory();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -181,34 +175,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "categoryName" || obj.id == "description")) {
|
||||
$("#saveCategory").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchCategory" || obj.id=="searchDesc" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchCategory" || obj.id == "searchDesc")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -220,19 +209,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除供应商信息
|
||||
function deleteCategory(categoryID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此资产类型信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteCategory(categoryID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此资产类型信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/category/delete.action",
|
||||
@@ -241,11 +226,9 @@
|
||||
categoryID: categoryID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -253,8 +236,7 @@
|
||||
$.messager.alert('删除提示', '删除资产类别信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除资产类别信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -264,25 +246,18 @@
|
||||
}
|
||||
|
||||
//批量删除供应商
|
||||
function batDeleteCategory()
|
||||
{
|
||||
function batDeleteCategory() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条资产类别信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -298,11 +273,9 @@
|
||||
categoryIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -311,8 +284,7 @@
|
||||
$.messager.alert('删除提示', '删除资产类别信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除资产类别信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -328,8 +300,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgCategory = "";
|
||||
|
||||
function addCategory()
|
||||
{
|
||||
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"/> 增加资产类型信息');
|
||||
@@ -344,14 +315,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveCategory").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#categoryFM').form('validate'))
|
||||
return;
|
||||
else if (checkCategoryName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -362,17 +331,14 @@
|
||||
description: $.trim($("#description").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#categoryDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showCategoryDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存资产类别信息失败,请稍后重试!'
|
||||
@@ -380,8 +346,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存资产类型信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -391,8 +356,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editCategory(categoryTotalInfo)
|
||||
{
|
||||
function editCategory(categoryTotalInfo) {
|
||||
var categoryInfo = categoryTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -409,14 +373,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkCategoryName()
|
||||
{
|
||||
function checkCategoryName() {
|
||||
var categoryName = $.trim($("#categoryName").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(categoryName.length > 0 &&( orgCategory.length ==0 || categoryName != orgCategory))
|
||||
{
|
||||
if (categoryName.length > 0 && (orgCategory.length == 0 || categoryName != orgCategory)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/category/checkIsNameExist.action",
|
||||
@@ -426,11 +388,9 @@
|
||||
categoryID: categoryID,
|
||||
categoryName: categoryName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '资产类型名称已经存在', 'info');
|
||||
//alert("供应商名称已经存在");
|
||||
//$("#supplier").val("");
|
||||
@@ -438,8 +398,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查资产类型名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -450,8 +409,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showCategoryDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -465,8 +423,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showCategoryDetails(pageNo,pageSize)
|
||||
{
|
||||
function showCategoryDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/category/findBy.action",
|
||||
@@ -477,13 +434,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名 称:</td>
|
||||
@@ -60,7 +61,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户信息列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户信息列表" iconCls="icon-list"
|
||||
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"
|
||||
@@ -70,7 +72,8 @@
|
||||
<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"/>
|
||||
<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;">
|
||||
@@ -80,11 +83,13 @@
|
||||
<tr>
|
||||
<td>手机号码</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<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"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -100,21 +105,25 @@
|
||||
<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 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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -134,7 +143,8 @@
|
||||
</td>
|
||||
<td>账号</td>
|
||||
<td style="padding:1px">
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -154,12 +164,14 @@
|
||||
</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>
|
||||
<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">
|
||||
<form id="importExcelFM" method="post" enctype="multipart/form-data"
|
||||
action="<%=path%>/supplier/importExcelCustomer.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
@@ -177,7 +189,8 @@
|
||||
<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>
|
||||
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -22,7 +22,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>仓库名称:</td>
|
||||
@@ -44,7 +45,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="仓库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="仓库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -55,25 +57,29 @@
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/> 元/天/KG
|
||||
<input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2"
|
||||
style="width: 175px;height: 20px"/> 元/天/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"/> 元
|
||||
<input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元"
|
||||
data-options="min:0,precision:2" style="width: 215px;height: 20px"/> 元
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -94,7 +100,8 @@
|
||||
</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>
|
||||
<a href="javascript:void(0)" id="cancelDepot" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -141,13 +148,13 @@
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
||||
{ title: '操作',field: 'op',align:"center",width:60,
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/> ';
|
||||
str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/>';
|
||||
}
|
||||
@@ -202,6 +209,7 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
@@ -238,8 +246,7 @@
|
||||
}),
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -265,13 +272,10 @@
|
||||
}
|
||||
if (row.length > 0) {
|
||||
$.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条仓库信息吗?', function (r) {
|
||||
if (r)
|
||||
{
|
||||
if (r) {
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -287,11 +291,9 @@
|
||||
depotIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -300,8 +302,7 @@
|
||||
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -317,8 +318,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgDepot = "";
|
||||
|
||||
function addDepot()
|
||||
{
|
||||
function addDepot() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加仓库信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
@@ -336,8 +336,7 @@
|
||||
return;
|
||||
else if (checkDepotName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -353,17 +352,14 @@
|
||||
remark: $.trim($("#remark").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#depotDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存仓库信息失败,请稍后重试!'
|
||||
@@ -371,8 +367,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存仓库信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -381,8 +376,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editDepot(depotTotalInfo)
|
||||
{
|
||||
function editDepot(depotTotalInfo) {
|
||||
var depotInfo = depotTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -403,14 +397,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkDepotName()
|
||||
{
|
||||
function checkDepotName() {
|
||||
var name = $.trim($("#name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgDepot.length ==0 || name != orgDepot))
|
||||
{
|
||||
if (name.length > 0 && (orgDepot.length == 0 || name != orgDepot)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depot/checkIsNameExist.action",
|
||||
@@ -420,11 +412,9 @@
|
||||
depotID: depotID,
|
||||
name: name
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '仓库名称已经存在', 'info');
|
||||
//alert("仓库名称已经存在");
|
||||
//$("#name").val("");
|
||||
@@ -432,8 +422,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查仓库名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -444,8 +433,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showDepotDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -459,8 +447,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showDepotDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDepotDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depot/findBy.action",
|
||||
@@ -472,13 +459,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>礼品卡名称:</td>
|
||||
@@ -48,7 +49,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -58,15 +60,19 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td><label id="nameLabel">礼品卡名称 </label></td>
|
||||
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="sortLabel">排 序 </label></td>
|
||||
<td style="padding:5px"><input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="sort" id="sort" class="easyui-textbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label id="remarkLabel">描 述 </label></td>
|
||||
<td style="padding:5px"><textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea></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 %>"/>
|
||||
@@ -74,13 +80,13 @@
|
||||
</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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
@@ -88,17 +94,14 @@
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchRemarkLabel").empty().append("描 述:");
|
||||
$("#nameLabel").empty().append("礼品卡名称 ");
|
||||
$("#sortLabel").empty().append("排 序 ");
|
||||
$("#remarkLabel").empty().append("描 述 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchRemarkLabel").empty().append("描 述:");
|
||||
$("#nameLabel").empty().append("礼品卡名称 ");
|
||||
$("#sortLabel").empty().append("排 序 ");
|
||||
@@ -107,8 +110,7 @@
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#depotFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -117,8 +119,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'仓库列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -147,12 +148,11 @@
|
||||
{title: '礼品卡名称', field: 'name', width: 200},
|
||||
{title: '排序', field: 'sort', width: 200},
|
||||
{title: '描述', field: 'remark', width: 200},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/> <a onclick="editDepot(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot(' + rec.id + ');"/> <a onclick="deleteDepot(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -165,8 +165,7 @@
|
||||
id: 'addDepot',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addDepot();
|
||||
}
|
||||
},
|
||||
@@ -174,14 +173,12 @@
|
||||
id: 'deleteDepot',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteDepot();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -189,34 +186,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) {
|
||||
$("#saveDepot").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -228,19 +220,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除供应商信息
|
||||
function deleteDepot(depotID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteDepot(depotID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此仓库信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depot/delete.action",
|
||||
@@ -249,11 +237,9 @@
|
||||
depotID: depotID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -261,8 +247,7 @@
|
||||
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -272,25 +257,18 @@
|
||||
}
|
||||
|
||||
//批量删除供应商
|
||||
function batDeleteDepot()
|
||||
{
|
||||
function batDeleteDepot() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条仓库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -306,11 +284,9 @@
|
||||
depotIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -319,8 +295,7 @@
|
||||
$.messager.alert('删除提示', '删除仓库信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除仓库信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -336,8 +311,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgDepot = "";
|
||||
|
||||
function addDepot()
|
||||
{
|
||||
function addDepot() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#sort").val("");
|
||||
$("#remark").val("");
|
||||
@@ -353,14 +327,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveDepot").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#depotFM').form('validate'))
|
||||
return;
|
||||
else if (checkDepotName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -373,17 +345,14 @@
|
||||
remark: $.trim($("#remark").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#depotDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存仓库信息失败,请稍后重试!'
|
||||
@@ -391,8 +360,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存仓库信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -402,8 +370,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editDepot(depotTotalInfo)
|
||||
{
|
||||
function editDepot(depotTotalInfo) {
|
||||
var depotInfo = depotTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -421,14 +388,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkDepotName()
|
||||
{
|
||||
function checkDepotName() {
|
||||
var name = $.trim($("#name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgDepot.length ==0 || name != orgDepot))
|
||||
{
|
||||
if (name.length > 0 && (orgDepot.length == 0 || name != orgDepot)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depot/checkIsNameExist.action",
|
||||
@@ -438,11 +403,9 @@
|
||||
depotID: depotID,
|
||||
name: name
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '仓库名称已经存在', 'info');
|
||||
//alert("仓库名称已经存在");
|
||||
//$("#name").val("");
|
||||
@@ -450,8 +413,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查仓库名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -462,8 +424,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showDepotDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -477,8 +438,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showDepotDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDepotDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depot/findBy.action",
|
||||
@@ -490,13 +450,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
@@ -52,7 +53,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="功能列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="功能列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -62,23 +64,29 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:65px;">编号</td>
|
||||
<td style="padding:5px"><input name="Number" id="Number" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="Number" id="Number" class="easyui-textbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td style="padding:5px"><input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,20]'" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="Name" id="Name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,20]'"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>上级编号</td>
|
||||
<td style="padding:5px"><input name="PNumber" id="PNumber" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="PNumber" id="PNumber" class="easyui-textbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>链接</td>
|
||||
<td style="padding:5px"><input name="URL" id="URL" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="URL" id="URL" class="easyui-textbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>排序</td>
|
||||
<td style="padding:5px"><input name="Sort" id="Sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="Sort" id="Sort" class="easyui-textbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>功能按钮</td>
|
||||
@@ -88,17 +96,20 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收缩</td>
|
||||
<td style="padding:5px"><input name="State" id="State" type="checkbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="State" id="State" type="checkbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>启用</td>
|
||||
<td style="padding:5px"><input name="Enabled" id="Enabled" type="checkbox" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="Enabled" id="Enabled" type="checkbox"
|
||||
style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td style="padding:5px"><select name="Type" id="Type" style="width: 230px;height: 20px">
|
||||
<option value="电脑版">电脑版</option>
|
||||
<option value="手机版">手机版</option></select>
|
||||
<option value="手机版">手机版</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -107,13 +118,13 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveFunctions" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelFunctions" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#functionsDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelFunctions" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#functionsDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
@@ -121,8 +132,7 @@
|
||||
});
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#functionsFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -131,8 +141,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'功能列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -162,20 +171,23 @@
|
||||
{title: '上级编号', field: 'PNumber', width: 60},
|
||||
{title: '链接', field: 'URL', width: 200},
|
||||
{title: '排序', field: 'Sort', width: 50},
|
||||
{ title: '收缩',field: 'State',width:50,formatter:function(value){
|
||||
return value? "开":"关";
|
||||
}},
|
||||
{ title: '启用',field: 'Enabled',width:50,formatter:function(value){
|
||||
return value? "开":"关";
|
||||
}},
|
||||
{ title: '类型',field: 'Type',width:50},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '收缩', field: 'State', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '启用', field: 'Enabled', width: 50, formatter: function (value) {
|
||||
return value ? "开" : "关";
|
||||
}
|
||||
},
|
||||
{title: '类型', field: 'Type', width: 50},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.Number + 'AaBb' + rec.Name + 'AaBb' + rec.PNumber + 'AaBb' + rec.URL
|
||||
+ 'AaBb' + rec.State + 'AaBb' + rec.Sort + 'AaBb' + rec.Enabled + 'AaBb' + rec.Type + 'AaBb' + rec.PushBtn;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editFunctions(\'' + rowInfo + '\');"/> <a onclick="editFunctions(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteFunctions(' + rec.Id + ');"/> <a onclick="deleteFunctions(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -188,8 +200,7 @@
|
||||
id: 'addFunctions',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addFunctions();
|
||||
}
|
||||
},
|
||||
@@ -197,14 +208,12 @@
|
||||
id: 'deleteFunctions',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteFunctions();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -212,34 +221,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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=="PNumber"|| obj.id=="URL" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Name" || obj.id == "PNumber" || obj.id == "URL")) {
|
||||
$("#saveFunctions").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchType" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -251,8 +255,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -269,12 +272,9 @@
|
||||
}
|
||||
|
||||
//删除供应商信息
|
||||
function deleteFunctions(functionsID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此功能信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteFunctions(functionsID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此功能信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/functions/delete.action",
|
||||
@@ -283,11 +283,9 @@
|
||||
functionsID: functionsID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -295,8 +293,7 @@
|
||||
$.messager.alert('删除提示', '删除功能信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除功能信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -306,25 +303,18 @@
|
||||
}
|
||||
|
||||
//批量删除
|
||||
function batDeleteFunctions()
|
||||
{
|
||||
function batDeleteFunctions() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条功能信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -340,11 +330,9 @@
|
||||
functionsIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -353,8 +341,7 @@
|
||||
$.messager.alert('删除提示', '删除功能信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除功能信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -370,8 +357,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgFunctions = "";
|
||||
|
||||
function addFunctions()
|
||||
{
|
||||
function addFunctions() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#functionsDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加功能信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
@@ -385,14 +371,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveFunctions").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#functionsFM').form('validate'))
|
||||
return;
|
||||
else if (checkFunctionsName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (!$("#Type").val()) {
|
||||
$.messager.alert('提示', '请选择类型!', 'warning');
|
||||
return;
|
||||
@@ -414,17 +398,14 @@
|
||||
PushBtn: $('#PushBtn').combobox('getValues').toString(), //功能按钮
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#functionsDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showFunctionsDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存功能信息失败,请稍后重试!'
|
||||
@@ -432,8 +413,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存功能信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -443,8 +423,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editFunctions(functionsTotalInfo)
|
||||
{
|
||||
function editFunctions(functionsTotalInfo) {
|
||||
var functionsInfo = functionsTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -482,14 +461,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkFunctionsName()
|
||||
{
|
||||
function checkFunctionsName() {
|
||||
var Name = $.trim($("#Name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgFunctions.length ==0 || name != orgFunctions))
|
||||
{
|
||||
if (name.length > 0 && (orgFunctions.length == 0 || name != orgFunctions)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/functions/checkIsNameExist.action",
|
||||
@@ -499,11 +476,9 @@
|
||||
functionsID: functionsID,
|
||||
Name: Name
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '功能名称已经存在', 'info');
|
||||
//alert("功能名称已经存在");
|
||||
//$("#name").val("");
|
||||
@@ -511,8 +486,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查功能名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -523,8 +497,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showFunctionsDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -538,8 +511,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showFunctionsDetails(pageNo,pageSize)
|
||||
{
|
||||
function showFunctionsDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/functions/findBy.action",
|
||||
@@ -550,13 +522,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,11 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
|
||||
margin-bottom: 0px;
|
||||
background-color: #EAF2FD;
|
||||
}
|
||||
.STYLE1 {font-size: 12px}
|
||||
|
||||
.STYLE1 {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.STYLE4 {
|
||||
font-size: 12px;
|
||||
color: #1F4A65;
|
||||
@@ -34,22 +38,29 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
|
||||
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}
|
||||
|
||||
.STYLE7 {
|
||||
font-size: 12
|
||||
}
|
||||
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -24,7 +24,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名 称:</td>
|
||||
@@ -59,7 +60,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收支项目" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="收支项目" iconCls="icon-list"
|
||||
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"
|
||||
@@ -67,7 +69,8 @@
|
||||
<form id="inOutItemFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="nameLabel">名 称</label>
|
||||
<input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="name" id="name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="typeLabel">类 型</label>
|
||||
@@ -85,31 +88,28 @@
|
||||
</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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
browserFit();
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchTypeLabel").empty().append("类 型:");
|
||||
$("#searchRemarkLabel").empty().append("备 注:");
|
||||
$("#nameLabel").empty().append("名 称");
|
||||
$("#typeLabel").empty().append("类 型");
|
||||
$("#remarkLabel").empty().append("备 注");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchTypeLabel").empty().append("类 型:");
|
||||
$("#searchRemarkLabel").empty().append("备 注:");
|
||||
$("#nameLabel").empty().append("名 称");
|
||||
@@ -119,8 +119,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'收支项目',
|
||||
//iconCls:'icon-save',
|
||||
@@ -151,12 +150,11 @@
|
||||
{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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editInOutItem(\'' + rowInfo + '\');"/> <a onclick="editInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteInOutItem(\'' + rowInfo + '\');"/> <a onclick="deleteInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -169,8 +167,7 @@
|
||||
id: 'addInOutItem',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addInOutItem();
|
||||
}
|
||||
},
|
||||
@@ -178,14 +175,12 @@
|
||||
id: 'deleteInOutItem',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteInOutItem();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -193,35 +188,30 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "name" || obj.id == "remark")) {
|
||||
$("#saveInOutItem").click();
|
||||
}
|
||||
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -233,19 +223,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除收支项目
|
||||
function deleteInOutItem(inOutItemInfo)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此收支项目吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteInOutItem(inOutItemInfo) {
|
||||
$.messager.confirm('删除确认', '确定要删除此收支项目吗?', function (r) {
|
||||
if (r) {
|
||||
var inOutItemTotalInfo = inOutItemInfo.split("AaBb");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -256,8 +242,7 @@
|
||||
name: inOutItemTotalInfo[1],
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if (msg == '成功')
|
||||
//加载完以后重新初始化
|
||||
@@ -266,8 +251,7 @@
|
||||
$.messager.alert('删除提示', '删除收支项目失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除收支项目异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -277,25 +261,18 @@
|
||||
}
|
||||
|
||||
//批量删除收支项目
|
||||
function batDeleteInOutItem()
|
||||
{
|
||||
function batDeleteInOutItem() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条收支项目吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -310,11 +287,9 @@
|
||||
inOutItemIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -323,8 +298,7 @@
|
||||
$.messager.alert('删除提示', '删除收支项目失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除收支项目异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -340,8 +314,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgInOutItem = "";
|
||||
|
||||
function addInOutItem()
|
||||
{
|
||||
function addInOutItem() {
|
||||
$('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加收支项目');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$('#inOutItemFM').form('clear');
|
||||
@@ -359,8 +332,7 @@
|
||||
|
||||
//保存收支项目
|
||||
$("#saveInOutItem").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (checkInOutItemName())
|
||||
return;
|
||||
if (!$("#type").val()) {
|
||||
@@ -369,22 +341,18 @@
|
||||
}
|
||||
$('#inOutItemFM').form('submit', {
|
||||
url: url,
|
||||
onSubmit: function()
|
||||
{
|
||||
onSubmit: function () {
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(result)
|
||||
{
|
||||
success: function (result) {
|
||||
var result = eval('(' + result + ')');
|
||||
if (!result)
|
||||
{
|
||||
if (!result) {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存收支项目失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$('#inOutItemDlg').dialog('close');
|
||||
//$('#tableData').datagrid('reload');
|
||||
//加载完以后重新初始化
|
||||
@@ -398,8 +366,7 @@
|
||||
});
|
||||
|
||||
//编辑收支项目
|
||||
function editInOutItem(inOutItemTotalInfo)
|
||||
{
|
||||
function editInOutItem(inOutItemTotalInfo) {
|
||||
var inOutItemInfo = inOutItemTotalInfo.split("AaBb");
|
||||
var row = {
|
||||
name: inOutItemInfo[1],
|
||||
@@ -418,14 +385,12 @@
|
||||
}
|
||||
|
||||
//检查收支项目 名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkInOutItemName()
|
||||
{
|
||||
function checkInOutItemName() {
|
||||
var inOutItemName = $.trim($("#name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(inOutItemName.length > 0 &&( orgInOutItem.length ==0 || inOutItemName != orgInOutItem))
|
||||
{
|
||||
if (inOutItemName.length > 0 && (orgInOutItem.length == 0 || inOutItemName != orgInOutItem)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/inOutItem/checkIsNameExist.action",
|
||||
@@ -435,18 +400,15 @@
|
||||
inOutItemID: inOutItemID,
|
||||
name: inOutItemName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '收支项目名称已经存在', 'info');
|
||||
return;
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查收支项目名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -457,8 +419,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showInOutItemDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -472,8 +433,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showInOutItemDetails(pageNo,pageSize)
|
||||
{
|
||||
function showInOutItemDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/inOutItem/findBy.action",
|
||||
@@ -485,13 +445,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;position: center;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;position: center;" title="查询窗口" iconCls="icon-search"
|
||||
collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>操作模块:</td>
|
||||
@@ -57,7 +58,8 @@
|
||||
<tr>
|
||||
<td>开始时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" class="easyui-datebox" style="width:90px;"/>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" class="easyui-datebox"
|
||||
style="width:90px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@@ -81,14 +83,14 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="操作日志列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="操作日志列表" iconCls="icon-list"
|
||||
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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
//初始化系统基础信息
|
||||
@@ -98,8 +100,7 @@
|
||||
});
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'供应商列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -132,8 +133,7 @@
|
||||
{title: '操作状态', field: 'status', width: 70},
|
||||
{title: '备注', field: 'remark', width: 180}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -141,8 +141,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -152,21 +151,18 @@
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchOperation" || obj.id == "searchUsernameID" || obj.id == "searchIP"
|
||||
|| obj.id == "searchStatus" || obj.id == "searchBeginTime" || obj.id == "searchEndTime"
|
||||
|| obj.id=="searchDesc"))
|
||||
{
|
||||
|| obj.id == "searchDesc")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -178,29 +174,25 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData()
|
||||
{
|
||||
function initSystemData() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/log/getBasicData.action",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
//成功关闭loading
|
||||
userList = systemInfo.showModel.map.userList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -209,18 +201,14 @@
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo()
|
||||
{
|
||||
function initSelectInfo() {
|
||||
var options = "";
|
||||
|
||||
if(userList !=null)
|
||||
{
|
||||
if (userList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < userList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < userList.length; i++) {
|
||||
var user = userList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
userID = user.id
|
||||
}
|
||||
options += '<option value="' + user.id + '">' + user.username + '</option>';
|
||||
@@ -231,8 +219,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showLogDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -246,8 +233,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showLogDetails(pageNo,pageSize)
|
||||
{
|
||||
function showLogDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/log/findBy.action",
|
||||
@@ -263,14 +249,12 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
//$('#tableData').datagrid('reload');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -279,8 +263,7 @@
|
||||
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
$("#searchOperation").val("");
|
||||
$("#searchUsernameID").val("");
|
||||
$("#searchIP").val("");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名 称:</td>
|
||||
@@ -60,7 +61,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="会员信息列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="会员信息列表" iconCls="icon-list"
|
||||
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"
|
||||
@@ -70,7 +72,8 @@
|
||||
<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"/>
|
||||
<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;">
|
||||
@@ -80,11 +83,13 @@
|
||||
<tr>
|
||||
<td>手机号码</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<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"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -100,21 +105,25 @@
|
||||
<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 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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -134,7 +143,8 @@
|
||||
</td>
|
||||
<td>账号</td>
|
||||
<td style="padding:1px">
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -154,12 +164,14 @@
|
||||
</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>
|
||||
<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">
|
||||
<form id="importExcelFM" method="post" enctype="multipart/form-data"
|
||||
action="<%=path%>/supplier/importExcelMember.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
@@ -177,7 +189,8 @@
|
||||
<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>
|
||||
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -26,7 +26,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>角色名称:</td>
|
||||
@@ -48,7 +49,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="角色列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="角色列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +60,9 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td><label id="nameLabel">角色名称 </label></td>
|
||||
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox"
|
||||
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 %>"/>
|
||||
@@ -66,13 +70,13 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveRole" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelRole" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#roleDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelRole" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#roleDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
@@ -80,23 +84,19 @@
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#searchRemarkLabel").empty().append("描 述:");
|
||||
$("#nameLabel").empty().append("角色名称 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#searchRemarkLabel").empty().append("描 述:");
|
||||
$("#nameLabel").empty().append("角色名称 ");
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#roleFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -105,8 +105,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'角色列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -133,12 +132,11 @@
|
||||
columns: [[
|
||||
{field: 'Id', width: 35, align: "center", checkbox: true},
|
||||
{title: '角色名称', field: 'Name', width: 200},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.Name;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + rowInfo + '\');"/> <a onclick="editRole(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole(' + rec.Id + ');"/> <a onclick="deleteRole(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -151,8 +149,7 @@
|
||||
id: 'addRole',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addRole();
|
||||
}
|
||||
},
|
||||
@@ -160,14 +157,12 @@
|
||||
id: 'deleteRole',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteRole();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -175,34 +170,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "name" || obj.id == "sort" || obj.id == "remark")) {
|
||||
$("#saveRole").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" ))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchRemark")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -214,19 +204,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除供应商信息
|
||||
function deleteRole(roleID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此角色信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteRole(roleID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此角色信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/role/delete.action",
|
||||
@@ -235,11 +221,9 @@
|
||||
roleID: roleID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -247,8 +231,7 @@
|
||||
$.messager.alert('删除提示', '删除角色信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除角色信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -258,25 +241,18 @@
|
||||
}
|
||||
|
||||
//批量删除供应商
|
||||
function batDeleteRole()
|
||||
{
|
||||
function batDeleteRole() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条角色信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -292,11 +268,9 @@
|
||||
roleIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -305,8 +279,7 @@
|
||||
$.messager.alert('删除提示', '删除角色信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除角色信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -322,8 +295,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgRole = "";
|
||||
|
||||
function addRole()
|
||||
{
|
||||
function addRole() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#sort").val("");
|
||||
$("#remark").val("");
|
||||
@@ -339,14 +311,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveRole").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#roleFM').form('validate'))
|
||||
return;
|
||||
else if (checkRoleName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
@@ -356,17 +326,14 @@
|
||||
name: $.trim($("#name").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#roleDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showRoleDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存角色信息失败,请稍后重试!'
|
||||
@@ -374,8 +341,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存角色信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -385,8 +351,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editRole(roleTotalInfo)
|
||||
{
|
||||
function editRole(roleTotalInfo) {
|
||||
var roleInfo = roleTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -402,14 +367,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkRoleName()
|
||||
{
|
||||
function checkRoleName() {
|
||||
var name = $.trim($("#name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgRole.length ==0 || name != orgRole))
|
||||
{
|
||||
if (name.length > 0 && (orgRole.length == 0 || name != orgRole)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/role/checkIsNameExist.action",
|
||||
@@ -419,11 +382,9 @@
|
||||
roleID: roleID,
|
||||
name: name
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '角色名称已经存在', 'info');
|
||||
//alert("角色名称已经存在");
|
||||
//$("#name").val("");
|
||||
@@ -431,8 +392,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查角色名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -443,8 +403,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showRoleDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -458,8 +417,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showRoleDetails(pageNo,pageSize)
|
||||
{
|
||||
function showRoleDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/role/findBy.action",
|
||||
@@ -469,13 +427,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -57,8 +57,13 @@
|
||||
//cnodes = cnodes.substring(0, cnodes.length - 1);
|
||||
pnodes = pnodes.substring(0, pnodes.length - 1);
|
||||
|
||||
if (ctype == 'child') { return cnodes; }
|
||||
else { return pnodes };
|
||||
if (ctype == 'child') {
|
||||
return cnodes;
|
||||
}
|
||||
else {
|
||||
return pnodes
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
$(function () {
|
||||
@@ -72,12 +77,10 @@
|
||||
|
||||
$("#btnOK").click(
|
||||
function () {
|
||||
if(!checkRoleAPP())
|
||||
{
|
||||
if (!checkRoleAPP()) {
|
||||
url = '<%=path%>/userBusiness/create.action';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
url = '<%=path%>/userBusiness/update.action';
|
||||
}
|
||||
|
||||
@@ -86,7 +89,8 @@
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
|
||||
data: {
|
||||
Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
@@ -106,8 +110,7 @@
|
||||
});
|
||||
|
||||
//检查记录是否存在
|
||||
function checkRoleAPP()
|
||||
{
|
||||
function checkRoleAPP() {
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,是否存在
|
||||
@@ -120,13 +123,11 @@
|
||||
Type: type,
|
||||
KeyId: url_id
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查角色对应应用是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -57,8 +57,13 @@
|
||||
//cnodes = cnodes.substring(0, cnodes.length - 1);
|
||||
pnodes = pnodes.substring(0, pnodes.length - 1);
|
||||
|
||||
if (ctype == 'child') { return cnodes; }
|
||||
else { return pnodes };
|
||||
if (ctype == 'child') {
|
||||
return cnodes;
|
||||
}
|
||||
else {
|
||||
return pnodes
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
$(function () {
|
||||
@@ -71,12 +76,10 @@
|
||||
|
||||
$("#btnOK").click(
|
||||
function () {
|
||||
if(!checkRoleFunctions())
|
||||
{
|
||||
if (!checkRoleFunctions()) {
|
||||
url = '<%=path%>/userBusiness/create.action';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
url = '<%=path%>/userBusiness/update.action';
|
||||
}
|
||||
|
||||
@@ -85,7 +88,8 @@
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
|
||||
data: {
|
||||
Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
@@ -105,8 +109,7 @@
|
||||
});
|
||||
|
||||
//检查记录是否存在
|
||||
function checkRoleFunctions()
|
||||
{
|
||||
function checkRoleFunctions() {
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,是否存在
|
||||
@@ -119,13 +122,11 @@
|
||||
Type: type,
|
||||
KeyId: url_id
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查角色对应功能是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -27,7 +27,8 @@
|
||||
</div>
|
||||
<div id="pushList">
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="功能列表-选择按钮权限" iconCls="icon-list"
|
||||
closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,6 +46,7 @@
|
||||
showDetails(1, initPageSize);
|
||||
bindEvent();
|
||||
});
|
||||
|
||||
//初始化JSON
|
||||
function initJSON() {
|
||||
var url = '<%=path %>/js/pages/manage/pushBtn.json';
|
||||
@@ -62,6 +64,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
@@ -74,7 +77,8 @@
|
||||
columns: [[
|
||||
{field: 'Id', align: "center", hidden: true},
|
||||
{title: '名称', field: 'Name', width: 100},
|
||||
{ title: '按钮列表',field: 'PushBtnList',width:400,formatter:function(value,rec) {
|
||||
{
|
||||
title: '按钮列表', field: 'PushBtnList', width: 400, formatter: function (value, rec) {
|
||||
var btnStr = rec.PushBtn;
|
||||
if (btnStr != undefined) {
|
||||
var arr = btnStr.split(",");
|
||||
@@ -97,8 +101,7 @@
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -107,13 +110,11 @@
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try
|
||||
{
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -125,8 +126,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function bindEvent() {
|
||||
setTimeout(function () {
|
||||
var bindBody = $("#pushList .datagrid-view2 .datagrid-body");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -96,7 +96,8 @@
|
||||
<tr>
|
||||
<td>公司名称:</td>
|
||||
<td>
|
||||
<input type="text" class="company_name easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width:250px;"/>
|
||||
<input type="text" class="company_name easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width:250px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -22,7 +22,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>计量单位:</td>
|
||||
@@ -39,7 +40,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="计量单位列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="计量单位列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -50,16 +52,19 @@
|
||||
<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"/>
|
||||
<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="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"/>
|
||||
<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>
|
||||
@@ -69,21 +74,20 @@
|
||||
</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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
});
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#unitFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -118,12 +122,12 @@
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
||||
{ title: '操作',field: 'op',align:"center",width:60,
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 60,
|
||||
formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.UName;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + rowInfo + '\');"/> ';
|
||||
str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
|
||||
}
|
||||
@@ -173,6 +177,7 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
@@ -209,8 +214,7 @@
|
||||
}),
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -236,13 +240,10 @@
|
||||
}
|
||||
if (row.length > 0) {
|
||||
$.messager.confirm('删除确认', '确定要删除选中的' + row.length + '条计量单位信息吗?', function (r) {
|
||||
if (r)
|
||||
{
|
||||
if (r) {
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -299,14 +300,12 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveUnit").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#unitFM').form('validate'))
|
||||
return;
|
||||
else if (checkUnitName())
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
var basicName = $.trim($("#basicName").val());
|
||||
var otherName = $.trim($("#otherName").val());
|
||||
var otherNum = $.trim($("#otherNum").val());
|
||||
@@ -320,17 +319,14 @@
|
||||
UName: name,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#unitDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showUnitDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存计量单位失败,请稍后重试!'
|
||||
@@ -338,8 +334,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存计量单位异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -373,14 +368,12 @@
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkUnitName()
|
||||
{
|
||||
function checkUnitName() {
|
||||
var name = $.trim($("#name").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(name.length > 0 &&( orgUnit.length ==0 || name != orgUnit))
|
||||
{
|
||||
if (name.length > 0 && (orgUnit.length == 0 || name != orgUnit)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/unit/checkIsNameExist.action",
|
||||
@@ -392,15 +385,13 @@
|
||||
}),
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '计量单位名称已经存在', 'info');
|
||||
return;
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查计量单位名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -411,8 +402,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showUnitDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -426,8 +416,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showUnitDetails(pageNo,pageSize)
|
||||
{
|
||||
function showUnitDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/unit/findBy.action",
|
||||
@@ -437,13 +426,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -26,7 +26,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>用户名称:</td>
|
||||
@@ -54,7 +55,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="用户列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="用户列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -63,11 +65,13 @@
|
||||
<form id="usernameFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="usernameLabel">用户名称 </label>
|
||||
<input name="username" id="username" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
<input name="username" id="username" 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="loginameLabel">登录名称 </label>
|
||||
<input name="loginame" id="loginame" class="easyui-validatebox" data-options="required:true,validType:'length[2,15]'" style="width: 120px;height: 20px"/>
|
||||
<input name="loginame" id="loginame" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,15]'" style="width: 120px;height: 20px"/>
|
||||
初始密码:123456
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
@@ -84,7 +88,8 @@
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="emailLabel">电子邮箱 </label>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 230px;height: 20px"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="descriptionLabel">描 述 </label>
|
||||
@@ -96,22 +101,20 @@
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="resetPwd" class="easyui-linkbutton" iconCls="icon-redo">重置密码</a>
|
||||
<a href="javascript:void(0)" id="saveusername" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelusername" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#userDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelusername" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#userDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
browserFit();
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#usernameLabel").empty().append("用户名称 ");
|
||||
$("#loginameLabel").empty().append("登录名称 ");
|
||||
$("#departmentLabel").empty().append("部 门 ");
|
||||
@@ -123,8 +126,7 @@
|
||||
$("#searchDeptLabel").empty().append("部 门:");
|
||||
$("#searchDescLabel").empty().append("描 述:");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#usernameLabel").empty().append("用户名称 ");
|
||||
$("#loginameLabel").empty().append("登录名称 ");
|
||||
$("#departmentLabel").empty().append("部 门 ");
|
||||
@@ -139,8 +141,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -166,14 +167,13 @@
|
||||
{title: '电子邮箱', field: 'email', width: 150, align: "center"},
|
||||
{title: '电话号码', field: 'phonenum', width: 150, align: "center"},
|
||||
{title: '描述', field: 'description', width: 150},
|
||||
{ title: '操作',field: 'op',width:160,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', width: 160, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.username + 'AaBb' + rec.loginame + 'AaBb' + rec.position
|
||||
+ 'AaBb' + rec.department + 'AaBb' + rec.email + 'AaBb' + rec.phonenum + 'AaBb' + rec.ismanager
|
||||
+ 'AaBb' + rec.isystem + 'AaBb' + rec.description;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUser(\'' + rowInfo + '\');"/> <a onclick="editUser(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUser(' + rec.id + ');"/> <a onclick="deleteUser(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
//str += '<img src="<%=path%>/images/user.png" style="cursor: pointer;width: 16px;height: 16px" onclick="editUser(\'' + rowInfo + '\');"/> <a onclick="editUser(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">用户</a> ';
|
||||
@@ -191,8 +191,7 @@
|
||||
id: 'addUser',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addUser();
|
||||
}
|
||||
},
|
||||
@@ -200,14 +199,12 @@
|
||||
id: 'deleteUser',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteUser();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -215,8 +212,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -224,28 +220,24 @@
|
||||
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"))
|
||||
{
|
||||
|| obj.id == "email" || obj.id == "description" || obj.id == "position")) {
|
||||
$("#saveusername").click();
|
||||
}
|
||||
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchUsername" || obj.id == "searchLoginame" || obj.id == "searchPhonenum"
|
||||
|| obj.id=="searchPosition"|| obj.id=="searchEmail" || obj.id=="searchDesc" || obj.id=="searchDept" ))
|
||||
{
|
||||
|| obj.id == "searchPosition" || obj.id == "searchEmail" || obj.id == "searchDesc" || obj.id == "searchDept")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -257,19 +249,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除用户信息
|
||||
function deleteUser(userID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此用户信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteUser(userID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此用户信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/user/delete.action",
|
||||
@@ -278,11 +266,9 @@
|
||||
userID: userID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//$('#tableData').datagrid('reload');
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
@@ -293,8 +279,7 @@
|
||||
$.messager.alert('删除提示', '删除用户信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除用户信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -304,25 +289,18 @@
|
||||
}
|
||||
|
||||
//批量删除用户
|
||||
function batDeleteUser()
|
||||
{
|
||||
function batDeleteUser() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条用户信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -337,11 +315,9 @@
|
||||
userIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//$('#tableData').datagrid('reload');
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
@@ -351,8 +327,7 @@
|
||||
$.messager.alert('删除提示', '删除用户信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除用户信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -368,8 +343,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgusername = "";
|
||||
|
||||
function addUser()
|
||||
{
|
||||
function addUser() {
|
||||
$('#userDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加用户');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$('#usernameFM').form('clear');
|
||||
@@ -414,15 +388,13 @@
|
||||
|
||||
//保存用户信息
|
||||
$("#saveusername").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (checkusernameName())
|
||||
return;
|
||||
|
||||
var reg = /^([0-9])+$/;
|
||||
var phonenum = $.trim($("#phonenum").val());
|
||||
if(phonenum.length>0 && !reg.test(phonenum))
|
||||
{
|
||||
if (phonenum.length > 0 && !reg.test(phonenum)) {
|
||||
$.messager.alert('提示', '电话号码只能是数字', 'info');
|
||||
$("#phonenum").val("").focus();
|
||||
return;
|
||||
@@ -430,22 +402,18 @@
|
||||
|
||||
$('#usernameFM').form('submit', {
|
||||
url: url,
|
||||
onSubmit: function()
|
||||
{
|
||||
onSubmit: function () {
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(result)
|
||||
{
|
||||
success: function (result) {
|
||||
var result = eval('(' + result + ')');
|
||||
if (!result)
|
||||
{
|
||||
if (!result) {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存用户信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$('#userDlg').dialog('close');
|
||||
//$('#tableData').datagrid('reload');
|
||||
//加载完以后重新初始化
|
||||
@@ -459,8 +427,7 @@
|
||||
});
|
||||
|
||||
//编辑用户信息
|
||||
function editUser(usernameTotalInfo)
|
||||
{
|
||||
function editUser(usernameTotalInfo) {
|
||||
var usernameInfo = usernameTotalInfo.split("AaBb");
|
||||
var row = {
|
||||
username: usernameInfo[1],
|
||||
@@ -487,14 +454,12 @@
|
||||
//});
|
||||
|
||||
//检查用户 名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkusernameName()
|
||||
{
|
||||
function checkusernameName() {
|
||||
var usernameName = $.trim($("#username").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(usernameName.length > 0 &&( orgusername.length ==0 || usernameName != orgusername))
|
||||
{
|
||||
if (usernameName.length > 0 && (orgusername.length == 0 || usernameName != orgusername)) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/user/checkIsNameExist.action",
|
||||
@@ -504,11 +469,9 @@
|
||||
userID: userID,
|
||||
username: usernameName
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '用户名称已经存在', 'info');
|
||||
//alert("用户名称已经存在");
|
||||
//$("#username").val("");
|
||||
@@ -516,8 +479,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查用户名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -528,8 +490,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showUserDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -543,8 +504,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showUserDetails(pageNo,pageSize)
|
||||
{
|
||||
function showUserDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/user/findBy.action",
|
||||
@@ -555,14 +515,12 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
//$('#tableData').datagrid('reload');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名 称:</td>
|
||||
@@ -60,7 +61,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商信息列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商信息列表" iconCls="icon-list"
|
||||
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"
|
||||
@@ -70,7 +72,8 @@
|
||||
<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"/>
|
||||
<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;">
|
||||
@@ -80,11 +83,13 @@
|
||||
<tr>
|
||||
<td>手机号码</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<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"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -100,21 +105,25 @@
|
||||
<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 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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -134,7 +143,8 @@
|
||||
</td>
|
||||
<td>账号</td>
|
||||
<td style="padding:1px">
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -154,12 +164,14 @@
|
||||
</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>
|
||||
<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/importExcelVendor.action">
|
||||
<form id="importExcelFM" method="post" enctype="multipart/form-data"
|
||||
action="<%=path%>/supplier/importExcelVendor.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
@@ -177,7 +189,8 @@
|
||||
<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>
|
||||
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="调拨出库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="调拨出库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +74,14 @@
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -90,7 +97,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -99,7 +107,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="组装单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="组装单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +74,14 @@
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -90,7 +97,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -99,7 +107,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="拆卸单列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="拆卸单列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +74,14 @@
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -90,7 +97,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -99,7 +107,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="礼品销售列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="礼品销售列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +74,14 @@
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<input name="Number" id="Number" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@@ -90,7 +97,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -99,7 +107,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品充值列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品充值列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +74,14 @@
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<input name="Number" id="Number" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@@ -90,7 +97,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -99,7 +107,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -24,7 +24,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>品名:</td>
|
||||
@@ -53,11 +54,13 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="materialDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true" modal="true" collapsible="false" closable="true">
|
||||
<div id="materialDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
|
||||
modal="true" collapsible="false" closable="true">
|
||||
<table id="materialTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,11 +73,15 @@
|
||||
<tr>
|
||||
<td style="width:60px; height:30px;">品名</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 180px;height: 20px"/>
|
||||
<input name="Name" id="Name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'"
|
||||
style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td style="width:80px;">型号</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<input name="Model" id="Model" class="easyui-validatebox" data-options="required:true,validType:'length[1,30]'" style="width: 180px;height: 20px"/>
|
||||
<input name="Model" id="Model" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td style="width:200px;"></td>
|
||||
</tr>
|
||||
@@ -92,7 +99,8 @@
|
||||
<tr>
|
||||
<td style="height:30px;">备注</td>
|
||||
<td style="padding:5px" colspan="3">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 468px; height:40px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 468px; height:40px;"></textarea>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -103,12 +111,15 @@
|
||||
<tr>
|
||||
<td style="height:30px;">安全存量</td>
|
||||
<td style="padding:5px">
|
||||
<input name="SafetyStock" id="SafetyStock" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/>
|
||||
<input name="SafetyStock" id="SafetyStock" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td>单位</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Unit" id="Unit" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px; "/>
|
||||
<select name="manyUnit" id="manyUnit" style="width:180px;height: 20px;display: none"></select>
|
||||
<input name="Unit" id="Unit" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 180px;height: 20px; "/>
|
||||
<select name="manyUnit" id="manyUnit"
|
||||
style="width:180px;height: 20px;display: none"></select>
|
||||
</td>
|
||||
<td>
|
||||
<input id="manyUnitCheck" type="checkbox"/>多单位
|
||||
@@ -157,16 +168,26 @@
|
||||
</tr>
|
||||
<tr class="price-one">
|
||||
<td style="height:30px;">零售价</td>
|
||||
<td style="padding:5px"><input name="RetailPrice" id="RetailPrice" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="RetailPrice" id="RetailPrice" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/></td>
|
||||
<td>最低售价</td>
|
||||
<td style="padding:5px"><input name="LowPrice" id="LowPrice" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="LowPrice" id="LowPrice" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="price-two">
|
||||
<td style="height:30px;">预计采购价</td>
|
||||
<td style="padding:5px"><input name="PresetPriceOne" id="PresetPriceOne" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="PresetPriceOne" id="PresetPriceOne"
|
||||
class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/></td>
|
||||
<td>批发价</td>
|
||||
<td style="padding:5px"><input name="PresetPriceTwo" id="PresetPriceTwo" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="PresetPriceTwo" id="PresetPriceTwo"
|
||||
class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -176,37 +197,43 @@
|
||||
<tr class="tr-color">
|
||||
<td style="width:60px; height:30px;">颜色</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Color" id="Color" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="Color" id="Color" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr-standard">
|
||||
<td>规格</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Standard" id="Standard" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="Standard" id="Standard" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr-mfrs">
|
||||
<td>制造商</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Mfrs" id="Mfrs" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="Mfrs" id="Mfrs" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr-otherField1">
|
||||
<td>自定义1</td>
|
||||
<td style="padding:5px">
|
||||
<input name="OtherField1" id="OtherField1" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="OtherField1" id="OtherField1" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr-otherField2">
|
||||
<td>自定义2</td>
|
||||
<td style="padding:5px">
|
||||
<input name="OtherField2" id="OtherField2" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="OtherField2" id="OtherField2" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="tr-otherField3">
|
||||
<td>自定义3</td>
|
||||
<td style="padding:5px">
|
||||
<input name="OtherField3" id="OtherField3" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
<input name="OtherField3" id="OtherField3" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'" style="width: 250px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -217,7 +244,8 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveMaterial" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#materialDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<!-- 导入excel表格 -->
|
||||
@@ -241,7 +269,8 @@
|
||||
<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>
|
||||
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -257,8 +286,7 @@
|
||||
var mPropertyList = null; //商品属性列表
|
||||
var mPropertyListShort = ""; //商品属性列表-传值
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//初始化系统基础信息
|
||||
initMProperty();
|
||||
initSystemData(1);
|
||||
@@ -291,6 +319,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initSystemData(parentid_search) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -301,60 +330,49 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
materialCategoryList = systemInfo.showModel.map.materialCategoryList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找商品异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo(lei) {
|
||||
var options = "";
|
||||
|
||||
if(materialCategoryList !=null)
|
||||
{
|
||||
if (materialCategoryList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < materialCategoryList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < materialCategoryList.length; i++) {
|
||||
var materialCategory = materialCategoryList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
materialID = materialCategory.id;
|
||||
}
|
||||
options += '<option value="' + materialCategory.id + '">' + materialCategory.name + '</option>';
|
||||
if(lei=="search_second"||lei=="type_second"||lei=="search_three")
|
||||
{
|
||||
if (lei == "search_second" || lei == "type_second" || lei == "search_three") {
|
||||
types += materialCategory.id + ',';
|
||||
}
|
||||
}
|
||||
if(lei=="search_first")
|
||||
{
|
||||
if (lei == "search_first") {
|
||||
$("#searchCategoryId_f").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei=="search_second")
|
||||
{
|
||||
else if (lei == "search_second") {
|
||||
$("#searchCategoryId_s").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei=="search_three")
|
||||
{
|
||||
else if (lei == "search_three") {
|
||||
$("#searchCategoryId_t").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei=="edit_first")
|
||||
{
|
||||
else if (lei == "edit_first") {
|
||||
$("#CategoryId_f").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei=="edit_second")
|
||||
{
|
||||
else if (lei == "edit_second") {
|
||||
$("#CategoryId_s").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei=="edit_three")
|
||||
{
|
||||
else if (lei == "edit_three") {
|
||||
$("#CategoryId_t").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
@@ -363,17 +381,14 @@
|
||||
//一级目录-查询方法
|
||||
var searchFirst = function () {
|
||||
var parentid_search = $("#searchCategoryId_f").val();
|
||||
if(parentid_search!='')
|
||||
{
|
||||
if (parentid_search != '') {
|
||||
types += parentid_search + ',';
|
||||
initSystemData(parentid_search);
|
||||
initSelectInfo("search_second");
|
||||
|
||||
var arr = types.split(',');
|
||||
for(var i=0;i<arr.length;i++)
|
||||
{
|
||||
if(arr[i]!='' && arr[i]!=parentid_search)
|
||||
{
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (arr[i] != '' && arr[i] != parentid_search) {
|
||||
initSystemData(arr[i]);
|
||||
initSelectInfo("type_second");
|
||||
}
|
||||
@@ -397,8 +412,7 @@
|
||||
//二级目录-查询方法
|
||||
var searchSecond = function () {
|
||||
var parentid_search = $("#searchCategoryId_s").val();
|
||||
if(parentid_search!='')
|
||||
{
|
||||
if (parentid_search != '') {
|
||||
initSystemData(parentid_search);
|
||||
initSelectInfo("search_three");
|
||||
types = types.substring(0, types.length - 1);
|
||||
@@ -420,8 +434,7 @@
|
||||
$("#searchCategoryId_t").change(
|
||||
function () {
|
||||
var parentid_search = $("#searchCategoryId_t").val();
|
||||
if(parentid_search!='')
|
||||
{
|
||||
if (parentid_search != '') {
|
||||
types = parentid_search;
|
||||
setCategoryId = types;
|
||||
types = "";
|
||||
@@ -435,8 +448,7 @@
|
||||
$("#CategoryId_f").change(
|
||||
function () {
|
||||
var CategoryId_f = $("#CategoryId_f").val();
|
||||
if(CategoryId_f!='')
|
||||
{
|
||||
if (CategoryId_f != '') {
|
||||
initSystemData(CategoryId_f);
|
||||
initSelectInfo("edit_second");
|
||||
}
|
||||
@@ -446,8 +458,7 @@
|
||||
$("#CategoryId_s").change(
|
||||
function () {
|
||||
var CategoryId_s = $("#CategoryId_s").val();
|
||||
if(CategoryId_s!='')
|
||||
{
|
||||
if (CategoryId_s != '') {
|
||||
initSystemData(CategoryId_s);
|
||||
initSelectInfo("edit_three");
|
||||
}
|
||||
@@ -455,8 +466,7 @@
|
||||
);
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#materialFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -590,15 +600,15 @@
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{field: 'Id', width: 35, align: "center", checkbox: true},
|
||||
{ title: '操作',field: 'op',align:"center",width:60,formatter:function(value,rec){
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 60, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.Name + 'AaBb' + rec.Model + 'AaBb' + rec.Color + 'AaBb' + rec.Unit + 'AaBb' + rec.RetailPrice
|
||||
+ 'AaBb' + rec.LowPrice + 'AaBb' + rec.PresetPriceOne + 'AaBb' + rec.PresetPriceTwo + 'AaBb' + rec.Remark + 'AaBb' + rec.Standard
|
||||
+ 'AaBb' + rec.Color + 'AaBb' + rec.Packing + 'AaBb' + rec.SafetyStock + 'AaBb' + rec.CategoryId + 'AaBb' + rec.CategoryName
|
||||
+ 'AaBb' + rec.UnitId + 'AaBb' + rec.UnitName + 'AaBb' + rec.FirstOutUnit + 'AaBb' + rec.FirstInUnit
|
||||
+ 'AaBb' + rec.Mfrs + 'AaBb' + rec.OtherField1 + 'AaBb' + rec.OtherField2 + 'AaBb' + rec.OtherField3;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterial(\'' + rowInfo + '\');"/> ';
|
||||
str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterial(' + rec.Id + ');"/>';
|
||||
}
|
||||
@@ -610,7 +620,8 @@
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'Unit', width: 60},
|
||||
{title: '安全存量', field: 'SafetyStock', width: 70},
|
||||
{ title: '库存',field: 'abc',width:70, formatter:function(value,rec){
|
||||
{
|
||||
title: '库存', field: 'abc', width: 70, formatter: function (value, rec) {
|
||||
var monthTime = getNowFormatMonth();
|
||||
var mId = rec.Id; //商品id
|
||||
var thisStock = 0;
|
||||
@@ -644,22 +655,24 @@
|
||||
}
|
||||
});
|
||||
return "<span class='class-" + rec.Id + "'>" + thisStock + "</span>";
|
||||
}},
|
||||
}
|
||||
},
|
||||
{title: '零售价', field: 'RetailPrice', width: 60},
|
||||
{title: '最低售价', field: 'LowPrice', width: 70},
|
||||
{title: '预计采购价', field: 'PresetPriceOne', width: 70},
|
||||
{title: '批发价', field: 'PresetPriceTwo', width: 70},
|
||||
{ title: '状态',field: 'Enabled',width:50,align:"center",formatter:function(value){
|
||||
{
|
||||
title: '状态', field: 'Enabled', width: 50, align: "center", formatter: function (value) {
|
||||
return value ? "启用" : "禁用";
|
||||
}}
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar: [
|
||||
{
|
||||
id: 'addMaterial',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addMaterial();
|
||||
}
|
||||
},
|
||||
@@ -668,8 +681,7 @@
|
||||
id: 'deleteMaterial',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteMaterial();
|
||||
}
|
||||
},
|
||||
@@ -710,8 +722,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -739,7 +750,8 @@
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'Number',width:150,
|
||||
{
|
||||
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>";
|
||||
@@ -800,34 +812,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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=="CategoryLevel"||obj.id=="Name"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "CategoryLevel" || obj.id == "Name")) {
|
||||
$("#saveMaterial").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchCategoryId"||(obj.id=="searchName")))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchCategoryId" || (obj.id == "searchName"))) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -839,19 +846,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除商品信息
|
||||
function deleteMaterial(materialID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此商品信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteMaterial(materialID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此商品信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/material/delete.action",
|
||||
@@ -860,11 +863,9 @@
|
||||
materialID: materialID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -872,8 +873,7 @@
|
||||
$.messager.alert('删除提示', '删除商品信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除商品信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -883,25 +883,18 @@
|
||||
}
|
||||
|
||||
//批量删除商品
|
||||
function batDeleteMaterial()
|
||||
{
|
||||
function batDeleteMaterial() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条商品信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -917,11 +910,9 @@
|
||||
materialIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -930,8 +921,7 @@
|
||||
$.messager.alert('删除提示', '删除商品信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除商品信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -944,22 +934,16 @@
|
||||
//批量启用
|
||||
function setEnableFun() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('启用提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('启用确认','确定要启用选中的' + row.length + '条信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -975,11 +959,9 @@
|
||||
materialIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -988,8 +970,7 @@
|
||||
$.messager.alert('启用提示', '启用信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('启用提示', '启用信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -1002,22 +983,16 @@
|
||||
//批量禁用
|
||||
function setDisEnableFun() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('禁用提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('禁用确认','确定要禁用选中的' + row.length + '条信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -1033,11 +1008,9 @@
|
||||
materialIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -1046,8 +1019,7 @@
|
||||
$.messager.alert('禁用提示', '禁用信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('禁用提示', '禁用信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -1175,10 +1147,13 @@
|
||||
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加商品信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$("#Name").val("").focus();
|
||||
$("#CategoryId_f").show(); $("#CategoryId_s").show(); $("#CategoryId_t").show(); //全部显示
|
||||
$("#CategoryId_f").show();
|
||||
$("#CategoryId_s").show();
|
||||
$("#CategoryId_t").show(); //全部显示
|
||||
$("#mTypeName").hide();
|
||||
$("#mTypeChange").hide(); //按钮隐藏
|
||||
$("#CategoryId_s").empty(); $("#CategoryId_t").empty(); //清空类型下拉
|
||||
$("#CategoryId_s").empty();
|
||||
$("#CategoryId_t").empty(); //清空类型下拉
|
||||
|
||||
$("#manyUnitCheck").prop("checked", false);
|
||||
//当前为不选中状态
|
||||
@@ -1272,16 +1247,13 @@
|
||||
return;
|
||||
}
|
||||
var parent = 1;
|
||||
if($("#CategoryId_f").val()!=""&&$("#CategoryId_f").val()!=null)
|
||||
{
|
||||
if ($("#CategoryId_f").val() != "" && $("#CategoryId_f").val() != null) {
|
||||
parent = $("#CategoryId_f").val();
|
||||
}
|
||||
if($("#CategoryId_s").val()!=""&&$("#CategoryId_s").val()!=null)
|
||||
{
|
||||
if ($("#CategoryId_s").val() != "" && $("#CategoryId_s").val() != null) {
|
||||
parent = $("#CategoryId_s").val();
|
||||
}
|
||||
if($("#CategoryId_t").val()!=""&&$("#CategoryId_t").val()!=null)
|
||||
{
|
||||
if ($("#CategoryId_t").val() != "" && $("#CategoryId_t").val() != null) {
|
||||
parent = $("#CategoryId_t").val();
|
||||
}
|
||||
//构造价格列表json
|
||||
@@ -1334,17 +1306,14 @@
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#materialDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showMaterialDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存商品信息失败,请稍后重试!'
|
||||
@@ -1352,8 +1321,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存商品信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -1361,6 +1329,7 @@
|
||||
});
|
||||
|
||||
var mId = 0, mName = "";
|
||||
|
||||
//根据id查询类型信息
|
||||
function findByTypeId(Id) {
|
||||
$.ajax({
|
||||
@@ -1372,8 +1341,7 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res)
|
||||
{
|
||||
success: function (res) {
|
||||
if (res) {
|
||||
mId = res.parentId;
|
||||
mName = res.name;
|
||||
@@ -1383,8 +1351,7 @@
|
||||
}
|
||||
|
||||
//编辑信息
|
||||
function editMaterial(materialTotalInfo)
|
||||
{
|
||||
function editMaterial(materialTotalInfo) {
|
||||
var materialInfo = materialTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -1425,8 +1392,11 @@
|
||||
else {
|
||||
categoryName = mName + categoryName;
|
||||
}
|
||||
$("#CategoryId_s").empty(); $("#CategoryId_t").empty(); //清空类型下拉
|
||||
$("#CategoryId_f").hide(); $("#CategoryId_s").hide(); $("#CategoryId_t").hide(); //全部隐藏
|
||||
$("#CategoryId_s").empty();
|
||||
$("#CategoryId_t").empty(); //清空类型下拉
|
||||
$("#CategoryId_f").hide();
|
||||
$("#CategoryId_s").hide();
|
||||
$("#CategoryId_t").hide(); //全部隐藏
|
||||
$("#mTypeName").text(categoryName).show(); //类型显示
|
||||
$("#mTypeChange").show(); //按钮显示
|
||||
$("#Packing").focus().val(materialInfo[12]);
|
||||
@@ -1533,13 +1503,14 @@
|
||||
$("#mTypeChange").off("click").on("click", function () {
|
||||
$(this).hide();
|
||||
$("#mTypeName").hide();
|
||||
$("#CategoryId_f").show(); $("#CategoryId_s").show(); $("#CategoryId_t").show(); //全部显示
|
||||
$("#CategoryId_f").show();
|
||||
$("#CategoryId_s").show();
|
||||
$("#CategoryId_t").show(); //全部显示
|
||||
});
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showMaterialDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -1574,13 +1545,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -1594,7 +1563,8 @@
|
||||
$("#searchCategoryId_f").val("");
|
||||
$("#searchCategoryId_s").val("");
|
||||
$("#searchCategoryId_t").val("");
|
||||
$("#searchCategoryId_s").empty(); $("#searchCategoryId_t").empty(); //清空类型下拉
|
||||
$("#searchCategoryId_s").empty();
|
||||
$("#searchCategoryId_t").empty(); //清空类型下拉
|
||||
setCategoryId = "1";
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -22,7 +22,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
@@ -39,7 +40,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品属性列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品属性列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -62,13 +64,15 @@
|
||||
<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"/>
|
||||
<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"/>
|
||||
<input name="anotherName" id="anotherName" class="easyui-validatebox"
|
||||
data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -77,7 +81,8 @@
|
||||
</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="cancelMaterialProperty" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialPropertyDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -120,18 +125,20 @@
|
||||
columns: [[
|
||||
{field: 'id', width: 10, align: "center", hidden: true},
|
||||
{title: '名称', field: 'nativeName', width: 100},
|
||||
{ title: '是否启用',field: 'enabled',width:100,formatter:function(value,rec){
|
||||
{
|
||||
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)
|
||||
{
|
||||
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 + '\');"/> <a onclick="editMaterialProperty(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
@@ -139,8 +146,7 @@
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -163,10 +169,10 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try
|
||||
{
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
@@ -181,8 +187,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -250,8 +255,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showMaterialPropertyDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -278,8 +282,7 @@
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
@@ -47,7 +48,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品类别列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品类别列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +59,9 @@
|
||||
<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: 100px;height: 20px"/></td>
|
||||
<td style="padding:5px"><input name="Name" id="Name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'"
|
||||
style="width: 100px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>层次</td>
|
||||
@@ -82,7 +86,8 @@
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveMaterialCategory" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterialCategory" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#materialCategoryDlg').dialog('close')">取消</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterialCategory" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialCategoryDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -91,8 +96,7 @@
|
||||
var parentid_search = null;
|
||||
var lei = null;
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
//初始化系统基础信息
|
||||
initSystemData(1);
|
||||
initSelectInfo(1);
|
||||
@@ -102,8 +106,7 @@
|
||||
});
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData(parentid_search)
|
||||
{
|
||||
function initSystemData(parentid_search) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/materialCategory/getBasicData.action",
|
||||
@@ -113,54 +116,44 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
materialCategoryList = systemInfo.showModel.map.materialCategoryList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找商品类别异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo(lei)
|
||||
{
|
||||
function initSelectInfo(lei) {
|
||||
var options = "";
|
||||
|
||||
if(materialCategoryList !=null)
|
||||
{
|
||||
if (materialCategoryList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < materialCategoryList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < materialCategoryList.length; i++) {
|
||||
var materialCategory = materialCategoryList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
materialCategoryID = materialCategory.id;
|
||||
}
|
||||
options += '<option value="' + materialCategory.id + '">' + materialCategory.name + '</option>';
|
||||
}
|
||||
//$("#ParentId").empty().append(options);
|
||||
if(lei==1)
|
||||
{
|
||||
if (lei == 1) {
|
||||
$("#searchParentId_f").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei==2)
|
||||
{
|
||||
else if (lei == 2) {
|
||||
$("#searchParentId_s").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei==3)
|
||||
{
|
||||
else if (lei == 3) {
|
||||
$("#searchParentId_t").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei==11)
|
||||
{
|
||||
else if (lei == 11) {
|
||||
$("#ParentId_f").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
else if(lei==12)
|
||||
{
|
||||
else if (lei == 12) {
|
||||
$("#ParentId_s").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
@@ -169,8 +162,7 @@
|
||||
$("#searchParentId_f").change(
|
||||
function () {
|
||||
var parentid_search = $("#searchParentId_f").val();
|
||||
if(parentid_search!='')
|
||||
{
|
||||
if (parentid_search != '') {
|
||||
initSystemData(parentid_search);
|
||||
initSelectInfo(2);
|
||||
}
|
||||
@@ -180,8 +172,7 @@
|
||||
$("#searchParentId_s").change(
|
||||
function () {
|
||||
var parentid_search = $("#searchParentId_s").val();
|
||||
if(parentid_search!='')
|
||||
{
|
||||
if (parentid_search != '') {
|
||||
initSystemData(parentid_search);
|
||||
initSelectInfo(3);
|
||||
}
|
||||
@@ -191,19 +182,16 @@
|
||||
$("#CategoryLevel").change(
|
||||
function () {
|
||||
var CategoryLevel = $("#CategoryLevel").val();
|
||||
if(CategoryLevel==1)
|
||||
{
|
||||
if (CategoryLevel == 1) {
|
||||
$("#ParentId_f").empty();
|
||||
$("#ParentId_s").empty();
|
||||
}
|
||||
else if(CategoryLevel==2)
|
||||
{
|
||||
else if (CategoryLevel == 2) {
|
||||
initSystemData(1);
|
||||
initSelectInfo(11);
|
||||
$("#ParentId_s").enabled = false;
|
||||
}
|
||||
else if(CategoryLevel==3)
|
||||
{
|
||||
else if (CategoryLevel == 3) {
|
||||
initSystemData(1);
|
||||
initSelectInfo(11);
|
||||
}
|
||||
@@ -219,8 +207,7 @@
|
||||
);
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#materialCategoryFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -229,8 +216,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'商品类别列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -257,12 +243,11 @@
|
||||
columns: [[
|
||||
{field: 'Id', width: 35, align: "center", checkbox: true},
|
||||
{title: '名称', field: 'Name', width: 250},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.ParentId + 'AaBb' + rec.CategoryLevel + 'AaBb' + rec.Name;
|
||||
if(1 == value)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterialCategory(\'' + rowInfo + '\');"/> <a onclick="editMaterialCategory(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterialCategory(' + rec.Id + ');"/> <a onclick="deleteMaterialCategory(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -275,8 +260,7 @@
|
||||
id: 'addMaterialCategory',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addMaterialCategory();
|
||||
}
|
||||
},
|
||||
@@ -285,14 +269,12 @@
|
||||
id: 'deleteMaterialCategory',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeleteMaterialCategory();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -300,34 +282,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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=="CategoryLevel"||obj.id=="Name"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "CategoryLevel" || obj.id == "Name")) {
|
||||
$("#saveMaterialCategory").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchParentId"||(obj.id=="searchName")))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchParentId" || (obj.id == "searchName"))) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -339,19 +316,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除商品类别信息
|
||||
function deleteMaterialCategory(materialCategoryID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此商品类别信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deleteMaterialCategory(materialCategoryID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此商品类别信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/materialCategory/delete.action",
|
||||
@@ -360,11 +333,9 @@
|
||||
materialCategoryID: materialCategoryID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -372,8 +343,7 @@
|
||||
$.messager.alert('删除提示', '删除商品类别信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除商品类别信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -383,25 +353,18 @@
|
||||
}
|
||||
|
||||
//批量删除商品类别
|
||||
function batDeleteMaterialCategory()
|
||||
{
|
||||
function batDeleteMaterialCategory() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条商品类别信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -417,11 +380,9 @@
|
||||
materialCategoryIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -430,8 +391,7 @@
|
||||
$.messager.alert('删除提示', '删除商品类别信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除商品类别信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -447,8 +407,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgMaterialCategory = "";
|
||||
|
||||
function addMaterialCategory()
|
||||
{
|
||||
function addMaterialCategory() {
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#materialCategoryFM').form('clear');
|
||||
$('#materialCategoryDlg').dialog('open').dialog('setTitle', '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加商品类别信息');
|
||||
@@ -462,19 +421,15 @@
|
||||
|
||||
//保存信息
|
||||
$("#saveMaterialCategory").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#materialCategoryFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
var parent = 1;
|
||||
if($("#ParentId_f").val()!=""&&$("#ParentId_f").val()!=null)
|
||||
{
|
||||
if ($("#ParentId_f").val() != "" && $("#ParentId_f").val() != null) {
|
||||
parent = $("#ParentId_f").val();
|
||||
}
|
||||
if($("#ParentId_s").val()!=""&&$("#ParentId_s").val()!=null)
|
||||
{
|
||||
if ($("#ParentId_s").val() != "" && $("#ParentId_s").val() != null) {
|
||||
parent = $("#ParentId_s").val();
|
||||
}
|
||||
$.ajax({
|
||||
@@ -488,17 +443,14 @@
|
||||
Name: $.trim($("#Name").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#materialCategoryDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showMaterialCategoryDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存商品类别信息失败,请稍后重试!'
|
||||
@@ -506,8 +458,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存商品类别信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -517,8 +468,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editMaterialCategory(materialCategoryTotalInfo)
|
||||
{
|
||||
function editMaterialCategory(materialCategoryTotalInfo) {
|
||||
var materialCategoryInfo = materialCategoryTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -537,8 +487,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showMaterialCategoryDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -553,19 +502,15 @@
|
||||
});
|
||||
|
||||
|
||||
function showMaterialCategoryDetails(pageNo,pageSize)
|
||||
{
|
||||
function showMaterialCategoryDetails(pageNo, pageSize) {
|
||||
var parent = 1;
|
||||
if($("#searchParentId_f").val()!=""&&$("#searchParentId_f").val()!=null)
|
||||
{
|
||||
if ($("#searchParentId_f").val() != "" && $("#searchParentId_f").val() != null) {
|
||||
parent = $("#searchParentId_f").val();
|
||||
}
|
||||
if($("#searchParentId_s").val()!=""&&$("#searchParentId_s").val()!=null)
|
||||
{
|
||||
if ($("#searchParentId_s").val() != "" && $("#searchParentId_s").val() != null) {
|
||||
parent = $("#searchParentId_s").val();
|
||||
}
|
||||
if($("#searchParentId_t").val()!=""&&$("#searchParentId_t").val()!=null)
|
||||
{
|
||||
if ($("#searchParentId_t").val() != "" && $("#searchParentId_t").val() != null) {
|
||||
parent = $("#searchParentId_t").val();
|
||||
|
||||
}
|
||||
@@ -579,13 +524,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它入库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它入库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,16 +78,20 @@
|
||||
<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="增加供应商" />
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -98,7 +106,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -107,7 +116,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它出库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="其它出库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,11 +78,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -93,7 +100,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -102,7 +110,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>姓名:</td>
|
||||
@@ -51,7 +52,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="经手人列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="经手人列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +75,8 @@
|
||||
<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"/>
|
||||
<input name="Name" id="Name" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -82,15 +85,15 @@
|
||||
</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>
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
//初始化系统基础信息
|
||||
initSystemData();
|
||||
initSelectInfo();
|
||||
@@ -100,39 +103,33 @@
|
||||
});
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData()
|
||||
{
|
||||
function initSystemData() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/depot/getBasicData.action",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo()
|
||||
{
|
||||
function initSelectInfo() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i ++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
if (0 == i) {
|
||||
depotID = depot.id;
|
||||
}
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
@@ -143,8 +140,7 @@
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
function initForm() {
|
||||
$('#personFM').form({
|
||||
onSubmit: function () {
|
||||
return false;
|
||||
@@ -153,8 +149,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//title:'经手人列表',
|
||||
//iconCls:'icon-save',
|
||||
@@ -182,12 +177,11 @@
|
||||
{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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (1 == value) {
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editPerson(\'' + rowInfo + '\');"/> <a onclick="editPerson(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deletePerson(' + rec.Id + ');"/> <a onclick="deletePerson(' + rec.Id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
@@ -200,8 +194,7 @@
|
||||
id: 'addPerson',
|
||||
text: '增加',
|
||||
iconCls: 'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
addPerson();
|
||||
}
|
||||
},
|
||||
@@ -209,14 +202,12 @@
|
||||
id: 'deletePerson',
|
||||
text: '删除',
|
||||
iconCls: 'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
handler: function () {
|
||||
batDeletePerson();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -224,34 +215,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -263,19 +249,15 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除经手人信息
|
||||
function deletePerson(personID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此经手人信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
function deletePerson(personID) {
|
||||
$.messager.confirm('删除确认', '确定要删除此经手人信息吗?', function (r) {
|
||||
if (r) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/person/delete.action",
|
||||
@@ -284,11 +266,9 @@
|
||||
personID: personID,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
@@ -296,8 +276,7 @@
|
||||
$.messager.alert('删除提示', '删除经手人信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除经手人信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -307,25 +286,18 @@
|
||||
}
|
||||
|
||||
//批量删除经手人
|
||||
function batDeletePerson()
|
||||
{
|
||||
function batDeletePerson() {
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
if (row.length == 0) {
|
||||
$.messager.alert('删除提示', '没有记录被选中!', 'info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条经手人信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (i == row.length - 1) {
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
@@ -341,11 +313,9 @@
|
||||
personIDs: ids,
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
if (msg == '成功') {
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked", false);
|
||||
@@ -354,8 +324,7 @@
|
||||
$.messager.alert('删除提示', '删除经手人信息失败,请稍后再试!', 'error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('删除提示', '删除经手人信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -371,8 +340,7 @@
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
function addPerson()
|
||||
{
|
||||
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"/> 增加经手人信息');
|
||||
@@ -386,12 +354,10 @@
|
||||
|
||||
//保存信息
|
||||
$("#savePerson").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#personFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (!$("#Type").val()) {
|
||||
$.messager.alert('提示', '请选择类型!', 'warning');
|
||||
return;
|
||||
@@ -406,17 +372,14 @@
|
||||
Name: $.trim($("#Name").val()),
|
||||
clientIp: '<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (tipInfo) {
|
||||
$('#personDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showPersonDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存经手人信息失败,请稍后重试!'
|
||||
@@ -424,8 +387,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存经手人信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -435,8 +397,7 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editPerson(personTotalInfo)
|
||||
{
|
||||
function editPerson(personTotalInfo) {
|
||||
var personInfo = personTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
@@ -454,8 +415,7 @@
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showPersonDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -469,8 +429,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showPersonDetails(pageNo,pageSize)
|
||||
{
|
||||
function showPersonDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/person/findBy.action",
|
||||
@@ -481,13 +440,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购退货列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购退货列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,16 +78,20 @@
|
||||
<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="增加供应商" />
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -98,7 +106,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -125,7 +134,8 @@
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -147,7 +157,8 @@
|
||||
</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>
|
||||
<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">
|
||||
@@ -280,7 +291,8 @@
|
||||
<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"/>
|
||||
<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;">
|
||||
@@ -294,13 +306,15 @@
|
||||
</td>
|
||||
<td>手机</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<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"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
<td>传真</td>
|
||||
<td style="padding:1px">
|
||||
@@ -310,21 +324,25 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -344,7 +362,8 @@
|
||||
</td>
|
||||
<td>账号</td>
|
||||
<td style="padding:1px">
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -364,7 +383,8 @@
|
||||
</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>
|
||||
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购入库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="采购入库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,16 +78,20 @@
|
||||
<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="增加供应商" />
|
||||
<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;"/>
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -98,7 +106,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -125,7 +134,8 @@
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -138,7 +148,8 @@
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-validatebox" data-options="validType:'length[1,3]'" style="width:120px;" />
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,3]'" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
@@ -148,7 +159,8 @@
|
||||
</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>
|
||||
<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">
|
||||
@@ -282,7 +294,8 @@
|
||||
<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"/>
|
||||
<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;">
|
||||
@@ -296,13 +309,15 @@
|
||||
</td>
|
||||
<td>手机</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<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"/>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
<td>传真</td>
|
||||
<td style="padding:1px">
|
||||
@@ -312,21 +327,25 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -346,7 +365,8 @@
|
||||
</td>
|
||||
<td>账号</td>
|
||||
<td style="padding:1px">
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
<input name="accountNumber" id="accountNumber" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -366,7 +386,8 @@
|
||||
</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>
|
||||
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售退货列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售退货列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,11 +78,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -95,7 +102,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly" data-changeamount="0" />
|
||||
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly"
|
||||
data-changeamount="0"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -103,7 +111,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="getAmount" name="getAmount" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))" class="get-amount" data-changeamount="0" />
|
||||
<input id="getAmount" name="getAmount"
|
||||
onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
class="get-amount" data-changeamount="0"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -111,14 +121,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="backAmount" name="backAmount" class="back-amount" readonly="readonly" data-changeamount="0" />
|
||||
<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;"/>
|
||||
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
|
||||
style="display: none;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -126,7 +138,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -135,7 +148,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售出库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="零售出库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -74,11 +78,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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;">
|
||||
@@ -99,7 +106,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly" data-changeamount="0" />
|
||||
<input id="ChangeAmount" name="ChangeAmount" class="change-amount" readonly="readonly"
|
||||
data-changeamount="0"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -107,7 +115,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="getAmount" name="getAmount" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))" class="get-amount" data-changeamount="0" />
|
||||
<input id="getAmount" name="getAmount"
|
||||
onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
class="get-amount" data-changeamount="0"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -115,14 +125,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="backAmount" name="backAmount" class="back-amount" readonly="readonly" data-changeamount="0" />
|
||||
<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;"/>
|
||||
<img class="many-account-ico" src="<%=path%>/js/easyui-1.3.5/themes/icons/filelist.jpg"
|
||||
style="display: none;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -130,7 +142,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -139,7 +152,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售退货列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售退货列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -78,11 +82,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -94,7 +101,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -121,7 +129,8 @@
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -143,7 +152,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -30,7 +30,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售出库列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px; top:300px;" title="销售出库列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -78,11 +82,14 @@
|
||||
</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;"/>
|
||||
<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;"/>
|
||||
<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>
|
||||
@@ -94,7 +101,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -121,7 +129,8 @@
|
||||
<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;"/>
|
||||
<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">
|
||||
@@ -134,7 +143,8 @@
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-numberbox" data-options="validType:'length[1,3]'" style="width:120px;" />
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-numberbox"
|
||||
data-options="validType:'length[1,3]'" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
@@ -144,7 +154,8 @@
|
||||
</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>
|
||||
<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">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -27,6 +27,7 @@
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ui_button,
|
||||
.ui_fileup {
|
||||
vertical-align: middle;
|
||||
@@ -39,10 +40,12 @@
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.ui_fileup {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui_fileup input {
|
||||
filter: alpha(opacity=1);
|
||||
position: absolute;
|
||||
@@ -64,10 +67,12 @@
|
||||
width: 302px;
|
||||
_zoom: 1;
|
||||
}
|
||||
|
||||
.avataria form {
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avataria .cont:after {
|
||||
content: "";
|
||||
display: block;
|
||||
@@ -75,14 +80,17 @@
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.thumb {
|
||||
float: right;
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.cropaera {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.preview {
|
||||
height: 300px;
|
||||
width: 300px;
|
||||
@@ -108,8 +116,7 @@
|
||||
<div id="digiclock"></div>
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
initColck();
|
||||
|
||||
//imagepreview(document.getElementById("file"), document.getElementById("preview"), function(info){
|
||||
@@ -125,9 +132,9 @@
|
||||
//}, ".thumb");
|
||||
//});
|
||||
});
|
||||
|
||||
//初始化钟
|
||||
function initColck()
|
||||
{
|
||||
function initColck() {
|
||||
$('#digiclock').jdigiclock({
|
||||
clockImagesPath: "<%=path%>/js/jdigiclock/images/clock/",
|
||||
weatherImagesPath: "<%=path%>/js/jdigiclock/images/weather/"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -22,6 +22,7 @@
|
||||
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
|
||||
<script>
|
||||
var map;
|
||||
|
||||
function initialize() {
|
||||
var mapOptions = {
|
||||
zoom: 8,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -25,7 +25,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
@@ -49,18 +50,19 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户列表" iconCls="icon-list"
|
||||
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">
|
||||
<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()
|
||||
{
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
print();
|
||||
@@ -98,7 +100,8 @@
|
||||
{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) {
|
||||
{
|
||||
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 + '\');"/> <a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a> ';
|
||||
@@ -106,8 +109,7 @@
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -115,8 +117,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -124,21 +125,18 @@
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName"||obj.id=="searchSerialNo"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchSerialNo")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -150,15 +148,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
showAccountDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
@@ -172,8 +169,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountDetails(pageNo,pageSize)
|
||||
{
|
||||
function showAccountDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/account/findBy.action",
|
||||
@@ -184,13 +180,11 @@
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -228,7 +222,8 @@
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:150,
|
||||
{
|
||||
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>";
|
||||
@@ -236,7 +231,8 @@
|
||||
},
|
||||
{title: '类型', field: 'type', width: 100},
|
||||
{title: '单位信息', field: 'supplierName', width: 150},
|
||||
{ title: '金额', field: 'changeAmount',width:80,
|
||||
{
|
||||
title: '金额', field: 'changeAmount', width: 80,
|
||||
formatter: function (value, row) {
|
||||
if (row.aList && row.amList) {
|
||||
var aListArr = row.aList.toString().split(",");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -24,12 +24,14 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
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;"/>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@@ -43,15 +45,15 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="进货统计列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="进货统计列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
initMProperty(); //初始化商品属性
|
||||
@@ -89,8 +91,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -115,8 +116,7 @@
|
||||
{title: '退货数量', field: 'OutSum', width: 60},
|
||||
{title: '退货金额', field: 'OutSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -124,8 +124,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -133,21 +132,18 @@
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchMonth"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -159,8 +155,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -176,10 +171,10 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
@@ -192,8 +187,7 @@
|
||||
data: ({
|
||||
MonthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res)
|
||||
{
|
||||
success: function (res) {
|
||||
var HeadIds = res.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
@@ -201,8 +195,7 @@
|
||||
type: "post",
|
||||
url: "<%=path %>/material/findByOrder.action",
|
||||
dataType: "json",
|
||||
success: function (resNew)
|
||||
{
|
||||
success: function (resNew) {
|
||||
var MIds = resNew.mIds;
|
||||
if (MIds) {
|
||||
$.ajax({
|
||||
@@ -217,14 +210,12 @@
|
||||
MaterialIds: MIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -235,8 +226,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -247,13 +237,13 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>客户:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -60,7 +63,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户对账列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户对账列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -68,8 +72,7 @@
|
||||
var path = "<%=path %>";
|
||||
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -96,8 +99,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -112,7 +114,8 @@
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:140,
|
||||
{
|
||||
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>";
|
||||
@@ -125,8 +128,7 @@
|
||||
{title: '本期变化', field: 'allPrice', width: 80},
|
||||
{title: '单据日期', field: 'operTime', width: 140}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -134,34 +136,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -173,8 +170,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -198,15 +194,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findStatementAccount.action",
|
||||
@@ -356,6 +351,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -23,7 +23,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>礼品卡:</td>
|
||||
@@ -39,7 +40,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡统计列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="礼品卡统计列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -147,14 +149,14 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -166,8 +168,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -184,6 +185,7 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
var giftId = $('#searchGiftId').combobox('getValue'); //礼品卡Id
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>供应商:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -60,7 +63,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库明细列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库明细列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -71,8 +75,7 @@
|
||||
var path = "<%=path %>";
|
||||
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -115,33 +118,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
@@ -157,33 +155,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if(userdepot!=null)
|
||||
{
|
||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||
{
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
@@ -195,8 +188,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -211,7 +203,8 @@
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:140,
|
||||
{
|
||||
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>";
|
||||
@@ -226,8 +219,7 @@
|
||||
{title: '仓库', field: 'depotName', width: 120},
|
||||
{title: '入库日期', field: 'operTime', width: 80},
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -235,34 +227,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -274,8 +261,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -299,15 +285,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findInDetail.action",
|
||||
@@ -334,6 +319,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -27,7 +27,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>供应商:</td>
|
||||
@@ -42,11 +43,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库汇总列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="入库汇总列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +74,7 @@
|
||||
var path = "<%=path %>";
|
||||
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -114,33 +117,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
@@ -156,33 +154,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if(userdepot!=null)
|
||||
{
|
||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||
{
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
@@ -194,8 +187,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -216,8 +208,7 @@
|
||||
{title: '入库数量', field: 'numSum', width: 120},
|
||||
{title: '入库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -225,34 +216,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -264,8 +250,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -289,15 +274,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findInOutMaterialCount.action",
|
||||
@@ -324,6 +308,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -27,7 +27,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
@@ -37,7 +38,8 @@
|
||||
<td> </td>
|
||||
<td>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})" class="txt Wdate" style="width:180px;"/>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -53,7 +55,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="库存状况列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="库存状况列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -62,8 +65,7 @@
|
||||
var depotID = null;
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
var userBusinessList = null;
|
||||
@@ -106,33 +108,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
@@ -148,33 +145,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if(userdepot!=null)
|
||||
{
|
||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||
{
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
}
|
||||
}
|
||||
@@ -211,8 +203,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -232,7 +223,8 @@
|
||||
{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){
|
||||
{
|
||||
title: '单价', field: 'UnitPrice', width: 60, formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
},
|
||||
@@ -240,14 +232,14 @@
|
||||
{title: '入库数量', field: 'InSum', width: 60},
|
||||
{title: '出库数量', field: 'OutSum', width: 60},
|
||||
{title: '本月结存数量', field: 'thisSum', width: 80},
|
||||
{ title: '结存金额',field: 'thisAllPrice',width:60,
|
||||
{
|
||||
title: '结存金额', field: 'thisAllPrice', width: 60,
|
||||
formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -255,34 +247,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -294,8 +281,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -319,15 +305,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showEachDetails(pageNo,pageSize)
|
||||
{
|
||||
function showEachDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findByMonth.action",
|
||||
@@ -335,8 +320,7 @@
|
||||
data: ({
|
||||
MonthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res)
|
||||
{
|
||||
success: function (res) {
|
||||
var HeadIds = res.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
@@ -344,8 +328,7 @@
|
||||
type: "post",
|
||||
url: "<%=path %>/material/findByOrder.action",
|
||||
dataType: "json",
|
||||
success: function (resNew)
|
||||
{
|
||||
success: function (resNew) {
|
||||
var MIds = resNew.mIds;
|
||||
if (MIds) {
|
||||
if (pageSize === 3000) {
|
||||
@@ -365,14 +348,12 @@
|
||||
MaterialIds: MIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -389,8 +370,7 @@
|
||||
HeadIds: HeadIds,
|
||||
MaterialIds: MIds
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
if (data && data.totalCount) {
|
||||
var count = data.totalCount.toString();
|
||||
if (count.lastIndexOf('.') > -1) {
|
||||
@@ -400,8 +380,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -413,8 +392,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -425,13 +403,13 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>客户:</td>
|
||||
@@ -43,11 +44,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -60,7 +63,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库明细列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库明细列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -71,8 +75,7 @@
|
||||
var path = "<%=path %>";
|
||||
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -115,33 +118,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
@@ -157,33 +155,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if(userdepot!=null)
|
||||
{
|
||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||
{
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
@@ -195,8 +188,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -211,7 +203,8 @@
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:140,
|
||||
{
|
||||
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>";
|
||||
@@ -226,8 +219,7 @@
|
||||
{title: '仓库', field: 'depotName', width: 120},
|
||||
{title: '出库日期', field: 'operTime', width: 80},
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -235,34 +227,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -274,8 +261,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -299,15 +285,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findInDetail.action",
|
||||
@@ -334,6 +319,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -27,7 +27,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>客户:</td>
|
||||
@@ -42,11 +43,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -59,7 +62,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库汇总列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="出库汇总列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +74,7 @@
|
||||
var path = "<%=path %>";
|
||||
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -114,33 +117,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
if (systemInfo) {
|
||||
userBusinessList = systemInfo.showModel.map.userBusinessList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找UserBusiness异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if(userBusinessList !=null)
|
||||
{
|
||||
if(userBusinessList.length>0)
|
||||
{
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
@@ -156,33 +154,28 @@
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
success: function (systemInfo) {
|
||||
depotList = systemInfo.showModel.map.depotList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
if (msgTip == "exceptoin") {
|
||||
$.messager.alert('提示', '查找系统基础信息异常,请与管理员联系!', 'error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if(depotList !=null)
|
||||
{
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for(var i = 0 ;i < depotList.length;i++)
|
||||
{
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if(userdepot!=null)
|
||||
{
|
||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||
{
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
@@ -194,8 +187,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -216,8 +208,7 @@
|
||||
{title: '出库数量', field: 'numSum', width: 120},
|
||||
{title: '出库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -225,34 +216,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -264,8 +250,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -289,15 +274,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findInOutMaterialCount.action",
|
||||
@@ -324,6 +308,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -24,12 +24,14 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
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;"/>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@@ -44,15 +46,15 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="销售统计列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="销售统计列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
$("#searchTable .tip").css("padding-left", "15px").css("color", "red");
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
@@ -91,8 +93,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -117,8 +118,7 @@
|
||||
{title: '退货数量', field: 'InSum', width: 60},
|
||||
{title: '退货金额', field: 'InSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -126,8 +126,7 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -135,21 +134,18 @@
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchMonth"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -161,8 +157,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -180,14 +175,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findByMonth.action",
|
||||
@@ -195,8 +190,7 @@
|
||||
data: ({
|
||||
MonthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res)
|
||||
{
|
||||
success: function (res) {
|
||||
var HeadIds = res.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
@@ -204,8 +198,7 @@
|
||||
type: "post",
|
||||
url: "<%=path %>/material/findByOrder.action",
|
||||
dataType: "json",
|
||||
success: function (resNew)
|
||||
{
|
||||
success: function (resNew) {
|
||||
var MIds = resNew.mIds;
|
||||
if (MIds) {
|
||||
$.ajax({
|
||||
@@ -220,14 +213,12 @@
|
||||
MaterialIds: MIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
success: function (data) {
|
||||
$("#tableData").datagrid('loadData', data);
|
||||
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -238,8 +229,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -250,13 +240,13 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -28,7 +28,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>供应商:</td>
|
||||
@@ -38,11 +39,13 @@
|
||||
<td> </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;"/>
|
||||
<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;"/>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -60,7 +63,8 @@
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商对账列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="供应商对账列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -68,8 +72,7 @@
|
||||
var path = "<%=path %>";
|
||||
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
@@ -96,8 +99,7 @@
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
@@ -112,7 +114,8 @@
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{ title: '单据编号',field: 'number',width:140,
|
||||
{
|
||||
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>";
|
||||
@@ -125,8 +128,7 @@
|
||||
{title: '本期变化', field: 'allPrice', width: 80},
|
||||
{title: '单据日期', field: 'operTime', width: 140}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -134,34 +136,29 @@
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(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"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchType"))
|
||||
{
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
@@ -173,8 +170,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
@@ -198,15 +194,14 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo,pageSize)
|
||||
{
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/depotHead/findStatementAccount.action",
|
||||
@@ -356,6 +351,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -26,17 +26,23 @@
|
||||
<form id="passwordFM" method="post" novalidate>
|
||||
<div class="fitem" style="padding:10px">
|
||||
<label id="passwordLabel">原始密码 </label>
|
||||
<input type="password" name="orgpassword" id="orgpassword" class="easyui-validatebox" data-options="required:true,validType:'length[5,20]'" style="width: 230px;height: 20px" missingMessage="请输入原始密码"/>
|
||||
<input type="password" name="orgpassword" id="orgpassword" class="easyui-validatebox"
|
||||
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">重设密码 </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="请填写新密码"/>
|
||||
<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">再输一遍 </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="两次密码输入不一致"/>
|
||||
<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 %>"/>
|
||||
@@ -50,8 +56,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
$("#orgpassword").focus();
|
||||
$('#passwordFM').form({
|
||||
onSubmit: function () {
|
||||
@@ -68,8 +73,7 @@
|
||||
$("#repassword").val("");
|
||||
});
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -81,8 +85,7 @@
|
||||
});
|
||||
|
||||
$("#savepassword").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (!$('#passwordFM').form('validate'))
|
||||
return;
|
||||
$.ajax({
|
||||
@@ -95,25 +98,21 @@
|
||||
password: $.trim($("#password").val()),
|
||||
orgpwd: $.trim($("#orgpassword").val())
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
if (1 == tipInfo)
|
||||
//回退到上次访问页面
|
||||
history.go(-1);
|
||||
else if(2 == tipInfo)
|
||||
{
|
||||
else if (2 == tipInfo) {
|
||||
$("#orgTipMsg").empty().append("<font color='red'>原始密码输入错误</font>");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.alert('提示', '更新密码异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '更新密码异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
@@ -123,12 +122,10 @@
|
||||
|
||||
//处理tip提示
|
||||
$("#orgpassword").unbind().bind({
|
||||
'click keyup':function()
|
||||
{
|
||||
'click keyup': function () {
|
||||
$("#orgTipMsg").empty();
|
||||
},
|
||||
'blur':function()
|
||||
{
|
||||
'blur': function () {
|
||||
$("#orgTipMsg").empty();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String clientIp = Tools.getLocalIp(request);
|
||||
@@ -55,8 +55,13 @@
|
||||
//cnodes = cnodes.substring(0, cnodes.length - 1);
|
||||
pnodes = pnodes.substring(0, pnodes.length - 1);
|
||||
|
||||
if (ctype == 'child') { return cnodes; }
|
||||
else { return pnodes };
|
||||
if (ctype == 'child') {
|
||||
return cnodes;
|
||||
}
|
||||
else {
|
||||
return pnodes
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
$(function () {
|
||||
@@ -70,12 +75,10 @@
|
||||
|
||||
$("#btnOK").click(
|
||||
function () {
|
||||
if(!checkUserDepot())
|
||||
{
|
||||
if (!checkUserDepot()) {
|
||||
url = '<%=path%>/userBusiness/create.action';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
url = '<%=path%>/userBusiness/update.action';
|
||||
}
|
||||
|
||||
@@ -84,7 +87,8 @@
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
|
||||
data: {
|
||||
Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
@@ -104,8 +108,7 @@
|
||||
});
|
||||
|
||||
//检查记录是否存在
|
||||
function checkUserDepot()
|
||||
{
|
||||
function checkUserDepot() {
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,是否存在
|
||||
@@ -118,13 +121,11 @@
|
||||
Type: type,
|
||||
KeyId: url_id
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -56,8 +56,13 @@
|
||||
//cnodes = cnodes.substring(0, cnodes.length - 1);
|
||||
pnodes = pnodes.substring(0, pnodes.length - 1);
|
||||
|
||||
if (ctype == 'child') { return cnodes; }
|
||||
else { return pnodes };
|
||||
if (ctype == 'child') {
|
||||
return cnodes;
|
||||
}
|
||||
else {
|
||||
return pnodes
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
$(function () {
|
||||
@@ -71,12 +76,10 @@
|
||||
|
||||
$("#btnOK").click(
|
||||
function () {
|
||||
if(!checkUserDepot())
|
||||
{
|
||||
if (!checkUserDepot()) {
|
||||
url = '<%=path%>/userBusiness/create.action';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
url = '<%=path%>/userBusiness/update.action';
|
||||
}
|
||||
|
||||
@@ -85,7 +88,8 @@
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
|
||||
data: {
|
||||
Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
@@ -105,8 +109,7 @@
|
||||
});
|
||||
|
||||
//检查记录是否存在
|
||||
function checkUserDepot()
|
||||
{
|
||||
function checkUserDepot() {
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,是否存在
|
||||
@@ -119,13 +122,11 @@
|
||||
Type: type,
|
||||
KeyId: url_id
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -56,8 +56,13 @@
|
||||
//cnodes = cnodes.substring(0, cnodes.length - 1);
|
||||
pnodes = pnodes.substring(0, pnodes.length - 1);
|
||||
|
||||
if (ctype == 'child') { return cnodes; }
|
||||
else { return pnodes };
|
||||
if (ctype == 'child') {
|
||||
return cnodes;
|
||||
}
|
||||
else {
|
||||
return pnodes
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
$(function () {
|
||||
@@ -71,12 +76,10 @@
|
||||
|
||||
$("#btnOK").click(
|
||||
function () {
|
||||
if(!checkUserRole())
|
||||
{
|
||||
if (!checkUserRole()) {
|
||||
url = '<%=path%>/userBusiness/create.action';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
url = '<%=path%>/userBusiness/update.action';
|
||||
}
|
||||
|
||||
@@ -85,7 +88,8 @@
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: { Type: type, KeyId: url_id, Value: GetNode('child'),clientIp:'<%=clientIp %>'
|
||||
data: {
|
||||
Type: type, KeyId: url_id, Value: GetNode('child'), clientIp: '<%=clientIp %>'
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
@@ -105,8 +109,7 @@
|
||||
});
|
||||
|
||||
//检查记录是否存在
|
||||
function checkUserRole()
|
||||
{
|
||||
function checkUserRole() {
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,是否存在
|
||||
@@ -119,13 +122,11 @@
|
||||
Type: type,
|
||||
KeyId: url_id
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查用户对应功能是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@page import="com.jsh.util.Tools" %>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ page language="java" pageEncoding="utf-8" %>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||||
@@ -27,28 +27,35 @@
|
||||
<form id="usernameFM" method="post" novalidate action="<%=path %>/user/update.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="usernameLabel">用户名称 </label>
|
||||
<input name="username" id="username" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" value="${sessionScope.user.username}" style="width: 230px;height: 20px"/>
|
||||
<input name="username" id="username" class="easyui-validatebox"
|
||||
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">部 门 </label>
|
||||
<input name="department" id="department" style="width: 230px;height: 20px" value="${sessionScope.user.department}"/>
|
||||
<input name="department" id="department" style="width: 230px;height: 20px"
|
||||
value="${sessionScope.user.department}"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="positionLabel">职 位 </label>
|
||||
<input name="position" id="position" style="width: 230px;height: 20px" value="${sessionScope.user.position}"/>
|
||||
<input name="position" id="position" style="width: 230px;height: 20px"
|
||||
value="${sessionScope.user.position}"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label id="phonenumLabel">联系电话 </label>
|
||||
<input name="phonenum" id="phonenum" class="easyui-numberbox" style="width: 230px;height: 20px" value="${sessionScope.user.phonenum}"/>
|
||||
<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">电子邮箱 </label>
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 230px;height: 20px" value="${sessionScope.user.email}"/>
|
||||
<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">描 述 </label>
|
||||
<textarea name="description" id="description" rows="3" cols="3" style="width: 230px;font-size: 12px;">${sessionScope.user.description}</textarea>
|
||||
<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}"/>
|
||||
@@ -63,17 +70,14 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
$(function () {
|
||||
browserFit();
|
||||
$("#userDlg").panel({height: webH - 35});
|
||||
});
|
||||
|
||||
//浏览器适配
|
||||
function browserFit()
|
||||
{
|
||||
if(getOs()=='MSIE')
|
||||
{
|
||||
function browserFit() {
|
||||
if (getOs() == 'MSIE') {
|
||||
$("#usernameLabel").empty().append("用户名称 ");
|
||||
$("#departmentLabel").empty().append("部 门 ");
|
||||
$("#positionLabel").empty().append("职 位 ");
|
||||
@@ -81,8 +85,7 @@
|
||||
$("#emailLabel").empty().append("电子邮箱 ");
|
||||
$("#descriptionLabel").empty().append("描 述 ");
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#usernameLabel").empty().append("用户名称 ");
|
||||
$("#departmentLabel").empty().append("部 门 ");
|
||||
$("#positionLabel").empty().append("职 位 ");
|
||||
@@ -93,15 +96,13 @@
|
||||
}
|
||||
|
||||
$("#cancelusername").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
history.go(-1);
|
||||
}
|
||||
});
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
@@ -109,60 +110,52 @@
|
||||
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"))
|
||||
{
|
||||
|| obj.id == "email" || obj.id == "description" || obj.id == "position")) {
|
||||
$("#saveusername").click();
|
||||
}
|
||||
});
|
||||
|
||||
//保存用户信息
|
||||
$("#saveusername").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
click: function () {
|
||||
if (checkusernameName())
|
||||
return;
|
||||
|
||||
var reg = /^([0-9])+$/;
|
||||
var phonenum = $.trim($("#phonenum").val());
|
||||
if(phonenum.length>0 && !reg.test(phonenum))
|
||||
{
|
||||
if (phonenum.length > 0 && !reg.test(phonenum)) {
|
||||
$.messager.alert('提示', '电话号码只能是数字', 'info');
|
||||
$("#phonenum").val("").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
$('#usernameFM').form('submit', {
|
||||
onSubmit: function()
|
||||
{
|
||||
onSubmit: function () {
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(result)
|
||||
{
|
||||
success: function (result) {
|
||||
var result = eval('(' + result + ')');
|
||||
if (!result)
|
||||
{
|
||||
if (!result) {
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存用户信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$.messager.alert('提示', '修改个人资料成功!', 'info');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//检查用户 名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
function checkusernameName()
|
||||
{
|
||||
function checkusernameName() {
|
||||
var username = $.trim($("#username").val());
|
||||
//表示是否存在 true == 存在 false = 不存在
|
||||
var flag = false;
|
||||
//开始ajax名称检验,不能重名
|
||||
if(username.length > 0 && username != '${sessionScope.user.username}')
|
||||
{
|
||||
if (username.length > 0 && username != '${sessionScope.user.username}') {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path %>/user/checkIsNameExist.action",
|
||||
@@ -172,11 +165,9 @@
|
||||
userID: '${sessionScope.user.id}',
|
||||
username: username
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
success: function (tipInfo) {
|
||||
flag = tipInfo;
|
||||
if(tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示', '用户名称已经存在', 'info');
|
||||
//alert("用户名称已经存在");
|
||||
//$("#username").val("");
|
||||
@@ -184,8 +175,7 @@
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
error: function () {
|
||||
$.messager.alert('提示', '检查用户名称是否存在异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user