Pārlūkot izejas kodu

上传承诺书

lxp 1 gadu atpakaļ
vecāks
revīzija
43ef3a7b29

+ 2 - 2
yinet-admin/src/main/resources/templates/rlzy/apply/apply.html

@@ -147,12 +147,12 @@
             $.table.init(options);
         });
         function transact(id){
-            $.modal.open("申请办理","/rlzy/apply/edit/"+id,1020,760);
+            $.modal.open("申请办理","/rlzy/apply/edit/"+id,1305,895);
             $('.layui-layer-btn0').text("办理")
             $('.layui-layer-btn1').text("取消")
         }
         function show(id){
-            $.modal.open("查看","/rlzy/apply/edit/"+id,1020,760);
+            $.modal.open("查看","/rlzy/apply/edit/"+id,1305,895);
             $('.layui-layer-btn0').text("保存");
             $('.layui-layer-btn1').text("关闭")
         }

+ 49 - 29
yinet-admin/src/main/resources/templates/rlzy/print/apply.html

@@ -421,7 +421,7 @@
                 />
                 <input
                         id="chengnuoshu"
-                        name="file"
+                        name="chengnuoshu"
                         type="hidden"
                 />
 
@@ -482,7 +482,7 @@
                                     <a id="imgBase64"> </a>
                                 </div>
                                 <div class="col-md-12 yllist"    id="sqcn" style="display:none">
-                                    <a > </a>
+                                    <a id="cns"> </a>
                                 </div>
                             </div>
                         </div>
@@ -671,6 +671,18 @@
     function close_light() {
         module_lightctrl.close_light(RAIO_lightctrl_light.RAIO_LIGHTCTR_LIGHT_CAMERA);
     }
+    var nowfile=""
+    function selTr(e) {
+        nowfile=$(e).attr("data-id")
+        if(nowfile=="yyzz"){
+            $("#yyzz").show()
+            $("#sqcn").hide()
+        }else{
+            $("#yyzz").hide()
+            $("#sqcn").show()
+        }
+    }
+    var formData = ""
     window.onload = function () {
         // var baseUrl = "http://127.0.0.1:12345/";
         if (location.search != "")
@@ -703,24 +715,44 @@
                     Toast('res', "关闭控制灯结果" + code)
                 });
                 module_camera.sig_take_photo.connect(function (code, image) {
+
                     if (code == 0) {
                         Toast('res', '拍照成功');
                         addImage(image);
-                        var formData = getFileFromBase64(image,"人力资源设立.jpg");
-
-                        $.ajax({
-                            type: "post",
-                            url: ctx + "common/upload",
-                            data: formData,
-                            cache: false,
-                            contentType: false,
-                            processData: false,
-                            dataType: 'json',
-                            success: function (result) {
-                                console.log(result)
-                                $('#baseFile').val(result.fileName)
-                            }
-                        });
+                        formData = getFileFromBase64(image,"人力资源设立.jpg");
+                        console.log(formData)
+                        console.log(nowfile)
+                        if(nowfile=="yyzz"){
+                            $.ajax({
+                                type: "post",
+                                url: ctx + "common/upload",
+                                data: formData,
+                                cache: false,
+                                contentType: false,
+                                processData: false,
+                                dataType: 'json',
+                                success: function (result) {
+                                    console.log(result)
+                                    $('#baseFile').val(result.fileName)
+                                }
+                            });
+                        }else if (nowfile=="sqcn"){
+                            $.ajax({
+                                type: "post",
+                                url: ctx + "common/upload",
+                                data: formData,
+                                cache: false,
+                                contentType: false,
+                                processData: false,
+                                dataType: 'json',
+                                success: function (result) {
+                                    console.log(result)
+                                    $('#chengnuoshu').val(result.fileName)
+                                }
+                            });
+                        }
+
+
                     } else if (code == -1) {
                         Toast('errs', '摄像头未打开拍照失败');
                     } else {
@@ -750,19 +782,7 @@
         formData.append("file", fileOfBlob);
         return formData
     }
-var nowfile=""
-    function selTr(e) {
-        nowfile=$(e).attr("data-id")
-       if(nowfile=="yyzz"){
-           $("#yyzz").show()
-           $("#sqcn").hide()
-       }else{
-           $("#yyzz").hide()
-           $("#sqcn").show()
-       }
-
 
-    }
     function goBack() {
         history.go(-2);
     }