From d789099e9dc45e7fa3ee0eb73ee97f80b1963466 Mon Sep 17 00:00:00 2001
From: CB2-20200827ONU\Administrator <liaoxujun@qq.com>
Date: 星期五, 08 十月 2021 09:23:47 +0800
Subject: [PATCH] no message

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx |  318 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 236 insertions(+), 82 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx
index 37b68fb..38cd8c1 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsUpLoadContract.aspx
@@ -1,141 +1,295 @@
 锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorporateClientsUpLoadContract.aspx.cs" Inherits="CY.WebForm.Pages.business.CorporateClientsUpLoadContract" %>
+
 <%-- 涓婁紶鍚堝悓椤甸潰  寤� 20210916澧炲姞--%>
 <!DOCTYPE html>
-<script src="js/jquery.min.js" type="text/javascript"></script>
-<script src="js/jquery.hammer.min.js" type="text/javascript"></script>  
+<script src="./../../myPagination/js/share/js/jquery.min.js" type="text/javascript"></script>
+<%--<script src="./../../js/jquery.hammer.min.js" type="text/javascript"></script>--%>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
-<head  id="Head1"  runat="server">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<head id="Head1" runat="server">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title></title>
-    
- 
-      <uc:CMSHead ID="CMSHead1" runat="server" />
+
+
+    <uc:CMSHead ID="CMSHead1" runat="server" />
+
 </head>
 <body>
     <form id="form1" runat="server">
-           <div class="box1" paneltitle="鍔熻兘闈㈡澘" roller="false">
+        <div class="box1" paneltitle="鍔熻兘闈㈡澘" roller="false">
             <table class="TableNewStyle">
                 <tr>
-                      <td class="ali03">鏂板鍚堝悓椤甸潰锛�
-                        </td>                    
+                    <td style="width:200px">鏂板鎴栬�呮浛鎹㈠悎鍚岄〉闈細
+                    </td>                   
+
+                    <td style="width:100px">绗�
+                        <input type="text" runat="server" id="TextPage" style="width:40px" onkeyup="value=value.replace(/[^\d]/g,'')" />
+                        椤�
+                    </td>
+                    <td class="ali03"></td>
+
                     <td class="ali03">
-                        椤电爜锛�
+                        <input type="file" id="filesel" name="__hetongFile" keepdefaultstyle="true" runat="server" text="璇烽�夋嫨鏂囦欢" /></td>
+                    <td>
+                        <asp:Button ID="UpdateFileNew" Text="涓婁紶" runat="server" OnClick="btn_Submit_Click" OnClientClick="return checkSelFile()" /></td>
+                </tr>
+            </table>
+
+
+        </div>
+
+        <div class="box1" paneltitle="鍔熻兘闈㈡澘" roller="false">
+            <table class="TableNewStyle">
+                <tr>
+                    <td class="ali06" style="width:200px">
+                        
+                        鎵归噺涓婁紶锛�
+                         
+                    </td>
+                    <td class="ali03" style="width:100px">
                     </td>
 
+                    <td class="ali03"></td>
+
+                    <td class="ali03">
+                        <input type="file" id="file2" name="__hetongMutilfiles" keepdefaultstyle="true" multiple="multiple" runat="server"  text="璇烽�夋嫨鏂囦欢"/></td>
                     <td>
-                        绗� <input type="text" runat="server" id="TextPage" /> 椤�
-                    </td>
-                     <td class="ali03"></td>
-                  
-                    <td class="ali03"><input type="file" id="filesel" name="__hetongFile"  keepdefaultstyle="true" multiple="multiple" runat="server"  /></td>
-                    <td> <asp:Button ID="UpdateFileNew" Text="鏂板鎴栬�呮浛鎹㈣椤�(涓婁紶鍥剧墖)" runat="server" OnClick="btn_Submit_Click"   OnClientClick="return checkSelFile()" /></td>
+                        <asp:Button ID="Button1" Text="鎵归噺涓婁紶" runat="server" OnClick="btn_Submit_Click_multi" OnClientClick="return checkSelMulitFile()" /></td>
                 </tr>
             </table>
         </div>
-          <div>
-  
-              <p style="text-align:center"> 宸叉湁椤甸潰</p>
-   
-            <asp:repeater id="RepClientList" runat="server" >
-                <headertemplate>
+        <div>
+
+            <p style="text-align: center">宸叉湁椤甸潰</p>
+
+            <asp:Repeater ID="RepClientList" runat="server">
+                <HeaderTemplate>
                     <table class="tableStyle">
                         <tr>
