存款渠道

This commit is contained in:
Songsl 2026-05-08 16:28:54 +08:00
parent 0e195a5434
commit 8d2350f231
8 changed files with 71 additions and 26 deletions

View File

@ -8,6 +8,7 @@
:key="btn.key || index"
:type="btn.type || 'default'"
:icon="btn.icon"
v-auth="btn.auth"
@click="handleButtonClick(btn)"
:disabled="btn.disabled"
>
@ -28,6 +29,7 @@ interface HeaderButton {
icon?: Component
disabled?: boolean
key?: string | number //
auth?: string //
}
//

View File

@ -2,9 +2,9 @@
* @description:
*/
export const buttons = [
{ label: '添加', type: 'primary', key: 'add' },
{ label: '编辑', type: 'primary', key: 'edit' },
{ label: '删除', type: 'danger', key: 'delete' },
{ label: '添加', type: 'primary', key: 'add', auth: 'currency_createCurrency' },
{ label: '编辑', type: 'primary', key: 'edit', auth: 'currency_editCurrency' },
{ label: '删除', type: 'danger', key: 'delete', auth: 'currency_delCurrency' },
]
export const tableColumns = [
{ prop: 'name', label: '币名' },

View File

@ -56,6 +56,7 @@ export const tableColumns = [
{ prop: 'username', label: '用户名' },
//单号
{ prop: 'orderNo', label: '单号' },
{ prop: 'account_id', label: '子账号' },
//操作类型
{ prop: 'type', label: '操作类型' },
//资金流向

View File

@ -43,6 +43,7 @@ import {
editChannel,
delChannel,
} from '@/api/modules/capital/rechangeChanl.ts'
import { getCurrencyList } from '@/api/modules/capital/currency.ts'
import { ElMessageBox } from 'element-plus'
type ChannelType = {
@ -56,10 +57,6 @@ type ChannelType = {
status: number
}
const getTypeText = (type: number | string) => {
return ['', '法币', '数字货币'][type]
}
const getStatusText = (status: number | string) => {
return ['', '正常', '禁用'][status]
}
@ -69,7 +66,6 @@ const initData = async () => {
console.log(res)
tableData.value = res.map((item: ChannelType) => ({
...item,
typeStr: getTypeText(item.type),
statusStr: getStatusText(item.status),
})) as ChannelType[]
clearSelection()
@ -171,6 +167,13 @@ const clearSelection = () => {
onMounted(() => {
initData()
getCurrencyList().then((data) => {
console.log(data)
optionsMap.value.type = (data || []).map((item: any) => ({
value: item.id,
label: item.symbol,
}))
})
})
</script>
<style scoped>

View File

@ -6,7 +6,7 @@ export const tableColumns = [
//存款渠道费用
{ label: '渠道费用', prop: 'channel_fee' },
//存款渠道类型
{ label: '类型', prop: 'typeStr' },
{ label: '入金货币', prop: 'currency.symbol' },
// 接口地址
{ label: '接口地址', prop: 'api_url' },
// 接口appid
@ -24,10 +24,9 @@ export const formItemsData = [
max: 999999,
controls: false,
placeholder: '请输入渠道费用',
},
{
label: '类型',
label: '入金货币',
prop: 'type',
type: 'select',
placeholder: '请选择类型',
@ -49,10 +48,7 @@ export const formRulesData = {
}
export const optionsMapData = {
type: [
{ label: '法币', value: 1 },
{ label: '数字货币', value: 2 },
],
type: [],
status: [
{ label: '启用', value: 1 },
{ label: '禁用', value: 2 },

View File

@ -241,6 +241,7 @@ const selectedRow = ref<any>(null)
*/
//
const mapMarketTree = (data: any) => {
console.log('mapMarketTree', data)
return data.map((item: any) => ({
...item,
id: item.id, //id
@ -261,7 +262,8 @@ const mapMarketTree = (data: any) => {
serviceFee: item.wallet_capital.service, //
flag: item.role_id * 1 === 5 ? (item.type! === 1 ? 1 : 2) : null,
//使
roleId: item.role_id,
mobile: item.mobile || '--',
email: item.email || "--",
}))
}
@ -284,8 +286,16 @@ const handleMarketFormLinkage = async (type: 'level' | 'parentAccountName', valu
//
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
if (
(selectedRow.value?.role_id * 1 === 5 || marketForm.value?.level * 1 === 5) &&
selectedRow.value?.type * 1 === 1
)
flag = 1
if (
(selectedRow.value?.role_id * 1 === 6 || marketForm.value?.level * 1 === 6) &&
selectedRow.value?.type * 1 === 2
)
flag = 2
const data = await getParAgentListApi({ role_id: value, flag: flag })
console.log('datasssssssssssss', data)
//

View File

@ -13,6 +13,9 @@ export const marketTableColumns = [
{ label: '账户名', prop: 'accountName', align: 'center' as const, width: '120px' },
//级别
{ label: '级别', prop: 'level', align: 'center' as const, width: '120px' },
{ label: '邮箱', prop: 'email', align: 'center' as const, width: '160px' },
{ label: '手机号', prop: 'mobile', align: 'center' as const, width: '120px' },
{ label: '风险率', prop: 'ratio', align: 'center' as const, width: '120px' },
//基本账户
{ label: '基本账户', prop: 'basicAccount', align: 'center' as const, width: '200px' },
//保证金

View File

@ -1,8 +1,20 @@
<template>
<div class="trade-group">
<el-form-item label="交易节假日时间设置">
<el-button style="margin-left: 18px" type="primary" @click="handleAdd">添加</el-button>
<el-button style="margin-left: 18px" type="danger" @click="handleDel">删除</el-button>
<el-button
style="margin-left: 18px"
type="primary"
v-auth="'contractVariety_addHoliday'"
@click="handleAdd"
>添加</el-button
>
<el-button
style="margin-left: 18px"
type="danger"
v-auth="'contractVariety_addHoliday'"
@click="handleDel"
>删除</el-button
>
</el-form-item>
<!-- 表格 -->
<div class="table-box">
@ -53,10 +65,12 @@
/>
</el-select>
<span>{{
(item?.groupId || []).map(
(item?.groupId || [])
.map(
(item: any) =>
(marketList || []).find((item2: any) => item2.value === item)?.label || '',
).join(',')
)
.join(',')
}}</span>
</td>
<td>
@ -64,16 +78,32 @@
<span v-else>{{ item.description }}</span>
</td>
<td>
<el-button type="primary" v-if="!item.editStatus" @click="item.editStatus = true"
<el-button
type="primary"
v-if="!item.editStatus"
@click="item.editStatus = true"
v-auth="'contractVariety_addHoliday'"
>编辑</el-button
>
<el-button type="danger" v-if="!item.editStatus" @click="handleDel(item.id, index)"
<el-button
type="danger"
v-if="!item.editStatus"
@click="handleDel(item.id, index)"
v-auth="'contractVariety_addHoliday'"
>删除</el-button
>
<el-button type="primary" v-if="item.editStatus" @click="submitItem(index)"
<el-button
type="primary"
v-if="item.editStatus"
@click="submitItem(index)"
v-auth="'contractVariety_addHoliday'"
>确认</el-button
>
<el-button type="danger" v-if="item.editStatus" @click="item.editStatus = false"
<el-button
type="danger"
v-if="item.editStatus"
@click="item.editStatus = false"
v-auth="'contractVariety_addHoliday'"
>取消</el-button
>
</td>