作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

更改订单列表dom结构

@@ -27,6 +27,9 @@ class LogisticsController extends WeChatBaseController @@ -27,6 +27,9 @@ class LogisticsController extends WeChatBaseController
27 if(empty($data)){ 27 if(empty($data)){
28 $this->error('查询为空','','',''); 28 $this->error('查询为空','','','');
29 } 29 }
  30 + if($data['is_courier'] == 1){
  31 + $result['data'] = $data['start_time'];
  32 + }else{
30 $result = $birdController->getOrder($indent_id); 33 $result = $birdController->getOrder($indent_id);
31 if(empty($result)){ 34 if(empty($result)){
32 $this->error('未知错误','',''); 35 $this->error('未知错误','','');
@@ -34,11 +37,13 @@ class LogisticsController extends WeChatBaseController @@ -34,11 +37,13 @@ class LogisticsController extends WeChatBaseController
34 if($result['code'] != 20000){ 37 if($result['code'] != 20000){
35 $this->error($result['msg'],'','',''); 38 $this->error($result['msg'],'','','');
36 } 39 }
  40 + }
37 $indent = $indentModel->findData(['id'=>$indent_id])->toArray(); 41 $indent = $indentModel->findData(['id'=>$indent_id])->toArray();
38 $indentGoodsModel = new IndentGoodsModel(); 42 $indentGoodsModel = new IndentGoodsModel();
39 $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent_id]); 43 $indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent_id]);
40 $indent['indent_goods'] = $indent_goods; 44 $indent['indent_goods'] = $indent_goods;
41 $this->assign('data',$result['data']); 45 $this->assign('data',$result['data']);
  46 + $this->assign('data2',$data->toArray());
42 $this->assign('indent',$indent); 47 $this->assign('indent',$indent);
43 return $this->fetch(); 48 return $this->fetch();
44 } 49 }
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <!-- 顶部 --> 14 <!-- 顶部 -->
15 <div class="order_top"> 15 <div class="order_top">
16 <img src="__TMPL__/public/assets/images/left.png" alt=""> 16 <img src="__TMPL__/public/assets/images/left.png" alt="">
17 - <p>我的订单</p> 17 + <p>物流信息</p>
18 </div> 18 </div>
19 <div class="logistics_box"> 19 <div class="logistics_box">
20 <!-- 商品信息 --> 20 <!-- 商品信息 -->
@@ -24,33 +24,35 @@ @@ -24,33 +24,35 @@
24 </div> 24 </div>
25 <div class="log_detailTxt"> 25 <div class="log_detailTxt">
26 <h1 class="one-txt-cut">{$indent.indent_goods.0.book_name}</h1> 26 <h1 class="one-txt-cut">{$indent.indent_goods.0.book_name}</h1>
27 - <p>运单号:{$indent.logistic_code}</p> 27 + <p>运单号:<notempty name="$indent.logistic_code">{$indent.logistic_code}<else />暂无</notempty></p>
28 <p> 28 <p>
29 信息来源: 29 信息来源:
30 - <if condition="$indent.logistic_code eq SF"> 30 + <if condition="$indent.logistic_name eq 'SF'">
31 顺丰快递 31 顺丰快递
32 - <elseif condition="YTO"/> 32 + <elseif condition="$indent.logistic_name eq 'YTO'"/>
33 圆通快递 33 圆通快递
34 - <elseif condition="ZTO"/> 34 + <elseif condition="$indent.logistic_name eq 'ZTO'"/>
35 中通快递 35 中通快递
36 - <elseif condition="STO"/> 36 + <elseif condition="$indent.logistic_name eq 'STO'"/>
37 申通快递 37 申通快递
38 - <elseif condition="YD"/> 38 + <elseif condition="$indent.logistic_name eq 'YD'"/>
39 韵达快递 39 韵达快递
40 - <elseif condition="HHTT"/> 40 + <elseif condition="$indent.logistic_name eq 'HHTT'"/>
41 天天快递 41 天天快递
42 - <elseif condition="HTKY"/> 42 + <elseif condition="$indent.logistic_name eq 'HTKY'"/>
43 百世快递 43 百世快递
44 - <elseif condition="YZPY"/> 44 + <elseif condition="$indent.logistic_name eq 'YZPY'"/>
45 邮政快递包裹 45 邮政快递包裹
46 - <elseif condition="EMS"/> 46 + <elseif condition="$indent.logistic_name eq 'EMS'"/>
47 EMS 47 EMS
48 - <elseif condition="DBL"/> 48 + <elseif condition="$indent.logistic_name eq 'DBL'"/>
49 德邦快递 49 德邦快递
50 - <elseif condition="ZJS"/> 50 + <elseif condition="$indent.logistic_name eq 'ZJS'"/>
51 宅急送 51 宅急送
52 - <elseif condition="TNT"/> 52 + <elseif condition="$indent.logistic_name eq 'TNT'"/>
53 TNT快递 53 TNT快递
  54 + <else />
  55 + 暂无
