diff --git a/application/admin/controller/score/Employee.php b/application/admin/controller/score/Employee.php index a5209e3..740dd57 100644 --- a/application/admin/controller/score/Employee.php +++ b/application/admin/controller/score/Employee.php @@ -17,11 +17,14 @@ class Employee extends Backend * @var \app\admin\model\score\Employee */ protected $model = null; + protected $qSwitch = true; + protected $qFields = ["team_id","user_id"]; public function _initialize() { - parent::_initialize(); + $this->model = new \app\admin\model\score\Employee; + parent::_initialize(); $this->view->assign("statusList", $this->model->getStatusList()); } @@ -48,8 +51,16 @@ class Employee extends Backend if ($this->request->request('keyField')) { return $this->selectpage(); } - list($where, $sort, $order, $offset, $limit) = $this->buildparams(); + list($where, $sort, $order, $offset, $limit, $page, $alias, $bind,$excludearray) = $this->buildparams(null,null,['opertime']); + //得到查询时间 + $opertime = $excludearray['opertime'] ?? []; + $start_time = $end_time =null; + if($opertime){ + //得到查询值 + $value = $opertime['value']; + list($start_time,$end_time) = explode(" - ",$value); + } $list = $this->model ->with(['user','team']) ->where($where) @@ -62,9 +73,23 @@ class Employee extends Backend $row->getRelation('team')->visible(['name']); } - $result = array("total" => $list->total(), "rows" => $list->items()); + $total = $list->total(); + $list = $list->items(); + + foreach ($list as &$row) { + $row['score_count'] = 0; + $row['opertime'] = ''; + if($start_time){ + $row['opertime'] = $start_time.'至'.$end_time; + } + $row['score_count'] = \app\common\model\score\Employee::getPriceByCoachAndTime($row['id'],$start_time,$end_time); + + } + + $result = array("total" => $total, "rows" => $list); return json($result); + } return $this->view->fetch(); } diff --git a/application/admin/controller/score/Log.php b/application/admin/controller/score/Log.php index b4009ba..bfd9e7a 100644 --- a/application/admin/controller/score/Log.php +++ b/application/admin/controller/score/Log.php @@ -3,6 +3,12 @@ namespace app\admin\controller\score; use app\common\controller\Backend; +use think\Db; +use think\db\exception\DataNotFoundException; +use think\db\exception\ModelNotFoundException; +use think\exception\DbException; +use think\exception\PDOException; +use think\exception\ValidateException; /** * 积分记录管理 @@ -18,11 +24,15 @@ class Log extends Backend */ protected $model = null; + protected $qSwitch = true; + protected $qFields = ["team_id","user_id"]; + public function _initialize() { - parent::_initialize(); $this->model = new \app\admin\model\score\Log; + parent::_initialize(); + $this->view->assign("statusList", $this->model->getStatusList()); } @@ -71,4 +81,209 @@ class Log extends Backend return $this->view->fetch(); } + + + /** + * 添加 + * + * @return string + * @throws \think\Exception + */ + public function add() + { + if (false === $this->request->isPost()) { + return $this->view->fetch(); + } + $params = $this->request->post('row/a'); + if (empty($params)) { + $this->error(__('Parameter %s can not be empty', '')); + } + $params = $this->preExcludeFields($params); + if ($this->dataLimit && $this->dataLimitFieldAutoFill) { + $params[$this->dataLimitField] = $this->auth->id; + } + try { + $result = (new \app\common\model\score\Log)->add($params ,false, true); + }catch (\Exception $e){ + $this->error($e->getMessage()); + } + + if ($result === false) { + $this->error(__('No rows were inserted')); + } + $this->success(); + } + + + + + + /** + * 编辑 + * + * @param $ids + * @return string + * @throws DbException + * @throws \think\Exception + */ + public function edit($ids = null) + { + $row = $this->model->get($ids); + if (!$row) { + $this->error(__('No Results were found')); + } + $adminIds = $this->getDataLimitAdminIds(); + if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) { + $this->error(__('You have no permission')); + } + if (false === $this->request->isPost()) { + $this->view->assign('row', $row); + return $this->view->fetch(); + } + $params = $this->request->post('row/a'); + if (empty($params)) { + $this->error(__('Parameter %s can not be empty', '')); + } + $params = $this->preExcludeFields($params); + $result = false; + Db::startTrans(); + try { + //是否采用模型验证 + if ($this->modelValidate) { + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model)); + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate; + $row->validateFailException()->validate($validate); + } + //如果审核失败,需要填写原因 + if ($params["status"] == 2) { + if (!$params['reason']) { + $this->error('审核失败,请填写原因'); + } + } + if($row["status"] != $params["status"]){ + $params['authtime'] = time(); + } + + + $result = $row->allowField(true)->save($params); + Db::commit(); + } catch (ValidateException|PDOException|Exception $e) { + Db::rollback(); + $this->error($e->getMessage()); + } + if (false === $result) { + $this->error(__('No rows were updated')); + } + $this->success(); + } + + + + + /** + * 审核成功 + * + * @param $ids + * @return void + * @throws DbException + * @throws DataNotFoundException + * @throws ModelNotFoundException + */ + public function auth_yes($ids = null) + { + if (false === $this->request->isPost()) { + $this->error(__("Invalid parameters")); + } + $ids = $ids ?: $this->request->post("ids"); + if (empty($ids)) { + $this->error(__('Parameter %s can not be empty', 'ids')); + } + $pk = $this->model->getPk(); + $adminIds = $this->getDataLimitAdminIds(); + if (is_array($adminIds)) { + $this->model->where($this->dataLimitField, 'in', $adminIds); + } + $list = $this->model->where($pk, 'in', $ids)->select(); + + $count = 0; + Db::startTrans(); + try { + foreach ($list as $item) { +// $count += $item->delete(); + if($item["status"]!= 1){ + $item["status"] = 1; + $item["authtime"] = time(); + $item["reason"] = ""; + $item->save(); + $count++; + } + + + } + Db::commit(); + } catch (PDOException|Exception $e) { + Db::rollback(); + $this->error($e->getMessage()); + } + if ($count) { + $this->success("操作成功{$count}条记录"); + } + $this->error(__('操作成功0条记录')); + } + + + + /** + * 审核失败 + * + * @param $ids + * @return void + * @throws DbException + * @throws DataNotFoundException + * @throws ModelNotFoundException + */ + public function auth_no($ids = null) + { + if (false === $this->request->isPost()) { + $this->error(__("Invalid parameters")); + } + $ids = $ids ?: $this->request->post("ids"); + if (empty($ids)) { + $this->error(__('Parameter %s can not be empty', 'ids')); + } + $pk = $this->model->getPk(); + $adminIds = $this->getDataLimitAdminIds(); + if (is_array($adminIds)) { + $this->model->where($this->dataLimitField, 'in', $adminIds); + } + $list = $this->model->where($pk, 'in', $ids)->select(); + + $count = 0; + Db::startTrans(); + try { + foreach ($list as $item) { +// $count += $item->delete(); + if($item["status"]!= 2){ + $item["status"] = 2; + $item["authtime"] = time(); + $item["reason"] = "批量操作拒绝"; + $item->save(); + $count++; + } + + + + } + Db::commit(); + } catch (PDOException|Exception $e) { + Db::rollback(); + $this->error($e->getMessage()); + } + if ($count) { + $this->success("操作成功{$count}条记录"); + } + $this->error(__('操作成功0条记录')); + } + + } diff --git a/application/admin/controller/score/Team.php b/application/admin/controller/score/Team.php index a2c7341..4f2a04d 100644 --- a/application/admin/controller/score/Team.php +++ b/application/admin/controller/score/Team.php @@ -3,6 +3,12 @@ namespace app\admin\controller\score; use app\common\controller\Backend; +use think\Db; +use think\exception\DbException; +use think\exception\PDOException; +use think\exception\ValidateException; +use app\common\model\score\Employee; +use think\response\Json; /** * 队伍管理 @@ -34,4 +40,165 @@ class Team extends Backend */ + /** + * 查看 + * + * @return string|Json + * @throws \think\Exception + * @throws DbException + */ + public function index() + { + //设置过滤方法 + $this->request->filter(['strip_tags', 'trim']); + if (false === $this->request->isAjax()) { + return $this->view->fetch(); + } + //如果发送的来源是 Selectpage,则转发到 Selectpage + if ($this->request->request('keyField')) { + return $this->selectpage(); + } + list($where, $sort, $order, $offset, $limit, $page, $alias, $bind,$excludearray) = $this->buildparams(null,null,['opertime']); + //得到查询时间 + $opertime = $excludearray['opertime'] ?? []; + $start_time = $end_time =null; + if($opertime){ + //得到查询值 + $value = $opertime['value']; + list($start_time,$end_time) = explode(" - ",$value); + + } + + + + $list = $this->model + ->where($where) + ->order($sort, $order) + ->paginate($limit); + + + $total = $list->total(); + $list = $list->items(); + + foreach ($list as &$row) { + $row['score_count'] = 0; + $row['opertime'] = ''; + if($start_time){ + $row['opertime'] = $start_time.'至'.$end_time; + } + $row['score_count'] = \app\common\model\score\Team::getPriceByCoachAndTime($row['id'],$start_time,$end_time); + + } + $result = array("total" => $total, "rows" => $list); + return json($result); + + } + + + + /** + * 添加 + * + * @return string + * @throws \think\Exception + */ + public function add() + { + if (false === $this->request->isPost()) { + return $this->view->fetch(); + } + $params = $this->request->post('row/a'); + if (empty($params)) { + $this->error(__('Parameter %s can not be empty', '')); + } + $params = $this->preExcludeFields($params); + + if ($this->dataLimit && $this->dataLimitFieldAutoFill) { + $params[$this->dataLimitField] = $this->auth->id; + } + $result = false; + Db::startTrans(); + try { + //是否采用模型验证 + if ($this->modelValidate) { + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model)); + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate; + $this->model->validateFailException()->validate($validate); + } + $score_employee_ids = $params["score_employee_ids"] ?? []; + + $result = $this->model->allowField(true)->save($params); + //建立新的关联 + Employee::where( "id","in",$score_employee_ids)->update(["team_id"=>$this->model->id]); + + + Db::commit(); + } catch (ValidateException|PDOException|Exception $e) { + Db::rollback(); + $this->error($e->getMessage()); + } + if ($result === false) { + $this->error(__('No rows were inserted')); + } + $this->success(); + } + + /** + * 编辑 + * + * @param $ids + * @return string + * @throws DbException + * @throws \think\Exception + */ + public function edit($ids = null) + { + $row = $this->model->get($ids); + if (!$row) { + $this->error(__('No Results were found')); + } + $adminIds = $this->getDataLimitAdminIds(); + if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) { + $this->error(__('You have no permission')); + } + if (false === $this->request->isPost()) { + $this->view->assign('row', $row); + return $this->view->fetch(); + } + $params = $this->request->post('row/a'); + if (empty($params)) { + $this->error(__('Parameter %s can not be empty', '')); + } + $params = $this->preExcludeFields($params); + $result = false; + Db::startTrans(); + try { + //是否采用模型验证 + if ($this->modelValidate) { + $name = str_replace("\\model\\", "\\validate\\", get_class($this->model)); + $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate; + $row->validateFailException()->validate($validate); + } + + + $score_employee_ids = $params["score_employee_ids"] ?? []; + $result = $row->allowField(true)->save($params); + + + //清除旧的关联 + Employee::where( "team_id",$row->id)->update(["team_id"=>0]); + //建立新的关联 + Employee::where( "id","in",$score_employee_ids)->update(["team_id"=>$row->id]); + + Db::commit(); + } catch (ValidateException|PDOException|Exception $e) { + Db::rollback(); + $this->error($e->getMessage()); + } + if (false === $result) { + $this->error(__('No rows were updated')); + } + $this->success(); + } + } diff --git a/application/admin/controller/user/User.php b/application/admin/controller/user/User.php index 6908ad6..a42ee46 100644 --- a/application/admin/controller/user/User.php +++ b/application/admin/controller/user/User.php @@ -4,6 +4,8 @@ namespace app\admin\controller\user; use app\common\controller\Backend; use app\common\library\Auth; +use fast\Tree; +use think\Model; /** * 会员管理 @@ -102,4 +104,185 @@ class User extends Backend $this->success(); } + + + /** + * Selectpage的实现方法 + * + * 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可 + * 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可 + * + */ + protected function selectpage() + { + //设置过滤方法 + $this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']); + + //搜索关键词,客户端输入以空格分开,这里接收为数组 + $word = (array)$this->request->request("q_word/a"); + //当前页 + $page = $this->request->request("pageNumber"); + //分页大小 + $pagesize = $this->request->request("pageSize"); + //搜索条件 + $andor = $this->request->request("andOr", "and", "strtoupper"); + //排序方式 + $orderby = (array)$this->request->request("orderBy/a"); + //显示的字段 + $field = $this->request->request("showField"); + //主键 + $primarykey = $this->request->request("keyField"); + //主键值 + $primaryvalue = $this->request->request("keyValue"); + //搜索字段 +// $searchfield = (array)$this->request->request("searchField/a"); + $searchfield = [ + 'id','realname','nickname','mobile' + ]; + + //自定义搜索条件 + $custom = (array)$this->request->request("custom/a"); + //是否返回树形结构 + $istree = $this->request->request("isTree", 0); + $ishtml = $this->request->request("isHtml", 0); + if ($istree) { + $word = []; + $pagesize = 999999; + } + $order = []; + foreach ($orderby as $k => $v) { + $order[$v[0]] = $v[1]; + } + $field = $field ? $field : 'name'; + + //如果有primaryvalue,说明当前是初始化传值 + if ($primaryvalue !== null) { + $where = [$primarykey => ['in', $primaryvalue]]; + $pagesize = 999999; + } else { + $where = function ($query) use ($word, $andor, $field, $searchfield, $custom) { + $logic = $andor == 'AND' ? '&' : '|'; + $searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield; + $searchfield = str_replace(',', $logic, $searchfield); + $word = array_filter(array_unique($word)); + if (count($word) == 1) { + $query->where($searchfield, "like", "%" . reset($word) . "%"); + } else { + $query->where(function ($query) use ($word, $searchfield) { + foreach ($word as $index => $item) { + $query->whereOr(function ($query) use ($item, $searchfield) { + $query->where($searchfield, "like", "%{$item}%"); + }); + } + }); + } + if ($custom && is_array($custom)) { + foreach ($custom as $k => $v) { + if (is_array($v) && 2 == count($v)) { + $query->where($k, trim($v[0]), $v[1]); + } else { + $query->where($k, '=', $v); + } + } + } + }; + } + $adminIds = $this->getDataLimitAdminIds(); + if (is_array($adminIds)) { + $this->model->where($this->dataLimitField, 'in', $adminIds); + } + $list = []; + $total = $this->model->where($where)->count(); + if ($total > 0) { + if (is_array($adminIds)) { + $this->model->where($this->dataLimitField, 'in', $adminIds); + } + + $fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []); + + //如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序 + if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) { + $primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue)); + //修复自定义data-primary-key为字符串内容时,给排序字段添加上引号 + $primaryvalue = array_map(function ($value) { + return '\'' . $value . '\''; + }, $primaryvalue); + + $primaryvalue = implode(',', $primaryvalue); + + $this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})"); + } else { + $this->model->order($order); + } + + $datalist = $this->model->where($where) + ->page($page, $pagesize) + ->select(); + + foreach ($datalist as $index => $item) { + unset($item['password'], $item['salt']); + if ($this->selectpageFields == '*') { + $result = [ + $primarykey => $item[$primarykey] ?? '', + $field => $item[$field] ?? '', + 'nickname' => isset($item['nickname']) ? $item['nickname'] : '', + 'mobile' => isset($item['mobile']) ? $item['mobile'] : '', + 'realname' => isset($item['realname']) ? $item['realname'] : '', + ]; + } else { + $result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields)); + } + $result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0); + $list[] = $result; + } + if ($istree && !$primaryvalue) { + $tree = Tree::instance(); + $tree->init(collection($list)->toArray(), 'pid'); + $list = $tree->getTreeList($tree->getTreeArray(0), $field); + if (!$ishtml) { + foreach ($list as &$item) { + $item = str_replace(' ', ' ', $item); + } + unset($item); + } + } + } + //这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮 + return json(['list' => $list, 'total' => $total]); + } + + + + /**变更学员信息(教练专属) + * @return string + * @throws \think\Exception + * @throws \think\exception\DbException + */ + public function changeuser(){ + if($this->request->isPost()) + { + try{ + $people_name = $this->request->param('people_name/s'); + $people_mobile = $this->request->param('people_mobile/s'); + $password = $this->request->param('password/s'); + if (!$password) throw new \Exception("请设置登录密码!"); + + $user = \app\common\model\User::where("mobile",$people_mobile)->find(); + //检测更新教练下单学员账号创建状态 2022/8/27 new + if(!$user)$user = (new \app\common\model\User)->addUserByMobile($people_mobile,$people_name,$password); + $user['nickname'] = $people_name; + $user->save(); + + }catch (\Exception $e){ + $this->error($e->getMessage()); + } + //退押金 + $this->success("已成功创建{$people_name}"); + } +// $row = $this->model->get($param['ids']); +// $this->view->assign('vo', $row); + return $this->view->fetch(); + } + + } diff --git a/application/admin/lang/zh-cn/score/employee.php b/application/admin/lang/zh-cn/score/employee.php index 98a37d2..ffd62cc 100644 --- a/application/admin/lang/zh-cn/score/employee.php +++ b/application/admin/lang/zh-cn/score/employee.php @@ -3,6 +3,7 @@ return [ 'User_id' => '前端登錄用戶', 'Name' => '姓名', + 'Image' => '员工头像', 'Team_id' => '队伍id', 'Status' => '状态', 'Status entry' => '入职', diff --git a/application/admin/lang/zh-cn/score/event.php b/application/admin/lang/zh-cn/score/event.php index 82408cc..5d7a3d3 100644 --- a/application/admin/lang/zh-cn/score/event.php +++ b/application/admin/lang/zh-cn/score/event.php @@ -27,8 +27,8 @@ return [ 'Frequency day' => '天', 'Frequency week' => '周', 'Frequency once' => '次', - 'Max_times' => '最高次数(0为不限制)', - 'Monthly_highest_score' => '月度最高分(0为不限制)', + 'Max_times' => '当前频率最高次数(0为不限制)', + 'Monthly_highest_score' => '当前频率最高分(0为不限制)', 'Way' => '得分方式(多选)', 'Way free' => '自由申请', 'Way direct' => '直接奖励', diff --git a/application/admin/lang/zh-cn/score/log.php b/application/admin/lang/zh-cn/score/log.php index ce95d80..269dcef 100644 --- a/application/admin/lang/zh-cn/score/log.php +++ b/application/admin/lang/zh-cn/score/log.php @@ -9,6 +9,15 @@ return [ 'Score' => '分值', 'Images' => '多图', 'Desc' => '备注', + 'Status' => '审核状态', + 'Status 0' => '待审核', + 'Set status to 0' => '设为待审核', + 'Status 1' => '审核通过', + 'Set status to 1' => '设为审核通过', + 'Status 2' => '审核不通过', + 'Set status to 2' => '设为审核不通过', + 'Reason' => '审核不通过原因', + 'Authtime' => '审核时间', 'Createtime' => '创建时间', 'Updatetime' => '更新时间', 'Deletetime' => '删除时间', diff --git a/application/admin/lang/zh-cn/score/team.php b/application/admin/lang/zh-cn/score/team.php index 1bc4700..5c1f9d7 100644 --- a/application/admin/lang/zh-cn/score/team.php +++ b/application/admin/lang/zh-cn/score/team.php @@ -2,6 +2,8 @@ return [ 'Name' => '队伍名', + 'Image' => '队伍头像', + 'Score_employee_ids' => '队伍成员', 'Createtime' => '创建时间', 'Updatetime' => '更新时间' ]; diff --git a/application/admin/model/score/Log.php b/application/admin/model/score/Log.php index f2c239e..59d9271 100644 --- a/application/admin/model/score/Log.php +++ b/application/admin/model/score/Log.php @@ -25,16 +25,36 @@ class Log extends Model // 追加属性 protected $append = [ - + 'status_text', + 'authtime_text' ]; + public function getStatusList() + { + return ['0' => __('Status 0'), '1' => __('Status 1'), '2' => __('Status 2')]; + } + public function getStatusTextAttr($value, $data) + { + $value = $value ?: ($data['status'] ?? ''); + $list = $this->getStatusList(); + return $list[$value] ?? ''; + } + public function getAuthtimeTextAttr($value, $data) + { + $value = $value ?: ($data['authtime'] ?? ''); + return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; + } + protected function setAuthtimeAttr($value) + { + return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); + } public function scoreevent() diff --git a/application/admin/model/score/Team.php b/application/admin/model/score/Team.php index efd4e34..c57786c 100644 --- a/application/admin/model/score/Team.php +++ b/application/admin/model/score/Team.php @@ -25,9 +25,40 @@ class Team extends Model // 追加属性 protected $append = [ - + "score_employee_ids", + "people_num", + "people_names" ]; - + + + public function getPeopleNumAttr($value, $data) + { + $value = $value ?: ($data['id'] ?? ''); + if(!$value) return 0; + $score_employee_ids = Employee::where( "team_id", $value)->count(); + return $score_employee_ids; + } + + + public function getPeopleNamesAttr($value, $data) + { + $value = $value ?: ($data['id'] ?? ''); + if(!$value) return ""; + $score_employee_ids = Employee::where( "team_id", $value)->column( "name"); + return implode(",", $score_employee_ids); + } + + + + public function getScoreEmployeeIdsAttr($value, $data) + { + $value = $value ?: ($data['id'] ?? ''); + if(!$value) return ""; + $score_employee_ids = Employee::where( "team_id", $value)->column( "id"); + return implode(",", $score_employee_ids); + } + + diff --git a/application/admin/view/score/employee/add.html b/application/admin/view/score/employee/add.html index 495cb94..3579a9d 100644 --- a/application/admin/view/score/employee/add.html +++ b/application/admin/view/score/employee/add.html @@ -3,21 +3,46 @@
- -
-
-
- -
- + + + + (没找到用户则点击按钮创建用户后重新下拉框选用户) + 根据手机号生成用户 + +
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ + +
+ +
+ +
+
+
diff --git a/application/admin/view/score/employee/edit.html b/application/admin/view/score/employee/edit.html index ace30ae..ccd7505 100644 --- a/application/admin/view/score/employee/edit.html +++ b/application/admin/view/score/employee/edit.html @@ -3,21 +3,47 @@
- -
-
-
- -
- + + + + (没找到用户则点击按钮创建用户后重新下拉框选用户) + 根据手机号生成用户 + + +
+
+ + +
+ +
+ +
+
+ +
+ +
+
+ +
+ + +
+ +
+
    +
    +
    +
    diff --git a/application/admin/view/score/log/add.html b/application/admin/view/score/log/add.html index 0efe9b7..bcdfcda 100644 --- a/application/admin/view/score/log/add.html +++ b/application/admin/view/score/log/add.html @@ -3,39 +3,62 @@
    - + + + + (没找到积分规则则点击按钮创建积分规则后重新下拉框选积分规则) + 添加新积分规则 + + + +
    + + + + (没找到员工则点击按钮创建员工后重新下拉框选员工) + 添加新员工 + + +
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    @@ -56,6 +79,30 @@
    +
    + +
    + +
    + {foreach name="statusList" item="vo"} + + {/foreach} +
    + +
    +
    +
    + +
    + +
    +
    + + + + + + +
    + +
    + +
    + {foreach name="statusList" item="vo"} + + {/foreach} +
    + +
    +
    +
    + +
    + +
    +
    + + + + + + +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 用户上传文件
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    filefile文件流
    categorystring分类标识:category1=非机密类1,category2=非机密类2,cert=证件机密类,code=二维码类,user=用户普通上传
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    idstring要生成验证码的标识
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    示例接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 测试描述信息
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    tokenstring请求的Token
    +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    idinteger会员ID
    namestring用户名
    dataobject扩展数据
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    Headers
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型描述
    codeinteger
    msgstring
    dataobject扩展数据返回
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    {
    +         'code':'1',
    +         'msg':'返回成功'
    +        }
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 无需登录的接口
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 需要登录的接口
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 需要登录且需要验证有相应组的权限
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    邮箱验证码接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 发送验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    eventstring事件名称
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    eventstring事件名称
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    首页接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 首页
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    积分接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 积分项列表
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    keywordsstring搜索关键字
    pagestring页数
    limitstring条数
    waystringfree=自由申请,direct=直接奖励 默认自由申请
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    {
    +     *
    +     *}
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 我的积分申请列表
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    keywordsstring搜索关键字
    pagestring页数
    limitstring条数
    statusstring审核状态:0=待审核,1=审核通过,2=审核不通过 可多值逗号拼接
    timestring复合时间查询:today今天,week本周,month本月,year本年,yesterday昨天,last year上一年,last week上周,last month上個月,lately7最近7天 , lately30最近30天,按开始时间区间查传值格式:Y/m/d H:M:S-Y/m/d H:M:S
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    {
    +     *
    +     *}
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 月度积分排行榜及个人月度当前积分累计
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    timestring要查询的月份的时间戳
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    {
    +     *
    +     *}
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 积分申请
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    score_event_idstring积分事件id
    imagesstring多图逗号拼接,附件只要相对路径,不要全路径
    descstring备注
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    {
    +     *
    +     *}
    +
    +
    +
    + +
    +
    +
    +
    +

    手机短信接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 发送验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    eventstring事件名称
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    eventstring事件名称
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    Token接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测Token是否过期
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 刷新Token
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    会员接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 会员中心
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 会员登录
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    accountstring账号
    passwordstring密码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 手机验证码登录
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 注册会员
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    usernamestring用户名
    passwordstring密码
    emailstring邮箱
    mobilestring手机号
    codestring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 退出登录
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + 无 +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + 无 +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 修改会员个人信息
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    avatarstring头像地址
    usernamestring用户名
    nicknamestring昵称
    biostring个人简介
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 修改邮箱
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 修改手机号
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 第三方登录
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    platformstring平台名称
    codestringCode码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 重置密码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    newpasswordstring新密码
    captchastring验证码
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    验证接口

    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测邮箱
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    idstring排除会员ID
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测用户名
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    usernamestring用户名
    idstring排除会员ID
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测昵称
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    nicknamestring昵称
    idstring排除会员ID
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测手机
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    idstring排除会员ID
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测手机
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测邮箱
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测手机验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    mobilestring手机号
    captchastring验证码
    eventstring事件
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + + +
    + +
    +
    + 检测邮箱验证码
    +
    +
    权限
    +
    + + + + + + + + + + + +
    登录
    鉴权
    +
    +
    +
    +
    Headers
    +
    + 无 +
    +
    +
    +
    参数
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称类型必选描述
    emailstring邮箱
    captchastring验证码
    eventstring事件
    +
    +
    +
    +
    正文
    +
    + 无
    +
    +
    + +
    +
    +
    +
    +
    参数 +
    + 追加 +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    响应输出
    +
    +
    +
    +
    
    +                                                            
    
    +                                                        
    +
    +
    +
    +
    +
    返回参数
    +
    + 无 +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + + + +
    + + + + + + + + + + + diff --git a/public/assets/js/backend/score/employee.js b/public/assets/js/backend/score/employee.js index 86b1611..47f6f0f 100644 --- a/public/assets/js/backend/score/employee.js +++ b/public/assets/js/backend/score/employee.js @@ -22,21 +22,59 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', + fixedColumns: true, + fixedRightNumber: 1, columns: [ [ {checkbox: true}, {field: 'id', title: __('Id')}, - {field: 'user_id', title: __('User_id')}, + {field: 'user_id', title: __('User_id'),visible: false}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + + {field: 'team.name', title: __('Team.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, {field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, - {field: 'team_id', title: __('Team_id')}, + {field: 'opertime', title: __('统计时间查询'), operate:'RANGE', addclass:'datetimerange', autocomplete:false,formatter:function (value, row, index) { + return row.opertime ? row.opertime : '未查询'; + }}, + {field: 'score_count', title: __('积分统计(根据具体统计时间筛选)'),formatter:function (value, row, index) { + // if( !row.opertime){ + // return "#请在点开【搜索栏】后选择【统计时间查询】提交查询#"; + // } + return ` + ${row.score_count} + `; + },searchable:false}, + + {field: 'user.nickname', title: __('User.nickname'),visible: false, operate: 'LIKE'}, + {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, + {field: 'user.avatar', title: __('User.avatar'),visible: false, operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + + + {field: 'team_id', title: __('Team_id'),visible: false}, {field: 'status', title: __('Status'), searchList: {"entry":__('Status entry'),"exit":__('Status exit')}, formatter: Table.api.formatter.status}, {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, - {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, - {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, - {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, - {field: 'team.name', title: __('Team.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, - {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + + // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + {field: 'operate', title: __('Operate'), table: table , buttons: [ + { + name: 'select', + text: __('积分记录'), + title: __('查看积分记录'), + classname: 'btn btn-xs btn-primary btn-dialog', + icon: 'fa fa-list', + url: log_url, + callback: function (data) { + + }, + // visible: function (row) { + // if(row.status == '1' || row.status == '2' ) return true; + // return false; + // } + }, + + ], events: Table.api.events.operate, formatter: Table.api.formatter.operate}, + ] ] }); @@ -52,9 +90,35 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin }, api: { bindevent: function () { + + $(document).on('click', '.btn-changeuser', function (event) { + var url = $(this).attr('data-url'); + if(!url) return false; + var title = $(this).attr('title'); + var width = $(this).attr('data-width'); + var height = $(this).attr('data-height'); + // var ids = $(this).attr('data-id'); + var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%']; + var options = { + shadeClose: false, + shade: [0.3, '#393D49'], + area: area, + callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果; + Fast.api.close(ret); + } + }; + Fast.api.open(url,title,options); + }); Form.api.bindevent($("form[role=form]")); } } }; + + + var log_url = function (row,dom) { + return 'score/log/index?score_employee_id='+row.id; + } + + return Controller; }); diff --git a/public/assets/js/backend/score/event.js b/public/assets/js/backend/score/event.js index f1e1c11..2aa2f32 100644 --- a/public/assets/js/backend/score/event.js +++ b/public/assets/js/backend/score/event.js @@ -118,6 +118,27 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin }, api: { bindevent: function () { + + $(document).on('click', '.btn-changeuser', function (event) { + var url = $(this).attr('data-url'); + if(!url) return false; + var title = $(this).attr('title'); + var width = $(this).attr('data-width'); + var height = $(this).attr('data-height'); + // var ids = $(this).attr('data-id'); + var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%']; + var options = { + shadeClose: false, + shade: [0.3, '#393D49'], + area: area, + callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果; + Fast.api.close(ret); + } + }; + Fast.api.open(url,title,options); + }); + + Form.api.bindevent($("form[role=form]")); } } diff --git a/public/assets/js/backend/score/log.js b/public/assets/js/backend/score/log.js index 87c8504..56ca810 100644 --- a/public/assets/js/backend/score/log.js +++ b/public/assets/js/backend/score/log.js @@ -11,6 +11,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin del_url: 'score/log/del', multi_url: 'score/log/multi', import_url: 'score/log/import', + + auth_yes_url: 'score/log/auth_yes', + auth_no_url: 'score/log/auth_no', + table: 'score_log', } }); @@ -28,22 +32,30 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin [ {checkbox: true}, {field: 'id', title: __('Id')}, - {field: 'score_event_id', title: __('Score_event_id')}, - {field: 'score_employee_id', title: __('Score_employee_id')}, - {field: 'user_id', title: __('User_id')}, - {field: 'score_team_id', title: __('Score_team_id')}, + {field: 'score_event_id', title: __('Score_event_id'),visible: false}, + {field: 'score_employee_id', title: __('Score_employee_id'),visible: false}, + {field: 'user_id', title: __('User_id'),visible: false}, + {field: 'score_team_id', title: __('Score_team_id'),visible: false}, {field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, - {field: 'score', title: __('Score')}, + {field: 'score', title: __('Score'), operate: false}, {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, {field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, - {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, - {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, - {field: 'scoreevent.name', title: __('Event.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status}, + {field: 'reason', title: __('Reason'), operate: 'LIKE'}, {field: 'employee.name', title: __('Employee.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'team.name', title: __('Team.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + + {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'}, {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'}, {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, - {field: 'team.name', title: __('Team.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + + + + {field: 'authtime', title: __('Authtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + // {field: 'scoreevent.name', title: __('Event.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} ] ] @@ -51,6 +63,82 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin // 为表格绑定事件 Table.api.bindevent(table); + + + // 批量审核成功 + $(document).on("click", ".btn-auth_yes", function () { + let ids = Table.api.selectedids(table); + ids = ($.isArray(ids) ? ids.join(",") : ids); + + //先提示,确认是否提交,确认提交再调用接口 + Layer.confirm('确定要批量审核通过吗?', function (index) { + //调用接口 + let url = $.fn.bootstrapTable.defaults.extend.auth_yes_url; + options = {url: url, data: { ids: ids}}; + Fast.api.ajax(options, function (data, ret) { + table.trigger("uncheckbox"); + // var success = $(element).data("success") || $.noop; + //提交成功提示信息 + Fast.api.success(ret.msg); + + // if (typeof success === 'function') { + // if (false === success.call(element, data, ret)) { + // return false; + // } + // } + table.bootstrapTable('refresh'); + }, function (data, ret) { + // var error = $(element).data("error") || $.noop; + //提交失败提示信息 + Fast.api.error(ret.msg); + // if (typeof error === 'function') { + // if (false === error.call(element, data, ret)) { + // return false; + // } + // } + }); + }); + + + + }); + // 批量审核失败 + $(document).on("click", ".btn-auth_no", function () { + let ids = Table.api.selectedids(table); + ids = ($.isArray(ids) ? ids.join(",") : ids); + //调用接口 + Layer.confirm('确定要批量审核不通过吗?', function (index) { + //调用接口 + let url = $.fn.bootstrapTable.defaults.extend.auth_no_url; + options = {url: url, data: { ids: ids}}; + Fast.api.ajax(options, function (data, ret) { + table.trigger("uncheckbox"); + // var success = $(element).data("success") || $.noop; + //提交成功提示信息 + Fast.api.success(ret.msg); + + // if (typeof success === 'function') { + // if (false === success.call(element, data, ret)) { + // return false; + // } + // } + table.bootstrapTable('refresh'); + }, function (data, ret) { + // var error = $(element).data("error") || $.noop; + //提交失败提示信息 + Fast.api.error(ret.msg); + // if (typeof error === 'function') { + // if (false === error.call(element, data, ret)) { + // return false; + // } + // } + }); + }); + + + }); + + }, recyclebin: function () { // 初始化表格参数配置 @@ -121,6 +209,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin }, api: { bindevent: function () { + + $(document).on('click', '.btn-changeuser', function (event) { + var url = $(this).attr('data-url'); + if(!url) return false; + var title = $(this).attr('title'); + var width = $(this).attr('data-width'); + var height = $(this).attr('data-height'); + // var ids = $(this).attr('data-id'); + var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%']; + var options = { + shadeClose: false, + shade: [0.3, '#393D49'], + area: area, + callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果; + Fast.api.close(ret); + } + }; + Fast.api.open(url,title,options); + }); + Form.api.bindevent($("form[role=form]")); } } diff --git a/public/assets/js/backend/score/team.js b/public/assets/js/backend/score/team.js index 6beafb2..c86dd09 100644 --- a/public/assets/js/backend/score/team.js +++ b/public/assets/js/backend/score/team.js @@ -22,14 +22,64 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin url: $.fn.bootstrapTable.defaults.extend.index_url, pk: 'id', sortName: 'id', + fixedColumns: true, + fixedRightNumber: 1, columns: [ [ {checkbox: true}, {field: 'id', title: __('Id')}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, {field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'people_num', title: __('人数'), operate: false}, + {field: 'people_names', title: __('成员'), operate: false}, + {field: 'opertime', title: __('统计时间查询'), operate:'RANGE', addclass:'datetimerange', autocomplete:false,formatter:function (value, row, index) { + return row.opertime ? row.opertime : '未查询'; + }}, + {field: 'score_count', title: __('积分统计(根据具体统计时间筛选)'),formatter:function (value, row, index) { + // if( !row.opertime){ + // return "#请在点开【搜索栏】后选择【统计时间查询】提交查询#"; + // } + return ` + ${row.score_count} + `; + },searchable:false}, {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, - {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + {field: 'operate', title: __('Operate'), table: table , buttons: [ + { + name: 'select', + text: __('积分记录'), + title: __('查看积分记录'), + classname: 'btn btn-xs btn-primary btn-dialog', + icon: 'fa fa-list', + url: log_url, + callback: function (data) { + + }, + // visible: function (row) { + // if(row.status == '1' || row.status == '2' ) return true; + // return false; + // } + }, + { + name: 'select2', + text: __('队员详情'), + title: __('队员详情'), + classname: 'btn btn-xs btn-primary btn-dialog', + icon: 'fa fa-list', + url: employee_url, + callback: function (data) { + + }, + // visible: function (row) { + // if(row.status == '1' || row.status == '2' ) return true; + // return false; + // } + }, + + ], events: Table.api.events.operate, formatter: Table.api.formatter.operate}, + ] ] }); @@ -45,9 +95,38 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin }, api: { bindevent: function () { + + $(document).on('click', '.btn-changeuser', function (event) { + var url = $(this).attr('data-url'); + if(!url) return false; + var title = $(this).attr('title'); + var width = $(this).attr('data-width'); + var height = $(this).attr('data-height'); + // var ids = $(this).attr('data-id'); + var area = [$(window).width() > 800 ? (width?width:'800px') : '95%', $(window).height() > 600 ? (height?height:'600px') : '95%']; + var options = { + shadeClose: false, + shade: [0.3, '#393D49'], + area: area, + callback:function(ret){//回调方法,需要在本页面Controller中增加方法监听且调用Fast.api.close(ret)传递结果; + Fast.api.close(ret); + } + }; + Fast.api.open(url,title,options); + }); + + Form.api.bindevent($("form[role=form]")); } } }; + + var log_url = function (row,dom) { + return 'score/log/index?score_team_id='+row.id; + } + var employee_url= function (row,dom) { + return 'score/employee/index?team_id='+row.id; + } + return Controller; }); diff --git a/public/uploads/20250527/619995a18849fce5f33889f88976df62.jpg b/public/uploads/20250527/619995a18849fce5f33889f88976df62.jpg new file mode 100644 index 0000000..0657bcb Binary files /dev/null and b/public/uploads/20250527/619995a18849fce5f33889f88976df62.jpg differ diff --git a/public/uploads/20250527/fa63d5222a158cc34803afa4ddbc6a40.jpg b/public/uploads/20250527/fa63d5222a158cc34803afa4ddbc6a40.jpg new file mode 100644 index 0000000..9b88d21 Binary files /dev/null and b/public/uploads/20250527/fa63d5222a158cc34803afa4ddbc6a40.jpg differ