detail.html
35.1 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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
<style>
.sub-info td{
font-size: 14px;
font-color: #FFFFFF;
}
.sub-info div{
width: 100px;
overflow: hidden;
white-space: nowrap;
}
</style>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="height:100px;border-bottom: 0;">
<script>
document.write(addHead('订单管理', '订单详情'));
</script>
</div>
<div id="main" region="center">
<div id="tt" class="easyui-tabs" style="height:auto;">
<div title="订单信息" style="padding:20px;display:none;">
<div style="float:right">
<a id="returnBtn" class="btn-info">返回</a>
<a id="updateOrderInfoBtn" class="btn-success">修改订单信息</a>
</div>
<div>
<h2>基本信息</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td><label>订单编号:</label><span id="orderCode"></span></td>
<td><label>订单状态:</label><span id="statusStr"></span><input type="hidden" id="status"></td>
<td><label>支付状态:</label><span id="payStatus"></span></td>
<td><label>下单时间:</label><span id="createTimeStr"></span></td>
</tr>
<tr>
<td><label>订购人:</label><span id="buyer"></span></td>
<td><label>订单来源:</label><span id="clientTypeStr"></span></td>
<td><label>支付渠道:</label><span id="payment"></span></td>
<td><label>付款时间:</label><span id="payTime"></span></td>
</tr>
<tr>
<td><label>卖家发货时间:</label><span id="sellerSendGoodsTime"></span></td>
<td><label>卖家快递单号:</label><span id="sellerWaybillCode"></span></td>
<td><label>平台发货时间:</label><span id="platformSendGoodsTime"></span></td>
<td><label>平台快递单号:</label><span id="platformWaybillCode"></span></td>
</tr>
<tr>
<td><label>买家收货时间:</label><span id="receiveGoodsTime"></span></td>
<td><label>平台收货仓库:</label><span id="depotName"></span></td>
<td colspan="2"><label>平台收货地址:</label><span id="platformReceiveGoodsAddress"></span></td>
</tr>
<tr>
<td><label>订单类型:</label><span id="preSellOrNormal"></span></td>
<td><label>促销活动:</label><span id="activityType"></span></td>
<td><label>鉴定视频:</label><a href="javascript:void(0)" vedioUrl="" onclick="queryVedioUrl();" id="vedioUrl">查看视频</a></td>
</tr>
</table>
<h2>收货信息</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td><label>收货人姓名:</label><span id="receiveName"></span></td>
<td><label>手机号码:</label><span id="receiveMobile"></span></td>
<td><label>收货地址:</label><span id="receiveAddress"></span></td>
</tr>
<tr>
<td><label>详细地址:</label><span id="receiveAddressDetail"></span></td>
<td><label>邮政编码:</label><span id="zipCode"></span></td>
</tr>
</table>
<h2>召回信息</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td><label>收货人姓名:</label><span id="backReceiveName"></span></td>
<td><label>手机号码:</label><span id="backReceiveMobile"></span></td>
<td><label>收货地址:</label><span id="backReceiveAddress"></span></td>
</tr>
<tr>
<td><label>详细地址:</label><span id="backReceiveAddressDetail"></span></td>
<td><label>邮政编码:</label><span id="backZipCode"></span></td>
<td><label>寄存码:</label><span id="depositCode"></span></td>
</tr>
</table>
<h2>卖家信息</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td><label>姓名:</label><span id="sellerName"></span></td>
<td><label>卖家UID:</label><span id="sellerUid"></span></td>
<td><label>绑定手机号码:</label><span id="sellerMobile"></span></td>
<td><label>寄回地址:</label><span id="sellerRebackAddress"></span></td>
</tr>
<tr>
<td><label>详细地址:</label><span id="sellerRebackAddressDetail"></span></td>
<td><label>寄回手机号码:</label><span id="sellerRebackMobile"></span></td>
<td><label>邮政编码:</label><span id="sellerZipCode"></span></td>
<td><label>身份信息:</label><span id="storeSellerType"></span></td>
</tr>
</table>
<h2>订单商品</h2>
<table class="sub-info" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<th>商品编码</th>
<th>SKU</th>
<th>SKU-P</th>
<th>商品图片</th>
<th>商品名称</th>
<th>货号</th>
<th>颜色</th>
<th>尺码</th>
<th>销售价</th>
<th>税费</th>
<th>活动优惠</th>
<th>优惠券</th>
<th>促销金额</th>
<th>购买数量</th>
<th>运费</th>
<th>仓储费</th>
<th>提货费</th>
<th>买家实付</th>
</tr>
<tr>
<td><span id="productId"></span></td>
<td><span id="sku"></span></td>
<td><span id="skup"></span></td>
<td><img id="productImage" height='78px;' width='59px;' /></td>
<td><span id="productName"></span></td>
<td><span id="productCode"></span></td>
<td><span id="colorName"></span></td>
<td><span id="sizeName"></span></td>
<td><span id="goodsPrice"></span></td>
<td><span id="tariffAmount"></span></td>
<td><span id="activityCutAmount"></span></td>
<td><span id="couponCutAmount"></span></td>
<td><span id="cutPromotionAmount"></span></td>
<td><span id="productNum"></span></td>
<td><span id="shipFee"></span></td>
<td><span id="depositAmount"></span></td>
<td><span id="pickAmount"></span></td>
<td><span id="amount"></span></td>
</tr>
<tr>
<th colspan="2">销售价:<span id="salesPrice"></span></th>
<th colspan="2">平台费用:<span id="platformFee"></span></th>
<th colspan="3">银行转账费用:<span id="bankTransferfee"></span></th>
<th colspan="3">卖家实际收入:<span id="sellerIncome"></span></th>
</tr>
</table>
<h2 class="quality">查看瑕疵</h2>
<table class="sub-info quality" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td>图片</td>
<td><span id="qualityPic"></span></td>
</tr>
<tr>
<td>描述</td>
<td><span id="qualityDesc"></span></td>
</tr>
</table>
<h2 class="second">二手信息</h2>
<table class="sub-info second" border="1" bordercolor="#ddd" cellspacing="0" width="100%" cellpadding="8">
<tr>
<td>图片</td>
<td><span id="secondPic"></span></td>
</tr>
<tr>
<td>描述</td>
<td><span id="secondDesc" style="width: 100px;"></span></td>
</tr>
</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 title="服务记录" style="overflow:auto;padding:20px;display:none;">
<div class="easyui-layout">
<form id="feedbackRecordSubmitForm" method="post">
<div style="margin-top: 20px;margin-left: 30px;margin-right: 30px">
<table border="0" style="width:99%;">
<tr style="height: 60px">
<td width="100%">
<input class="easyui-textbox" id="feedbackContent" name="feedbackContent" data-options="prompt:'请输入服务记录...'" style="width: 100%;height: 100%;" />
</td>
</tr>
</table>
<div>
<a id="submitFeedbackRecordButton" class="btn-info">提交记录</a>
</div>
</div>
</form>
</div>
<br /><br />
<table id="feedbackRecordTable"></table>
</div>
</div>
</div>
<div style="display: none">
<div id="dlg" class="datagrid-toolbar" style="padding:5px;">
<img id="simg" src="" alt="" width="800">
</div>
</div>
<script>
$(function() {
var param=window.location.search;
var orderCode = getQueryString(param, "orderCode");
var skup = getQueryString(param, "skup");
$("#returnBtn").linkbutton({
iconCls : "icon-search",
onClick : function() {
window.location.href = contextPath + "/html/orderManage/list.html?time_version=" + new Date().getTime();
}
});
$("#updateOrderInfoBtn").linkbutton({
iconCls : "icon-search",
onClick : function() {
var status = $("#status").val();
if(status==1||status==2||status==31){
updateOrderInfo(orderCode);
}else{
alert("订单状态不允许更改数据!");
}
}
});
getOrderInfo(orderCode);
$("#tt").tabs({
onSelect:function(title,index){
if(index == 0){
getOrderInfo(orderCode);
}else if(index == 1){
getExpressList(orderCode);
}else if(index == 2){
getOperateRecord(orderCode);
}else if(index == 3){
getFeedbackRecord(orderCode);
}
}
});
$("#submitFeedbackRecordButton").linkbutton({
iconCls : "icon-search",
onClick : function() {
$.post(contextPath + "/buyerOrder/submitBuyerOrderFeedback", {
orderCode : orderCode,
feedbackContent : $("#feedbackContent").val()
}, function(data) {
if (data.code == 200) {
getFeedbackRecord(orderCode);
window.self.$.messager.show({
title : "提示",
msg : "提交服务记录成功!"
});
$('#feedbackRecordSubmitForm').form('clear');
}else {
window.self.$.messager.alert("失败", data.message, "error");
}
});
}
});
$.post(contextPath + "/buyerOrder/queryQualityCheck", { // 查询瑕疵确认详情
orderCode : orderCode
}, function(resp) {
if (resp.code == 200) {
if (!resp.data.imageUrlList || resp.data.imageUrlList.length <= 0) {
$('.quality').hide();
return;
}
$("#qualityDesc").html(resp.data.checkText);
var imageUrlList = resp.data.imageUrlList;
var imageStr = "<table><tbody><tr>";
for (var i = 0 ;i < imageUrlList.length; i++){
imageStr += "<td><img height='100px;' width='100px;' class='pimg2' src='"+imageUrlList[i]+"'/></td>";
if(i % 7 == 0 && 0 != i && i != (imageUrlList.length - 1)) {
imageStr += "</tr><tr>";
}
}
$("#qualityPic").html(imageStr + "</tr></tbody></table>");
$.parser.parse($("#qualityPic").parent());
//放大图片预览
$(".pimg2").on('click', function(){
var _this = $(this);//将当前的pimg元素作为_this传入函数
download(_this.attr("src"));
});
}else {
window.self.$.messager.alert("失败", "查询失败,请稍后重试", "error");
}
});
$.post(contextPath + "/storage/getSecondDetailBySkup", { // 查询二手图片描述
skup : skup
}, function(result) {
if (result.code == 200) {
if (!result.data.imageInfoList || result.data.imageInfoList.length <= 0) {
$('.second').hide();
return;
}
$("#secondDesc").html(result.data.desc);
var imageStr = "<table><tbody><tr>";
for (var i = 0 ;i < result.data.imageInfoList.length; i++){
var imageDesc = result.data.imageInfoList[i].imageDesc ? result.data.imageInfoList[i].imageDesc : '其他';
imageStr += "<td><img height='100px;' width='100px;' class='pimg1' src='"+result.data.imageInfoList[i].imageUrl+"'/><div title='" + imageDesc + "'>" + imageDesc + "</div></td>";
if(i % 8 == 0 && 0 != i && i != (result.data.imageInfoList.length - 1)) {
imageStr += "</tr><tr>";
}
}
$("#secondPic").html(imageStr + "</tr></tbody></table>");
$.parser.parse($("#secondPic").parent());
//放大图片预览
$(".pimg1").on('click', function(){
var _this = $(this);//将当前的pimg元素作为_this传入函数
download(_this.attr("src"));
});
}else {
window.self.$.messager.alert("失败", "查询失败,请稍后重试", "error");
}
});
});
function download(url) {
$('#dlg').dialog({
title: '预览',
width: 800,
height: 600,
resizable: false,
closed: false,
cache: false,
modal: true
});
$("#simg").attr("src", url);
}
function updateSellerWaybillCode(orderCode){
var sellerWaybillCode = $("#input_sellerWaybillCode").val().replace(/ /g, '');
if(sellerWaybillCode == ''){
alert("卖家快递单号不能为空");
return;
}
$.post(contextPath + "/buyerOrder/updateReceiveInfo", {
orderCode : orderCode,
sellerWaybillCode : $("#input_sellerWaybillCode").val()
}, function(data) {
if (data.code == 200) {
getOrderInfo(orderCode);
window.self.$.messager.show({
title : "提示",
msg : "更新信息成功!"
});
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
});
}
function updateOrderInfo(orderCode){
var sellerWaybillCode = $("#input_sellerWaybillCode").val();
if (sellerWaybillCode) {
sellerWaybillCode = sellerWaybillCode.replace(/ /g, '');
}
//var sellerWaybillCode = $("#input_sellerWaybillCode").val().replace(/ /g, '');
if(sellerWaybillCode == ''){
alert("卖家快递单号不能为空");
return;
}
var receiveName = $("#input_receiveName").val();
var receiveMobile = $("#input_receiveMobile").val();
var receiveAddressDetail = $("#input_receiveAddressDetail").val();
var receiveZipCode = $("#input_zipCode").val();
var receiveAreaCode = $("#jiedao").combobox('getValue');
var area = $("#sheng").combobox('getText') + ' ' + $("#shi").combobox('getText') + ' ' + $("#quxian").combobox('getText') + ' ' + $("#jiedao").combobox('getText');
if(receiveName == '' || receiveMobile == '' || receiveAddressDetail == '' || receiveAreaCode == ''){
alert("收货人姓名,手机号码,收货地址,详细地址不能有空值!");
return;
}
$.post(contextPath + "/buyerOrder/updateReceiveInfo", {
orderCode : orderCode,
receiveName : receiveName,
receiveMobile : receiveMobile,
receiveAddressDetail : receiveAddressDetail,
receiveZipCode : receiveZipCode,
receiveAreaCode : receiveAreaCode,
sellerWaybillCode : sellerWaybillCode,
area : area
}, function(data) {
if (data.code == 200) {
getOrderInfo(orderCode);
window.self.$.messager.show({
title : "提示",
msg : "更新信息成功!"
});
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
});
}
function getOrderInfo(orderCode){
var form = new FormData();
form.append("orderCode", orderCode);
//发送请求
$.ajax({
type: "POST",
url: contextPath + '/buyerOrder/getOrderDetail',
data: form,
async: false,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function (result) {
if(result.code == 200) {
var orderCodeStr = "";
if(result.data.channel == 2) {
orderCodeStr = "[门店订单]" + result.data.orderCode;
} else {
orderCodeStr = result.data.orderCode;
}
$("#orderCode").html(orderCodeStr);
$("#statusStr").html(result.data.statusStr);
$("#status").val(result.data.status);
$("#payStatus").html(result.data.payStatus);
$("#createTimeStr").html(result.data.createTimeStr);
$("#buyer").html(result.data.buyerName + "(UID:" + result.data.buyerUid + ")");
$("#clientTypeStr").html(result.data.clientTypeStr);
$("#payment").html(result.data.payment);
$("#payTime").html(result.data.payTime);
$("#sellerSendGoodsTime").html((result.data.sellerSendGoodsTime ? result.data.sellerSendGoodsTime : '') + (result.data.attributes == 4 ? '【预售】' : ''));
$("#sellerWaybillCode").html(result.data.sellerWaybillCode);
$("#platformSendGoodsTime").html(result.data.platformSendGoodsTime);
$("#platformWaybillCode").html(result.data.platformWaybillCode);
$("#receiveGoodsTime").html(result.data.receiveGoodsTime);
if (!result.data.vedioUrl || result.data.vedioUrl == '') {
$('#vedioUrl').hide();
} else {
$("#vedioUrl").attr('vedioUrl', result.data.vedioUrl);
}
var depotNo = result.data.depotNo;
var depotName = "";
if(0 == depotNo){
depotName = "北京";
}else if(1 == depotNo){
depotName = "南京";
}else if(2 == depotNo){
depotName = "香港";
}
$("#depotName").html(depotName);
$("#platformReceiveGoodsAddress").html(result.data.platformReceiveGoodsAddress);
if(result.data.status ==2){//卖家已发货,卖家可联系客服修改物流单号
$("#sellerWaybillCode").html('<input id="input_sellerWaybillCode" type="text" class="easyui-textbox" value="' + result.data.sellerWaybillCode + '"/>');
}
//订单类型是预售订单还是普通订单
var attributes = result.data.attributes;
var attributesStr = '现货订单';
if("2" == attributes){
attributesStr = '线下店订单';
}else if("3" == attributes){
attributesStr = '闪购订单';
}else if("4" == attributes){
attributesStr = '预售';
}else if("5" == attributes){
attributesStr = '全新瑕疵';
}else if("6" == attributes){
attributesStr = '二手';
}else if("7" == attributes){
attributesStr = '寄存【' + result.data.goodsSource + '】';
}else if("17" == attributes){
attributesStr = '海外直邮';
}
$("#preSellOrNormal").html(attributesStr);
if (result.data.activityType == 18) {
$("#activityType").html('砍价');
}
//收货信息
//鉴定前,买家可联系客服修改收货信息
if(result.data.status==1 ||result.data.status==2 ||result.data.status==31){
$("#receiveName").html('<input id="input_receiveName" type="text" class="easyui-textbox" value="' + result.data.receiveName + '"/>');
$("#receiveMobile").html('<input id="input_receiveMobile" type="text" class="easyui-textbox" value="' + result.data.receiveMobile + '"/>');
$("#receiveAddressDetail").html('<input id="input_receiveAddressDetail" type="text" class="easyui-textbox" value="' + result.data.receiveAddressDetail + '"/>');
$("#zipCode").html('<input id="input_zipCode" type="text" class="easyui-textbox" value="' + result.data.zipCode + '"/>');
//省市区级联
var addressStr = '<input id="sheng" class="easyui-combobox" style="width:100px">'
+ '<input id="shi" class="easyui-combobox" style="width:100px">'
+ '<input id="quxian" class="easyui-combobox" style="width:100px">'
+ '<input id="jiedao" class="easyui-combobox" style="width:150px">';
$("#receiveAddress").html(addressStr);
initAreaDropDown(result.data.receiveAreaCode);
}else{
$("#receiveName").html(result.data.receiveName);
$("#receiveMobile").html(result.data.receiveMobile);
$("#receiveAddress").html(result.data.receiveAddress);
$("#receiveAddressDetail").html(result.data.receiveAddressDetail);
$("#zipCode").html(result.data.zipCode);
}
$("#backReceiveName").html(result.data.backReceiveName);
$("#backReceiveMobile").html(result.data.backReceiveMobile);
$("#backReceiveAddress").html(result.data.backReceiveAddress);
$("#backReceiveAddressDetail").html(result.data.backReceiveAddressDetail);
$("#backZipCode").html(result.data.backZipCode);
$("#depositCode").html(result.data.depositCode);
//卖家信息
$("#sellerName").html(result.data.sellerName);
$("#sellerUid").html(result.data.sellerUid);
$("#sellerMobile").html(result.data.sellerMobile);
$("#sellerRebackAddress").html(result.data.sellerRebackAddress);
$("#sellerRebackAddressDetail").html(result.data.sellerRebackAddressDetail);
$("#sellerRebackMobile").html(result.data.sellerRebackMobile);
$("#sellerZipCode").html(result.data.sellerZipCode);
var storeSellerIdentity = "普通卖家";
if(1 == result.data.storeSellerEntryType){
storeSellerIdentity = "入驻卖家";
}else if(2 == result.data.storeSellerEntryType){
storeSellerIdentity = "超级卖家";
}
$("#storeSellerType").html(storeSellerIdentity);
//商品信息
$("#productId").html(result.data.productId);
$("#sku").html(result.data.storageId);
$("#skup").html(result.data.skup);
$("#productImage").attr("src", result.data.productImage);
$("#productName").html(result.data.productName);
$("#productCode").html(result.data.productCode);
$("#colorName").html(result.data.colorName);
$("#sizeName").html(result.data.sizeName);
$("#goodsPrice").html(result.data.goodsPrice);
$("#tariffAmount").html(result.data.tariffAmount);
$("#cutPromotionAmount").html(result.data.cutPromotionAmount);
if (result.data.couponCodeList) {
var codeListStr = '';
for(var item in result.data.couponCodeList) {
codeListStr += '<br/>(券号:'+ result.data.couponCodeList[item] + ')';
}
$("#couponCutAmount").html(result.data.couponCutAmount + codeListStr);
} else {
$("#couponCutAmount").html(result.data.couponCutAmount);
}
$("#activityCutAmount").html(result.data.activityCutAmount);
$("#productNum").html(result.data.productNum);
$("#shipFee").html(result.data.shipFee);
$("#depositAmount").html(result.data.depositAmount);
$("#pickAmount").html(result.data.pickAmount);
$("#amount").html(result.data.amount);
$("#salesPrice").html(result.data.goodsPrice);
$("#platformFee").html(result.data.platformFee);
$("#bankTransferfee").html(result.data.bankTransferfee);
$("#sellerIncome").html(result.data.sellerIncome);
}
else {
$.messager.alert("失败", result.message, "error");
}
}
});
}
function queryVedioUrl() {
window.open($('#vedioUrl').attr('vedioUrl') + "?ver=" + new Date().getTime())
}
function initAreaDropDown(areaCode){
var firstId = areaCode.substr(0,2);
var secondId = areaCode.substr(0,4);
var thirdId = areaCode.substr(0,6);
var fourthId = areaCode;
var flag = 0;
$("#sheng").combobox({
url:contextPath + '/buyerOrder/queryAreaList?parentCode=0',
editable:false,
valueField:'id',
textField:'caption',
loadFilter: function (data) {
return defaultLoadFilter(data);
},
onLoadSuccess:function(data){
if(flag==0){
$('#sheng').combobox('setValue',firstId);
}
},
onSelect:function(region){
$('#shi').combobox('unselect');
$('#quxian').combobox('unselect');
$('#jiedao').combobox('unselect');
$('#shi').combobox('clear'); //清除原有项目
$('#quxian').combobox('clear'); //清除原有项目
$('#jiedao').combobox('clear'); //清除原有项目
$('#shi').combobox('reload',contextPath + '/buyerOrder/queryAreaList?parentCode='+region.id);
}
})
$("#shi").combobox({
editable:false,
valueField:'id',
textField:'caption',
loadFilter: function (data) {
return defaultLoadFilter(data);
},
onLoadSuccess:function(data){
if(flag==0){
$('#shi').combobox('setValue',secondId);
}
},
onSelect:function(region){
$('#quxian').combobox('unselect');
$('#jiedao').combobox('unselect');
$('#quxian').combobox('clear'); //清除原有项目
$('#jiedao').combobox('clear'); //清除原有项目
$('#quxian').combobox('reload',contextPath + '/buyerOrder/queryAreaList?parentCode='+region.id);
}
})
$("#quxian").combobox({
editable: false,
valueField:'id',
textField:'caption',
loadFilter: function (data) {
return defaultLoadFilter(data);
},
onLoadSuccess:function(data){
if(flag==0){
$('#quxian').combobox('setValue',thirdId);
}
},
onSelect:function(region){
$('#jiedao').combobox('unselect');
$('#jiedao').combobox('clear'); //清除原有项目
$('#jiedao').combobox('reload',contextPath + '/buyerOrder/queryAreaList?parentCode='+region.id);
}
})
$("#jiedao").combobox({
editable: false,
valueField:'id',
textField:'caption',
loadFilter: function (data) {
return defaultLoadFilter(data);
},
onLoadSuccess:function(data){
if(flag==0){
$('#jiedao').combobox('setValue',fourthId);
flag=1;
}
}
})
}
function getExpressList(orderCode){
$("#sellerExpressTable").datagrid({
fit: false,
fitColumns: true,
striped: true,
rownumbers:true,
url: contextPath + "/buyerOrder/queryExpressList",
method: 'POST',
queryParams: {
orderCode: orderCode,
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 })
}
}
});
}
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"
/*,
formatter: function (value, rowData, rowIndex) {
if(value == 1){
return "修改卖家物流单号";
}else if(value == 2){
return "修改收货人信息";
}
}*/
}, {
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 getFeedbackRecord(orderCode){
$("#feedbackRecordTable").myDatagrid({
fit: false,
fitColumns: true,
striped: true,
rownumbers:true,
url: contextPath + "/buyerOrder/queryBuyerOrderFeedback",
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: "content",
width: 100
}, {
title: "操作人",
field: "operatorName",
width: 20
}, {
title: "处理时间",
field: "createTime",
width: 20
}]],
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: 'content', colspan: 3 })
}
}
});
}
function getQueryString(paraPart,name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = paraPart.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
</script>
</body>
</html>