54 </if> 56 </if>
55 </p> 57 </p>
56 </div> 58 </div>
@@ -59,15 +61,23 @@ @@ -59,15 +61,23 @@
59 61
60 <!-- 物流信息 --> 62 <!-- 物流信息 -->
61 <div class="logistics_process"> 63 <div class="logistics_process">
62 - <empty name="$data.traces">  
63 - 暂无物流信息  
64 - </empty>  
65 <div class="logistics_left"> 64 <div class="logistics_left">
  65 + <if condition="$data2.is_courier eq 1">
  66 + <div class="log_Li">
  67 + <div class="log_LiTime">
  68 + <p class="log_LiTime1" style="line-height: 1;">{$data2['start_time']}</p>
  69 + </div>
  70 + <div class="log_Box">
  71 + <div class="log_Liround"></div>
  72 + <div class="log_line"></div>
  73 + </div>
  74 + </div>
  75 + <else />
66 <foreach name="$data.traces" item="vo"> 76 <foreach name="$data.traces" item="vo">
67 <div class="log_Li"> 77 <div class="log_Li">
68 <div class="log_LiTime"> 78 <div class="log_LiTime">
69 - <p class="log_LiTime1">{:date('m-d',strtotime($vo['AcceptTime']))}</p>  
70 - <p class="log_LiTime2">{:date('H:i',strtotime($vo['AcceptTime']))}</p> 79 + <p class="log_LiTime1" style="line-height: 1;">{:date('m-d',strtotime($vo['AcceptTime']))}</p>
  80 + <p class="log_LiTime2" style="line-height: 1;">{:date('H:i',strtotime($vo['AcceptTime']))}</p>
71 </div> 81 </div>
72 <div class="log_Box"> 82 <div class="log_Box">
73 <div class="log_Liround"></div> 83 <div class="log_Liround"></div>
@@ -75,13 +85,23 @@ @@ -75,13 +85,23 @@
75 </div> 85 </div>
76 </div> 86 </div>
77 </foreach> 87 </foreach>
  88 + <empty name="$data.traces">
  89 + 暂无物流信息
  90 + </empty>
  91 + </if>
78 </div> 92 </div>
79 <div class="logistics_right"> 93 <div class="logistics_right">
  94 + <if condition="$data2.is_courier eq 1">
  95 + <div class="log_rightTxt">
  96 + <p class="log_rightTxt1">预计到达</p>
  97 + </div>
  98 + <else />
80 <foreach name="$data.traces" item="vo"> 99 <foreach name="$data.traces" item="vo">
81 <div class="log_rightTxt"> 100 <div class="log_rightTxt">
82 <p class="log_rightTxt1">{$vo.AcceptStation}</p> 101 <p class="log_rightTxt1">{$vo.AcceptStation}</p>
83 </div> 102 </div>
84 </foreach> 103 </foreach>
  104 + </if>
85 </div> 105 </div>
86 </div> 106 </div>
87 </div> 107 </div>
@@ -174,6 +174,22 @@ @@ -174,6 +174,22 @@
174 color: #333; 174 color: #333;
175 border-radius: 0.08rem; 175 border-radius: 0.08rem;
176 } 176 }
  177 + .log_three_bottom2{
  178 + margin-top: 0.3rem;
  179 + cursor: pointer;
  180 + width: 1.6rem;
  181 + height: 0.48rem;
  182 + background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
  183 + box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24);
  184 + opacity: 1;
  185 + border-radius: 0.08rem;
  186 + display: flex;
  187 + justify-content: center;
  188 + align-items: center;
  189 + font-size: 0.26rem;
  190 + font-weight: 400;
  191 + color: rgba(255, 255, 255, 1);
  192 + }
