get_one.html
24.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>学考无忧-订单确认-选择地址信息</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"/>
<link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/>
<style type="text/css">
.mui-poppicker-header,
.mui-picker {
background-color: white;
}
.mui-btn-blue,
.mui-btn-primary,
input[type=submit] {
background-color: #FF7700;
border: 0;
}
.mui-pciker-list li.highlight {
color: #FF7700;
}
.log_four_input_one_left {
width: 2.14rem;
}
.log_four_input_one_center {
margin-left: 0;
flex: 1;
}
.log_four_input_one_right {
margin-left: auto;
}
</style>
</head>
<body style="background-color: #F7F7F7;">
<div class="log_top_co" style="background-color: white;">
<!-- 顶部 -->
<div class=" order_top log_top_co">
<a href="javascript:history.back(-1)">
<img src="__TMPL__/public/assets/images/left.png" alt=""/>
</a>
<p>订单确认</p>
</div>
</div>
<div class="tx_maskone" onclick="$(this).hide()">
<div class="tx_maskCon" onclick="zZFun(this)">
<div class="tx_maskConImg">
<img src="__TMPL__/public/assets/images/91.png" alt=""/>
</div>
<div class="tx_maskCon2">
<div class="log_three_model">
<div class="log_three_model_one time">
<div class="log_three_model_left">配送时间</div>
<div class="log_psong tongyi_start_time" style="color: #CCCCCC;">
请选择配送到达时间
</div>
<input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
</div>
<!--<div class="log_three_model_one time">
<div class="log_three_model_left">配送时间</div>
<div class="log_psong">
<input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
</div>
</div>-->
<div class="log_three_model_one logistic excompany">
<div class="log_three_model_left">选择快递</div>
<div class="log_psong log_psong_select">
<div class="log_ps_title excompany_word">请选择快递公司</div>
<div class="log_ps_img">
<img src="__TMPL__/public/assets/images/29.png"/>
<input type="hidden" id="logistic_name" placeholder="请选择快递公司"/>
</div>
</div>
</div>
<div class="log_three_model_one logistic" style="padding-bottom: 0;">
<div class="log_three_model_left" style="margin-top: -0.3rem;">快递单号</div>
<div class="log_three_model_right">
<input type="text" id="logistic_code" placeholder="请输入快递单号"/>
</div>
</div>
</div>
<!-- 确定 -->
<div class="tx_maskOk confirm" data-is_courier="" data-id="" data-indent-id="">确定</div>
</div>
</div>
</div>
<!--选择快递-->
<!--<div class="tx_mask_kuaidi">-->
<!--<div class="tx_maskCon_school">-->
<!--<div class="three_model_school">-->
<!--<div class="three_model_school_title">-->
<!--选择快递-->
<!--</div>-->
<!--<div>-->
<!--<div class="three_model_school_data" style="display: block;">-->
<!--<div class="three_model_school_name" data-name="SF">顺丰快递</div>-->
<!--<div class="three_model_school_name" data-name="YTO">圆通快递</div>-->
<!--<div class="three_model_school_name" data-name="ZTO">中通快递</div>-->
<!--<div class="three_model_school_name there_unActive" data-name="STO">申通快递</div>-->
<!--<div class="three_model_school_name" data-name="YD">韵达快递</div>-->
<!--<div class="three_model_school_name" data-name="HHTT">天天快递</div>-->
<!--<div class="three_model_school_name" data-name="HTKY">百世快递</div>-->
<!--<div class="three_model_school_name" data-name="YZPY">邮政快递包裹</div>-->
<!--<div class="three_model_school_name" data-name="EMS">EMS</div>-->
<!--<div class="three_model_school_name" data-name="DBL">德邦快递</div>-->
<!--<div class="three_model_school_name" data-name="ZJS">宅急送</div>-->
<!--<div class="three_model_school_name" data-name="TNT">TNT快递</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- 地址信息 -->
<div class="log_four_input">
<div class="log_four_input_title" style="margin-bottom: 0.2rem;">
地址信息
</div>
<if condition="$data.is_courier eq 2">
<div class="log_four_input_one">
<div class="log_four_input_one_left">
姓名
</div>
<div class="log_four_input_one_center">
<!--<div id="city_text">-->
<!--{$data.indent_address.name}-->
<!--</div>-->
<input type="text" class="name" value="{$data.name}" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
电话
</div>
<div class="log_four_input_one_center">
<!--<div id="city_text">{$data.indent_address.phone}</div>-->
<input type="text" class="phone" value="{$data.phone}" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one city_word1">
<div class="log_four_input_one_left">
地址
</div>
<div class="log_four_input_one_center">
<div id="city_text1" class="region">{$data.region}</div>
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
详细地址
</div>
<div class="log_four_input_one_center">
<div class="region_detail">{$data.region_detail}</div>
<!-- <input type="text" class="region_detail" value="{$data.region_detail}" />-->
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<else/>
<div class="log_four_input_one city_word">
<div class="log_four_input_one_left">
地区
</div>
<div class="log_four_input_one_center">
<div id="city_text" class="region" style="color: black;">
{$data.region}
</div>
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one log_three_select_school2">
<div class="log_four_input_one_left">
学校
</div>
<div class="log_four_input_one_center school">
{$data.school}
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one log_three_select_class2">
<div class="log_four_input_one_left">
班级
</div>
<div class="log_four_input_one_center">
<div class="grade_class_text">{$data.grade}-{$data.class}</div>
</div>
<input type="hidden" class="grade_class" value="{$data.grade}-{$data.class}"/>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
姓名
</div>
<div class="log_four_input_one_center">
<input style="width: 200px;text-align: left" class="name" type="text" value="{$data.name}"/>
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
手机号
</div>
<div class="log_four_input_one_center">
<input style="width: 200px;text-align: left" class="phone" type="text" value="{$data.phone}"/>
</div>
</div>
<div class="log_four_input_one" style="border: none;">
<div class="log_four_input_one_left">
备用地址
</div>
</div>
<div class="log_four_input_one" style="padding-top: 0;">
<div class="" style="width: 100%;">
<textarea type="text" class="beiyong_address" style="border: none;font-size: 0.28rem;color: #333;" placeholder="备用家庭地址免邮费" maxlength="200">{$data.beiyong_address}</textarea>
</div>
<div class="log_four_input_one_right" style="opacity: 0;">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
</if>
</div>
<!-- 订单信息 -->
<div class="log_four_order">
<div class="log_four_order_details">
<div class="log_four_input_title" style="padding-bottom: 0.34rem;">
订单信息
</div>
<div class="log_four_order_details_one">
<foreach name="$data.indent_goods" item="i_g">
<div class="log_four_order_one">
<div class="log_four_order_left">
<img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
</div>
<div class="log_four_order_center">
<div class="log_four_order_center_one txt-cut" style="-webkit-line-clamp: 1">
{$i_g.book_name}
</div>
<div class="log_four_order_center_two">
×{$i_g.number}
</div>
</div>
<div class="log_four_order_right">
<span>¥</span>{$i_g.price}
</div>
</div>
</foreach>
</div>
</div>
</div>
<!-- 支付方式 -->
<div class="log_four_pash">
<div class="log_four_pash_bottom">
<div class="log_four_pash_top_one">
买家留言
</div>
<div class="log_four_pash_bottom_two" style="margin-top: 0.06rem">
<textarea name="" id="" cols="20" rows="3" placeholder="">{$data.leave_word}</textarea>
</div>
</div>
</div>
<!-- 底部按钮 -->
<div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
<if condition="$data.state eq 2">
<div class="log_seven_btn_contant update" style="margin: 15px;" data-indent-id="{$data.id}">
确认修改
</div>
<div class="log_seven_btn_contant send" style="margin: 15px;" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}">
立即发货
</div>
<elseif condition="$data.state eq 5"/>
<a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
<div class="log_seven_btn_contant">
查看物流
</div>
</a>
</if>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script>
<script src="__TMPL__/public/assets/js/city.data-3.js"></script>
<script>
</script>
<script>
<notempty name='$school'>
var myschool = {$school};
school_s(myschool);
</notempty>
var excompanypicker = new mui.PopPicker();
excompanypicker.setData([{
value: 'SF',
text: '顺丰快递'
}, {
value: 'YTO',
text: '圆通快递'
}, {
value: 'ZTO',
text: '中通快递'
}, {
value: 'STO',
text: '申通快递'
}, {
value: 'YD',
text: '韵达快递'
}, {
value: 'HHTT',
text: '天天快递'
}, {
value: 'HTKY',
text: '百世快递'
}, {
value: 'YZPY',
text: '邮政快递包裹'
}, {
value: 'EMS',
text: 'EMS'
}, {
value: 'DBL',
text: '德邦快递'
}, {
value: 'ZJS',
text: '宅急送'
}, {
value: 'TNT',
text: 'TNT快递'
}]);
var excompany_word
$(".excompany").click(function () {
excompanypicker.show(function (e) {
console.log(e, '3333')
console.log(e[0].value);
console.log(e[0].text);
school_name = e[0].value
$(".excompany_word").text(e[0].text);
$("#logistic_name").val(e[0].value);
$('.excompany_word').css('color', '#333333');
});
})
var schoolpicker = new mui.PopPicker();
var classpicker = new mui.PopPicker();
function school_s(myschool){
(function($, doc) {
console.log(myschool);
$.init();
$.ready(function() {
schoolpicker.setData(myschool);
});
})(mui, document);
}
function grade_s(mygrade){
(function($, doc) {
$.init();
$.ready(function() {
classpicker.setData(mygrade);
});
})(mui, document);
}
var city_picker = new mui.PopPicker({
layer: 3
});
city_picker.setData(cityData3);
$(".city_word").on("tap", function() {
setTimeout(function() {
city_picker.show(function(items) {
$("#city_text").text((items[0] || {}).text + "," + (items[1] || {}).text + "," + (items[2] || {}).text); //该ID为接收城市ID字段
$('#city_text').css('color', '#333333');
$("#city_text").html((items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text);
var area = items[0].text+" "+items[1].text+" "+items[2].text;
$('.region').val(area);
$.get("{:url('orderpage/get_school')}",{'area':area,'user_id':{$data.uid}},function(res){
$('.xuexiao_name').text('请选择学校');
$('.xuexiao_name').removeAttr("style");
$('.banji_name').text('请选择班级');
$('.banji_name').removeAttr("style");
if(res){
myschool = JSON.parse(res);
console.log(myschool);
school_s(myschool);
}else{
school_s('');
grade_s('');
}
});
});
}, 200);
});
$(".city_word1").on("tap", function() {
setTimeout(function() {
city_picker.show(function(items) {
$("#city_text1").text((items[0] || {}).text + "," + (items[1] || {}).text + "," + (items[2] || {}).text); //该ID为接收城市ID字段
$('#city_text1').css('color', '#333333');
$("#city_text1").html((items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text);
var area = items[0].text+" "+items[1].text+" "+items[2].text;
});
}, 200);
});
var school_name
$(".log_three_select_school2").click(function() {
schoolpicker.show(function(e) {
console.log(e, '3333')
console.log(e[0].value);
console.log(e[0].text);
$('.school').text(e[0].text);
school_name = e[0].value
$(".xuexiao_name").text(e[0].text);
$('.xuexiao_name').css('color', '#333333');
$.post("{:url('Personalcenter/get_grade_class')}", {id: school_name}, function (data) {
if (data) {
data = JSON.parse(data);
$('.banji_name').text('请选择班级').css("color","#CCCCCC");
grade_s(data);
}
});
});
})
$(".log_three_select_class2").click(function() {
if(school_name != undefined) {
classpicker.show(function(e) {
console.log(e)
console.log(e[0].value);
console.log(e[0].text);
$('.grade_class_text').text(e[0].text)
$('.grade_class').val(e[0].text)
$(".banji_name").text(e[0].text);
$('.banji_name').css('color', '#333333');
});
} else {
alert("请先选择学校")
}
})
</script>
<script>
function zZFun(e) {
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
}
//选择快递方式
$(".log_psong_select").click(function () {
$(".tx_mask_kuaidi").css({
display: "block"
});
});
$(".tx_mask_kuaidi .three_model_school_name").click(function () {
var index = $(this).index();
$(this).addClass('there_unActive').siblings().removeClass('there_unActive');
$('.log_ps_title').text($(this).text()).css("color", "#333");
$(".tx_mask_kuaidi").hide();
$('#logistic_name').val($(this).attr('data-name'))
});
$(function () {
$('body').on('click', '.send', function () {
var indent_id = $(this).attr('data-indent-id');
var is_courier = $(this).attr('data-is_courier');
console.log(indent_id);
console.log(is_courier);
if (is_courier == 1) {
//统一配送
$('.time').show();
$('.logistic').hide();
} else if (is_courier == 2) {
//快递
$('.time').hide();
$('.logistic').show();
}
$('.tx_maskone').show();
$('.confirm').attr('data-indent-id', indent_id);
$('.confirm').attr('data-is_courier', is_courier);
});
$('.confirm').click(function () {
var is_courier = $(this).attr('data-is_courier');
var indent_id = $(this).attr('data-indent-id');
var logistic_name = $('#logistic_name').val();
var logistic_code = $('#logistic_code').val();
var start_time = $('#start_time').val();
// var end_time = $('#end_time').val();
if (is_courier == 1) {
if (start_time == '') {
alert('请填写配送时间');
return false;
}
// else if (end_time == '') {
// alert('请填写配送时间');
// return false;
// }
} else if (is_courier == 2) {
if (logistic_name == '') {
alert('请填写快递公司');
return false;
} else if (logistic_code == '') {
alert('请填写快递单号');
return false;
}
} else if (is_courier == '') {
alert('未知错误');
return false;
}
$.ajax({
url: "{:url('send')}",
type: "GET",
data: {
'indent_id': indent_id,
'is_courier': is_courier,
'logistic_name': logistic_name,
'logistic_code': logistic_code,
'start_time': start_time,
// 'end_time': end_time
},
success: function (res) {
console.log(res);
if (res.code == 1) {
$('.order_' + indent_id).remove();
$(".tx_maskone").css({
display: "none"
});
$(".tx_mask").css({
display: "none"
});
$('.send').remove();
var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + indent_id + "\">\n" +
" <div class=\"log_seven_btn_contant\">\n" +
" 查看物流\n" +
" </div>\n" +
" </a>";
$('.log_seven_btn9').html(html)
window.location.href = "{:url('get_all')}";
}
alert(res.msg)
}
})
})
})
</script>
<script>
var dtpicker = new mui.DtPicker({
type: "date", //设置日历初始视图模式
beginDate: new Date(), //设置开始日期
labels: ['年', '月', '日'], //设置默认标签区域提示语
})
//统一配送选择时间
$(".tongyi_start_time").click(function () {
dtpicker.show(function (e) {
console.log(e);
$('.tongyi_start_time').text(e.text);
$('#start_time').val(e.text);
$('.tongyi_start_time').css('color', '#333333');
});
})
function zZFun(e) {
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
}
$('.update').click(function(){
var indent_id = $(this).attr('data-indent-id');
var name = $('.name').val();
var phone = $('.phone').val();
var region = $('.region').text();
var region_detail = $('.region_detail').val();
var beiyong_address = $('.beiyong_address').val();
var school = $('.school').text();
var grade_class = $('.grade_class_text').text();
console.log(school);
console.log(grade_class)
$.ajax({
url:"{:url('updatePost')}",
type:"GET",
data:{'indent_id':indent_id,'name':name,'phone':phone,'region':region,'region_detail':region_detail,'school':school,'grade_class':grade_class,beiyong_address:beiyong_address},
success:function(res){
if(res.code == 1){
alert('修改成功')
}
},
error:function(res){
alert('与服务器断开链接')
}
})
})
</script>
</body>
</html>