|
@@ -68,7 +68,10 @@
|
|
|
<Icon class="mr-5px" icon="ep:refresh" />
|
|
|
重置
|
|
|
</el-button>
|
|
|
- <el-button v-hasPermi="['promotion:coupon:send']" @click="openCoupon">发送优惠券</el-button>
|
|
|
+ <el-button @click="addInfo" v-hasPermi="['member:user:create']">
|
|
|
+ <Icon class="mr-5px" icon="eq:add" />
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
<el-button plain type="danger" @click="toggleExpandAll">
|
|
|
<Icon class="mr-5px" icon="ep:sort" />
|
|
|
展开/折叠
|
|
@@ -89,14 +92,14 @@
|
|
|
row-key="id"
|
|
|
>
|
|
|
<el-table-column :show-overflow-tooltip="true" align="center" label="用户编号" prop="id" width="120px" />
|
|
|
- <el-table-column align="center" label="头像" prop="avatar" width="80px">
|
|
|
+ <!-- <el-table-column align="center" label="头像" prop="avatar" width="80px">
|
|
|
<template #default="scope">
|
|
|
<img :src="scope.row.avatar" style="width: 40px" />
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="手机号" prop="mobile" width="120px" />
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column align="center" label="手机号" prop="mobile" width="160px" />
|
|
|
<el-table-column align="center" label="昵称" prop="nickname" width="180px" />
|
|
|
- <el-table-column align="center" label="套餐" prop="comboName" width="180px" />
|
|
|
+ <el-table-column align="center" label="套餐" prop="comboName" width="200px" />
|
|
|
<el-table-column align="center" label="等级" prop="levelName" width="100px" />
|
|
|
<el-table-column align="center" label="分组" prop="groupName" width="100px" />
|
|
|
<el-table-column
|
|
@@ -104,6 +107,7 @@
|
|
|
align="center"
|
|
|
label="用户标签"
|
|
|
prop="tagNames"
|
|
|
+ width="120px"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-tag v-for="(tagName, index) in scope.row.tagNames" :key="index" class="mr-3px">
|
|
@@ -111,7 +115,7 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="积分" prop="point" width="100px" />
|
|
|
+ <!-- <el-table-column align="center" label="积分" prop="point" width="100px" /> -->
|
|
|
<el-table-column align="center" label="状态" prop="status" width="100px">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
@@ -141,7 +145,8 @@
|
|
|
<template #default="scope">
|
|
|
<div class="flex items-center justify-center">
|
|
|
<el-button link type="primary" @click="openDetail(scope.row.id)">详情</el-button>
|
|
|
- <el-dropdown
|
|
|
+ <el-button v-if="checkPermi(['member:user:update'])" link type="primary" @click="handleCommand('handleUpdate',scope.row)">编辑</el-button>
|
|
|
+ <!-- <el-dropdown
|
|
|
v-hasPermi="[
|
|
|
'member:user:update',
|
|
|
'member:user:update-level',
|
|
@@ -182,18 +187,11 @@
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
- </el-dropdown>
|
|
|
+ </el-dropdown> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- 分页 -->
|
|
|
-<!-- <Pagination-->
|
|
|
-<!-- v-model:limit="queryParams.pageSize"-->
|
|
|
-<!-- v-model:page="queryParams.pageNo"-->
|
|
|
-<!-- :total="total"-->
|
|
|
-<!-- @pagination="getList"-->
|
|
|
-<!-- />-->
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
@@ -204,8 +202,6 @@
|
|
|
<UserPointUpdateForm ref="updatePointFormRef" @success="getList" />
|
|
|
<!-- 修改用户余额弹窗 -->
|
|
|
<UserBalanceUpdateForm ref="UpdateBalanceFormRef" @success="getList" />
|
|
|
- <!-- 发送优惠券弹窗 -->
|
|
|
- <CouponSendForm ref="couponSendFormRef" />
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
@@ -213,12 +209,9 @@ import * as UserApi from '@/api/member/user'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
import UserForm from './UserForm.vue'
|
|
|
import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue'
|
|
|
-// import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue'
|
|
|
import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue'
|
|
|
-// import UserLevelUpdateForm from './components/UserLevelUpdateForm.vue'
|
|
|
import UserPointUpdateForm from './components/UserPointUpdateForm.vue'
|
|
|
import UserBalanceUpdateForm from './components/UserBalanceUpdateForm.vue'
|
|
|
-import { CouponSendForm } from '@/views/mall/promotion/coupon/components'
|
|
|
import { checkPermi } from '@/utils/permission'
|
|
|
import {handleTree} from "@/utils/tree";
|
|
|
|
|
@@ -283,15 +276,18 @@ const openForm = (type: string, id?: number) => {
|
|
|
}
|
|
|
|
|
|
/** 发送优惠券 */
|
|
|
-const couponSendFormRef = ref()
|
|
|
-const openCoupon = () => {
|
|
|
- if (selectedIds.value.length === 0) {
|
|
|
- message.warning('请选择要发送优惠券的用户')
|
|
|
- return
|
|
|
- }
|
|
|
- couponSendFormRef.value.open(selectedIds.value)
|
|
|
+// const couponSendFormRef = ref()
|
|
|
+// const openCoupon = () => {
|
|
|
+// if (selectedIds.value.length === 0) {
|
|
|
+// message.warning('请选择要发送优惠券的用户')
|
|
|
+// return
|
|
|
+// }
|
|
|
+// couponSendFormRef.value.open(selectedIds.value)
|
|
|
+// }
|
|
|
+/**新增 */
|
|
|
+const addInfo = ()=>{
|
|
|
+ openForm('create')
|
|
|
}
|
|
|
-
|
|
|
/** 操作分发 */
|
|
|
const handleCommand = (command: string, row: UserApi.UserVO) => {
|
|
|
switch (command) {
|