存款渠道
This commit is contained in:
parent
0e195a5434
commit
8d2350f231
|
|
@ -8,6 +8,7 @@
|
||||||
:key="btn.key || index"
|
:key="btn.key || index"
|
||||||
:type="btn.type || 'default'"
|
:type="btn.type || 'default'"
|
||||||
:icon="btn.icon"
|
:icon="btn.icon"
|
||||||
|
v-auth="btn.auth"
|
||||||
@click="handleButtonClick(btn)"
|
@click="handleButtonClick(btn)"
|
||||||
:disabled="btn.disabled"
|
:disabled="btn.disabled"
|
||||||
>
|
>
|
||||||
|
|
@ -28,6 +29,7 @@ interface HeaderButton {
|
||||||
icon?: Component
|
icon?: Component
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
key?: string | number // 可选的唯一标识
|
key?: string | number // 可选的唯一标识
|
||||||
|
auth?: string // 权限
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定义组件属性接口
|
// 定义组件属性接口
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
* @description: 搜索配置
|
* @description: 搜索配置
|
||||||
*/
|
*/
|
||||||
export const buttons = [
|
export const buttons = [
|
||||||
{ label: '添加', type: 'primary', key: 'add' },
|
{ label: '添加', type: 'primary', key: 'add', auth: 'currency_createCurrency' },
|
||||||
{ label: '编辑', type: 'primary', key: 'edit' },
|
{ label: '编辑', type: 'primary', key: 'edit', auth: 'currency_editCurrency' },
|
||||||
{ label: '删除', type: 'danger', key: 'delete' },
|
{ label: '删除', type: 'danger', key: 'delete', auth: 'currency_delCurrency' },
|
||||||
]
|
]
|
||||||
export const tableColumns = [
|
export const tableColumns = [
|
||||||
{ prop: 'name', label: '币名' },
|
{ prop: 'name', label: '币名' },
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ export const tableColumns = [
|
||||||
{ prop: 'username', label: '用户名' },
|
{ prop: 'username', label: '用户名' },
|
||||||
//单号
|
//单号
|
||||||
{ prop: 'orderNo', label: '单号' },
|
{ prop: 'orderNo', label: '单号' },
|
||||||
|
{ prop: 'account_id', label: '子账号' },
|
||||||
//操作类型
|
//操作类型
|
||||||
{ prop: 'type', label: '操作类型' },
|
{ prop: 'type', label: '操作类型' },
|
||||||
//资金流向
|
//资金流向
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ import {
|
||||||
editChannel,
|
editChannel,
|
||||||
delChannel,
|
delChannel,
|
||||||
} from '@/api/modules/capital/rechangeChanl.ts'
|
} from '@/api/modules/capital/rechangeChanl.ts'
|
||||||
|
import { getCurrencyList } from '@/api/modules/capital/currency.ts'
|
||||||
import { ElMessageBox } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
type ChannelType = {
|
type ChannelType = {
|
||||||
|
|
@ -56,10 +57,6 @@ type ChannelType = {
|
||||||
status: number
|
status: number
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTypeText = (type: number | string) => {
|
|
||||||
return ['', '法币', '数字货币'][type]
|
|
||||||
}
|
|
||||||
|
|
||||||
const getStatusText = (status: number | string) => {
|
const getStatusText = (status: number | string) => {
|
||||||
return ['', '正常', '禁用'][status]
|
return ['', '正常', '禁用'][status]
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +66,6 @@ const initData = async () => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
tableData.value = res.map((item: ChannelType) => ({
|
tableData.value = res.map((item: ChannelType) => ({
|
||||||
...item,
|
...item,
|
||||||
typeStr: getTypeText(item.type),
|
|
||||||
statusStr: getStatusText(item.status),
|
statusStr: getStatusText(item.status),
|
||||||
})) as ChannelType[]
|
})) as ChannelType[]
|
||||||
clearSelection()
|
clearSelection()
|
||||||
|
|
@ -171,6 +167,13 @@ const clearSelection = () => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initData()
|
initData()
|
||||||
|
getCurrencyList().then((data) => {
|
||||||
|
console.log(data)
|
||||||
|
optionsMap.value.type = (data || []).map((item: any) => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.symbol,
|
||||||
|
}))
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ export const tableColumns = [
|
||||||
//存款渠道费用
|
//存款渠道费用
|
||||||
{ label: '渠道费用', prop: 'channel_fee' },
|
{ label: '渠道费用', prop: 'channel_fee' },
|
||||||
//存款渠道类型
|
//存款渠道类型
|
||||||
{ label: '类型', prop: 'typeStr' },
|
{ label: '入金货币', prop: 'currency.symbol' },
|
||||||
// 接口地址
|
// 接口地址
|
||||||
{ label: '接口地址', prop: 'api_url' },
|
{ label: '接口地址', prop: 'api_url' },
|
||||||
// 接口appid
|
// 接口appid
|
||||||
|
|
@ -24,10 +24,9 @@ export const formItemsData = [
|
||||||
max: 999999,
|
max: 999999,
|
||||||
controls: false,
|
controls: false,
|
||||||
placeholder: '请输入渠道费用',
|
placeholder: '请输入渠道费用',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '入金货币',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
placeholder: '请选择类型',
|
placeholder: '请选择类型',
|
||||||
|
|
@ -49,10 +48,7 @@ export const formRulesData = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const optionsMapData = {
|
export const optionsMapData = {
|
||||||
type: [
|
type: [],
|
||||||
{ label: '法币', value: 1 },
|
|
||||||
{ label: '数字货币', value: 2 },
|
|
||||||
],
|
|
||||||
status: [
|
status: [
|
||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: 1 },
|
||||||
{ label: '禁用', value: 2 },
|
{ label: '禁用', value: 2 },
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,7 @@ const selectedRow = ref<any>(null)
|
||||||
*/
|
*/
|
||||||
//映射表格数据
|
//映射表格数据
|
||||||
const mapMarketTree = (data: any) => {
|
const mapMarketTree = (data: any) => {
|
||||||
|
console.log('mapMarketTree', data)
|
||||||
return data.map((item: any) => ({
|
return data.map((item: any) => ({
|
||||||
...item,
|
...item,
|
||||||
id: item.id, //id
|
id: item.id, //id
|
||||||
|
|
@ -261,7 +262,8 @@ const mapMarketTree = (data: any) => {
|
||||||
serviceFee: item.wallet_capital.service, //服务费
|
serviceFee: item.wallet_capital.service, //服务费
|
||||||
flag: item.role_id * 1 === 5 ? (item.type! === 1 ? 1 : 2) : null,
|
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
|
let flag = null
|
||||||
if (selectedRow.value.role_id * 1 === 5 && selectedRow.value.type * 1 === 1) flag = 1
|
if (
|
||||||
if (selectedRow.value.role_id * 1 === 6 && selectedRow.value.type * 1 === 2) flag = 2
|
(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 })
|
const data = await getParAgentListApi({ role_id: value, flag: flag })
|
||||||
console.log('datasssssssssssss', data)
|
console.log('datasssssssssssss', data)
|
||||||
// 格式化下拉选项
|
// 格式化下拉选项
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ export const marketTableColumns = [
|
||||||
{ label: '账户名', prop: 'accountName', align: 'center' as const, width: '120px' },
|
{ label: '账户名', prop: 'accountName', align: 'center' as const, width: '120px' },
|
||||||
//级别
|
//级别
|
||||||
{ label: '级别', prop: 'level', 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' },
|
{ label: '基本账户', prop: 'basicAccount', align: 'center' as const, width: '200px' },
|
||||||
//保证金
|
//保证金
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="trade-group">
|
<div class="trade-group">
|
||||||
<el-form-item label="交易节假日时间设置">
|
<el-form-item label="交易节假日时间设置">
|
||||||
<el-button style="margin-left: 18px" type="primary" @click="handleAdd">添加</el-button>
|
<el-button
|
||||||
<el-button style="margin-left: 18px" type="danger" @click="handleDel">删除</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>
|
</el-form-item>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
|
|
@ -53,10 +65,12 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span>{{
|
<span>{{
|
||||||
(item?.groupId || []).map(
|
(item?.groupId || [])
|
||||||
|
.map(
|
||||||
(item: any) =>
|
(item: any) =>
|
||||||
(marketList || []).find((item2: any) => item2.value === item)?.label || '',
|
(marketList || []).find((item2: any) => item2.value === item)?.label || '',
|
||||||
).join(',')
|
)
|
||||||
|
.join(',')
|
||||||
}}</span>
|
}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -64,16 +78,32 @@
|
||||||
<span v-else>{{ item.description }}</span>
|
<span v-else>{{ item.description }}</span>
|
||||||
</td>
|
</td>
|
||||||
<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
|
||||||
>
|
>
|
||||||
<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
|
||||||
>
|
>
|
||||||
<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
|
||||||
>
|
>
|
||||||
<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
|
>取消</el-button
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue