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

页面修改

... ... @@ -158,62 +158,20 @@ class MemberController extends CommentController
->field('h.*,m.name as user_name,m.tel as user_tel,l.order_id,l.status,l.id,o.order_sn,s.name as select_name')
->find();
}else{
$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(!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;
// }
// }
// }
// }
$this->assign('list',$coo_list);
return $this->fetch('ordertail');
}
... ...
... ... @@ -105,21 +105,18 @@
</div>
</div>
</eq>
<div class="orderfoot">
<eq name="list.status" value="3">
<p class="sure">取消订单</p>
<p class="pay">付款</p>
</eq>
<eq name="list.status" value="6">
<p class=" pay sure">确认完成</p>
</eq>
<eq name="list.status" value="7">
<p class="pay common">评价</p>
</eq>
</div>
<div class="orderfoot">
<eq name="list.status" value="3">
<p class="sure cancel" >取消订单</p>
<p class="pay toPay">付款</p>
</eq>
<eq name="list.status" value="6">
<p class=" pay sure">确认完成</p>
</eq>
<eq name="list.status" value="7">
<p class="pay common">评价</p>
</eq>
</div>
</div>
<script>
... ... @@ -141,14 +138,61 @@
return result;
}
$(".cancelorder").click(function(){
var id = "{$Request.param.id}";
var logId = "{$Request.param.logId}";
// 取消
$('.cancel').click(function change() {
window.event.stopPropagation();
var a=confirm("是否取消订单");
if(a==true){
alert("取消订单")
$.ajax({
type: 'POST',
url: "{:url('Member/changeStatus')}",
data: {
'id':id,
},
success: function (res) {
// console.log(res);
popup(res.message);
if(res.code == 1){
setTimeout("def()",2500);
}
},
error: function (res) {
// console.log(res);
}
});
}
})
// 确认
$('.cancel').click(function sure() {
$.ajax({
type: 'POST',
url: "{:url('Member/sureStatus')}",
data: {
'id':logId,
},
success: function (res) {
// console.log(res);
popup(res.message);
if(res.code == 1){
setTimeout("def()",2500);
}
},
error: function (res) {
// console.log(res);
}
});
})
//评价页面
$('.cancel').click(function common() {
var url = "{:url('Member/common')}";
url = url.split('.');
url = url[0] + '/id/' + logId + ".html";
window.location.href = url;
})
</script>
</body>
</html>
... ...