orderDetail.html
19.4 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<!DOCTYPE html>
<div id="main" region="center" style="height:900px;">
<div id="tt" class="easyui-tabs" style="height:900px;">
<div title="订单信息" style="padding:20px;display:none;height:900px;">
<h2>卖家信息</h2>
<div style="margin-top: 20px;margin-left: 30px">
<table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab1">
<tr>
<td>姓名:<span id="showUserName"></span></td>
<td>UID:<span id="showUid"></span></td>
<td>绑定手机号:<span id="showMobile"></span></td>
<!--<td>发货单号:<span id="showExpressNumber"></span></td>-->
<td>发货单号:<span id="showExpressNumber1" /> <input id="showExpressNumber" type="text"/>
<a id="editExpressNumberBtn" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-edit'">修改</a>
</td>
<td>发货时间:<span id="showDeliverTimeStr"></span></td>
</tr>
<tr>
<td>寄回地址:<span id="showBackAddress"></span></td>
<td>详细地址:<span id="showBackAddressDetail"></span></td>
<td>寄回手机号:<span id="showBackMobile"></span></td>
<td>邮政编码:<span id="showEx"></span></td>
<td>身份信息:<span id="showUserDegree"></span></td>
</tr>
</table>
</div>
<br/><br/><br/>
<h2>商品信息</h2>
<div style="margin-top: 20px;margin-left: 30px">
<table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab2">
<tr>
<td>申请数量:<span id="showCount"></span></td>
<td>实到数量:<span id="showReceiveCount"></span></td>
<td>鉴定通过:<span id="showAppraiseOkCount"></span></td>
<td>鉴定为假:<span id="showAppraiseBadCount"></span></td>
<td>质检不通过:<span id="showAppraiseFaultCount"></span></td>
<td>无法鉴定:<span id="showNoAppraiseCount"></span></td>
</tr>
</table>
</div>
<br/><br/><br/>
<h2>订单信息</h2>
<div style="margin-top: 20px;margin-left: 30px;height:400px;">
<table id="orderDetailTable"></table>
</div>
</div>
<div title="物流信息" style="overflow:auto;padding:20px;display:none;">
<h2>卖家发货物流</h2>
<hr>
<table id="sellerExpressTable"></table>
<h2>平台发货物流/平台寄回物流</h2>
<hr>
<table id="platformExpressTable"></table>
</div>
<div title="操作记录" style="overflow:auto;padding:20px;display:none;">
<hr>
<table id="operateRecordTable"></table>
</div>
</div>
</div>
<div id="viewFaultDiv" class="easyui-dialog" style="width:1150px;height:500px;padding:10px 20px" closed="true" resizable="true" modal="true" data-options="iconCls: 'icon-view',buttons: '#dlg-buttons'">
<div>
<table>
<tr>
<td width="100px">图片</td>
<td><span id="faultImage" /></td>
</tr>
<tr>
<td height="40px">描述</td>
<td><span id="faultTxt" /></td>
</tr>
</table>
</div>
</div>
<script>
$(function () {
if (status == 2) {
$('#showExpressNumber1').hide();
$("#showExpressNumber").textbox({});
$("#editExpressNumberBtn").linkbutton({
onClick: function () {
$.messager.confirm('修改卖家发货物流单号','确认修改卖家发货物流单号?',function(r){
if (r){
$.post(contextPath + "/appraiseOrder/updateSellerWaybillCode", {
orderCode : orderCode,
sellerWaybillCode : $('#showExpressNumber').textbox('getValue')
}, function(data) {
if (data.code == 200) {
window.self.$.messager.show({
title : "提示",
msg : "操作成功!"
});
}else {
window.self.$.messager.alert("失败", data.message, "error");
}
});
}
});
}
});
} else {
$('#editExpressNumberBtn').hide();
$('#showExpressNumber').hide();
}
$('#tt').tabs({
border: false,
onSelect: function (title, index) {
if (index == 1) {
getExpressList(orderCode)
}
if (index == 2) {
getOperateRecord(orderCode)
}
}
});
// 隐藏域赋值
$.post(contextPath + "/appraiseOrder/detailInfo", {
orderCode: orderCode,
uid : uid
}, function (result) {
if (result.code == 200) {
var data = result.data;
$("#showDeliverTimeStr").text(data.deliverTimeStr);
if (status == 2) {
$("#showExpressNumber").textbox('setValue', data.expressNumber);
} else {
$("#showExpressNumber1").text(data.expressNumber);
}
$("#showUserName").text(data.userName);
$("#showUid").text(data.uid);
$("#showMobile").text(data.mobile);
$("#showBackAddress").text(data.backAddress);
$("#showBackAddressDetail").text(data.backAddressDetail);
$("#showBackMobile").text(data.backMobile);
$("#showUserDegree").text(data.userDegree);
$("#showCount").text(data.count);
$("#showReceiveCount").text(data.receiveCount);
$("#showAppraiseOkCount").text(data.appraiseOkCount);
$("#showAppraiseBadCount").text(data.appraiseBadCount);
$("#showAppraiseFaultCount").text(data.appraiseFaultCount);
$("#showNoAppraiseCount").text(data.noAppraiseCount);
$.parser.parse($("#trade").parent());
}
});
$("#orderDetailTable").myDatagrid({
fit: true,
fitColumns: true,
nowrap: false,
url: contextPath + "/appraiseOrder/detailList",
method: 'POST',
queryParams:{
orderCode: orderCode
},
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "子订单编号",
field: "orderCode",
width: 110,
align: "center"
}, {
title: "商品图片",
field: "imageUrl",
width: 80,
align: "center",
formatter: function (value, rowData) {
return '<img id="productImage" height="78px" width="78px" src="'+value+'" />';
}
}, {
title: "商品名称",
field: "productName",
width: 100,
align: "center"
}, {
title: "货号",
field: "productCode",
width: 80,
align: "center"
}, {
title: "颜色",
field: "colorName",
width: 50,
align: "center"
}, {
title: "尺码",
field: "sizeName",
width: 50,
align: "center"
}, {
title: "7天均价",
field: "avgPrice7Day",
width: 40,
align: "center"
}, {
title: "保证金",
field: "amount",
width: 100,
align: "center",
formatter: function (value, rowData) {
var str = "缴纳保证金:" + rowData.amount;
str += "<br/>退回保证金:" + rowData.backAmount;
str += "<br/>扣除保证金:" + rowData.usedAmount;
return str;
}
},{
title: "费用",
field: "fee",
width: 60,
align: "center",
formatter: function (value, rowData) {
var str = "包装费:" + rowData.packageFee;
str += "<br/>鉴定费:" + rowData.appraiseFee;
str += "<br/>仓储费:" + rowData.storageManagementFee;
return str;
}
},{
title: "状态",
field: "statusStr",
width: 60,
align: "center"
},{
title: "操作",
field: "operations",
width: 80,
align: "center",
formatter: function (value, rowData) {
var str = "<a role='viewOp' dataId='" + rowData.orderCode + "' style='margin-left:10px;background-color: #5bc0de'>操作记录</a>";
str += "<br/><a role='viewEx' dataId='" + rowData.orderCode + "' style='margin-left:10px;background-color: #5bc0de'>物流</a>";
if(rowData.status == "2") {
str = "<br/><a role='cancel' dataId='" + rowData.orderCode + "' style='margin-left:10px;background-color: #5bc0de'>取消订单</a>";
}
if(rowData.status == "20") {
str += "<br/><a role='appraiseDetail' dataId='" + rowData.orderCode + "' style='margin-left:10px;background-color: #5bc0de'>鉴定详情</a>";
}
return str;
}
}]],
cache: false,
pagination: true,
pageSize: 10,
pageList: [10],
idField: "id",
singleSelect: false,
checkOnSelect: false,
onLoadSuccess: function () {
$(this).myDatagrid("getPanel").find("a[role='viewOp']").linkbutton({
iconCls: "icon-edit",
onClick: function () {
orderCode = $(this).attr("dataId");
getOperateRecord(orderCode);
$('#tt').tabs('select',"操作记录");
}
});
$(this).myDatagrid("getPanel").find("a[role='viewEx']").linkbutton({
iconCls: "icon-edit",
onClick: function () {
orderCode = $(this).attr("dataId");
getExpressList(orderCode);
$('#tt').tabs('select',"物流信息");
}
});
$(this).myDatagrid("getPanel").find("a[role='cancel']").linkbutton({
iconCls: "icon-edit",
onClick: function () {
orderCode = $(this).attr("dataId");
$.messager.confirm('取消订单确认','确认取消该订单?',function(r){
if (r){
$.post(contextPath + "/appraiseOrder/cancelOrder", {
orderCode : orderCode
}, function(data) {
if (data.code == 200) {
window.self.$.messager.show({
title : "提示",
msg : "取消订单成功!"
});
$("#orderDetailTable").datagrid('reload');
}else {
window.self.$.messager.alert("失败", data.message, "error");
}
});
}
});
}
});
$(this).myDatagrid("getPanel").find("a[role='appraiseDetail']").linkbutton({
iconCls: "icon-edit",
onClick: function () {
orderCode = $(this).attr("dataId");
$.post(contextPath + "/buyerOrder/queryQualityCheck", {
orderCode : orderCode
}, function(data) {
if (data.code == 200) {
$("#faultTxt").text(data.data.checkText);
var images = "";
for (var i = 0; i < data.data.imageUrlList.length; i++) {
images += "<image height='300px' width='300px' src='"+data.data.imageUrlList[i]+"' />";
}
document.getElementById("faultImage").innerHTML = images;
//$("#faultImage").text(data.imageUrlList);
$("#viewFaultDiv").dialog('open').dialog('setTitle', '查看瑕疵');
}else {
window.self.$.messager.alert("失败", data.message, "error");
}
});
}
});
}
});
function getOperateRecord(orderCode){
$("#operateRecordTable").myDatagrid({
fit: false,
fitColumns: true,
striped: true,
rownumbers:true,
url: contextPath + "/buyerOrder/queryOperateRecordList",
method: 'POST',
queryParams: {
orderCode: orderCode
},
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp=null==temp?[]:temp;
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "操作日志",
field: "typeStr",
width: 20,
align: "center"
}, {
title: "操作人",
field: "userName",
width: 20,
align: "center"
}, {
title: "处理时间",
field: "updateTimeStr",
width: 20,
align: "center"
}]],
cache: false,
pagination: false,
idField: "id",
singleSelect: true,
onLoadSuccess: function (data) {
if (data.total == 0) {
$(this).datagrid('appendRow', { type: '<div style="text-align:center;color:red">没有数据!</div>' }).datagrid('mergeCells', { index: 0, field: 'type', colspan: 3 })
}
}
});
}
function getExpressList(orderCode) {
$("#sellerExpressTable").datagrid({
fit: false,
fitColumns: true,
striped: true,
rownumbers:true,
url: contextPath + "/buyerOrder/queryExpressList",
method: 'POST',
queryParams: {
orderCode: pOrderCode,
expressTypeStr: "1"
},
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp=null==temp?[]:temp;
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "物流公司",
field: "expressCompanyName",
width: 20,
align: "center"
}, {
title: "快递单号",
field: "waybillCode",
width: 20,
align: "center"
}, {
title: "处理时间",
field: "createTimeStr",
width: 20,
align: "center"
}, {
title: "处理内容",
field: "acceptRemark",
width: 30,
align: "center"
}]],
cache: false,
pagination: false,
idField: "id",
singleSelect: true,
onLoadSuccess: function (data) {
if (data.total == 0) {
$(this).datagrid('appendRow', { expressCompanyName: '<div style="text-align:center;color:red">没有数据!</div>' }).datagrid('mergeCells', { index: 0, field: 'expressCompanyName', colspan: 4 })
}
}
});
$("#platformExpressTable").myDatagrid({
fit: false,
fitColumns: true,
striped: true,
rownumbers:true,
url: contextPath + "/buyerOrder/queryExpressList",
method: 'POST',
queryParams: {
orderCode: orderCode,
expressTypeStr: "2,3,4"
},
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp=null==temp?[]:temp;
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "物流公司",
field: "expressCompanyName",
width: 20,
align: "center"
}, {
title: "快递单号",
field: "waybillCode",
width: 20,
align: "center"
}, {
title: "处理时间",
field: "createTimeStr",
width: 20,
align: "center"
}, {
title: "处理内容",
field: "acceptRemark",
width: 30,
align: "center"
}]],
cache: false,
pagination: false,
idField: "id",
singleSelect: true,
onLoadSuccess: function (data) {
if (data.total == 0) {
$(this).datagrid('appendRow', { expressCompanyName: '<div style="text-align:center;color:red">没有数据!</div>' }).datagrid('mergeCells', { index: 0, field: 'expressCompanyName', colspan: 4 })
}
}
});
}
});
</script>