diff --git a/src/api/modules/agent/customCapitalFlow.ts b/src/api/modules/agent/customCapitalFlow.ts new file mode 100644 index 0000000..f2f1755 --- /dev/null +++ b/src/api/modules/agent/customCapitalFlow.ts @@ -0,0 +1,6 @@ +import { request } from '@/api'; + +// 获取资金流水列表 +export const getCustomCapitalFlowListApi = (params: any) => { + return request.get('user/FundFlowRecords', {...params}) +} diff --git a/src/api/modules/agent/customerList.ts b/src/api/modules/agent/customerList.ts new file mode 100644 index 0000000..17f2d56 --- /dev/null +++ b/src/api/modules/agent/customerList.ts @@ -0,0 +1,5 @@ +//获取代理客户列表接口 +import { request } from '@/api'; +export const getCustomerListApi = (params: any) => { + return request.get('/agent/getAgentUserList', {...params}) +} diff --git a/src/api/modules/agent/customerTradeOrder.ts b/src/api/modules/agent/customerTradeOrder.ts new file mode 100644 index 0000000..81e9a53 --- /dev/null +++ b/src/api/modules/agent/customerTradeOrder.ts @@ -0,0 +1,6 @@ +import { request } from '@/api'; + +// 获取跟订单列表 +export const getCustomTradeOrderListApi = (params: any) => { + return request.get('/orderRecords/getList', {...params}) +} \ No newline at end of file diff --git a/src/components/common/Table.vue b/src/components/common/Table.vue index fdafda2..474befa 100644 --- a/src/components/common/Table.vue +++ b/src/components/common/Table.vue @@ -5,7 +5,7 @@ + :align="column.align || 'left'" :sortable="column.sortable" /> @@ -26,6 +26,7 @@ interface TableColumn { width?: string | number align?: 'left' | 'center' | 'right' slotName?: string // 具名插槽名称 + sortable?: boolean // 是否可排序 } // 定义表格组件属性接口 diff --git a/src/views/agent/customerCapitalFlow/index.vue b/src/views/agent/customerCapitalFlow/index.vue index 1cbc27d..4b9dfe4 100644 --- a/src/views/agent/customerCapitalFlow/index.vue +++ b/src/views/agent/customerCapitalFlow/index.vue @@ -1,5 +1,114 @@ - 客户资金流水 + + + + + + + + + + + diff --git a/src/views/agent/customerCapitalFlow/options.ts b/src/views/agent/customerCapitalFlow/options.ts new file mode 100644 index 0000000..c71aead --- /dev/null +++ b/src/views/agent/customerCapitalFlow/options.ts @@ -0,0 +1,35 @@ +export const search = [ + // 账号名称 + { prop: 'accountName', label: '账号名称', type: 'input' as const, placeholder: '请输入账号名称', width: '150px' }, + // 开始时间 + { + prop: "startTime", label: '注册开始时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + }, + // 结束时间 + { + prop: "endTime", label: '注册结束时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + }, + // 选择账号 + { prop: 'userId', label: '账号', type: 'select' as const, placeholder: '请选择账号' }, +] + +export const tableColumns = [ + // 流水id + { prop: 'id', label: '流水id' }, + // 流水单号 + { prop: 'flowNo', label: '流水单号' }, + // 账户名称 + { prop: 'accountName', label: '账户名称' }, + // 金额 + { prop: 'amount', label: '金额' }, + // 资金类别 + { prop: 'fundType', label: '资金类别' }, + // 状态 + { prop: 'status', label: '状态' }, + // 操作方式 + { prop: 'operationType', label: '操作方式' }, + // 时间 + { prop: 'createTime', label: '时间' }, +] \ No newline at end of file diff --git a/src/views/agent/customerDetail/index.vue b/src/views/agent/customerDetail/index.vue new file mode 100644 index 0000000..41a40c8 --- /dev/null +++ b/src/views/agent/customerDetail/index.vue @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/agent/customerList/index.vue b/src/views/agent/customerList/index.vue index 4228f82..6ca5373 100644 --- a/src/views/agent/customerList/index.vue +++ b/src/views/agent/customerList/index.vue @@ -1,5 +1,186 @@ - 客户列表 + + + + + + + {{ row.accountName }} + + + + + + + + 修改 + + + + {{ row.commissionRatio }} + + 修改 + + + + + 查看详情 + + + + + + + + + + + + + + diff --git a/src/views/agent/customerList/options.ts b/src/views/agent/customerList/options.ts new file mode 100644 index 0000000..e7e3544 --- /dev/null +++ b/src/views/agent/customerList/options.ts @@ -0,0 +1,37 @@ +export const search = [ + // 账号名称 + { prop: 'accountName', label: '账号名称', type: 'input' as const, placeholder: '请输入账号名称', width: '150px' }, + // 开始时间 + { + prop: "startTime", label: '注册开始时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + }, + // 结束时间 + { + prop: "endTime", label: '注册结束时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + }, + // 状态 + { prop: 'status', label: '状态', type: 'select' as const, placeholder: '请选择状态' }, +] + +export const tableColumns = [ + // 账号名称 + { label: '账号名称', slotName: 'accountName', emptySpan: { colspan: 999 } }, + // 账号id + { prop: 'userId', label: '账号id' }, + // 状态 + { prop: 'status', label: '状态' }, + // 账号角色 + { prop: 'role', label: '账号角色' }, + // 账号数量 + { prop: 'accountQty', label: '账号数量' }, + // 点差分配比例 + { prop: 'marginRatio', label: '点差分配比例', slotName: 'marginRatio' }, + // 手续费分成比例 + { prop: 'commissionRatio', label: '手续费分成比例', slotName: 'commissionRatio' }, + // 注册时间 + { prop: 'createTime', label: '注册时间' ,sortable:true}, + // 操作 + { label: '操作', slotName: 'action' } +] \ No newline at end of file diff --git a/src/views/agent/customerTradeOrder/index.vue b/src/views/agent/customerTradeOrder/index.vue index c8c84d7..a682ac7 100644 --- a/src/views/agent/customerTradeOrder/index.vue +++ b/src/views/agent/customerTradeOrder/index.vue @@ -1,5 +1,135 @@ - 客户交易订单 + + + + + 持仓量:0 + 手续费:0.00 USD + 交易盈亏:0.00 USD + + + + + + + + + + + diff --git a/src/views/agent/customerTradeOrder/options.ts b/src/views/agent/customerTradeOrder/options.ts new file mode 100644 index 0000000..3fcf4d0 --- /dev/null +++ b/src/views/agent/customerTradeOrder/options.ts @@ -0,0 +1,106 @@ +/** + * @description: 搜索配置 + */ +export const search = [ + // 账户名 + { + label: '账户名', + prop: 'accountName', + type: 'input' as const, + placeholder: '请输入账户名', + width: '140px' + }, + { + label: '订单', + prop: 'orderId', + type: 'select' as const, + options: [ + { + label: '持仓订单', + value: '1' + }, + { + label: '交易订单', + value: '2' + }, + ], + width: '140px' + }, + // 选择交易类型 + { + label: '交易类型', + prop: 'tradeType', + type: 'select' as const, + options: [ + { + label: '全部', + value: '1' + }, + { + label: '买入', + value: '2' + }, + { + label: '卖出', + value: '3' + }, + ], + width: '140px' + }, + // 开始时间 + { + prop: "startTime", label: '注册开始时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + width: '140px' + }, + // 结束时间 + { + prop: "endTime", label: '注册结束时间', type: 'date' as const, dateType: 'date' as const, // 时间范围选择器 + valueFormat: 'YYYY-MM-DD', + width: '140px' + }, +] + +/** + * @description: 表格配置 + */ +// 持仓订单 +export const tradeOrderTableColumns = [ + // 账户名 + { label: '账户名', prop: 'accountName' }, + // 交易类型 + { label: '交易类型', prop: 'tradeType' }, + // 交易品种 + { label: '交易品种', prop: 'variety' }, + // 开仓时间 + { label: '开仓时间', prop: 'openTime' }, + // 开仓价格 + { label: '开仓价格', prop: 'openPrice' }, + // 平仓时间 + { label: '平仓时间', prop: 'closeTime' }, + // 平仓价格 + { label: '平仓价格', prop: 'closePrice' }, + // 浮动盈亏 + { label: '浮动盈亏', prop: 'floatProfit' }, +] +//交易订单 +export const positionOrderTableColumns = [ + // 账户名 + { label: '账户名', prop: 'accountName' }, + //订单编号 + { label: '订单编号', prop: 'orderId' }, + //品种名称 + { label: '品种名称', prop: 'variety' }, + //类型 + { label: '类型', prop: 'type' }, + //数量 + { label: '数量', prop: 'quantity' }, + //开仓价格 + { label: '开仓价格', prop: 'openPrice' }, + //平仓价格 + { label: '平仓价格', prop: 'closePrice' }, + //金额 + { label: '金额', prop: 'amount' }, + //创建时间 + { label: '创建时间', prop: 'createdTime' }, +] \ No newline at end of file diff --git a/src/views/personalized/followRecord/index.vue b/src/views/personalized/followRecord/index.vue index a27c4c1..1fbc1ce 100644 --- a/src/views/personalized/followRecord/index.vue +++ b/src/views/personalized/followRecord/index.vue @@ -14,7 +14,7 @@ + @pagination-change="handlePaginationChange" /> @@ -113,7 +113,8 @@ const handleExport = () => { /** * @description: 定义分页方法 */ -const handleChange = (page: { currentPage: number, size: number }) => { +const handlePaginationChange = (page: { currentPage: number, size: number }) => { currentPage.value = page.currentPage + getFollowList() } diff --git a/src/views/personalized/leadRecord/index.vue b/src/views/personalized/leadRecord/index.vue index b02a24f..dc4c876 100644 --- a/src/views/personalized/leadRecord/index.vue +++ b/src/views/personalized/leadRecord/index.vue @@ -14,7 +14,7 @@ + @pagination-change="handlePaginationChange" /> @@ -55,7 +55,7 @@ const total = ref(0) /** * @description: 定义公共请求数据方法 */ -const getFollowList = async () => { +const getLeadList = async () => { const params = { page: currentPage.value, page_size: pageSize.value, @@ -84,14 +84,14 @@ const getFollowList = async () => { * @description: 页面加载完成需要请求的数据 */ onMounted(() => { - getFollowList() + getLeadList() }) /** * @description: 定义搜索方法 */ const handleSearch = async () => { console.log("搜索"); - getFollowList() + getLeadList() } const handleReset = () => { console.log('重置搜索') @@ -100,7 +100,7 @@ const handleReset = () => { startTime: '', endTime: '', } - getFollowList() + getLeadList() } const handleExport = () => { exportToExcel({ @@ -113,7 +113,8 @@ const handleExport = () => { /** * @description: 定义分页方法 */ -const handleChange = (page: { currentPage: number, size: number }) => { +const handlePaginationChange = (page: { currentPage: number, size: number }) => { currentPage.value = page.currentPage + getLeadList() } diff --git a/src/views/trade/positionStat/index.vue b/src/views/trade/positionStat/index.vue index 6c004c7..3ff2c2f 100644 --- a/src/views/trade/positionStat/index.vue +++ b/src/views/trade/positionStat/index.vue @@ -13,7 +13,7 @@ - + @@ -82,7 +82,7 @@ const handleExport = () => { /** * @description: 定义分页方法 */ -const handleChange = (page: {currentPage: number, size: number}) => { +const handlePaginationChange = (page: {currentPage: number, size: number}) => { currentPage.value = page.currentPage }