From 47c2ae7d42974bbe2a5edbaacdd80943392c671b Mon Sep 17 00:00:00 2001 From: Songsl <2431955898@qq.com> Date: Thu, 30 Apr 2026 17:24:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types/account/market.d.ts | 9 +++++---- src/views/profile/business/index.vue | 12 ++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/api/types/account/market.d.ts b/src/api/types/account/market.d.ts index 29f915e..728ccc3 100644 --- a/src/api/types/account/market.d.ts +++ b/src/api/types/account/market.d.ts @@ -1,9 +1,10 @@ // 查询参数 export interface searchParams { - user_name?: string + user_name?: string } //获取代理点差配置 export interface pointDiffConfigParams { - user_id?: number | string - role_id?: number | string -} \ No newline at end of file + user_id?: number | string + role_id?: number | string + flag?: number | string +} diff --git a/src/views/profile/business/index.vue b/src/views/profile/business/index.vue index aa4a13e..29c4b8e 100644 --- a/src/views/profile/business/index.vue +++ b/src/views/profile/business/index.vue @@ -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. 调用编辑接口