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
16ee55f9
Commit
16ee55f9
authored
Aug 07, 2023
by
anxiaohe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签字
parent
d78ed2b8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
323 additions
and
32 deletions
+323
-32
MaterialRequisitionController.java
...aterialrequisition/web/MaterialRequisitionController.java
+6
-2
logic.jsp
src/main/webapp/webpage/include/logic.jsp
+0
-0
writingPad.jsp
src/main/webapp/webpage/include/writingPad.jsp
+139
-0
goodsList.jsp
...main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
+1
-1
ledgerDetail.jsp
.../webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
+17
-1
materialRequisitionDetail.jsp
...rehouse/materialrequisition/materialRequisitionDetail.jsp
+34
-18
writing.jsp
...webpage/modules/warehouse/materialrequisition/writing.jsp
+113
-0
profitWarehousingList.jsp
...les/warehouse/profitwarehousing/profitWarehousingList.jsp
+1
-1
qrCodeList.js
...ain/webapp/webpage/modules/warehouse/qrcode/qrCodeList.js
+7
-4
qrCodeList.jsp
...in/webapp/webpage/modules/warehouse/qrcode/qrCodeList.jsp
+5
-5
No files found.
src/main/java/com/jeeplus/modules/warehouse/materialrequisition/web/MaterialRequisitionController.java
View file @
16ee55f9
...
...
@@ -276,4 +276,9 @@ public class MaterialRequisitionController extends BaseController {
}
}
\ No newline at end of file
@RequestMapping
(
value
=
"writeSign"
)
public
String
writeSign
(
Model
model
)
{
return
"modules/warehouse/materialrequisition/writing"
;
}
}
src/main/webapp/webpage/
modules/warehouse/goods/logic.js
→
src/main/webapp/webpage/
include/logic.jsp
View file @
16ee55f9
File moved
src/main/webapp/webpage/include/writingPad.jsp
0 → 100644
View file @
16ee55f9
<%@ page contentType="text/html;charset=UTF-8" %>
<script>
var errorCode = {
'0': "成功",
'-1': '未找到对应的汉王手写设备',
'-2': '手写模块加载失败',
'-3': '手写模块初始化失败',
'-4': '不支持的图片格式',
'-5': '没有签名数据',
'-6': '无效输入参数',
'-10': '有窗口未签字',
'-11': '请求参数异常',
'-13': '重复启动签字页面',
'-14': '请求格式错误',
'-15': '没有窗口并且者关闭签字设备'
}
var deviceInitParams = {
"nLogo": "签字", // 签字界面title
"nPenwidth": "2", // 写字宽度 0 - 4
"nOrgX": "", // 屏幕x位置
"nOrgY": "", // 屏幕y位置
"width": "500", // 窗口宽度
"height": "300", // 窗口高度
"fingerFap": "1", // 指纹模式 0:只签字(默认值) 1: 签字加指纹 (若设备有指纹模块) 2: 只指纹 (若设备有指纹模块)
"key": "4A05564228DF2C64AF2E137B71A4E7A3" // 必须
}
function getLink () {
return 'http://127.0.0.1:29999';
}
var deviceStartGetSignResultInterval = null;
function getDevice (callback) {
jp.get(getLink() + '/HWPenSign/HWGetDeviceStatus', function (result) {
var code = Number(result.msgID);
if (code === 0) {
deviceInit();
callback && callback(true);
} else {
logErrMsg(code);
callback && callback(false);
clearInterval(deviceStartGetSignResultInterval);
}
})
}
function deviceInit () {
$.ajax({
type: "get",
url: getLink() + "/HWPenSign/HWInitialize",
data: deviceInitParams,
dataType: "jsonp",
success: function(result){
var code = Number(result.msgID);
if (code === 0) {
deviceStartGetSignResultInterval = setInterval(function () {
getDeviceInputImg();
}, 2000);
} else {
// logErrMsg(data.message);
}
},
error: function(){
logErrMsg("Application not started");
}
});
}
function deviceUninstall () {
jp.get(getLink() + '/HWPenSign/HWFinalize', function (result) {
var code = Number(result.msgID);
if (code === 0) {
} else {
logErrMsg(code);
}
})
}
function clearDeviceInput () {
jp.get(getLink() + '/HWPenSign/HWClearPenSign', function (result) {
var code = Number(result.msgID);
if (code === 0) {
} else {
logErrMsg(code);
}
})
}
function getDeviceInputImg () {
$.ajax({
type: "get",
url: getLink() + "/HWPenSign/HWGetSign",
data: {
"nImageType": "3",
"nImageWidth": "",
"nImageHeight": ""
},
dataType: "jsonp",
success: function(result) {
var code = Number(result.msgID);
if (code === 0) {
clearInterval(deviceStartGetSignResultInterval);
window.getSignImg && window.getSignImg(result);
} else if (code === -15) {
debugger
clearInterval(deviceStartGetSignResultInterval);
// logErrMsg(result.msgID);
signWindowClose();
} else {
// logErrMsg(result.msgID);
}
},
error : function(){
console.log("sign error \n");
}
});
}
function clear () {
clearInterval(deviceStartGetSignResultInterval);
clearDeviceInput();
deviceUninstall();
}
function logErrMsg (code) {
code = code ? code.toString() : '';
jp.warning(errorCode[code]);
}
function signWindowClose () {
window.signClose && window.signClose();
}
</script>
src/main/webapp/webpage/modules/warehouse/goods/goodsList.jsp
View file @
16ee55f9
...
...
@@ -8,7 +8,7 @@
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"goodsList.js"
%
>
<
%@
include
file=
"
logic.js
"
%
>
<
%@
include
file=
"
/webpage/include/logic.jsp
"
%
>
</head>
<body>
<div
class=
"wrapper wrapper-content"
>
...
...
src/main/webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
View file @
16ee55f9
...
...
@@ -7,6 +7,7 @@
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<%@include file="/webpage/include/logic.jsp" %>
<table id="detail_table"></table>
<script>
var selector = "#detail_table";
...
...
@@ -270,7 +271,7 @@
LODOP = getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
}
function onPrint(row) {
function onPrint
_
(row) {
if(!LODOP){
initLodop();
}
...
...
@@ -292,6 +293,21 @@
LODOP.ADD_PRINT_IMAGE('0%',"0%","100%","100%","<img width='150' border='0' src='"+imgUrl+"' />");
LODOP.PREVIEW();
}
function onPrint (row) {
<%--if(!row){--%>
<%-- var selections = $("#detail_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;--%>
<%--}--%>
var imgUrl = "${ctxPath}/" + row.qr.url;
_thermal_Image_print_(imgUrl);
}
</script>
<script id="detailTpl" type="text/html">
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
View file @
16ee55f9
...
...
@@ -379,39 +379,52 @@
return;
}
layer
.open({
type:
1
,
jp
.open({
type:
2
,
title: '签名',
auto:true,
area:[800,600],
content: '<div id="signBox" class="sign" contentEditable="true" style="width: 100%;height: 100%;"></div>',
success: function (layero){
$(layero[0]).find("#signBox").focus();
},
btn: ['确认','清空','取消'],
btn1: function(index, layero){
if(ledgerInfoId){
content: '${ctx}/warehouse/materialrequisition/materialRequisition/writeSign',
// success: function (layero){
// $(layero[0]).find("#signBox").focus();
// getDevice();
// },
btn: ['确认','取消'],
btn1: function (index, layero) {
var iframe = layero.find("iframe")[0].contentWindow;
var img = iframe.getImg();
if (!img) {
jp.close(index);
jp.message('请签字');
return;
}
if (ledgerInfoId) {
var i = getTableData().findIndex(function (current) {
return current.ledgerInfo.id === ledgerInfoId;
})
updateRow(i, {
receiver:
$(layero[0]).find("#signBox img").attr('src')
receiver:
img
})
}
else
{
}
else
{
getSelections().forEach(function (item) {
var index = getTableData().findIndex(function (current) {
return
current.ledgerInfo.id === item.ledgerInfo
.id;
return
item.sortId ? item.sortId === current.sortId : item.id === current
.id;
})
updateRow(index, {
receiver:
$(layero[0]).find("#signBox img").attr('src')
receiver:
img
})
});
}
layer
.close(index);
jp
.close(index);
},
btn2: function (index, layero){
$(layero[0]).find("#signBox").empty().focus();
return false;
var iframe = layero.find("iframe")[0].contentWindow;
iframe.unload();
jp.close(index);
},
cancel (i, layero) {
var iframe = layero.find("iframe")[0].contentWindow;
iframe.unload();
}
})
}
...
...
@@ -433,7 +446,6 @@
renderScanTable();
},
yes: function (index, layero) {
debugger
var selectTableData = getSelectScanTable();
if (!selectTableData.length) {
jp.alert('至少选择一条数据');
...
...
@@ -580,6 +592,10 @@
receiver: ''
})
}
function viewImage (u) {
jp.showPic(u);
}
</script>
<script id="hideTpl" type="text/html">
...
...
@@ -643,7 +659,7 @@
<input type="hidden" name="materialRequisitionInfoList[{{idx}}].receiver" value="{{row.receiver}}">
{{#row.receiver}}
<div class="sign-result">
<img src="{{row.receiver}}" alt="签名" width="100%" />
<img src="{{row.receiver}}" alt="签名" width="100%"
onclick="viewImage('{{row.receiver}}')"
/>
<span class="del-sign" onclick="delSign(this, '{{idx}}')">×</span>
</div>
{{/row.receiver}}
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/writing.jsp
0 → 100644
View file @
16ee55f9
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
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/writingPad.jsp"
%
>
<style>
.btnBox
{
padding
:
20px
;
}
.startSign
{
display
:
none
;
}
.signAgain
{
display
:
none
;
}
canvas
{
background
:
#0e90d2
;
/*width: 600px;*/
/*height: 400px;*/
/*margin: 0 auto;*/
}
</style>
</head>
<body>
<div
class=
"page"
>
<div
class=
"btnBox"
>
<button
class=
"btn btn-success startSign"
>
签字
</button>
<button
class=
"btn btn-primary signAgain"
>
重新签字
</button>
</div>
<div
class=
"imgBox"
>
<canvas
id=
"myCanvas"
></canvas>
</div>
</div>
<script>
$
(
".startSign"
).
on
(
'click'
,
function
()
{
init
();
})
$
(
".signAgain"
).
on
(
'click'
,
function
()
{
canvasInit
();
clear
();
init
();
base64Str
=
''
;
})
$
(
document
).
ready
(
function
()
{
init
();
canvasInit
();
})
function
init
()
{
getDevice
(
function
(
result
)
{
if
(
result
)
{
$
(
".startSign"
).
hide
();
}
else
{
$
(
".startSign"
).
show
();
}
});
}
var
base64Str
=
''
;
function
getSignImg
(
result
)
{
let
img
=
new
Image
();
img
.
src
=
result
.
message
;
base64Str
=
result
.
message
;
var
canvas
=
document
.
getElementById
(
"myCanvas"
);
var
ctx
=
canvas
.
getContext
(
'2d'
);
img
.
onload
=
function
()
{
// 等比例缩放图片
var
scale
=
1
;
var
tt
=
1000
;
// 可以根据具体的要求去设定
if
(
this
.
width
>
tt
||
this
.
height
>
tt
)
{
if
(
this
.
width
>
this
.
height
)
{
scale
=
tt
/
this
.
width
;
}
else
{
scale
=
tt
/
this
.
height
;
}
}
ctx
.
width
=
this
.
width
*
scale
;
ctx
.
height
=
this
.
height
*
scale
;
// 计算等比缩小后图片
ctx
.
drawImage
(
this
,
0
,
0
,
ctx
.
width
,
ctx
.
height
);
// 加载图片
$
(
".signAgain"
).
show
();
};
}
function
canvasInit
()
{
var
canvas
=
document
.
getElementById
(
"myCanvas"
)
canvas
.
width
=
document
.
documentElement
.
clientWidth
;
canvas
.
height
=
document
.
documentElement
.
clientHeight
-
102
;
}
function
getImg
()
{
return
base64Str
;
}
function
unload
()
{
clear
()
}
function
signClose
()
{
$
(
".startSign"
).
show
();
}
</script>
</body>
</html>
src/main/webapp/webpage/modules/warehouse/profitwarehousing/profitWarehousingList.jsp
View file @
16ee55f9
...
...
@@ -7,7 +7,7 @@
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"
./../goods/logic.js"
%
>
<
%@
include
file=
"
/webpage/include/logic.jsp"
%
>
<
%@
include
file=
"profitWarehousingList.js"
%
>
</head>
<body>
...
...
src/main/webapp/webpage/modules/warehouse/qrcode/qrCodeList.js
View file @
16ee55f9
...
...
@@ -265,7 +265,7 @@ $(document).ready(function() {
function
initLodop
(){
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
}
function
onPrint
(
row
)
{
function
onPrint
_
(
row
)
{
var
list
=
[];
if
(
!
row
){
list
=
$
(
"#qrCodeTable"
).
bootstrapTable
(
'getSelections'
);
...
...
@@ -293,7 +293,11 @@ function onPrint(row) {
})
}
}
function
onPrint
(
row
)
{
// jp.loading('loading...');
var
imgUrl
=
"${ctxPath}/"
+
row
.
url
;
_thermal_Image_print_
(
imgUrl
);
}
function
createAllPage
(
list
){
if
(
!
list
){
return
;
...
...
@@ -304,4 +308,4 @@ function createAllPage(list){
LODOP
.
ADD_PRINT_IMAGE
(
'0%'
,
"0%"
,
"100%"
,
"100%"
,
"<img width='150' border='0' src='"
+
imgUrl
+
"' />"
);
})
}
<
/script>
\ No newline at end of file
<
/script
>
src/main/webapp/webpage/modules/warehouse/qrcode/qrCodeList.jsp
View file @
16ee55f9
...
...
@@ -7,6 +7,7 @@
<meta
name=
"decorator"
content=
"ani"
/>
<
%@
include
file=
"/webpage/include/bootstraptable.jsp"
%
>
<
%@
include
file=
"/webpage/include/treeview.jsp"
%
>
<
%@
include
file=
"/webpage/include/logic.jsp"
%
>
<
%@
include
file=
"qrCodeList.js"
%
>
<script>
var
projectName
=
"${ctxStatic}"
;
...
...
@@ -91,9 +92,9 @@
<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
>
<
%
--
<
button
id=
"printAll"
class=
"btn btn-primary"
disabled
onclick=
"onPrint()"
>
--%
>
<
%
--
<
i
class=
"fa fa-search-plus"
></i>
批量打印--%>
<
%
--
</
button
>
--%
>
</div>
<!-- 表格 -->
...
...
@@ -116,4 +117,4 @@
</div>
</div>
</body>
</html>
\ No newline at end of file
</html>
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