chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        <link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
        
        <script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
        <script> var weburl = '{yun:}$config.sy_weburl{/yun}';</script>
 
        <title>后台管理</title>
        
        <style>
        * {margin: 0 ;padding: 0;}
        body,div{ margin: 0 ;padding: 0;}
 
        .layui-form-item {
            margin-bottom: 0px;
            clear: both;
        }
        </style>
    </head>
 
    <body class="body_ifm">
        <div class="infoboxp"> 
            <div class="tty-tishi_top">
            <div class="admin_new_tip">
                <a href="javascript:;" class="admin_new_tip_close"></a>
                <a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
                <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
                <div class="admin_new_tip_list_cont">
                    <div class="admin_new_tip_list">管理员可以上传企业HR相关常用文档表格,提供用户下载使用!可以提升网站用户粘贴性。</div>
                </div>
            </div>
 
                <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
                <form name="myform" target="supportiframe" action="index.php?m=hr&c=save" method="post" onSubmit="return cksubmit()" class="layui-form" enctype="multipart/form-data">
                    <table width="100%" class="table_form" style="background:#fff;">
                        <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
                        <input class="input-text" name="yurl" type="hidden" value="{yun:}$row.url{/yun}"/> 
                        <input class="input-text" name="url" type="hidden" value="{yun:}$row.url{/yun}" id='url'/> 
                        
                        <tr class="admin_table_trbg">
                            <th colspan="4" class="admin_bold_box">
                                <div class="admin_bold">添加文档</div>
                            </th>
                        </tr>
                        
                        <tr>
                            <th>文档名称:</th>
                            <td>
                                <div class="layui-input-block t_w480">
                                  <input type="text" name="name" id="name"  lay-verify="required" placeholder="请输入文档名称" value="{yun:}$row.name{/yun}" autocomplete="off" class="layui-input">
                                </div>
                            </td>
                        </tr>
 
                        <tr>
                            <th>文档类别:</th>
                            <td>
                                <div class="layui-input-inline t_w480">
                                    <select name="cid">
                                        {yun:}if $row.cid{/yun}
                                            {yun:}foreach item=v from=$t_class{/yun}
                                                {yun:}if $v.id eq $row.cid{/yun}
                                                    <option value="{yun:}$v.id{/yun}" selected>{yun:}$v.name{/yun}</option>
                                                {yun:}else{/yun}
                                                    <option value="{yun:}$v.id{/yun}" >{yun:}$v.name{/yun}</option>
                                                {yun:}/if{/yun}
                                            {yun:}/foreach{/yun}
                                        {yun:}else{/yun}
                                            <option value="">请选择</option>
                                        {yun:}/if{/yun}
                                        
                                        {yun:}if !$row.cid{/yun}
                                            {yun:}foreach item=v from=$t_class{/yun}
                                                <option value="{yun:}$v.id{/yun}">{yun:}$v.name{/yun}</option>
                                            {yun:}/foreach{/yun}
                                        {yun:}/if{/yun}
                                    </select>
                                </div>
                            </td>
                        </tr>
 
                        <tr>
                            <th>是否显示:</th>
                            <td>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <input type="hidden" name="is_show" id="is_show" value="{yun:}if $row.is_show{/yun}1{yun:}else{/yun}0{yun:}/if{/yun}"/>
                                        <input type="checkbox" lay-skin="switch" lay-text="是|否" lay-filter="swiId" {yun:}if $row.is_show=="1"{/yun}checked{yun:}/if{/yun} />
                                    </div>
                                </div> 
                            </td>
                        </tr>
 
                        <tr>
                            <th>上传文档:</th>
                            <td>
                                 <button type="button" class="layui-btn layui-btn-normal noupload">选择文档</button>
                                <input type="hidden" id="laynoupload" value="1"/> 
                                <input type="hidden" id="layfiletype" value="2"/>
                            </td>
                        </tr>
 
                        <tr>
                        <th>&nbsp;</th>
                            <td align="left" >
                                {yun:}if is_array($row){/yun} 
                                    <input type="hidden" name="id" value="{yun:}$row.id{/yun}">    
                                    <input class="layui-btn tty_sub" type="submit" name="submit" value="&nbsp;修 改&nbsp;" />
                                {yun:}else{/yun}
                                    <input class="layui-btn tty_sub" type="submit" name="submit" value="&nbsp;添 加&nbsp;" />
                                {yun:}/if{/yun}
 
                                <input class="layui-btn tty_cz" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
 
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
        <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
 
 
        <script language="javascript">
            layui.use(['layer', 'form','element'], function(){
                var layer = layui.layer
                    ,form = layui.form
                    ,element = layui.element
                    ,$ = layui.$;
 
                form.on('switch(swiId)', function(data){
                    if(this.checked){
                        $('#is_show').val(1);
                    }else{
                        $('#is_show').val(0);
                    }
                });
            });
         
            function cksubmit(){
                var name=$.trim($("#name").val());
                 if(name==''){parent.layer.msg("文档名称不能为空!",2,8);return false;}
 
 
             }
        </script>
 
    </body>
 
</html>