|
@@ -60,16 +60,17 @@ |
|
@@ -60,16 +60,17 @@ |
60
|
<div class="log_three_model">
|
60
|
<div class="log_three_model">
|
61
|
<div class="log_three_model_one time">
|
61
|
<div class="log_three_model_one time">
|
62
|
<div class="log_three_model_left">配送时间</div>
|
62
|
<div class="log_three_model_left">配送时间</div>
|
63
|
- <div class="log_psong">
|
|
|
64
|
- <input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/>
|
63
|
+ <div class="log_psong tongyi_start_time" style="color: #CCCCCC;">
|
|
|
64
|
+ 请选择配送到达时间
|
65
|
</div>
|
65
|
</div>
|
|
|
66
|
+ <input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
|
66
|
</div>
|
67
|
</div>
|
67
|
- <div class="log_three_model_one time">
|
68
|
+ <!--<div class="log_three_model_one time">
|
68
|
<div class="log_three_model_left">配送时间</div>
|
69
|
<div class="log_three_model_left">配送时间</div>
|
69
|
<div class="log_psong">
|
70
|
<div class="log_psong">
|
70
|
<input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
|
71
|
<input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
|
71
|
</div>
|
72
|
</div>
|
72
|
- </div>
|
73
|
+ </div>-->
|
73
|
<div class="log_three_model_one logistic">
|
74
|
<div class="log_three_model_one logistic">
|
74
|
<div class="log_three_model_left">选择快递</div>
|
75
|
<div class="log_three_model_left">选择快递</div>
|
75
|
<div class="log_psong log_psong_select">
|
76
|
<div class="log_psong log_psong_select">
|
|
@@ -168,7 +169,7 @@ |
|
@@ -168,7 +169,7 @@ |
168
|
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
|
169
|
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
|
169
|
</div>
|
170
|
</div>
|
170
|
</div>
|
171
|
</div>
|
171
|
- <else />
|
172
|
+ <else/>
|
172
|
<div class="log_four_input_one">
|
173
|
<div class="log_four_input_one">
|
173
|
<div class="log_four_input_one_left">
|
174
|
<div class="log_four_input_one_left">
|
174
|
地区
|
175
|
地区
|
|
@@ -268,7 +269,7 @@ |
|
@@ -268,7 +269,7 @@ |
268
|
<!-- 底部按钮 -->
|
269
|
<!-- 底部按钮 -->
|
269
|
<div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
|
270
|
<div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
|
270
|
<if condition="$data.state eq 2">
|
271
|
<if condition="$data.state eq 2">
|
271
|
- <div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}" >
|
272
|
+ <div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}">
|
272
|
立即发货
|
273
|
立即发货
|
273
|
</div>
|
274
|
</div>
|
274
|
<elseif condition="$data.state eq 5"/>
|
275
|
<elseif condition="$data.state eq 5"/>
|
|
@@ -288,92 +289,122 @@ |
|
@@ -288,92 +289,122 @@ |
288
|
function zZFun(e) {
|
289
|
function zZFun(e) {
|
289
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
290
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
290
|
}
|
291
|
}
|
291
|
-//选择快递方式
|
|
|
292
|
-$(".log_psong_select").click(function () {
|
|
|
293
|
- $(".tx_mask_kuaidi").css({
|
|
|
294
|
- display: "block"
|
292
|
+
|
|
|
293
|
+ //选择快递方式
|
|
|
294
|
+ $(".log_psong_select").click(function () {
|
|
|
295
|
+ $(".tx_mask_kuaidi").css({
|
|
|
296
|
+ display: "block"
|
|
|
297
|
+ });
|
295
|
});
|
298
|
});
|
296
|
-});
|
|
|
297
|
-$(".tx_mask_kuaidi .three_model_school_name").click(function () {
|
|
|
298
|
- var index = $(this).index();
|
|
|
299
|
- $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
|
|
|
300
|
- $('.log_ps_title').text($(this).text()).css("color", "#333");
|
|
|
301
|
- $(".tx_mask_kuaidi").hide();
|
|
|
302
|
- $('#logistic_name').val($(this).attr('data-name'))
|
|
|
303
|
-});
|
|
|
304
|
-$(function(){
|
|
|
305
|
- $('body').on('click','.send',function(){
|
|
|
306
|
- var indent_id = $(this).attr('data-indent-id');
|
|
|
307
|
- var is_courier = $(this).attr('data-is_courier');
|
|
|
308
|
- console.log(indent_id);
|
|
|
309
|
- console.log(is_courier);
|
|
|
310
|
- if (is_courier == 1) {
|
|
|
311
|
- //统一配送
|
|
|
312
|
- $('.time').show();
|
|
|
313
|
- $('.logistic').hide();
|
|
|
314
|
- } else if (is_courier == 2) {
|
|
|
315
|
- //快递
|
|
|
316
|
- $('.time').hide();
|
|
|
317
|
- $('.logistic').show();
|
|
|
318
|
- }
|
|
|
319
|
- $('.tx_maskone').show();
|
|
|
320
|
- $('.confirm').attr('data-indent-id',indent_id);
|
|
|
321
|
- $('.confirm').attr('data-is_courier',is_courier);
|
299
|
+ $(".tx_mask_kuaidi .three_model_school_name").click(function () {
|
|
|
300
|
+ var index = $(this).index();
|
|
|
301
|
+ $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
|
|
|
302
|
+ $('.log_ps_title').text($(this).text()).css("color", "#333");
|
|
|
303
|
+ $(".tx_mask_kuaidi").hide();
|
|
|
304
|
+ $('#logistic_name').val($(this).attr('data-name'))
|
322
|
});
|
305
|
});
|
323
|
- $('body').on('click','.confirm',function(){
|
|
|
324
|
- var is_courier = $(this).attr('data-is_courier');
|
|
|
325
|
- var indent_id = $(this).attr('data-indent-id');
|
|
|
326
|
- var logistic_name = $('#logistic_name').val();
|
|
|
327
|
- var logistic_code = $('#logistic_code').val();
|
|
|
328
|
- var start_time = $('#start_time').val();
|
|
|
329
|
- var end_time = $('#end_time').val();
|
|
|
330
|
- if (is_courier == 1) {
|
|
|
331
|
- if (start_time == '') {
|
|
|
332
|
- alert('请填写配送时间');
|
|
|
333
|
- return false;
|
|
|
334
|
- } else if (end_time == '') {
|
|
|
335
|
- alert('请填写配送时间');
|
|
|
336
|
- return false;
|
306
|
+ $(function () {
|
|
|
307
|
+ $('body').on('click', '.send', function () {
|
|
|
308
|
+ var indent_id = $(this).attr('data-indent-id');
|
|
|
309
|
+ var is_courier = $(this).attr('data-is_courier');
|
|
|
310
|
+ console.log(indent_id);
|
|
|
311
|
+ console.log(is_courier);
|
|
|
312
|
+ if (is_courier == 1) {
|
|
|
313
|
+ //统一配送
|
|
|
314
|
+ $('.time').show();
|
|
|
315
|
+ $('.logistic').hide();
|
|
|
316
|
+ } else if (is_courier == 2) {
|
|
|
317
|
+ //快递
|
|
|
318
|
+ $('.time').hide();
|
|
|
319
|
+ $('.logistic').show();
|
337
|
}
|
320
|
}
|
338
|
- } else if (is_courier == 2) {
|
|
|
339
|
- if (logistic_name == '') {
|
|
|
340
|
- alert('请填写快递公司');
|
|
|
341
|
- return false;
|
|
|
342
|
- } else if (logistic_code == '') {
|
|
|
343
|
- alert('请填写快递单号');
|
321
|
+ $('.tx_maskone').show();
|
|
|
322
|
+ $('.confirm').attr('data-indent-id', indent_id);
|
|
|
323
|
+ $('.confirm').attr('data-is_courier', is_courier);
|
|
|
324
|
+ });
|
|
|
325
|
+ $('.confirm').click(function () {
|
|
|
326
|
+ var is_courier = $(this).attr('data-is_courier');
|
|
|
327
|
+ var indent_id = $(this).attr('data-indent-id');
|
|
|
328
|
+ var logistic_name = $('#logistic_name').val();
|
|
|
329
|
+ var logistic_code = $('#logistic_code').val();
|
|
|
330
|
+ var start_time = $('#start_time').val();
|
|
|
331
|
+ // var end_time = $('#end_time').val();
|
|
|
332
|
+ if (is_courier == 1) {
|
|
|
333
|
+ if (start_time == '') {
|
|
|
334
|
+ alert('请填写配送时间');
|
|
|
335
|
+ return false;
|
|
|
336
|
+ }
|
|
|
337
|
+ // else if (end_time == '') {
|
|
|
338
|
+ // alert('请填写配送时间');
|
|
|
339
|
+ // return false;
|
|
|
340
|
+ // }
|
|
|
341
|
+ } else if (is_courier == 2) {
|
|
|
342
|
+ if (logistic_name == '') {
|
|
|
343
|
+ alert('请填写快递公司');
|
|
|
344
|
+ return false;
|
|
|
345
|
+ } else if (logistic_code == '') {
|
|
|
346
|
+ alert('请填写快递单号');
|
|
|
347
|
+ return false;
|
|
|
348
|
+ }
|
|
|
349
|
+ } else if (is_courier == '') {
|
|
|
350
|
+ alert('未知错误');
|
344
|
return false;
|
351
|
return false;
|
345
|
}
|
352
|
}
|
346
|
- } else if (is_courier == '') {
|
|
|
347
|
- alert('未知错误');
|
|
|
348
|
- return false;
|
|
|
349
|
- }
|
|
|
350
|
- $.ajax({
|
|
|
351
|
- url:"{:url('send')}",
|
|
|
352
|
- type:"GET",
|
|
|
353
|
- 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},
|
|
|
354
|
- success:function(res){
|
|
|
355
|
- console.log(res);
|
|
|
356
|
- if (res.code == 1) {
|
|
|
357
|
- $('.order_' + indent_id).remove();
|
|
|
358
|
- $(".tx_maskone").css({
|
|
|
359
|
- display: "none"
|
|
|
360
|
- });
|
|
|
361
|
- $(".tx_mask").css({
|
|
|
362
|
- display: "none"
|
|
|
363
|
- });
|
|
|
364
|
- $('.send').remove();
|
|
|
365
|
- var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+indent_id+"\">\n" +
|
|
|
366
|
- " <div class=\"log_seven_btn_contant\">\n" +
|
|
|
367
|
- " 查看物流\n" +
|
|
|
368
|
- " </div>\n" +
|
|
|
369
|
- " </a>";
|
|
|
370
|
- $('.log_seven_btn9').html(html)
|
353
|
+ $.ajax({
|
|
|
354
|
+ url: "{:url('send')}",
|
|
|
355
|
+ type: "GET",
|
|
|
356
|
+ data: {
|
|
|
357
|
+ 'indent_id': indent_id,
|
|
|
358
|
+ 'is_courier': is_courier,
|
|
|
359
|
+ 'logistic_name': logistic_name,
|
|
|
360
|
+ 'logistic_code': logistic_code,
|
|
|
361
|
+ 'start_time': start_time,
|
|
|
362
|
+ // 'end_time': end_time
|
|
|
363
|
+ },
|
|
|
364
|
+ success: function (res) {
|
|
|
365
|
+ console.log(res);
|
|
|
366
|
+ if (res.code == 1) {
|
|
|
367
|
+ $('.order_' + indent_id).remove();
|
|
|
368
|
+ $(".tx_maskone").css({
|
|
|
369
|
+ display: "none"
|
|
|
370
|
+ });
|
|
|
371
|
+ $(".tx_mask").css({
|
|
|
372
|
+ display: "none"
|
|
|
373
|
+ });
|
|
|
374
|
+ $('.send').remove();
|
|
|
375
|
+ var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + indent_id + "\">\n" +
|
|
|
376
|
+ " <div class=\"log_seven_btn_contant\">\n" +
|
|
|
377
|
+ " 查看物流\n" +
|
|
|
378
|
+ " </div>\n" +
|
|
|
379
|
+ " </a>";
|
|
|
380
|
+ $('.log_seven_btn9').html(html)
|
|
|
381
|
+ window.location.href = "{:url('get_all')}";
|
|
|
382
|
+ }
|
|
|
383
|
+ alert(res.msg)
|
371
|
}
|
384
|
}
|
372
|
- alert(res.msg)
|
|
|
373
|
- }
|
385
|
+ })
|
374
|
})
|
386
|
})
|
375
|
})
|
387
|
})
|
376
|
-})
|
388
|
+</script>
|
|
|
389
|
+<script>
|
|
|
390
|
+ var dtpicker = new mui.DtPicker({
|
|
|
391
|
+ type: "datetime", //设置日历初始视图模式
|
|
|
392
|
+ beginDate: new Date(), //设置开始日期
|
|
|
393
|
+ labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
|
|
|
394
|
+ })
|
|
|
395
|
+ //统一配送选择时间
|
|
|
396
|
+ $(".tongyi_start_time").click(function () {
|
|
|
397
|
+ dtpicker.show(function (e) {
|
|
|
398
|
+ console.log(e);
|
|
|
399
|
+ $('.tongyi_start_time').text(e.text);
|
|
|
400
|
+ $('#start_time').val(e.text);
|
|
|
401
|
+ $('.tongyi_start_time').css('color', '#333333');
|
|
|
402
|
+ });
|
|
|
403
|
+ })
|
|
|
404
|
+
|
|
|
405
|
+ function zZFun(e) {
|
|
|
406
|
+ window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
|
|
407
|
+ }
|
377
|
</script>
|
408
|
</script>
|
378
|
</body>
|
409
|
</body>
|
379
|
|
410
|
|