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
b42ddc07
Commit
b42ddc07
authored
Feb 24, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yqdchina.com/huyi/warehouse
into zlt
parents
810f152b
4f5d9282
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
267 additions
and
109 deletions
+267
-109
QrCodeMapper.xml
...plus/modules/warehouse/qrcode/mapper/xml/QrCodeMapper.xml
+33
-3
QrCodeService.java
...eplus/modules/warehouse/qrcode/service/QrCodeService.java
+9
-0
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/java/com/jeeplus/modules/warehouse/qrcode/mapper/xml/QrCodeMapper.xml
View file @
b42ddc07
...
...
@@ -13,11 +13,23 @@
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
a.del_flag AS "delFlag"
a.del_flag AS "delFlag",
type.id AS "goodsInfo.type.id",
type.code AS "goodsInfo.type.code",
type.name AS "goodsInfo.type.name",
gi.NAME AS "goodsInfo.name",
gi.model AS "goodsInfo.model",
gi.amount AS "goodsInfo.amount",
gi.goods_id AS "goodsInfo.goods.id",
g.batch_num AS "goodsInfo.goods.batchNum"
</sql>
<sql
id=
"qrCodeJoins"
>
LEFT JOIN t_wh_goods_info gi ON a.goods_info_id = gi.id
LEFT JOIN t_wh_material_type type ON type.id = gi.type_id
LEFT JOIN t_wh_goods g ON g.id = gi.goods_id
</sql>
...
...
@@ -38,7 +50,25 @@
a.del_flag = #{DEL_FLAG_NORMAL}
${dataScope}
<if
test=
"code != null and code != ''"
>
AND a.code = #{code}
AND a.code like concat('%',#{code},'%')
</if>
<if
test=
"goodsInfo != null and goodsInfo.goods != null and goodsInfo.goods.batchNum != null and goodsInfo.goods.batchNum != ''"
>
AND g.batch_num = #{goodsInfo.goods.batchNum}
</if>
<if
test=
"goodsInfo != null and goodsInfo.name != null and goodsInfo.name != ''"
>
AND gi.name like concat('%',#{goodsInfo.name},'%')
</if>
<if
test=
"goodsInfo != null and goodsInfo.type != null and goodsInfo.type.id != null and goodsInfo.type.id != ''"
>
AND gi.type_id = #{goodsInfo.type.id}
</if>
<if
test=
"state != null and state != ''"
>
AND a.state = #{state}
</if>
<if
test=
"goodsInfo != null and goodsInfo.modelList != null and goodsInfo.modelList.size() != 0"
>
AND
<foreach
collection=
"goodsInfo.modelList"
item=
"model"
index=
"index"
separator=
" AND"
open=
"("
close=
")"
>
gi.model like concat('%',#{model},'%')
</foreach>
</if>
</where>
<choose>
...
...
src/main/java/com/jeeplus/modules/warehouse/qrcode/service/QrCodeService.java
View file @
b42ddc07
...
...
@@ -5,6 +5,9 @@ package com.jeeplus.modules.warehouse.qrcode.service;
import
java.util.List
;
import
com.jeeplus.common.utils.StringUtils
;
import
com.jeeplus.modules.warehouse.goods.entity.GoodsInfo
;
import
com.jeeplus.modules.warehouse.ikanalyzer.IKSegmenter
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -31,6 +34,12 @@ public class QrCodeService extends CrudService<QrCodeMapper, QrCode> {
}
public
Page
<
QrCode
>
findPage
(
Page
<
QrCode
>
page
,
QrCode
qrCode
)
{
GoodsInfo
goodsInfo
=
qrCode
.
getGoodsInfo
();
if
(
null
!=
goodsInfo
)
{
if
(
StringUtils
.
isNotBlank
(
goodsInfo
.
getModel
()))
{
goodsInfo
.
setModelList
(
IKSegmenter
.
splitStr
(
goodsInfo
.
getModel
(),
false
));
}
}
return
super
.
findPage
(
page
,
qrCode
);
}
...
...
src/main/webapp/static/common/js/LodopFuncs.js
View file @
b42ddc07
...
...
@@ -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 @
b42ddc07
...
...
@@ -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 @
b42ddc07
<%
@
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 @
b42ddc07
<
%@
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