username@email.com
2025-05-15 6fe02a16e55f17e45a3997171e1b2284d45af25b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderUpLoadLiuyang.aspx.cs" Inherits="CY.WebForm.Pages.business.OrderUpLoadLiuyang" %>
 
<%-- 上传合同页面  廖 20210916增加--%>
<!DOCTYPE html>
<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" />
    <title></title>
 
 
    <uc:CMSHead ID="CMSHead1" runat="server" />
    <style>
    .toast-message {
        position: absolute;
    width: 90px; /* 固定宽度 */
    height: 60px; /* 固定高度 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 调整位置使其居中 */
    background-color: lightblue;
    font-size: 20px; /* 设置文字大小 */
    text-align: center; /* 设置文字居中 */
    }
</style>
</head>
<body>
    <form id="form1" runat="server">
      <%--  <div class="box1" paneltitle="功能面板" roller="false">
            <table class="TableNewStyle">
                <tr>
                    <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()" />
<div id="loading" class="toast-message" style="display: none;">上传中!</div>
                    </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>
                        <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>
                    <table class="tableStyle">
                        <tr>
                            <%-- <th width="25"></th>--%>
                            <th width="200" style="text-align: center">名称
                            </th>
                            <th style="text-align: center">预览
                            </th>
                            <th style="text-align: center">操作
                            </th>
 
 
                        </tr>
                </HeaderTemplate>
 
 
                <ItemTemplate>
                    <tr>
                        <%-- <td>
                                <input type="checkbox" class="SelectCheck" value_kid="<%#Eval("Keyid")%>" />
                            </td>--%>
                        <td> <%#Eval("FileName")%>                     
                        </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>
 
 
                <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", "");
        showLoadingIndicator();
        return true;
    }
    //查看
    function checkSelFile() {
 
        if (document.getElementById("TextPage").value == "") {
            alertMsg("没有输入页数");
 
            return false;
        }
        var oFile = document.getElementById('filesel');
        if (oFile.value == "") {
            alertMsg('没有选择文件');
            return false;
 
        }
        showLoadingIndicator();
        //debugger;
        //replaceParamVal("deleteKeyIds", "");
        return true;
    }
 
 
    function showLoadingIndicator() {
        document.getElementById('loading').style.display = 'block';
    }
 
    function hideLoadingIndicator() {
        document.getElementById('loading').style.display = 'none';
    }
 
    //改变参数
    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/OrderUpLoadLiuyang.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>