diff --git a/src/views/capital/withdrawCheck/index.vue b/src/views/capital/withdrawCheck/index.vue index 5488bdb..e7da247 100644 --- a/src/views/capital/withdrawCheck/index.vue +++ b/src/views/capital/withdrawCheck/index.vue @@ -331,7 +331,7 @@ const handleReject = async (row?: TableRow) => { const handleExport = async () => { // 筛选导出字段:收款人姓名、收款人英文名字、银行名称、银行账号、取款金额 const exportColumns = withdrawCheckTableColumns.filter((col) => - ['beneficiary_name', 'beneficiary_enname', 'beneficiary_bank_name', 'beneficiary_bank_account', 'withdraw_amount'].includes(col.prop) + ['beneficiary_name', 'beneficiary_enname', 'beneficiary_bank_name', 'beneficiary_bank_account', 'real_amount'].includes(col.prop) ) await exportToExcel({ tableData: tableData.value, diff --git a/src/views/profile/business/index.vue b/src/views/profile/business/index.vue index 850b3ad..dc2133a 100644 --- a/src/views/profile/business/index.vue +++ b/src/views/profile/business/index.vue @@ -64,6 +64,13 @@ label="设置持仓转移金额" @click="handleAction('transfer')" /> + @@ -346,6 +354,8 @@ import { acceptOrdersFormItemRules, transferFormItemList, transferFormItemRules, + statusFormItemList, + statusFormOptionsMap, getWithdrawFormConfig, getWithdrawFormRules, } from './options' @@ -522,19 +532,21 @@ const menuVisible = ref(false) const menuOptions = reactive({ x: 0, y: 0, zIndex: 3000 }) const currentRow = ref(null) const rightClickDialogVisible = ref(false) -const rightClickDialogType = ref<'account' | 'acceptOrders' | 'transfer' | 'deposit' | 'withdraw'>( +const rightClickDialogType = ref<'account' | 'acceptOrders' | 'transfer' | 'status' | 'deposit' | 'withdraw'>( 'account', ) const rightClickDialogTitleEnum = { account: '调整基本账户', acceptOrders: '设置停止接单金额', transfer: '设置持仓转移金额', + status: '设置做事状态', deposit: '取款', withdraw: '存款', } const rightClickMarketForm = ref({}) const rightClickMarketFormRules = ref>(accountFormItemRules) -const rightClickMarketFormItemOptions = ref(accountFormItemList) +const rightClickMarketFormItemOptions = ref(accountFormItemList) +const rightClickDialogOptionsMap = ref>({}) const withdrawFormRef = ref() // 计算调整后余额 @@ -571,7 +583,7 @@ const handleRowContextMenu = (row: any, column: any, event: any) => { /** * @description 处理右键菜单 * */ -const handleAction = (key: 'account' | 'acceptOrders' | 'transfer' | 'deposit' | 'withdraw') => { +const handleAction = (key: 'account' | 'acceptOrders' | 'transfer' | 'status' | 'deposit' | 'withdraw') => { console.log('handleAction', key, currentRow.value) if (!currentRow.value) return // 先重置表单数据,确保使用全新对象 @@ -612,6 +624,14 @@ const handleAction = (key: 'account' | 'acceptOrders' | 'transfer' | 'deposit' | bail_change_order: '', } break + case 'status': + rightClickMarketFormItemOptions.value = statusFormItemList + rightClickDialogOptionsMap.value = statusFormOptionsMap + rightClickMarketForm.value = { + target_user_id: currentRow.value!.wallet_capital.user_id, + market_status: currentRow.value!.wallet_capital.market_status, + } + break case 'deposit': // 获取当前行的角色ID const targetRoleId = currentRow.value!.role_id * 1 @@ -676,6 +696,15 @@ const handleRightClickDialogSubmit = async () => { bail_stop_order: null, }) break + case 'status': + await editAgentBail({ + user_id: rightClickMarketForm.value.target_user_id, + bail: null, + bail_change_order: null, + bail_stop_order: null, + market_status: rightClickMarketForm.value.market_status + }) + break case 'deposit': // 取款提交由 handleWithdrawSubmit 内部处理弹窗关闭 handleWithdrawSubmit() @@ -804,6 +833,7 @@ const mapMarketTree = (data: any) => { return data.map((item: any) => ({ ...item, id: item.id, //id + freeze: item.wallet_capital.freeze, agentRelation: item.path_name, //代理关系 accountName: item.username, //账户名 level: item.role_id * 1 === 5 && item.type * 1 === 2 ? 6 : item.role_id, //级别 diff --git a/src/views/profile/business/options.ts b/src/views/profile/business/options.ts index 803bc15..24fb31b 100644 --- a/src/views/profile/business/options.ts +++ b/src/views/profile/business/options.ts @@ -22,8 +22,10 @@ export const marketTableColumns = [ { label: '邮箱', prop: 'email', align: 'center' as const, width: '160px' }, { label: '手机号', prop: 'mobile', align: 'center' as const, width: '180' }, { label: '风险率', prop: 'ratio', align: 'center' as const, width: '120px' }, + { label: '接单状态', prop: 'market_status', align: 'center' as const, width: '120px' }, //基本账户 { label: '基本账户', prop: 'basicAccount', align: 'center' as const, isNumber: true , width: '200px' }, + { label: '冻结点差', prop: 'freeze', align: 'center' as const, isNumber: true , width: '200px' }, //保证金 { label: '保证金', prop: 'margin', align: 'center' as const, width: '200px', isNumber: true }, //停止接单保证金 @@ -147,6 +149,17 @@ export const transferFormItemRules = { bail_change_order: [{ required: true, message: '请输入调整金额', trigger: ['blur', 'change'] }], } +// 做事状态表单配置 +export const statusFormItemList = [ + { label: '做市状态', prop: 'market_status', type: 'radio' as const }, +] +export const statusFormOptionsMap = { + market_status: [ + { label: '开始接单', value: 1 }, + { label: '停止接单', value: 2 }, + ], +} + // 取款表单配置(根据不同角色显示不同字段) // 平台(1): 币种、手续费佣金、点差佣金、服务费、风险金 // 承包商(2): 币种、手续费佣金、点差佣金、服务费 diff --git a/src/views/profile/user/index.vue b/src/views/profile/user/index.vue index 17b03e3..d71b09f 100644 --- a/src/views/profile/user/index.vue +++ b/src/views/profile/user/index.vue @@ -24,7 +24,7 @@ 修改 - + 调整金额