sc
This commit is contained in:
@@ -129,27 +129,27 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: '/Basic',
|
||||
// component: Layout,
|
||||
// name: 'Basic',
|
||||
// meta: { title: '菜单管理' },
|
||||
// redirect: '/Basic/menu',
|
||||
// children: [
|
||||
// {
|
||||
// path: 'menu',
|
||||
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||
// name: 'Menu',
|
||||
// meta: {
|
||||
// canTo: true,
|
||||
// hidden: true,
|
||||
// noTagsView: false,
|
||||
// icon: 'ep:user',
|
||||
// title: '菜单管理'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/Basic',
|
||||
component: Layout,
|
||||
name: 'Basic',
|
||||
meta: { title: '菜单管理' },
|
||||
redirect: '/Basic/menu',
|
||||
children: [
|
||||
{
|
||||
path: 'menu',
|
||||
component: () => import('@/views/Basic/Menu/index.vue'),
|
||||
name: 'Menu',
|
||||
meta: {
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
noTagsView: false,
|
||||
icon: 'ep:user',
|
||||
title: '菜单管理'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/Login/Login.vue'),
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
<el-input v-model="searchForm.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="searchList">查询</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||
<el-button @click="searchList" v-hasPermi="['xj-applet:resell:search']">查询</el-button>
|
||||
<el-button type="primary" @click="handleAdd" v-hasPermi="['xj-applet:resell:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableData" max-height="calc(100vh - 200px)">
|
||||
@@ -24,7 +26,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120px">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="handleEdit(row)">修改</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
v-hasPermi="['xj-applet:resell:update']"
|
||||
>修改</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -47,6 +55,29 @@
|
||||
<el-form-item label="标记" prop="mark">
|
||||
<el-input v-model="form.mark" />
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送会员" prop="memberId">
|
||||
<el-select v-model="form.memberId" clearable filterable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in vipOptions"
|
||||
:key="item.memberId"
|
||||
:label="item.memberName"
|
||||
:value="item.memberId"
|
||||
>
|
||||
<span style="float: left">{{ item.memberName }}</span>
|
||||
<span style="float: right; color: #aaa">{{ item.carName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送折扣" prop="discountId">
|
||||
<el-select v-model="form.discountId" clearable filterable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in discountOptions"
|
||||
:key="item.id"
|
||||
:label="item.description"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
@@ -61,6 +92,8 @@
|
||||
|
||||
<script setup name="Resell">
|
||||
import { getResellList, addResell, updateResell } from '@/api/xjapplet/resell'
|
||||
import { getVipDiscountOptions } from '@/api/xjapplet/discount'
|
||||
import { getVipTypeOptions } from '@/api/xjapplet/vip'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
@@ -80,7 +113,9 @@ const showDialog = ref(false)
|
||||
const form = ref({
|
||||
phone: '',
|
||||
name: '',
|
||||
mark: ''
|
||||
mark: '',
|
||||
discountId: undefined,
|
||||
memberId: undefined
|
||||
})
|
||||
|
||||
const rules = {
|
||||
@@ -88,8 +123,17 @@ const rules = {
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const vipOptions = ref([])
|
||||
const discountOptions = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
searchList()
|
||||
getVipDiscountOptions().then((response) => {
|
||||
discountOptions.value = response
|
||||
})
|
||||
getVipTypeOptions({ carTypeId: searchForm.value.carTypeId }).then((response) => {
|
||||
vipOptions.value = response
|
||||
})
|
||||
})
|
||||
|
||||
function searchList() {
|
||||
|
||||
@@ -5,8 +5,15 @@
|
||||
<el-input v-model="searchForm.phone" placeholder="学员手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="searchList">查询</el-button>
|
||||
<el-button type="primary" @click="addVipUser">赠送折扣</el-button>
|
||||
<el-button @click="searchList" v-hasPermi="['xj-applet:vip:user-discount:search']"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="addVipUser"
|
||||
v-hasPermi="['xj-applet:vip:user-discount:send']"
|
||||
>赠送折扣</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableList">
|
||||
@@ -37,7 +44,7 @@
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" maxlength="11" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会员描述" prop="discountId">
|
||||
<el-form-item label="折扣描述" prop="discountId">
|
||||
<el-select v-model="form.discountId" clearable filterable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in discountOptions"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-button @click="searchList">查询</el-button>
|
||||
<el-button type="primary" @click="addDiscount">新增折扣</el-button>
|
||||
<el-button @click="searchList" v-hasPermi="['xj-applet:vip:vip-discount:search']"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" @click="addDiscount" v-hasPermi="['xj-applet:vip:vip-discount:add']"
|
||||
>新增折扣</el-button
|
||||
>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList">
|
||||
@@ -18,8 +22,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="editDiscount(row)">修改</el-button>
|
||||
<el-button type="primary" link @click="deleteDiscount(row)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="editDiscount(row)"
|
||||
v-hasPermi="['xj-applet:vip:vip-discount:update']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="deleteDiscount(row)"
|
||||
v-hasPermi="['xj-applet:vip:vip-discount:delete']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -11,8 +11,12 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="searchList">查询</el-button>
|
||||
<el-button type="primary" @click="addVip">新增会员类型</el-button>
|
||||
<el-button @click="searchList" v-hasPermi="['xj-applet:vip:vip-type:search']"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" @click="addVip" v-hasPermi="['xj-applet:vip:vip-type:add']"
|
||||
>新增会员类型</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableList" height="calc(100vh - 260px)">
|
||||
@@ -32,8 +36,20 @@
|
||||
<el-table-column label="使用方式" align="center" prop="useTypeName" />
|
||||
<el-table-column label="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="editVip(row)">修改</el-button>
|
||||
<el-button type="primary" link @click="handleDelete(row.memberId)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="editVip(row)"
|
||||
v-hasPermi="['xj-applet:vip:vip-type:update']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(row.memberId)"
|
||||
v-hasPermi="['xj-applet:vip:vip-type:delete']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -21,8 +21,12 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="searchList">查询</el-button>
|
||||
<el-button type="primary" @click="addVipUser">赠送会员</el-button>
|
||||
<el-button @click="searchList" v-hasPermi="['xj-applet:vip:vip-user:search']"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" @click="addVipUser" v-hasPermi="['xj-applet:vip:vip-user:send']"
|
||||
>赠送会员</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableList" height="calc(100vh - 260px)">
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="tabIndex">
|
||||
<el-tab-pane label="会员用户" :name="1">
|
||||
<el-tab-pane label="会员用户" :name="1" v-if="checkPermi(['xj-applet:vip:vip-user'])">
|
||||
<VipUser v-if="tabIndex == 1" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="会员类型" :name="2">
|
||||
<el-tab-pane label="会员类型" :name="2" v-if="checkPermi(['xj-applet:vip:vip-type'])">
|
||||
<VipType v-if="tabIndex == 2" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="会员折扣" :name="3">
|
||||
<el-tab-pane label="会员折扣" :name="3" v-if="checkPermi(['xj-applet:vip:vip-discount'])">
|
||||
<VipDiscount v-if="tabIndex == 3" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="用户折扣" :name="4">
|
||||
<el-tab-pane label="用户折扣" :name="4" v-if="checkPermi(['xj-applet:vip:user-discount'])">
|
||||
<UserDiscount v-if="tabIndex == 4" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -18,6 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Vip">
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import UserDiscount from './components/UserDiscount.vue'
|
||||
import VipDiscount from './components/VipDiscount.vue'
|
||||
import VipType from './components/VipType.vue'
|
||||
|
||||
@@ -20,7 +20,13 @@
|
||||
<div style="width: 300px; border-right: 1px solid #eee">
|
||||
<div style="display: flex; justify-content: space-between; padding-right: 20px">
|
||||
<div style="font-size: 18px; font-weight: bold">密卷</div>
|
||||
<el-button type="primary" link @click="addMjItem">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="addMjItem"
|
||||
v-hasPermi="['xj-applet:vip-data:mj:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
<el-radio-group
|
||||
v-model="mjIndex"
|
||||
@@ -30,8 +36,20 @@
|
||||
<el-radio v-for="(item, index) in mjList" :key="index" :label="index" class="flex-radio">
|
||||
<div style="flex: 1; width: 100px">{{ getMjTitle(index) }}</div>
|
||||
<div style="padding-right: 15px">
|
||||
<el-button type="primary" link @click="removeMj(item)">删除</el-button>
|
||||
<el-button type="primary" link @click="clearMjDetail(item)">清空</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="removeMj(item)"
|
||||
v-hasPermi="['xj-applet:vip-data:mj:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="clearMjDetail(item)"
|
||||
v-hasPermi="['xj-applet:vip-data:mj:clear']"
|
||||
>清空</el-button
|
||||
>
|
||||
</div>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -45,7 +63,12 @@
|
||||
当前密卷:{{ getMjTitle(mjIndex) }}
|
||||
</div>
|
||||
<div style="margin-left: 10px; margin-right: 10px"> 题目数:{{ tableList.length }} </div>
|
||||
<el-button type="primary" @click="addMjDetail">新增密卷试题</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="addMjDetail"
|
||||
v-hasPermi="['xj-applet:vip-data:mj:add-question']"
|
||||
>新增密卷试题</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@@ -85,7 +108,13 @@
|
||||
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="takeoutMj(row)">移出密卷</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="takeoutMj(row)"
|
||||
v-hasPermi="['xj-applet:vip-data:mj:remove-question']"
|
||||
>移出密卷</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-hasPermi="['xj-applet:vip-data:jx:search']"
|
||||
@click="
|
||||
() => {
|
||||
queryParams.pageNo = 1
|
||||
@@ -27,7 +28,9 @@
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button type="primary" @click="addMjDetail">新增精选试题</el-button>
|
||||
<el-button type="primary" @click="addMjDetail" v-hasPermi="['xj-applet:vip-data:jx:add']">
|
||||
新增精选试题
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -62,7 +65,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" type="primary" link @click="takeoutMj(row)">移出精选</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
@click="takeoutMj(row)"
|
||||
v-hasPermi="['xj-applet:vip-data:jx:remove']"
|
||||
>
|
||||
移出精选
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<template>
|
||||
<el-tabs v-model="tabIndex">
|
||||
<el-tab-pane label="精选题" :name="1">
|
||||
<el-tab-pane label="精选题" :name="1" v-if="checkPermi(['xj-applet:vip-data:jx'])">
|
||||
<SimpleData v-if="tabIndex == 1" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="密卷" :name="2">
|
||||
<el-tab-pane label="密卷" :name="2" v-if="checkPermi(['xj-applet:vip-data:mj'])">
|
||||
<SecretData v-if="tabIndex == 2" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script setup name="VipData">
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import SimpleData from './conponents/SimpleData.vue'
|
||||
import SecretData from './conponents/SecretData.vue'
|
||||
|
||||
|
||||
@@ -33,9 +33,15 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleQuery"
|
||||
v-hasPermi="['xj-applet:xj-database:search']"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleAdd" v-hasPermi="['xj-applet:xj-database:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -78,8 +84,22 @@
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" link @click="handleDelete(scope.row.id)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['xj-applet:xj-database:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['xj-applet:xj-database:remove']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -138,11 +158,6 @@ function handleQuery() {
|
||||
getList()
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
queryParams.value.question = ''
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const dialogAddForm = ref(null)
|
||||
function handleEdit(item) {
|
||||
dialogAddForm.value.open(item, chapterOptions.value)
|
||||
|
||||
Reference in New Issue
Block a user