buyerReceiveInfo.html 2.35 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="buyerReceiveInfoDiv" region="center">
    <table id="passTable" border="1px" cellpadding="1" cellspacing="0" align="center"
           style="margin-top: 30px; line-height: 30px;width:95%;border-color: #999999">
       <tr>
           <td>快递公司:</td>
           <td colspan="2" >
               <span id="expressCompanyName"></span>
           </td>
       </tr>
       <tr>
           <td>快递单号:</td>
           <td colspan="2">
               <span id="waybillCode"></span>
           </td>
       </tr>
       <tr>
           <td>姓名:</td>
           <td colspan="2">
               <span id="receiveName"></span>
           </td>
       </tr>
       <tr>
           <td>手机号:</td>
           <td colspan="2">
               <span id="receiveMobile"></span>
           </td>
       </tr>
       <tr>
           <td>地址:</td>
           <td colspan="2">
               <span id="receiveAddress"></span>
           </td>
       </tr>
    </table>

</div>
<script>
    $(function () {
        //根据买家订单号获取买家收货信息
        getReceiveInfo();        
    });
    
    function getReceiveInfo(){
    	var form = new FormData();
	    form.append("orderCode", document.getElementById("buyerOrderCode").value);
        //发送请求
		$.ajax({
		     type: "POST",
             url: contextPath + '/buyerOrder/getReceiveInfoByOrderCode',
             data: form,
             async: false,
             cache: false,
             contentType: false,
             processData: false,
             dataType: 'json',
             success: function (result) {
                 if(result.code == 200) {
                	 $("#expressCompanyName").html(result.data.expressCompanyName);
                	 $("#waybillCode").html(result.data.platformWaybillCode);
                	 $("#receiveName").html(result.data.receiveName);
                	 $("#receiveMobile").html(result.data.receiveMobile);
                	 $("#receiveAddress").html(result.data.receiveAddress);
                 }
                 else {
                     $.messager.alert("失败", result.message, "error");
                 }
             }
         });           
    }
    
</script>
</body>
</html>