trade: 分销业务review代码修改

This commit is contained in:
owen 2023-09-19 16:37:50 +08:00
parent 1be57ea8d3
commit 18b6c70d1a
3 changed files with 17 additions and 42 deletions

View File

@ -299,23 +299,6 @@ export const BrokerageEnabledConditionEnum = {
name: '指定分销'
}
}
/**
*
*/
export const BrokerageUserTypeEnum = {
ALL: {
type: 0,
name: '全部'
},
FIRST: {
type: 1,
name: '一级推广人'
},
SECOND: {
type: 2,
name: '二级推广人'
}
}
/**
*
*/

View File

@ -9,15 +9,11 @@
:inline="true"
label-width="85px"
>
<el-form-item label="用户类型" prop="userType">
<el-radio-group v-model="queryParams.userType" @change="handleQuery">
<el-radio-button
v-for="item in BrokerageUserTypeEnum"
:key="item.type"
:label="item.type"
>
{{ item.name }}
</el-radio-button>
<el-form-item label="用户类型" prop="level">
<el-radio-group v-model="queryParams.level" @change="handleQuery">
<el-radio-button checked>全部</el-radio-button>
<el-radio-button label="1">一级推广人</el-radio-button>
<el-radio-button label="2">二级推广人</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="状态" prop="status">
@ -98,7 +94,7 @@
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import * as BrokerageRecordApi from '@/api/mall/trade/brokerage/record'
import { BrokerageRecordBizTypeEnum, BrokerageUserTypeEnum } from '@/utils/constants'
import { BrokerageRecordBizTypeEnum } from '@/utils/constants'
import { fenToYuanFormat } from '@/utils/formatter'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
@ -115,14 +111,15 @@ const queryParams = reactive({
pageSize: 10,
userId: null,
bizType: BrokerageRecordBizTypeEnum.ORDER.type,
userType: BrokerageUserTypeEnum.ALL.type,
createTime: []
level: '',
createTime: [],
status: null
})
const queryFormRef = ref() //
/** 打开弹窗 */
const dialogVisible = ref(false) //
const open = async (userId: number) => {
const open = async (userId: any) => {
dialogVisible.value = true
queryParams.userId = userId
resetQuery()

View File

@ -9,15 +9,11 @@
:inline="true"
label-width="85px"
>
<el-form-item label="用户类型" prop="userType">
<el-radio-group v-model="queryParams.userType" @change="handleQuery">
<el-radio-button
v-for="item in BrokerageUserTypeEnum"
:key="item.type"
:label="item.type"
>
{{ item.name }}
</el-radio-button>
<el-form-item label="用户类型" prop="level">
<el-radio-group v-model="queryParams.level" @change="handleQuery">
<el-radio-button checked>全部</el-radio-button>
<el-radio-button label="1">一级推广人</el-radio-button>
<el-radio-button label="2">二级推广人</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="绑定时间" prop="bindUserTime">
@ -88,7 +84,6 @@
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import * as BrokerageUserApi from '@/api/mall/trade/brokerage/user'
import { BrokerageUserTypeEnum } from '@/utils/constants'
/** 推广人列表 */
defineOptions({ name: 'BrokerageUserListDialog' })
@ -102,14 +97,14 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
bindUserId: null,
userType: BrokerageUserTypeEnum.ALL.type,
level: '',
bindUserTime: []
})
const queryFormRef = ref() //
/** 打开弹窗 */
const dialogVisible = ref(false) //
const open = async (bindUserId: number) => {
const open = async (bindUserId: any) => {
dialogVisible.value = true
queryParams.bindUserId = bindUserId
resetQuery()