From af103fd11d883fad506ee52945053f3e0f1cd5a8 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Tue, 18 Feb 2025 16:27:41 +0800
Subject: [PATCH] 1
---
src/views/position/components/financing-hold.vue | 72 ++++++++++++++++++++++++++++++-----
1 files changed, 61 insertions(+), 11 deletions(-)
diff --git a/src/views/position/components/financing-hold.vue b/src/views/position/components/financing-hold.vue
index c554f35..2f213b4 100644
--- a/src/views/position/components/financing-hold.vue
+++ b/src/views/position/components/financing-hold.vue
@@ -3,7 +3,7 @@
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline">
- <a-row :gutter="48">
+ <!-- <a-row :gutter="48">
<a-col :md="12" :lg="6" :sm="24">
<a-form-item label="持仓类型">
<a-select v-model="queryParam.positionType" placeholder="请选择持仓类型">
@@ -12,7 +12,7 @@
<a-select-option :value="1">模拟持仓</a-select-option>
</a-select>
</a-form-item>
- </a-col>
+ </a-col> -->
<a-col :md="12" :lg="6" :sm="24">
<a-form-item label="下级代理">
<a-select
@@ -30,6 +30,11 @@
<a-col :md="12" :lg="6" :sm="24">
<a-form-item label="用户Id">
<a-input v-model="queryParam.userId" style="width: 100%" placeholder="请输入用户Id" />
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="手机号">
+ <a-input v-model="queryParam.phone" style="width: 100%" placeholder="请输入手机号" />
</a-form-item>
</a-col>
<a-col :md="12" :lg="6" :sm="24">
@@ -87,7 +92,7 @@
</div>
</template>
</span>
- <span slot="positionType" slot-scope="text, record">
+ <!-- <span slot="positionType" slot-scope="text, record">
<template>
<div>
<a-tag :color="record.positionType == 1 ? 'blue' : 'green'">
@@ -95,7 +100,7 @@
</a-tag>
</div>
</template>
- </span>
+ </span> -->
<span slot="orderDirection" slot-scope="text, record">
<template>
<div>
@@ -155,6 +160,8 @@
<a slot="action" href="javascript:;" @click="getLockopen(record.id)" v-else>解锁</a>
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="getCompulsoryclosing(record.positionSn)">强制平仓</a>
+ <a-divider type="vertical" />
+ <a slot="action" href="javascript:;" @click="deletekopen(record.id)">删除</a>
</template>
</a-table>
<a-modal
@@ -177,7 +184,7 @@
</div>
</template>
<script>
-import { positionlist, positionlock, positionsell } from '@/api/position'
+import { positionlist, positionlock, positionsell,positiondel } from '@/api/position'
import { nextagent } from '@/api/home'
import moment from 'moment'
export default {
@@ -192,12 +199,12 @@
width: 180,
scopedSlots: { customRender: 'stockName' },
},
- {
- title: '账户类型',
- dataIndex: 'positionType',
- align: 'center',
- scopedSlots: { customRender: 'positionType' },
- },
+ // {
+ // title: '账户类型',
+ // dataIndex: 'positionType',
+ // align: 'center',
+ // scopedSlots: { customRender: 'positionType' },
+ // },
{
title: '用户名称(ID)',
dataIndex: 'nickName',
@@ -250,6 +257,19 @@
title: '数量(股)',
dataIndex: 'orderNum',
align: 'center',
+ },
+ {
+ title: '账号',
+ dataIndex: 'phone',
+ align: 'center',
+ },
+ {
+ title: '所属代理(ID)',
+ dataIndex: 'agentName_Id',
+ align: 'center',
+ customRender: (text, row, index) => {
+ return `${row.agentName}(${row.agentId})`
+ },
},
{
title: '总市值',
@@ -323,6 +343,7 @@
userId: '',
positionSn: '',
state: 0,
+ phone: '',
},
datalist: [],
agentlist: [],
@@ -341,6 +362,33 @@
this.getlist()
},
methods: {
+ deletekopen(id){
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认要删除吗?',
+ onOk() {
+ var data = {
+ positionId: id,
+ }
+ positiondel(data)
+ .then((res) => {
+ if (res.status == 0) {
+ that.$message.success(res.msg)
+ that.getlist()
+ } else {
+ that.$message.error({ content: '删除失败' })
+ }
+ })
+ .catch((error) => {
+ that.$message.error({ content: '删除失败' })
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
getCompulsoryclosing(val) {
var that = this
this.$confirm({
@@ -434,6 +482,7 @@
userId: '',
positionSn: '',
state: 0,
+ phone: '',
}
this.getlist()
},
@@ -446,6 +495,7 @@
userId: '',
positionSn: '',
state: 0,
+ phone: '',
}
},
getagentlist() {
--
Gitblit v1.9.3