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
e3b9dcca
Commit
e3b9dcca
authored
Jun 08, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yqdchina.com/huyi/warehouse
into zlt
parents
74aada4d
17be87a3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
180 additions
and
55 deletions
+180
-55
LedgerInfoMapper.xml
.../modules/warehouse/ledger/mapper/xml/LedgerInfoMapper.xml
+4
-1
DrawQrcodeUtil.java
...jeeplus/modules/warehouse/qrcode/util/DrawQrcodeUtil.java
+37
-15
anihead.jsp
src/main/webapp/webpage/include/anihead.jsp
+0
-4
goodsList.js
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
+20
-27
ledgerDetail.jsp
.../webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
+56
-3
materialRequisitionDetail.jsp
...rehouse/materialrequisition/materialRequisitionDetail.jsp
+26
-1
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+37
-4
No files found.
src/main/java/com/jeeplus/modules/warehouse/ledger/mapper/xml/LedgerInfoMapper.xml
View file @
e3b9dcca
...
...
@@ -30,7 +30,9 @@
shelves.name AS "shelves.name"
shelves.name AS "shelves.name",
qr.url AS "qr.url"
</sql>
<sql
id=
"ledgerInfoJoins"
>
...
...
@@ -38,6 +40,7 @@
LEFT JOIN t_wh_material_type type ON type.id = a.type_id
LEFT JOIN t_wh_ledger b ON b.id = a.ledger_id
LEFT JOIN t_wh_shelves shelves ON shelves.id = a.shelves_id
LEFT JOIN t_wh_qr qr ON a.qr_id = qr.id
</sql>
...
...
src/main/java/com/jeeplus/modules/warehouse/qrcode/util/DrawQrcodeUtil.java
View file @
e3b9dcca
...
...
@@ -252,12 +252,12 @@ public class DrawQrcodeUtil {
,
RenderingHints
.
VALUE_ALPHA_INTERPOLATION_QUALITY
);
g2
.
setRenderingHints
(
rh
);
Font
font
=
new
Font
(
"黑体"
,
Font
.
BOLD
,
1
6
*
qRcodeSize
.
getInitfontSize
());
Font
font
=
new
Font
(
"黑体"
,
Font
.
BOLD
,
1
2
*
qRcodeSize
.
getInitfontSize
());
g2
.
setFont
(
font
);
//设置字体:字体、字号、大小
g2
.
setColor
(
qRcodeSize
.
color
);
//设置背景颜色
// g2.setBackground(c);
int
contentX
=
qRcodeSize
.
getInitContentX
();
int
contentY
=
qRcodeSize
.
getInitContentY
()
+
20
0
;
int
contentY
=
qRcodeSize
.
getInitContentY
()
+
15
0
;
//写二维码
g2
.
drawImage
(
qrcodeImage
,
qRcodeSize
.
getQrcodeX
(),
qRcodeSize
.
getQrcodeY
(),
qRcodeSize
.
getQrcodeWidth
(),
qRcodeSize
.
getQrcodeHeight
(),
null
,
null
);
...
...
@@ -273,26 +273,48 @@ public class DrawQrcodeUtil {
//写入货品类型
String
contentTitle2
=
"货品类型:"
;
int
contentTitle2Width
=
g2
.
getFontMetrics
().
stringWidth
(
contentTitle2
);
g2
.
drawString
(
contentTitle2
,
contentX
,
contentY
+
200
);
String
typeName
=
formatContent
(
goodsInfo
.
getType
().
getName
(),
10
);
as
=
new
AttributedString
(
typeName
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
typeName
.
length
());
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle2Width
,
contentY
+
200
);
g2
.
drawString
(
contentTitle2
,
contentX
,
contentY
+
150
);
String
typeName
=
goodsInfo
.
getType
().
getName
();
if
(
typeName
.
length
()
>
15
)
{
String
str1
=
typeName
.
substring
(
0
,
9
);
str1
=
formatContent
(
str1
,
9
);
as
=
new
AttributedString
(
str1
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
str1
.
length
());
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle2Width
,
contentY
+
150
);
String
str2
=
typeName
.
substring
(
9
,
typeName
.
length
());
str2
=
formatContent
(
str2
,
9
);
as
=
new
AttributedString
(
str2
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
str2
.
length
());
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle2Width
,
contentY
+
300
);
}
else
{
typeName
=
formatContent
(
goodsInfo
.
getType
().
getName
(),
10
);
as
=
new
AttributedString
(
typeName
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
typeName
.
length
());
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle2Width
,
contentY
+
150
);
}
//写入物资编码
String
contentTitle4
=
"物资编码:"
;
int
contentTitle4Width
=
g2
.
getFontMetrics
().
stringWidth
(
contentTitle4
);
g2
.
drawString
(
contentTitle4
,
contentX
,
contentY
+
4
0
0
);
g2
.
drawString
(
contentTitle4
,
contentX
,
contentY
+
4
5
0
);
String
code
=
qrCode
.
getCode
();
if
(
code
.
length
()
>
1
0
)
{
String
str1
=
code
.
substring
(
0
,
9
);
str1
=
formatContent
(
str1
,
1
0
);
if
(
code
.
length
()
>
1
5
)
{
String
str1
=
code
.
substring
(
0
,
14
);
str1
=
formatContent
(
str1
,
1
5
);
as
=
new
AttributedString
(
str1
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
str1
.
length
());
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle4Width
,
contentY
+
4
0
0
);
String
str2
=
code
.
substring
(
9
,
code
.
length
());
str2
=
formatContent
(
str2
,
1
0
);
g2
.
drawString
(
as
.
getIterator
(),
contentX
+
contentTitle4Width
,
contentY
+
4
5
0
);
String
str2
=
code
.
substring
(
14
,
code
.
length
());
str2
=
formatContent
(
str2
,
1
5
);
as
=
new
AttributedString
(
str2
);
as
.
addAttribute
(
TextAttribute
.
FONT
,
font
);
as
.
addAttribute
(
TextAttribute
.
UNDERLINE
,
TextAttribute
.
UNDERLINE_LOW_DASHED
,
0
,
str2
.
length
());
...
...
src/main/webapp/webpage/include/anihead.jsp
View file @
e3b9dcca
...
...
@@ -62,6 +62,3 @@
<link rel="stylesheet" id="theme" href="${ctxStatic}/common/css/app-${cookie.theme.value==null?'blue':cookie.theme.value}.css" />
<script src="${ctxStatic}/common/js/jeeplus.js"></script>
<script src="${ctxStatic}/common/js/LodopFuncs.js"></script>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0 style="display: none;">
<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/goods/goodsList.js
View file @
e3b9dcca
...
...
@@ -286,33 +286,26 @@ $(document).ready(function() {
function
printQr
(
id
)
{
jp
.
loading
(
'loading...'
);
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
refresh
();
jp
.
success
(
res
.
msg
);
})
// try{
// 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;
// jp.close();
// })
// }
try
{
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
();
})
}
}
catch
(
e
){
jp
.
get
(
"${ctx}/warehouse/goods/goods/printQr?goodsInfoId="
+
id
,
function
(
res
)
{
var
list
=
res
.
body
.
goodsInfo
.
qrCodeList
;
jp
.
close
();
})
}
}
function
createAllPage
(
list
){
...
...
src/main/webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
View file @
e3b9dcca
...
...
@@ -10,7 +10,7 @@
<table id="detail_table"></table>
<script>
var selector = "#detail_table";
var LODOP;
function initTable() {
var data = [];
$(selector).bootstrapTable({
...
...
@@ -70,15 +70,39 @@
url: '${ctx}/warehouse/ledger/ledger/infoDate?batchNum='+ row.batchNum+'&ledger.id=${ledger.id}',
page: true,
columns: [
{checkbox:true},
{field: 'code', title: '物资编码'},
{field: 'name', title: '物资名称'},
{field: 'type.name', title: '品名代码'},
{field: 'model', title: '型号'},
{field: 'batchNum', title: '批次号'},
{field: 'shelves.name', title: '货架'},
{field: 'code', title: '物资编码'},
{field: 'amount', title: '单价'},
{
field: 'qr.url',
title: '二维码',
sortable: true,
sortName: 'qr.url',
formatter: function (){
return '<a class="view-qrcode">查看</a> <a class="print">打印</a>';
},
events: {
'click .view-qrcode': function (e,value,row){
jp.showPic('${ctxPath}'+row.qr.url)
},
'click .print': function (e,value,row){
onPrint(row);
}
}
}
]
})
});
$('#table').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
'check-all.bs.table uncheck-all.bs.table', function () {
$('#batchPrintBtn').prop('disabled', ! $('#table').bootstrapTable('getSelections').length);
});
},
})
}
...
...
@@ -148,11 +172,39 @@
function getTableData() {
return $(selector).bootstrapTable('getData');
}
function initLodop(){
LODOP = getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
}
function onPrint(row) {
if(!LODOP){
initLodop();
}
LODOP.PRINT_INIT("打印货品");
LODOP.SET_PRINT_PAGESIZE(1,400,600,0);
if(!row){
var selections = $("#table").bootstrapTable('getSelections');
selections.forEach(function(item){
LODOP.NewPage();
var imgUrl = "${ctxPath}/" + item.qr.url;
LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
});
LODOP.PREVIEW();
return;
}
LODOP.NewPage();
var imgUrl = "${ctxPath}/" + row.qr.url;
LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
LODOP.PREVIEW();
}
</script>
<script id="detailTpl" type="text/html">
<br>
<div class="container-fluid">
<button id="batchPrintBtn" class="btn btn-primary" onclick="onPrint()" disabled>批量打印</button>
<table id="table"></table>
</div>
</script>
\ No newline at end of file
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
View file @
e3b9dcca
...
...
@@ -147,7 +147,21 @@
searchKeys: "code",
}, function (items) {
if (Array.isArray(items)) {
var data = items.map(function (item) {
/***
* 重复的物资编码去重
*/
var newItems = [];
items.forEach(function(item){
var fined = getTableData().find(function(v){
return v.ledgerInfo.code === item.code
})
if(!fined){
newItems.push(item);
}else{
jp.warning('有物资重复不能领用!');
}
})
var data = newItems.map(function (item) {
item[0] = false;
return {
id: '',
...
...
@@ -282,6 +296,17 @@
var data = res.rows || [];
if (data.length) {
var item = data[0];
/***
* 重复的物资编码去重
*/
var fined = getTableData().find(function(v){
return v.ledgerInfo.code === item.code
})
if(fined){
jp.warning('有物资重复不能领用');
return;
}
$(selector).bootstrapTable('append', [
{
id: '',
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
e3b9dcca
...
...
@@ -78,6 +78,16 @@
}
},
{
field: 'warehouse.name',
title: '仓库',
formatter: function (value,row,index){
return Mustache.render($("#warehouseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""),{
row: row,
idx: index
})
}
},
{
field: 'remarks',
title: '备注',
formatter: function (value,row,index){
...
...
@@ -120,7 +130,21 @@
}
jp.openStorageSelectDialog({batchNum:$("#batchNum").val(),state: 0, isMultiSelect: true },function (items){
if(Array.isArray(items)){
var data = items.map(function (item){
/***
* 重复的物资编码去重
*/
var newItems = [];
items.forEach(function(item){
var fined = getTableData().find(function(v){
return v.qrCode.id === item.qrCode.id
});
if(!fined){
newItems.push(item)
}else{
jp.warning('有物资重复不能入库!');
}
})
var data = newItems.map(function (item){
item[0] = false;
if(item.goodsInfo && !item.goodsInfo.amount){
item.goodsInfo.amount = 0;
...
...
@@ -131,7 +155,7 @@
remarks: '',
...item
}
})
})
;
$(selector).bootstrapTable('append', data)
}
})
...
...
@@ -278,7 +302,14 @@
var qrCodeId = json.code;
var goodsInfoId = json.infoId;
jp.get('${ctx}/warehouse/goods/goods/getGIAndQCByTwoId?goodsInfoId='+goodsInfoId+"&qrCodeId="+qrCodeId, function (res){
var qrCode = res.body.qrCode;
var qrCode = res.body.qrCode;
var fined = getTableData().find(function(v){
return v.qrCode.id === qrCode.id
});
if(fined){
jp.warning('有物资重复不能入库!');
return;
}
$(selector).bootstrapTable('append',[
{
qrCode: qrCode,
...
...
@@ -329,7 +360,9 @@
<script id="remarksTpl" type="text/html">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
</script>
<script id="warehouseTpl" type="text/html">
<input id="storageInfoList{{idx}}_warehouseName" name="storageInfoList[{{idx}}].warehouse.name" type="text" value="{{row.warehouse.name}}" readonly class="form-control "/>
</script>
<script id="scanResultTpl" type="text/html">
<br>
<div class="container-fluid">
...
...
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