This commit is contained in:
lin fan
2024-11-04 18:54:01 +08:00
parent e103f9dd04
commit a1b9be51eb
2 changed files with 10 additions and 9 deletions
+8 -7
View File
@@ -103,16 +103,17 @@ class Employees extends Wxapp
$count = $this->app_user_model->count($where);
$lists = $tabs = $bizs = [];
if ($count) {
$fileds = 'id,uname,mobile,status';
$fileds = 'id,uname,mobile,status,group_id';
$rows = $this->app_user_model->select($where, 'id desc', $page, $size, $fileds);
foreach ($rows as $k => $v){
if($v['group_id'] == 3){
$row[$k]['uname'] = $v['uname'].'(店长)';
}
}
$lists = $rows;
}
$this->load->model("biz/biz_model");
$re_biz = $this->biz_model->get(['id' => $this->biz_id, 'status' => 1]);
if ($re_biz['type'] == 1) {//品牌店
$tabs = [['id' => 1, 'name' => '本店'], ['id' => 2, 'name' => '其它门店']];
$bizs = $this->biz_model->select(['type' => 1, 'status' => 1], 'id desc', 0, 0, 'id, biz_name as name');
}
$data = [
'list' => $lists,
'total' => $count,
+2 -2
View File
@@ -46,7 +46,7 @@ class Score extends Wxapp
$where['type'] = $type ? Receiver_score_avg_day_model::TYPE_BIZ : Receiver_score_avg_day_model::TYPE_USER;
$row = $this->receiver_score_avg_day_model->get($where);
$up_time = date('Y-m-d');
$title_hd = '较月';
$title_hd = '较月';
} elseif ($day_type == 2) {
$up_month = strtotime("-1 month"); //上个月时间
$where['year'] = date('Y', $up_month);
@@ -61,7 +61,7 @@ class Score extends Wxapp
$where['type'] = $type ? Receiver_score_day_model::TYPE_BIZ : Receiver_score_day_model::TYPE_USER;
$row = $this->receiver_score_day_model->get($where);
$up_time = date('Y-m-d', $up_month);
$title_hd = '较日';
$title_hd = '较上一日';
}
$score = ceil($row['score']) ?: 0;
$abs_score = ceil($row['change_score']) ?: 0;