-                           <%-- <th width="25"></th>--%>
-                            <th width="60" style="text-align:center">
-                                椤电爜
+                            <%-- <th width="25"></th>--%>
+                            <th width="60" style="text-align: center">椤电爜
                             </th>
-                            <th style="text-align:center" >
-                                棰勮
+                            <th style="text-align: center">棰勮
                             </th>
-                           <th style="text-align:center">
-                                鎿嶄綔
-                            </th>               
-                          
-                          
+                            <th style="text-align: center">鎿嶄綔
+                            </th>
+
+
                         </tr>
-                </headertemplate>        
-              
+                </HeaderTemplate>
+
 
                 <ItemTemplate>
-                        <tr>
-                           <%-- <td>
+                    <tr>
+                        <%-- <td>
                                 <input type="checkbox" class="SelectCheck" value_kid="<%#Eval("Keyid")%>" />
                             </td>--%>
-                            <td>
-                               绗�  <%#Eval("PageCode")%> 椤�                       
-                            </td>
-                            <td>
-                                 
-                             <a   title="鐐瑰嚮鏌ョ湅鍘熷浘"   href="<%#Eval("FilePath").ToString() %>" target="view_window">
-                                   <img src="<%#Eval("FilePath").ToString() %>"  width="80" height="100"/> </a>
-                       
-                            </td>
+                        <td>绗�  <%#Eval("PageCode")%> 椤�                       
+                        </td>
+                        <td>
+
+                            <a title="鐐瑰嚮鏌ョ湅鍘熷浘" href="<%#Eval("FilePath").ToString() %>" target="view_window">
+                                <img src="<%#Eval("FilePath").ToString() %>" width="80" height="100" />
+                            </a>
+
+                        </td>
 
 
-                           <td>
-                                 
-                                <a onclick="delelid('<%#Eval("Keyid")%>','<%= Request["Keyid"]%>')">鍒犻櫎褰撳墠椤甸潰</a>
-                           </td>
-                           
-                            
-                          
-                         
-                            
-                          
-                           
-                        </tr>
-                    </ItemTemplate>
-                 
+                        <td>
 
-                    <FooterTemplate>
-                        </table>
-                    </FooterTemplate>
-                  
+                            <a onclick="delelid('<%#Eval("Keyid")%>','<%= Request["Keyid"]%>')">鍒犻櫎褰撳墠椤甸潰</a>
+                        </td>
 
 
 
 
-                </asp:repeater>
-                     <div id="page">
-                    <uc:UCPager ID="UCPager1" runat="server" />
-                </div>
 
-               
-                 
-             
-              </div>
+
+
+                    </tr>
+                </ItemTemplate>
+
+
+                <FooterTemplate>
+                    </table>
+                </FooterTemplate>
+
+
+
+
+
+            </asp:Repeater>
+            <div id="page">
+                <uc:UCPager ID="UCPager1" runat="server" />
+            </div>
+
+
+
+
+        </div>
+        <button id="Buttonupload" onclick="onViewuplodshow('<%= Request["Keyid"]%>')">娴忚鍏ㄩ儴</button>
        
+        <asp:Button ID="Button3"  Text="鍒犻櫎鎵�鏈夊悎鍚�"  runat="server"  OnClick="btn_Submit_Click_DELLALL" />
+        
+
     </form>
 </body>
 </html>
 <script type="text/javascript">
 
     //鏌ョ湅
+    function checkSelMulitFile() {
+
+        var oFile = document.getElementById('file2');
+        if (oFile.value == "") {
+            alertMsg('娌℃湁閫夋嫨鏂囦欢');
+            return false;
+           
+        }
+        //debugger;
+        //replaceParamVal("deleteKeyIds", "");
+        return true;
+    }
+    //鏌ョ湅
     function checkSelFile() {
-    
+
         if (document.getElementById("TextPage").value == "") {
             alertMsg("娌℃湁杈撳叆椤垫暟");
-           
+
             return false;
         }
         var oFile = document.getElementById('filesel');
-            if(oFile.value == ""){
-                alertMsg('娌℃湁閫夋嫨鏂囦欢');
-                return false;
-               
-}
+        if (oFile.value == "") {
+            alertMsg('娌℃湁閫夋嫨鏂囦欢');
+            return false;
 
+        }
+        //debugger;
+        //replaceParamVal("deleteKeyIds", "");
         return true;
     }
 
