diff --git a/app/common/dao/user/UserDao.php b/app/common/dao/user/UserDao.php index fbbcaf2..955fa16 100755 --- a/app/common/dao/user/UserDao.php +++ b/app/common/dao/user/UserDao.php @@ -87,6 +87,8 @@ class UserDao extends BaseDao return $query->where('User.uid|User.real_name|User.nickname|User.phone', 'like', '%' . $where['keyword'] . '%'); })->when(isset($where['user_type']) && $where['user_type'] !== '', function (BaseQuery $query) use ($where) { return $query->where('User.user_type', $where['user_type']); + })->when(isset($where['is_lottery']) && $where['is_lottery'] !== '', function (BaseQuery $query) use ($where) { + return $query->where('User.is_lottery', $where['is_lottery']); })->when(isset($where['uid']) && $where['uid'] !== '', function (BaseQuery $query) use ($where) { return $query->where('User.uid', $where['uid']); })->when(isset($where['status']) && $where['status'] !== '', function (BaseQuery $query) use ($where) { diff --git a/app/common/repositories/user/UserRepository.php b/app/common/repositories/user/UserRepository.php index ce4b6e8..171271d 100755 --- a/app/common/repositories/user/UserRepository.php +++ b/app/common/repositories/user/UserRepository.php @@ -307,14 +307,14 @@ class UserRepository extends BaseRepository $data = app()->make(UserGroupRepository::class)->allOptions(); return Elm::createForm(Route::buildUrl($isArray ? 'systemUserBatchChangeGroup' : 'systemUserChangeGroup', $isArray ? [] : compact('id'))->build(), [ Elm::hidden('ids', $isArray ? $id : [$id]), - Elm::select('group_id', '用户分组:', $isArray ? '' : $user->group_id)->options(function () use ($data) { + Elm::select('group_id', '用户等级:', $isArray ? '' : $user->group_id)->options(function () use ($data) { $options = [['label' => '请选择', 'value' => 0]]; foreach ($data as $value => $label) { $options[] = compact('value', 'label'); } return $options; - })->placeholder('请选择用户分组') - ])->setTitle('修改用户分组'); + })->placeholder('请选择用户等级') + ])->setTitle('修改用户等级'); } /** @@ -1616,6 +1616,7 @@ class UserRepository extends BaseRepository $info = $this->dao->userOrderDetail($uid); // 添加用户扩展信息 $info['extend_info'] = app()->make(UserFieldsRepository::class)->info((int)$uid, false)['extend_info']; + $info['assets'] = app()->make(UserAssetsRepository::class)->assets($uid); return $info; } diff --git a/app/controller/admin/user/User.php b/app/controller/admin/user/User.php index 4d8b6ec..4fc0a21 100755 --- a/app/controller/admin/user/User.php +++ b/app/controller/admin/user/User.php @@ -99,7 +99,8 @@ class User extends BaseController 'fields_value', 'member_level', 'keyword', - 'birthday' + 'birthday', + 'is_lottery' ]); [$page, $limit] = $this->getPage(); return app('json')->success($this->repository->getList($where, $page, $limit)); diff --git a/view/admin/src/views/user/list/index.vue b/view/admin/src/views/user/list/index.vue index 3c751e2..6d6f549 100644 --- a/view/admin/src/views/user/list/index.vue +++ b/view/admin/src/views/user/list/index.vue @@ -12,26 +12,25 @@ 手机号 用户ID - + - + - - - - + + + + + 搜索 - 重置 + 重置 - - - +
@@ -44,7 +43,7 @@ 手机号 用户ID - + @@ -89,7 +88,7 @@ - + @@ -117,42 +116,42 @@ - +
- + 搜索 - 重置 + 重置 - + -
- - - - - - - - -
- 创建用户 - 发送图文消息 - 批量设置分组 - 批量设置标签 - 批量设置分销员 - 发送优惠券 - 导出列表 -
- -
+ + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + - - - + + + + + - - - - + + + + + + @@ -239,13 +238,18 @@ {{ row.spread ? row.spread.nickname + ' / ' + row.spread.uid : '-' }} - - + + - - + + + + + + + @@ -283,8 +287,8 @@ - + @@ -439,7 +443,6 @@ export default { multipleSelection: [], ids: '', wechatIds: '', - uid: '', labelPosition: 'right', userProps: { children: 'children', @@ -466,7 +469,8 @@ export default { limit: 20, group_id: '', fields_type: '', - fields_value: '' + fields_value: '', + is_lottery: '' }, address: [], grid: { @@ -582,7 +586,7 @@ export default { } else if (index > -1) { this.checkedPage.splice(index, 1) } - + this.syncCheckedId() }, syncCheckedId() { @@ -651,7 +655,7 @@ export default { if (lebData.export.length) { data = data.concat(lebData.export) excelData.page++ - } + } } createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); return @@ -671,7 +675,7 @@ export default { let label_id = this.userFrom.label_id == '' ? '' : this.getLabelValue(), user_type = this.findKey(this.userFrom.user_type,{'':'','微信用户':'wechat','小程序用户':'routine','H5用户':'h5'}), sex = this.findKey(this.userFrom.sex,{'男':'1','女':'2','保密':'0','':''}), - pay_count = this.findKey(this.userFrom.sex,{'0次':'-1','1次以上':'0','2次以上':'1','3次以上':'2','4次以上':'3','5次以上':'4','': ''}), + pay_count = this.findKey(this.userFrom.sex,{'0次':'-1','1次以上':'0','2次以上':'1','3次以上':'2','4次以上':'3','5次以上':'4','': ''}), is_promoter = this.findKey(this.userFrom.is_promoter,{'推广员':'1','普通用户':'0','':''}), user_time_type = this.userFrom.user_time_type == 'visit' ? '最后访问' : this.userFrom.user_time_type == 'add_time' ? '首次访问' : '' this.couponForm = { @@ -766,7 +770,7 @@ export default { this.drawer = true this.uid = id this.cancel_time = this.tableData.data.find(item => item.uid === id).cancel_time - this.$refs.userDetails.getData(id,false,true); + this.$refs.userDetails.getData(id,false,true); }, closeDrawer() { this.drawer = false @@ -779,7 +783,7 @@ export default { if (this.checkedIds.length === 0 && this.allCheck == false) return this.$message.warning('请先选择用户') this.visible = true this.wechatIds = this.getWechatUsers(this.tableData.data, this.checkedIds) - + }, handleClose() { this.visible = false @@ -792,7 +796,7 @@ export default { if(arr1[i]['wechat_user_id']){ newArr.push(arr1[i]['wechat_user_id']); } - } + } }else{ for (let i = 0; i < arr1.length; i++) { for (let j = 0; j < arr2.length; j++) { @@ -849,7 +853,7 @@ export default { this.$modalForm(changeMemberApi(row.uid)).then(() => this.changeSearch()) }, // 赠送付费会员 - giveMember(row) { + giveMember(row) { this.$modalForm(giveMemberApi(row.uid)).then(() => this.changeSearch()) }, // 修改推荐人 @@ -867,7 +871,7 @@ export default { this.$modalForm(changeNowMoneyApi(row.uid)).then(() => this.changeSearch()) }, // 修改积分余额 - changeIntegral(row){ + changeIntegral(row){ this.$modalForm(changeNowIntegralApi(row.uid)).then(() => this.changeSearch()) }, // 列表 @@ -940,7 +944,7 @@ export default { color: #00a2d4; } .dia ::v-deep .el-dialog__body { - height: 700px !important; + height: 700px !important; } .text-right { text-align: right; diff --git a/view/admin/src/views/user/list/userDetails.vue b/view/admin/src/views/user/list/userDetails.vue index 6d1c85c..c2aaf55 100644 --- a/view/admin/src/views/user/list/userDetails.vue +++ b/view/admin/src/views/user/list/userDetails.vue @@ -5,7 +5,7 @@ :size="1000" :visible.sync="drawer" :direction="direction" - :before-close="handleClose" + :before-close="handleClose" >
@@ -19,7 +19,7 @@
- +
完成 - - - - 设置积分 - 设置余额 - 设置分组 - 设置标签 - 修改推荐人 - 修改密码 - 编辑会员等级 - 付费会员设置 - - + + + + + + + + + + + + +
  • -
    余额
    +
    消费积分
    -
    {{psInfo.now_money}}元
    +
    {{psInfo.assets.integral_buy}}
  • -
    总计订单
    -
    {{psInfo.pay_count}}笔
    -
  • -
  • -
    总消费金额
    -
    {{psInfo.pay_price}}元
    +
    提现积分
    +
    {{psInfo.assets.integral_withdraw}}
  • -
    积分
    -
    {{psInfo.integral}}
    +
    钻石
    +
    {{psInfo.assets.diamond}}
  • -
    用户成长值
    -
    {{psInfo.member_value}}
    +
    本票
    +
    {{psInfo.assets.stock}}
@@ -120,30 +116,30 @@
用户概况
    -
  • -
    推广员:
    -
    {{psInfo.is_promoter == 1 ? '是' : '否'}}
    -
  • -
  • -
    用户状态:
    -
    {{psInfo.status == 1 ? '开启' : '关闭'}}
    -
  • -
  • -
    用户等级:
    -
    {{psInfo.member_level}}
    -
  • -
  • -
    用户标签:
    -
    - - {{item.label_name}} - -
    -
  • -
  • -
    用户分组:
    -
    {{psInfo.group && psInfo.group.group_name || '无'}}
    -
  • + + + + + + + + + + + + + + + + + + + + + + + +
  • 推广人:
    {{psInfo.spread && psInfo.spread.nickname || '无'}}
    @@ -156,21 +152,21 @@
    登录时间:
    {{psInfo.last_time}}
  • -
  • -
    会员到期时间:
    -
    {{psInfo.svip_endtime}}
    -
  • -
-
-
-
用户备注
-
    -
  • -
    备注:
    -
    {{ psInfo.mark ? psInfo.mark : '-' }}
    -
  • + + + +
+ + + + + + + + +
补充信息
    @@ -186,7 +182,7 @@
- + --> -
-
用户概况
- - - - - - - - - - - - 全部 - - - - - - - - 全部 - - - - - - - - - 开启 - 关闭 - - - - - - - 开启 - 关闭 - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户备注
@@ -359,7 +355,7 @@ v-model="item.value" :placeholder="item.msg" class="selWidth" - /> + /> + /> + /> + /> + /> @@ -420,13 +416,13 @@ v-model="item.value" :placeholder="item.msg" class="selWidth" - /> + />
-
- + +
- -