main
parent
24b0d7c81f
commit
881eafd6e6
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 分销配置 VO
|
||||
export interface DistributionConfigVO {
|
||||
id: number // id主键
|
||||
productId: number // 分销商品id
|
||||
status: string // 启用状态
|
||||
}
|
||||
|
||||
// 分销配置 API
|
||||
export const DistributionConfigApi = {
|
||||
// 查询分销配置分页
|
||||
getDistributionConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/member/distribution-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询分销配置详情
|
||||
getDistributionConfig: async (id: number) => {
|
||||
return await request.get({ url: `/member/distribution-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增分销配置
|
||||
createDistributionConfig: async (data: DistributionConfigVO) => {
|
||||
return await request.post({ url: `/member/distribution-config/create`, data })
|
||||
},
|
||||
|
||||
// 修改分销配置
|
||||
updateDistributionConfig: async (data: DistributionConfigVO) => {
|
||||
return await request.put({ url: `/member/distribution-config/update`, data })
|
||||
},
|
||||
|
||||
// 删除分销配置
|
||||
deleteDistributionConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/member/distribution-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出分销配置 Excel
|
||||
exportDistributionConfig: async (params) => {
|
||||
return await request.download({ url: `/member/distribution-config/export-excel`, params })
|
||||
},
|
||||
|
||||
// ==================== 子表(分销配置关联会员等级) ====================
|
||||
|
||||
// 获得分销配置关联会员等级列表
|
||||
getDistributionMebConfigListByConfigId: async (configId) => {
|
||||
return await request.get({ url: `/member/distribution-config/distribution-meb-config/list-by-config-id?configId=` + configId })
|
||||
},
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 分销记录 VO
|
||||
export interface DistributionLogVO {
|
||||
id: number // id主键
|
||||
referrerId: number // 推荐人id
|
||||
oldReferrerId: number // 推荐人id(便于回溯)
|
||||
mebId: number // 购买人id
|
||||
brokerage: number // 佣金
|
||||
status: string // 分佣结算核销状态
|
||||
gameStatus: string // 游戏状态
|
||||
convertStatus: string // 游戏兑换状态
|
||||
levelId: number // 推荐人会员等级id
|
||||
}
|
||||
|
||||
// 分销记录 API
|
||||
export const DistributionLogApi = {
|
||||
// 查询分销记录分页
|
||||
getDistributionLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/member/distribution-log/page`, params })
|
||||
},
|
||||
|
||||
// 查询分销记录详情
|
||||
getDistributionLog: async (id: number) => {
|
||||
return await request.get({ url: `/member/distribution-log/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增分销记录
|
||||
createDistributionLog: async (data: DistributionLogVO) => {
|
||||
return await request.post({ url: `/member/distribution-log/create`, data })
|
||||
},
|
||||
|
||||
// 修改分销记录
|
||||
updateDistributionLog: async (data: DistributionLogVO) => {
|
||||
return await request.put({ url: `/member/distribution-log/update`, data })
|
||||
},
|
||||
|
||||
// 删除分销记录
|
||||
deleteDistributionLog: async (id: number) => {
|
||||
return await request.delete({ url: `/member/distribution-log/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出分销记录 Excel
|
||||
exportDistributionLog: async (params) => {
|
||||
return await request.download({ url: `/member/distribution-log/export-excel`, params })
|
||||
},
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 分销统计 VO
|
||||
export interface DistributionStatisticsVO {
|
||||
id: number // id主键
|
||||
levelId: number // 会员等级id
|
||||
mebId: number // 会员id
|
||||
logId: number // 推荐记录id
|
||||
referrerId: number // 推荐人id
|
||||
status: string // 分佣结算核销状态
|
||||
}
|
||||
|
||||
// 分销统计 API
|
||||
export const DistributionStatisticsApi = {
|
||||
// 查询分销统计分页
|
||||
getDistributionStatisticsPage: async (params: any) => {
|
||||
return await request.get({ url: `/member/distribution-statistics/page`, params })
|
||||
},
|
||||
|
||||
// 查询分销统计详情
|
||||
getDistributionStatistics: async (id: number) => {
|
||||
return await request.get({ url: `/member/distribution-statistics/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增分销统计
|
||||
createDistributionStatistics: async (data: DistributionStatisticsVO) => {
|
||||
return await request.post({ url: `/member/distribution-statistics/create`, data })
|
||||
},
|
||||
|
||||
// 修改分销统计
|
||||
updateDistributionStatistics: async (data: DistributionStatisticsVO) => {
|
||||
return await request.put({ url: `/member/distribution-statistics/update`, data })
|
||||
},
|
||||
|
||||
// 结算分销统计
|
||||
updateAlready: async (data: DistributionStatisticsVO) => {
|
||||
return await request.put({ url: `/member/distribution-statistics/updateAlready`, data })
|
||||
},
|
||||
|
||||
// 删除分销统计
|
||||
deleteDistributionStatistics: async (id: number) => {
|
||||
return await request.delete({ url: `/member/distribution-statistics/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出分销统计 Excel
|
||||
exportDistributionStatistics: async (params) => {
|
||||
return await request.download({ url: `/member/distribution-statistics/export-excel`, params })
|
||||
},
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<el-select v-model="levelId" placeholder="请选择商品" clearable class="!w-240px">
|
||||
<el-option v-for="level in levelOptions" :key="level.id" :label="level.name" :value="level.id">
|
||||
<span class="flex items-center gap-x-8px">
|
||||
<el-avatar :src="level.picUrl" size="small" />
|
||||
{{ level.name }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// import * as ProductApi from '@/api/member/level'
|
||||
// import * as ProductApi from '@/api/erp/product/product'
|
||||
import * as ProductApi from '@/api/mall/product/spu'
|
||||
/** 会员等级选择框 **/
|
||||
defineOptions({ name: 'SkuSelect' })
|
||||
|
||||
const props = defineProps({
|
||||
/** 下拉框选中值 **/
|
||||
modelValue: {
|
||||
type: Number,
|
||||
default: undefined
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
const levelId = computed({
|
||||
get() {
|
||||
return props.modelValue
|
||||
},
|
||||
set(value: any) {
|
||||
emit('update:modelValue', value)
|
||||
}
|
||||
})
|
||||
|
||||
const levelOptions = ref<ProductApi.Spu[]>([])
|
||||
|
||||
const getList = async () => {
|
||||
levelOptions.value = await ProductApi.getSpuSimpleList()
|
||||
}
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
Loading…
Reference in New Issue