sc
This commit is contained in:
@@ -4,8 +4,8 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://47.98.161.246:48080'
|
# VITE_BASE_URL='http://47.98.161.246:48080'
|
||||||
# VITE_BASE_URL='http://114.215.207.150:48080'
|
VITE_BASE_URL='http://114.215.207.150:48080'
|
||||||
|
|
||||||
# 小程序接口请求路劲
|
# 小程序接口请求路劲
|
||||||
VITE_APPLET_URL='https://cloud.ahduima.com'
|
VITE_APPLET_URL='https://cloud.ahduima.com'
|
||||||
|
|||||||
@@ -30,3 +30,10 @@ export const getResellDetail = async (id) => {
|
|||||||
url: '/admin-api/applet/xunjia/distribution/' + id
|
url: '/admin-api/applet/xunjia/distribution/' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getResellSimpleList = async (params) => {
|
||||||
|
return await request.get({
|
||||||
|
url: '/admin-api/applet/xunjia/distribution/simple-list',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const updateVipType = async (data) => {
|
|||||||
|
|
||||||
export const deleteVipType = async (id) => {
|
export const deleteVipType = async (id) => {
|
||||||
return await request.delete({
|
return await request.delete({
|
||||||
url: '/admin-api/applet/xunjia/member/memberId?id=' + id
|
url: '/admin-api/applet/xunjia/member/delete?memberId=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,3 +47,10 @@ export const getVipTypeOptions = async (params) => {
|
|||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getRechargeRecords = async (params) => {
|
||||||
|
return await request.get({
|
||||||
|
url: '/admin-api/applet/xunjia/pay/list',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,12 +42,9 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
if (to.query?.tenantId && to.query?.appId) {
|
if (to.query?.tenantId && to.query?.appId) {
|
||||||
setApp(to.query.tenantId, to.query.appId)
|
setApp(to.query.tenantId, to.query.appId)
|
||||||
setTimeout(() => {
|
await waitTime(1500)
|
||||||
next({ path: '/' })
|
|
||||||
}, 1500)
|
|
||||||
} else {
|
|
||||||
next({ path: '/' })
|
|
||||||
}
|
}
|
||||||
|
next({ path: '/' })
|
||||||
} else {
|
} else {
|
||||||
// 获取所有字典
|
// 获取所有字典
|
||||||
const dictStore = useDictStoreWithOut()
|
const dictStore = useDictStoreWithOut()
|
||||||
@@ -80,15 +77,23 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
const tenantId = getTenantId()
|
const tenantId = getTenantId()
|
||||||
const appId = getAppId()
|
const appId = getAppId()
|
||||||
if (tenantId && appId) {
|
if (tenantId && appId) {
|
||||||
next(`/oa/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
next(`/crm/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||||
} else {
|
} else {
|
||||||
next(`/oa/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
next(`/crm/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
async function waitTime(seconds) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve()
|
||||||
|
}, seconds)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function setApp(tenantId, appId) {
|
function setApp(tenantId, appId) {
|
||||||
setTenantId(tenantId)
|
setTenantId(tenantId)
|
||||||
|
|
||||||
|
|||||||
@@ -53,24 +53,37 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/index',
|
redirect: '/Home/index',
|
||||||
name: '',
|
name: '',
|
||||||
meta: {
|
|
||||||
title: '首页'
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/index',
|
|
||||||
component: () => import('@/views/Home/Index.vue'),
|
|
||||||
name: 'Home',
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '首页',
|
title: '首页',
|
||||||
icon: 'ep:home-filled',
|
hidden: true
|
||||||
noTagsView: true,
|
|
||||||
affix: true
|
|
||||||
}
|
}
|
||||||
}
|
// children: [
|
||||||
]
|
// {
|
||||||
|
// path: '/index',
|
||||||
|
// component: () => import('@/views/Home/Index.vue'),
|
||||||
|
// name: 'Home',
|
||||||
|
// meta: {
|
||||||
|
// title: '首页',
|
||||||
|
// icon: 'ep:home-filled',
|
||||||
|
// noTagsView: true,
|
||||||
|
// affix: true
|
||||||
|
// // hidden: true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// path: 'menu',
|
||||||
|
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||||
|
// name: 'Menu',
|
||||||
|
// meta: {
|
||||||
|
// affix: true,
|
||||||
|
// noTagsView: true,
|
||||||
|
// icon: 'ep:user',
|
||||||
|
// title: '菜单管理'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/swagger',
|
path: '/swagger',
|
||||||
@@ -145,11 +158,11 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
// path: '/Basic',
|
// path: '/Basic',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
// name: 'Basic',
|
// name: 'Basic',
|
||||||
// meta: { title: '菜单管理' },
|
|
||||||
// redirect: '/Basic/menu',
|
// redirect: '/Basic/menu',
|
||||||
|
// meta: { title: '菜单管理' },
|
||||||
// children: [
|
// children: [
|
||||||
// {
|
// {
|
||||||
// path: '/menu',
|
// path: 'menu',
|
||||||
// component: () => import('@/views/Basic/Menu/index.vue'),
|
// component: () => import('@/views/Basic/Menu/index.vue'),
|
||||||
// name: 'Menu',
|
// name: 'Menu',
|
||||||
// meta: {
|
// meta: {
|
||||||
|
|||||||
109
src/views/XjApplet/Vip/components/Recharge.vue
Normal file
109
src/views/XjApplet/Vip/components/Recharge.vue
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="searchForm" inline @submit.prevent>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.phone" placeholder="学员手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select
|
||||||
|
v-model="searchForm.distributionId"
|
||||||
|
placeholder="选择分销人"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in distributionOptions"
|
||||||
|
:key="item.distributionId"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.distributionId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.createDate"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
start-placeholder="充值日期"
|
||||||
|
end-placeholder="充值日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="searchList">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="loading" :data="tableList" height="calc(100vh - 260px)">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="手机号" align="left" prop="phone" width="140" />
|
||||||
|
<el-table-column label="会员名" align="left" prop="memberName" min-width="140" />
|
||||||
|
<el-table-column label="支付金额" align="left" prop="money" min-width="100" />
|
||||||
|
<el-table-column label="车型" prop="carName" align="left" width="100" />
|
||||||
|
<el-table-column label="科目" align="left" prop="subjects" width="100" />
|
||||||
|
<el-table-column label="充值日期" align="left" prop="payTime" min-width="120" />
|
||||||
|
<el-table-column label="截止日期" align="left" prop="endDate" min-width="120" />
|
||||||
|
<el-table-column label="分销人" align="left" prop="distributionName" min-width="100" />
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="searchForm.pageNo"
|
||||||
|
v-model:limit="searchForm.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Recharge">
|
||||||
|
import { getRechargeRecords } from '@/api/xjapplet/vip'
|
||||||
|
import { getResellSimpleList } from '@/api/xjapplet/resell'
|
||||||
|
|
||||||
|
const searchForm = ref({
|
||||||
|
distributionId: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
createDate: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 50
|
||||||
|
})
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableList = ref([])
|
||||||
|
const total = ref(0)
|
||||||
|
|
||||||
|
const distributionOptions = ref([])
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
changeCarType()
|
||||||
|
})
|
||||||
|
|
||||||
|
function changeCarType() {
|
||||||
|
getResellSimpleList().then((response) => {
|
||||||
|
distributionOptions.value = response
|
||||||
|
})
|
||||||
|
searchList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchList() {
|
||||||
|
searchForm.value.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getList() {
|
||||||
|
loading.value = true
|
||||||
|
if (searchForm.value.createDate && searchForm.value.createDate.length > 0) {
|
||||||
|
searchForm.value.payTimeBegin = searchForm.value.createDate[0] + ' 00:00:00'
|
||||||
|
searchForm.value.payTimeEnd = searchForm.value.createDate[1] + ' 23:59:59'
|
||||||
|
} else {
|
||||||
|
searchForm.value.payTimeBegin = undefined
|
||||||
|
searchForm.value.payTimeEnd = undefined
|
||||||
|
}
|
||||||
|
getRechargeRecords(searchForm.value).then((response) => {
|
||||||
|
tableList.value = response.list
|
||||||
|
total.value = response.total
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio-group v-model="searchForm.carTypeId" @change="searchList">
|
<el-radio-group v-model="searchForm.carTypeId" @change="searchList">
|
||||||
<el-radio label="1001">小车</el-radio>
|
<el-radio :label="1001">小车</el-radio>
|
||||||
<el-radio label="1002">摩托车</el-radio>
|
<el-radio :label="1002">摩托车</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -68,14 +68,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车型" prop="carTypeId">
|
<el-form-item label="车型" prop="carTypeId">
|
||||||
<el-select v-model="form.carTypeId" style="width: 100%">
|
<el-select v-model="form.carTypeId" style="width: 100%">
|
||||||
<el-option label="小车" value="1001" />
|
<el-option label="小车" :value="1001" />
|
||||||
<el-option label="摩托车" value="1002" />
|
<el-option label="摩托车" :value="1002" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="科目" prop="subjects">
|
<el-form-item label="科目" prop="subjectList">
|
||||||
<el-select v-model="form.subjects" placeholder="多选" multiple style="width: 100%">
|
<el-select v-model="form.subjectList" placeholder="多选" multiple style="width: 100%">
|
||||||
<el-option label="科一" value="4" />
|
<el-option label="科一" value="1" />
|
||||||
<el-option label="科四" value="1" />
|
<el-option label="科四" value="4" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="原价" prop="price">
|
<el-form-item label="原价" prop="price">
|
||||||
@@ -116,7 +116,7 @@ import { getVipTypeList, addVipType, updateVipType, deleteVipType } from '@/api/
|
|||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
memberName: undefined,
|
memberName: undefined,
|
||||||
carTypeId: '1001',
|
carTypeId: 1001,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 50
|
pageSize: 50
|
||||||
})
|
})
|
||||||
@@ -146,7 +146,7 @@ const showDialog = ref(false)
|
|||||||
const form = ref({
|
const form = ref({
|
||||||
memberName: '',
|
memberName: '',
|
||||||
carTypeId: undefined,
|
carTypeId: undefined,
|
||||||
subjects: [],
|
subjectList: [],
|
||||||
price: '',
|
price: '',
|
||||||
discount: '',
|
discount: '',
|
||||||
duration: '',
|
duration: '',
|
||||||
@@ -156,7 +156,7 @@ const form = ref({
|
|||||||
const rules = ref({
|
const rules = ref({
|
||||||
memberName: [{ required: true, message: '请输入会员名称', trigger: 'blur' }],
|
memberName: [{ required: true, message: '请输入会员名称', trigger: 'blur' }],
|
||||||
carTypeId: [{ required: true, message: '请输入车型', trigger: 'change' }],
|
carTypeId: [{ required: true, message: '请输入车型', trigger: 'change' }],
|
||||||
subjects: [{ required: true, message: '请输入科目', trigger: 'blur' }],
|
subjectList: [{ required: true, message: '请输入科目', trigger: 'blur' }],
|
||||||
price: [{ required: true, message: '请输入价格', trigger: 'blur' }],
|
price: [{ required: true, message: '请输入价格', trigger: 'blur' }],
|
||||||
discount: [{ required: true, message: '请输入折扣价', trigger: 'blur' }],
|
discount: [{ required: true, message: '请输入折扣价', trigger: 'blur' }],
|
||||||
duration: [{ required: true, message: '请输入有效期', trigger: 'blur' }]
|
duration: [{ required: true, message: '请输入有效期', trigger: 'blur' }]
|
||||||
@@ -165,10 +165,10 @@ const rules = ref({
|
|||||||
function addVip() {
|
function addVip() {
|
||||||
showDialog.value = true
|
showDialog.value = true
|
||||||
|
|
||||||
form.value.carTypeId = {
|
form.value = {
|
||||||
memberName: '',
|
memberName: '',
|
||||||
carTypeId: searchForm.value.carTypeId,
|
carTypeId: searchForm.value.carTypeId,
|
||||||
subjects: [],
|
subjectList: [],
|
||||||
price: '',
|
price: '',
|
||||||
discount: '',
|
discount: '',
|
||||||
duration: '',
|
duration: '',
|
||||||
@@ -178,7 +178,7 @@ function addVip() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function editVip(row) {
|
function editVip(row) {
|
||||||
form.value = { ...row, subjects: row.subjects.split(','), unit: Number(row.unit) }
|
form.value = { ...row, unit: Number(row.unit) }
|
||||||
showDialog.value = true
|
showDialog.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
<el-tab-pane label="用户折扣" :name="4" v-if="checkPermi(['xj-applet:vip:user-discount'])">
|
<el-tab-pane label="用户折扣" :name="4" v-if="checkPermi(['xj-applet:vip:user-discount'])">
|
||||||
<UserDiscount v-if="tabIndex == 4" />
|
<UserDiscount v-if="tabIndex == 4" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="充值记录" :name="5" v-if="checkPermi(['xj-applet:vip:recharge'])">
|
||||||
|
<Recharge v-if="tabIndex == 5" />
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -23,6 +26,7 @@ import UserDiscount from './components/UserDiscount.vue'
|
|||||||
import VipDiscount from './components/VipDiscount.vue'
|
import VipDiscount from './components/VipDiscount.vue'
|
||||||
import VipType from './components/VipType.vue'
|
import VipType from './components/VipType.vue'
|
||||||
import VipUser from './components/VipUser.vue'
|
import VipUser from './components/VipUser.vue'
|
||||||
|
import Recharge from './components/Recharge.vue'
|
||||||
|
|
||||||
const tabIndex = ref(1)
|
const tabIndex = ref(1)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user