소스 검색

Merge remote-tracking branch 'origin/master'

lxp 1 년 전
부모
커밋
61561778f2

+ 2 - 1
yinet-admin/src/main/resources/static/rlzy/css/saomiao.css

@@ -62,7 +62,7 @@ article .divider {
   position: relative;
   width: 1400px;
   height: 7px;
-  margin: 120px auto 90px;
+  margin: 80px auto 90px;
   background: #84bdff;
 }
 article .divider span {
@@ -140,3 +140,4 @@ footer {
   width: 100px;
   height: 100px;
 }
+

+ 218 - 37
yinet-admin/src/main/resources/templates/rlzy/print/apply.html

@@ -5,16 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
     <link rel="stylesheet" href="/rlzy/css/saomiao.css"/>
-    <link
-            href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
-            rel="stylesheet"
-            integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
-            crossorigin="anonymous"
-    />
-    <link
-            href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
-            rel="stylesheet"
-    />
+    <link rel="stylesheet" type="text/css" href="/print/css/bootstrap.min.css">
     <th:block th:include="include :: header('申请信息')" />
 
     <title>Document</title>
@@ -57,10 +48,10 @@
         </div>
         <div class="rightImg">
             <div class="back">
-                <a href=""> <img style="" src="/rlzy/images/fh.png" alt=""/> </a>
+                <a onclick="goBack()"> <img style="" src="/rlzy/images/fh.png" alt=""/> </a>
             </div>
             <div class="home">
-                <a href=""> <img src="/rlzy/images/index.png" alt=""/> </a>
+                <a href="/zhuxiao/index"> <img src="/rlzy/images/index.png" alt=""/> </a>
             </div>
         </div>
     </header>
@@ -70,7 +61,7 @@
         <div class="divider">
             <span>申请表填写</span>
         </div>
-        <div class="content">
+        <div class="content" id="content1">
             <form style="width: 100%" id="form-file-add">
                 <div class="row">
                     <div
@@ -400,31 +391,10 @@
                         />
                     </div>
                 </div>
-                <div>
-                    <div style="overflow: hidden; margin-top: 15px" class="mb-3">
-                        <div
-                                style="float: left; line-height: 56px"
-                                class="col-md-2 col-lg-2 col-sm-12 text-right align-self-md-center col-xl-2 tr"
-                        >
-                            需要上传文件
-                        </div>
 
-                        <div
-                                style="float: left; padding-left: 5px"
-                                class="col-md-2 col-sm-12 col-lg-2 col-xl-2"
-                        >
-                            <input type="hidden" name="file" id="uploadfile">
-                            <input
-                                    class="form-control form-control-lg"
-                                    id="formFileLg"
-                                    type="file"
-                            />
-                        </div>
-                    </div>
-                </div>
                 <div class="row mt-sm-4">
                     <div class="col-md-12 col-lg-12 col-lg-12 col-sm-12 text-center">
-                        <button class="btn btn-primary btn-lg" type="button" onclick="submitHandler()">
+                        <button class="btn btn-primary btn-lg" type="button" onclick="toSaomiao()">
                             下 一 步
                         </button>
                         <button
@@ -435,14 +405,76 @@
                         </button>
                     </div>
                 </div>
+                <input
+                        id="baseFile"
+                        name="file"
+                        type="hidden"
+                />
+
             </form>
         </div>
+
+
+        <div id="content2" class="con write"  style="display:none">
+            <div class="row clearfix" style="width:98%;margin:0 auto;padding:1% 0;height: 663px">
+                <div class="col-md-12 column" style="height:100%">
+                    <div class="row" style="height:100%">
+                        <div class="col-md-3" style="height:100%">
+                            <h3 class="title" style="text-align:center">—— 事项列表 ——</h3>
+                            <div style="height:810px;overflow:auto">
+                                <table class="table table-bordered">
+                                    <tbody>
+                                    <tr class="info"  >
+                                        <td>
+                                            1
+                                        </td>
+                                        <td>
+                                            <a   class="list">营业执照</a>
+                                        </td>
+                                    </tr>
+
+                                    </tbody>
+                                </table>
+                            </div>
+                        </div>
+                        <div class="col-md-6" style="height:100%">
+                            <h3 class="title" style="text-align:center">—— 高拍仪 ——</h3>
+                            <div class="gaopaiyi" id="CameraCtl" style="width:100%;height:80%;background-color:#fff">
+
+                            </div>
+                            <div class="gaopai" style="padding-left: 200px;position:absolute;bottom:0">
+                                <button class="btn btn-lg btn-success" onclick = "cl_openidA4photos(1,1)">打开高拍仪</button>
+                                <button class="btn btn-lg btn-warning" onclick = "cl_closeidA4photos()">关闭高拍仪</button>
+                                <button class="btn btn-lg btn-info" onclick="cl_takePhotos()">拍照</button>
+                                <button class="btn btn-lg btn-warning" onclick="submitHandler()">提交并关闭</button>
+                                <!--<button class="btn btn-lg btn-info">拍照</button>
+                                <button class="btn btn-lg btn-success">上传</button>
+                                <button class="btn btn-lg btn-warning">重置</button><button class="btn btn-lg btn-info">拍照</button>
+                                <button class="btn btn-lg btn-success">上传</button>-->
+                            </div>
+                        </div>
+                        <div class="col-md-3" style="height:100%">
+                            <h3 class="title" style="text-align:center">—— 预览 ——</h3>
+                            <div id="ylDivList" style="height:810px;overflow:auto" >
+                                <div class="col-md-12 yllist"    >
+                                    <a id="imgBase64"> </a>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
     </article>
     <footer>
         <span>行政审批局</span>
     </footer>
 </div>
 <th:block th:include="include :: footer" />
+
+<script src="/raio/newjs/qwebchannel.js"  type="text/javascript" charset="utf-8"></script>
+<script src="/raio/newjs/app.js"  type="text/javascript" charset="utf-8"></script>
 <script th:inline="javascript">
 
     var prefix = ctx + "rlzy/print"
@@ -467,13 +499,25 @@
         }
     });
 
