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

更改订单列表dom结构

... ... @@ -27,6 +27,9 @@ class LogisticsController extends WeChatBaseController
if(empty($data)){
$this->error('查询为空','','','');
}
if($data['is_courier'] == 1){
$result['data'] = $data['start_time'];
}else{
$result = $birdController->getOrder($indent_id);
if(empty($result)){
$this->error('未知错误','','');
... ... @@ -34,11 +37,13 @@ class LogisticsController extends WeChatBaseController
if($result['code'] != 20000){
$this->error($result['msg'],'','','');
}
}
$indent = $indentModel->findData(['id'=>$indent_id])->toArray();
$indentGoodsModel = new IndentGoodsModel();
$indent_goods = $indentGoodsModel->selectData(['indent_id'=>$indent_id]);
$indent['indent_goods'] = $indent_goods;
$this->assign('data',$result['data']);
$this->assign('data2',$data->toArray());
$this->assign('indent',$indent);
return $this->fetch();
}
... ...
... ... @@ -14,7 +14,7 @@
<!-- 顶部 -->
<div class="order_top">
<img src="__TMPL__/public/assets/images/left.png" alt="">
<p>我的订单</p>
<p>物流信息</p>
</div>
<div class="logistics_box">
<!-- 商品信息 -->
... ... @@ -24,33 +24,35 @@
</div>
<div class="log_detailTxt">
<h1 class="one-txt-cut">{$indent.indent_goods.0.book_name}</h1>
<p>运单号:{$indent.logistic_code}</p>
<p>运单号:<notempty name="$indent.logistic_code">{$indent.logistic_code}<else />暂无</notempty></p>
<p>
信息来源:
<if condition="$indent.logistic_code eq SF">
<if condition="$indent.logistic_name eq 'SF'">
顺丰快递
<elseif condition="YTO"/>
<elseif condition="$indent.logistic_name eq 'YTO'"/>
圆通快递
<elseif condition="ZTO"/>
<elseif condition="$indent.logistic_name eq 'ZTO'"/>
中通快递
<elseif condition="STO"/>
<elseif condition="$indent.logistic_name eq 'STO'"/>
申通快递
<elseif condition="YD"/>
<elseif condition="$indent.logistic_name eq 'YD'"/>
韵达快递
<elseif condition="HHTT"/>
<elseif condition="$indent.logistic_name eq 'HHTT'"/>
天天快递
<elseif condition="HTKY"/>
<elseif condition="$indent.logistic_name eq 'HTKY'"/>
百世快递
<elseif condition="YZPY"/>
<elseif condition="$indent.logistic_name eq 'YZPY'"/>
邮政快递包裹
<elseif condition="EMS"/>
<elseif condition="$indent.logistic_name eq 'EMS'"/>
EMS
<elseif condition="DBL"/>
<elseif condition="$indent.logistic_name eq 'DBL'"/>
德邦快递
<elseif condition="ZJS"/>
<elseif condition="$indent.logistic_name eq 'ZJS'"/>
宅急送
<elseif condition="TNT"/>
<elseif condition="$indent.logistic_name eq 'TNT'"/>
TNT快递
<else />
暂无
</if>
</p>
</div>
... ... @@ -59,15 +61,23 @@
<!-- 物流信息 -->
<div class="logistics_process">
<empty name="$data.traces">
暂无物流信息
</empty>
<div class="logistics_left">
<if condition="$data2.is_courier eq 1">
<div class="log_Li">
<div class="log_LiTime">
<p class="log_LiTime1" style="line-height: 1;">{$data2['start_time']}</p>
</div>
<div class="log_Box">
<div class="log_Liround"></div>
<div class="log_line"></div>
</div>
</div>
<else />
<foreach name="$data.traces" item="vo">
<div class="log_Li">
<div class="log_LiTime">
<p class="log_LiTime1">{:date('m-d',strtotime($vo['AcceptTime']))}</p>
<p class="log_LiTime2">{:date('H:i',strtotime($vo['AcceptTime']))}</p>
<p class="log_LiTime1" style="line-height: 1;">{:date('m-d',strtotime($vo['AcceptTime']))}</p>
<p class="log_LiTime2" style="line-height: 1;">{:date('H:i',strtotime($vo['AcceptTime']))}</p>
</div>
<div class="log_Box">
<div class="log_Liround"></div>
... ... @@ -75,13 +85,23 @@
</div>
</div>
</foreach>
<empty name="$data.traces">
暂无物流信息
</empty>
</if>
</div>
<div class="logistics_right">
<if condition="$data2.is_courier eq 1">
<div class="log_rightTxt">
<p class="log_rightTxt1">预计到达</p>
</div>
<else />
<foreach name="$data.traces" item="vo">
<div class="log_rightTxt">
<p class="log_rightTxt1">{$vo.AcceptStation}</p>
</div>
</foreach>
</if>
</div>
</div>
</div>
... ...
... ... @@ -174,6 +174,22 @@
color: #333;
border-radius: 0.08rem;
}
.log_three_bottom2{
margin-top: 0.3rem;
cursor: pointer;
width: 1.6rem;
height: 0.48rem;
background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24);
opacity: 1;
border-radius: 0.08rem;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.26rem;
font-weight: 400;
color: rgba(255, 255, 255, 1);
}
</style>
</head>
... ... @@ -468,7 +484,7 @@
<elseif condition="$vo.state eq 5"/>
<if condition="$vo.is_courier eq 2">
<a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
<div class="log_three_bottom" data-indent-id="{$vo.id}">
<div class="log_three_bottom2" data-indent-id="{$vo.id}">
查看物流
</div>
</a>
... ... @@ -554,6 +570,11 @@
</div>
</a>
<else/>
<a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
<div class="log_three_bottom2" data-indent-id="{$vo.id}">
查看物流
</div>
</a>
<div class="take_one" data-indent-id="{$vo.id}">
完成
</div>
... ... @@ -630,7 +651,7 @@
<elseif condition="$vo.state eq 5"/>
<if condition="$vo.is_courier eq 2">
<a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
<div class="log_three_bottom" data-indent-id="{$vo.id}">
<div class="log_three_bottom2" data-indent-id="{$vo.id}">
查看物流
</div>
</a>
... ... @@ -825,7 +846,7 @@
$(this).addClass('there_unActive').siblings().removeClass('there_unActive');
$('.get_Gofo').text($(this).text()).css("color", "#333");
$(".tx_mask_kuaidi").hide();
// $('#logistic_name').val($(this).attr('data-name'))
$('#logistic_name').val($(this).attr('data-name'))
});
var index = $(".log_three_bottom").index();
$("body").on('click', '.log_three_bottom', function () {
... ... @@ -893,12 +914,16 @@
var state = '已发货';
if (result[i]['is_courier'] == 2) {
var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" +
"\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" +
"\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" +
"\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" +
"\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" +
"\t\t\t\t\t\t\t\t\t\t</a>";
} else {
var html_bottom = "<div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" +
var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+ result[i].id +"\">\n" +
" <div class=\"log_three_bottom2\" data-indent-id=\"{$vo.id}\" style='margin-right: 15px;'>\n" +
" 查看物流\n" +
" </div>\n" +
" </a><div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" +
" 完成\n" +
" </div>";
}
... ...