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
3bbcef49
Commit
3bbcef49
authored
Sep 11, 2017
by
季圣华
Browse files
单据列表增加商品信息展开功能
parent
7ec6035d
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/action/materials/DepotHeadAction.java
View file @
3bbcef49
...
...
@@ -427,6 +427,7 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
item
.
put
(
"payType"
,
depotHead
.
getPayType
()==
null
?
""
:
depotHead
.
getPayType
());
item
.
put
(
"Status"
,
depotHead
.
getStatus
());
item
.
put
(
"Remark"
,
depotHead
.
getRemark
());
item
.
put
(
"MaterialsList"
,
findMaterialsListByHeaderId
(
depotHead
.
getId
()));
item
.
put
(
"op"
,
1
);
dataArray
.
add
(
item
);
}
...
...
@@ -684,6 +685,25 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>回写查询信息结果异常"
,
e
);
}
}
public
String
findMaterialsListByHeaderId
(
Long
headerId
){
String
allReturn
=
""
;
PageUtil
pageUtil
=
new
PageUtil
();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
try
{
depotHeadService
.
findMaterialsListByHeaderId
(
pageUtil
,
headerId
);
allReturn
=
pageUtil
.
getPageList
().
toString
();
allReturn
=
allReturn
.
substring
(
1
,
allReturn
.
length
()-
1
);
if
(
allReturn
.
equals
(
"null"
)){
allReturn
=
""
;
}
}
catch
(
JshException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>查找信息异常"
,
e
);
}
return
allReturn
;
}
/**
* 拼接搜索条件
...
...
src/main/java/com/jsh/dao/materials/DepotHeadDAO.java
View file @
3bbcef49
...
...
@@ -115,4 +115,13 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
}
pageUtil
.
setPageList
(
query
.
list
());
}
@SuppressWarnings
(
"unchecked"
)
public
void
findMaterialsListByHeaderId
(
PageUtil
pageUtil
,
Long
headerId
)
throws
JshException
{
StringBuffer
queryString
=
new
StringBuffer
();
queryString
.
append
(
"select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model,' ',jsh_material.Mfrs)) as mName from jsh_depotitem inner join jsh_material "
+
" on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId ="
+
headerId
);
Query
query
=
this
.
getHibernateTemplate
().
getSessionFactory
().
getCurrentSession
().
createSQLQuery
(
queryString
+
SearchConditionUtil
.
getCondition
(
pageUtil
.
getAdvSearch
()));
pageUtil
.
setPageList
(
query
.
list
());
}
}
src/main/java/com/jsh/dao/materials/DepotHeadIDAO.java
View file @
3bbcef49
...
...
@@ -20,5 +20,7 @@ public interface DepotHeadIDAO extends BaseIDAO<DepotHead>
public
void
findInDetail
(
PageUtil
pageUtil
,
String
beginTime
,
String
endTime
,
String
type
,
Long
pid
,
String
dids
)
throws
JshException
;
public
void
findInOutMaterialCount
(
PageUtil
pageUtil
,
String
beginTime
,
String
endTime
,
String
type
,
Long
pid
,
String
dids
)
throws
JshException
;
public
void
findMaterialsListByHeaderId
(
PageUtil
pageUtil
,
Long
headerId
)
throws
JshException
;
}
src/main/java/com/jsh/service/materials/DepotHeadIService.java
View file @
3bbcef49
...
...
@@ -20,4 +20,6 @@ public interface DepotHeadIService extends BaseIService<DepotHead>
public
void
findInDetail
(
PageUtil
pageUtil
,
String
beginTime
,
String
endTime
,
String
type
,
Long
pid
,
String
dids
)
throws
JshException
;
public
void
findInOutMaterialCount
(
PageUtil
pageUtil
,
String
beginTime
,
String
endTime
,
String
type
,
Long
pid
,
String
dids
)
throws
JshException
;
public
void
findMaterialsListByHeaderId
(
PageUtil
pageUtil
,
Long
headerId
)
throws
JshException
;
}
src/main/java/com/jsh/service/materials/DepotHeadService.java
View file @
3bbcef49
...
...
@@ -45,4 +45,8 @@ public class DepotHeadService extends BaseService<DepotHead> implements DepotHea
public
void
findInOutMaterialCount
(
PageUtil
pageUtil
,
String
beginTime
,
String
endTime
,
String
type
,
Long
pid
,
String
dids
)
throws
JshException
{
depotHeadDao
.
findInOutMaterialCount
(
pageUtil
,
beginTime
,
endTime
,
type
,
pid
,
dids
);
}
public
void
findMaterialsListByHeaderId
(
PageUtil
pageUtil
,
Long
headerId
)
throws
JshException
{
depotHeadDao
.
findMaterialsListByHeaderId
(
pageUtil
,
headerId
);
}
}
src/main/webapp/js/pages/materials/in_out.js
View file @
3bbcef49
...
...
@@ -486,15 +486,10 @@
singleSelect : true,
collapsible:false,
selectOnCheck:false,
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
//url: path + '/depotHead/findBy.action?pageSize=' + initPageSize,
pagination: true,
//交替出现背景
striped : true,
//loadFilter: pagerFilter,
pageSize
:
5
,
pageSize: 10,
pageList: initPageNum,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
...
...
@@ -537,9 +532,16 @@
{ title: '单据备注',field: 'Remark',width:100},
{ title: '创建时间',field: 'CreateTime',width:130}
]],
view: detailview,
detailFormatter: function(rowIndex, rowData){
return '<table><tr>' +
'<td style="border:0">' +
'<p>商品信息: ' + rowData.MaterialsList + '</p>' +
'</td>' +
'</tr></table>';
},
toolbar:tableToolBar,
onLoadError
:
function
()
{
onLoadError:function() {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
}
...
...
src/main/webapp/pages/materials/purchase_in_list.jsp
View file @
3bbcef49
...
...
@@ -19,6 +19,7 @@
<script
src=
"
<%=
path
%>
/js/jquery-1.8.0.min.js"
></script>
<script
src=
"
<%=
path
%>
/js/easyui-1.3.5/jquery.easyui.min.js"
></script>
<script
src=
"
<%=
path
%>
/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"
></script>
<script
src=
"
<%=
path
%>
/js/datagrid-detailview.js"
></script>
<script
src=
"
<%=
path
%>
/js/My97DatePicker/WdatePicker.js"
></script>
<script
src=
"
<%=
path
%>
/js/common/common.js"
></script>
<script
src=
"
<%=
path
%>
/js/pages/materials/in_out.js"
></script>
...
...
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