Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
f9e74777
Commit
f9e74777
authored
Jan 07, 2018
by
季圣华
Browse files
给账户流水列表增加'余额'的显示
parent
eef4f1c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/action/basic/AccountAction.java
View file @
f9e74777
...
@@ -339,14 +339,14 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -339,14 +339,14 @@ public class AccountAction extends BaseAction<AccountModel>
item
.
put
(
"name"
,
account
.
getName
());
item
.
put
(
"name"
,
account
.
getName
());
item
.
put
(
"serialNo"
,
account
.
getSerialNo
());
item
.
put
(
"serialNo"
,
account
.
getSerialNo
());
item
.
put
(
"initialAmount"
,
account
.
getInitialAmount
());
item
.
put
(
"initialAmount"
,
account
.
getInitialAmount
());
String
monthTime
=
Tools
.
getCurrentMonth
();
String
timeStr
=
Tools
.
getCurrentMonth
();
Double
thisMonthAmount
=
getAccountSum
(
account
.
getId
(),
month
Time
)
+
getAccountSumByHead
(
account
.
getId
(),
month
Time
)
+
getAccountSumByDetail
(
account
.
getId
(),
month
Time
)
+
getManyAccountSum
(
account
.
getId
(),
month
Time
);
Double
thisMonthAmount
=
getAccountSum
(
account
.
getId
(),
timeStr
,
"
month
"
)
+
getAccountSumByHead
(
account
.
getId
(),
timeStr
,
"
month
"
)
+
getAccountSumByDetail
(
account
.
getId
(),
timeStr
,
"
month
"
)
+
getManyAccountSum
(
account
.
getId
(),
timeStr
,
"
month
"
);
String
thisMonthAmountFmt
=
"0"
;
String
thisMonthAmountFmt
=
"0"
;
if
(
thisMonthAmount
!=
0
){
if
(
thisMonthAmount
!=
0
){
thisMonthAmountFmt
=
df
.
format
(
thisMonthAmount
);
thisMonthAmountFmt
=
df
.
format
(
thisMonthAmount
);
}
}
item
.
put
(
"thisMonthAmount"
,
thisMonthAmountFmt
);
//本月发生额
item
.
put
(
"thisMonthAmount"
,
thisMonthAmountFmt
);
//本月发生额
Double
currentAmount
=
getAccountSum
(
account
.
getId
(),
""
)
+
getAccountSumByHead
(
account
.
getId
(),
""
)
+
getAccountSumByDetail
(
account
.
getId
(),
""
)
+
getManyAccountSum
(
account
.
getId
(),
""
)
+
account
.
getInitialAmount
();
Double
currentAmount
=
getAccountSum
(
account
.
getId
(),
""
,
"month"
)
+
getAccountSumByHead
(
account
.
getId
(),
""
,
"month"
)
+
getAccountSumByDetail
(
account
.
getId
(),
""
,
"month"
)
+
getManyAccountSum
(
account
.
getId
(),
""
,
"month"
)
+
account
.
getInitialAmount
();
String
currentAmountFmt
=
df
.
format
(
currentAmount
);
String
currentAmountFmt
=
df
.
format
(
currentAmount
);
item
.
put
(
"currentAmount"
,
currentAmountFmt
);
//当前余额
item
.
put
(
"currentAmount"
,
currentAmountFmt
);
//当前余额
item
.
put
(
"isDefault"
,
account
.
getIsDefault
());
//是否默认
item
.
put
(
"isDefault"
,
account
.
getIsDefault
());
//是否默认
...
@@ -373,13 +373,13 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -373,13 +373,13 @@ public class AccountAction extends BaseAction<AccountModel>
* @param id
* @param id
* @return
* @return
*/
*/
public
Double
getAccountSum
(
Long
id
,
String
monthTim
e
){
public
Double
getAccountSum
(
Long
id
,
String
timeStr
,
String
typ
e
){
Double
accountSum
=
0.0
;
Double
accountSum
=
0.0
;
try
{
try
{
PageUtil
<
DepotHead
>
pageUtil
=
new
PageUtil
<
DepotHead
>();
PageUtil
<
DepotHead
>
pageUtil
=
new
PageUtil
<
DepotHead
>();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setAdvSearch
(
getCondition_getSum
(
id
,
monthTime
));
pageUtil
.
setAdvSearch
(
getCondition_getSum
(
id
,
timeStr
,
type
));
depotHeadService
.
find
(
pageUtil
);
depotHeadService
.
find
(
pageUtil
);
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
if
(
dataList
!=
null
){
if
(
dataList
!=
null
){
...
@@ -399,13 +399,13 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -399,13 +399,13 @@ public class AccountAction extends BaseAction<AccountModel>
* @param id
* @param id
* @return
* @return
*/
*/
public
Double
getAccountSumByHead
(
Long
id
,
String
monthTim
e
){
public
Double
getAccountSumByHead
(
Long
id
,
String
timeStr
,
String
typ
e
){
Double
accountSum
=
0.0
;
Double
accountSum
=
0.0
;
try
{
try
{
PageUtil
<
AccountHead
>
pageUtil
=
new
PageUtil
<
AccountHead
>();
PageUtil
<
AccountHead
>
pageUtil
=
new
PageUtil
<
AccountHead
>();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setAdvSearch
(
getCondition_getSumByHead
(
id
,
monthTim
e
));
pageUtil
.
setAdvSearch
(
getCondition_getSumByHead
(
id
,
timeStr
,
typ
e
));
accountHeadService
.
find
(
pageUtil
);
accountHeadService
.
find
(
pageUtil
);
List
<
AccountHead
>
dataList
=
pageUtil
.
getPageList
();
List
<
AccountHead
>
dataList
=
pageUtil
.
getPageList
();
if
(
dataList
!=
null
){
if
(
dataList
!=
null
){
...
@@ -425,13 +425,13 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -425,13 +425,13 @@ public class AccountAction extends BaseAction<AccountModel>
* @param id
* @param id
* @return
* @return
*/
*/
public
Double
getAccountSumByDetail
(
Long
id
,
String
monthTim
e
){
public
Double
getAccountSumByDetail
(
Long
id
,
String
timeStr
,
String
typ
e
){
Double
accountSum
=
0.0
;
Double
accountSum
=
0.0
;
try
{
try
{
PageUtil
<
AccountHead
>
pageUtil
=
new
PageUtil
<
AccountHead
>();
PageUtil
<
AccountHead
>
pageUtil
=
new
PageUtil
<
AccountHead
>();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setAdvSearch
(
getCondition_getSumByHead
(
monthTim
e
));
pageUtil
.
setAdvSearch
(
getCondition_getSumByHead
(
timeStr
,
typ
e
));
accountHeadService
.
find
(
pageUtil
);
accountHeadService
.
find
(
pageUtil
);
List
<
AccountHead
>
dataList
=
pageUtil
.
getPageList
();
List
<
AccountHead
>
dataList
=
pageUtil
.
getPageList
();
if
(
dataList
!=
null
){
if
(
dataList
!=
null
){
...
@@ -468,13 +468,13 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -468,13 +468,13 @@ public class AccountAction extends BaseAction<AccountModel>
* @param id
* @param id
* @return
* @return
*/
*/
public
Double
getManyAccountSum
(
Long
id
,
String
monthTim
e
){
public
Double
getManyAccountSum
(
Long
id
,
String
timeStr
,
String
typ
e
){
Double
accountSum
=
0.0
;
Double
accountSum
=
0.0
;
try
{
try
{
PageUtil
<
DepotHead
>
pageUtil
=
new
PageUtil
<
DepotHead
>();
PageUtil
<
DepotHead
>
pageUtil
=
new
PageUtil
<
DepotHead
>();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setCurPage
(
0
);
pageUtil
.
setAdvSearch
(
getCondition_getManyAccountSum
(
id
,
monthTim
e
));
pageUtil
.
setAdvSearch
(
getCondition_getManyAccountSum
(
id
,
timeStr
,
typ
e
));
depotHeadService
.
find
(
pageUtil
);
depotHeadService
.
find
(
pageUtil
);
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
if
(
dataList
!=
null
){
if
(
dataList
!=
null
){
...
@@ -547,6 +547,7 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -547,6 +547,7 @@ public class AccountAction extends BaseAction<AccountModel>
pageUtil
.
setPageSize
(
model
.
getPageSize
());
pageUtil
.
setPageSize
(
model
.
getPageSize
());
pageUtil
.
setCurPage
(
model
.
getPageNo
());
pageUtil
.
setCurPage
(
model
.
getPageNo
());
Long
accountId
=
model
.
getAccountID
();
Long
accountId
=
model
.
getAccountID
();
Double
initialAmount
=
model
.
getInitialAmount
();
try
{
try
{
accountService
.
findAccountInOutList
(
pageUtil
,
accountId
);
accountService
.
findAccountInOutList
(
pageUtil
,
accountId
);
List
dataList
=
pageUtil
.
getPageList
();
List
dataList
=
pageUtil
.
getPageList
();
...
@@ -563,6 +564,10 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -563,6 +564,10 @@ public class AccountAction extends BaseAction<AccountModel>
item
.
put
(
"type"
,
arr
[
1
]);
//类型
item
.
put
(
"type"
,
arr
[
1
]);
//类型
item
.
put
(
"supplierName"
,
arr
[
2
]);
//单位信息
item
.
put
(
"supplierName"
,
arr
[
2
]);
//单位信息
item
.
put
(
"changeAmount"
,
arr
[
3
]);
//金额
item
.
put
(
"changeAmount"
,
arr
[
3
]);
//金额
String
timeStr
=
arr
[
4
].
toString
();
Double
balance
=
getAccountSum
(
accountId
,
timeStr
,
"date"
)
+
getAccountSumByHead
(
accountId
,
timeStr
,
"date"
)
+
getAccountSumByDetail
(
accountId
,
timeStr
,
"date"
)
+
getManyAccountSum
(
accountId
,
timeStr
,
"date"
)
+
initialAmount
;
item
.
put
(
"balance"
,
balance
);
//余额
item
.
put
(
"operTime"
,
arr
[
4
]);
//入库出库日期
item
.
put
(
"operTime"
,
arr
[
4
]);
//入库出库日期
item
.
put
(
"aList"
,
arr
[
5
]);
//多账户的id列表
item
.
put
(
"aList"
,
arr
[
5
]);
//多账户的id列表
item
.
put
(
"amList"
,
arr
[
6
]);
//多账户的金额列表
item
.
put
(
"amList"
,
arr
[
6
]);
//多账户的金额列表
...
@@ -616,7 +621,7 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -616,7 +621,7 @@ public class AccountAction extends BaseAction<AccountModel>
* 拼接搜索条件
* 拼接搜索条件
* @return
* @return
*/
*/
private
Map
<
String
,
Object
>
getCondition_getSum
(
Long
id
,
String
monthTim
e
)
private
Map
<
String
,
Object
>
getCondition_getSum
(
Long
id
,
String
timeStr
,
String
typ
e
)
{
{
/**
/**
* 拼接搜索条件
* 拼接搜索条件
...
@@ -624,9 +629,14 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -624,9 +629,14 @@ public class AccountAction extends BaseAction<AccountModel>
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"AccountId_n_eq"
,
id
);
condition
.
put
(
"AccountId_n_eq"
,
id
);
condition
.
put
(
"PayType_s_neq"
,
"预付款"
);
condition
.
put
(
"PayType_s_neq"
,
"预付款"
);
if
(!
monthTime
.
equals
(
""
)){
if
(!
timeStr
.
equals
(
""
)){
condition
.
put
(
"OperTime_s_gteq"
,
monthTime
+
"-01 00:00:00"
);
if
(
type
.
equals
(
"month"
)){
condition
.
put
(
"OperTime_s_lteq"
,
monthTime
+
"-31 00:00:00"
);
condition
.
put
(
"OperTime_s_gteq"
,
timeStr
+
"-01 00:00:00"
);
condition
.
put
(
"OperTime_s_lteq"
,
timeStr
+
"-31 00:00:00"
);
}
else
if
(
type
.
equals
(
"date"
)){
condition
.
put
(
"OperTime_s_lteq"
,
timeStr
);
}
}
}
return
condition
;
return
condition
;
}
}
...
@@ -635,16 +645,21 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -635,16 +645,21 @@ public class AccountAction extends BaseAction<AccountModel>
* 拼接搜索条件
* 拼接搜索条件
* @return
* @return
*/
*/
private
Map
<
String
,
Object
>
getCondition_getManyAccountSum
(
Long
id
,
String
monthTim
e
)
private
Map
<
String
,
Object
>
getCondition_getManyAccountSum
(
Long
id
,
String
timeStr
,
String
typ
e
)
{
{
/**
/**
* 拼接搜索条件
* 拼接搜索条件
*/
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"AccountIdList_s_like"
,
"\""
+
id
.
toString
()
+
"\""
);
condition
.
put
(
"AccountIdList_s_like"
,
"\""
+
id
.
toString
()
+
"\""
);
if
(!
monthTime
.
equals
(
""
)){
if
(!
timeStr
.
equals
(
""
)){
condition
.
put
(
"OperTime_s_gteq"
,
monthTime
+
"-01 00:00:00"
);
if
(
type
.
equals
(
"month"
)){
condition
.
put
(
"OperTime_s_lteq"
,
monthTime
+
"-31 00:00:00"
);
condition
.
put
(
"OperTime_s_gteq"
,
timeStr
+
"-01 00:00:00"
);
condition
.
put
(
"OperTime_s_lteq"
,
timeStr
+
"-31 00:00:00"
);
}
else
if
(
type
.
equals
(
"date"
)){
condition
.
put
(
"OperTime_s_lteq"
,
timeStr
);
}
}
}
return
condition
;
return
condition
;
}
}
...
@@ -653,16 +668,21 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -653,16 +668,21 @@ public class AccountAction extends BaseAction<AccountModel>
* 拼接搜索条件
* 拼接搜索条件
* @return
* @return
*/
*/
private
Map
<
String
,
Object
>
getCondition_getSumByHead
(
Long
id
,
String
monthTim
e
)
private
Map
<
String
,
Object
>
getCondition_getSumByHead
(
Long
id
,
String
timeStr
,
String
typ
e
)
{
{
/**
/**
* 拼接搜索条件
* 拼接搜索条件
*/
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"AccountId_n_eq"
,
id
);
condition
.
put
(
"AccountId_n_eq"
,
id
);
if
(!
monthTime
.
equals
(
""
)){
if
(!
timeStr
.
equals
(
""
)){
condition
.
put
(
"BillTime_s_gteq"
,
monthTime
+
"-01 00:00:00"
);
if
(
type
.
equals
(
"month"
))
{
condition
.
put
(
"BillTime_s_lteq"
,
monthTime
+
"-31 00:00:00"
);
condition
.
put
(
"BillTime_s_gteq"
,
timeStr
+
"-01 00:00:00"
);
condition
.
put
(
"BillTime_s_lteq"
,
timeStr
+
"-31 00:00:00"
);
}
else
if
(
type
.
equals
(
"date"
))
{
condition
.
put
(
"BillTime_s_lteq"
,
timeStr
);
}
}
}
return
condition
;
return
condition
;
}
}
...
@@ -671,15 +691,20 @@ public class AccountAction extends BaseAction<AccountModel>
...
@@ -671,15 +691,20 @@ public class AccountAction extends BaseAction<AccountModel>
* 拼接搜索条件
* 拼接搜索条件
* @return
* @return
*/
*/
private
Map
<
String
,
Object
>
getCondition_getSumByHead
(
String
monthTim
e
)
private
Map
<
String
,
Object
>
getCondition_getSumByHead
(
String
timeStr
,
String
typ
e
)
{
{
/**
/**
* 拼接搜索条件
* 拼接搜索条件
*/
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
if
(!
monthTime
.
equals
(
""
)){
if
(!
timeStr
.
equals
(
""
)){
condition
.
put
(
"BillTime_s_gteq"
,
monthTime
+
"-01 00:00:00"
);
if
(
type
.
equals
(
"month"
))
{
condition
.
put
(
"BillTime_s_lteq"
,
monthTime
+
"-31 00:00:00"
);
condition
.
put
(
"BillTime_s_gteq"
,
timeStr
+
"-01 00:00:00"
);
condition
.
put
(
"BillTime_s_lteq"
,
timeStr
+
"-31 00:00:00"
);
}
else
if
(
type
.
equals
(
"date"
))
{
condition
.
put
(
"BillTime_s_lteq"
,
timeStr
);
}
}
}
return
condition
;
return
condition
;
}
}
...
...
src/main/webapp/pages/manage/account.jsp
View file @
f9e74777
...
@@ -536,11 +536,12 @@
...
@@ -536,11 +536,12 @@
function
showAccountInOutList
(
accountInfo
){
function
showAccountInOutList
(
accountInfo
){
var
info
=
accountInfo
.
split
(
"
AaBb
"
);
var
info
=
accountInfo
.
split
(
"
AaBb
"
);
var
accountId
=
info
[
0
];
var
accountId
=
info
[
0
];
var
initialAmount
=
info
[
3
];
$
(
'
#accountDetailListDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
<%=
path
%>
/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水
'
);
$
(
'
#accountDetailListDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
<%=
path
%>
/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
initAccountDetailData
(
accountId
);
initAccountDetailData
(
accountId
);
getAccountInOutList
(
accountId
,
1
,
initPageSize
);
getAccountInOutList
(
accountId
,
initialAmount
,
1
,
initPageSize
);
ininAccountDetailPager
(
accountId
);
ininAccountDetailPager
(
accountId
,
initialAmount
);
}
}
//初始化表格数据
//初始化表格数据
...
@@ -584,6 +585,7 @@
...
@@ -584,6 +585,7 @@
}
}
}
}
},
},
{
title
:
'
余额
'
,
field
:
'
balance
'
,
width
:
80
},
{
title
:
'
入库出库日期
'
,
field
:
'
operTime
'
,
width
:
180
}
{
title
:
'
入库出库日期
'
,
field
:
'
operTime
'
,
width
:
180
}
]],
]],
onLoadError
:
function
()
{
onLoadError
:
function
()
{
...
@@ -594,7 +596,7 @@
...
@@ -594,7 +596,7 @@
}
}
//分页信息处理
//分页信息处理
function
ininAccountDetailPager
(
accountId
){
function
ininAccountDetailPager
(
accountId
,
initialAmount
){
try
{
try
{
var
opts
=
$
(
"
#accountTableData
"
).
datagrid
(
'
options
'
);
var
opts
=
$
(
"
#accountTableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#accountTableData
"
).
datagrid
(
'
getPager
'
);
var
pager
=
$
(
"
#accountTableData
"
).
datagrid
(
'
getPager
'
);
...
@@ -606,7 +608,7 @@
...
@@ -606,7 +608,7 @@
pageNumber
:
pageNum
,
pageNumber
:
pageNum
,
pageSize
:
pageSize
pageSize
:
pageSize
});
});
getAccountInOutList
(
accountId
,
pageNum
,
pageSize
);
getAccountInOutList
(
accountId
,
initialAmount
,
pageNum
,
pageSize
);
}
}
});
});
}
}
...
@@ -615,13 +617,14 @@
...
@@ -615,13 +617,14 @@
}
}
}
}
function
getAccountInOutList
(
accountId
,
pageNo
,
pageSize
){
function
getAccountInOutList
(
accountId
,
initialAmount
,
pageNo
,
pageSize
){
$
.
ajax
({
$
.
ajax
({
type
:
"
get
"
,
type
:
"
get
"
,
url
:
"
<%=
path
%>
/account/findAccountInOutList.action
"
,
url
:
"
<%=
path
%>
/account/findAccountInOutList.action
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
data
:
({
data
:
({
accountID
:
accountId
,
accountID
:
accountId
,
initialAmount
:
initialAmount
,
pageNo
:
pageNo
,
pageNo
:
pageNo
,
pageSize
:
pageSize
pageSize
:
pageSize
}),
}),
...
...
src/main/webapp/pages/reports/account_report.jsp
View file @
f9e74777
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
{
title
:
'
当前余额
'
,
field
:
'
currentAmount
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
当前余额
'
,
field
:
'
currentAmount
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
操作
'
,
field
:
'
op
'
,
width
:
100
,
align
:
"
center
"
,
formatter
:
function
(
value
,
rec
)
{
{
title
:
'
操作
'
,
field
:
'
op
'
,
width
:
100
,
align
:
"
center
"
,
formatter
:
function
(
value
,
rec
)
{
var
str
=
''
;
var
str
=
''
;
var
rowInfo
=
rec
.
id
;
var
rowInfo
=
rec
.
id
+
'
AaBb
'
+
rec
.
name
+
'
AaBb
'
+
rec
.
serialNo
+
'
AaBb
'
+
rec
.
initialAmount
+
'
AaBb
'
+
rec
.
currentAmount
;
str
+=
'
<img src="
<%=
path
%>
/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(
\'
'
+
rowInfo
+
'
\'
);"/> <a onclick="showAccountInOutList(
\'
'
+
rowInfo
+
'
\'
);" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>
'
;
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
;
return
str
;
}
}
...
@@ -199,11 +199,12 @@
...
@@ -199,11 +199,12 @@
function
showAccountInOutList
(
accountInfo
){
function
showAccountInOutList
(
accountInfo
){
var
info
=
accountInfo
.
split
(
"
AaBb
"
);
var
info
=
accountInfo
.
split
(
"
AaBb
"
);
var
accountId
=
info
[
0
];
var
accountId
=
info
[
0
];
var
initialAmount
=
info
[
3
];
$
(
'
#accountDetailListDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
<%=
path
%>
/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水
'
);
$
(
'
#accountDetailListDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
<%=
path
%>
/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
initAccountDetailData
(
accountId
);
initAccountDetailData
(
accountId
);
getAccountInOutList
(
accountId
,
1
,
initPageSize
);
getAccountInOutList
(
accountId
,
initialAmount
,
1
,
initPageSize
);
ininAccountDetailPager
(
accountId
);
ininAccountDetailPager
(
accountId
,
initialAmount
);
}
}
//初始化表格数据
//初始化表格数据
...
@@ -247,6 +248,7 @@
...
@@ -247,6 +248,7 @@
}
}
}
}
},
},
{
title
:
'
余额
'
,
field
:
'
balance
'
,
width
:
80
},
{
title
:
'
入库出库日期
'
,
field
:
'
operTime
'
,
width
:
180
}
{
title
:
'
入库出库日期
'
,
field
:
'
operTime
'
,
width
:
180
}
]],
]],
onLoadError
:
function
()
{
onLoadError
:
function
()
{
...
@@ -257,7 +259,7 @@
...
@@ -257,7 +259,7 @@
}
}
//分页信息处理
//分页信息处理
function
ininAccountDetailPager
(
accountId
){
function
ininAccountDetailPager
(
accountId
,
initialAmount
){
try
{
try
{
var
opts
=
$
(
"
#accountTableData
"
).
datagrid
(
'
options
'
);
var
opts
=
$
(
"
#accountTableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#accountTableData
"
).
datagrid
(
'
getPager
'
);
var
pager
=
$
(
"
#accountTableData
"
).
datagrid
(
'
getPager
'
);
...
@@ -269,7 +271,7 @@
...
@@ -269,7 +271,7 @@
pageNumber
:
pageNum
,
pageNumber
:
pageNum
,
pageSize
:
pageSize
pageSize
:
pageSize
});
});
getAccountInOutList
(
accountId
,
pageNum
,
pageSize
);
getAccountInOutList
(
accountId
,
initialAmount
,
pageNum
,
pageSize
);
}
}
});
});
}
}
...
@@ -278,13 +280,14 @@
...
@@ -278,13 +280,14 @@
}
}
}
}
function
getAccountInOutList
(
accountId
,
pageNo
,
pageSize
){
function
getAccountInOutList
(
accountId
,
initialAmount
,
pageNo
,
pageSize
){
$
.
ajax
({
$
.
ajax
({
type
:
"
get
"
,
type
:
"
get
"
,
url
:
"
<%=
path
%>
/account/findAccountInOutList.action
"
,
url
:
"
<%=
path
%>
/account/findAccountInOutList.action
"
,
dataType
:
"
json
"
,
dataType
:
"
json
"
,
data
:
({
data
:
({
accountID
:
accountId
,
accountID
:
accountId
,
initialAmount
:
initialAmount
,
pageNo
:
pageNo
,
pageNo
:
pageNo
,
pageSize
:
pageSize
pageSize
:
pageSize
}),
}),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment