userOrders.html 6.03 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('市场管理', '联盟订单管理'));
    </script>
    <style>
        .div_search input { margin-top: 20px; }
        .div_search .textbox { margin-top: 20px; }
        .div_search .easyui-linkbutton { margin-top: 20px; }
    </style>
    <div style="margin-left: 30px;" class="div_search">
    <label>开始时间:</label>
    <input class="easyui-datetimebox" id="beginTime">
    </input>

    <label>结束时间:</label>
    <input class="easyui-datetimebox" id="endTime">
    </input>

    <label>订单号:</label>
    <input class="easyui-textbox" id="orderCode" >
    </input>

    <label>联盟用户ID:</label>
    <input class="easyui-textbox" id="unionId">
    </input>

    <label>渠道:</label>
    <input class="easyui-textbox" id="unionType">
    </input>
    <a id="searchBtn" class="btn-info">查询</a>
    </div>
</div>
<div region="center">
    <div style="margin-left: 30px;margin-top: 20px; height: 500px;">
        <table id="userOrdersTable"></table>
    </div>
</div>
<script type="text/javascript">
        $(function () {

            $("#userOrdersTable").myDatagrid({
                fit: true,
                fitColumns: true,
                queryParams:{
                    beginTime : $("#beginTime").val(),
                    endTime : $("#endTime").val(),
                    orderCode : $("#orderCode").val(),
                    unionId : $("#unionId").val()
            },
                nowrap: false,
                url: contextPath + "/UnionRest/queryUnionOrders",
                method: 'POST',
                loadFilter: function (data) {
                    var temp = defaultLoadFilter(data);
                    temp.rows = temp.list;
                    return temp;
                },
                columns: [[{
                    title: "ID",
                    field: "id",
                    width: 70,
                    align: "center"
                }, {
                    title: "联盟用户ID",
                    field: "unionId",
                    width: 170,
                    align: "center"
                }, {
                    title: "下单时间",
                    field: "orderTime",
                    width: 170,
                    align: "center"
                }, {
                    title: "订单号",
                    field: "orderCode",
                    width: 170,
                    align: "center"
                }, {
                    title: "订单用户ID",
                    field: "uid",
                    width: 170,
                    align: "center"
                }, {
                    title: "订单金额",
                    field: "orderAmount",
                    width: 170,
                    align: "center"
                }, {
                    title: "优惠券金额",
                    field: "couponAmount",
                    width: 170,
                    align: "center"
                }, {
                    title: "YOHO币",
                    field: "yohoCoinNum",
                    width: 170,
                    align: "center"
                }, {
                    title: "运费",
                    field: "shipmentAmount",
                    width: 170,
                    align: "center"
                }, {
                    title: "实付金额",
                    field: "realPayAmount",
                    width: 170,
                    align: "center"
                }, {
                    title: "订单状态",
                    field: "orderStatus",
                    width: 170,
                    align: "center"
                }, {
                    title: "渠道",
                    field: "unionType",
                    width: 170,
                    align: "center"
                }, {
                    title: "附加信息",
                    field: "exetInfmoation",
                    width: 170,
                    align: "center"
                }, {
                    title: "支付方式",
                    field: "payChannel",
                    width: 170,
                    align: "center"
                }, {
                    title: "是否新客",
                    field: "isNew",
                    width: 170,
                    align: "center"
                }
                ]],
                cache: false,
                pagination: true,
                pageSize: 10,
                pageList: [10],
                idField: "id",
                singleSelect: false,
                checkOnSelect: false,
                onLoadSuccess: function (data) {

                    $(this).myDatagrid("getPanel").find("a[role='delete']").linkbutton({
                        iconCls: "icon-more",
                        onClick: function () {
                            deleteBlack($(this).attr("dataId"));
                        }
                    });
                }
            });

            function getParam(table) {
                var paramsArray = $("#"+table+"").serializeArray();
                var params = {};
                for (var i = 0; i < paramsArray.length; i++) {
                    params[paramsArray[i].name] = paramsArray[i].value;
                }
                return params;
            }

            $("#searchBtn").linkbutton({
                iconCls : "icon-search",
                onClick : function() {
                    $("#userOrdersTable").datagrid("load", {
                        beginTime : $("#beginTime").val(),
                        endTime : $("#endTime").val(),
                        orderCode : $("#orderCode").val(),
                        unionId : $("#unionId").val()
                    });
                }
            });


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