Commit d11ac164 by anxiaohe

台账信息明细扫码功能

parent 9aff9718
...@@ -316,7 +316,8 @@ $(document).ready(function() { ...@@ -316,7 +316,8 @@ $(document).ready(function() {
jp.get("${ctx}/warehouse/goods/goods/printQr?goodsInfoId="+id, function (res) { jp.get("${ctx}/warehouse/goods/goods/printQr?goodsInfoId="+id, function (res) {
if (res.success) { if (res.success) {
var row = res.body.goodsInfo.qrCode; var row = res.body.goodsInfo.qrCode;
console.log(row) var imgUrl = "${ctxPath}/" + row.url;
jp.showPic(imgUrl);
} }
jp.close(); jp.close();
}) })
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<link rel="stylesheet" href="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css"> <link rel="stylesheet" href="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.css">
<script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"></script> <script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"></script> <script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"></script>
<script type="text/javascript" src="${ctxStatic}/common/js/big.js"></script>
</head> </head>
<body> <body>
<div class="wrapper wrapper-content"> <div class="wrapper wrapper-content">
......
...@@ -8,6 +8,18 @@ ...@@ -8,6 +8,18 @@
<%@ 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="ledgerList.js" %> <%@include file="ledgerList.js" %>
<script type="text/javascript" src="${ctxStatic}/common/js/big.js"></script>
<style>
#scanIpt {
position: absolute;
top: -10000px;
left: 0;
opacity: 0;
}
.scan-content {
padding: 10px;
}
</style>
</head> </head>
<body> <body>
<div class="wrapper wrapper-content"> <div class="wrapper wrapper-content">
...@@ -53,7 +65,7 @@ ...@@ -53,7 +65,7 @@
</div> </div>
<!-- 工具栏 --> <!-- 工具栏 -->
<%-- <div id="toolbar">--%> <div id="toolbar">
<%-- <shiro:hasPermission name="warehouse:ledger:ledger:add">--%> <%-- <shiro:hasPermission name="warehouse:ledger:ledger:add">--%>
<%-- <button id="add" class="btn btn-primary" onclick="add()">--%> <%-- <button id="add" class="btn btn-primary" onclick="add()">--%>
<%-- <i class="glyphicon glyphicon-plus"></i> 新建--%> <%-- <i class="glyphicon glyphicon-plus"></i> 新建--%>
...@@ -82,7 +94,10 @@ ...@@ -82,7 +94,10 @@
<%-- <i class="fa fa-search-plus"></i> 查看--%> <%-- <i class="fa fa-search-plus"></i> 查看--%>
<%-- </button>--%> <%-- </button>--%>
<%-- </shiro:hasPermission>--%> <%-- </shiro:hasPermission>--%>
<%-- </div>--%> <button class="btn btn-default" onclick="viewScanData()">
<i class="fa fa-search-plus"></i> 查看二维码数据
</button>
</div>
<!-- 表格 --> <!-- 表格 -->
<table id="ledgerTable" data-toolbar="#toolbar"></table> <table id="ledgerTable" data-toolbar="#toolbar"></table>
...@@ -102,6 +117,31 @@ ...@@ -102,6 +117,31 @@
</ul> </ul>
</div> </div>
</div> </div>
</div>
<script type="type/template" id="scanTpl">
<div class="scan-content">
<input type="text" id="scanIpt" />
<div id="scan-searchForm-box" class="collapse show">
<div class="accordion-inner">
<form:form id="scan-searchForm" 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" class=" form-control"/>--%>
<input type="text" id="scan-code" class="form-control" onfocus="scanIptGetFocusStop()" onblur="scanIptGetFocusStart()" />
</div>
<div class="col-xs-12 col-sm-6 col-md-4">
<div style="margin-top:26px">
<a id="scan-search" class="btn btn-primary btn-rounded btn-bordered btn-sm" onclick="searchScanData()"><i class="fa fa-search"></i> 查询</a>
<a id="scan-reset" class="btn btn-primary btn-rounded btn-bordered btn-sm" onclick="refreshScanData()"><i class="fa fa-refresh"></i> 重置</a>
</div>
</div>
</form:form>
</div>
</div>
<div class="scan-data-content">
<table id="scan_detail_table"></table>
</div>
</div> </div>
</script>
</body> </body>
</html> </html>
...@@ -450,6 +450,7 @@ ...@@ -450,6 +450,7 @@
* @param elem * @param elem
*/ */
function onScanChange(elem){ function onScanChange(elem){
// console.log($(elem).val());
try{ try{
var json = JSON.parse($(elem).val()); var json = JSON.parse($(elem).val());
var qrCodeId = json.code; var qrCodeId = json.code;
...@@ -573,7 +574,7 @@ ...@@ -573,7 +574,7 @@
<label>扫码结果:</label> <label>扫码结果:</label>
</div> </div>
<div class="col-xs-10"> <div class="col-xs-10">
<input type="text" id="scanResult" class="form-control" onchange="onScanChange(this)"> <input type="text" id="scanResult" class="form-control" style="ime-mode: active" onchange="onScanChange(this)">
<span class="text-danger">请切换英文输入法</span> <span class="text-danger">请切换英文输入法</span>
</div> </div>
</div> </div>
......
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
</style> </style>
<script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"></script> <script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"></script> <script type="text/javascript" src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-zh-CN.js"></script>
<style>
#scanResult {
-ms-ime-mode: inactive;
}
</style>
</head> </head>
<body> <body>
<div class="wrapper wrapper-content"> <div class="wrapper wrapper-content">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment