clearance.html 3.75 KB
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Yoho!Buy运营平台</title>
    <script src="/ufoPlatform/js/include.js"></script>
    <script src="/ufoPlatform/js/ajaxfileupload.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="height: 230px">
    <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 id="orderCode" type="text" class="easyui-textbox"  style="width:150px"/>
        <label>包裹号:</label><input id="waybillCode" type="text" class="easyui-textbox" style="width:150px"/>
        <a id="searchLinkButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">筛选</a>
        <a id="exportButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-add'">导出</a>
    </div>
</div>
<div region="center">
    <div style="margin-left: 30px;margin-top: 20px;height: 660px">
        <table id="clearanceTable"></table>
    </div>
</div>

<script type="text/javascript">

    var brandId;
    $(function () {
        $("#clearanceTable").myDatagrid({
            fit: true,
            fitColumns: true,
            nowrap: false,
            url: contextPath + "/clearance/queryClearanceRecord",
            method: 'POST',
            /*queryParams: {
             'brandName':'',
             'status':''
             },*/
            loadFilter: function (data) {
                var temp = defaultLoadFilter(data);
                temp.rows = temp.list;
                return temp;
            },
            columns: [[{
                title: "操作",
                field: "",
                width: 120,
                align: "center",
                formatter: function (value, rowData) {
                    if (rowData) {
                        var result = '';
                        for(var item in rowData) {
                            result += item;
                            result += ' : ' + rowData[item] + '<br/>';
                        }
                        return result;
                    }
                    return rowData;
                }
            }]],
            cache: false,
            pagination: true,
            pageSize: 10,
            pageList: [10],
            idField: "id",
            singleSelect: false,
            checkOnSelect: false,
            onLoadSuccess: function () {
            }
        });


        // 搜索
        $("#searchLinkButton").linkbutton({
            onClick: function () {
                var param = getParams();
                $("#clearanceTable").myDatagrid("load", param);
            }
        });

        $("#exportButton").linkbutton({
            onClick : function() {
                // var params = {"poolId": poolId.toString()};

                var param = getParams();
                window.open(contextPath + "/batch/export.do?type=ClearanceRecordService&queryConf=" + escape(JSON.stringify(param)));
            }
        });

        /**
         * 提取出搜索参数
         */
        function getParams() {
            var waybillCode = $("#waybillCode").val();
            var orderCode = $("#orderCode").val();
            var param = {};
            if (undefined !== orderCode && null !== orderCode && "" !== orderCode) {
                param.orderCode = orderCode;
            }
            if (undefined !== waybillCode && null !== waybillCode && "" !== waybillCode) {
                param.waybillCode = waybillCode;
            }
            return param;
        }
    });
</script>

</body>
</html>