viewExpress.html
1.6 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
<!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>