177 </style> 193 </style>
178 </head> 194 </head>
179 195
@@ -468,7 +484,7 @@ @@ -468,7 +484,7 @@
468 <elseif condition="$vo.state eq 5"/> 484 <elseif condition="$vo.state eq 5"/>
469 <if condition="$vo.is_courier eq 2"> 485 <if condition="$vo.is_courier eq 2">
470 <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> 486 <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
471 - <div class="log_three_bottom" data-indent-id="{$vo.id}"> 487 + <div class="log_three_bottom2" data-indent-id="{$vo.id}">
472 查看物流 488 查看物流
473 </div> 489 </div>
474 </a> 490 </a>
@@ -554,6 +570,11 @@ @@ -554,6 +570,11 @@
554 </div> 570 </div>
555 </a> 571 </a>
556 <else/> 572 <else/>
  573 + <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
  574 + <div class="log_three_bottom2" data-indent-id="{$vo.id}">
  575 + 查看物流
  576 + </div>
  577 + </a>
557 <div class="take_one" data-indent-id="{$vo.id}"> 578 <div class="take_one" data-indent-id="{$vo.id}">
558 完成 579 完成
559 </div> 580 </div>
@@ -630,7 +651,7 @@ @@ -630,7 +651,7 @@
630 <elseif condition="$vo.state eq 5"/> 651 <elseif condition="$vo.state eq 5"/>
631 <if condition="$vo.is_courier eq 2"> 652 <if condition="$vo.is_courier eq 2">
632 <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}"> 653 <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
633 - <div class="log_three_bottom" data-indent-id="{$vo.id}"> 654 + <div class="log_three_bottom2" data-indent-id="{$vo.id}">
634 查看物流 655 查看物流
635 </div> 656 </div>
636 </a> 657 </a>
@@ -825,7 +846,7 @@ @@ -825,7 +846,7 @@
825 $(this).addClass('there_unActive').siblings().removeClass('there_unActive'); 846 $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
826 $('.get_Gofo').text($(this).text()).css("color", "#333"); 847 $('.get_Gofo').text($(this).text()).css("color", "#333");
827 $(".tx_mask_kuaidi").hide(); 848 $(".tx_mask_kuaidi").hide();
828 -// $('#logistic_name').val($(this).attr('data-name')) 849 + $('#logistic_name').val($(this).attr('data-name'))
829 }); 850 });
830 var index = $(".log_three_bottom").index(); 851 var index = $(".log_three_bottom").index();
831 $("body").on('click', '.log_three_bottom', function () { 852 $("body").on('click', '.log_three_bottom', function () {
@@ -893,12 +914,16 @@ @@ -893,12 +914,16 @@
893 var state = '已发货'; 914 var state = '已发货';
894 if (result[i]['is_courier'] == 2) { 915 if (result[i]['is_courier'] == 2) {
895 var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" + 916 var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" +
896 - "\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom\" data-indent-id=\"" + result[i].id + "\">\n" + 917 + "\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom2\" data-indent-id=\"" + result[i].id + "\">\n" +
897 "\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" + 918 "\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" +
898 "\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" + 919 "\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" +
899 "\t\t\t\t\t\t\t\t\t\t</a>"; 920 "\t\t\t\t\t\t\t\t\t\t</a>";
900 } else { 921 } else {
901 - var html_bottom = "<div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" + 922 + var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+ result[i].id +"\">\n" +
  923 + " <div class=\"log_three_bottom2\" data-indent-id=\"{$vo.id}\" style='margin-right: 15px;'>\n" +
  924 + " 查看物流\n" +
  925 + " </div>\n" +
  926 + " </a><div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" +
902 " 完成\n" + 927 " 完成\n" +
903 " </div>"; 928 " </div>";
904 } 929 }