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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
22 deletions
+180
-22
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
+6
-0
qrCodeList.js
...ain/webapp/webpage/modules/warehouse/qrcode/qrCodeList.js
+88
-10
qrCodeList.jsp
...in/webapp/webpage/modules/warehouse/qrcode/qrCodeList.jsp
+38
-8
No files found.
src/main/java/com/jeeplus/modules/warehouse/qrcode/mapper/xml/QrCodeMapper.xml
View file @
b42ddc07
...
@@ -13,11 +13,23 @@
...
@@ -13,11 +13,23 @@
a.update_by AS "updateBy.id",
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.update_date AS "updateDate",
a.remarks AS "remarks",
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>
<sql
id=
"qrCodeJoins"
>
<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>
</sql>
...
@@ -38,7 +50,25 @@
...
@@ -38,7 +50,25 @@
a.del_flag = #{DEL_FLAG_NORMAL}
a.del_flag = #{DEL_FLAG_NORMAL}
${dataScope}
${dataScope}
<if
test=
"code != null and code != ''"
>
<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>
</if>
</where>
</where>
<choose>
<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;
...
@@ -5,6 +5,9 @@ package com.jeeplus.modules.warehouse.qrcode.service;
import
java.util.List
;
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.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -31,6 +34,12 @@ public class QrCodeService extends CrudService<QrCodeMapper, QrCode> {
...
@@ -31,6 +34,12 @@ public class QrCodeService extends CrudService<QrCodeMapper, QrCode> {
}
}
public
Page
<
QrCode
>
findPage
(
Page
<
QrCode
>
page
,
QrCode
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
);
return
super
.
findPage
(
page
,
qrCode
);
}
}
...
...
src/main/webapp/static/common/js/LodopFuncs.js
View file @
b42ddc07
...
@@ -134,7 +134,12 @@ function getLodop(oOBJECT, oEMBED) {
...
@@ -134,7 +134,12 @@ function getLodop(oOBJECT, oEMBED) {
strAlertMessage
=
strLodop7Install_ARM
;
strAlertMessage
=
strLodop7Install_ARM
;
else
else
strAlertMessage
=
strCLodopInstallA
+
(
CLodopIsLocal
?
strCLodopInstallB
:
""
);
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
;
return
;
}
else
{
}
else
{
if
(
isLinuxX86
&&
LODOP
.
CVERSION
<
"7.0.4.3"
)
if
(
isLinuxX86
&&
LODOP
.
CVERSION
<
"7.0.4.3"
)
...
...
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
b42ddc07
...
@@ -297,7 +297,10 @@ $(document).ready(function() {
...
@@ -297,7 +297,10 @@ $(document).ready(function() {
function
printQr
(
id
)
{
function
printQr
(
id
)
{
jp
.
loading
(
'loading...'
);
jp
.
loading
(
'loading...'
);
try
{
try
{
if
(
!
LODOP
){
initLodop
();
initLodop
();
}
if
(
LODOP
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
LODOP
.
PRINT_INIT
(
"打印货品"
);
LODOP
.
PRINT_INIT
(
"打印货品"
);
...
@@ -306,6 +309,9 @@ $(document).ready(function() {
...
@@ -306,6 +309,9 @@ $(document).ready(function() {
LODOP
.
PREVIEW
();
LODOP
.
PREVIEW
();
jp
.
close
();
jp
.
close
();
})
})
}
else
{
jp
.
close
();
}
}
catch
(
e
){
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
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"
%>
<%
@
page
contentType
=
"text/html;charset=UTF-8"
%>
<
script
>
<
script
>
var
LODOP
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'#qrCodeTable'
).
bootstrapTable
({
$
(
'#qrCodeTable'
).
bootstrapTable
({
...
@@ -83,26 +84,61 @@ $(document).ready(function() {
...
@@ -83,26 +84,61 @@ $(document).ready(function() {
columns
:
[{
columns
:
[{
checkbox
:
true
checkbox
:
true
},{
field
:
'goodsInfo.goods.batchNum'
,
title
:
'批次号'
,
sortable
:
true
,
sortName
:
'goodsInfo.goods.batchNum'
}
}
,{
,{
field
:
'code'
,
field
:
'code'
,
title
:
'物资编码'
,
title
:
'物资编码'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'code'
sortName
:
'code'
},{
field
:
'goodsInfo.name'
,
title
:
'物资名称'
,
sortable
:
true
,
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
:
'url'
,
field
:
'url'
,
title
:
'二维码
存储路径
'
,
title
:
'二维码'
,
sortable
:
true
,
sortable
:
true
,
sortName
:
'url'
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
);
}
}
}
,{
field
:
'remarks'
,
title
:
'备注信息'
,
sortable
:
true
,
sortName
:
'remarks'
}
}
]
]
...
@@ -117,7 +153,7 @@ $(document).ready(function() {
...
@@ -117,7 +153,7 @@ $(document).ready(function() {
$
(
'#qrCodeTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
$
(
'#qrCodeTable'
).
on
(
'check.bs.table uncheck.bs.table load-success.bs.table '
+
'check-all.bs.table uncheck-all.bs.table'
,
function
()
{
'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
);
$
(
'#view,#edit'
).
prop
(
'disabled'
,
$
(
'#qrCodeTable'
).
bootstrapTable
(
'getSelections'
).
length
!=
1
);
});
});
...
@@ -226,5 +262,46 @@ $(document).ready(function() {
...
@@ -226,5 +262,46 @@ $(document).ready(function() {
}
}
jp
.
go
(
"${ctx}/warehouse/qrcode/qrCode/form/view?id="
+
id
);
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>
<
/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"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<
%@
include
file=
"/webpage/include/taglib.jsp"
%
>
<html>
<html>
<head>
<head>
<title>
二维码管理
</title>
<title>
二维码管理
</title>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
>
<meta
name=
"decorator"
content=
"ani"
/>
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"qrCodeList.js"
%
>
<
%@
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>
</head>
<body>
<body>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"wrapper wrapper-content"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
二维码列表
</h3>
<h3
class=
"panel-title"
>
二维码列表
</h3>
...
@@ -21,14 +28,33 @@
...
@@ -21,14 +28,33 @@
<div
id=
"search-collapse"
class=
"collapse"
>
<div
id=
"search-collapse"
class=
"collapse"
>
<div
class=
"accordion-inner"
>
<div
class=
"accordion-inner"
>
<form:form
id=
"searchForm"
modelAttribute=
"qrCode"
class=
"form form-horizontal well clearfix"
>
<form:form
id=
"searchForm"
modelAttribute=
"qrCode"
class=
"form form-horizontal well clearfix"
>
<div
class=
"col-xs-12 col-sm-6 col-md-4
"
>
<div
class=
"col-xs-12 col-sm-6 col-md-2
"
>
<label
class=
"label-item single-overflow pull-left"
title=
"物资编码:"
>
物资编码:
</label>
<label
class=
"label-item single-overflow pull-left"
title=
"物资编码:"
>
物资编码:
</label>
<form:input
path=
"code"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
<form:input
path=
"code"
htmlEscape=
"false"
maxlength=
"64"
class=
" form-control"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6 col-md-4"
>
<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"
>
<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=
"search"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
<a
id=
"reset"
class=
"btn btn-primary btn-rounded btn-bordered btn-sm"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
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>
</div>
</div>
</form:form>
</form:form>
...
@@ -65,6 +91,9 @@
...
@@ -65,6 +91,9 @@
<i
class=
"fa fa-search-plus"
></i>
查看
<i
class=
"fa fa-search-plus"
></i>
查看
</button>
</button>
</shiro:hasPermission>
</shiro:hasPermission>
<button
id=
"printAll"
class=
"btn btn-primary"
disabled
onclick=
"onPrint()"
>
<i
class=
"fa fa-search-plus"
></i>
批量打印
</button>
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
...
@@ -85,6 +114,6 @@
...
@@ -85,6 +114,6 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</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