From cdbcc57238a5f50e3ceaf75944802a3d6bbc60b4 Mon Sep 17 00:00:00 2001 From: qianhy Date: Tue, 21 Feb 2023 10:39:19 +0800 Subject: [PATCH] store hide brand_name, title display friendship --- admin/controllers/biz/Fine.php | 3 ++- admin/controllers/biz/Settle.php | 4 +++- admin/controllers/biz/Situation.php | 5 +++-- admin/controllers/biz/Srv.php | 3 ++- admin/controllers/biz/store/Store.php | 32 ++++++++++++++++----------- admin/views/biz/store/edit.php | 2 +- admin/views/biz/store/lists.php | 26 +++++++++++----------- api/controllers/wxapp/licheb/Biz.php | 1 + 8 files changed, 44 insertions(+), 32 deletions(-) diff --git a/admin/controllers/biz/Fine.php b/admin/controllers/biz/Fine.php index a73ee352..d414e86a 100644 --- a/admin/controllers/biz/Fine.php +++ b/admin/controllers/biz/Fine.php @@ -17,6 +17,7 @@ class Fine extends HD_Controller{ public function lists(){ $params = $this->input->get(); $params['id'] && $_SESSION['srv_biz_id'] = $params['id']; + $re_biz = $this->biz_model->get(['id' => $_SESSION['srv_biz_id']]); !strlen($params['status']) && $params['status'] = ''; $page = $params['page'] ? $params['page'] : 1; $pagesize = 20; @@ -53,7 +54,7 @@ class Fine extends HD_Controller{ $this->data['lists'] = $lists; $this->data['params'] = $params; - $this->data['_title'] = '门店精品成本列表'; + $this->data['_title'] = $re_biz['biz_name'].'-精品配置'; $this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count); $this->show_view('biz/fine/lists', true); } diff --git a/admin/controllers/biz/Settle.php b/admin/controllers/biz/Settle.php index 5e891193..9e834b99 100644 --- a/admin/controllers/biz/Settle.php +++ b/admin/controllers/biz/Settle.php @@ -357,8 +357,10 @@ class Settle extends HD_Controller }elseif(!isset($params['month'])){ $where['month'] = $params['month'] = intval(date('m',strtotime("-1 month"))); } + $re_biz = array(); if($params['id']){ $where['biz_id'] = $params['id']; + $re_biz = $this->biz_model->get(array('id' => $params['id'])); } $page = $params['page']; $page = !$page ? 1 : $page; @@ -400,7 +402,7 @@ class Settle extends HD_Controller $this->data['monthAry'] = $this->auto_business_model->month(); $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'] = '门店结算管理'; + $this->data['_title'] = $re_biz ? $re_biz['biz_name'].'-结算统计' : '门店结算统计'; $view = $params['_biz_type']==1 ? 'biz/settle/lists_static_brand' : 'biz/settle/lists_static'; $this->show_view($view,true); diff --git a/admin/controllers/biz/Situation.php b/admin/controllers/biz/Situation.php index 677df4b9..a737836e 100644 --- a/admin/controllers/biz/Situation.php +++ b/admin/controllers/biz/Situation.php @@ -40,7 +40,7 @@ class Situation extends HD_Controller public function get() { $biz_id = $this->input->get('id'); - $re_biz = $this->mdBiz->get(['id' => $biz_id, 'status' => 1]); + $re_biz = $this->mdBiz->get(['id' => $biz_id]); if (!$re_biz || empty($re_biz)) { return $this->show_json(SYS_CODE_FAIL, '门店不存在!'); } @@ -48,6 +48,7 @@ class Situation extends HD_Controller //门店概况 $re_base = $this->mdBizBase->get(['biz_id' => $biz_id]); $fields = $this->mdBizBase->get_fields(); + unset($fields['company']); # 230220close foreach ($fields as $key => $value) { $list = ''; if ($key == 'county_id' && $re_biz['county_id']) {//县区 @@ -98,7 +99,7 @@ class Situation extends HD_Controller } $showInfo['y_month_ary'] = $y_month_ary; $this->data['showInfo'] = $showInfo; - $this->data['_title'] = $re_biz['biz_name']; + $this->data['_title'] = $re_biz['biz_name']."-概况"; return $this->show_view('biz/situation/get', true); } diff --git a/admin/controllers/biz/Srv.php b/admin/controllers/biz/Srv.php index 2199694f..d22db7e7 100644 --- a/admin/controllers/biz/Srv.php +++ b/admin/controllers/biz/Srv.php @@ -21,6 +21,7 @@ class Srv extends HD_Controller{ public function lists(){ $params = $this->input->get(); $params['id'] && $_SESSION['srv_biz_id'] = $params['id']; + $re_biz = $this->biz_model->get(['id' => $_SESSION['srv_biz_id']]); !$params['insure_type'] && $params['insure_type'] = ''; !$params['type'] && $params['type'] = ''; !$params['title'] && $params['title'] = ''; @@ -67,7 +68,7 @@ class Srv extends HD_Controller{ $this->data['params'] = $params; $this->data['typeAry'] = $this->biz_settle_srv_model->get_type(); $this->data['insure_typeAry'] = $this->biz_settle_srv_model->get_insure_type(); - $this->data['_title'] = '门店水平业务列表'; + $this->data['_title'] = $re_biz['biz_name'].'-水平业务配置'; $this->data['pager'] = array('count' => ceil($count / $pagesize), 'curr' => $page, 'totle' => $count); $this->show_view('biz/srv/lists', true); } diff --git a/admin/controllers/biz/store/Store.php b/admin/controllers/biz/store/Store.php index 0867bdb9..d286a7d5 100755 --- a/admin/controllers/biz/store/Store.php +++ b/admin/controllers/biz/store/Store.php @@ -109,8 +109,9 @@ class Store extends HD_Controller $bizlists = []; $typeAry = $this->biz_model->type_ary(); foreach ($biz_lists as $v) { - $brand = $this->bizBrand->get(array('id' => $v['brand_id']), 'brand_name'); - $v['brand_name'] = $brand['brand_name']; + # 230220close + /*$brand = $this->bizBrand->get(array('id' => $v['brand_id']), 'brand_name'); + $v['brand_name'] = $brand['brand_name'];*/ $v['c_time'] = date('Y-m-d H:i:s', $v['c_time']); $v['type_name'] = $typeAry[$v['type']]; $v['type'] = $v['type']; @@ -125,13 +126,14 @@ class Store extends HD_Controller $map_company = $this->company_model->map('id', 'short', $where, $orderby, 0, 0, $select); //获取品牌 - $lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id'); $data = array(); + # 230220close + /*$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id'); if ($lists) { foreach ($lists as $value) { $data[] = array('name' => $value['brand_name'], 'id' => $value['id']); } - } + }*/ $qdjl_lists = []; $res_u = $this->mdLichebUsers->select(array('group_id' => 4, 'status' => 1), 'id desc', 0, 0, 'id,uname as name,city_id'); if ($res_u) { @@ -161,13 +163,15 @@ class Store extends HD_Controller $id = intval($this->input->get('id')); $this->data['provinces'] = $this->area_model->select(array(), '', 0, 0, 'distinct(province_id), province_name'); //获取品牌 - $lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id'); $data = array(); + # 230220close + /*$lists = $this->bizBrand->select(array('status' => 1), '', '', '', 'brand_name,id'); + if ($lists) { foreach ($lists as $value) { $data[] = array('name' => $value['brand_name'], 'id' => $value['id']); } - } + }*/ $this->data['brand_list'] = $data; if ($id) { @@ -241,7 +245,7 @@ class Store extends HD_Controller $this->data['typeAry'] = $this->biz_model->type_ary(); $this->data['companyAry'] = $map_company; - $this->data['_title'] = $id ? '编辑门店' : '新增门店'; + $this->data['_title'] = $id ? '编辑门店-'.$biz['biz_name'] : '新增门店'; $this->show_view('biz/store/edit', true); } @@ -259,9 +263,10 @@ class Store extends HD_Controller $biz['firstchar'] = strtoupper($py); $biz['brand_id'] = intval($this->input->post('brand_id', true)); - if (!$biz['brand_id']) { + # 230220close + /*if (!$biz['brand_id']) { return $this->show_json(SYS_CODE_FAIL, '请选择品牌'); - } + }*/ $biz['province_id'] = $this->input->post('province_id', true); $biz['city_id'] = intval($this->input->post('city_id', true)); @@ -333,9 +338,10 @@ class Store extends HD_Controller $biz['firstchar'] = strtoupper($py); $biz['brand_id'] = intval($this->input->post('brand_id', true)); - if (!$biz['brand_id']) { + # 230220close + /*if (!$biz['brand_id']) { return $this->show_json(SYS_CODE_FAIL, '请选择品牌'); - } + }*/ $biz['province_id'] = $this->input->post('province_id', true); $biz['city_id'] = intval($this->input->post('city_id', true)); @@ -435,7 +441,7 @@ class Store extends HD_Controller } $stauts = $this->input->post('status'); $where = array('id' => $id); - $this->bizBrand->update(array('status' => $stauts), $where); + $this->biz_model->update(array('status' => $stauts), $where); return $this->show_json(SYS_CODE_SUCCESS, '操作成功'); } @@ -1110,7 +1116,7 @@ class Store extends HD_Controller $this->data['type_arr'] = [1 => '扩展', 2 => '新建']; $this->data['brands'] = $brands; $this->data['info'] = $info; - $this->data['_title'] = '编辑门店基本信息'; + $this->data['_title'] = $biz['biz_name'].'-编辑基本信息'; $this->show_view('biz/store/get_info', true); } diff --git a/admin/views/biz/store/edit.php b/admin/views/biz/store/edit.php index 6dff249c..7b399ee4 100755 --- a/admin/views/biz/store/edit.php +++ b/admin/views/biz/store/edit.php @@ -132,7 +132,7 @@ style="width: 90%;padding-top: 10px"> -
+