username@email.com
2025-04-23 d34ca25b9754e49b2d1220ff9f0de6af9b734d99
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkBookUpLoad.aspx.cs" Inherits="CY.WebForm.Pages.business.WorkBookUpLoad" %>
 
<%-- 上传合同页面  廖 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" />
 
</head>
<body>
    <form id="form1" runat="server">
        <div class="box1" paneltitle="功能面板" roller="false">
            <table class="TableNewStyle">
                <tr>
                                  
 
 
                    <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()" />
                           <input type="hidden" id="HideKeyid" runat="server" /> 
                    </td>
                 
                </tr>
            </table>
 
 
        </div>
 
        
        
 
    </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() {
 
        
        var oFile = document.getElementById('filesel');
        if (oFile.value == "") {
            alertMsg('没有选择文件');
            return false;
 
        }
        //debugger;
        //replaceParamVal("deleteKeyIds", "");
        return true;
    }
 
    //改变参数
    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/WorkBookUpLoad.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>