Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warehouse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡懿
warehouse
Commits
4f5d9282
Commit
4f5d9282
authored
Feb 24, 2023
by
yyq1988
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码页面增加批量打印和单独打印
parent
819acd0f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
225 additions
and
106 deletions
+225
-106
LodopFuncs.js
src/main/webapp/static/common/js/LodopFuncs.js
+6
-1
goodsList.js
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
+14
-8
qrCodeList.js
...ain/webapp/webpage/modules/warehouse/qrcode/qrCodeList.js
+93
-15
qrCodeList.jsp
...in/webapp/webpage/modules/warehouse/qrcode/qrCodeList.jsp
+112
-82
No files found.
src/main/webapp/static/common/js/LodopFuncs.js
View file @
4f5d9282
...
...
@@ -134,7 +134,12 @@ function getLodop(oOBJECT, oEMBED) {
strAlertMessage
=
strLodop7Install_ARM
;
else
strAlertMessage
=
strCLodopInstallA
+
(
CLodopIsLocal
?
strCLodopInstallB
:
""
);
document
.
body
.
innerHTML
=
strAlertMessage
+
strInstallOK
+
document
.
body
.
innerHTML
;
layer
.
open
({
type
:
1
,
title
:
'系统提示'
,
area
:
[
'500'
,
'300'
],
content
:
"<div style='padding: 24px;'>"
+
strAlertMessage
+
strInstallOK
+
"</div>"
})
return
;
}
else
{
if
(
isLinuxX86
&&
LODOP
.
CVERSION
<
"7.0.4.3"
)
...
...
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
4f5d9282
...
...
@@ -297,15 +297,21 @@ $(document).ready(function() {
function
printQr
(
id
)
{
jp
.
loading
(
'loading...'
);
try
{
initLodop
();
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
400
,
600
,
0
)
createAllPage
(
list
);
LODOP
.
PREVIEW
();
if
(
!
LODOP
){
initLodop
();
}
if
(
LODOP
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
400
,
600
,
0
)
createAllPage
(
list
);
LODOP
.
PREVIEW
();
jp
.
close
();
})
}
else
{
jp
.
close
();
}
)
}
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
...
...
src/main/webapp/webpage/modules/warehouse/qrcode/qrCodeList.js
View file @
4f5d9282
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
var
LODOP
;
$
(
document
).
ready
(
function
()
{
$
(
'#qrCodeTable'
).
bootstrapTable
({
...
...
@@ -83,28 +84,63 @@ $(document).ready(function() {
columns
:
[{
checkbox
:
true
}
},{
field
:
'goodsInfo.goods.batchNum'
,
title
:
'批次号'
,
sortable
:
true
,
sortName
:
'goodsInfo.goods.batchNum'
}
,{
field
:
'code'
,
title
:
'物资编码'
,
sortable
:
true
,
sortName
:
'code'
}
,{
field
:
'url'
,
title
:
'二维码存储路径'
,
},{
field
:
'goodsInfo.name'
,
title
:
'物资名称'
,
sortable
:
true
,
sortName
:
'url'
sortName
:
'goodsInfo.name'
},{
field
:
'goodsInfo.type.name'
,
title
:
'类型'
,
sortable
:
true
,
sortName
:
'goodsInfo.type.name'
},{
field
:
'goodsInfo.model'
,
title
:
'型号'
,
sortable
:
true
,
sortName
:
'goodsInfo.model'
},{
field
:
'goodsInfo.amount'
,
title
:
'单价'
,
sortable
:
true
,
sortName
:
'goodsInfo.amount'
}
,{
field
:
'
remarks
'
,
title
:
'
备注信息
'
,
field
:
'
url
'
,
title
:
'
二维码
'
,
sortable
:
true
,
sortName
:
'remarks'
}
]
sortName
:
'url'
,
formatter
:
function
(){
return
'<a class="view-qrcode">查看</a>'
},
events
:
{
'click .view-qrcode'
:
function
(
e
,
value
){
jp
.
showPic
(
'${ctxPath}'
+
value
)
}
}
},{
title
:
'操作'
,
formatter
:
function
(){
return
'<a class="print">打印</a>'
},
events
:
{
'click .print'
:
function
(
e
,
value
,
row
){
onPrint
(
row
);
}
}
}
]
});
...
...
@@ -117,7 +153,7 @@ $(document).ready(function() {
$
(
'#qrCodeTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
$
(
'#remove'
).
prop
(
'disabled'
,
!
$
(
'#qrCodeTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#remove
,#printAll
'
).
prop
(
'disabled'
,
!
$
(
'#qrCodeTable'
).
bootstrapTable
(
'getSelections'
).
length
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#qrCodeTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
});
...
...
@@ -226,5 +262,46 @@ $(document).ready(function() {
}
jp
.
go
(
"${ctx}/warehouse/qrcode/qrCode/form/view?id="
+
id
);
}
function
initLodop
(){
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
}
function
onPrint
(
row
)
{
var
list
=
[];
if
(
!
row
){
list
=
$
(
"#qrCodeTable"
).
bootstrapTable
(
'getSelections'
);
}
else
{
list
=
[
row
];
}
jp
.
loading
(
'loading...'
);
try
{
if
(
!
LODOP
){
initLodop
();
}
if
(
LODOP
){
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
SET_PRINT_PAGESIZE
(
1
,
400
,
600
,
0
)
createAllPage
(
list
);
LODOP
.
PREVIEW
();
jp
.
close
();
}
else
{
jp
.
close
();
}
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
jp
.
close
();
})
}
}
function
createAllPage
(
list
){
if
(
!
list
){
return
;
}
list
.
forEach
(
function
(
item
){
LODOP
.
NewPage
();
var
imgUrl
=
"${ctxPath}/"
+
item
.
url
;
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img width='150' border='0' src='"
+
imgUrl
+
"' />"
);
})
}
<
/script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/qrcode/qrCodeList.jsp
View file @
4f5d9282
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<head>
<title>
二维码管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"qrCodeList.js"
%
>
<title>
二维码管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"qrCodeList.js"
%
>
<script>
var
projectName
=
"${ctxStatic}"
;
</script>
<script
type=
"text/javascript"
src=
"${ctxStatic}/common/js/LodopFuncs.js"
></script>
<object
id=
"LODOP_OB"
classid=
"clsid:2105C259-1E0C-4534-8141-A753534CB4CA"
width=
0
height=
0
>
<embed
id=
"LODOP_EM"
type=
"application/x-print-lodop"
width=
0
height=
0
></embed>
</object>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
二维码列表
</h3>
</div>
<div
class=
"panel-body"
>
<!-- 搜索 -->
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<form:form
id=
"searchForm"
modelAttribute=
"qrCode"
class=
"form form-horizontal well clearfix"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<label
class=
"label-item single-overflow pull-left"
title=
"物资编码:"
>
物资编码:
</label>
<form:input
path=
"code"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<div
style=
"margin-top:26px"
>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</div>
</div>
</form:form>
</div>
</div>
<!-- 工具栏 -->
<div
id=
"toolbar"
>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:add"
>
<button
id=
"add"
class=
"btn btn-primary"
onclick=
"add()"
>
<i
class=
"glyphicon glyphicon-plus"
></i>
新建
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:edit"
>
<button
id=
"edit"
class=
"btn btn-success"
disabled
onclick=
"edit()"
>
<i
class=
"glyphicon glyphicon-edit"
></i>
修改
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:del"
>
<button
id=
"remove"
class=
"btn btn-danger"
disabled
onclick=
"deleteAll()"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
删除
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:import"
>
<button
id=
"btnImport"
class=
"btn btn-info"
><i
class=
"fa fa-folder-open-o"
></i>
导入
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:export"
>
<button
id=
"export"
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-excel-o"
></i>
导出
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:view"
>
<button
id=
"view"
class=
"btn btn-default"
disabled
onclick=
"view()"
>
<i
class=
"fa fa-search-plus"
></i>
查看
</button>
</shiro:hasPermission>
</div>
<!-- 表格 -->
<table
id=
"qrCodeTable"
data-toolbar=
"#toolbar"
></table>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
二维码列表
</h3>
</div>
<div
class=
"panel-body"
>
<!-- context menu -->
<ul
id=
"context-menu"
class=
"dropdown-menu"
>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:view"
>
<li
data-item=
"view"
><a>
查看
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:edit"
>
<li
data-item=
"edit"
><a>
编辑
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:del"
>
<li
data-item=
"delete"
><a>
删除
</a></li>
</shiro:hasPermission>
<li
data-item=
"action1"
><a>
取消
</a></li>
</ul>
</div>
</div>
</div>
<!-- 搜索 -->
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<form:form
id=
"searchForm"
modelAttribute=
"qrCode"
class=
"form form-horizontal well clearfix"
>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<label
class=
"label-item single-overflow pull-left"
title=
"物资编码:"
>
物资编码:
</label>
<form:input
path=
"code"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<label
class=
"label-item single-overflow pull-left"
title=
"物资编码:"
>
物资名称:
</label>
<form:input
path=
"goodsInfo.name"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<label
class=
"label-item single-overflow pull-left"
title=
"类型:"
>
类型:
</label>
<sys:treeselect
id=
"type"
name=
"goodsInfo.type.id"
value=
"${qrCode.goodsInfo.type.id}"
labelName=
"goodsInfo.type.name"
labelValue=
"${qrCode.goodsInfo.type.name}"
title=
"类型"
url=
"/warehouse/materialtype/materialType/treeData"
cssClass=
"form-control"
allowClear=
"true"
allowSearch=
"true"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<label
class=
"label-item single-overflow pull-left"
title=
"型号:"
>
型号:
</label>
<form:input
path=
"goodsInfo.model"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<label
class=
"label-item single-overflow pull-left"
title=
"批次号:"
>
批次号:
</label>
<form:input
path=
"goodsInfo.goods.batchNum"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-2"
>
<div
style=
"margin-top:26px"
>
<a
id=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-search"
></i>
查询
</a>
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</div>
</div>
</form:form>
</div>
</div>
<!-- 工具栏 -->
<div
id=
"toolbar"
>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:add"
>
<button
id=
"add"
class=
"btn btn-primary"
onclick=
"add()"
>
<i
class=
"glyphicon glyphicon-plus"
></i>
新建
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:edit"
>
<button
id=
"edit"
class=
"btn btn-success"
disabled
onclick=
"edit()"
>
<i
class=
"glyphicon glyphicon-edit"
></i>
修改
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:del"
>
<button
id=
"remove"
class=
"btn btn-danger"
disabled
onclick=
"deleteAll()"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
删除
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:import"
>
<button
id=
"btnImport"
class=
"btn btn-info"
><i
class=
"fa fa-folder-open-o"
></i>
导入
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:export"
>
<button
id=
"export"
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-excel-o"
></i>
导出
</button>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:view"
>
<button
id=
"view"
class=
"btn btn-default"
disabled
onclick=
"view()"
>
<i
class=
"fa fa-search-plus"
></i>
查看
</button>
</shiro:hasPermission>
<button
id=
"printAll"
class=
"btn btn-primary"
disabled
onclick=
"onPrint()"
>
<i
class=
"fa fa-search-plus"
></i>
批量打印
</button>
</div>
<!-- 表格 -->
<table
id=
"qrCodeTable"
data-toolbar=
"#toolbar"
></table>
<!-- context menu -->
<ul
id=
"context-menu"
class=
"dropdown-menu"
>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:view"
>
<li
data-item=
"view"
><a>
查看
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:edit"
>
<li
data-item=
"edit"
><a>
编辑
</a></li>
</shiro:hasPermission>
<shiro:hasPermission
name=
"warehouse:qrcode:qrCode:del"
>
<li
data-item=
"delete"
><a>
删除
</a></li>
</shiro:hasPermission>
<li
data-item=
"action1"
><a>
取消
</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
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