增加财务相关页面
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -193,8 +193,7 @@ function ceshi()
|
||||
|
||||
</script>
|
||||
|
||||
<div region="west" hide="true" split="true" title="导航菜单" style="width: 200px;" id="west">
|
||||
<!--<div id="nav" class="easyui-accordion" fit="true" border="false">-->
|
||||
<div region="west" hide="true" split="true" title="导航菜单" style="width:155px;" id="west">
|
||||
<div id="nav" fit="true" border="false">
|
||||
<!-- 导航内容 -->
|
||||
<div>
|
||||
@@ -208,16 +207,11 @@ function ceshi()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden">
|
||||
<div id="tabs" class="easyui-tabs" fit="true" border="false">
|
||||
<!--<div title="欢迎使用" style="padding: 20px; overflow: hidden; color: red;">
|
||||
</div>-->
|
||||
</div>
|
||||
<div id="tabs" class="easyui-tabs" fit="true" border="false"></div>
|
||||
</div>
|
||||
<div id="mm" class="easyui-menu" style="width: 150px;">
|
||||
<div id="mm-tabupdate">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
935
WebRoot/pages/financial/giro.jsp
Normal file
935
WebRoot/pages/financial/giro.jsp
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>财务管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBillNo" id="searchBillNo" style="width:60px;"/>
|
||||
</td>
|
||||
<td>单据时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="财务管理列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="accountHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px"><input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select id="AccountId" name="AccountId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 60px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="OrganId" id="OrganId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var accountList = null;
|
||||
var accountID = null;
|
||||
var supplierList = null;
|
||||
var supplierID = null;
|
||||
var personList = null;
|
||||
var personID = null;
|
||||
var ProjectSearch=null;
|
||||
var kid=${sessionScope.user.id};
|
||||
var accountHeadMaxId=null; //获取最大的Id
|
||||
var accepId=null; //保存的主表id
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initSystemData_person(); //经手人数据
|
||||
initSelectInfo_person(); //经手人信息
|
||||
initSystemData_account(); //账户数据
|
||||
initSelectInfo_account(); //账户信息
|
||||
initSupplier(); //供应商
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
$("#searchBtn").click();
|
||||
});
|
||||
|
||||
//获取账户信息
|
||||
function initSystemData_account()
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/account/getAccount.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
accountList = systemInfo.showModel.map.accountList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找账户信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取账户信息
|
||||
function initSelectInfo_account()
|
||||
{
|
||||
var options = "";
|
||||
if(accountList !=null)
|
||||
{
|
||||
options = "";
|
||||
for(var i = 0 ;i < accountList.length;i ++)
|
||||
{
|
||||
var account = accountList[i];
|
||||
options += '<option value="' + account.id + '">' + account.name + '</option>';
|
||||
}
|
||||
$("#AccountId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化单位信息
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
}
|
||||
|
||||
//获取财务员
|
||||
function initSystemData_person()
|
||||
{
|
||||
var type = "财务员";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/person/getPersonByType.action",
|
||||
data: {
|
||||
Type: type
|
||||
},
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
personList = systemInfo.showModel.map.personList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取财务员
|
||||
function initSelectInfo_person()
|
||||
{
|
||||
var options = "";
|
||||
|
||||
if(personList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < personList.length;i ++)
|
||||
{
|
||||
var person = personList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
personID = person.id;
|
||||
}
|
||||
if(person.type=="财务员")
|
||||
{
|
||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#HandsPersonId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#accountHeadFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
//url:'<%=path %>/accountHead/findBy.action?pageSize=' + initPageSize,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 5,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据编号',field: 'BillNo',width:100},
|
||||
{ title: '单据时间 ',field: 'BillTime',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
|
||||
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
|
||||
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> <a onclick="showAccountHead(\'' + 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="editAccountHead(\'' + rowInfo + '\');"/> <a onclick="editAccountHead(\'' + 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="deleteAccountHead('+ rec.Id +');"/> <a onclick="deleteAccountHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addAccountHead',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addAccountHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteAccountHead',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteAccountHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-明细列表-编辑状态
|
||||
function initTableData_account()
|
||||
{
|
||||
$('#accountData').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemId',width:230,
|
||||
formatter:function(value,row,index){
|
||||
return row.InOutItemName;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'Id',
|
||||
textField:'InOutItemName',
|
||||
method:'get',
|
||||
url: "<%=path%>/inOutItem/findBySelect.action"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '金额',field: 'EachAmount',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'append',
|
||||
text:'新增',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
append(); //新增
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'delete',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
removeit(); //删除
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'reject',
|
||||
text:'撤销',
|
||||
iconCls:'icon-undo',
|
||||
handler:function()
|
||||
{
|
||||
reject(); //撤销
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-明细列表-查看状态
|
||||
function initTableData_account_show()
|
||||
{
|
||||
$('#accountDataShow').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemName',width:230},
|
||||
{ title: '金额',field: 'EachAmount',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="BillNo"||obj.id=="BillTime"))
|
||||
{
|
||||
$("#saveAccountHead").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchBillNo"))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showAccountHeadDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除财务信息
|
||||
function deleteAccountHead(accountHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountHeadID : accountHeadID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除财务信息
|
||||
function batDeleteAccountHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
accountHeadIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var accountHeadID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgAccountHead = "";
|
||||
|
||||
function addAccountHead()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#accountHeadFM').form('clear');
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#BillNo").val("").focus();
|
||||
|
||||
orgAccountHead = "";
|
||||
accountHeadID = 0;
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveAccountHead").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#accountHeadFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type: "转账",
|
||||
BillNo : $.trim($("#BillNo").val()),
|
||||
BillTime : $.trim($("#BillTime").val()),
|
||||
AccountId: $.trim($("#AccountId").val()),
|
||||
ChangeAmount: $.trim($("#ChangeAmount").val()),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
//保存明细记录
|
||||
if(accountHeadID ==0)
|
||||
{
|
||||
getMaxId(); //查找最大的Id
|
||||
accept(accountHeadMaxId); //新增
|
||||
}
|
||||
else
|
||||
{
|
||||
accept(accountHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#accountHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAccountHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#BillNo").val(accountHeadInfo[1]);
|
||||
$("#BillTime").val(accountHeadInfo[2]);
|
||||
$("#Remark").val(accountHeadInfo[3]);
|
||||
$("#AccountId").val(accountHeadInfo[4]);
|
||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/update.action?accountHeadID=' + accountHeadInfo[0];
|
||||
}
|
||||
|
||||
//查看信息
|
||||
function showAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
||||
$("#ChangeAmountShow").text(accountHeadInfo[10]);
|
||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
initTableData_account_show(); //明细列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showAccountHeadDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountHeadDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
Type:"转账",
|
||||
BillNo:$.trim($("#searchBillNo").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
EndTime:$("#searchEndTime").val(),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchBillNo").val("");
|
||||
$("#searchBeginTime").val("");
|
||||
$("#searchEndTime").val("");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
function endEditing() {
|
||||
if (editIndex == undefined) { return true }
|
||||
if ($('#accountData').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#accountData').datagrid('getEditor', {index:editIndex,field:'InOutItemId'});
|
||||
var InOutItemName = $(ed.target).combobox('getText');
|
||||
$('#accountData').datagrid('getRows')[editIndex]['InOutItemName'] = InOutItemName;
|
||||
$('#accountData').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//单击
|
||||
function onClickRow(index) {
|
||||
if (editIndex != index) {
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#accountData').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增
|
||||
function append()
|
||||
{
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('appendRow', {});
|
||||
editIndex = $('#accountData').datagrid('getRows').length - 1;
|
||||
$('#accountData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function removeit() {
|
||||
if (editIndex == undefined) { return }
|
||||
$('#accountData').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
//撤销
|
||||
function reject() {
|
||||
$('#accountData').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
//判断
|
||||
function CheckData() {
|
||||
var row = $('#accountData').datagrid('getRows');
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].InOutItemId == "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
if (totalRowNum != "") {
|
||||
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
|
||||
$.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//保存
|
||||
function accept(accepId) {
|
||||
append();
|
||||
removeit();
|
||||
if ($("#accountData").datagrid('getChanges').length) {
|
||||
if (!CheckData())
|
||||
return false;
|
||||
var inserted = $("#accountData").datagrid('getChanges', "inserted");
|
||||
var deleted = $("#accountData").datagrid('getChanges', "deleted");
|
||||
var updated = $("#accountData").datagrid('getChanges', "updated");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/accountItem/saveDetials.action",
|
||||
data: {
|
||||
Inserted: JSON.stringify(inserted),
|
||||
Deleted: JSON.stringify(deleted),
|
||||
Updated: JSON.stringify(updated),
|
||||
HeaderId:accepId,
|
||||
clientIp:'<%=clientIp %>'
|
||||
},
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
}
|
||||
else
|
||||
$.messager.alert('提示','保存失败!','error');
|
||||
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
$.messager.alert('提示',XmlHttpRequest.responseText,'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
//获取MaxId
|
||||
function getMaxId()
|
||||
{
|
||||
var accountHeadMax=null;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/accountHead/getMaxId.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
accountHeadMax = systemInfo.showModel.map.accountHeadMax;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找最大的Id异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accountHeadMax=null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(accountHeadMax !=null)
|
||||
{
|
||||
if(accountHeadMax.length>0)
|
||||
{
|
||||
accountHeadMaxId=accountHeadMax[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
935
WebRoot/pages/financial/item_in.jsp
Normal file
935
WebRoot/pages/financial/item_in.jsp
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>财务管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBillNo" id="searchBillNo" style="width:60px;"/>
|
||||
</td>
|
||||
<td>单据时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="财务管理列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="accountHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px"><input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select id="AccountId" name="AccountId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 60px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="OrganId" id="OrganId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var accountList = null;
|
||||
var accountID = null;
|
||||
var supplierList = null;
|
||||
var supplierID = null;
|
||||
var personList = null;
|
||||
var personID = null;
|
||||
var ProjectSearch=null;
|
||||
var kid=${sessionScope.user.id};
|
||||
var accountHeadMaxId=null; //获取最大的Id
|
||||
var accepId=null; //保存的主表id
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initSystemData_person(); //经手人数据
|
||||
initSelectInfo_person(); //经手人信息
|
||||
initSystemData_account(); //账户数据
|
||||
initSelectInfo_account(); //账户信息
|
||||
initSupplier(); //供应商
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
$("#searchBtn").click();
|
||||
});
|
||||
|
||||
//获取账户信息
|
||||
function initSystemData_account()
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/account/getAccount.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
accountList = systemInfo.showModel.map.accountList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找账户信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取账户信息
|
||||
function initSelectInfo_account()
|
||||
{
|
||||
var options = "";
|
||||
if(accountList !=null)
|
||||
{
|
||||
options = "";
|
||||
for(var i = 0 ;i < accountList.length;i ++)
|
||||
{
|
||||
var account = accountList[i];
|
||||
options += '<option value="' + account.id + '">' + account.name + '</option>';
|
||||
}
|
||||
$("#AccountId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化单位信息
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
}
|
||||
|
||||
//获取财务员
|
||||
function initSystemData_person()
|
||||
{
|
||||
var type = "财务员";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/person/getPersonByType.action",
|
||||
data: {
|
||||
Type: type
|
||||
},
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
personList = systemInfo.showModel.map.personList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取财务员
|
||||
function initSelectInfo_person()
|
||||
{
|
||||
var options = "";
|
||||
|
||||
if(personList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < personList.length;i ++)
|
||||
{
|
||||
var person = personList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
personID = person.id;
|
||||
}
|
||||
if(person.type=="财务员")
|
||||
{
|
||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#HandsPersonId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#accountHeadFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
//url:'<%=path %>/accountHead/findBy.action?pageSize=' + initPageSize,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 5,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据编号',field: 'BillNo',width:100},
|
||||
{ title: '单据时间 ',field: 'BillTime',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
|
||||
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
|
||||
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> <a onclick="showAccountHead(\'' + 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="editAccountHead(\'' + rowInfo + '\');"/> <a onclick="editAccountHead(\'' + 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="deleteAccountHead('+ rec.Id +');"/> <a onclick="deleteAccountHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addAccountHead',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addAccountHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteAccountHead',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteAccountHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-明细列表-编辑状态
|
||||
function initTableData_account()
|
||||
{
|
||||
$('#accountData').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemId',width:230,
|
||||
formatter:function(value,row,index){
|
||||
return row.InOutItemName;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'Id',
|
||||
textField:'InOutItemName',
|
||||
method:'get',
|
||||
url: "<%=path%>/inOutItem/findBySelect.action"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '金额',field: 'EachAmount',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'append',
|
||||
text:'新增',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
append(); //新增
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'delete',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
removeit(); //删除
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'reject',
|
||||
text:'撤销',
|
||||
iconCls:'icon-undo',
|
||||
handler:function()
|
||||
{
|
||||
reject(); //撤销
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-明细列表-查看状态
|
||||
function initTableData_account_show()
|
||||
{
|
||||
$('#accountDataShow').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemName',width:230},
|
||||
{ title: '金额',field: 'EachAmount',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="BillNo"||obj.id=="BillTime"))
|
||||
{
|
||||
$("#saveAccountHead").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchBillNo"))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showAccountHeadDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除财务信息
|
||||
function deleteAccountHead(accountHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountHeadID : accountHeadID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除财务信息
|
||||
function batDeleteAccountHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
accountHeadIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var accountHeadID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgAccountHead = "";
|
||||
|
||||
function addAccountHead()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#accountHeadFM').form('clear');
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#BillNo").val("").focus();
|
||||
|
||||
orgAccountHead = "";
|
||||
accountHeadID = 0;
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveAccountHead").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#accountHeadFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type: "收入",
|
||||
BillNo : $.trim($("#BillNo").val()),
|
||||
BillTime : $.trim($("#BillTime").val()),
|
||||
AccountId: $.trim($("#AccountId").val()),
|
||||
ChangeAmount: $.trim($("#ChangeAmount").val()),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
//保存明细记录
|
||||
if(accountHeadID ==0)
|
||||
{
|
||||
getMaxId(); //查找最大的Id
|
||||
accept(accountHeadMaxId); //新增
|
||||
}
|
||||
else
|
||||
{
|
||||
accept(accountHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#accountHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAccountHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#BillNo").val(accountHeadInfo[1]);
|
||||
$("#BillTime").val(accountHeadInfo[2]);
|
||||
$("#Remark").val(accountHeadInfo[3]);
|
||||
$("#AccountId").val(accountHeadInfo[4]);
|
||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/update.action?accountHeadID=' + accountHeadInfo[0];
|
||||
}
|
||||
|
||||
//查看信息
|
||||
function showAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
||||
$("#ChangeAmountShow").text(accountHeadInfo[10]);
|
||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
initTableData_account_show(); //明细列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showAccountHeadDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountHeadDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
Type:"收入",
|
||||
BillNo:$.trim($("#searchBillNo").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
EndTime:$("#searchEndTime").val(),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchBillNo").val("");
|
||||
$("#searchBeginTime").val("");
|
||||
$("#searchEndTime").val("");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
function endEditing() {
|
||||
if (editIndex == undefined) { return true }
|
||||
if ($('#accountData').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#accountData').datagrid('getEditor', {index:editIndex,field:'InOutItemId'});
|
||||
var InOutItemName = $(ed.target).combobox('getText');
|
||||
$('#accountData').datagrid('getRows')[editIndex]['InOutItemName'] = InOutItemName;
|
||||
$('#accountData').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//单击
|
||||
function onClickRow(index) {
|
||||
if (editIndex != index) {
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#accountData').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增
|
||||
function append()
|
||||
{
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('appendRow', {});
|
||||
editIndex = $('#accountData').datagrid('getRows').length - 1;
|
||||
$('#accountData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function removeit() {
|
||||
if (editIndex == undefined) { return }
|
||||
$('#accountData').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
//撤销
|
||||
function reject() {
|
||||
$('#accountData').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
//判断
|
||||
function CheckData() {
|
||||
var row = $('#accountData').datagrid('getRows');
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].InOutItemId == "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
if (totalRowNum != "") {
|
||||
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
|
||||
$.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//保存
|
||||
function accept(accepId) {
|
||||
append();
|
||||
removeit();
|
||||
if ($("#accountData").datagrid('getChanges').length) {
|
||||
if (!CheckData())
|
||||
return false;
|
||||
var inserted = $("#accountData").datagrid('getChanges', "inserted");
|
||||
var deleted = $("#accountData").datagrid('getChanges', "deleted");
|
||||
var updated = $("#accountData").datagrid('getChanges', "updated");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/accountItem/saveDetials.action",
|
||||
data: {
|
||||
Inserted: JSON.stringify(inserted),
|
||||
Deleted: JSON.stringify(deleted),
|
||||
Updated: JSON.stringify(updated),
|
||||
HeaderId:accepId,
|
||||
clientIp:'<%=clientIp %>'
|
||||
},
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
}
|
||||
else
|
||||
$.messager.alert('提示','保存失败!','error');
|
||||
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
$.messager.alert('提示',XmlHttpRequest.responseText,'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
//获取MaxId
|
||||
function getMaxId()
|
||||
{
|
||||
var accountHeadMax=null;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/accountHead/getMaxId.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
accountHeadMax = systemInfo.showModel.map.accountHeadMax;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找最大的Id异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accountHeadMax=null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(accountHeadMax !=null)
|
||||
{
|
||||
if(accountHeadMax.length>0)
|
||||
{
|
||||
accountHeadMaxId=accountHeadMax[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
935
WebRoot/pages/financial/item_out.jsp
Normal file
935
WebRoot/pages/financial/item_out.jsp
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>财务管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBillNo" id="searchBillNo" style="width:60px;"/>
|
||||
</td>
|
||||
<td>单据时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="财务管理列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="accountHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px"><input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select id="AccountId" name="AccountId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 60px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="OrganId" id="OrganId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var accountList = null;
|
||||
var accountID = null;
|
||||
var supplierList = null;
|
||||
var supplierID = null;
|
||||
var personList = null;
|
||||
var personID = null;
|
||||
var ProjectSearch=null;
|
||||
var kid=${sessionScope.user.id};
|
||||
var accountHeadMaxId=null; //获取最大的Id
|
||||
var accepId=null; //保存的主表id
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initSystemData_person(); //经手人数据
|
||||
initSelectInfo_person(); //经手人信息
|
||||
initSystemData_account(); //账户数据
|
||||
initSelectInfo_account(); //账户信息
|
||||
initSupplier(); //供应商
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
$("#searchBtn").click();
|
||||
});
|
||||
|
||||
//获取账户信息
|
||||
function initSystemData_account()
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/account/getAccount.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
accountList = systemInfo.showModel.map.accountList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找账户信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取账户信息
|
||||
function initSelectInfo_account()
|
||||
{
|
||||
var options = "";
|
||||
if(accountList !=null)
|
||||
{
|
||||
options = "";
|
||||
for(var i = 0 ;i < accountList.length;i ++)
|
||||
{
|
||||
var account = accountList[i];
|
||||
options += '<option value="' + account.id + '">' + account.name + '</option>';
|
||||
}
|
||||
$("#AccountId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化单位信息
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
}
|
||||
|
||||
//获取财务员
|
||||
function initSystemData_person()
|
||||
{
|
||||
var type = "财务员";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/person/getPersonByType.action",
|
||||
data: {
|
||||
Type: type
|
||||
},
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
personList = systemInfo.showModel.map.personList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取财务员
|
||||
function initSelectInfo_person()
|
||||
{
|
||||
var options = "";
|
||||
|
||||
if(personList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < personList.length;i ++)
|
||||
{
|
||||
var person = personList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
personID = person.id;
|
||||
}
|
||||
if(person.type=="财务员")
|
||||
{
|
||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#HandsPersonId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#accountHeadFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
//url:'<%=path %>/accountHead/findBy.action?pageSize=' + initPageSize,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 5,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据编号',field: 'BillNo',width:100},
|
||||
{ title: '单据时间 ',field: 'BillTime',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
|
||||
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
|
||||
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> <a onclick="showAccountHead(\'' + 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="editAccountHead(\'' + rowInfo + '\');"/> <a onclick="editAccountHead(\'' + 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="deleteAccountHead('+ rec.Id +');"/> <a onclick="deleteAccountHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addAccountHead',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addAccountHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteAccountHead',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteAccountHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-明细列表-编辑状态
|
||||
function initTableData_account()
|
||||
{
|
||||
$('#accountData').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemId',width:230,
|
||||
formatter:function(value,row,index){
|
||||
return row.InOutItemName;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'Id',
|
||||
textField:'InOutItemName',
|
||||
method:'get',
|
||||
url: "<%=path%>/inOutItem/findBySelect.action"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '金额',field: 'EachAmount',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'append',
|
||||
text:'新增',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
append(); //新增
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'delete',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
removeit(); //删除
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'reject',
|
||||
text:'撤销',
|
||||
iconCls:'icon-undo',
|
||||
handler:function()
|
||||
{
|
||||
reject(); //撤销
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-明细列表-查看状态
|
||||
function initTableData_account_show()
|
||||
{
|
||||
$('#accountDataShow').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemName',width:230},
|
||||
{ title: '金额',field: 'EachAmount',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="BillNo"||obj.id=="BillTime"))
|
||||
{
|
||||
$("#saveAccountHead").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchBillNo"))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showAccountHeadDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除财务信息
|
||||
function deleteAccountHead(accountHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountHeadID : accountHeadID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除财务信息
|
||||
function batDeleteAccountHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
accountHeadIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var accountHeadID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgAccountHead = "";
|
||||
|
||||
function addAccountHead()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#accountHeadFM').form('clear');
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#BillNo").val("").focus();
|
||||
|
||||
orgAccountHead = "";
|
||||
accountHeadID = 0;
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveAccountHead").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#accountHeadFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type: "支出",
|
||||
BillNo : $.trim($("#BillNo").val()),
|
||||
BillTime : $.trim($("#BillTime").val()),
|
||||
AccountId: $.trim($("#AccountId").val()),
|
||||
ChangeAmount: $.trim($("#ChangeAmount").val()),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
//保存明细记录
|
||||
if(accountHeadID ==0)
|
||||
{
|
||||
getMaxId(); //查找最大的Id
|
||||
accept(accountHeadMaxId); //新增
|
||||
}
|
||||
else
|
||||
{
|
||||
accept(accountHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#accountHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAccountHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#BillNo").val(accountHeadInfo[1]);
|
||||
$("#BillTime").val(accountHeadInfo[2]);
|
||||
$("#Remark").val(accountHeadInfo[3]);
|
||||
$("#AccountId").val(accountHeadInfo[4]);
|
||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/update.action?accountHeadID=' + accountHeadInfo[0];
|
||||
}
|
||||
|
||||
//查看信息
|
||||
function showAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
||||
$("#ChangeAmountShow").text(accountHeadInfo[10]);
|
||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
initTableData_account_show(); //明细列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showAccountHeadDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountHeadDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
Type:"支出",
|
||||
BillNo:$.trim($("#searchBillNo").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
EndTime:$("#searchEndTime").val(),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchBillNo").val("");
|
||||
$("#searchBeginTime").val("");
|
||||
$("#searchEndTime").val("");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
function endEditing() {
|
||||
if (editIndex == undefined) { return true }
|
||||
if ($('#accountData').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#accountData').datagrid('getEditor', {index:editIndex,field:'InOutItemId'});
|
||||
var InOutItemName = $(ed.target).combobox('getText');
|
||||
$('#accountData').datagrid('getRows')[editIndex]['InOutItemName'] = InOutItemName;
|
||||
$('#accountData').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//单击
|
||||
function onClickRow(index) {
|
||||
if (editIndex != index) {
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#accountData').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增
|
||||
function append()
|
||||
{
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('appendRow', {});
|
||||
editIndex = $('#accountData').datagrid('getRows').length - 1;
|
||||
$('#accountData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function removeit() {
|
||||
if (editIndex == undefined) { return }
|
||||
$('#accountData').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
//撤销
|
||||
function reject() {
|
||||
$('#accountData').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
//判断
|
||||
function CheckData() {
|
||||
var row = $('#accountData').datagrid('getRows');
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].InOutItemId == "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
if (totalRowNum != "") {
|
||||
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
|
||||
$.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//保存
|
||||
function accept(accepId) {
|
||||
append();
|
||||
removeit();
|
||||
if ($("#accountData").datagrid('getChanges').length) {
|
||||
if (!CheckData())
|
||||
return false;
|
||||
var inserted = $("#accountData").datagrid('getChanges', "inserted");
|
||||
var deleted = $("#accountData").datagrid('getChanges', "deleted");
|
||||
var updated = $("#accountData").datagrid('getChanges', "updated");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/accountItem/saveDetials.action",
|
||||
data: {
|
||||
Inserted: JSON.stringify(inserted),
|
||||
Deleted: JSON.stringify(deleted),
|
||||
Updated: JSON.stringify(updated),
|
||||
HeaderId:accepId,
|
||||
clientIp:'<%=clientIp %>'
|
||||
},
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
}
|
||||
else
|
||||
$.messager.alert('提示','保存失败!','error');
|
||||
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
$.messager.alert('提示',XmlHttpRequest.responseText,'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
//获取MaxId
|
||||
function getMaxId()
|
||||
{
|
||||
var accountHeadMax=null;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/accountHead/getMaxId.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
accountHeadMax = systemInfo.showModel.map.accountHeadMax;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找最大的Id异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accountHeadMax=null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(accountHeadMax !=null)
|
||||
{
|
||||
if(accountHeadMax.length>0)
|
||||
{
|
||||
accountHeadMaxId=accountHeadMax[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
935
WebRoot/pages/financial/money_in.jsp
Normal file
935
WebRoot/pages/financial/money_in.jsp
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>财务管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBillNo" id="searchBillNo" style="width:60px;"/>
|
||||
</td>
|
||||
<td>单据时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="财务管理列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="accountHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px"><input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select id="AccountId" name="AccountId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 60px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="OrganId" id="OrganId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var accountList = null;
|
||||
var accountID = null;
|
||||
var supplierList = null;
|
||||
var supplierID = null;
|
||||
var personList = null;
|
||||
var personID = null;
|
||||
var ProjectSearch=null;
|
||||
var kid=${sessionScope.user.id};
|
||||
var accountHeadMaxId=null; //获取最大的Id
|
||||
var accepId=null; //保存的主表id
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initSystemData_person(); //经手人数据
|
||||
initSelectInfo_person(); //经手人信息
|
||||
initSystemData_account(); //账户数据
|
||||
initSelectInfo_account(); //账户信息
|
||||
initSupplier(); //供应商
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
$("#searchBtn").click();
|
||||
});
|
||||
|
||||
//获取账户信息
|
||||
function initSystemData_account()
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/account/getAccount.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
accountList = systemInfo.showModel.map.accountList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找账户信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取账户信息
|
||||
function initSelectInfo_account()
|
||||
{
|
||||
var options = "";
|
||||
if(accountList !=null)
|
||||
{
|
||||
options = "";
|
||||
for(var i = 0 ;i < accountList.length;i ++)
|
||||
{
|
||||
var account = accountList[i];
|
||||
options += '<option value="' + account.id + '">' + account.name + '</option>';
|
||||
}
|
||||
$("#AccountId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化单位信息
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
}
|
||||
|
||||
//获取财务员
|
||||
function initSystemData_person()
|
||||
{
|
||||
var type = "财务员";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/person/getPersonByType.action",
|
||||
data: {
|
||||
Type: type
|
||||
},
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
personList = systemInfo.showModel.map.personList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取财务员
|
||||
function initSelectInfo_person()
|
||||
{
|
||||
var options = "";
|
||||
|
||||
if(personList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < personList.length;i ++)
|
||||
{
|
||||
var person = personList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
personID = person.id;
|
||||
}
|
||||
if(person.type=="财务员")
|
||||
{
|
||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#HandsPersonId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#accountHeadFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
//url:'<%=path %>/accountHead/findBy.action?pageSize=' + initPageSize,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 5,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据编号',field: 'BillNo',width:100},
|
||||
{ title: '单据时间 ',field: 'BillTime',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
|
||||
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
|
||||
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> <a onclick="showAccountHead(\'' + 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="editAccountHead(\'' + rowInfo + '\');"/> <a onclick="editAccountHead(\'' + 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="deleteAccountHead('+ rec.Id +');"/> <a onclick="deleteAccountHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addAccountHead',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addAccountHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteAccountHead',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteAccountHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-明细列表-编辑状态
|
||||
function initTableData_account()
|
||||
{
|
||||
$('#accountData').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemId',width:230,
|
||||
formatter:function(value,row,index){
|
||||
return row.InOutItemName;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'Id',
|
||||
textField:'InOutItemName',
|
||||
method:'get',
|
||||
url: "<%=path%>/inOutItem/findBySelect.action"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '金额',field: 'EachAmount',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'append',
|
||||
text:'新增',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
append(); //新增
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'delete',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
removeit(); //删除
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'reject',
|
||||
text:'撤销',
|
||||
iconCls:'icon-undo',
|
||||
handler:function()
|
||||
{
|
||||
reject(); //撤销
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-明细列表-查看状态
|
||||
function initTableData_account_show()
|
||||
{
|
||||
$('#accountDataShow').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemName',width:230},
|
||||
{ title: '金额',field: 'EachAmount',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="BillNo"||obj.id=="BillTime"))
|
||||
{
|
||||
$("#saveAccountHead").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchBillNo"))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showAccountHeadDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除财务信息
|
||||
function deleteAccountHead(accountHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountHeadID : accountHeadID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除财务信息
|
||||
function batDeleteAccountHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
accountHeadIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var accountHeadID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgAccountHead = "";
|
||||
|
||||
function addAccountHead()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#accountHeadFM').form('clear');
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#BillNo").val("").focus();
|
||||
|
||||
orgAccountHead = "";
|
||||
accountHeadID = 0;
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveAccountHead").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#accountHeadFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type: "收款",
|
||||
BillNo : $.trim($("#BillNo").val()),
|
||||
BillTime : $.trim($("#BillTime").val()),
|
||||
AccountId: $.trim($("#AccountId").val()),
|
||||
ChangeAmount: $.trim($("#ChangeAmount").val()),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
//保存明细记录
|
||||
if(accountHeadID ==0)
|
||||
{
|
||||
getMaxId(); //查找最大的Id
|
||||
accept(accountHeadMaxId); //新增
|
||||
}
|
||||
else
|
||||
{
|
||||
accept(accountHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#accountHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAccountHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#BillNo").val(accountHeadInfo[1]);
|
||||
$("#BillTime").val(accountHeadInfo[2]);
|
||||
$("#Remark").val(accountHeadInfo[3]);
|
||||
$("#AccountId").val(accountHeadInfo[4]);
|
||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/update.action?accountHeadID=' + accountHeadInfo[0];
|
||||
}
|
||||
|
||||
//查看信息
|
||||
function showAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
||||
$("#ChangeAmountShow").text(accountHeadInfo[10]);
|
||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
initTableData_account_show(); //明细列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showAccountHeadDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountHeadDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
Type:"收款",
|
||||
BillNo:$.trim($("#searchBillNo").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
EndTime:$("#searchEndTime").val(),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchBillNo").val("");
|
||||
$("#searchBeginTime").val("");
|
||||
$("#searchEndTime").val("");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
function endEditing() {
|
||||
if (editIndex == undefined) { return true }
|
||||
if ($('#accountData').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#accountData').datagrid('getEditor', {index:editIndex,field:'InOutItemId'});
|
||||
var InOutItemName = $(ed.target).combobox('getText');
|
||||
$('#accountData').datagrid('getRows')[editIndex]['InOutItemName'] = InOutItemName;
|
||||
$('#accountData').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//单击
|
||||
function onClickRow(index) {
|
||||
if (editIndex != index) {
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#accountData').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增
|
||||
function append()
|
||||
{
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('appendRow', {});
|
||||
editIndex = $('#accountData').datagrid('getRows').length - 1;
|
||||
$('#accountData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function removeit() {
|
||||
if (editIndex == undefined) { return }
|
||||
$('#accountData').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
//撤销
|
||||
function reject() {
|
||||
$('#accountData').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
//判断
|
||||
function CheckData() {
|
||||
var row = $('#accountData').datagrid('getRows');
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].InOutItemId == "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
if (totalRowNum != "") {
|
||||
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
|
||||
$.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//保存
|
||||
function accept(accepId) {
|
||||
append();
|
||||
removeit();
|
||||
if ($("#accountData").datagrid('getChanges').length) {
|
||||
if (!CheckData())
|
||||
return false;
|
||||
var inserted = $("#accountData").datagrid('getChanges', "inserted");
|
||||
var deleted = $("#accountData").datagrid('getChanges', "deleted");
|
||||
var updated = $("#accountData").datagrid('getChanges', "updated");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/accountItem/saveDetials.action",
|
||||
data: {
|
||||
Inserted: JSON.stringify(inserted),
|
||||
Deleted: JSON.stringify(deleted),
|
||||
Updated: JSON.stringify(updated),
|
||||
HeaderId:accepId,
|
||||
clientIp:'<%=clientIp %>'
|
||||
},
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
}
|
||||
else
|
||||
$.messager.alert('提示','保存失败!','error');
|
||||
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
$.messager.alert('提示',XmlHttpRequest.responseText,'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
//获取MaxId
|
||||
function getMaxId()
|
||||
{
|
||||
var accountHeadMax=null;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/accountHead/getMaxId.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
accountHeadMax = systemInfo.showModel.map.accountHeadMax;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找最大的Id异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accountHeadMax=null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(accountHeadMax !=null)
|
||||
{
|
||||
if(accountHeadMax.length>0)
|
||||
{
|
||||
accountHeadMaxId=accountHeadMax[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
935
WebRoot/pages/financial/money_out.jsp
Normal file
935
WebRoot/pages/financial/money_out.jsp
Normal file
@@ -0,0 +1,935 @@
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>财务管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBillNo" id="searchBillNo" style="width:60px;"/>
|
||||
</td>
|
||||
<td>单据时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="财务管理列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="accountHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px"><input name="BillNo" id="BillNo" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="BillTime" id="BillTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select id="AccountId" name="AccountId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td>
|
||||
<input type="text" name="ChangeAmount" id="ChangeAmount" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 60px;"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="OrganId" id="OrganId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveAccountHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelAccountHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#accountHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="accountHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
</td>
|
||||
<td>账户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>金额:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单位:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td>经手人:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单据明细:</td>
|
||||
<td colspan="7">
|
||||
<!-- 单据列表table -->
|
||||
<table id="accountDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var accountList = null;
|
||||
var accountID = null;
|
||||
var supplierList = null;
|
||||
var supplierID = null;
|
||||
var personList = null;
|
||||
var personID = null;
|
||||
var ProjectSearch=null;
|
||||
var kid=${sessionScope.user.id};
|
||||
var accountHeadMaxId=null; //获取最大的Id
|
||||
var accepId=null; //保存的主表id
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initSystemData_person(); //经手人数据
|
||||
initSelectInfo_person(); //经手人信息
|
||||
initSystemData_account(); //账户数据
|
||||
initSelectInfo_account(); //账户信息
|
||||
initSupplier(); //供应商
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
$("#searchBtn").click();
|
||||
});
|
||||
|
||||
//获取账户信息
|
||||
function initSystemData_account()
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/account/getAccount.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
accountList = systemInfo.showModel.map.accountList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找账户信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取账户信息
|
||||
function initSelectInfo_account()
|
||||
{
|
||||
var options = "";
|
||||
if(accountList !=null)
|
||||
{
|
||||
options = "";
|
||||
for(var i = 0 ;i < accountList.length;i ++)
|
||||
{
|
||||
var account = accountList[i];
|
||||
options += '<option value="' + account.id + '">' + account.name + '</option>';
|
||||
}
|
||||
$("#AccountId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化单位信息
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
}
|
||||
|
||||
//获取财务员
|
||||
function initSystemData_person()
|
||||
{
|
||||
var type = "财务员";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/person/getPersonByType.action",
|
||||
data: {
|
||||
Type: type
|
||||
},
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
personList = systemInfo.showModel.map.personList;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取财务员
|
||||
function initSelectInfo_person()
|
||||
{
|
||||
var options = "";
|
||||
|
||||
if(personList !=null)
|
||||
{
|
||||
for(var i = 0 ;i < personList.length;i ++)
|
||||
{
|
||||
var person = personList[i];
|
||||
if(0 == i)
|
||||
{
|
||||
personID = person.id;
|
||||
}
|
||||
if(person.type=="财务员")
|
||||
{
|
||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
||||
}
|
||||
}
|
||||
$("#HandsPersonId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#accountHeadFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
//url:'<%=path %>/accountHead/findBy.action?pageSize=' + initPageSize,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 5,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据编号',field: 'BillNo',width:100},
|
||||
{ title: '单据时间 ',field: 'BillTime',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
|
||||
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
|
||||
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> <a onclick="showAccountHead(\'' + 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="editAccountHead(\'' + rowInfo + '\');"/> <a onclick="editAccountHead(\'' + 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="deleteAccountHead('+ rec.Id +');"/> <a onclick="deleteAccountHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addAccountHead',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addAccountHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteAccountHead',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteAccountHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-明细列表-编辑状态
|
||||
function initTableData_account()
|
||||
{
|
||||
$('#accountData').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemId',width:230,
|
||||
formatter:function(value,row,index){
|
||||
return row.InOutItemName;
|
||||
},
|
||||
editor:{
|
||||
type:'combobox',
|
||||
options:{
|
||||
valueField:'Id',
|
||||
textField:'InOutItemName',
|
||||
method:'get',
|
||||
url: "<%=path%>/inOutItem/findBySelect.action"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '金额',field: 'EachAmount',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'append',
|
||||
text:'新增',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
append(); //新增
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'delete',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
removeit(); //删除
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'reject',
|
||||
text:'撤销',
|
||||
iconCls:'icon-undo',
|
||||
handler:function()
|
||||
{
|
||||
reject(); //撤销
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-明细列表-查看状态
|
||||
function initTableData_account_show()
|
||||
{
|
||||
$('#accountDataShow').datagrid({
|
||||
height:300,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/accountItem/findBy.action?HeaderId=' + accountHeadID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '收入项目',field: 'InOutItemName',width:230},
|
||||
{ title: '金额',field: 'EachAmount',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="BillNo"||obj.id=="BillTime"))
|
||||
{
|
||||
$("#saveAccountHead").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchBillNo"))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showAccountHeadDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除财务信息
|
||||
function deleteAccountHead(accountHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountHeadID : accountHeadID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除财务信息
|
||||
function batDeleteAccountHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条财务信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
accountHeadIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除财务信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除财务信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var accountHeadID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgAccountHead = "";
|
||||
|
||||
function addAccountHead()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#accountHeadFM').form('clear');
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#BillNo").val("").focus();
|
||||
|
||||
orgAccountHead = "";
|
||||
accountHeadID = 0;
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveAccountHead").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#accountHeadFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type: "付款",
|
||||
BillNo : $.trim($("#BillNo").val()),
|
||||
BillTime : $.trim($("#BillTime").val()),
|
||||
AccountId: $.trim($("#AccountId").val()),
|
||||
ChangeAmount: $.trim($("#ChangeAmount").val()),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
//保存明细记录
|
||||
if(accountHeadID ==0)
|
||||
{
|
||||
getMaxId(); //查找最大的Id
|
||||
accept(accountHeadMaxId); //新增
|
||||
}
|
||||
else
|
||||
{
|
||||
accept(accountHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#accountHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showAccountHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#BillNo").val(accountHeadInfo[1]);
|
||||
$("#BillTime").val(accountHeadInfo[2]);
|
||||
$("#Remark").val(accountHeadInfo[3]);
|
||||
$("#AccountId").val(accountHeadInfo[4]);
|
||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
|
||||
initTableData_account(); //明细列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
url = '<%=path %>/accountHead/update.action?accountHeadID=' + accountHeadInfo[0];
|
||||
}
|
||||
|
||||
//查看信息
|
||||
function showAccountHead(accountHeadTotalInfo)
|
||||
{
|
||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
||||
$("#ChangeAmountShow").text(accountHeadInfo[10]);
|
||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看财务信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
accountHeadID = accountHeadInfo[0];
|
||||
initTableData_account_show(); //明细列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showAccountHeadDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountHeadDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/accountHead/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
Type:"付款",
|
||||
BillNo:$.trim($("#searchBillNo").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
EndTime:$("#searchEndTime").val(),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchBillNo").val("");
|
||||
$("#searchBeginTime").val("");
|
||||
$("#searchEndTime").val("");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
function endEditing() {
|
||||
if (editIndex == undefined) { return true }
|
||||
if ($('#accountData').datagrid('validateRow', editIndex)) {
|
||||
var ed = $('#accountData').datagrid('getEditor', {index:editIndex,field:'InOutItemId'});
|
||||
var InOutItemName = $(ed.target).combobox('getText');
|
||||
$('#accountData').datagrid('getRows')[editIndex]['InOutItemName'] = InOutItemName;
|
||||
$('#accountData').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//单击
|
||||
function onClickRow(index) {
|
||||
if (editIndex != index) {
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('selectRow', index)
|
||||
.datagrid('beginEdit', index);
|
||||
editIndex = index;
|
||||
} else {
|
||||
$('#accountData').datagrid('selectRow', editIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
//新增
|
||||
function append()
|
||||
{
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('appendRow', {});
|
||||
editIndex = $('#accountData').datagrid('getRows').length - 1;
|
||||
$('#accountData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
|
||||
}
|
||||
}
|
||||
//删除
|
||||
function removeit() {
|
||||
if (editIndex == undefined) { return }
|
||||
$('#accountData').datagrid('cancelEdit', editIndex)
|
||||
.datagrid('deleteRow', editIndex);
|
||||
editIndex = undefined;
|
||||
}
|
||||
//撤销
|
||||
function reject() {
|
||||
$('#accountData').datagrid('rejectChanges');
|
||||
editIndex = undefined;
|
||||
}
|
||||
//判断
|
||||
function CheckData() {
|
||||
var row = $('#accountData').datagrid('getRows');
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].InOutItemId == "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
if (totalRowNum != "") {
|
||||
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
|
||||
$.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//保存
|
||||
function accept(accepId) {
|
||||
append();
|
||||
removeit();
|
||||
if ($("#accountData").datagrid('getChanges').length) {
|
||||
if (!CheckData())
|
||||
return false;
|
||||
var inserted = $("#accountData").datagrid('getChanges', "inserted");
|
||||
var deleted = $("#accountData").datagrid('getChanges', "deleted");
|
||||
var updated = $("#accountData").datagrid('getChanges', "updated");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "<%=path%>/accountItem/saveDetials.action",
|
||||
data: {
|
||||
Inserted: JSON.stringify(inserted),
|
||||
Deleted: JSON.stringify(deleted),
|
||||
Updated: JSON.stringify(updated),
|
||||
HeaderId:accepId,
|
||||
clientIp:'<%=clientIp %>'
|
||||
},
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if (tipInfo) {
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
}
|
||||
else
|
||||
$.messager.alert('提示','保存失败!','error');
|
||||
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
$.messager.alert('提示',XmlHttpRequest.responseText,'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (endEditing()) {
|
||||
$('#accountData').datagrid('acceptChanges');
|
||||
}
|
||||
}
|
||||
//获取MaxId
|
||||
function getMaxId()
|
||||
{
|
||||
var accountHeadMax=null;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path%>/accountHead/getMaxId.action",
|
||||
//设置为同步
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (systemInfo)
|
||||
{
|
||||
if(systemInfo)
|
||||
{
|
||||
accountHeadMax = systemInfo.showModel.map.accountHeadMax;
|
||||
var msgTip = systemInfo.showModel.msgTip;
|
||||
if(msgTip == "exceptoin")
|
||||
{
|
||||
$.messager.alert('提示','查找最大的Id异常,请与管理员联系!','error');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accountHeadMax=null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(accountHeadMax !=null)
|
||||
{
|
||||
if(accountHeadMax.length>0)
|
||||
{
|
||||
accountHeadMaxId=accountHeadMax[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</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:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -103,9 +93,9 @@
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -121,7 +111,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -154,9 +144,9 @@
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -400,8 +390,7 @@
|
||||
{ title: '出库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:300},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -439,25 +428,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -468,7 +438,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -549,7 +519,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -745,8 +715,8 @@
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -840,8 +810,8 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -863,7 +833,7 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -930,130 +900,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条调拨出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条调拨出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,447 +0,0 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
String clientIp = Tools.getCurrentUserIP();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>单元管理</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>名称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchName" id="searchName" style="width:150px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- 数据显示table -->
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="单元列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="buildingDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="buildingFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td style="padding:5px"><input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td style="padding:5px"><input name="Remark" id="Remark" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>启用</td>
|
||||
<td style="padding:1px"><input name="Enabled" id="Enabled" type="checkbox" style="width: 230px;height: 20px"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveBuilding" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelBuilding" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#buildingDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotID = getUrlParam('ProjectId'); //获取传值ProjectId(仓库ProjectId)
|
||||
//初始化界面
|
||||
$(function()
|
||||
{
|
||||
initTableData();
|
||||
ininPager();
|
||||
initForm();
|
||||
});
|
||||
|
||||
//防止表单提交重复
|
||||
function initForm()
|
||||
{
|
||||
$('#buildingFM').form({
|
||||
onSubmit: function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//title:'单元列表',
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
//checkOnSelect : false,
|
||||
url:'<%=path %>/building/findBy.action?pageSize=' + initPageSize+'&ProjectId='+depotID,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'Name',width:180},
|
||||
{ title: '备注',field: 'Remark',width:180},
|
||||
{ title: '启用',field: 'Enabled',width:180},
|
||||
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
var rowInfo = rec.Id + 'AaBb' + rec.Name+ 'AaBb' + rec.Remark+ 'AaBb' + rec.Enabled;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editBuilding(\'' + rowInfo + '\');"/> <a onclick="editBuilding(\'' + 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="deleteBuilding('+ rec.Id +');"/> <a onclick="deleteBuilding('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a> ';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
toolbar:[
|
||||
{
|
||||
id:'addBuilding',
|
||||
text:'增加',
|
||||
iconCls:'icon-add',
|
||||
handler:function()
|
||||
{
|
||||
addBuilding();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'deleteBuilding',
|
||||
text:'删除',
|
||||
iconCls:'icon-remove',
|
||||
handler:function()
|
||||
{
|
||||
batDeleteBuilding();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
{
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function(event)
|
||||
{
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode||e.which||e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if(k == "13"&&(obj.id=="Name"||obj.id=="Remark"))
|
||||
{
|
||||
$("#saveBuilding").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if(k == "13"&&(obj.id=="searchName" ))
|
||||
{
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//分页信息处理
|
||||
function ininPager()
|
||||
{
|
||||
try
|
||||
{
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize)
|
||||
{
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
showBuildingDetails(pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
//删除单元信息
|
||||
function deleteBuilding(buildingID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此单元信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/building/delete.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
buildingID : buildingID,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除单元信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除单元信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除单元
|
||||
function batDeleteBuilding()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('删除提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条单元信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i ++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
//alert(row[i].id);
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/building/batchDelete.action",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
buildingIDs : ids,
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
var msg = tipInfo.showModel.msgTip;
|
||||
if(msg == '成功')
|
||||
{
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除单元信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除单元信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var buildingID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgBuilding = "";
|
||||
|
||||
function addBuilding()
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#buildingFM').form('clear');
|
||||
$('#buildingDlg').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();
|
||||
|
||||
orgBuilding = "";
|
||||
buildingID = 0;
|
||||
url = '<%=path %>/building/create.action';
|
||||
}
|
||||
|
||||
//保存信息
|
||||
$("#saveBuilding").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
if(!$('#buildingFM').form('validate'))
|
||||
return;
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
ProjectId : depotID,
|
||||
Name : $.trim($("#Name").val()),
|
||||
Remark : $.trim($("#Remark").val()),
|
||||
Enabled : $("#Enabled").is(':checked'),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$('#buildingDlg').dialog('close');
|
||||
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showBuildingDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存单元信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存单元信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editBuilding(buildingTotalInfo)
|
||||
{
|
||||
var buildingInfo = buildingTotalInfo.split("AaBb");
|
||||
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$("#Name").val(buildingInfo[1]);
|
||||
$("#Remark").val(buildingInfo[2]);
|
||||
$("#Enabled").attr("checked",buildingInfo[3]=='true'?true:false);
|
||||
|
||||
//orgBuilding = buildingInfo[1];
|
||||
$('#buildingDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑单元信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
buildingID = buildingInfo[0];
|
||||
//焦点在名称输入框==定焦在输入文字后面
|
||||
$("#Name").val("").focus().val(buildingInfo[1]);
|
||||
url = '<%=path %>/building/update.action?buildingID=' + buildingInfo[0];
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click:function()
|
||||
{
|
||||
showBuildingDetails(1,initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber:1,
|
||||
pageSize:initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function showBuildingDetails(pageNo,pageSize)
|
||||
{
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/building/findBy.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
ProjectId:depotID,
|
||||
Name:$.trim($("#searchName").val()),
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (data)
|
||||
{
|
||||
$("#tableData").datagrid('loadData',data);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click:function(){
|
||||
$("#searchName").val("");
|
||||
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -320,10 +320,10 @@
|
||||
{ title: '颜色',field: 'Color',width:40},
|
||||
{ title: '单位',field: 'Unit',width:50},
|
||||
{ title: '零售价',field: 'RetailPrice',width:50},
|
||||
{ title: '最低售价',field: 'LowPrice',width:50},
|
||||
{ title: '预设售价一',field: 'PresetPriceOne',width:80},
|
||||
{ title: '预设售价二',field: 'PresetPriceTwo',width:80},
|
||||
{ title: '备注',field: 'Remark',width:120},
|
||||
{ title: '最低售价',field: 'LowPrice',width:70},
|
||||
{ title: '预设售价一',field: 'PresetPriceOne',width:70},
|
||||
{ title: '预设售价二',field: 'PresetPriceTwo',width:70},
|
||||
{ title: '备注',field: 'Remark',width:110},
|
||||
{ title: '操作',field: 'op',align:"center",width:120,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -8,7 +8,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>甲供入库</title>
|
||||
<title>其它入库</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</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:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -63,7 +53,7 @@
|
||||
</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>
|
||||
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -80,15 +70,27 @@
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>供应商:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||
</td>
|
||||
<td>采购人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仓管员:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<td>结算方式:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="SettlementWay" id="SettlementWay" style="width:120px;">
|
||||
<option value="现金">现金</option>
|
||||
<option value="记账">记账</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
@@ -96,17 +98,11 @@
|
||||
<td>单据号:</td>
|
||||
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -122,7 +118,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -130,15 +126,24 @@
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="OperTimeShow"></span>
|
||||
</td>
|
||||
<td>仓管员:</td>
|
||||
<td>供应商:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="WareHousePersonIdShow"></span>
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td>采购人:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仓管员:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="WareHousePersonIdShow"></span>
|
||||
</td>
|
||||
<td>结算方式:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="SettlementWayShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
@@ -147,17 +152,11 @@
|
||||
<td style="padding:5px">
|
||||
<span id="NumberShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -372,7 +371,7 @@
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//title:'甲供入库列表',
|
||||
//title:'其它入库列表',
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
@@ -399,8 +398,7 @@
|
||||
{ title: '入库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:300},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -411,7 +409,7 @@
|
||||
+ 'AaBb' + rec.ReAuditPersonName+ 'AaBb' + rec.Reason;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="editDepotHead(\'' + rowInfo + '\');"/> <a onclick="showDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">查看</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + rowInfo + '\');"/> <a onclick="showDepotHead(\'' + 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="editDepotHead(\'' + rowInfo + '\');"/> <a onclick="editDepotHead(\'' + 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="deleteDepotHead('+ rec.Id +');"/> <a onclick="deleteDepotHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
@@ -437,25 +435,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -466,7 +445,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -487,8 +466,8 @@
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 5,
|
||||
pageList: [5,10,15],
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialId',width:230,
|
||||
@@ -506,6 +485,7 @@
|
||||
}
|
||||
},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150},
|
||||
{ title: '图片',field: 'Img',editor:'validatebox',width:110},
|
||||
]],
|
||||
@@ -547,7 +527,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -568,12 +548,13 @@
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 5,
|
||||
pageList: [5,10,15],
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialName',width:230},
|
||||
{ title: '数量',field: 'OperNumber',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150},
|
||||
{ title: '图片',field: 'Img',width:110},
|
||||
]],
|
||||
@@ -631,10 +612,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
//删除甲供入库信息
|
||||
//删除其它入库信息
|
||||
function deleteDepotHead(depotHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此甲供入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除此其它入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -655,12 +636,12 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除甲供入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它入库信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除甲供入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它入库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -668,7 +649,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除甲供入库
|
||||
//批量删除其它入库
|
||||
function batDeleteDepotHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
@@ -679,7 +660,7 @@
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条甲供入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条其它入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -713,12 +694,12 @@
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除甲供入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它入库信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除甲供入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它入库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -737,14 +718,14 @@
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#depotHeadFM').form('clear');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加甲供入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加其它入库信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#Number").val("").focus();
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -763,11 +744,14 @@
|
||||
async : false,
|
||||
data: ({
|
||||
Type:"入库",
|
||||
SubType:"甲供",
|
||||
SubType:"其它",
|
||||
ProjectId : $.trim($("#ProjectId").val()),
|
||||
Number : $.trim($("#Number").val()),
|
||||
OperTime: $("#OperTime").val(),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
WareHousePersonId: $.trim($("#WareHousePersonId").val()),
|
||||
SettlementWay: $.trim($("#SettlementWay").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
@@ -786,6 +770,7 @@
|
||||
accept(depotHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#depotHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
@@ -794,14 +779,14 @@
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存甲供入库信息失败,请稍后重试!'
|
||||
msg: '保存其它入库信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存甲供入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('提示','保存其它入库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -830,12 +815,12 @@
|
||||
$("#Remark").val(depotHeadInfo[9]);
|
||||
|
||||
//orgDepotHead = depotHeadInfo[1];
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑甲供入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑其它入库信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -853,11 +838,11 @@
|
||||
$("#RemarkShow").text(depotHeadInfo[9]);
|
||||
var audit=(depotHeadInfo[14]!="undefined"&&depotHeadInfo[15]!="undefined"&&depotHeadInfo[14]!=""&&depotHeadInfo[15]!="")?" 撤审人:"+depotHeadInfo[14]+" 撤审原因:"+depotHeadInfo[15]:"";
|
||||
audit="<span style='color:red;'>"+audit+"</span>";
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看甲供入库信息'+audit);
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看其它入库信息'+audit);
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -893,7 +878,7 @@
|
||||
data: ({
|
||||
ProjectId:$.trim($("#searchProjectId").val()),
|
||||
Type:"入库",
|
||||
SubType:"甲供",
|
||||
SubType:"其它",
|
||||
State:$.trim($("#searchState").val()),
|
||||
Number:$.trim($("#searchNumber").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
@@ -924,130 +909,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条甲供入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条甲供入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -8,7 +8,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>报废出库</title>
|
||||
<title>其它出库</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</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:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -63,7 +53,7 @@
|
||||
</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>
|
||||
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -80,8 +70,10 @@
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;"></td>
|
||||
<td>客户:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;"></td>
|
||||
</tr>
|
||||
@@ -101,9 +93,9 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -119,7 +111,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -127,8 +119,10 @@
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="OperTimeShow"></span>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td>客户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
</td>
|
||||
@@ -150,9 +144,9 @@
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -286,7 +280,7 @@
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
url: "<%=path%>/supplier/findBySelect_cus.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
@@ -367,7 +361,7 @@
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//title:'报废出库列表',
|
||||
//title:'其它出库列表',
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
@@ -394,8 +388,7 @@
|
||||
{ title: '出库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:300},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -431,25 +424,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -460,7 +434,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -500,6 +474,7 @@
|
||||
}
|
||||
},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150},
|
||||
{ title: '图片',field: 'Img',editor:'validatebox',width:110},
|
||||
]],
|
||||
@@ -541,7 +516,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -568,6 +543,7 @@
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialName',width:230},
|
||||
{ title: '数量',field: 'OperNumber',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150},
|
||||
{ title: '图片',field: 'Img',width:110},
|
||||
]],
|
||||
@@ -625,10 +601,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
//删除报废出库信息
|
||||
//删除其它出库信息
|
||||
function deleteDepotHead(depotHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此报废出库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除此其它出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -649,12 +625,12 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除报废出库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它出库信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除报废出库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它出库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -662,7 +638,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除报废出库
|
||||
//批量删除其它出库
|
||||
function batDeleteDepotHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
@@ -673,7 +649,7 @@
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条报废出库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条其它出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -707,12 +683,12 @@
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除报废出库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它出库信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除报废出库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除其它出库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -731,14 +707,14 @@
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#depotHeadFM').form('clear');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加报废出库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加其它出库信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#Number").val("").focus();
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -757,11 +733,14 @@
|
||||
async : false,
|
||||
data: ({
|
||||
Type:"出库",
|
||||
SubType:"报废",
|
||||
SubType:"其它",
|
||||
ProjectId : $.trim($("#ProjectId").val()),
|
||||
Number : $.trim($("#Number").val()),
|
||||
OperTime: $("#OperTime").val(),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
WareHousePersonId: $.trim($("#WareHousePersonId").val()),
|
||||
SettlementWay: $.trim($("#SettlementWay").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
@@ -789,14 +768,14 @@
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存报废出库信息失败,请稍后重试!'
|
||||
msg: '保存其它出库信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存报废出库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('提示','保存其它出库信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -825,12 +804,12 @@
|
||||
$("#Remark").val(depotHeadInfo[9]);
|
||||
|
||||
//orgDepotHead = depotHeadInfo[1];
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑报废出库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑其它出库信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -846,11 +825,11 @@
|
||||
$("#WareHousePersonIdShow").text(depotHeadInfo[13]);
|
||||
$("#SettlementWayShow").text(depotHeadInfo[8]);
|
||||
$("#RemarkShow").text(depotHeadInfo[9]);
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看报废出库信息');
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看其它出库信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -886,7 +865,7 @@
|
||||
data: ({
|
||||
ProjectId:$.trim($("#searchProjectId").val()),
|
||||
Type:"出库",
|
||||
SubType:"报废",
|
||||
SubType:"其它",
|
||||
State:$.trim($("#searchState").val()),
|
||||
Number:$.trim($("#searchNumber").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
@@ -917,130 +896,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条报废出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条报废出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -35,8 +35,8 @@
|
||||
<select name="searchType" id="searchType" style="width:230px;">
|
||||
<option value="">全部</option>
|
||||
<option value="仓管员">仓管员</option>
|
||||
<option value="采购人">采购人</option>
|
||||
<option value="领料人">领料人</option>
|
||||
<option value="采购员">采购员</option>
|
||||
<option value="财务员">财务员</option>
|
||||
</select>
|
||||
</td>
|
||||
<td> </td>
|
||||
@@ -71,8 +71,8 @@
|
||||
<select name="Type" id="Type" style="width:230px;">
|
||||
<option value="">请选择</option>
|
||||
<option value="仓管员">仓管员</option>
|
||||
<option value="采购人">采购人</option>
|
||||
<option value="领料人">领料人</option>
|
||||
<option value="采购员">采购员</option>
|
||||
<option value="财务员">财务员</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -8,7 +8,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>租赁入库</title>
|
||||
<title>采购退货</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</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:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -63,7 +53,7 @@
|
||||
</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>
|
||||
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -84,14 +74,23 @@
|
||||
<td style="padding:5px">
|
||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;"></td>
|
||||
<td>采购人:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仓管员:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>结算方式:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="SettlementWay" id="SettlementWay" style="width:120px;">
|
||||
<option value="现金">现金</option>
|
||||
<option value="记账">记账</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
@@ -99,13 +98,11 @@
|
||||
<td>单据号:</td>
|
||||
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -121,7 +118,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -133,8 +130,9 @@
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td>采购人:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -142,6 +140,10 @@
|
||||
<td style="padding:5px">
|
||||
<span id="WareHousePersonIdShow"></span>
|
||||
</td>
|
||||
<td>结算方式:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="SettlementWayShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
@@ -150,13 +152,11 @@
|
||||
<td style="padding:5px">
|
||||
<span id="NumberShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -371,7 +371,7 @@
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//title:'租赁入库列表',
|
||||
//title:'采购退货列表',
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
@@ -398,8 +398,7 @@
|
||||
{ title: '入库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:300},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -410,7 +409,7 @@
|
||||
+ 'AaBb' + rec.ReAuditPersonName+ 'AaBb' + rec.Reason;
|
||||
if(1 == value)
|
||||
{
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="editDepotHead(\'' + rowInfo + '\');"/> <a onclick="showDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">查看</a> ';
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + rowInfo + '\');"/> <a onclick="showDepotHead(\'' + 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="editDepotHead(\'' + rowInfo + '\');"/> <a onclick="editDepotHead(\'' + 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="deleteDepotHead('+ rec.Id +');"/> <a onclick="deleteDepotHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
|
||||
}
|
||||
@@ -436,25 +435,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -465,7 +445,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -486,8 +466,8 @@
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 5,
|
||||
pageList: [5,10,15],
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialId',width:230,
|
||||
@@ -506,7 +486,6 @@
|
||||
},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',editor:'validatebox',width:50},
|
||||
{ title: '运杂费',field: 'Incidentals',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150},
|
||||
{ title: '图片',field: 'Img',editor:'validatebox',width:110},
|
||||
]],
|
||||
@@ -548,7 +527,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -569,14 +548,13 @@
|
||||
striped : true,
|
||||
//loadFilter: pagerFilter,
|
||||
onClickRow: onClickRow,
|
||||
pageSize: 5,
|
||||
pageList: [5,10,15],
|
||||
pageSize: 50,
|
||||
pageList: [50,100,150],
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialName',width:230},
|
||||
{ title: '数量',field: 'OperNumber',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',width:50},
|
||||
{ title: '运杂费',field: 'Incidentals',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150},
|
||||
{ title: '图片',field: 'Img',width:110},
|
||||
]],
|
||||
@@ -634,10 +612,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
//删除租赁入库信息
|
||||
//删除采购退货信息
|
||||
function deleteDepotHead(depotHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此租赁入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除此采购退货信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -658,12 +636,12 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除租赁入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除采购退货信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除租赁入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除采购退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -671,7 +649,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除租赁入库
|
||||
//批量删除采购退货
|
||||
function batDeleteDepotHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
@@ -682,7 +660,7 @@
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条租赁入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条采购退货信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -716,12 +694,12 @@
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除租赁入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除采购退货信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除租赁入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除采购退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -740,14 +718,14 @@
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#depotHeadFM').form('clear');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加租赁入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加采购退货信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#Number").val("").focus();
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -765,8 +743,8 @@
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
Type:"入库",
|
||||
SubType:"租赁",
|
||||
Type:"出库",
|
||||
SubType:"采购退货",
|
||||
ProjectId : $.trim($("#ProjectId").val()),
|
||||
Number : $.trim($("#Number").val()),
|
||||
OperTime: $("#OperTime").val(),
|
||||
@@ -801,14 +779,14 @@
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存租赁入库信息失败,请稍后重试!'
|
||||
msg: '保存采购退货信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存租赁入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('提示','保存采购退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -837,12 +815,12 @@
|
||||
$("#Remark").val(depotHeadInfo[9]);
|
||||
|
||||
//orgDepotHead = depotHeadInfo[1];
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑租赁入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑采购退货信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -860,11 +838,11 @@
|
||||
$("#RemarkShow").text(depotHeadInfo[9]);
|
||||
var audit=(depotHeadInfo[14]!="undefined"&&depotHeadInfo[15]!="undefined"&&depotHeadInfo[14]!=""&&depotHeadInfo[15]!="")?" 撤审人:"+depotHeadInfo[14]+" 撤审原因:"+depotHeadInfo[15]:"";
|
||||
audit="<span style='color:red;'>"+audit+"</span>";
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看租赁入库信息'+audit);
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看采购退货信息'+audit);
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -899,8 +877,8 @@
|
||||
dataType: "json",
|
||||
data: ({
|
||||
ProjectId:$.trim($("#searchProjectId").val()),
|
||||
Type:"入库",
|
||||
SubType:"租赁",
|
||||
Type:"出库",
|
||||
SubType:"采购退货",
|
||||
State:$.trim($("#searchState").val()),
|
||||
Number:$.trim($("#searchNumber").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
@@ -931,130 +909,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条租赁入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条租赁入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -43,16 +43,6 @@
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:60px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -110,9 +100,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -128,7 +118,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -164,9 +154,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -409,7 +399,6 @@
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '状态',field: 'State',width:50},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -446,25 +435,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -475,7 +445,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -557,7 +527,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -754,8 +724,8 @@
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -849,8 +819,8 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -872,7 +842,7 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -939,130 +909,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条采购入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条采购入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -8,7 +8,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>回收入库</title>
|
||||
<title>销售退货</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</td>
|
||||
<td>入库时间:</td>
|
||||
<td>出库时间:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -63,7 +53,7 @@
|
||||
</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>
|
||||
|
||||
@@ -72,23 +62,26 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td>入库时间:</td>
|
||||
<td>出库时间:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
|
||||
</td>
|
||||
<td>客户:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仓管员:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
|
||||
@@ -97,16 +90,12 @@
|
||||
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -122,23 +111,27 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
<td>入库时间:</td>
|
||||
<td>出库时间:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="OperTimeShow"></span>
|
||||
</td>
|
||||
<td>仓管员:</td>
|
||||
<td>客户:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="WareHousePersonIdShow"></span>
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:50px;"></td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仓管员:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="WareHousePersonIdShow"></span>
|
||||
</td>
|
||||
<td>备注:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="RemarkShow"></span>
|
||||
@@ -148,16 +141,12 @@
|
||||
<span id="NumberShow"></span>
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -291,7 +280,7 @@
|
||||
function initSupplier()
|
||||
{
|
||||
$('#OrganId').combobox({
|
||||
url: "<%=path%>/supplier/findBySelect_sup.action",
|
||||
url: "<%=path%>/supplier/findBySelect_cus.action",
|
||||
valueField:'id',
|
||||
textField:'supplier'
|
||||
});
|
||||
@@ -372,7 +361,7 @@
|
||||
function initTableData()
|
||||
{
|
||||
$('#tableData').datagrid({
|
||||
//title:'回收入库列表',
|
||||
//title:'销售退货列表',
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height:heightInfo,
|
||||
@@ -396,11 +385,10 @@
|
||||
columns:[[
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '单据号',field: 'Number',width:100},
|
||||
{ title: '入库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '出库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:300},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -436,25 +424,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -465,7 +434,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -505,6 +474,7 @@
|
||||
}
|
||||
},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',editor:'validatebox',width:50},
|
||||
{ title: '备注',field: 'Remark',editor:'validatebox',width:150},
|
||||
{ title: '图片',field: 'Img',editor:'validatebox',width:110},
|
||||
]],
|
||||
@@ -546,7 +516,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -573,6 +543,7 @@
|
||||
{ field: 'Id',width:35,align:"center",checkbox:true},
|
||||
{ title: '名称',field: 'MaterialName',width:230},
|
||||
{ title: '数量',field: 'OperNumber',width:50},
|
||||
{ title: '单价',field: 'UnitPrice',width:50},
|
||||
{ title: '备注',field: 'Remark',width:150},
|
||||
{ title: '图片',field: 'Img',width:110},
|
||||
]],
|
||||
@@ -630,10 +601,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
//删除回收入库信息
|
||||
//删除销售退货信息
|
||||
function deleteDepotHead(depotHeadID)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除此回收入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除此销售退货信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -654,12 +625,12 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除回收入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除销售退货信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除回收入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除销售退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -667,7 +638,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//批量删除回收入库
|
||||
//批量删除销售退货
|
||||
function batDeleteDepotHead()
|
||||
{
|
||||
var row = $('#tableData').datagrid('getChecked');
|
||||
@@ -678,7 +649,7 @@
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条回收入库信息吗?',function(r)
|
||||
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条销售退货信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
@@ -712,12 +683,12 @@
|
||||
$(":checkbox").attr("checked",false);
|
||||
}
|
||||
else
|
||||
$.messager.alert('删除提示','删除回收入库信息失败,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除销售退货信息失败,请稍后再试!','error');
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('删除提示','删除回收入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('删除提示','删除销售退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -736,14 +707,14 @@
|
||||
{
|
||||
$("#clientIp").val('<%=clientIp %>');
|
||||
$('#depotHeadFM').form('clear');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加回收入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加销售退货信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
$("#Number").val("").focus();
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -762,11 +733,14 @@
|
||||
async : false,
|
||||
data: ({
|
||||
Type:"入库",
|
||||
SubType:"回收",
|
||||
SubType:"销售退货",
|
||||
ProjectId : $.trim($("#ProjectId").val()),
|
||||
Number : $.trim($("#Number").val()),
|
||||
OperTime: $("#OperTime").val(),
|
||||
OrganId: $('#OrganId').combobox('getValue'),
|
||||
HandsPersonId: $.trim($("#HandsPersonId").val()),
|
||||
WareHousePersonId: $.trim($("#WareHousePersonId").val()),
|
||||
SettlementWay: $.trim($("#SettlementWay").val()),
|
||||
Remark: $.trim($("#Remark").val()),
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
@@ -785,6 +759,7 @@
|
||||
accept(depotHeadID); //修改
|
||||
}
|
||||
|
||||
|
||||
$('#depotHeadDlg').dialog('close');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
@@ -793,14 +768,14 @@
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '保存回收入库信息失败,请稍后重试!'
|
||||
msg: '保存销售退货信息失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','保存回收入库信息异常,请稍后再试!','error');
|
||||
$.messager.alert('提示','保存销售退货信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -829,12 +804,12 @@
|
||||
$("#Remark").val(depotHeadInfo[9]);
|
||||
|
||||
//orgDepotHead = depotHeadInfo[1];
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑回收入库信息');
|
||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑销售退货信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -850,11 +825,11 @@
|
||||
$("#WareHousePersonIdShow").text(depotHeadInfo[13]);
|
||||
$("#SettlementWayShow").text(depotHeadInfo[8]);
|
||||
$("#RemarkShow").text(depotHeadInfo[9]);
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看回收入库信息');
|
||||
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/> 查看销售退货信息');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -890,7 +865,7 @@
|
||||
data: ({
|
||||
ProjectId:$.trim($("#searchProjectId").val()),
|
||||
Type:"入库",
|
||||
SubType:"回收",
|
||||
SubType:"销售退货",
|
||||
State:$.trim($("#searchState").val()),
|
||||
Number:$.trim($("#searchNumber").val()),
|
||||
BeginTime:$("#searchBeginTime").val(),
|
||||
@@ -921,130 +896,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条回收入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条回收入库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -29,29 +29,19 @@
|
||||
<tr>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td>单据号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
|
||||
</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:80px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>状态:</td>
|
||||
<td>
|
||||
<select name="searchState" id="searchState" style="width:100px;">
|
||||
<option value="">全部</option>
|
||||
<option value="草稿">草稿</option>
|
||||
<option value="待审核">待审核</option>
|
||||
<option value="未通过">未通过</option>
|
||||
<option value="已生效">已生效</option>
|
||||
</select>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -72,7 +62,7 @@
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
|
||||
</td>
|
||||
@@ -103,9 +93,9 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -121,7 +111,7 @@
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td>店 面:</td>
|
||||
<td>仓 库:</td>
|
||||
<td style="padding:5px;width:120px;">
|
||||
<span id="ProjectIdShow"></span>
|
||||
</td>
|
||||
@@ -154,9 +144,9 @@
|
||||
<td style="padding:5px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>材料列表:</td>
|
||||
<td>商品列表:</td>
|
||||
<td colspan="7">
|
||||
<!-- 材料列表table -->
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -398,8 +388,7 @@
|
||||
{ title: '出库时间 ',field: 'OperTime',width:100},
|
||||
{ title: '创建时间',field: 'CreateTime',width:100},
|
||||
{ title: '操作员',field: 'OperPersonName',width:100},
|
||||
{ title: '备注',field: 'Remark',width:200},
|
||||
{ title: '状态',field: 'State',width:100},
|
||||
{ title: '备注',field: 'Remark',width:100},
|
||||
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
|
||||
{
|
||||
var str = '';
|
||||
@@ -435,25 +424,6 @@
|
||||
{
|
||||
batDeleteDepotHead();
|
||||
}
|
||||
},
|
||||
"-",
|
||||
{
|
||||
id:'submitDepotHead',
|
||||
text:'提交审核',
|
||||
iconCls:'icon-ok',
|
||||
handler:function()
|
||||
{
|
||||
submitDepotHead();
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'cancelDepotHead',
|
||||
text:'废弃',
|
||||
iconCls:'icon-no',
|
||||
handler:function()
|
||||
{
|
||||
cancelDepotHead();
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadError:function()
|
||||
@@ -464,7 +434,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据-材料列表-编辑状态
|
||||
//初始化表格数据-商品列表-编辑状态
|
||||
function initTableData_material()
|
||||
{
|
||||
$('#materialData').datagrid({
|
||||
@@ -546,7 +516,7 @@
|
||||
}
|
||||
|
||||
|
||||
//初始化表格数据-材料列表-查看状态
|
||||
//初始化表格数据-商品列表-查看状态
|
||||
function initTableData_material_show()
|
||||
{
|
||||
$('#materialDataShow').datagrid({
|
||||
@@ -743,8 +713,8 @@
|
||||
|
||||
orgDepotHead = "";
|
||||
depotHeadID = 0;
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/create.action';
|
||||
}
|
||||
|
||||
@@ -838,8 +808,8 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
|
||||
initTableData_material(); //材料列表
|
||||
reject(); //撤销下、刷新材料列表
|
||||
initTableData_material(); //商品列表
|
||||
reject(); //撤销下、刷新商品列表
|
||||
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
|
||||
}
|
||||
|
||||
@@ -859,7 +829,7 @@
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
|
||||
depotHeadID = depotHeadInfo[0];
|
||||
initTableData_material_show(); //材料列表-查看状态
|
||||
initTableData_material_show(); //商品列表-查看状态
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
@@ -926,130 +896,6 @@
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
//提交审核
|
||||
function submitDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('提交审核提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('提交审核确认','确定要提交选中的' + row.length + '条销售出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"待审核",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"提交审核成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '提交审核失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','提交审核异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//废弃
|
||||
function cancelDepotHead()
|
||||
{
|
||||
var row = $("#tableData").datagrid("getChecked");
|
||||
if(row.length == 0)
|
||||
{
|
||||
$.messager.alert('废弃提示','没有记录被选中!','info');
|
||||
return;
|
||||
}
|
||||
if(row.length > 0)
|
||||
{
|
||||
$.messager.confirm('废弃确认','确定要废弃选中的' + row.length + '条销售出库信息吗?',function(r)
|
||||
{
|
||||
if (r)
|
||||
{
|
||||
var ids = "";
|
||||
for(var i = 0;i < row.length; i++)
|
||||
{
|
||||
if(i == row.length-1)
|
||||
{
|
||||
ids += row[i].Id;
|
||||
break;
|
||||
}
|
||||
ids += row[i].Id + ",";
|
||||
}
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: "<%=path %>/depotHead/submit.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
depotHeadIDs: ids,
|
||||
State:"废弃",
|
||||
clientIp:'<%=clientIp %>'
|
||||
}),
|
||||
success: function (tipInfo)
|
||||
{
|
||||
if(tipInfo)
|
||||
{
|
||||
$.messager.alert('提示',"废弃成功!",'info');
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showDepotHeadDetails(opts.pageNumber,opts.pageSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.messager.show({
|
||||
title: '错误提示',
|
||||
msg: '废弃失败,请稍后重试!'
|
||||
});
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function()
|
||||
{
|
||||
$.messager.alert('提示','废弃异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//结束编辑
|
||||
var editIndex = undefined;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
@@ -74,7 +74,7 @@
|
||||
else
|
||||
{
|
||||
$("#passwordLabel").empty().append("原始密码 ");
|
||||
$("#newPassword").empty().append("密 码 ");
|
||||
$("#newPassword").empty().append("密 码 ");
|
||||
$("#repasswordLabel").empty().append("确认密码 ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@page import="com.jsh.util.common.Tools"%>
|
||||
<%@page import="com.jsh.util.Tools"%>
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
|
||||
Reference in New Issue
Block a user