正在显示
4 个修改的文件
包含
97 行增加
和
22 行删除
@@ -265,6 +265,53 @@ class BirdController extends HomeBaseController | @@ -265,6 +265,53 @@ class BirdController extends HomeBaseController | ||
265 | return $result; | 265 | return $result; |
266 | } | 266 | } |
267 | 267 | ||
268 | + public function monitoring($indent_id = null){ | ||
269 | +// if(empty($indent_id)){ | ||
270 | +// $this->error('缺少必要参数','','',''); | ||
271 | +// } | ||
272 | +// $this->indent_id = $indent_id; | ||
273 | +// $where['id'] = ['eq',$this->indent_id]; | ||
274 | +// $indentModel = new IndentModel(); | ||
275 | +// $indent = $indentModel->findData($where); | ||
276 | +// if(empty($indent)){ | ||
277 | +// $this->error('未查询到该订单','','',''); | ||
278 | +// } | ||
279 | +//// if($indent['state'] != 2){ | ||
280 | +//// $this->error('该订单不是已发货状态','','',''); | ||
281 | +//// } | ||
282 | +// //收货地址 | ||
283 | +// $where2['id'] = ['eq',$indent['indent_address']]; | ||
284 | +// $addressModel = new AddressModel(); | ||
285 | +// $address = $addressModel->findData($where2); | ||
286 | + //请求url,接口正式地址:http://api.kdniao.com/api/eorderservice 测试环境地址:http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInv | ||
287 | + defined('ReqURL') or define('ReqURL', 'http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx'); | ||
288 | + | ||
289 | + $jsonResult = $this->getOrder2(); | ||
290 | + $result = json_decode($jsonResult,true); | ||
291 | + dump($result); | ||
292 | + if(empty($result['Reason'])){ | ||
293 | + return ['code'=>20000,'msg'=>'SUCCESS'];//订单轨迹 | ||
294 | + }else{ | ||
295 | + return ['code'=>40000,'msg'=>$result['Reason']]; | ||
296 | + } | ||
297 | + } | ||
298 | + public function getOrder2(){ | ||
299 | + $requestData= "{'OrderCode':'','ShipperCode':'YD','LogisticCode':'3718481494155'}"; | ||
300 | + | ||
301 | + $datas = array( | ||
302 | + 'EBusinessID' => EBusinessID, | ||
303 | + 'RequestType' => '1002', | ||
304 | + 'RequestData' => urlencode($requestData) , | ||
305 | + 'DataType' => '2', | ||
306 | + ); | ||
307 | + $datas['DataSign'] = $this->encrypt($requestData, AppKey); | ||
308 | + $result=$this->sendPost(ReqURL, $datas); | ||
309 | + | ||
310 | + //根据公司业务处理返回的信息...... | ||
311 | + | ||
312 | + return $result; | ||
313 | + } | ||
314 | + | ||
268 | 315 | ||
269 | 316 | ||
270 | 317 |
@@ -207,6 +207,7 @@ | @@ -207,6 +207,7 @@ | ||
207 | <div class="log_three_list_contant" style="display: block;"> | 207 | <div class="log_three_list_contant" style="display: block;"> |
208 | <foreach name="$data" item="vo"> | 208 | <foreach name="$data" item="vo"> |
209 | <if condition="$vo.state eq 2"> | 209 | <if condition="$vo.state eq 2"> |
210 | + <php>$arr1[] = $vo;</php> | ||
210 | <div class="log_three_list order_{$vo.id}"> | 211 | <div class="log_three_list order_{$vo.id}"> |
211 | <div class="log_three_list_top"> | 212 | <div class="log_three_list_top"> |
212 | <div class="log_three_list_top_left"> | 213 | <div class="log_three_list_top_left"> |
@@ -246,7 +247,7 @@ | @@ -246,7 +247,7 @@ | ||
246 | {$i_g.book_name} | 247 | {$i_g.book_name} |
247 | </div> | 248 | </div> |
248 | <div class="log_three_center_two">×{$i_g.number}</div> | 249 | <div class="log_three_center_two">×{$i_g.number}</div> |
249 | - <div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div> | 250 | + <div class="log_three_center_three"><span>¥</span>{$i_g.price}</div> |
250 | </div> | 251 | </div> |
251 | </div> | 252 | </div> |
252 | </foreach> | 253 | </foreach> |
@@ -265,6 +266,9 @@ | @@ -265,6 +266,9 @@ | ||
265 | 查看物流 | 266 | 查看物流 |
266 | </div> | 267 | </div> |
267 | </a> | 268 | </a> |
269 | + <div class="log_three_bottom" data-indent-id="{$vo.id}"> | ||
270 | + 完成 | ||
271 | + </div> | ||
268 | </if> | 272 | </if> |
269 | <elseif condition="$vo.state eq 3"/> | 273 | <elseif condition="$vo.state eq 3"/> |
270 | <div class="log_three_bottom" data-indent-id="{$vo.id}"> | 274 | <div class="log_three_bottom" data-indent-id="{$vo.id}"> |
@@ -275,11 +279,15 @@ | @@ -275,11 +279,15 @@ | ||
275 | </div> | 279 | </div> |
276 | </if> | 280 | </if> |
277 | </foreach> | 281 | </foreach> |
282 | + <empty name="$arr1"> | ||
283 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
284 | + </empty> | ||
278 | </div> | 285 | </div> |
279 | <!--已发货--> | 286 | <!--已发货--> |
280 | <div class="log_three_list_contant"> | 287 | <div class="log_three_list_contant"> |
281 | <foreach name="$data" item="vo"> | 288 | <foreach name="$data" item="vo"> |
282 | <if condition="$vo.state eq 5"> | 289 | <if condition="$vo.state eq 5"> |
290 | + <php>$arr2[] = $vo;</php> | ||
283 | <div class="log_three_list order_{$vo.id}"> | 291 | <div class="log_three_list order_{$vo.id}"> |
284 | <div class="log_three_list_top"> | 292 | <div class="log_three_list_top"> |
285 | <div class="log_three_list_top_left"> | 293 | <div class="log_three_list_top_left"> |
@@ -319,7 +327,7 @@ | @@ -319,7 +327,7 @@ | ||
319 | {$i_g.book_name} | 327 | {$i_g.book_name} |
320 | </div> | 328 | </div> |
321 | <div class="log_three_center_two">×{$i_g.number}</div> | 329 | <div class="log_three_center_two">×{$i_g.number}</div> |
322 | - <div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div> | 330 | + <div class="log_three_center_three"><span>¥</span>{$i_g.price}</div> |
323 | </div> | 331 | </div> |
324 | </div> | 332 | </div> |
325 | </foreach> | 333 | </foreach> |
@@ -345,14 +353,17 @@ | @@ -345,14 +353,17 @@ | ||
345 | </if> | 353 | </if> |
346 | </div> | 354 | </div> |
347 | </div> | 355 | </div> |
348 | - </a> | ||
349 | </if> | 356 | </if> |
350 | </foreach> | 357 | </foreach> |
358 | + <empty name="$arr2"> | ||
359 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
360 | + </empty> | ||
351 | </div> | 361 | </div> |
352 | <!--已完成--> | 362 | <!--已完成--> |
353 | <div class="log_three_list_contant"> | 363 | <div class="log_three_list_contant"> |
354 | <foreach name="$data" item="vo"> | 364 | <foreach name="$data" item="vo"> |
355 | <if condition="$vo.state eq 3"> | 365 | <if condition="$vo.state eq 3"> |
366 | + <php>$arr3 = $vo;</php> | ||
356 | <div class="log_three_list order_{$vo.id}"> | 367 | <div class="log_three_list order_{$vo.id}"> |
357 | <div class="log_three_list_top"> | 368 | <div class="log_three_list_top"> |
358 | <div class="log_three_list_top_left"> | 369 | <div class="log_three_list_top_left"> |
@@ -392,7 +403,7 @@ | @@ -392,7 +403,7 @@ | ||
392 | {$i_g.book_name} | 403 | {$i_g.book_name} |
393 | </div> | 404 | </div> |
394 | <div class="log_three_center_two">×{$i_g.number}</div> | 405 | <div class="log_three_center_two">×{$i_g.number}</div> |
395 | - <div class="log_three_center_three"><span>¥</span>{$i_g.price*$i_g.number}</div> | 406 | + <div class="log_three_center_three"><span>¥</span>{$i_g.price}</div> |
396 | </div> | 407 | </div> |
397 | </div> | 408 | </div> |
398 | </foreach> | 409 | </foreach> |
@@ -420,10 +431,14 @@ | @@ -420,10 +431,14 @@ | ||
420 | </div> | 431 | </div> |
421 | </if> | 432 | </if> |
422 | </foreach> | 433 | </foreach> |
434 | + <empty name="$arr3"> | ||
435 | + <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div> | ||
436 | + </empty> | ||
423 | </div> | 437 | </div> |
424 | </div> | 438 | </div> |
425 | <!-- 底部按钮 --> | 439 | <!-- 底部按钮 --> |
426 | -<div class="log_three_list_fixed"> | 440 | +<div style="position: fixed;bottom:0;width: 100%;"> |
441 | + <div class="log_three_list_fixed"> | ||
427 | <div class="log_three_fixed_left"> | 442 | <div class="log_three_fixed_left"> |
428 | <div class="log_three_fixed_left_one"> | 443 | <div class="log_three_fixed_left_one"> |
429 | <img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/> | 444 | <img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/> |
@@ -435,6 +450,7 @@ | @@ -435,6 +450,7 @@ | ||
435 | <div class="log_three_fixed_right unify_all"> | 450 | <div class="log_three_fixed_right unify_all"> |
436 | 统一发货 | 451 | 统一发货 |
437 | </div> | 452 | </div> |
453 | + </div> | ||
438 | </div> | 454 | </div> |
439 | <script src="__TMPL__/public/assets/js/jquery.js"></script> | 455 | <script src="__TMPL__/public/assets/js/jquery.js"></script> |
440 | <script src="__TMPL__/public/assets/js/base.js"></script> | 456 | <script src="__TMPL__/public/assets/js/base.js"></script> |
@@ -445,7 +461,6 @@ | @@ -445,7 +461,6 @@ | ||
445 | // 选择学校 | 461 | // 选择学校 |
446 | $(".three_model_school_left").click(function () { | 462 | $(".three_model_school_left").click(function () { |
447 | var indexs = $(this).index(); | 463 | var indexs = $(this).index(); |
448 | - console.log(indexs); | ||
449 | $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none"); | 464 | $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none"); |
450 | }); | 465 | }); |
451 | 466 | ||
@@ -454,19 +469,38 @@ | @@ -454,19 +469,38 @@ | ||
454 | $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa"); | 469 | $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa"); |
455 | $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none'); | 470 | $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none'); |
456 | search(); | 471 | search(); |
472 | + $('.log_three_fixed_left_one img').attr('src',"__TMPL__/public/assets/images/fangkuang.png") | ||
457 | }); | 473 | }); |
458 | $(".three_model_school_tab>div").click(function () { | 474 | $(".three_model_school_tab>div").click(function () { |
459 | $(this).addClass("three_model_school_hover").addClass("word_color").addClass('aaa').siblings().removeClass("three_model_school_hover").removeClass("word_color").removeClass("aaa"); | 475 | $(this).addClass("three_model_school_hover").addClass("word_color").addClass('aaa').siblings().removeClass("three_model_school_hover").removeClass("word_color").removeClass("aaa"); |
460 | }); | 476 | }); |
461 | 477 | ||
462 | $("body").on('click', '.log_three_list_top_lo', function () { | 478 | $("body").on('click', '.log_three_list_top_lo', function () { |
463 | - console.log($(this).find("img").attr("src")); | ||
464 | if ($(this).find("img").attr("src") == "__TMPL__/public/assets/images/fangkuang.png") { | 479 | if ($(this).find("img").attr("src") == "__TMPL__/public/assets/images/fangkuang.png") { |
465 | $(this).find("img").attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png"); | 480 | $(this).find("img").attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png"); |
466 | } else { | 481 | } else { |
467 | $(this).find("img").attr("src", "__TMPL__/public/assets/images/fangkuang.png"); | 482 | $(this).find("img").attr("src", "__TMPL__/public/assets/images/fangkuang.png"); |
468 | } | 483 | } |
484 | + //判断订单是否全选了 | ||
485 | + check(); | ||
469 | }); | 486 | }); |
487 | + function check(){ | ||
488 | + var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa')); | ||
489 | + var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length; | ||
490 | + var l = 0; | ||
491 | + for(var n=0;n<length;n++){ | ||
492 | + console.log($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src')); | ||
493 | + if($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png"){ | ||
494 | + l++ | ||
495 | + } | ||
496 | + } | ||
497 | + console.log('@@@@@'+l+'@@@@@'+length); | ||
498 | + if(l == length){ | ||
499 | + $('.log_three_fixed_left_one img').attr('src',"__TMPL__/public/assets/images/xuanzhong (1).png") | ||
500 | + }else{ | ||
501 | + $('.log_three_fixed_left_one img').attr('src',"__TMPL__/public/assets/images/fangkuang.png") | ||
502 | + } | ||
503 | + } | ||
470 | $(".log_three_fixed_left_one").click(function () { | 504 | $(".log_three_fixed_left_one").click(function () { |
471 | if ( | 505 | if ( |
472 | $(this) | 506 | $(this) |
@@ -505,13 +539,11 @@ | @@ -505,13 +539,11 @@ | ||
505 | var index = $(this).index(); | 539 | var index = $(this).index(); |
506 | $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); | 540 | $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); |
507 | $('.log_three_select_contant').text($(this).text()).css("color", "#333"); | 541 | $('.log_three_select_contant').text($(this).text()).css("color", "#333"); |
508 | - console.log($('.log_three_select_contant').text($(this).text())) | ||
509 | $(".tx_mask_tongyi").hide(); | 542 | $(".tx_mask_tongyi").hide(); |
510 | $("#is_courier").val($(this).attr('data-id')) | 543 | $("#is_courier").val($(this).attr('data-id')) |
511 | }) | 544 | }) |
512 | //选择快递方式 | 545 | //选择快递方式 |
513 | $(".log_psong_select").click(function () { | 546 | $(".log_psong_select").click(function () { |
514 | - console.log(213) | ||
515 | $(".tx_mask_kuaidi").css({ | 547 | $(".tx_mask_kuaidi").css({ |
516 | display: "block" | 548 | display: "block" |
517 | }); | 549 | }); |
@@ -525,7 +557,6 @@ | @@ -525,7 +557,6 @@ | ||
525 | }); | 557 | }); |
526 | var index = $(".log_three_bottom").index(); | 558 | var index = $(".log_three_bottom").index(); |
527 | $("body").on('click', '.log_three_bottom', function () { | 559 | $("body").on('click', '.log_three_bottom', function () { |
528 | - console.log(index); | ||
529 | $(".tx_maskone").css({ | 560 | $(".tx_maskone").css({ |
530 | display: "block" | 561 | display: "block" |
531 | }); | 562 | }); |
@@ -544,7 +575,6 @@ | @@ -544,7 +575,6 @@ | ||
544 | $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); | 575 | $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); |
545 | if ($(this).hasClass("there_unActive")) { | 576 | if ($(this).hasClass("there_unActive")) { |
546 | $xuexiao = $(this).text(); | 577 | $xuexiao = $(this).text(); |
547 | - console.log($xuexiao); | ||
548 | $(".there_university").hide(); | 578 | $(".there_university").hide(); |
549 | $(".there_class").show(); | 579 | $(".there_class").show(); |
550 | $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); | 580 | $('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover'); |
@@ -552,7 +582,6 @@ | @@ -552,7 +582,6 @@ | ||
552 | } | 582 | } |
553 | }); | 583 | }); |
554 | $('body').on('click', ".there_class div", function () { | 584 | $('body').on('click', ".there_class div", function () { |
555 | - console.log($xuexiao) | ||
556 | var index2 = $(this).index(); | 585 | var index2 = $(this).index(); |
557 | $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); | 586 | $(this).addClass("there_unActive").siblings().removeClass("there_unActive"); |
558 | if ($xuexiao == undefined) { | 587 | if ($xuexiao == undefined) { |
@@ -579,14 +608,11 @@ | @@ -579,14 +608,11 @@ | ||
579 | var grade = $('#grade').val(); | 608 | var grade = $('#grade').val(); |
580 | var state = $('.log_three_tab_top .aaa').attr('data-state'); | 609 | var state = $('.log_three_tab_top .aaa').attr('data-state'); |
581 | var is_courier = $('#is_courier').val(); | 610 | var is_courier = $('#is_courier').val(); |
582 | - console.log(state); | ||
583 | // if (school == '') { | 611 | // if (school == '') { |
584 | // alert('请选择学校') | 612 | // alert('请选择学校') |
585 | // } else if (grade == '') { | 613 | // } else if (grade == '') { |
586 | // alert('请选择班级') | 614 | // alert('请选择班级') |
587 | // } else { | 615 | // } else { |
588 | - console.log(school); | ||
589 | - console.log(grade); | ||
590 | $.ajax({ | 616 | $.ajax({ |
591 | 'url': "{:url('order_salesman/getOrderSalesman')}", | 617 | 'url': "{:url('order_salesman/getOrderSalesman')}", |
592 | 'type': "GET", | 618 | 'type': "GET", |
@@ -595,8 +621,11 @@ | @@ -595,8 +621,11 @@ | ||
595 | var index = $('.log_three_tab_top div').index($('.aaa')); | 621 | var index = $('.log_three_tab_top div').index($('.aaa')); |
596 | if (data.code == 1) { | 622 | if (data.code == 1) { |
597 | var result = data.data; | 623 | var result = data.data; |
598 | - console.log(result) | 624 | + if(result == 0){ |
625 | + var html = "<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>"; | ||
626 | + }else{ | ||
599 | var html = ''; | 627 | var html = ''; |
628 | + } | ||
600 | for (var i = 0; i < result.length; i++) { | 629 | for (var i = 0; i < result.length; i++) { |
601 | if (result[i]['state'] == 2) { | 630 | if (result[i]['state'] == 2) { |
602 | var state = '待发货'; | 631 | var state = '待发货'; |
@@ -788,7 +817,6 @@ | @@ -788,7 +817,6 @@ | ||
788 | 'indent_id': indent_id | 817 | 'indent_id': indent_id |
789 | }, | 818 | }, |
790 | success: function (res) { | 819 | success: function (res) { |
791 | - console.log(res); | ||
792 | if (res.code == 1) { | 820 | if (res.code == 1) { |
793 | $('.order_' + indent_id).remove(); | 821 | $('.order_' + indent_id).remove(); |
794 | $(".tx_maskone").css({ | 822 | $(".tx_maskone").css({ |
@@ -806,9 +834,10 @@ | @@ -806,9 +834,10 @@ | ||
806 | }) | 834 | }) |
807 | }); | 835 | }); |
808 | $('body').on('click', '.unify_all', function () { | 836 | $('body').on('click', '.unify_all', function () { |
809 | - var length = $('.log_three_list_top_lo img').length - 1; | 837 | + var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa')); |
838 | + var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length-1; | ||
810 | var arr = []; | 839 | var arr = []; |
811 | - for (var i = 0; i <= length; i++) { | 840 | + for (var i = 0; i < length; i++) { |
812 | if ($('.log_three_list_top_lo img').attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { | 841 | if ($('.log_three_list_top_lo img').attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") { |
813 | arr.push($('.log_three_list_top_lo img').eq(i).attr('data-indent-id')); | 842 | arr.push($('.log_three_list_top_lo img').eq(i).attr('data-indent-id')); |
814 | } | 843 | } |
@@ -852,7 +881,6 @@ | @@ -852,7 +881,6 @@ | ||
852 | function update() { | 881 | function update() { |
853 | var is_courier = $('#is_courier').val(); | 882 | var is_courier = $('#is_courier').val(); |
854 | var index = $('.log_three_tab_top div').index($('.aaa')); | 883 | var index = $('.log_three_tab_top div').index($('.aaa')); |
855 | - console.log(is_courier); | ||
856 | if (is_courier == 1 && index == 0) { | 884 | if (is_courier == 1 && index == 0) { |
857 | $('.log_three_list_fixed').show(); | 885 | $('.log_three_list_fixed').show(); |
858 | } else if (is_courier == 2 || index != 0) { | 886 | } else if (is_courier == 2 || index != 0) { |
@@ -247,7 +247,7 @@ | @@ -247,7 +247,7 @@ | ||
247 | </div> | 247 | </div> |
248 | </div> | 248 | </div> |
249 | <div class="log_four_order_right"> | 249 | <div class="log_four_order_right"> |
250 | - <span>¥</span>{$i_g.price*$i_g.number} | 250 | + <span>¥</span>{$i_g.price} |
251 | </div> | 251 | </div> |
252 | </div> | 252 | </div> |
253 | </foreach> | 253 | </foreach> |
@@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | ||
204 | */ | 204 | */ |
205 | public function checkWeChatUserLogin() | 205 | public function checkWeChatUserLogin() |
206 | { | 206 | { |
207 | -// $user = Db::name('user')->where('id',5)->find(); | 207 | +// $user = Db::name('user')->where('id',4)->find(); |
208 | // cmf_update_current_user($user); | 208 | // cmf_update_current_user($user); |
209 | $userId = cmf_get_current_user_id(); | 209 | $userId = cmf_get_current_user_id(); |
210 | if (empty($userId)) { | 210 | if (empty($userId)) { |
-
请 注册 或 登录 后发表评论