存款渠道
This commit is contained in:
parent
0e195a5434
commit
8d2350f231
|
|
@ -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 // 权限
|
||||
}
|
||||
|
||||
// 定义组件属性接口
|
||||
|
|
|
|||
|
|
@ -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: '币名' },
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ export const tableColumns = [
|
|||
{ prop: 'username', label: '用户名' },
|
||||
//单号
|
||||
{ prop: 'orderNo', label: '单号' },
|
||||
{ prop: 'account_id', label: '子账号' },
|
||||
//操作类型
|
||||
{ prop: 'type', label: '操作类型' },
|
||||
//资金流向
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
// 格式化下拉选项
|
||||
|
|
|
|||
|
|
@ -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' },
|
||||
//保证金
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue