userInfoList.html 6.5 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>

</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-right:20px"></a>
        <input id="register" class="easyui-combobox" value="1" data-options="
        editable: false,
		valueField: 'id',
		textField: 'text',
		data: [{id: '1',text: '已注册'},
		       {id: '0',text: '未注册'}]"/>
        <input id="buy" class="easyui-combobox" value="0" data-options="
        editable: false,
		valueField: 'id',
		textField: 'text',
		data: [{id: '0',text: '未购买'},
		       {id: '1',text: '已购买'}]"/>

        <a id="searchLinkbutton" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-search'">查询</a>
        <a id="exportButton" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 20px"
           data-options="iconCls:'icon-more'">导出</a>
        <a id="exportAllButton" class="easyui-linkbutton btn-primary" style="margin:0 20px 0 0"
           data-options="iconCls:'icon-more'">全部导出</a>

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

<script type="text/javascript">
    //  获取搜索参数
    function getParams() {
        var register = $("#register").combobox('getValue');
        var buy = $("#buy").combobox("getValue");

        var param = {};
        if (undefined !== register && null !== register && "" !== register) {
            param.register = register;
        }
        if (undefined !== buy && null !== buy && "" !== buy) {
            param.buy = buy;
        }
        return param;
    }

    $(function () {
        $("#batchProgram").linkbutton({
            text: "批量导入",
            iconCls: "icon-add",
            onClick: function () {
                batchProgramDialog();
            }
        });

        $("#productBuyLimitListTable").myDatagrid({
            fit: true,
            fitColumns: true,
            nowrap: false,
            //    url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList?&register=" + getParams().register + "&buy=" + getParams().buy,
            //  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: 5000,
            pageList: [5000],
            singleSelect: true
        });

    });

    function batchProgramDialog() {
        var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body));
        $(div).myDialog({
            width: "800px",
            height: "60%",
            href: contextPath + "/html/userInfo/userinfoBatch.html",
            modal: true,
            collapsible: true,
            cache: false
        });
    }
    $("#searchLinkbutton").linkbutton({
        onClick: function () {
            $("#productBuyLimitListTable").myDatagrid({
                fit: true,
                fitColumns: true,
                nowrap: false,
                //  queryParams: getParams(),
                url: contextPath + "/UserRegisterBuy/getUserRegisterBuyList?&register=" + getParams().register + "&buy=" + getParams().buy,
                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: 5000,
                pageList: [5000],
                singleSelect: true,
                checkOnSelect: false,
            });
        }
    });

    $("#exportButton").linkbutton({
        onClick: function () {
            window.open(contextPath + "/batch/export.do?type=userRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify(getParams()));
        }
    });

    $("#exportAllButton").linkbutton({
        onClick: function () {
            window.open(contextPath + "/batch/export.do?type=userRegisterBuyInfoserviceImpl&queryConf=" + JSON.stringify({
                        register: 2,
                        buy: 2
                    }));
        }
    });
</script>

</body>
</html>