From 630d01599f08f5ce04020c2b8abaae81b96d148c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8?= Date: Tue, 16 Jun 2026 14:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/agent/user/options.ts | 34 +++++++++---------- src/views/mould/risk/index.vue | 6 ++-- src/views/mould/risk/options.ts | 2 +- src/views/profile/agent/index.vue | 5 +-- src/views/profile/agent/options.ts | 51 +++++++++++++++++----------- src/views/profile/business/index.vue | 3 ++ 6 files changed, 58 insertions(+), 43 deletions(-) diff --git a/src/views/agent/user/options.ts b/src/views/agent/user/options.ts index 7016f18..4ec7b92 100644 --- a/src/views/agent/user/options.ts +++ b/src/views/agent/user/options.ts @@ -12,23 +12,23 @@ export const search = [ valueFormat: 'YYYY-MM-DD', }, // 状态 - // { - // prop: 'status', - // label: '状态', - // type: 'select' as const, - // options: [ - // { - // label: '正常', - // value: '1' - // }, - // { - // label: '封禁', - // value: '2' - // }, - // ], - // placeholder: '请选择状态', - // width: '100px' - // }, + { + prop: 'status', + label: '状态', + type: 'select' as const, + options: [ + { + label: '正常', + value: '1' + }, + { + label: '封禁', + value: '2' + }, + ], + placeholder: '请选择状态', + width: '100px' + }, ] export const tableColumns = [ diff --git a/src/views/mould/risk/index.vue b/src/views/mould/risk/index.vue index 1c14efd..c0e045a 100644 --- a/src/views/mould/risk/index.vue +++ b/src/views/mould/risk/index.vue @@ -168,7 +168,7 @@ const getRiskList = async () => { // 出金时间设置 withdrawalTimeSetting: item.withdraw_time, // 是否需要出金审核 - isWithdrawalAuditRequired: item.withdraw_is_check === 1 ? '是' : '否', + // isWithdrawalAuditRequired: item.withdraw_is_check === 1 ? '是' : '否', // 建仓多少秒不能平仓 buildCloseTime: item.open_close_time, // 每次出金最小金额 @@ -283,7 +283,7 @@ const handleRowClick = (row: any) => { { text: '每次出金最大金额' + targetItem.maxWithdrawalAmount }, { text: '是否允许出金' + targetItem.isWithdrawalAllowed }, { text: '出金时间设置' + targetItem.withdrawalTimeSetting }, - { text: '是否需要出金审核' + targetItem.isWithdrawalAuditRequired }, + // { text: '是否需要出金审核' + targetItem.isWithdrawalAuditRequired }, { text: '建仓多少秒不能平仓' + targetItem.buildCloseTime }, { text: '每次出金最小金额' + targetItem.minWithdrawalAmount }, { text: '滑点' + targetItem.slippage }, @@ -324,7 +324,7 @@ const handleSubmit = async () => { // 出金时间设置 withdraw_time: Array.from(dialogForm.value.withdrawalTimeSetting || []).join('-'), // 是否需要出金审核 - withdraw_is_check: dialogForm.value.isWithdrawalAuditRequired, + // withdraw_is_check: dialogForm.value.isWithdrawalAuditRequired, // 建仓多少秒不能平仓 open_close_time: dialogForm.value.buildCloseTime, // 每次出金最小金额 diff --git a/src/views/mould/risk/options.ts b/src/views/mould/risk/options.ts index 08eb26f..5bc965a 100644 --- a/src/views/mould/risk/options.ts +++ b/src/views/mould/risk/options.ts @@ -24,7 +24,7 @@ export const formItem = [ // 是否允许出金 {label: '是否允许出金', prop: 'isWithdrawalAllowed', type: 'radio' as const,labelWidth: '150px'}, // 是否需要出金审核 - {label: '是否需要出金审核', prop: 'isWithdrawalAuditRequired', type: 'radio' as const ,labelWidth: '150px'}, + // {label: '是否需要出金审核', prop: 'isWithdrawalAuditRequired', type: 'radio' as const ,labelWidth: '150px'}, // 单笔开仓最大数量 {label: '单笔开仓最大数量', prop: 'maxOpenPosition', type: 'input' as const, placeholder: '请输入单笔开仓最大数量',labelWidth: '150px'}, // 单品种最大持仓数量 diff --git a/src/views/profile/agent/index.vue b/src/views/profile/agent/index.vue index 9f52018..7e427a5 100644 --- a/src/views/profile/agent/index.vue +++ b/src/views/profile/agent/index.vue @@ -330,7 +330,7 @@ const getCustomerList = async () => { accountName: item.username, amount: item.wallet_capital.amount, userId: item.id, - status: item.status === 1 ? '正常' : '禁用', + statusName: item.status === 1 ? '正常' : '禁用', role: item.role.title || '未知', accountQty: item.son_user[0]?.son_user_count, commissionRatio: item?.wallet_capital?.fee_handling_percent, @@ -495,7 +495,7 @@ const handleSubmit = async () => { // 调用接口 try { - await editCustomerApi({ ...params, point_diffs_json: JSON.stringify(marginRatioJSON) }) + await editCustomerApi({ ...params, point_diffs_json: JSON.stringify(marginRatioJSON),base_ts:null }) dialogVisible.value = false } catch (err) { console.log('提交失败:', err) @@ -507,6 +507,7 @@ const handleSubmit = async () => { await editCustomerApi({ ...params, fee_handling_percent: commissionRatioForm.value.commissionRatio, + base_ts:null }) dialogVisible.value = false await getCustomerList() diff --git a/src/views/profile/agent/options.ts b/src/views/profile/agent/options.ts index 16167b2..926c6a2 100644 --- a/src/views/profile/agent/options.ts +++ b/src/views/profile/agent/options.ts @@ -27,46 +27,57 @@ export const search = [ valueFormat: 'YYYY-MM-DD', width: '280px', }, + { + prop: 'status', + label: '状态', + type: 'select' as const, + placeholder: '选择状态', + width: '80px', + options: [ + { label: '正常', value: 1 }, + { label: '封禁', value: 2 } + ], + } ] export const tableColumns = [ // 账号名称 - { label: '账号名称', prop: 'accountName' , width: '160' }, + { label: '账号名称', prop: 'accountName', width: '160', align: 'center' as const }, { label: '邮箱', prop: 'email', align: 'center' as const, width: '160px' }, { label: '手机号', prop: 'mobile', align: 'center' as const, width: '180' }, // 账号id - { prop: 'userId', label: '账号id', width: '220' }, + { prop: 'userId', label: '账号id', width: '220', align: 'center' as const }, // 状态 - { prop: 'status', label: '状态' }, + { prop: 'statusName', label: '状态', align: 'center' as const }, // 账号角色 - { prop: 'role', label: '账号角色' , width: '100' }, + { prop: 'role', label: '账号角色', width: '100', align: 'center' as const }, // 账号数量 - { prop: 'accountQty', label: '账号数量' , width: '120' }, - { prop: 'amount', label: '资金', align: 'center' as const, isNumber: true }, + { prop: 'accountQty', label: '账号数量', width: '120', align: 'center' as const }, + { prop: 'amount', label: '资金', align: 'center' as const, isNumber: true, width: '120' }, // 点差分配比例 - { prop: 'marginRatio', label: '点差分配比例', slotName: 'marginRatio' , width: '140' }, + { prop: 'marginRatio', label: '点差分配比例', slotName: 'marginRatio', width: '140', align: 'center' as const }, // 手续费分成比例 - { prop: 'commissionRatio', label: '手续费分成比例', slotName: 'commissionRatio' , width: '140' }, + { prop: 'commissionRatio', label: '手续费分成比例', slotName: 'commissionRatio', width: '140', align: 'center' as const }, // 注册时间 - { prop: 'createTime', label: '注册时间', sortable: false, width: '240' }, + { prop: 'createTime', label: '注册时间', sortable: false, width: '240', align: 'center' as const }, // 操作 - { label: '操作', slotName: 'action', width: '220', fixed: 'right' as const} + { label: '操作', slotName: 'action', width: '220', fixed: 'right' as const } ] // 点差表格配置 export const marginRatioTableColumns = [ - // 品种名称 - { prop: 'varietyName', label: '名称', align: 'center' as const }, - // 品种编号 - { prop: 'varietyCode', label: '编号', align: 'center' as const }, - // 可分配点差 - { prop: 'pointDifference', label: '可分配点差', align: 'center' as const }, - // 已分配点差 - { prop: 'assignedPointDifference', label: '已分配点差', align: 'center' as const, slotName: 'assignedPointDiff' }, + // 品种名称 + { prop: 'varietyName', label: '名称', align: 'center' as const }, + // 品种编号 + { prop: 'varietyCode', label: '编号', align: 'center' as const }, + // 可分配点差 + { prop: 'pointDifference', label: '可分配点差', align: 'center' as const }, + // 已分配点差 + { prop: 'assignedPointDifference', label: '已分配点差', align: 'center' as const, slotName: 'assignedPointDiff' }, ] // 手续费分成比例form配置 export const commissionRatioFormItem = [ - // 手续费分成比例 - { prop: 'commissionRatio', label: '手续费分成比例', type: 'input' as const, placeholder: '请输入手续费分成比例',labelWidth: '140px'}, + // 手续费分成比例 + { prop: 'commissionRatio', label: '手续费分成比例', type: 'input' as const, placeholder: '请输入手续费分成比例', labelWidth: '140px' }, ] \ No newline at end of file diff --git a/src/views/profile/business/index.vue b/src/views/profile/business/index.vue index 4315a50..850b3ad 100644 --- a/src/views/profile/business/index.vue +++ b/src/views/profile/business/index.vue @@ -960,6 +960,9 @@ onMounted(async () => { }) +onUnmounted(()=>{ + transactionStore?.disconnect() +}) // 页面卸载时不主动断开连接(由logout统一处理) /**