userinfoList.html 6.99 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/union/js/include.js"></script>
    <script src="/union/js/ajaxfileupload.js"></script>
    <script src="/union/js/jquery.table2excel.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div id="search" region="north" style="height: 170px;" class="xsdvideogl">
    <script>
        document.write(addHead('运营管理', '用户信息列表'));
    </script>
    <div style="margin-left: 30px;margin-top: 20px;">
        <a id="batchProgram" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 20px"></a>
        <a id="exportButton" class="easyui-linkbutton btn-primary" style="margin-right:20px"
           data-options="iconCls:'icon-more'">批量导出</a>

        <!--<button>Export</button>-->

        <input id="isReplyCombobox" class="easyui-combobox" value="1" data-options="
        editable: false,
		valueField: 'id',
		textField: 'text',
		data: [{
			id: '1',
			text: '已注册'
		}, {
			id: '2',
			text: '未注册'
		}]"/>
        <input id="isDeleteCombobox" class="easyui-combobox" value="1" data-options="
        editable: false,
		valueField: 'id',
		textField: 'text',
		data: [{
			id: '1',
			text: '未购买'
		}, {
			id: '0',
			text: '已购买'
		}]"/>

        <a id="searchLinkbutton" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-search'">查询</a>

    </div>
</div>
<div region="center" id="productBuyLimitListDiv">
    <table id="productBuyLimitListTable" style="widght: 600px;"></table>
</div>

<script type="text/javascript">

    function getParams() {
        var isRegister = $("#isRegister").combobox('getValue');
        var isBuy = $("#isBuy").combobox("getValue");

        var param = {};
        if (undefined !== isRegister && null !== isRegister && "" !== isRegister) {
            param.isRegister = isRegister;
        }
        if (undefined !== isBuy && null !== isBuy && "" !== isBuy) {
            param.isBuy = isBuy;
        }
        return param;
    }
    $(function () {
        $("#batchProgram").linkbutton({
            text: "批量导入",
            iconCls: "icon-add",
            onClick: function () {
                batchProgramDialog();
            }
        });

        $("#productBuyLimitListTable").myDatagrid({
            fit: true,
            fitColumns: true,
            nowrap: false,
            //      url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList",
         //   method: 'POST',
            loadFilter: function (data) {
                var temp = defaultLoadFilter(data);
                temp.rows = temp.list;
                return temp;
            },
            columns: [[{
                title: "序号",
                field: "id",
                width: 20,
                align: "center"
            }, {
                title: "手机号",
                field: "mobile",
                width: 45,
                align: "center"
            }, {
                title: "uid",
                field: "uid",
                width: 65,
                align: "center"
            }, {
                title: "是否注册",
                field: "register",
                width: 30,
                align: "center"
            }, {
                title: "注册时间",
                field: "registerTime",
                width: 60,
                align: "center"
            }, {
                title: "是否购买",
                field: "buy",
                width: 30,
                align: "center"
            }]],
            cache: false,
            pagination: true,
            pageSize: 10,
            //    pageList: [10],
            //     idField: "mobile",
            singleSelect: true,
            checkOnSelect: false,
            onLoadSuccess: function () {
            }
        });
    });


    function batchProgramDialog() {
        var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body));
        $(div).myDialog({
            width: "800px",
            height: "60%",
            href: contextPath + "/html/getUserInfo/userinfoBatch.html",
            modal: true,
            collapsible: true,
            cache: false
        });
    }

    // linkbutton点击事件注册
    /**
     * searchLinkbutton
     */
    $("#searchLinkbutton").linkbutton({
        onClick: function () {
            $("#userListTable").myDatagrid({
                fit: true,
                fitColumns: true,
                nowrap: false,
                  queryParams: getParams(),
                url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList",
                        //?&register=" + getParams().isRegister + "&buy=" + getParams().isBuy,
                method: 'GET',
                loadFilter: function (data) {
                    var temp = defaultLoadFilter(data);
                    temp.rows = temp.list;
                    return temp;
                },
                columns: [[{
                    title: "序号",
                    field: "id",
                    width: 20,
                    align: "center"
                }, {
                    title: "手机号",
                    field: "mobile",
                    width: 45,
                    align: "center"
                }, {
                    title: "uid",
                    field: "uid",
                    width: 65,
                    align: "center"
                }, {
                    title: "是否注册",
                    field: "register",
                    width: 30,
                    align: "center"
                }, {
                    title: "注册时间",
                    field: "registerTime",
                    width: 60,
                    align: "center"
                }, {
                    title: "是否购买",
                    field: "buy",
                    width: 30,
                    align: "center"
                }]],
                cache: false,
                pagination: true,
                pageSize: 10,
                pageList: [10],
                idField: "mobile",
                singleSelect: true,
                checkOnSelect: false,
                onLoadSuccess: function () {
                }
            });


            //   $("#productBuyLimitListTable").datagrid('loadData', data);
        }
    });

    $("#exportButton").linkbutton({
        onClick: function () {
            onclick=window.open("http://localhost:8083/union/html/getUserInfo/search.html")
    //        window.open(contextPath + "/batch/export.do?type=UserRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify(getParams()));
        }
    });

    //数据导出
//    $("#exportButton").click(function () {
//        $("#productBuyLimitListTable").table2excel({
//            exclude: ".noExl",
//            name: "Excel Document Name",
//            filename: "用户注册购买统计表",
//            exclude_img: true,
//            exclude_links: true,
//            exclude_inputs: true
//        });
//    });
</script>

</body>
</html>