liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
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
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>查看全部</title>
    <meta name="decorator" content="default"/>
 
</head>
<body>
         
        <table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
           <thead>
                   <tr>
                    <!-- <th> <input type="checkbox" class="i-checks"></th> -->
                    <th>签到卡号</th>
                    <th>时间</th>
                    <th>类型</th>
                    <th>补签</th>
                    <th>地点</th>
                    <th>说明</th>
                    <th>操作</th>
                </tr>
           </thead>
           <tbody>
                   <c:forEach items="${detaillist}" var="item">
                <tr>
                    <%-- <td> <input type="checkbox" id="${item.id}" class="i-checks"></td> --%>
                    <td>${item.signUserID}</td>
                    <td><fmt:formatDate value="${item.signTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td>${fns:getDictLabel(item.signType, 'sign_type', '')}</td>
                    <td></td>
                    <td>${item.locationId}</td>
                    <td>${item.signOther}</td>
                    <td>
                     <c:choose> 
                         <c:when test="${item.signType == '7' || item.signType == '8'}">
                             <shiro:hasPermission name="sign:sign:edit">
                                <a href="#" onclick="show_repair('补签','${item.signType}','${item.signUserID}');" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 补签</a>
                            </shiro:hasPermission>
                         </c:when>
                         <c:otherwise>
                             <shiro:hasPermission name="sign:sign:edit">
                                <a href="#" onclick="show_repair('修改','${item.signType}','${item.id}');" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
                                <%-- <a href="#" onclick="openDialog('修改', '${ctx}/sign/formSign/form?id=${item.id}','700px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
                             --%></shiro:hasPermission>
                         </c:otherwise>
                     </c:choose>
                    
                    </td>
                </tr>
                </c:forEach>
             </tbody>
<script>
    function show_repair(showTel,signType,id){
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引  
        var target = window.name ;
        openDialogS(showTel, '${ctx}/sign/sign/repair?id='+id +'&signType='+signType,'700px', '500px'  );
    //    console.log("---------------------------------"+target);
         
    }
    
    function openDialogS(title,url,width,height,target){
        top.layer.open({
            type: 2,  
            area: [width, height],
            title: title,
            maxmin: true, //开启最大化最小化按钮
            content: url ,
            btn: ['确定', '关闭'],
            yes: function(index, layero){
                 var body = top.layer.getChildFrame('body', index);
                 var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
                 var inputForm = body.find('#inputForm');
                 var top_iframe;
                 if(target){
                     top_iframe = target;//如果指定了iframe,则在改frame中跳转
                 }else{
                     top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe 
                 }
                 inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
                 
                if(iframeWin.contentWindow.doSubmit() ){
                    parent.layer.closeAll();//关闭对话框。
               //     top.layer.close(index);//关闭对话框。
                 }
              },
              cancel: function(index){ 
               }
        });     
        
    }
     
</script>
        </table>
    
</body>
 
 
 
</html>