From 35ea9a655c0e8dafe0d1fd94b4b43138ef56382f Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Wed, 10 Aug 2022 16:36:02 +0800 Subject: [PATCH] edit-admin-settle_brand --- admin/controllers/biz/Seprice.php | 19 ++++--- admin/controllers/biz/Srv.php | 6 ++- admin/controllers/biz/store/Store.php | 10 ++-- admin/views/biz/seprice/get.php | 57 +++++++++++++++----- admin/views/biz/srv/get.php | 4 +- admin/views/biz/srv/lists.php | 42 +++++++-------- admin/views/biz/store/get_info.php | 37 +++++++++++++ admin/views/biz/store/lists.php | 2 +- api/controllers/plan/Biz.php | 25 +++++---- common/models/biz/Biz_settle_price_model.php | 2 +- 10 files changed, 139 insertions(+), 65 deletions(-) diff --git a/admin/controllers/biz/Seprice.php b/admin/controllers/biz/Seprice.php index 42325f35..799a9bd3 100644 --- a/admin/controllers/biz/Seprice.php +++ b/admin/controllers/biz/Seprice.php @@ -3,12 +3,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Seprice extends HD_Controller { - + private $employee_price_arr = ['4000.00','6000.00','8000.00']; public function __construct() { parent::__construct(); $this->load->model('biz/biz_model'); + $this->load->model("biz/biz_info_model"); $this->load->model('biz/biz_settle_price_model'); + $this->load->model('auto/auto_business_model'); } @@ -80,15 +82,16 @@ class Seprice extends HD_Controller return $this->show_json(SYS_CODE_FAIL,'参数错误'); } $biz_id = $biz_row['id']; + $biz_info_row = $this->biz_info_model->get(['biz_id'=>$biz_id]); $info['money_json'] = [ - 'rent' => '', - 'base_manager' => '', - 'base_employees' => '', - 'wat_ele' => '', - 'media' => '', + 'rent' => $biz_info_row['rent'] ? $biz_info_row['rent'] : '', + 'base_manager' => $biz_info_row['manager_wage'] ? $biz_info_row['manager_wage'] : '', + 'base_employees' => 0, + 'wat_ele' => $biz_info_row['wat_ele'] ? $biz_info_row['wat_ele'] : '', + 'media' => $biz_info_row['margin'] ? $biz_info_row['margin'] : '', 'marketing' => '', 'drive' => '', - 'commission' => '', + 'commission' => $biz_info_row['commission'] ? $biz_info_row['commission'] : '', 'trucking' => '' ]; $info['year'] = date('Y'); @@ -99,11 +102,13 @@ class Seprice extends HD_Controller $this->data['info'] = $info; $this->data['yearAry'] = $this->auto_business_model->year(); $this->data['monthAry'] = $this->auto_business_model->month(); + $this->data['employee_price_arr'] = $this->employee_price_arr; $this->show_view('biz/seprice/get'); } public function add(){ $info = $this->input->post('info'); + $employee_price_list = $this->input->post('employee_price_list'); $biz_row = $this->biz_model->get(['id'=>$info['biz_id']]); if(!$biz_row){ return $this->show_json(SYS_CODE_FAIL,'参数错误'); diff --git a/admin/controllers/biz/Srv.php b/admin/controllers/biz/Srv.php index 25281cef..6f7509ca 100644 --- a/admin/controllers/biz/Srv.php +++ b/admin/controllers/biz/Srv.php @@ -60,7 +60,6 @@ class Srv extends HD_Controller{ ]; } } - $this->data['lists'] = $lists; $this->data['params'] = $params; $this->data['typeAry'] = $this->biz_settle_srv_model->get_type(); @@ -92,7 +91,10 @@ class Srv extends HD_Controller{ $info['is_def'] = $row['is_def']; $info['s_effect_time'] = $row['s_effect_time']; $info['action'] = 'biz/srv/edit'; - $info['jsondata'] = json_decode($row['jsondata'],true); + $jsondata = json_decode($row['jsondata'],true); + $jsondata['s_time'] && $jsondata['s_time'] = date('Y-m-d H:i:s',$jsondata['s_time']); + $jsondata['e_time'] && $jsondata['e_time'] = date('Y-m-d H:i:s',$jsondata['e_time']); + $info['jsondata'] = $jsondata; } $this->data['yearAry'] = $this->auto_business_model->year(); $this->data['monthAry'] = $this->auto_business_model->month(); diff --git a/admin/controllers/biz/store/Store.php b/admin/controllers/biz/store/Store.php index 604ed965..09b957ac 100755 --- a/admin/controllers/biz/store/Store.php +++ b/admin/controllers/biz/store/Store.php @@ -1040,13 +1040,13 @@ class Store extends HD_Controller 'biz_id' => $base_info['biz_id'], 'name' => $base_info['name'], 'mobile' => $base_info['mobile'], - 'margin' => $base_info['margin'], + 'margin' => $base_info['margin']>0 ? $base_info['margin'] : '', 'area' => $base_info['area'], - 'rent' => $base_info['rent'], - 'wat_ele' => $base_info['wat_ele'], + 'rent' => $base_info['rent']>0 ? $base_info['rent'] : '', + 'wat_ele' => $base_info['wat_ele']>0 ? $base_info['wat_ele'] : '', 'employee_wage' => $base_info['employee_wage'], - 'manager_wage' => $base_info['manager_wage'], - 'commission' => $base_info['commission'], + 'manager_wage' => $base_info['manager_wage']>0 ? intval($base_info['manager_wage']) : 8000, + 'commission' => $base_info['commission']>0 ? $base_info['commission'] : '', 'num' => $base_info['num'], 's_time' => $base_info['s_time'] ? date('Y-m-d', $base_info['s_time']) : '', 'e_time' => $base_info['e_time'] ? date('Y-m-d', $base_info['e_time']) : '', diff --git a/admin/views/biz/seprice/get.php b/admin/views/biz/seprice/get.php index 364cbe7a..225f14d6 100644 --- a/admin/views/biz/seprice/get.php +++ b/admin/views/biz/seprice/get.php @@ -6,18 +6,6 @@ -