sc
This commit is contained in:
@@ -6,9 +6,9 @@ VITE_DEV=true
|
|||||||
# 请求路径
|
# 请求路径
|
||||||
# VITE_BASE_URL='http://localhost:48080'
|
# VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
VITE_BASE_URL='http://47.98.161.246:48080'
|
# VITE_BASE_URL='http://47.98.161.246:48080'
|
||||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||||
# VITE_BASE_URL='http://114.215.207.150:48080'
|
VITE_BASE_URL='http://114.215.207.150:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||||
|
|||||||
@@ -30,3 +30,10 @@ export const getCustomerExamCarType = () => {
|
|||||||
export const importStudent = async (data) => {
|
export const importStudent = async (data) => {
|
||||||
return await request.upload({ url: '/admin-api/applet/xunjia/user/import', data })
|
return await request.upload({ url: '/admin-api/applet/xunjia/user/import', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getAppletUserList = async (params) => {
|
||||||
|
return await request.get({
|
||||||
|
url: '/admin-api/applet/xunjia/user/pageList',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchForm.resellMan"
|
v-model="searchForm.distributionld"
|
||||||
placeholder="选择分销人"
|
placeholder="选择分销人"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="手机号码" prop="phone" width="120" />
|
<el-table-column label="手机号码" prop="phone" width="120" />
|
||||||
<el-table-column label="分销人" prop="distributionName" min-width="120" />
|
<el-table-column label="分销人" prop="distributionName" min-width="120" />
|
||||||
<el-table-column label="注册日期" prop="registerDate" min-width="120" />
|
<el-table-column label="注册日期" prop="createTime" min-width="120" />
|
||||||
<el-table-column label="最近登陆日期" prop="lastLoginTime" min-width="120" />
|
<el-table-column label="最近登陆日期" prop="rencentlyLoginTime" min-width="120" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination
|
<Pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
@@ -56,11 +56,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script name="AppletUser" setup>
|
<script name="AppletUser" setup>
|
||||||
// import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
// import * as CustomerApi from '@/api/customer/customer.js'
|
import * as CustomerApi from '@/api/customer/customer.js'
|
||||||
|
import { getResellSimpleList } from '@/api/xjapplet/resell'
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
resellMan: undefined,
|
distributionld: undefined,
|
||||||
phone: '',
|
phone: '',
|
||||||
createDate: [],
|
createDate: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -70,9 +71,9 @@ const searchForm = ref({
|
|||||||
const resellOptions = ref([])
|
const resellOptions = ref([])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// CustomerApi.getCustomerExamCarType().then((res) => {
|
getResellSimpleList().then((res) => {
|
||||||
// carTypeOptions.value = res
|
resellOptions.value = res
|
||||||
// })
|
})
|
||||||
handleQuery()
|
handleQuery()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -89,24 +90,14 @@ const total = ref(0)
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
// const data = await CustomerApi.getCustomerPage(removeNullField(searchForm.value))
|
if (searchForm.value.createDate && searchForm.value.createDate.length > 0) {
|
||||||
const data = {
|
searchForm.value.createTimeBegin = searchForm.value.createDate[0] + '00:00:00'
|
||||||
list: [
|
searchForm.value.createTimeEnd = searchForm.value.createDate[1] + '23:59:59'
|
||||||
{
|
} else {
|
||||||
phone: '12345678901',
|
searchForm.value.createTimeBegin = undefined
|
||||||
distributionName: '分销人A',
|
searchForm.value.createTimeEnd = undefined
|
||||||
registerDate: '2023-10-01',
|
|
||||||
lastLoginTime: '2023-10-02'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
phone: '12345678902',
|
|
||||||
distributionName: '分销人B',
|
|
||||||
registerDate: '2023-10-03',
|
|
||||||
lastLoginTime: '2023-10-04'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
total: 2
|
|
||||||
}
|
}
|
||||||
|
const data = await CustomerApi.getAppletUserList(removeNullField(searchForm.value))
|
||||||
tableList.value = data.list
|
tableList.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -5,12 +5,17 @@
|
|||||||
<el-input v-model="searchForm.phone" placeholder="学员手机号" />
|
<el-input v-model="searchForm.phone" placeholder="学员手机号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.memberId" placeholder="选择分销人" clearable filterable>
|
<el-select
|
||||||
|
v-model="searchForm.distributionId"
|
||||||
|
placeholder="选择分销人"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in vipOptions"
|
v-for="item in distributionOptions"
|
||||||
:key="item.value"
|
:key="item.distributionId"
|
||||||
:label="item.label"
|
:label="item.name"
|
||||||
:value="item.value"
|
:value="item.distributionId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -31,16 +36,12 @@
|
|||||||
<el-table-column type="index" width="55" align="center" />
|
<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="phone" width="140" />
|
||||||
<el-table-column label="会员名" align="left" prop="memberName" min-width="140" />
|
<el-table-column label="会员名" align="left" prop="memberName" min-width="140" />
|
||||||
<el-table-column label="支付金额" align="left" prop="operUser" min-width="100" />
|
<el-table-column label="支付金额" align="left" prop="money" min-width="100" />
|
||||||
<el-table-column label="车型" align="left" width="100">
|
<el-table-column label="车型" prop="carName" align="left" width="100" />
|
||||||
<template #default="{ row }">
|
|
||||||
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="科目" align="left" prop="subjects" width="100" />
|
<el-table-column label="科目" align="left" prop="subjects" width="100" />
|
||||||
<el-table-column label="充值日期" align="left" prop="startDate" min-width="120" />
|
<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="endDate" min-width="120" />
|
||||||
<el-table-column label="分销人" align="left" prop="useTypeName" min-width="100" />
|
<el-table-column label="分销人" align="left" prop="distributionName" min-width="100" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
@@ -49,44 +50,17 @@
|
|||||||
v-model:limit="searchForm.pageSize"
|
v-model:limit="searchForm.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-dialog title="赠送会员" v-model="showDialog" width="500px" :close-on-click-modal="false">
|
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="手机号" prop="phone">
|
|
||||||
<el-input v-model="form.phone" maxlength="11" />
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<span>
|
|
||||||
<el-button @click="showDialog = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="sureAdd">确定</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Recharge">
|
<script setup name="Recharge">
|
||||||
import { getUserMemberList, giveUserMember, getVipTypeOptions } from '@/api/xjapplet/vip'
|
import { getRechargeRecords } from '@/api/xjapplet/vip'
|
||||||
const message = useMessage()
|
import { getResellSimpleList } from '@/api/xjapplet/resell'
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
carTypeId: '1001',
|
distributionId: undefined,
|
||||||
memberId: undefined,
|
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
|
createDate: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 50
|
pageSize: 50
|
||||||
})
|
})
|
||||||
@@ -95,15 +69,15 @@ const loading = ref(false)
|
|||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
|
|
||||||
const vipOptions = ref([])
|
const distributionOptions = ref([])
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
changeCarType()
|
changeCarType()
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeCarType() {
|
function changeCarType() {
|
||||||
getVipTypeOptions({ carTypeId: searchForm.value.carTypeId }).then((response) => {
|
getResellSimpleList().then((response) => {
|
||||||
vipOptions.value = response
|
distributionOptions.value = response
|
||||||
})
|
})
|
||||||
searchList()
|
searchList()
|
||||||
}
|
}
|
||||||
@@ -115,43 +89,19 @@ function searchList() {
|
|||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getUserMemberList(searchForm.value).then((response) => {
|
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
|
tableList.value = response.list
|
||||||
total.value = response.total
|
total.value = response.total
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const showDialog = ref(false)
|
|
||||||
const form = ref({
|
|
||||||
phone: '',
|
|
||||||
memberId: ''
|
|
||||||
})
|
|
||||||
const rules = ref({
|
|
||||||
phone: [{ required: true, message: '请输入用户手机号', trigger: 'blur' }],
|
|
||||||
memberId: [{ required: true, message: '请选择会员类型', trigger: 'change' }]
|
|
||||||
})
|
|
||||||
|
|
||||||
function addVipUser() {
|
|
||||||
showDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const formRef = ref(null)
|
|
||||||
async function sureAdd() {
|
|
||||||
if (!formRef.value) return
|
|
||||||
const valid = await formRef.value.validate()
|
|
||||||
if (!valid) return
|
|
||||||
|
|
||||||
giveUserMember(form.value).then((response) => {
|
|
||||||
if (response) {
|
|
||||||
message.success('赠送成功')
|
|
||||||
showDialog.value = false
|
|
||||||
searchList()
|
|
||||||
} else {
|
|
||||||
message.error('赠送失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<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 value="1001">小车</el-radio>
|
||||||
<el-radio label="1002">摩托车</el-radio>
|
<el-radio value="1002">摩托车</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio-group v-model="searchForm.carTypeId" @change="changeCarType">
|
<el-radio-group v-model="searchForm.carTypeId" @change="changeCarType">
|
||||||
<el-radio label="1001">小车</el-radio>
|
<el-radio value="1001">小车</el-radio>
|
||||||
<el-radio label="1002">摩托车</el-radio>
|
<el-radio value="1002">摩托车</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item>
|
<!-- <el-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user