灵睿积分项类型可配置化
This commit is contained in:
parent
3914fd0689
commit
b70b948cdd
@ -23,8 +23,14 @@ class Event extends Backend
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\score\Event;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
|
||||
$this->view->assign("statusListJson", json_encode($this->model->getStatusList(), JSON_UNESCAPED_UNICODE));
|
||||
|
||||
$this->view->assign("frequencyList", $this->model->getFrequencyList());
|
||||
$this->view->assign("wayList", $this->model->getWayList());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ class Event extends Model
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['attendance' => __('Status attendance'), 'morning_meeting_hosting' => __('Status morning_meeting_hosting'), 'safety_environment' => __('Status safety_environment'), 'appearance_demeanor' => __('Status appearance_demeanor'), 'thorough_summarization' => __('Status thorough_summarization'), 'good_people_deeds' => __('Status good_people_deeds'), 'customer_service' => __('Status customer_service'), 'corporate_culture' => __('Status corporate_culture')];
|
||||
return config("site.type_point_program");
|
||||
}
|
||||
|
||||
public function getFrequencyList()
|
||||
|
||||
@ -44,3 +44,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var statusListJson = {$statusListJson};
|
||||
</script>
|
||||
@ -127,7 +127,7 @@ class Score extends Api
|
||||
// var_dump($this->model->getLastSql());
|
||||
}catch (\Exception $e){
|
||||
|
||||
$this->error($e->getMessage());
|
||||
$this->error($e->getMessage().$e->getFile().$e->getLine());
|
||||
}
|
||||
$this->success('查询成功', $res);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ class Event extends BaseModel
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['attendance' => __('Status attendance'), 'morning_meeting_hosting' => __('Status morning_meeting_hosting'), 'safety_environment' => __('Status safety_environment'), 'appearance_demeanor' => __('Status appearance_demeanor'), 'thorough_summarization' => __('Status thorough_summarization'), 'good_people_deeds' => __('Status good_people_deeds'), 'customer_service' => __('Status customer_service'), 'corporate_culture' => __('Status corporate_culture')];
|
||||
return config("site.type_point_program");
|
||||
}
|
||||
|
||||
public function getFrequencyList()
|
||||
|
||||
@ -451,7 +451,7 @@ class Log extends BaseModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($employee['team_id'] && $employee['team']){
|
||||
if(!isset($team_score[$employee['team_id']])){
|
||||
$team_data = [
|
||||
'id'=>$employee['team_id'],
|
||||
@ -465,6 +465,7 @@ class Log extends BaseModel
|
||||
$team_score[$employee['team_id']]['score'] += $score;
|
||||
}
|
||||
}
|
||||
}
|
||||
//自己团队的积分
|
||||
if($my_team_id){
|
||||
$my_team_score = $team_score[$my_team_id];
|
||||
|
||||
@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"attendance":__('Status attendance'),"morning_meeting_hosting":__('Status morning_meeting_hosting'),"safety_environment":__('Status safety_environment'),"appearance_demeanor":__('Status appearance_demeanor'),"thorough_summarization":__('Status thorough_summarization'),"good_people_deeds":__('Status good_people_deeds'),"customer_service":__('Status customer_service'),"corporate_culture":__('Status corporate_culture')}, formatter: Table.api.formatter.status},
|
||||
{field: 'status', title: __('Status'), searchList: statusListJson, formatter: Table.api.formatter.status},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'score', title: __('Score'), operate: false},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user