viewExpress.html 1.6 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <title>main</title>
    <script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout" fit="true">

<div id="viewExpressDiv" region="center">
    <table id="expressTable" border="1px" cellpadding="1" cellspacing="0" align="center"
           style="margin-top: 30px; line-height: 30px;width:95%;border-color: #999999">
    </table>

</div>
<script>
    $(function () {
        //获取物流信息
        getExpressInfo();        
    });
    
    function getExpressInfo(){
    	var form = new FormData();
	    form.append("orderCode", document.getElementById("buyerOrderCode").value);
	    form.append("expressTypeStr", "2,3,4");
        //发送请求
		$.ajax({
		     type: "POST",
             url: contextPath + '/buyerOrder/queryExpressList',
             data: form,
             async: false,
             cache: false,
             contentType: false,
             processData: false,
             dataType: 'json',
             success: function (result) {
                 if(result.code == 200) {
                	 var arr = result.data;
                	 var str = "<tr><th>运单信息</th><th>时间</th></tr>"
                	 for(i=0; i<arr.length; i++){
                		 str = str + "<tr><td>" + arr[i].acceptRemark + "</td><td>" + arr[i].createTimeStr + "</td></tr>";
                	 }
                	 $("#expressTable").html(str);
                 }
                 else {
                     $.messager.alert("失败", result.message, "error");
                 }
             }
         });           
    }
    
</script>
</body>
</html>