diff --git a/admin/controllers/biz/Settle.php b/admin/controllers/biz/Settle.php index 76840cc9..48e8bdc4 100644 --- a/admin/controllers/biz/Settle.php +++ b/admin/controllers/biz/Settle.php @@ -21,8 +21,6 @@ class Settle extends HD_Controller $this->load->model('biz/biz_settle_static_model'); $this->load->model('biz/biz_info_model'); $this->load->model('biz/biz_trucking_model'); - $_biz_type = $this->input->get('_biz_type'); - $_SESSION['is_brand'] = $_biz_type==1 ? $_biz_type : ''; } public function index() @@ -33,7 +31,6 @@ class Settle extends HD_Controller public function lists() { $params = $this->input->get(); - $where = array(); $t1 = 'lc_biz_settle'; $t2 = 'lc_receiver_orders_v2'; @@ -120,6 +117,7 @@ class Settle extends HD_Controller foreach($rows as $v){ $title = "{$map_brand[$v['brand_id']]} {$map_sery[$v['s_id']]} {$map_attr[$v['v_id']]} {$map_attr[$v['cor_id']]}"; $month = date('Y-m',strtotime("{$v['year']}-{$v['month']}")); + $money_json = json_decode($v['money_json'],true); $lists[] = array( 'id' => $v['id'], 'o_id' => $v['o_id'], @@ -136,12 +134,12 @@ class Settle extends HD_Controller 'mobile' => $v['mobile'], 'sid' => $v['sid'], 'month' => $month, - 'vin' => $map_item[$v['item_id']] + 'vin' => $map_item[$v['item_id']], + 'money_json' => $money_json ); } } } - $this->data['params'] = $params; $this->data['lists'] = $lists; $this->data['brandAry'] = $map_brand; @@ -149,7 +147,8 @@ class Settle extends HD_Controller $this->data['monthAry'] = $this->auto_business_model->month(); $this->data['pager'] = array('count' => ceil($total / $size), 'curr' => $page,'totle'=>$total); $this->data['_title'] = '商家结算管理'; - $this->show_view('biz/settle/lists',true); + $view = $params['_biz_type'] ? 'biz/settle/lists' : 'biz/settle/lists_brand'; + $this->show_view($view,true); } public function get(){ @@ -379,7 +378,7 @@ class Settle extends HD_Controller $this->data['type_arr'] = $this->biz_settle_static_model->other_price_type(); $this->data['pager'] = array('count' => ceil($total / $size), 'curr' => $page,'totle'=>$total); $this->data['_title'] = '商家结算管理'; - $view = $_SESSION['is_brand'] ? 'biz/settle/lists_static_brand' : 'biz/settle/lists_static'; + $view = $params['_biz_type'] ? 'biz/settle/lists_static_brand' : 'biz/settle/lists_static'; $this->show_view($view,true); } diff --git a/admin/views/biz/settle/lists_brand.php b/admin/views/biz/settle/lists_brand.php new file mode 100644 index 00000000..9e8a4142 --- /dev/null +++ b/admin/views/biz/settle/lists_brand.php @@ -0,0 +1,259 @@ +
+
+ +
+
+ + + + + + + + + + + + + + + + +
+ ID + 门店订单信息单车总毛利服务费佣金精品时间
+
+
+
+ +
+
+
+ + diff --git a/admin/views/biz/settle/lists_static_brand.php b/admin/views/biz/settle/lists_static_brand.php index c8d89b33..7053d363 100644 --- a/admin/views/biz/settle/lists_static_brand.php +++ b/admin/views/biz/settle/lists_static_brand.php @@ -21,6 +21,7 @@
+
@@ -75,7 +76,7 @@ - 查看明细 + 查看明细 diff --git a/api/controllers/plan/Biz.php b/api/controllers/plan/Biz.php index 296a6978..18d5b665 100644 --- a/api/controllers/plan/Biz.php +++ b/api/controllers/plan/Biz.php @@ -7,6 +7,7 @@ class Biz extends HD_Controller { parent::__construct(); $this->load->model('receiver/order/receiver_orders_v2_model','orders_model'); + $this->load->model('receiver/order/receiver_order_loans_model','order_loans_model'); $this->load->model('receiver/order/receiver_order_agents_model', 'order_agents_model'); $this->load->model('receiver/order/receiver_order_datas_model'); $this->load->model('receiver/receiver_fine_model'); @@ -184,6 +185,7 @@ class Biz extends HD_Controller //品牌店统计 public function settle_brand(){ + $biz_id = $this->input->get('biz_id'); $id = $this->input->get('id'); $size = $this->input->get('size'); !$size && $size = 5; @@ -200,10 +202,12 @@ class Biz extends HD_Controller "$t2.status in (0,1)" => null, "$t2.id>=" => Orders_v2_entity::V2_START_ID, "$t2.bill_time !='0000-00-00 00:00:00'" => null, + "$t2.bill_time>=" => "2022-07-01 00:00:00", "$t3.id is null" => null, - "$t4.type" => 2, + "$t4.type" => 1, ]; $id && $where["$t2.id"] = $id; + $biz_id && $where["$t4.id"] = $biz_id; $this->db->from("$t1"); $this->db->join("$t2", "$t2.id=$t1.o_id",'left');