From f72c7abe1447dab0a591915b73ed0cc707e079ca Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Fri, 12 Aug 2022 14:54:29 +0800 Subject: [PATCH] edit-plan-settle --- admin/controllers/biz/Settle.php | 13 +- admin/views/biz/settle/lists_brand.php | 259 ++++++++++++++++++ admin/views/biz/settle/lists_static_brand.php | 3 +- api/controllers/plan/Biz.php | 6 +- 4 files changed, 272 insertions(+), 9 deletions(-) create mode 100644 admin/views/biz/settle/lists_brand.php 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 + | +门店 | +订单信息 | +单车总毛利 | +服务费 | +佣金 | +精品 | +时间 | +
|---|---|---|---|---|---|---|---|
| + {{v.id}} + | +{{v.biz_name}} | +
+
+ {{v.name}} {{v.mobile}} + {{v.title}} {{v.vin}} + + |
+ {{v.profix_car}} | ++ + {{v.money_json.in.srv_price}} + + | ++ + {{v.money_json.in.commission}} + + | ++ + {{v.money_json.out.fine_price}} + + | +{{v.month}} | +