自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-07-01 faaf07e1d8dfa4ef890209faa9e77b286b337466
#
1个文件已添加
3个文件已修改
24 ■■■■ 已修改文件
src/main/java/com/zy/common/utils/BarcodeUtils.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/print.css 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/matCode/matCode.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/matCode/matCode.html 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/BarcodeUtils.java
@@ -18,8 +18,8 @@
 */
public class BarcodeUtils {
    private static final int DEFAULT_WIDTH = 100;
    private static final int DEFAULT_HEIGHT = 20;
    private static final int DEFAULT_WIDTH = 110;
    private static final int DEFAULT_HEIGHT = 40;
    /**
     * 条形码编码
src/main/webapp/static/css/print.css
New file
@@ -0,0 +1,7 @@
@media print {
    @page {
        /*A4: 210mm × 297mm,size: 794px × 1123px,0边距*/
        /*171.9mm × 258.9mm,size:649px × 978px,19.05mm边距(ie浏览器默认打印边距) */
        margin: 0.3cm
    }
}
src/main/webapp/static/js/matCode/matCode.js
@@ -359,7 +359,9 @@
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
                    let box = $("#box");
                    box.html(html);box.show();box.print();box.hide();
                    box.html(html);box.show();
                    box.print({mediaPrint:true});
                    box.hide();
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
src/main/webapp/views/matCode/matCode.html
@@ -9,6 +9,7 @@
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
    <link rel="stylesheet" href="../../static/css/print.css" media="all">
    <style>
        #search-box {
            padding: 30px 30px 10px 30px;
@@ -245,17 +246,17 @@
<!-- 模板1 -->
<script type="text/template" id="templatePreview1" class="template-barcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
        <tr style="height: 55px">
    <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;">
        <tr style="height: 74px">
            <td align="center" colspan="3" scope="col">物料编码</td>
            <td align="center" class="barcode" colspan="9" scope="col">
                <img class="template-code" src="{{this.barcodeUrl}}" width="80%">
                <img class="template-code" src="{{this.barcodeUrl}}" width="90%">
                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                    <span>{{this.matNo}}</span>
                </div>
            </td>
        </tr>
        <tr style="height: 55px">
        <tr style="height: 74px">
            <td align="center" colspan="3">物料名称</td>
            <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.matName}}</td>
            <td align="center" colspan="2">单位</td>