<hi:Common_AliOHHeader runat="server" />
<div class="pbox">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">
                运单信息</h3>
        </div>
        <div class="panel-body">
            <div>
                物流公司：<asp:literal runat="server" id="litCompanyName" /></div>
            <div>
                运单号码：<asp:literal runat="server" id="litLogisticsNumber" /></div>
        </div>
    </div>
</div>
<script type="text/javascript">

    //隐藏右上角菜单
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    });

    //隐藏底部菜单
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideToolbar');
    });
</script>
<script type="text/javascript">
    $(function () {
        var OrderId = window.location.search;
        OrderId = OrderId.substring(OrderId.indexOf("=") + 1);
        var url = '/api/VshopProcess.ashx';
        $.getJSON(url, { action: 'Logistic', orderId: OrderId }, function (resultData) {
            if (resultData.message=="ok") {
                Logstics(resultData);
            }
            else {
                var addr = $("<div class=\"alert alert-warning alert-dismissable\"><div class=\"time font-s\"></div><div class=\"info\">" + resultData.message + "</div></div>");
                $(".pbox").append(addr);
            }
        });
    });

    function Logstics(express) {
        var perday = "";
        $(express.data).each(function (index, day) {
            if (perday != day.time.substr(0, 10)) {
                perday = day.time.substr(0, 10);
                var newdatediv = $("<p class=\"text-center\"><span class=\"label\"></span></p>");
                $(newdatediv).find("span").html(perday);
                $(".pbox").append($(newdatediv));
            }
            var addr = $("<div class=\"well active\"><div class=\"time font-s\"></div><div class=\"info\"></div></div>");
            $(addr).find("div").eq(0).html(day.time);
            $(addr).find("div").eq(1).html(day.context);
            $(".pbox").append($(addr));

        });
        $(".well:first").attr("class", "alert alert-warning alert-dismissable");
    }
</script>
<hi:Common_AliOHFooter runat="server" />
