viewExpress.html
2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
<title>main</title>
<script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="margin-left: 25px;margin-top: 5px;">
<label>快递单号:</label>
<span id="waybillCode"></span>
<br/>
<label>姓名:</label>
<span id="receiveName"></span>
<br/>
<label>手机号:</label>
<span id="receiveMobile"></span>
<br/>
<label>地址:</label>
<span id="receiveAddress"></span>
</div>
<div id="viewExpressDiv" region="center">
<table id="expressTable" border="1px" cellpadding="1" cellspacing="0" align="center"
style="margin-top: 15px; line-height: 30px;width:95%;border-color: #999999">
</table>
</div>
<script>
$(function () {
//获取物流信息
getExpressInfoAndAddressInfo();
});
function getExpressInfoAndAddressInfo(){
var form = new FormData();
form.append("orderCode", document.getElementById("buyerOrderCode").value);
form.append("expressTypeStr", "2,3,4");
//发送请求
$.ajax({
type: "POST",
url: contextPath + '/buyerOrder/queryExpressListAndAddressInfo',
data: form,
async: false,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function (result) {
if(result.code == 200) {
//地址信息
var addr = result.data.buyerOrderResp;
if(addr){
//$("#expressCompanyName").html(addr.expressCompanyName);
if(addr.platformWaybillCode){
$("#waybillCode").html(addr.platformWaybillCode+"("+addr.expressCompanyName+")");
}
$("#receiveName").html(addr.receiveName);
$("#receiveMobile").html(addr.receiveMobile);
$("#receiveAddress").html(addr.receiveAddress);
}
//物流信息
var arr = result.data.expressInfoRespList;
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>