cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
[#macro upload id="" name=id multiple="false" allowTypes="*" fileSizeLimit="5000K" values=[] type=""]
<script src="${base}/static/plugins/uploadify/jquery.uploadify.min.js" type="text/javascript" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css" href="${base}/static/plugins/uploadify/uploadify.css">
<style>
/** 清除内外边距 **/ 
body, div, h1, h2, h3, h4, h5, h6, hr, p, span, a,
blockquote, /* structural elements 结构元素 */ 
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 
pre, /* text formatting elements 文本格式元素 */ 
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 
th, td, /* table elements 表格元素 */ 
img/* img elements 图片元素 */{ 
    border:none;
    padding:0;
    margin:0;
    outline:0 none;
    }
/** 设置默认字体 **/ 
body, button, input, select, textarea{ 
  font:12px/1.5 '宋体',tahoma, Srial, helvetica, sans-serif; 
    } 
h1, h2, h3, h4, h5, h6{font-weight: normal; font-size: 100%;} 
em{font-style:normal;} 
/** 重置列表元素 **/ 
ul, ol{list-style:none;} 
/** 重置超链接元素 **/ 
a{text-decoration:none; color:#333; cursor:pointer;} 
a:hover{color:#F40;} 
/** 重置图片元素 **/ 
img{border:0px;} 
/** 重置表格元素 **/ 
table{border-collapse:collapse; border-spacing:0;}
 
/* 清除浮动 */
.clearfix:before, .clearfix:after {
    content: "\0020";
    display: block;
    height: 0;
    overflow: hidden;
    }  
.clearfix:after { clear: both; }  
.clearfix { zoom: 1; }
 
.uploadBtn, .uploadBtn:hover{
    border:1px solid #bbbbbb;
    color:#FFF;
    font-weight:bold;
    text-shadow:none;
    }
.detailCon{
    background:#f6f6f6;
    color:#4d4d4d;
    font:12px "微软雅黑";
    line-height:24px;
    padding:20px 20px 10px 20px;
    }
.detailCon label{
    display:block;
    float:left;
    margin-right:5px;
    text-align:right;
    width:60px;
    }
.detailCon .fileUpload{
    clear:both;
    height:24px;
    line-height:24px;
    _height:28px;
    _line-height:28px;
    margin:0 20px 10px 0;
    }
.detailCon .fileUpload a{
    background:#FFF;
    border-radius:15px;
    height:22px;
    line-height:22px;
    margin:0 5px;
    }
.detailCon .fileUpload a i{
    background:url(images/fileUpload.png) no-repeat left;
    font-style:normal;
    padding:0 10px 0 18px;
    }
.detailCon .fileShow{
    margin-bottom:10px;
    }
.detailCon .fileShow table{
    background:#FFF;
    border:1px solid #bfbfbf;
    float:left;
    margin-top:5px;
    }
.detailCon .fileShow table td{
    border-bottom:1px dotted #bfbfbf;
    padding:10px;
    }
.detailCon .fileShow table td input{
    background:#FFF;
    border-bottom:1px solid #bfbfbf;
    color:#898989;
    height:23px;
    line-height:23px;
    padding-left:5px;
    width:200px;
    }
</style>
<script type="text/javascript">
 
    function onFileDelete(href){
        if(!confirm('确定要删除吗?')) return false;
        href.parent(".fileDiv").remove();
    }
    
    $(function(){
        $("#${id}_files").uploadify({
            height        : 22,
            width         : 100,
            removeTimeout:0,
            buttonText :"",
            buttonClass :"uploadBtn",
            //wmode :"transparent",
            buttonImage :"${base}/static/plugins/uploadify/uploadfileBtnBg.gif",
            queueSizeLimit:10,
            swf           : '${base}/static/plugins/uploadify/uploadify.swf',
            uploader      : '${base}/interface/fileupload/upload.html',
            fileTypeExts : '${allowTypes}',
            fileSizeLimit : '${fileSizeLimit}',
            onUploadSuccess : function(file, data, response){
                var data =  JSON.parse(data);
                var html = '<div class="fileDiv">'+
                                '<input type="hidden" name="FILE_ID" value="" />'+
                                '<input type="hidden" name="TYPE" value="${type}" />'+
                                '<input type="hidden" name="EXT_NAME" value="'+ data.EXT_NAME +'" />'+
                                '<input type="hidden" name="FIELD_NAME" value="'+ data.FIELD_NAME +'" />'+
                                '<input type="hidden" name="FILE_PATH" value="'+ data.FILE_PATH +'" />'+
                                '<input type="hidden" name="FILE_SIZE" value="'+ data.FILE_SIZE +'" />'+
                                '<input type="hidden" name="FILE_NAME" value="'+ data.FILE_NAME +'" />'+
                                '<a target="_blank" href="${base}/'+data.FILE_PATH+'">'+ data.FILE_NAME +'</a>'+
                                '<input type="text" name="FILE_NOTE" " />'+
                                '<a href="####" onclick="return onFileDelete($(this));">[删除]</a>'+
                            '</div>';
                $("#fileList${type}").append(html);
            }
        });
    });
</script>
<div id="fileList${type}">
    [#list values as d]
    <div class="fileDiv">
        <input type="hidden" name="FILE_ID" value="${d.ID}" />
        <input type="hidden" name="EXT_NAME" value="${d.FILETYPE}" />
        <input type="hidden" name="FIELD_NAME" value="${d.FIELD_NAME}" />
        <input type="hidden" name="FILE_PATH" value="${d.FILEPATH}" />
        <input type="hidden" name="FILE_SIZE" value="${d.FILESIZE}" />
        <input type="hidden" name="FILE_NAME" value="${d.FILENAME}" />
        <input type="hidden" name="TYPE" value="${d.TYPE}" />
        <a target="_blank" href="${base+d.FILEPATH}">${d.FILENAME}</a>
        <input type="text" name="FILE_NOTE" value="${d.FILENOTE}" />
        <a href="####" onclick="return onFileDelete($(this));">[删除]</a>
    </div>
    [/#list]
</div>
<input  type="file" name="${id}_files" multiple id="${id}_files" value=""/>
[/#macro]