作者 anyv
1 个管道 的构建 通过 耗费 4 秒

6

... ... @@ -35,6 +35,41 @@ class OrderscourierController extends AdminBaseController{
}
/**
*平台订单查看
*/
public function plat_view(){
$id = $this -> request -> param();
$indent_id = $id['id'];
$data_goods = Db::name('indent_goods') -> where('indent_id',$indent_id) -> select();
$data_in = Db::name('indent') -> where('id',$indent_id) -> find();
$this -> assign('data_goods',$data_goods);
$this -> assign('data_in',$data_in);
//地址查询
$address = Db::name('address') -> where("id",$data_in['indent_address']) -> find();
if(!empty($address)){
$this -> assign('address',$address);
}else{
$this -> assign('address',null);
}
return $this -> fetch();
}
/**
* 查看物流信息
*/
public function logistics_information(){
$indent_id = $this -> request -> param();
$bird = new BirdController();
$logistics = $bird -> getOrder($indent_id['id']);
$this -> assign('logistics',$logistics['data']['traces']);
return $this -> fetch();
}
... ...
... ... @@ -386,6 +386,21 @@ class SalesmanController extends AdminBaseController{
}
/**
* 将老师和下线设置为业务员
*/
public function set_free_man(){
$id = $_POST['id'];
$data = Db::name('my_user') -> where('id',$id) -> update(['status'=>0,'pid'=>0,'is_pro'=>0,'bind_status'=>0,'is_withdrawal'=>1]);
$student = Db::name('my_user') -> where('pid',$id) -> update(['status'=>0,'pid'=>0,'bind_status'=>0]);
if($data){
return true;
}else{
return false;
}
}
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('Orderscourier/order_list')}">平台订单列表</a></li>
<li class="active"><a href="#">物流信息</a></li>
</ul>
<table class="table table-bordered">
<thead>
<tr>
<th>时间</th>
<th>城市</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<volist name="logistics" id="vo">
<tr>
<td>{$vo.AcceptTime}</td>
<td>{$vo.AcceptStation}</td>
<td>{$vo.Remark}</td>
</tr>
</volist>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -60,11 +60,12 @@
<td>已完成</td>
</if>
<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
<td style="width: 171px;" class="fahuo{$vo.id}">
<td style="width: 230px;" class="fahuo{$vo.id}">
<a href="{:url('Platformorders/plat_view',array('id'=>$vo.id))}"><button type="button" class="btn btn-default">查看</button></a>
<if condition="$vo.state eq 2">
<button type="button" class="btn btn-default">物流信息</button>
<else/>
<a href="{:url('Platformorders/plat_view',array('id'=>$vo.id))}"><button type="button" class="btn btn-default">物流信息</button></a>
<a href="{:url('Orderscourier/logistics_information',array('id'=>$vo.id))}"><button type="button" class="btn btn-default">物流信息</button></a>
</if>
<if condition="$vo.state eq 2">
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('Orderscourier/order_list')}">平台订单列表</a></li>
<li class="active"><a href="#">订单查看</a></li>
</ul>
<volist name="data_goods" id="vo">
<div style="margin-top: 10px;">
<img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded">
<h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4>
<h4>定价:{$vo.pricing}</h4>
<h4>售价:{$vo.price}</h4>
</div>
</volist>
<div style="margin-top: 10px;">
<h4>姓名:{$data_in.name}</h4>
<h4>手机号:{$data_in.phone}</h4>
<h4>买家留言:{$data_in.leave_word}</h4>
<h4>收货地址:{$address.region}{$address.detailed}</h4>
</div>
</div>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('Platformorders/plat_list')}">平台订单列表</a></li>
<li><a href="{:url('Orderscourier/order_list')}">平台订单列表</a></li>
<li class="active"><a href="#">订单查看</a></li>
</ul>
<volist name="data_goods" id="vo">
... ...
... ... @@ -39,12 +39,13 @@
</thead>
<tbody>
<volist name="data_arr" id="vo">
<tr>
<tr class="tr{$vo.id}">
<td>{$vo.id}</td>
<td>{$vo.user_nickname}</td>
<td>{$vo.money}</td>
<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
<td style="width: 100px;">
<td style="width: 200px;">
<button type="button" class="btn btn-default" onclick="set_free_man({$vo.id})">设置自由人</button>
<a href="{:url('Salesman/student_list',array('teacher_id'=>$vo.id,'salesman_id'=>$salesman_id))}"><button type="button" class="btn btn-default">下线名单</button></a>
</td>
</tr>
... ... @@ -56,5 +57,23 @@
{$data->render()}
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
/**
*设置自由人身份
*/
function set_free_man(id){
ccc = window.confirm('确定将老师和下线学生设置为自由人?');
if(ccc){
$.post("{:url('Salesman/set_free_man')}",{id:id},function(data){
if(data){
alert('设置成功');
$('.tr'+id).remove();
}else{
alert('设置失败');
}
});
}
}
</script>
</body>
</html>
\ No newline at end of file
... ...