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

4

... ... @@ -50,6 +50,10 @@ class OrderSalesmanController extends WeChatBaseController
foreach($data as $key => $vo){
$indent_goods = $indentGoodsModel->selectData(['indent_id'=>$vo['id']]);
$data[$key]['indent_goods'] = $indent_goods;
//判断订单是不是平台订单
if($vo['indent_type'] == 1){
$data[$key]['dizhi'] = Db::name('address') -> where('id',$vo['indent_address']) -> find();
}
}
$school = Db::name('school')->where('uid',$user_id)->order('create_time desc')->select()->toArray();
if(count($school)!=0){
... ...
... ... @@ -606,12 +606,13 @@ class PersonalcenterController extends WeChatBaseController{
'a.indent_type' => 2,
'a.salesman_uid' => $uid
];
if($res['grade_class'] != ''){
$school_grade_class = explode(' ',$res['grade_class']);
$where['a.school'] = $school_grade_class[0];
$where['a.grade'] = $school_grade_class[1];
$where['a.class'] = $school_grade_class[3];
if($res['school'] != ''){
$where['a.school'] = $res['school'];
}
if($res['grade'] != ''){
$school_grade_class = explode('-',$res['grade']);
$where['a.grade'] = $school_grade_class[0];
$where['a.class'] = $school_grade_class[1];
}
if($res['start_time'] != '' && $res['end_time'] != ''){
... ... @@ -620,7 +621,7 @@ class PersonalcenterController extends WeChatBaseController{
$where['a.pay_time'] = [['>=',$start_time],['<=',$end_time]];
}
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
if(count($indent_money)!=0){
foreach ($indent_money as $key => $val){
$indent_money[$key]['book_name'] = Db::name('indent_goods') -> where('indent_id',$val['id']) -> select() -> toArray();
... ... @@ -630,12 +631,13 @@ class PersonalcenterController extends WeChatBaseController{
}else{
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
if(count($indent_goods)!=0){
foreach ($indent_goods as $key => $val){
$indent_goods[$key]['book_name'] = Db::name('indent_goods') -> where('indent_id',$val['id']) -> select() -> toArray();
}
}
$this -> assign('indent_goods',$indent_goods);
$indent_money = Db::name('money_income') -> where("uid =".$uid) -> select();
}
... ...
... ... @@ -396,8 +396,8 @@
<foreach name="$vo.indent_goods" item="i_g">
<div class="dingdan_detail">
<div class="dingdan_detail_top">
<div class="dingdan_detail_hao">订单号:2019062557100499</div>
<div class="dingdan_lianxi_ren">联系人:姚经理</div>
<div class="dingdan_detail_hao">订单号:{$vo.order_number}</div>
<div class="dingdan_lianxi_ren">联系人:{$vo.name}</div>
</div>
<div class="log_three_list_center" style="display: flex;justify-content: flex-start;">
<div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem">
... ... @@ -420,8 +420,9 @@
<div class="right_dingdan_center">
<div class="right_dindan_three right_dingdan_one">x{$i_g.number}</div>
</div>
<div class="right_dingdan_four right_dingdan_one">bdkjasdhasjdkladjlasjdk;lasdl</div>
<div class="right_dingdan_four right_dingdan_one" style="margin-top: -0.05rem;">联系电话:15266669999</div>
<div class="right_dingdan_four right_dingdan_one">地址:{$vo.school} {$vo.grade} {$vo.class}</div>
<div class="right_dingdan_four right_dingdan_one" style="margin-top: -0.05rem;">联系电话:{$vo.phone}</div>
</div>
</div>
... ...
... ... @@ -158,21 +158,25 @@
<div class="log_ten_list_one">
<div class="log_ten_list_one_center">
<div class="log_ten_list_one_center_top txt-cut" style="-webkit-line-clamp: 1;">
111
{$vo.order_number}
</div>
<div class="log_ten_shu_name txt-cut" style="-webkit-line-clamp: 2;">
<volist name="vo.book_name" id="vol">
{$vol.book_name},
</volist>
</div>
<div class="log_ten_shu_name txt-cut" style="-webkit-line-clamp: 2;">一大堆的民治都是的萨哈大大一大堆的民治都是的萨哈大大一大堆的民治都是的萨哈大大姐撒旦教哦和卡视角断开连接案件断开连接</div>
<div class="log_ten_list_one_center_bottom">
<div class="log_ten_list_onb_icon">
<img src="__TMPL__/public/assets/images/52.png" alt="" />
</div>
<div class="log_ten_list_onb_title">
{$vo.pay_time|date="Y-m-d H:i:s",###}
1111
</div>
</div>
</div>
<div class="log_ten_list_one_right" >
<div class="log_ten_list_one_right_top"><span></span>20</div>
<div class="log_ten_list_one_right_top"><span></span>{$vo.money}</div>
</div>
</div>
</volist>
... ... @@ -351,22 +355,24 @@
start_time = $('.start_time').text();
end_time = $('.end_time').text();
if(xeschool == '请选择学校'){
alert('请选择学校');
}else{
if(xegread == '请选择班级'){
alert('请选择班级');
}else{
grade_class = xeschool+' '+xegread;
console.log(grade_class);
if(xeschool == '请选择学校'){
xeschool = '';
}
if(xegread == '请选择班级'){
xegread = '';
}
if(start_time == '请选择开始时间'){
start_time = '';
}
if(end_time == '请选择结束时间'){
end_time = '';
}
window.location.href = "{:url('Personalcenter/mall_profit')}?grade_class="+grade_class+"&start_time="+start_time+"&end_time="+end_time;
}
}
window.location.href = "{:url('Personalcenter/mall_profit')}?school="+xeschool+"&start_time="+start_time+"&end_time="+end_time+"&grade="+xegread;
}
</script>
... ...