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
5cb4c35f
Commit
5cb4c35f
authored
Jun 08, 2023
by
yyq1988
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
台账明细增加二维码功能
parent
8f2d9b23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
3 deletions
+56
-3
ledgerDetail.jsp
.../webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
+56
-3
No files found.
src/main/webapp/webpage/modules/warehouse/ledger/ledgerDetail.jsp
View file @
5cb4c35f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<table id="detail_table"></table>
<table id="detail_table"></table>
<script>
<script>
var selector = "#detail_table";
var selector = "#detail_table";
var LODOP;
function initTable() {
function initTable() {
var data = [];
var data = [];
$(selector).bootstrapTable({
$(selector).bootstrapTable({
...
@@ -70,15 +70,39 @@
...
@@ -70,15 +70,39 @@
url: '${ctx}/warehouse/ledger/ledger/infoDate?batchNum='+ row.batchNum+'&ledger.id=${ledger.id}',
url: '${ctx}/warehouse/ledger/ledger/infoDate?batchNum='+ row.batchNum+'&ledger.id=${ledger.id}',
page: true,
page: true,
columns: [
columns: [
{checkbox:true},
{field: 'code', title: '物资编码'},
{field: 'name', title: '物资名称'},
{field: 'name', title: '物资名称'},
{field: 'type.name', title: '品名代码'},
{field: 'type.name', title: '品名代码'},
{field: 'model', title: '型号'},
{field: 'model', title: '型号'},
{field: 'batchNum', title: '批次号'},
{field: 'batchNum', title: '批次号'},
{field: 'shelves.name', title: '货架'},
{field: 'shelves.name', title: '货架'},
{field: 'code', title: '物资编码'},
{field: 'amount', 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 @@
...
@@ -148,11 +172,39 @@
function getTableData() {
function getTableData() {
return $(selector).bootstrapTable('getData');
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>
<script id="detailTpl" type="text/html">
<script id="detailTpl" type="text/html">
<br>
<br>
<div class="container-fluid">
<div class="container-fluid">
<button id="batchPrintBtn" class="btn btn-primary" onclick="onPrint()" disabled>批量打印</button>
<table id="table"></table>
<table id="table"></table>
</div>
</div>
</script>
</script>
\ 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