作者 郭鑫
1 个管道 的构建 通过 耗费 1 秒

页面修改

... ... @@ -145,17 +145,17 @@ class MemberController extends CommentController
// 我的订单详情
public function detail(){
$data = $this->request->param();
echo "<pre/>";
print_r($data);
die;
if(empty($data['logId'])){
$where_compare['l.id'] = $data['logId'];
$where_compare['l.status'] = array('neq',9);
$log = Db::name('CompareLog')->alias('l')
$coo_list = Db::name('CompareLog')->alias('l')
->where($where_compare)
->join("Member m",'m.id = l.resume_user_id')
->field('m.name,m.tel,l.order_id,l.status,l.id')
->select()->toArray();
->join("Hire h",'h.id = l.hire_id')
->join("Order o",'o.id = l.order_id')
->field('h.*,m.name as user_name,m.tel as user_tel,l.order_id,l.status,l.id,o.order_sn')
->find();
}else{
}
... ... @@ -163,53 +163,53 @@ class MemberController extends CommentController
if(!empty($data['type'])){
$where_order['o.status'] = $data['type'];
}else{
$where_order['o.status'] = array('neq',9);
}
$where_order['o.id'] = $data['id'];
$where_order['h.user_id'] = Session::get('uid');
$coo_list = Db::name('Order')->alias('o')
->where($where_order)
->join("Hire h",'h.id = o.hire_id')
->join("Select s",'s.id = h.select_id')
->join("Member m",'m.id = h.user_id')
->field('o.id,o.order_sn,o.status as orderStatus,o.create_time as cre,o.update_time as up , h.id as hire_id,h.* , s.name as select_name ,m.name as member_name ')
->order('o.create_time desc')
->find();
if($coo_list){
// 查询分配表
foreach ($coo_list as $k=>$v){
if($log){
$middle_list = $v;
foreach ($log as $lk=>$lv){
if($lv['order_id'] == $middle_list['id']){
$middle_list['start_time'] = date('Y.m.d',strtotime($middle_list['start_time']));
$middle_list['end_time'] = date('Y.m.d',strtotime($middle_list['end_time']));
$middle_list['orderStatus'] = $lv['status'];
$middle = $middle_list;
$middle['resume_name'] = $lv['name'];
$middle['resume_tel'] = $lv['tel'];
$middle['logId'] = $lv['id'];
$a[] = $middle;
$v = array();
}
}
if(!empty($v)){
$v['start_time'] = date('Y.m.d',strtotime($v['start_time']));
$v['end_time'] = date('Y.m.d',strtotime($v['end_time']));
$middle['resume_name'] = '';
$middle['resume_tel'] = '';
$middle['logId'] = '';
$a[] = $v;
}
}
}
}
//
// if(!empty($data['type'])){
// $where_order['o.status'] = $data['type'];
// }else{
// $where_order['o.status'] = array('neq',9);
// }
// $where_order['o.id'] = $data['id'];
// $where_order['h.user_id'] = Session::get('uid');
// $coo_list = Db::name('Order')->alias('o')
// ->where($where_order)
// ->join("Hire h",'h.id = o.hire_id')
// ->join("Select s",'s.id = h.select_id')
// ->join("Member m",'m.id = h.user_id')
// ->field('o.id,o.order_sn,o.status as orderStatus,o.create_time as cre,o.update_time as up , h.id as hire_id,h.* , s.name as select_name ,m.name as member_name ')
// ->order('o.create_time desc')
// ->find();
//
// if($coo_list){
//// 查询分配表
//
// foreach ($coo_list as $k=>$v){
// if($log){
// $middle_list = $v;
// foreach ($log as $lk=>$lv){
// if($lv['order_id'] == $middle_list['id']){
// $middle_list['start_time'] = date('Y.m.d',strtotime($middle_list['start_time']));
// $middle_list['end_time'] = date('Y.m.d',strtotime($middle_list['end_time']));
// $middle_list['orderStatus'] = $lv['status'];
// $middle = $middle_list;
// $middle['resume_name'] = $lv['name'];
// $middle['resume_tel'] = $lv['tel'];
// $middle['logId'] = $lv['id'];
// $a[] = $middle;
// $v = array();
// }
// }
// if(!empty($v)){
// $v['start_time'] = date('Y.m.d',strtotime($v['start_time']));
// $v['end_time'] = date('Y.m.d',strtotime($v['end_time']));
// $middle['resume_name'] = '';
// $middle['resume_tel'] = '';
// $middle['logId'] = '';
// $a[] = $v;
// }
// }
// }
// }
... ...