unionShareUser.html 4.22 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 region="north" style="padding-bottom: 35px; height: auto;">
    <script>
        document.write(addHead('CPS联盟管理', 'CPS联盟用户管理'));
    </script>
    <form id="searchForm" method="post" accept-charset="utf-8">
        <div style="margin-left: 10px;margin-top: 10px">
            <label>用户ID:</label>
            <input class="easyui-textbox" id="uid" name="uid"/>
            <label>渠道号:</label>
            <input class="easyui-textbox" id="unionType" name="unionType"/>
            <label>是否有锁粉权限:</label>
            <input class="easyui-combobox" id="specialStatus" name="specialStatus"
                   data-options="valueField: 'value',
		                        textField: 'label',
		                        data: [{
			                      label: '是',
			                      value: '2'
		                          },{
			                      label: '否',
			                      value: '1'
		                          }]">
            </input>
            <a id="searchBtn" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">查询</a>
        </div>
    </form>
</div>
<div region="center">
    <div style="margin-left: 30px;margin-top: 20px; height: 500px;">
        <table id="userTable"></table>
    </div>
</div>
<script type="text/javascript">
    $(function () {

        $("#userTable").myDatagrid({
            fit: true,
            fitColumns: true,
            <!-- idField: "id",-->
            nowrap: false,
            url: contextPath + "/UnionShareRest/queryUnionShareUsers",
            method: 'POST',
            loadFilter: function (data) {
                var temp = defaultLoadFilter(data);
                temp=null==temp?[]:temp;
                temp.rows = temp.list;
                return temp;
            },
            columns: [[{
                title: "用户ID",
                field: "uid",
                width: 200,
                align: "center"
            }, {
                title: "渠道号",
                field: "unionType",
                width: 200,
                align: "center"
            }, {
                title: "渠道名称",
                field: "unionName",
                width: 200,
                align: "center"
            }, {
                title: "是否有锁粉权限",
                field: "specialStatus",
                width: 200,
                align: "center",
                formatter: function (value, rowData, rowIndex) {
                    //状态:1-申请中,2-通过,3-拒绝
                    if(value == 1) {
                        return "否";
                    }
                    if(value == 2) {
                        return "是";
                    }
                }
           }, {
                title: "创建时间",
                field: "createTimeStr",
                width: 200,
                align: "center"
            }, {
                title: "更新时间",
                field: "updateTimeStr",
                width: 200,
                align: "center"
            }, {
                title: "参与新人活动id",
                field: "cpsActivityId",
                width: 100,
                align: "center"
            }
            ]],
            cache: false,
            pagination: true,
            pageSize: 10,
            pageList: [10],
            idField: "id",
            singleSelect: false,
            checkOnSelect: false
        });

        $("#searchBtn").linkbutton({
            iconCls : "icon-search",
            onClick : function() {
                var param = getParams();
                $("#userTable").myDatagrid("load", param);
            }
        });


        function getParams() {
            var param = {
                uid:$("#uid").val(),
                unionType:$("#unionType").val(),
                specialStatus:$("#specialStatus").combobox('getValue')
            };
            return param;
        }


    });
</script>
</body>
</html>