-    //鍒犻櫎鍒跺畾鍚堝悓椤甸潰
-    function delelid(KeyID,pageID) {
+    //鏀瑰彉鍙傛暟
+    function changeURLArg(url, arg, arg_val) {
+        var pattern = arg + '=([^&]*)';
+        var replaceText = arg + '=' + arg_val;
+        if (url.match(pattern)) {
+            var tmp = '/(' + arg + '=)([^&]*)/gi';
+            tmp = url.replace(eval(tmp), replaceText);
+            return tmp;
+        } else {
+            if (url.match('[\?]')) {
+                return url + '&' + replaceText;
+            } else {
+                return url + '?' + replaceText;
+            }
+        }
+    }
 
+
+    // 鑾峰彇url閲岀殑鍙傛暟
+
+    function getURLString(arg) {
+        var reg = new RegExp("(^|&)" + arg + "=([^&]*)(&|$)", "i");
+        var r = window.location.search.substr(1).match(reg);
+        if (r != null)
+            return unescape(r[2]);
+        return null;
+    }
+
+    //鏇挎崲鎸囧畾浼犲叆鍙傛暟鐨勫��,paramName涓哄弬鏁�,replaceWith涓烘柊鍊�
+    function replaceParamVal(paramName, replaceWith) {
+        var oUrl = this.location.href.toString();
+        var re = eval('/(' + paramName + '=)([^&]*)/gi');
+        var nUrl = oUrl.replace(re, paramName + '=' + replaceWith);
+        this.location = nUrl;
+        window.location.href = nUrl
+    }
+    //鍒犻櫎鍒跺畾鍚堝悓椤甸潰
+    function delelid(KeyID, pageID) {
+
+     
         top.Dialog.confirm("鏄惁瑕佸垹闄よ鍚堝悓椤甸潰锛�", function () {
             window.location = "/Pages/business/CorporateClientsUpLoadContract.aspx?deleteKeyIds=" + KeyID + "&Keyid=" + pageID;
         }
         );
     }
-            
+
+
+
+    //缁存姢
+    function onViewuplodshow(keyid) {
+
+       
+        top.Dialog.open({ URL: "/Pages/business/CorporateClientsContractShow.aspx?Keyid=" + keyid, Title: "娴忚鍚堝悓", Width: 1024, Height: 750 });
+    }
+
+    $(document).ready(function () {
+        $("#file2").change(function () {
+            var myfile = document.getElementById('file2');
+         
+       
+            for (let i = 0; i < myfile.files.length; i++)
+        {
+                var filepath = myfile.files[i].name;
+          
+            var extStart = filepath.lastIndexOf(".");
+            var ext = filepath.substring(extStart, filepath.length).toUpperCase();
+            if (ext != ".BMP" && ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
+                alertMsg("鍥剧墖闄愪簬bmp,png,gif,jpeg,jpg鏍煎紡");
+                
+                return false;
+            } else { $("#fileType").text(ext) }
+             
+                var ext = filepath.substring(0, extStart);
+                if (isNumber(ext)) {
+
+                }
+                else {
+                    alertMsg(filepath + '鏂囦欢鍚嶆湁璇�');
+                    return false;
+                }
+                
+        }
+           
+            //var file_size = 0;
+            //if ($.browser.msie) {
+            //    var img = new Image();
+            //    img.src = filepath;
+            //    while (true) {
+            //        if (img.fileSize > 0) {
+            //            if (img.fileSize > 3 * 1024 * 1024) {
+            //                alert("鍥剧墖涓嶅ぇ浜�100MB銆�");
+            //            } else {
+            //                var num03 = img.fileSize / 1024;
+            //                num04 = num03.toFixed(2)
+            //                $("#fileSize").text(num04 + "KB");
+            //            }
+            //            break;
+            //        }
+            //    }
+            //} else {
+            //    file_size = this.files[0].size;
+            //    var size = file_size / 1024;
+            //    if (size > 10240) {
+            //        alert("涓婁紶鐨勫浘鐗囧ぇ灏忎笉鑳借秴杩�10M锛�");
+            //    } else {
+            //        var num01 = file_size / 1024;
+            //        num02 = num01.toFixed(2);
+            //        $("#fileSize").text(num02 + " KB");
+            //    }
+            //}
+            return true;
+        });
+    });
+    function isNumber(val) {
+        var regPos = /^\d+(\.\d+)?$/; //闈炶礋娴偣鏁�
+        var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //璐熸诞鐐规暟
+        if (regPos.test(val) || regNeg.test(val)) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
 </script>

--
Gitblit v1.9.1