<%@ page contentType="text/html;charset=UTF-8" %>
<%
    String pd_number=request.getParameter("pd_number");
    String pd_user=request.getParameter("pd_user");
%>
<link rel="stylesheet" href="<%=request.getContextPath()%>/js/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/pagination.css">
<div class="page-container">

    <div class="content" >
        <div class="search-form" style="padding:0px;">
            <form  method="post" id="data_form_search" name="data_form_search">
                <input type="hidden" name="pd_number"  value="<%=pd_number%>"/>
                <input type="hidden" name="pd_user"  value="<%=pd_user%>"/>
                <input type="hidden" name="page_number" id="page_number" value="1"/>
                <input type="hidden" name="page_size" id="page_size" value="10"/>
            </form>
        </div>
        <div class="datalist " id="datalist">
        </div>
    </div>
</div>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.pagination.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript">
    function searchModel() {
        $.ajax({
            type: "post",
            url: "list_zc_ajax.jsp",
            data: $('#data_form_search').serialize(),
            success: function (msg) {
                //data_form_search.reset();
                $("#datalist").html(msg);
            }
        });
    }


    function searchUserModel() {
        $("#page_number").val("1");
        searchModel();
    }
    $(function(){
        searchModel();
    });
    function chongzhi(){
        $("#page_size").val("10");
        data_form_search.reset();
        searchUserModel();
    }
    /*用户-编辑*/
    function addRules(title, url) {
        var abc = layer.open({
            title:title,
            type: 2,
            content: url,
            maxmin: true
        });
        layer.full(abc);
    }
    function saveForm(){
        var ly_id=$("#ly_id").val()
        $.ajax({
            type: "POST",
            url: "./action.jsp",
            data: $('#form1').serialize(),
            success: function (msg) {
                if (msg.indexOf("success") >= 0) {
                    layer.msg('操作成功!', {icon: 1, time: 1000},
                        function () {
                            parent.parent.addRules("./list_ly-t.jsp?ly_id="+ly_id+"&action=update","");
                            parent.closeIframe();
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                            //parent.location.href="./list_ly-t.jsp?ly_id="+ly_id;
                        });
                } else {
                    layer.msg('操作失败'+msg, {
                        icon: 5,
                        time: 2000 //2秒关闭（如果不配置，默认是3秒）
                    }, function () {
                    });
                }
            }
        });
    }
</script>