修改代理

This commit is contained in:
Songsl 2026-04-30 17:24:07 +08:00
parent e75b9f797a
commit 47c2ae7d42
2 changed files with 15 additions and 6 deletions

View File

@ -1,9 +1,10 @@
// 查询参数
export interface searchParams {
user_name?: string
user_name?: string
}
//获取代理点差配置
export interface pointDiffConfigParams {
user_id?: number | string
role_id?: number | string
}
user_id?: number | string
role_id?: number | string
flag?: number | string
}

View File

@ -246,7 +246,7 @@ const mapMarketTree = (data: any) => {
id: item.id, //id
agentRelation: item.path_name, //
accountName: item.username, //
level: item.role_id, //
level: item.role_id * 1 === 5 && item.type * 1 === 2 ? 6 : item.role_id, //
basicAccount: item.wallet_capital.amount, //
margin: item.wallet_capital.bail, //
stopOrderMargin: item.wallet_capital.bail_stop_order, //
@ -259,6 +259,7 @@ const mapMarketTree = (data: any) => {
closeProfitLoss: item.wallet_capital.closing_profit, //
riskMargin: item.wallet_capital.risk, //
serviceFee: item.wallet_capital.service, //
flag: item.role_id * 1 === 5 ? (item.type! === 1 ? 1 : 2) : null,
//使
roleId: item.role_id,
}))
@ -282,7 +283,10 @@ const handleMarketFormLinkage = async (type: 'level' | 'parentAccountName', valu
if (!value) return //
//
const data = await getParAgentListApi({ role_id: value })
let flag = null
if (selectedRow.value.role_id * 1 === 5 && selectedRow.value.type * 1 === 1) flag = 1
if (selectedRow.value.role_id * 1 === 6 && selectedRow.value.type * 1 === 2) flag = 2
const data = await getParAgentListApi({ role_id: value, flag: flag })
console.log('datasssssssssssss', data)
//
marketFormOptionsMap.value.parentAccountName = data.map((item: any) => ({
@ -591,12 +595,16 @@ const handleSubmit = async () => {
dialogVisible.value = false
marketForm.value = { ...initMarketForm }
} else if (dialogType.value === 'edit') {
let flag = null
if (selectedRow.value.role_id * 1 === 5 && selectedRow.value.type * 1 === 1) flag = 1
if (selectedRow.value.role_id * 1 === 6 && selectedRow.value.type * 1 === 2) flag = 2
const params = {
user_id: selectedRow.value.id,
toucun_percent: marketForm.value.positionRatio,
point_diffs_json: JSON.stringify(pointDiffObj),
risk_control_id: marketForm.value.riskControlTemplate,
fee_handling_percent: marketForm.value.commissionRatio,
flag: flag,
fee_setting_id: '',
}
// 4.