修改代理
This commit is contained in:
parent
e75b9f797a
commit
47c2ae7d42
|
|
@ -1,9 +1,10 @@
|
||||||
// 查询参数
|
// 查询参数
|
||||||
export interface searchParams {
|
export interface searchParams {
|
||||||
user_name?: string
|
user_name?: string
|
||||||
}
|
}
|
||||||
//获取代理点差配置
|
//获取代理点差配置
|
||||||
export interface pointDiffConfigParams {
|
export interface pointDiffConfigParams {
|
||||||
user_id?: number | string
|
user_id?: number | string
|
||||||
role_id?: number | string
|
role_id?: number | string
|
||||||
|
flag?: number | string
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +246,7 @@ const mapMarketTree = (data: any) => {
|
||||||
id: item.id, //id
|
id: item.id, //id
|
||||||
agentRelation: item.path_name, //代理关系
|
agentRelation: item.path_name, //代理关系
|
||||||
accountName: item.username, //账户名
|
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, //基本账户
|
basicAccount: item.wallet_capital.amount, //基本账户
|
||||||
margin: item.wallet_capital.bail, //保证金
|
margin: item.wallet_capital.bail, //保证金
|
||||||
stopOrderMargin: item.wallet_capital.bail_stop_order, //停止接单保证金
|
stopOrderMargin: item.wallet_capital.bail_stop_order, //停止接单保证金
|
||||||
|
|
@ -259,6 +259,7 @@ const mapMarketTree = (data: any) => {
|
||||||
closeProfitLoss: item.wallet_capital.closing_profit, //平仓盈亏
|
closeProfitLoss: item.wallet_capital.closing_profit, //平仓盈亏
|
||||||
riskMargin: item.wallet_capital.risk, //风险保证金
|
riskMargin: item.wallet_capital.risk, //风险保证金
|
||||||
serviceFee: item.wallet_capital.service, //服务费
|
serviceFee: item.wallet_capital.service, //服务费
|
||||||
|
flag: item.role_id * 1 === 5 ? (item.type! === 1 ? 1 : 2) : null,
|
||||||
//使用这个字段来判断是否是做市商
|
//使用这个字段来判断是否是做市商
|
||||||
roleId: item.role_id,
|
roleId: item.role_id,
|
||||||
}))
|
}))
|
||||||
|
|
@ -282,7 +283,10 @@ const handleMarketFormLinkage = async (type: 'level' | 'parentAccountName', valu
|
||||||
if (!value) return // 未选择级别,直接返回
|
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)
|
console.log('datasssssssssssss', data)
|
||||||
// 格式化下拉选项
|
// 格式化下拉选项
|
||||||
marketFormOptionsMap.value.parentAccountName = data.map((item: any) => ({
|
marketFormOptionsMap.value.parentAccountName = data.map((item: any) => ({
|
||||||
|
|
@ -591,12 +595,16 @@ const handleSubmit = async () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
marketForm.value = { ...initMarketForm }
|
marketForm.value = { ...initMarketForm }
|
||||||
} else if (dialogType.value === 'edit') {
|
} 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 = {
|
const params = {
|
||||||
user_id: selectedRow.value.id,
|
user_id: selectedRow.value.id,
|
||||||
toucun_percent: marketForm.value.positionRatio,
|
toucun_percent: marketForm.value.positionRatio,
|
||||||
point_diffs_json: JSON.stringify(pointDiffObj),
|
point_diffs_json: JSON.stringify(pointDiffObj),
|
||||||
risk_control_id: marketForm.value.riskControlTemplate,
|
risk_control_id: marketForm.value.riskControlTemplate,
|
||||||
fee_handling_percent: marketForm.value.commissionRatio,
|
fee_handling_percent: marketForm.value.commissionRatio,
|
||||||
|
flag: flag,
|
||||||
fee_setting_id: '',
|
fee_setting_id: '',
|
||||||
}
|
}
|
||||||
// 4. 调用编辑接口
|
// 4. 调用编辑接口
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue