Parcourir la source

加入收费二维码打印功能

wuxw il y a 6 ans
Parent
commit
065b735be3

+ 30 - 0
WebService/src/main/resources/components/parkingSpacePackage/parking-space-qrcode/parkingSpaceQrCode.html

@@ -0,0 +1,30 @@
+<div>
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox">
+                <div class="ibox-title">
+                    <h5>二维码信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
+
+                        <form>
+                            <div class="form-row">
+                                <div class="col">
+                                    <button type="button" class="btn btn-primary btn-sm"
+                                            v-on:click="_downLoadQrCode()">
+                                        <i class="glyphicon glyphicon-download-alt"></i>
+                                        下载二维码
+                                    </button>
+                                </div>
+                            </div>
+                        </form>
+
+
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div id="qrcode" style="width:350px; height:350px; margin:15px auto;"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 40 - 0
WebService/src/main/resources/components/parkingSpacePackage/parking-space-qrcode/parkingSpaceQrCode.js

@@ -0,0 +1,40 @@
+(function(vc){
+    vc.extends({
+        data:{
+            parkingSpaceQrCodeInfo:{
+                url:vc.getData("_sysInfo").apiUrl
+            }
+        },
+         _initMethod:function(){
+            vc.component._makeQrCode();
+         },
+         _initEvent:function(){
+
+        },
+        methods:{
+            _makeQrCode:function(){
+                var qrcode = new QRCode(document.getElementById("qrcode"), {
+                	text: vc.getData("_sysInfo").logo,  //你想要填写的文本
+                    width: 350, //生成的二维码的宽度
+                    height: 350, //生成的二维码的高度
+                    colorDark : "#000000", // 生成的二维码的深色部分
+                    colorLight : "#ffffff", //生成二维码的浅色部分
+                    correctLevel : QRCode.CorrectLevel.H
+                });
+                var _url = vc.component.parkingSpaceQrCodeInfo.url +"/tempParkingFeePay/tempParkingFeePay?communityId="+vc.getCurrentCommunity().communityId + "&communityName="+vc.getCurrentCommunity().name;
+                qrcode.makeCode(_url);
+            },
+            _downLoadQrCode:function(){
+                var qrcode = document.getElementById('qrcode');
+                        var img = qrcode.getElementsByTagName('img')[0];
+                        var link = document.createElement("a");
+                        var url = img.getAttribute("src");
+                        link.setAttribute("href",url);
+                        link.setAttribute("download",vc.getData("_sysInfo").logo+'临时车支付二维码.png');
+                        link.click();
+            }
+
+        }
+    });
+
+})(window.vc);

+ 37 - 0
WebService/src/main/resources/views/parkingSpaceQrCodeFlow.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en"
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org"
+      xmlns:vc="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>收费二维码|java110</title>
+    <vc:create name="commonTop"></vc:create>
+    <script src="/js/plugins/qrcode/qrcode.min.js"></script>
+</head>
+<body>
+<vc:create name="bodyTop"></vc:create>
+<div id="wrapper">
+    <vc:create name="menu"></vc:create>
+
+
+    <div id="page-wrapper" class="gray-bg dashbard-1">
+        <div class="row border-bottom">
+            <vc:create name="nav"></vc:create>
+        </div>
+        <div class="wrapper wrapper-content" style="padding-bottom: 0px;">
+            <vc:create name="breadcrumb"></vc:create>
+        </div>
+        <!-- id="component" -->
+        <div id="component" class="wrapper wrapper-content animated fadeInRight">
+            <vc:create name="parkingSpaceQrCode"></vc:create>
+        </div>
+
+        <vc:create name="copyright"></vc:create>
+
+    </div>
+</div>
+
+<vc:create name="commonBottom"></vc:create>
+</body>
+</html>

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
java110-front/src/main/resources/static/js/plugins/qrcode/qrcode.min.js