pass.html
3.86 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!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="passDiv" 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="receiveInfo"></span>
</td>
</tr>
<tr>
<td>快递公司:</td>
<td colspan="2">
<input id="expressCompany" class="easyui-combobox"/>
</td>
</tr>
<tr>
<td>快递单号:</td>
<td colspan="2">
<input type="text" class="easyui-textbox" id="waybillCode" />
</td>
</tr>
</table>
</div>
<script>
$(function () {
//根据买家订单号获取买家收货地址
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) {
var name = result.data.receiveName;
var mobile = result.data.receiveMobile;
var address = result.data.receiveAddress;
$("#receiveInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address);
}
else {
$.messager.alert("失败", result.message, "error");
}
}
});
// 快递公司下拉框
$("#expressCompanySelector").combobox({
valueField : "activityId",
textField : "activityName",
selectOnNavigation : true,
editable:false,
selectOnNavigation : true,
url : contextPath + "/MakePriceController/getActivityMenu.do",
// 品牌联动
onChange:function(data){
if(data == "") {
$("#name").textbox({disabled:false});
$("#startTime").datetimebox({disabled:false});
$("#endTime").datetimebox({disabled:false});
} else {
$("#name").textbox({disabled:true});
$("#startTime").datetimebox({disabled:true});
$("#endTime").datetimebox({disabled:true});
//创建formdata
var form = new FormData();
form.append("activityId", data);
//发送请求
$.ajax({
type: "POST",
url: contextPath + '/MakePriceController/getActivity.do',
data: form,
async: false,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function (result) {
if(result.code == 200) {
$("#name").textbox('setValue',result.data.title);
$("#startTime").datetimebox('setValue',result.data.effectiveTime);
$("#endTime").datetimebox('setValue',result.data.effectiveTimeEnd);
}
else {
$.messager.alert("失败", result.message, "error");
}
}
});
}
},
loadFilter: function (data) {
return defaultLoadFilter(data);
}
});
});
</script>
</body>
</html>