新增账户流水功能
This commit is contained in:
@@ -51,6 +51,10 @@
|
||||
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="结算账户列表" iconCls="icon-list" collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true" modal="true" collapsible="false" closable="true">
|
||||
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
@@ -88,11 +92,18 @@
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ title: '名称',field: 'name',width:100},
|
||||
{ title: '编号', field: 'serialNo',width:100,align:"center"},
|
||||
{ title: '期初金额', field: 'initialAmount',width:100,align:"center"},
|
||||
{ title: '本月发生额', field: 'thisMonthAmount',width:100,align:"center"},
|
||||
{ title: '当前余额', field: 'currentAmount',width:100,align:"center"}
|
||||
{ title: '名称',field: 'name',width:100},
|
||||
{ title: '编号', field: 'serialNo',width:150,align:"center"},
|
||||
{ title: '期初金额', field: 'initialAmount',width:100,align:"center"},
|
||||
{ title: '本月发生额', field: 'thisMonthAmount',width:100,align:"center"},
|
||||
{ title: '当前余额', field: 'currentAmount',width:100,align:"center"},
|
||||
{ title: '操作', field: 'op',width:100,align:"center",formatter:function(value,rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id;
|
||||
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/> <a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">明细</a> ';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError:function()
|
||||
{
|
||||
@@ -184,6 +195,93 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showAccountInOutList(accountInfo){
|
||||
var info = accountInfo.split("AaBb");
|
||||
var accountId = info[0];
|
||||
$('#accountDetailListDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水');
|
||||
$(".window-mask").css({ width: webW ,height: webH});
|
||||
initAccountDetailData(accountId);
|
||||
getAccountInOutList(accountId,1,initPageSize);
|
||||
ininAccountDetailPager(accountId);
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initAccountDetailData(accountId){
|
||||
$('#accountTableData').datagrid({
|
||||
height:heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate:false,
|
||||
//选中单行
|
||||
singleSelect : true,
|
||||
collapsible:false,
|
||||
selectOnCheck:false,
|
||||
//单击行是否选中
|
||||
checkOnSelect : false,
|
||||
//交替出现背景
|
||||
striped : true,
|
||||
pagination: true,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns:[[
|
||||
{ title: '单据编号',field: 'number',width:150},
|
||||
{ title: '类型', field: 'type',width:100},
|
||||
{ title: '单位信息', field: 'supplierName',width:150},
|
||||
{ title: '金额', field: 'changeAmount',width:80},
|
||||
{ title: '入库出库日期',field: 'operTime',width:180}
|
||||
]],
|
||||
onLoadError:function() {
|
||||
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//分页信息处理
|
||||
function ininAccountDetailPager(accountId){
|
||||
try {
|
||||
var opts = $("#accountTableData").datagrid('options');
|
||||
var pager = $("#accountTableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
getAccountInOutList(accountId,pageNum,pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
|
||||
}
|
||||
}
|
||||
|
||||
function getAccountInOutList(accountId,pageNo,pageSize){
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: "<%=path %>/account/findAccountInOutList.action",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
accountID: accountId,
|
||||
pageNo:pageNo,
|
||||
pageSize:pageSize
|
||||
}),
|
||||
success: function (res) {
|
||||
$("#accountTableData").datagrid('loadData',res);
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function() {
|
||||
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click",function(){
|
||||
|
||||
Reference in New Issue
Block a user