+    function toSaomiao() {
+        if ($.validate.form()) {
+            $("#content1").hide()
+            $("#content2").show()
+
+            cl_openidA4photos(0,1);
+            open_light()
+
+        }
+    }
     function submitHandler() {
         if ($.validate.form()) {
             var creditCode = $('#creditCode').val()
             console.log(creditCode)
-            $.operate.save( prefix+"/add", $('#form-file-add').serialize());
+            $.operate.save( prefix+"/add", $('#form-file-add').serialize(),function(){
+                window.location.href="/rlzy/print/"+creditCode
+            });
         }
-        window.location.href="/rlzy/print/"+creditCode
+
     }
     $('#phone').blur(function (){
             checktelephone();
@@ -527,5 +571,142 @@
         });
     }
 </script>
+<script th:inline="javascript">
+
+
+    //材料上传--打开摄像头
+    function cl_openidA4photos(size,type) {
+
+        var oViewport;
+        var offsetWidth;
+        var offsetHeight;
+        var topWidth;
+        var topHeight;
+        Toast('', '高拍仪正在打开');
+        if (size == 0 || size == 1) {
+            // 设置A3 A4窗口
+            topWidth=535
+            topHeight=360
+            offsetWidth=850;
+            offsetHeight=525;
+        } else if (size == 2) {
+            // 设置身份证窗口
+            topWidth=565
+            topHeight=240
+            offsetWidth=428;
+            offsetHeight=270;
+        }
+
+        module_camera.open(type, 0, 0, 0, topWidth, topHeight, offsetWidth,offsetHeight);
+    }
+
+    //材料上传-关闭摄像头
+    function cl_closeidA4photos() {
+        close_light()
+        Toast('', '高拍仪/摄像头正在关闭');
+        module_camera.close();
+        Toast('res', '高拍仪/摄像头关闭成功');
+
+    }
+    //材料上传--拍照
+    function cl_takePhotos() {//材料名称,材料index
+        Toast('', '开始拍照');
+        module_camera.take_photo();
+
+    }
+    function output(message) {
+        console.log(message)
+    }
+    var RAIO_lightctrl_light = {
+        RAIO_LIGHTCTR_LIGHT_CAMERA: 0x04,   // 拍摄灯
+        RAIO_LIGHTCTR_LIGHT_IDCARD: 0x05,   // 身份证读卡器背光灯
+        RAIO_LIGHTCTR_LIGHT_PRINTER: 0x06,   // 激光打印机出稿灯
+        RAIO_LIGHTCTR_LIGHT_UNIONPAY: 0x07,   // 银联读卡器指示灯
+        RAIO_LIGHTCTR_LIGHT_TICKET: 0x08,   // 热敏小票打印机出稿灯
+        RAIO_LIGHTCTR_LIGHT_KEYBOARD: 0x09,   // 金属密码键盘指示灯
+        RAIO_LIGHTCTR_LIGHT_FILL: 0x0a,   // 前置摄像头补光灯
+        RAIO_LIGHTCTR_LIGHT_CARDSENDER: 0x0b,   // 发卡机指示灯
+    };
+    var RAIO_lightctrl_mode = {
+        RAIO_LIGHTCTR_MODE_FLASHES_THREE_TIMES: 0,  // 闪烁3次后常亮
+        RAIO_LIGHTCTR_MODE_ALWAYS: 1,  // 常亮
+        RAIO_LIGHTCTR_MODE_FLICKER: 2,  // 闪烁
+    };
+
+    function open_light() {
+        module_lightctrl.open_light(RAIO_lightctrl_light.RAIO_LIGHTCTR_LIGHT_CAMERA,RAIO_lightctrl_mode.RAIO_LIGHTCTR_MODE_FLICKER);
+    }
+
+    function close_light() {
+        module_lightctrl.close_light(RAIO_lightctrl_light.RAIO_LIGHTCTR_LIGHT_CAMERA);
+    }
+    window.onload = function () {
+        // var baseUrl = "http://127.0.0.1:12345/";
+        if (location.search != "")
+            var baseUrl = (/[?&]webChannelBaseUrl=([A-Za-z0-9\-:/\.]+)/.exec(location.search)[1]);
+        else
+            var baseUrl = "ws://localhost:12345";
+
+        output("正在连接RAIO:" + baseUrl);
+        var socket = new WebSocket(baseUrl);
+
+        socket.onclose = function () {
+            console.error("web channel closed");
+        };
+        socket.onerror = function (error) {
+            console.error("web channel error: " + error);
+        };
+        socket.onopen = function () {
+            output("RAIO连接成功");
+            new QWebChannel(socket, function (channel) {
+                window.module_camera = channel.objects.camera;
+                window.module_lightctrl = channel.objects.lightctrl;
+                module_camera.sig_open_result.connect(function (code) {
+                    Toast('res', "摄像头打开结果:" + code);
+
+                });
+                module_lightctrl.sig_open_light_error.connect(function (code) {
+                    Toast('res', '打开控制灯结果:' + code);
+                });
+                module_lightctrl.sig_close_light_error.connect(function (code) {
+                    Toast('res', "关闭控制灯结果" + code)
+                });
+                module_camera.sig_take_photo.connect(function (code, image) {
+                    if (code == 0) {
+                        Toast('res', '拍照成功');
+                        addImage(image);
+                    } else if (code == -1) {
+                        Toast('errs', '摄像头未打开拍照失败');
+                    } else {
+                        Toast('err', '拍照失败:' + code);
+                    }
+                });
+
+            });
+        }
+
+    }
+
+    function goBack() {
+        history.go(-2);
+    }
+    function delImage(This) {
+        var obj = This.parentNode;
+        obj.parentNode.removeChild(obj);
+        $("#baseFile").val("")
+        Toast('', '删除成功');
+    }
+
+    function addImage(base64) {
+        var base64 = "data:image/jpeg;base64," + base64;
+        if($("#baseFile").val()!=""&&$("#baseFile").val()!=undefined){
+            alert("请勿重复拍照")
+            return ;
+        }
+        $("#baseFile").val(base64);
+        var imghtml='<li ><i class="iconfont icon-guanbi" onClick="delImage(this)"></i><img src="'+base64+'" style="width:100%;height:200px;z-index:100;"/></li>'
+        $(".yllist").append(imghtml);
+    }
+    </script>
 </body>
 </html>

+ 1 - 1
yinet-admin/src/main/resources/templates/sample/zhuxiao/index.html

@@ -22,7 +22,7 @@
 		<div class="sonList2">
 			<li class="fl li6"><a href="/zhuxiao/secound/9"><img class="titleImg" src="/raio/images/weisheng.png" /><p>公共场所卫生许可-注销</p></a></li>
 			<li class="fl li5"><a href="/zhuxiao/secound/10"><img class="titleImg" src="/raio/images/fangyi.png" /><p>动物防疫条件合格证注销</p></a></li>
-			<li class="fl li7"><a href="/zhuxiao/secound/12"><img class="titleImg" src="/raio/images/fangyi.png" /><p>人力资源服务许可-延续</p></a></li>
+			<li class="fl li7"><a href="/zhuxiao/secound/13"><img class="titleImg" src="/raio/images/fangyi.png" /><p>人力资源服务许可</p></a></li>
 
 		</div>
 <!--		<li class="fl li2"><a href="/zhuxiao/secound/8"  ><img class="titleImg" src="/raio/images/danwei.png" /><p>人力资源服务许可-注销</p></a></li>-->