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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>新增文件</title>
[#include "/business/pages/include/static.html" /]
[#include "/component/webupload.html" /]
<script type="text/javascript" src="${common_static}/static/plugins/easyui/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="${common_static}/static/plugins/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${common_static}/static/style/fileManage/css/file-manager.css">
<link rel="stylesheet" href="${common_static}/static/ui/utilfunc/css/utilfunc.css">
<link rel="stylesheet" type="text/css" href="${common_static}/static/style/fileManage/utilfunc/css/reset.css">
<script type="text/javascript" src="${common_static}/static/style/fileManage/utilfunc/js/jquery.popui.js"></script>
<script type="text/javascript" src="${common_static}/static/style/fileManage/utilfunc/js/utilfunc.js"></script>
</head>
<body class="end_task_body widthauto">
 
<script type="text/javascript">
    $(document).ready(function() {
        $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
                document.getElementById("myform").target = window.top.openDialog("1","操作",
                             {},
                             {"width":40,"height":40,"noclose":true},
                             [{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                             return true;
        }});
//         $("#chose_path").formValidator({empty:false,onFocus:"请选择文件路径",onShow:"请选择文件路径"}).inputValidator({min:1,onError:"请选择文件路径"});
        $("#files").formValidator({empty:false,onFocus:"请上传文件",onShow:"请上传文件"}).inputValidator({min:1,onError:"请上传文件"});
        $("#note").formValidator({empty: true}).inputValidator({max:100,onError:"备注不能超过50个汉字!"});
    });
</script>
 
<div class="edit_txt">
    <form id="myform" action="${base}/business/pages/fileManage/doc/addFile.html" method="post">
         <table class="edit_layout2">
                <tr>
                    <th><label class="required">文件路径:</label></th>
                    <td>
                        <input class="general" type="text" name="chose_path" id="chose_path" value=""/>
                        <div id="chose_pathTip" style="display:inline-block;width:180px;"></div>
                        <input class="general" type="hidden" name="folderId" id="folderId" value=""/>
                    </td>
                </tr>
                
                <tr>
                    <th><label class="required">文件:</label></th>
                    <td>
                    <div class="upload_file">
                        [@webupload id="files" multiple="true" extensions="*"/]
                    </div>
                </td>
                </tr>
                <tr>
                       <th>备注:</th>
                    <td colspan="2">
                      <textarea style="width:60%;" class="general" name="note" id="note"></textarea>
                      <div id="noteTip" style="display:inline-block;width:180px;"></div>
                    </td>
                </tr>
            </table>
     </form>
</div>
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            var path=$("#chose_path").val();
            if(path==""){
                 window.top.popupTips("请选择文件路径");
                 return;
            }
            $("#myform").submit();
        }
    }
var folderId = "";
var folderName = "";
$('#chose_path').click(function(){
    var url = "${base}/business/pages/fileManage/doc/toFileTree.html";
               window.top.openDialog("tree","选择文件路径",
         {},
         {"width":60,"height":70},
         [{btnId:"btnSure", btnName:"提交", btnStyle:"bluebtn"}],
         url);
});
    
    function checkFolder(folderId,folderName){
        $("#folderId").val(folderId);
        $("#chose_path").val(folderName);
    }
</script>
 
</body>
</html>