BUG修复

This commit is contained in:
Songsl 2026-04-27 20:38:32 +08:00
parent bfe93f348d
commit adcbbb6752
15 changed files with 682 additions and 583 deletions

View File

@ -10,3 +10,8 @@ export async function getWalletCapital(): Promise<any> {
return await request.get<any>('/user/getWalletCapital')
}
//重置密码
export const editAccountPass = (params: any) => {
return request.post('/user/editAccountPass', { ...params })
}

View File

@ -42,7 +42,7 @@ const userInfo = getStorage<any>('userInfo')
const activeUserName = ref(userInfo?.username || '')
const activeItem = ref('currentUser')
const dropdownItems = [
{ label: '切换账户', command: 'account' },
// { label: '', command: 'account' },
{ label: '修改密码', command: 'password' },
{ label: '退出登录', command: 'logout' }
]

View File

@ -1,20 +1,39 @@
<template>
<div>
<!-- 搜索 -->
<CustomerListSearch :search-form="searchForm" :search-options="searchOptions" @search="handleSearch"
@reset="handleReset"></CustomerListSearch>
<CustomerListSearch
:search-form="searchForm"
:search-options="searchOptions"
@search="handleSearch"
@reset="handleReset"
></CustomerListSearch>
<!-- 表格 -->
<CustomerListTable :table-data="tableTree" :columns="tableColumnsOptions" row-key="userId"
:tree-props="treeProps" :default-sort="{ prop: 'createTime', order: 'descending' }"
@expand-change="handleGetSubList">
<CustomerListTable
:table-data="tableTree"
:columns="tableColumnsOptions"
row-key="userId"
:tree-props="treeProps"
:default-sort="{ prop: 'createTime', order: 'descending' }"
@expand-change="handleGetSubList"
>
<template #marginRatio="{ row }">
<el-button v-if="row.role_id === 5" type="primary" size="small" @click="handleMarginRatio(row)">
<el-button
v-if="row.role_id === 5"
type="primary"
size="small"
@click="handleMarginRatio(row)"
>
修改
</el-button>
</template>
<template #commissionRatio="{ row }">
{{ row.commissionRatio }}
<el-button v-if="row.role_id === 5" type="primary" size="small" @click="handleCommissionRatio(row)">
<el-button
v-if="row.role_id === 5"
type="primary"
size="small"
@click="handleCommissionRatio(row)"
>
修改
</el-button>
</template>
@ -25,25 +44,49 @@
</template>
</CustomerListTable>
<!-- 分页 -->
<CustomerListPagination v-model="currentPage" v-model:pageSizeValue="pageSize" :total="total"
@pagination-change="handlePaginationChange" />
<CustomerListPagination
v-model="currentPage"
v-model:pageSizeValue="pageSize"
:total="total"
@pagination-change="handlePaginationChange"
/>
<!-- dialog -->
<CustomerListDialog :visible="dialogVisible" :title="dialogTitle" :type="dialogType"
:fullscreen="dialogFullscreen" :show-footer="dialogType !== 'view'" @confirm="handleSubmit"
@cancel="handleCancel" @close="handleClose">
<CustomerListTable :table-data="marginRatioTree" :columns="marginRatioTableColumnsOptions" row-key="id"
v-if="dialogType === 'editMarginRatio'">
<CustomerListDialog
:visible="dialogVisible"
:title="dialogTitle"
:type="dialogType"
:fullscreen="dialogFullscreen"
:show-footer="dialogType !== 'view'"
@confirm="handleSubmit"
@cancel="handleCancel"
@close="handleClose"
>
<CustomerListTable
:table-data="marginRatioTree"
:columns="marginRatioTableColumnsOptions"
row-key="id"
v-if="dialogType === 'editMarginRatio'"
style="height: 600px"
>
<template #assignedPointDiff="{ row }">
<el-form :model="row" :rules="marginRatioRules(row)" :ref="el => setFormRef(el, row.id)">
<el-form-item prop="assignedPointDifference">
<el-input v-model="row.assignedPointDifference" size="small" placeholder="请输入点差" />
<el-form
:model="row"
:rules="marginRatioRules(row)"
:ref="(el) => setFormRef(el, row.id)"
>
<el-form-item style="margin-bottom: 0" prop="assignedPointDifference">
<el-input v-model="row.assignedPointDifference" placeholder="请输入点差" />
</el-form-item>
</el-form>
</template>
</CustomerListTable>
<CustomerListForm :form-data="commissionRatioForm" :form-rules="commissionRatioFormRules"
:form-items="commissionRatioFormItemOptions" ref="commissionRatioFormRef"
v-if="dialogType === 'editCommissionRatio'"></CustomerListForm>
<CustomerListForm
:form-data="commissionRatioForm"
:form-rules="commissionRatioFormRules"
:form-items="commissionRatioFormItemOptions"
ref="commissionRatioFormRef"
v-if="dialogType === 'editCommissionRatio'"
></CustomerListForm>
</CustomerListDialog>
<!-- dialog表格 -->
</div>
@ -60,7 +103,11 @@ import CustomerListForm from '@/components/common/Form.vue'
import { search, tableColumns, marginRatioTableColumns, commissionRatioFormItem } from './options'
//
import { getCustomerListApi, getSelfVarietyPointDiffConfigApi, editCustomerApi } from '@/api/modules/agent/customerList'
import {
getCustomerListApi,
getSelfVarietyPointDiffConfigApi,
editCustomerApi,
} from '@/api/modules/agent/customerList'
//
import { getStorage } from '@/utils/storage'
@ -71,7 +118,6 @@ const router = useRouter()
const userInfo: any = getStorage('userInfo')
const userId = ref(userInfo?.id || '')
/**
* @description: 定义搜索数据
*/
@ -122,7 +168,11 @@ const marginRatioRules = (row: any) => {
return {
assignedPointDifference: [
{ required: true, message: '请输入数字', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可带小数)', trigger: ['blur', 'change'] },
{
pattern: /^\d+(\.\d+)?$/,
message: '只能输入数字(可带小数)',
trigger: ['blur', 'change'],
},
{
validator: (rule: any, value: any, callback: any) => {
const inputVal = Number(value || 0)
@ -134,15 +184,12 @@ const marginRatioRules = (row: any) => {
callback()
}
},
trigger: ['blur', 'change']
}
]
trigger: ['blur', 'change'],
},
],
}
}
/**
* @description: 定义手续费form数据
*/
@ -154,7 +201,7 @@ const commissionRatioFormRules = {
commissionRatio: [
{ required: true, message: '请输入手续费分成比例', trigger: ['blur', 'change'] },
{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可带小数)', trigger: ['blur', 'change'] },
]
],
}
const commissionRatioFormItemOptions = ref(commissionRatioFormItem)
const selectId = ref('')
@ -168,10 +215,9 @@ const roleMap: any = {
3: '特殊做市商',
4: '普通做市商',
5: '代理',
6: '用户'
6: '用户',
}
/**
* @description: 定义公共请求数据方法
*/
@ -182,8 +228,14 @@ const getCustomerList = async (id: string) => {
page: currentPage.value,
page_size: pageSize.value,
user_name: searchForm.value.accountName,
reg_start_time: searchForm.value.startTime.length > 0 ? `${searchForm.value.startTime} 0:00:00` : '2026-01-01 0:00:00',
reg_end_time: searchForm.value.endTime.length > 0 ? `${searchForm.value.endTime} 23:59:59` : '2026-03-01 23:59:59',
reg_start_time:
searchForm.value.startTime.length > 0
? `${searchForm.value.startTime} 0:00:00`
: '2026-01-01 0:00:00',
reg_end_time:
searchForm.value.endTime.length > 0
? `${searchForm.value.endTime} 23:59:59`
: '2026-03-01 23:59:59',
status: searchForm.value.status,
}
const data: any = await getCustomerListApi(params)
@ -197,11 +249,16 @@ const getCustomerList = async (id: string) => {
commissionRatio: item.wallet_capital.fee_handling_percent,
createTime: item.created_at,
role_id: item.role_id,
children: item.role_id === 5 ? [{
children:
item.role_id === 5
? [
{
hasChildren: true,
}] : undefined,
},
]
: undefined,
}))
console.log('tableTree', tableTree.value)
//
total.value = data.total
currentPage.value = data.current_page
@ -214,13 +271,16 @@ const getSelfVarietyPointDiffConfig = async (id: string) => {
user_id: id,
}
const data: any = await getSelfVarietyPointDiffConfigApi(params)
marginRatioTree.value = data.data.map((item: any) => ({
marginRatioTree.value = data.map((item: any) => {
return {
id: item.id,
varietyName: item.name,
varietyCode: item.code,
pointDifference: item.point_diff,
assignedPointDifference: item.target_point_diff
}))
assignedPointDifference: item.target_point_diff,
}
})
console.log('marginRatioTree', marginRatioTree.value)
}
/**
@ -250,14 +310,14 @@ const handleReset = () => {
* @description: 定义表格方法
*/
const handleDetail = (row: any) => {
console.log('查看详情', row);
console.log('查看详情', row)
router.push(`/agent/customerDetail/${row.userId}`)
}
//
const handleMarginRatio = (row: any) => {
getSelfVarietyPointDiffConfig(row.userId)
console.log('修改点差', row);
console.log('修改点差', row)
dialogVisible.value = true
dialogTitle.value = '修改点差'
dialogType.value = 'editMarginRatio'
@ -266,7 +326,7 @@ const handleMarginRatio = (row: any) => {
//
const handleCommissionRatio = (row: any) => {
console.log('修改手续费比例', row);
console.log('修改手续费比例', row)
dialogVisible.value = true
dialogTitle.value = '修改手续费'
dialogType.value = 'editCommissionRatio'
@ -302,16 +362,21 @@ const handleGetSubList = async (row: any) => {
commissionRatio: item.wallet_capital.fee_handling_percent,
createTime: item.created_at,
role_id: item.role_id,
children: item.role_id === 5 ? [{
children:
item.role_id === 5
? [
{
hasChildren: true,
}] : undefined,
},
]
: undefined,
}))
}
/**
* @description: 定义分页方法
*/
const handlePaginationChange = (page: { currentPage: number, size: number }) => {
const handlePaginationChange = (page: { currentPage: number; size: number }) => {
currentPage.value = page.currentPage
getCustomerList(userId.value)
}
@ -358,7 +423,10 @@ const handleSubmit = async () => {
if (dialogType.value === 'editCommissionRatio') {
await commissionRatioFormRef.value.validate()
try {
await editCustomerApi({ ...params, fee_handling_percent: commissionRatioForm.value.commissionRatio })
await editCustomerApi({
...params,
fee_handling_percent: commissionRatioForm.value.commissionRatio,
})
dialogVisible.value = false
} catch (err) {
console.log('提交失败:', err)

View File

@ -45,7 +45,12 @@ export const marginRatioTableColumns = [
// 可分配点差
{ prop: 'pointDifference', label: '可分配点差', align: 'center' as const },
// 已分配点差
{ prop: 'assignedPointDifference', label: '已分配点差', align: 'center' as const, slotName: 'assignedPointDiff' },
{
prop: 'assignedPointDifference',
label: '已分配点差',
align: 'center' as const,
slotName: 'assignedPointDiff',
},
]
// 手续费分成比例form配置

View File

@ -7,21 +7,21 @@
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>实名认证</span>
<router-link to="/profile/kyc">实名认证</router-link>
</div>
<div class="line"></div>
<div class="item">
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>存款</span>
<router-link to="/capital/rechange">存款</router-link>
</div>
<div class="line"></div>
<div class="item">
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>交易</span>
<router-link to="/trade/exe">交易</router-link>
</div>
</div>
</el-card>
@ -32,19 +32,19 @@
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>存款</span>
<router-link to="/capital/rechange">存款</router-link>
</router-link>
<router-link to="" class="item">
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>取款</span>
<router-link to="/capital/withdraw">取款</router-link>
</router-link>
<router-link to="" class="item">
<el-icon color="#409eff">
<CircleCheckFilled />
</el-icon>
<span>交易</span>
<router-link to="/trade/exe">交易</router-link>
</router-link>
</div>
</el-card>
@ -53,9 +53,9 @@
<el-popover placement="right" trigger="hover" class="wallet-popover">
<div class="link">
<router-link to="" class="item">转账</router-link>
<router-link to="" class="item">取款</router-link>
<router-link to="" class="item">资金明细</router-link>
<router-link to="/capital/transfer" class="item">转账</router-link>
<router-link to="/capital/withdraw" class="item">取款</router-link>
<router-link to="/capital/fundFlow" class="item">资金明细</router-link>
</div>
<template #reference>
<div class="wallet">
@ -102,30 +102,28 @@
<div class="account-list">
<div class="list" v-for="item in accountList" :key="item.id">
<div class="item item-setting">
<div class="setting-content" v-if="!isEdit">
<div class="setting-content" v-if="isEdit !== item.account_id">
<span>账户名称:</span>
<span>{{ accountName }}</span>
<span>{{ item.account_name }}</span>
</div>
<div class="setting-content" v-else>
<span class="setting-label">账户名称:</span>
<span v-if="!isEdit">{{ accountName }}</span>
<el-input
v-model="editName"
@blur="handleSave"
@keyup.enter="handleSave"
ref="inputRef"
size="small"
v-else
/>
</div>
<div class="setting-group">
<span>
<el-icon @click="handleEdit">
<el-icon @click="handleEdit(item.account_name, item.account_id)">
<EditPen />
</el-icon>
</span>
<span>
<el-icon @click="handleSetting">
<el-icon @click="handleSetting(item.account_id)">
<Setting />
</el-icon>
</span>
@ -229,7 +227,7 @@ import {
resetPasswordApi,
leverageLeverApi,
} from '@/api/modules/agent'
import { getAllAccount, getWalletCapital } from '@/api/modules/dashboard.ts'
import { getAllAccount, getWalletCapital, editAccountPass } from '@/api/modules/dashboard.ts'
//
import { getStorage, setStorage } from '@/utils/storage'
@ -246,7 +244,7 @@ const dialogType = ref('add')
const accountList = ref([])
const getAccoundList = async () => {
const res = await getAllAccount({ username: userStore.userInfo.username })
const res = await getAllAccount({ username: '' })
console.log(res)
accountList.value = res
}
@ -292,8 +290,8 @@ const colSpan = ref(12)
//
const userInfo = getStorage<any>('userInfo')
const accountName = ref(userInfo?.username || '')
const editName = ref(accountName.value)
const isEdit = ref(false)
const editName = ref('')
const isEdit = ref('')
const inputRef = ref<HTMLInputElement>()
/*
@ -349,24 +347,26 @@ const handleSubmit = async () => {
}
if (dialogType.value === 'add') {
await createAgentApi(params)
await getAccoundList()
dialogVisible.value = false
} else if (dialogType.value === 'setting') {
const params = {
reg_type: userInfo?.reg_type || '',
login_password1: subAccountForm.value.resetPassword,
login_password2: subAccountForm.value.confirmPassword,
email: userInfo?.email || '',
mobile: userInfo?.mobile || '',
code: '123456',
account_id: account_id || '',
user_password: subAccountForm.value.resetPassword,
account_password: subAccountForm.value.confirmPassword,
}
await resetPasswordApi(params)
await editAccountPass(params)
await getAccoundList()
subAccountForm.value.resetPassword = ''
subAccountForm.value.confirmPassword = ''
dialogVisible.value = false
} else if (dialogType.value === 'leverage') {
const params = {
account_id: userInfo?.id || '',
account_id: account_id || '',
lever: subAccountForm.value.leverage,
}
await leverageLeverApi(params)
await getAccoundList()
dialogVisible.value = false
}
}
@ -382,36 +382,34 @@ const handleCancel = () => {
*/
//
const handleEdit = async () => {
isEdit.value = true
// DOM
await nextTick()
inputRef.value?.focus()
let account_id = ''
const handleEdit = async (name: string, id: string) => {
if (isEdit.value) return (isEdit.value = '')
isEdit.value = id
editName.value = name
account_id = id
}
//
const handleSave = async () => {
if (editName.value.trim()) {
if (account_id === '') return ElMessage.error('请先选择账户')
if (editName.value === '') return ElMessage.error('请输入账号')
editName.value.trim()
await editAgentNameApi({
account_id: userInfo?.id || '',
account_name: accountName.value,
account_id: account_id,
account_name: editName.value,
})
accountName.value = editName.value.trim()
setStorage('userInfo', {
...userInfo,
username: accountName.value,
})
} else {
editName.value = accountName.value //
}
await getAccoundList()
isEdit.value = false
}
/**
* @description: 设置方法
*/
const handleSetting = () => {
const handleSetting = (id: string) => {
dialogVisible.value = true
account_id = id
dialogTitle.value = '编辑账号'
dialogType.value = 'setting'
}

View File

@ -5,8 +5,18 @@ export const formItem = [
//重置密码formItem
export const resetPasswordFormItem = [
{label: '密码',prop: 'resetPassword',type: 'password' as const,placeholder: '请输入密码',},
{label: '确认密码',prop: 'confirmPassword',type: 'password' as const,placeholder: '请确认密码',},
{
label: '登录密码',
prop: 'resetPassword',
type: 'password' as const,
placeholder: '请输入登录密码',
},
{
label: '新密码',
prop: 'confirmPassword',
type: 'password' as const,
placeholder: '请确认新密码',
},
]
//修改杠杆formItem

View File

@ -9,14 +9,7 @@ export const rules = (subAccountForm: any): FormRules => {
{ required: true, message: '请选择杠杆比例', trigger: ['change'] }
],
confirmPassword: [
{ required: true, message: '请确认密码', trigger: ['blur'] },
{ validator: (rule: any, value: string, callback: any) => {
if (value !== subAccountForm.resetPassword) {
callback(new Error('两次密码不一致'))
} else {
callback()
}
}, trigger: ['blur'] }
{ required: true, message: '请确认密码', trigger: ['blur'] }
]
}
}

View File

@ -8,37 +8,45 @@
</div>
<!-- 表格 -->
<div class="risk-table-content">
<RiskTableSwitch :columns="tableColumnsSwitch" :table-data="tableTreeSwitch" class="table-switch"
@row-click="handleRowClick" row-key="id" highlight-current-row :current-row-key="selectedRowId">
<RiskTableSwitch
:columns="tableColumnsSwitch"
:table-data="tableTreeSwitch"
class="table-switch"
@row-click="handleRowClick"
row-key="id"
highlight-current-row
:current-row-key="selectedRowId"
>
<template #status="{ row }">
<span>{{ row.status === 1 ? '启用' : '停用' }}</span>
</template>
</RiskTableSwitch>
<RiskTableContent :columns="tableColumnsContent" :table-data="[currentContent]" class="table-content"
row-key="id">
<template #contentName="{ row }">
<div class="risk-content-group">
<span>单笔开仓最大数量:{{ row.maxOpenPosition }}</span>
<span>单品种最大持仓数量:{{ row.maxPositionPerSymbol }}</span>
<span>总品种最大持仓数量:{{ row.maxTotalPosition }}</span>
<span>强平比例:{{ row.strongCloseRatio }}</span>
<span>每次出金最大金额:{{ row.maxWithdrawalAmount }}</span>
<span>是否允许出金:{{ row.isWithdrawalAllowed }}</span>
<span>出金时间设置:{{ row.withdrawalTimeSetting }}</span>
<span>是否需要出金审核:{{ row.isWithdrawalAuditRequired }}</span>
<span>建仓多少秒不能平仓:{{ row.buildCloseTime }}</span>
<span>每次出金最小金额:{{ row.minWithdrawalAmount }}</span>
<span>滑点:{{ row.slippage }}</span>
<span>每次入金最小金额:{{ row.minDepositAmount }}</span>
</div>
</template>
<RiskTableContent
:columns="tableColumnsContent"
:table-data="currentContent"
class="table-content"
row-key="id"
>
</RiskTableContent>
</div>
<!-- dialog -->
<RiskDialog :visible="dialogVisible" :title="dialogTitle" :type="dialogType" @confirm="handleSubmit"
@cancel="handleCancel" @close="handleClose">
<RiskForm :form-data="dialogForm" :form-rules="riskRules" :form-items="RiskFormItems"
:options-map="riskFormOptionsMap" :row-gutter="rowGutter" :col-span="colSpan" ref="riskFormRef" />
<RiskDialog
:visible="dialogVisible"
:title="dialogTitle"
:type="dialogType"
@confirm="handleSubmit"
@cancel="handleCancel"
@close="handleClose"
>
<RiskForm
:form-data="dialogForm"
:form-rules="riskRules"
:form-items="RiskFormItems"
:options-map="riskFormOptionsMap"
:row-gutter="rowGutter"
:col-span="colSpan"
ref="riskFormRef"
/>
</RiskDialog>
</div>
</template>
@ -70,7 +78,7 @@ const riskOriginData = ref<any[]>([])
//
const selectedRow = ref<any>({})
//
const currentContent = ref<any>({})
const currentContent = ref<any>([])
/**
* @description: 定义弹窗数据
@ -247,7 +255,7 @@ const handleRiskStatus = async () => {
*/
const handleRowClick = (row: any) => {
//
const originRow = riskOriginData.value.find(item => item.id === row.id)
const originRow = riskOriginData.value.find((item) => item.id === row.id)
if (originRow) {
selectedRow.value = originRow //
} else {
@ -256,8 +264,24 @@ const handleRowClick = (row: any) => {
selectedRowId.value = row.id
//
const targetItem = tableTreeContent.value.find((item: any) => item.id === row.id)
const fields = [
{ text: '单笔开仓最大数量' + targetItem.maxOpenPosition },
{ text: '单品种最大持仓数量' + targetItem.maxPositionPerSymbol },
{ text: '总品种最大持仓数量' + targetItem.maxTotalPosition },
{ text: '强平比例' + targetItem.strongCloseRatio },
{ text: '每次出金最大金额' + targetItem.maxWithdrawalAmount },
{ text: '是否允许出金' + targetItem.isWithdrawalAllowed },
{ text: '出金时间设置' + targetItem.withdrawalTimeSetting },
{ text: '是否需要出金审核' + targetItem.isWithdrawalAuditRequired },
{ text: '建仓多少秒不能平仓' + targetItem.buildCloseTime },
{ text: '每次出金最小金额' + targetItem.minWithdrawalAmount },
{ text: '滑点' + targetItem.slippage },
{ text: '每次入金最小金额' + targetItem.minDepositAmount },
]
if (targetItem) {
currentContent.value = targetItem
currentContent.value = fields
}
}
@ -304,8 +328,7 @@ const handleSubmit = async () => {
dialogVisible.value = false
dialogTitle.value = '添加'
dialogType.value = 'add'
}
else {
} else {
//
await editRiskApi({ ...params, id: selectedRow.value.id })
getRiskList()
@ -322,7 +345,6 @@ const handleClose = () => {
}
</script>
<style scoped>
.risk {
.bar {

View File

@ -12,8 +12,8 @@ export const tableColumnsSwitch = [
]
export const tableColumnsContent = [
// 内容
{label: '内容', prop: 'content', align: 'center' as const,slotName: 'contentName'},
]
{ label: '内容', prop: 'text', align: 'center' as const },
]
export const formItem = [
// 名称
{label: '名称', prop: 'name', type: 'input' as const, placeholder: '请输入名称',labelWidth: '150px'},

View File

@ -238,8 +238,8 @@ const getCustomerList = async () => {
userId: item.id,
status: item.status === 1 ? '正常' : '禁用',
role: item.role.title || '未知',
accountQty: item.son_user[0].son_user_count,
commissionRatio: item.wallet_capital.fee_handling_percent,
accountQty: item.son_user[0]?.son_user_count,
commissionRatio: item?.wallet_capital?.fee_handling_percent,
createTime: item.created_at,
role_id: item.role_id,
}))

View File

@ -10,9 +10,6 @@
<div class="tab-item">
<el-button :type="tabType === 'identity' ? 'primary' : 'default'" @click="tabType = 'identity'">身份信息</el-button>
</div>
<div class="tab-item">
<el-button :type="tabType === 'contact' ? 'primary' : 'default'" @click="tabType = 'contact'">联系信息</el-button>
</div>
</div>
<article>
<p class="warn">

View File

@ -1,14 +1,15 @@
export const identityFormItems = [
// 国籍
{ prop: 'nationality', label: '国籍', type: 'select' as const ,width: "200px"},
// 证件类型
{ prop: 'idType', label: '证件类型', type: 'select' as const ,width: "200px"},
// 上传证件
{ prop: 'idCard', slotName: 'upload', label: '上传证件' ,type: 'upload' as const},
]
export const contactFormItems = [
// 联系电话
{ prop: 'phone', label: '联系电话', type: 'input' as const ,width: "200px"},
{ prop: 'phone', label: '联系电话', type: 'input' as const, width: '200px' },
// 国籍
{ prop: 'nationality', label: '国籍', type: 'select' as const, width: '200px' },
// 证件类型
{ prop: 'idType', label: '证件类型', type: 'select' as const, width: '200px' },
// 上传证件
{ prop: 'idCard', slotName: 'upload', label: '上传证件', type: 'upload' as const },
]
export const contactFormItems = [
]

View File

@ -13,7 +13,7 @@
<!-- 表格组件 -->
<ClientTable :table-data="clientTree" :columns="clientTableColumns">
<template #status="{ row }">
<el-switch :model-value="row.status === 1" :active-value="true" :inactive-value="false" />
{{row.status === 1 ? '正常' : '禁用'}}
</template>
<template #action="{ row }">
<el-button type="primary" size="small" @click="handleChange(row)">
@ -287,7 +287,7 @@ const handleChange = (row: any) => {
riskTemplate: row.wallet_capital.risk_control_id,
userName: row.username,
status: row.status,
isUpgrade: 1,
isUpgrade: 2,
} as any
console.log('rowrowrowrowrowrowrowrowrow', clientForm.value)
getOptions()

View File

@ -21,14 +21,10 @@
@row-click="handleRowClick"
>
<template #onlineStatus="{ row }">
<el-switch
:model-value="row.onlineStatus === 1"
:active-value="true"
:inactive-value="false"
/>
{{ ['', '上线', '下线'][row.onlineStatus] }}
</template>
<template #tradeStatus="{ row }">
<el-switch :model-value="row.status === 1" :active-value="true" :inactive-value="false" />
{{ ['', '开启', '禁用'][row.tradeStatus] }}
</template>
</VarietyTable>
</div>
@ -296,6 +292,8 @@ const handleEdit = () => {
pointDecimalPlaces: row.point_diff_decimal_place,
imageUrl: row.image,
feeInventoryTime: row.fee_inventory_time,
tradeStatus: row.status,
onlineStatus: row.online_status,
//
isDefault: row.is_default,
} as any

View File

@ -276,8 +276,10 @@ const handleForgotPassword = async () => {
email: forgotPasswordForm.value.email,
reg_type: getForgotType === 'email' ? 1 : 2,
code: forgotPasswordForm.value.code,
login_password1: md5Encrypt(forgotPasswordForm.value.password),
login_password2: md5Encrypt(forgotPasswordForm.value.confirmPassword),
// login_password1: md5Encrypt(forgotPasswordForm.value.password),
// login_password2: md5Encrypt(forgotPasswordForm.value.confirmPassword),
login_password1: forgotPasswordForm.value.password,
login_password2: forgotPasswordForm.value.confirmPassword,
}
//