From 7bea4880ad378d6a0ffef45f2bb15f92f7b80bd0 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Tue, 16 Jul 2024 10:15:38 +0800
Subject: [PATCH] 123
---
src/assets/logo.png | 0
src/views/newshares/dazonglist.vue | 39 +
.husky/.gitignore | 1
src/views/userlist/index.vue | 91 +++
.env.preview | 4
src/api/home.js | 9
src/views/capital/withdrawallist.vue | 8
.env | 6
src/api/newshares.js | 17
src/views/newshares/dazongshlist.vue | 469 +++++++++++++++++++
src/views/newshares/newshareslist.vue | 57 +
src/views/userlist/agentcomponents/EditAgentinfodialog.vue | 16
public/logo.png | 0
.env.development | 6
src/views/product/shares.vue | 23
src/views/position/createFinancing.vue | 4
src/views/userlist/agentcomponents/addagentdialog.vue | 38 +
src/config/router.config.js | 18
src/views/product/markettrading.vue | 579 ++++++++++++-----------
admin.zip | 0
src/views/userlist/agentlist.vue | 7
21 files changed, 1,051 insertions(+), 341 deletions(-)
diff --git a/.env b/.env
index c1a1d83..43e45e2 100644
--- a/.env
+++ b/.env
@@ -2,8 +2,8 @@
VUE_APP_PREVIEW=true
# VUE_APP_API_BASE_URL= https://www.prudentcapitals.net/
# VUE_APP_API_BASE_URL=http://www.jqydl.com:8091/
- VUE_APP_API_BASE_URL= https://api.dfddgj346.xyz/
+# VUE_APP_API_BASE_URL= https://api.dfddgj346.xyz/
# VUE_APP_API_BASE_URL=https://www.rksv.store:8091/
-# VUE_APP_API_BASE_URL=http://www.ojwuf.com:8091/
-# VUE_APP_API_BASE_URL=https://192.168.0.102:8091/
+ VUE_APP_API_BASE_URL=https://api.pentagon-member.com/
+# VUE_APP_API_BASE_URL=http://192.168.10.5:8091/
# VUE_APP_API_BASE_URL=https://api.guosen.org/
\ No newline at end of file
diff --git a/.env.development b/.env.development
index 07fe279..ad47602 100644
--- a/.env.development
+++ b/.env.development
@@ -4,8 +4,8 @@
# VUE_APP_API_BASE_URL=https://api.3falcon.com/
# VUE_APP_API_BASE_URL=https://api.marwadi.online/
# VUE_APP_API_BASE_URL=https://www.rksv.store:8091/
-# VUE_APP_API_BASE_URL=http://www.ojwuf.com:8091/
-# VUE_APP_API_BASE_URL=http://192.168.0.105:8091/
-VUE_APP_API_BASE_URL=https://api.dfddgj346.xyz/
+# VUE_APP_API_BASE_URL=https://api.dfddgj346.xyz/
+# VUE_APP_API_BASE_URL=http://192.168.10.5:8091/
+VUE_APP_API_BASE_URL=https://api.pentagon-member.com/
# VUE_APP_API_BASE_URL= https://www.prudentcapitals.net/
# VUE_APP_API_BASE_URL=https://api.guosen.org/
\ No newline at end of file
diff --git a/.env.preview b/.env.preview
index 66fda03..86491a8 100644
--- a/.env.preview
+++ b/.env.preview
@@ -2,4 +2,6 @@
VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=https://api.dfddgj346.xyz/
\ No newline at end of file
+VUE_APP_API_BASE_URL=https://api.pentagon-member.com/
+
+# VUE_APP_API_BASE_URL=http://192.168.10.5:8091/
\ No newline at end of file
diff --git a/.husky/.gitignore b/.husky/.gitignore
new file mode 100644
index 0000000..31354ec
--- /dev/null
+++ b/.husky/.gitignore
@@ -0,0 +1 @@
+_
diff --git a/admin.zip b/admin.zip
index 800a8b5..bd81ae3 100644
--- a/admin.zip
+++ b/admin.zip
Binary files differ
diff --git a/public/logo.png b/public/logo.png
index 2fa5713..b0846a6 100644
--- a/public/logo.png
+++ b/public/logo.png
Binary files differ
diff --git a/src/api/home.js b/src/api/home.js
index ac55d95..ce235e0 100644
--- a/src/api/home.js
+++ b/src/api/home.js
@@ -33,6 +33,7 @@
agentdelAgent: '/admin/agent/delAgent.do', // 删除代理
agentupdate: '/admin/agent/update.do', // 修改代理信息
agentadd: '/admin/agent/add.do', // 添加下级代理
+ getParensAgent: '/admin/agent/getParensAgent.do', // 上级代理列表
stockgetMarket: '/api/stock/getMarket.do', // 获取大盘指数行情
adminsetSiteStyle: '/api/admin/setSiteStyle.do', // 设置网站风格
admingetSiteStyle: '/api/admin/getSiteStyle.do', // 获取网站风格
@@ -287,6 +288,14 @@
})
}
+export function getParensAgent(parameter) {
+ return request({
+ url: userApi.getParensAgent,
+ method: 'get',
+ params: parameter
+ })
+}
+
export function stockgetMarket(parameter) {
return request({
url: userApi.stockgetMarket,
diff --git a/src/api/newshares.js b/src/api/newshares.js
index 8e06069..b4d91d3 100644
--- a/src/api/newshares.js
+++ b/src/api/newshares.js
@@ -13,6 +13,9 @@
addByAdmin: '/admin/stockDz/addByAdmin.do', // 大宗交易添加
updateByAdmin: '/admin/stockDz/updateByAdmin.do', // 大宗交易修改
deleteByAdmin: '/admin/stockDz/deleteByAdmin.do', // 大宗交易删除
+ getdazongshlist: '/api/dzCheck/getList.do', // 大宗交易审核列表
+ dazongshcheck:'/api/dzCheck/check.do',//大宗交易审核
+
}
/**
@@ -27,6 +30,20 @@
* @returns {*}
*/
+export function dazongshcheck(parameter) {
+ return request({
+ url: userApi.dazongshcheck,
+ method: 'post',
+ data: qs.stringify(parameter),
+ })
+}
+export function getdazongshlist(parameter) {
+ return request({
+ url: userApi.getdazongshlist,
+ method: 'post',
+ data: qs.stringify(parameter),
+ })
+}
export function subscribelist(parameter) {
return request({
url: userApi.subscribelist,
diff --git a/src/assets/logo.png b/src/assets/logo.png
index 2fa5713..b0846a6 100644
--- a/src/assets/logo.png
+++ b/src/assets/logo.png
Binary files differ
diff --git a/src/config/router.config.js b/src/config/router.config.js
index 6b033cf..d4d1d3a 100644
--- a/src/config/router.config.js
+++ b/src/config/router.config.js
@@ -171,12 +171,12 @@
component: () => import('@/views/position/financing'),
meta: { title: '持仓管理', keepAlive: true, permission: ['financing'] },
},
- // {
- // path: '/position/createfinancing',
- // name: 'createfinancing',
- // component: () => import('@/views/position/createFinancing'),
- // meta: { title: '创建股票持仓', keepAlive: true, permission: ['createfinancing'] },
- // },
+ {
+ path: '/position/createfinancing',
+ name: 'createfinancing',
+ component: () => import('@/views/position/createFinancing'),
+ meta: { title: '创建股票持仓', keepAlive: true, permission: ['createfinancing'] },
+ },
],
},
// 新股管理
@@ -204,6 +204,12 @@
component: () => import('@/views/newshares/dazonglist'),
meta: { title: '大宗交易列表', keepAlive: true, permission: ['dazonglist'] },
},
+ {
+ path: '/newshares/dazongshlist',
+ name: 'dazongshlist',
+ component: () => import('@/views/newshares/dazongshlist'),
+ meta: { title: '大宗交易审核列表', keepAlive: true, permission: ['dazongshlist'] },
+ },
],
},
// 资金管理
diff --git a/src/views/capital/withdrawallist.vue b/src/views/capital/withdrawallist.vue
index 7522196..f9735f7 100644
--- a/src/views/capital/withdrawallist.vue
+++ b/src/views/capital/withdrawallist.vue
@@ -113,7 +113,7 @@
</span>
<template slot="action" slot-scope="text, record" v-if="record.withStatus == 0">
- <a slot="action" href="javascript:;" @click="getEditorder(record.id)">审核</a>
+ <a slot="action" href="javascript:;" @click="getEditorder(record)">审核</a>
</template>
</a-table>
</a-card>
@@ -302,7 +302,7 @@
editOrderdialog: false,
editOrderDialogloading: false,
fields: ['withId', 'state'],
-
+ withId:'',
agentqueryParam: {
pageNum: 1,
pageSize: 100,
@@ -320,9 +320,10 @@
},
// 点击修改提现状态
getEditorder(val) {
+ this.withId = val.id
this.editOrderdialog = true
this.fields.forEach((v) => this.editOrderform.getFieldDecorator(v))
- this.editOrderform.setFieldsValue(pick({ withId: val }, this.fields))
+ this.editOrderform.setFieldsValue(pick({ withId: val.withAmt }, this.fields))
},
// 开始更改提现状态
OkeditOrderdialog(e) {
@@ -331,6 +332,7 @@
if (!errors) {
this.editOrderDialogloading = true
values.state = e
+ values.withId = this.withId
withdrawupdateState(values)
.then((res) => {
if (res.status == 0) {
diff --git a/src/views/newshares/dazonglist.vue b/src/views/newshares/dazonglist.vue
index 7f19967..3a62e7a 100644
--- a/src/views/newshares/dazonglist.vue
+++ b/src/views/newshares/dazonglist.vue
@@ -104,18 +104,18 @@
<a-form-item label="交易密钥" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入交易密钥"
- v-decorator="['password', { rules: [{ required: true, message: '请输入交易密钥' }] }]"
+ v-decorator="['password']"
/>
</a-form-item>
</a-col>
- <a-col :md="12" :lg="12" :sm="12">
+ <!-- <a-col :md="12" :lg="12" :sm="12">
<a-form-item label="折扣" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入折扣(例:0.8)"
v-decorator="['discount', { rules: [{ required: true, message: '请输入折扣' }] }]"
/>
</a-form-item>
- </a-col>
+ </a-col> -->
</a-row>
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
@@ -149,6 +149,27 @@
<a-input
placeholder="请输入周期"
v-decorator="['period', { rules: [{ required: true, message: '请输入周期' }] }]"
+ />
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="审核开关" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-select
+ placeholder="请选择审核开关"
+ v-decorator="['switchType', { rules: [{ required: true, message: '请选择审核开关' }] }]"
+ >
+ <a-select-option :value="1">开启</a-select-option>
+ <a-select-option :value="0">关闭</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ <a-row>
+ <a-col :md="12" :lg="11" :sm="12">
+ <a-form-item label="价格" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入价格"
+ v-decorator="['nowPrice', { rules: [{ required: true, message: '请输入价格' }] }]"
/>
</a-form-item>
</a-col>
@@ -186,11 +207,11 @@
dataIndex: 'period',
align: 'center',
},
- {
- title: '折扣',
- dataIndex: 'discount',
- align: 'center',
- },
+ // {
+ // title: '折扣',
+ // dataIndex: 'discount',
+ // align: 'center',
+ // },
{
title: '股票类型',
dataIndex: 'stockType',
@@ -252,7 +273,7 @@
addUserform: this.$form.createForm(this),
addUserdialog: false,
addUserDialogloading: false,
- fields: ['stockCode', 'stockNum', 'password', 'startTime', 'endTime', 'discount', 'period'],
+ fields: ['stockCode', 'stockNum', 'password', 'startTime', 'endTime', 'discount', 'period','switchType','nowPrice'],
currentdetail: '',
startTime: '',
endTime: '',
diff --git a/src/views/newshares/dazongshlist.vue b/src/views/newshares/dazongshlist.vue
new file mode 100644
index 0000000..f644abf
--- /dev/null
+++ b/src/views/newshares/dazongshlist.vue
@@ -0,0 +1,469 @@
+<template>
+ <page-header-wrapper>
+ <a-card :bordered="false">
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline">
+ <a-row :gutter="48">
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="审核状态">
+ <a-select v-model="queryParam.type" placeholder="请选择审核状态">
+ <a-select-option :value="''">全部</a-select-option>
+ <a-select-option :value="2">已拒绝</a-select-option>
+ <a-select-option :value="1">已通过</a-select-option>
+ <a-select-option :value="0">待审核</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item>
+ <span class="table-page-search-submitButtons">
+ <a-button @click="getqueryParam" icon="redo"> 重置</a-button>
+ <a-button
+ type="primary"
+ icon="search"
+ style="margin-left: 8px"
+ @click=";(queryParam.pageNum = 1), getlist()"
+ >查询
+ </a-button>
+ </span>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form>
+ </div>
+ </a-card>
+ <a-card :bordered="false">
+ <a-table
+ bordered
+ :loading="loading"
+ :pagination="pagination"
+ :columns="columns"
+ :data-source="datalist"
+ rowKey="id"
+ >
+
+ <span slot="checkType" slot-scope="text, record">
+ <template>
+ <div>
+ <span v-if="record.checkType==0">待审核</span>
+ <span v-if="record.checkType==1">成功</span>
+ <span v-if="record.checkType==2">失败</span>
+ </div>
+ </template>
+ </span>
+ <template slot="action" slot-scope="text, record">
+ <a slot="action" href="javascript:;" @click="getdeleteStock(record,1)">{{ '通过' }}</a>
+ <a-divider type="vertical" />
+ <a slot="action" href="javascript:;" @click="getdeleteStock(record,2)">{{ '拒绝' }}</a>
+ </template>
+ </a-table>
+ </a-card>
+
+ <a-modal
+ title="大宗审核"
+ :width="700"
+ :visible="addUserdialog"
+ :confirmLoading="addUserDialogloading"
+ @ok="OkaddUserdialog"
+ @cancel="addUserdialog = false"
+ >
+ <a-form >
+ <a-row :gutter="48">
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="通过股数" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入通过股数"
+ v-model="num"
+ v-decorator="['num', { rules: [{ required: true, message: '请输入通过股数' }] }]"
+ />
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form>
+ </a-modal>
+ </page-header-wrapper>
+</template>
+<script>
+import { getdazongshlist,dazongshcheck } from '@/api/newshares'
+import { nextagent } from '@/api/home'
+import moment from 'moment'
+export default {
+ name: 'Financinghold',
+ data() {
+ return {
+ columns: [
+ {
+ title: '融资名称',
+ dataIndex: 'stockName',
+ align: 'center',
+ width: 180,
+ scopedSlots: { customRender: 'stockName' },
+ },
+ {
+ title: '账户类型',
+ dataIndex: 'positionType',
+ align: 'center',
+ scopedSlots: { customRender: 'positionType' },
+ },
+ {
+ title: '用户名称(ID)',
+ dataIndex: 'nickName',
+ align: 'center',
+ customRender: (text, row, index) => {
+ return `${row.nickName}(${row.userId})`
+ },
+ },
+ // {
+ // title: '持仓订单号(ID)',
+ // dataIndex: 'positionSn',
+ // align: 'center',
+ // customRender: (text, row, index) => {
+ // return `${row.positionSn}(${row.id})`
+ // },
+ // },
+ // {
+ // title: '买卖方向',
+ // dataIndex: 'orderDirection',
+ // align: 'center',
+ // scopedSlots: { customRender: 'orderDirection' },
+ // },
+ {
+ title: '买入价',
+ dataIndex: 'buyOrderPrice',
+ align: 'center',
+ customRender: (text, row, index) => {
+ return text.toFixed(2)
+ },
+ },
+ // {
+ // title: '现价',
+ // dataIndex: 'now_price',
+ // align: 'center',
+ // scopedSlots: { customRender: 'now_price' },
+ // },
+ // {
+ // title: '浮动盈亏',
+ // dataIndex: 'profitAndLose',
+ // align: 'center',
+ // scopedSlots: { customRender: 'profitAndLose' },
+ // },
+ // {
+ // title: '总盈亏',
+ // dataIndex: 'allProfitAndLose',
+ // align: 'center',
+ // scopedSlots: { customRender: 'allProfitAndLose' },
+ // },
+ {
+ title: '数量(股)',
+ dataIndex: 'orderNum',
+ align: 'center',
+ },
+ {
+ title: '总市值',
+ dataIndex: 'orderTotalPrice',
+ align: 'center',
+ },
+ {
+ title: '订单状态',
+ dataIndex: 'checkType',
+ align: 'center',
+ scopedSlots: { customRender: 'checkType' },
+ },
+ // {
+ // title: '杠杆倍数',
+ // dataIndex: 'orderLever',
+ // align: 'center',
+ // },
+ // {
+ // title: '手续费',
+ // dataIndex: 'orderFee',
+ // align: 'center',
+ // },
+ // {
+ // title: '印花税',
+ // dataIndex: 'orderSpread',
+ // align: 'center',
+ // },
+ // {
+ // title: '留仓费',
+ // dataIndex: 'orderStayFee',
+ // align: 'center',
+ // },
+ // {
+ // title: '留仓天数',
+ // dataIndex: 'orderStayDays',
+ // align: 'center',
+ // },
+ // {
+ // title: '锁定原因',
+ // dataIndex: 'lockMsg',
+ // align: 'center',
+ // },
+ {
+ title: '买入时间',
+ dataIndex: 'buyOrderTime',
+ align: 'center',
+ width: 180,
+ customRender: (text, row, index) => {
+ return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
+ },
+ },
+ {
+ title: '操作',
+ key: 'action',
+ align: 'center',
+ fixed: 'right',
+ width: 150,
+ scopedSlots: { customRender: 'action' },
+ },
+ ],
+ // 表头
+ pagination: {
+ total: 0,
+ pageSize: 10, // 每页中显示10条数据
+ showSizeChanger: true,
+ pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
+ onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
+ onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
+ showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+ },
+ loading: false,
+ queryParam: {
+ pageNum: 1,
+ pageSize: 10,
+ type:'',
+ positionType: '',
+ agentId: undefined,
+ userId: '',
+ positionSn: '',
+ state: 0,
+ phone: '',
+ },
+ labelCol: {
+ xs: { span: 8 },
+ sm: { span: 8 },
+ md: { span: 8 },
+ },
+ wrapperCol: {
+ xs: { span: 14 },
+ sm: { span: 14 },
+ md: { span: 14 },
+ },
+ id:'',
+ datalist: [],
+ addUserdialog: false,
+ addUserDialogloading: false,
+ agentlist: [],
+ agentloading: false,
+ Lockvisibledialog: false,
+ Lockvisibleloading: false,
+ Lockvisibleform: this.$form.createForm(this),
+ clickpositionId: '',
+ num:'',
+ agentqueryParam: {
+ pageNum: 1,
+ pageSize: 100,
+ },
+ }
+ },
+ created() {
+ this.getlist()
+ },
+ methods: {
+ OkaddUserdialog(item,e){
+ var data = {
+ id: this.id,
+ checkType:1,
+ orderNum:this.num
+ }
+ dazongshcheck(data)
+ .then((res) => {
+ if (res.status == 0) {
+ this.$message.success(res.msg)
+ this.addUserdialog = false
+ this.getlist()
+ } else {
+ this.addUserdialog = false
+ this.$message.error({ content: res.msg })
+ }
+ this.num = ''
+ })
+ .catch((error) => {
+ this.$message.error({ content: 'res.data' })
+ })
+ },
+ getdeleteStock(item,e){
+ this.id = item.id
+ if(e==2){
+ var data = {
+ id: item.id,
+ checkType:e,
+ orderNum:this.num
+ }
+ dazongshcheck(data)
+ .then((res) => {
+ if (res.status == 0) {
+ this.$message.success(res.data)
+ this.getlist()
+ } else {
+ this.$message.error({ content: res.msg })
+ }
+ })
+ .catch((error) => {
+ this.$message.error({ content: 'res.data' })
+ }).finally(()=>{
+ this.addUserdialog = !this.addUserdialog
+ })
+ }else{
+ this.addUserdialog = true
+ }
+ },
+ getCompulsoryclosing(val) {
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认要强制平仓吗?',
+ onOk() {
+ var data = {
+ positionSn: val,
+ }
+ positionsell(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')
+ },
+ })
+ },
+ getLockopen(val) {
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认要解锁该持仓单?',
+ onOk() {
+ var data = {
+ state: 0,
+ positionId: val,
+ }
+ positionlock(data).then((res) => {
+ if (res.status == 0) {
+ that.$message.success(res.msg)
+ that.getlist()
+ } else {
+ that.$message.error(res.msg)
+ }
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
+ handleCancel() {
+ this.Lockvisibledialog = false
+ const form = this.$refs.createModal.form
+ form.resetFields()
+ },
+ getDialogok() {
+ const form = this.$refs.createModal.form
+ form.validateFields((errors, values) => {
+ if (!errors) {
+ this.Lockvisibleloading = true
+ var data = {
+ state: 1,
+ lockMsg: values.lockMsg,
+ positionId: this.clickpositionId,
+ }
+ positionlock(data)
+ .then((res) => {
+ if (res.status == 0) {
+ this.Lockvisibledialog = false
+ this.$message.success(res.msg)
+ form.resetFields()
+ this.getlist()
+ } else {
+ this.$message.error(res.msg)
+ }
+ this.Lockvisibleloading = false
+ })
+ .catch((error) => {
+ reject(error)
+ })
+ }
+ })
+ },
+ getinit() {
+ this.queryParam = {
+ pageNum: 1,
+ pageSize: 10,
+ positionType: '',
+ agentId: undefined,
+ userId: '',
+ positionSn: '',
+ state: 0,
+ phone: '',
+ }
+ this.getlist()
+ },
+ getqueryParam() {
+ this.queryParam = {
+ pageNum: 1,
+ pageSize: 10,
+ positionType: '',
+ agentId: undefined,
+ userId: '',
+ positionSn: '',
+ state: 0,
+ phone: '',
+ }
+ },
+ getagentlist() {
+ var that = this
+ this.agentloading = true
+ nextagent(this.agentqueryParam).then((res) => {
+ this.agentlist = res.data.list
+ setTimeout(() => {
+ that.agentloading = false
+ }, 500)
+ })
+ },
+ getlist() {
+ this.loading = true
+ getdazongshlist(this.queryParam).then((res) => {
+ this.datalist = res.data.records
+ this.pagination.total = res.data.total
+ this.loading = false
+ })
+ },
+ onPageChange(page, pageSize) {
+ this.queryParam.pageNum = page
+ this.getlist()
+ },
+ onSizeChange(current, pageSize) {
+ this.queryParam.pageNum = current
+ this.queryParam.pageSize = pageSize
+ this.getlist()
+ },
+ },
+}
+</script>
+<style scoped>
+.greens {
+ color: #52c41a;
+}
+
+.reds {
+ color: #f5222d;
+}
+</style>
+
diff --git a/src/views/newshares/newshareslist.vue b/src/views/newshares/newshareslist.vue
index 8a4a561..50e2bee 100644
--- a/src/views/newshares/newshareslist.vue
+++ b/src/views/newshares/newshareslist.vue
@@ -96,15 +96,7 @@
</div>
</template>
</span>
- <span slot="stockType" slot-scope="text, record">
- <template>
- <div>
- <a-tag :color="record.stockType == 'sh' ? 'purple' : record.stockType == 'sz' ? 'blue' : ''">
- {{ record.stockType == 'sh' ? '沪股' : record.stockType == 'sz' ? '深股' : record.stockType }}
- </a-tag>
- </div>
- </template>
- </span>
+
<template slot="action" slot-scope="text, record">
<a slot="action" href="javascript:;" @click="geteditStock(record)">{{ '修改新股' }}</a>
@@ -222,13 +214,33 @@
</a-date-picker>
</a-form-item>
</a-col>
- <!-- <a-col :md="12" :lg="12" :sm="12">
- <a-form-item label="预估价格" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入预估价格"
- v-decorator="['pe', { rules: [{ required: true, message: '请输入预估价格', }] }]" />
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="新股市场" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-select
+ placeholder="请选择新股市场"
+ v-decorator="['stockType', { rules: [{ required: true, message: '新股市场' }] }]"
+ >
+ <a-select-option value="nse">nse</a-select-option>
+ <a-select-option value="bse">bse</a-select-option>
+ </a-select>
</a-form-item>
- </a-col> -->
+ </a-col>
+ </a-row>
+ <a-row :gutter="48">
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="最低买入价格" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入最低买入价格"
+ v-decorator="['minPrice' ]" />
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="密钥" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入密钥"
+ v-decorator="['password' ]" />
+ </a-form-item>
+ </a-col>
</a-row>
</a-form>
</a-modal>
@@ -276,12 +288,12 @@
align: 'center',
scopedSlots: { customRender: 'type' },
},
- // {
- // title: '股票类型',
- // dataIndex: 'stockType',
- // align: 'center',
- // scopedSlots: { customRender: 'stockType' },
- // },
+ {
+ title: '股票类型',
+ dataIndex: 'stockType',
+ align: 'center',
+ scopedSlots: { customRender: 'stockType' },
+ },
{
title: '结束时间',
@@ -334,6 +346,7 @@
name: '',
zt: undefined,
type: undefined,
+ stockType:undefined,
},
datalist: [],
labelCol: {
@@ -363,6 +376,8 @@
'code',
'pe',
'listDate',
+ 'password',
+ 'minPrice'
],
currentdetail: '',
subscribeTime: '',
diff --git a/src/views/position/createFinancing.vue b/src/views/position/createFinancing.vue
index 76a6ab6..ac3d467 100644
--- a/src/views/position/createFinancing.vue
+++ b/src/views/position/createFinancing.vue
@@ -93,11 +93,11 @@
/>
</a-form-item>
</a-col>
- <a-col :md="12" :lg="6" :sm="24">
+ <a-col :md="12" :lg="6" :sm="24" style="display: none;">
<a-form-item label="杠杆倍数">
<a-input
placeholder="输入买入杠杆倍数"
- v-decorator="['lever', { rules: [{ required: true, message: '输入买入杠杆倍数' }] }]"
+ v-decorator="['lever']"
/>
</a-form-item>
</a-col>
diff --git a/src/views/product/markettrading.vue b/src/views/product/markettrading.vue
index 1f8c8fe..9aa1ffe 100644
--- a/src/views/product/markettrading.vue
+++ b/src/views/product/markettrading.vue
@@ -43,14 +43,9 @@
</span>
</a-form-item> -->
- <a-button
- type="primary"
- icon="plus"
- style="margin-left: 8px"
- @click=";(addUserdialog = true), (currentdetail = '')"
- >
- 添加盘前</a-button
- >
+ <a-button type="primary" icon="plus" style="margin-left: 8px"
+ @click=";(addUserdialog = true), (currentdetail = '')">
+ 添加盘前</a-button>
</a-col>
</a-row>
<!-- </a-form> -->
@@ -58,15 +53,9 @@
</a-card>
<a-card :bordered="false">
- <a-table
- bordered
- :loading="loading"
- :pagination="pagination"
- :columns="columns"
- :data-source="datalist"
- rowKey="newlistId"
- >
- <span slot="type" slot-scope="text, record">
+ <a-table bordered :loading="loading" :pagination="pagination" :columns="columns" :data-source="datalist"
+ rowKey="newlistId">
+ <!-- <span slot="type" slot-scope="text, record">
<template>
<div>
<a-tag>
@@ -74,7 +63,7 @@
</a-tag>
</div>
</template>
- </span>
+ </span> -->
<template slot="action" slot-scope="text, record">
<a slot="action" href="javascript:;" @click="geteditStock(record)">{{ '修改盘前' }}</a>
@@ -84,40 +73,28 @@
</a-table>
</a-card>
- <a-modal
- :title="currentdetail ? '修改盘前' : '添加盘前'"
- :width="700"
- :visible="addUserdialog"
- :confirmLoading="addUserDialogloading"
- @ok="OkaddUserdialog"
- @cancel="CanceladdUserdialog"
- >
+ <a-modal :title="currentdetail ? '修改盘前' : '添加盘前'" :width="700" :visible="addUserdialog"
+ :confirmLoading="addUserDialogloading" @ok="OkaddUserdialog" @cancel="CanceladdUserdialog">
<a-form :form="addUserform" ref="addUserform">
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="股票代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入股票代码"
- v-decorator="['stockCode', { rules: [{ required: true, message: '请输入股票代码' }] }]"
- />
+ <a-input placeholder="请输入股票代码"
+ v-decorator="['stockCode', { rules: [{ required: true, message: '请输入股票代码' }] }]" />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="股票名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入股票名称"
- v-decorator="['stockName', { rules: [{ required: true, message: '请输入股票名称' }] }]"
- />
+ <a-input placeholder="请输入股票名称"
+ v-decorator="['stockName', { rules: [{ required: true, message: '请输入股票名称' }] }]" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="盘前价格" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入盘前价格"
- v-decorator="['price', { rules: [{ required: true, message: '请输入盘前价格' }] }]"
- />
+ <a-input placeholder="请输入盘前价格"
+ v-decorator="['price', { rules: [{ required: true, message: '请输入盘前价格' }] }]" />
</a-form-item>
</a-col>
<!-- <a-col :md="12" :lg="12" :sm="12">
@@ -134,20 +111,40 @@
</a-col> -->
</a-row>
<a-row :gutter="48">
- <a-col :md="12" :lg="12" :sm="12">
+ <!-- <a-col :md="12" :lg="12" :sm="12">
<a-form-item label="股票开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入股票调价开始时间"
+ <a-time-picker :needConfirm="true" placeholder="请选择时间"
+ @change="getstartTime"
v-decorator="['startTime', { rules: [{ required: true, message: '请输入股票调价开始时间' }] }]"
- />
+ format="HH:mm:ss" />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="股票结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input
- placeholder="请输入股票结束时间"
+ <a-time-picker placeholder="请选择时间" :needConfirm="true"
+ @change="getendTime"
v-decorator="['endTime', { rules: [{ required: true, message: '请输入股票结束时间' }] }]"
- />
+ format="HH:mm:ss" />
+ </a-form-item>
+ </a-col> -->
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="股票开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-date-picker show-time :needConfirm="true" @change="changeStartTime"
+ v-model:value="startTime" format="YYYY-MM-DD HH:mm:ss" />
+<!-- <a-input-->
+<!-- placeholder="请输入时间 例 12:00"-->
+<!-- v-decorator="['startTime', { rules: [{ required: true, message: '请输入股票调价开始时间' }] }]"-->
+<!-- />-->
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="股票结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
+<!-- <a-input-->
+<!-- placeholder="请输入时间 例 12:00"-->
+<!-- v-decorator="['endTime', { rules: [{ required: true, message: '请输入股票结束时间' }] }]"-->
+<!-- />-->
+ <a-date-picker show-time :needConfirm="true" @change="changeEndTime"
+ v-model:value="endTime" format="YYYY-MM-DD HH:mm:ss" />
</a-form-item>
</a-col>
</a-row>
@@ -156,242 +153,274 @@
</page-header-wrapper>
</template>
<script>
-import { SettingqueryAll, stockupdata, stockadd, stockdelete } from '@/api/allsetting'
-import moment from 'moment'
-import pick from 'lodash.pick'
-export default {
- name: 'Shares',
- data() {
- return {
- columns: [
- {
- title: '股票代码',
- dataIndex: 'stockCode',
- align: 'center',
- },
- {
- title: '股票名称',
- dataIndex: 'stockName',
- align: 'center',
- },
- {
- title: '股票开始时间',
- dataIndex: 'startTime',
- align: 'center',
- },
- {
- title: '股票结束时间',
- dataIndex: 'endTime',
- align: 'center',
- },
- {
- title: '类型',
- dataIndex: 'type',
- align: 'center',
- scopedSlots: { customRender: 'type' },
- },
- {
- title: '金额',
- dataIndex: 'price',
- align: 'center',
- },
+ import {
+ SettingqueryAll,
+ stockupdata,
+ stockadd,
+ stockdelete
+ } from '@/api/allsetting'
+ import moment from 'moment'
+ import pick from 'lodash.pick'
+ export default {
+ name: 'Shares',
+ data() {
+ return {
+ columns: [{
+ title: '股票代码',
+ dataIndex: 'stockCode',
+ align: 'center',
+ },
+ {
+ title: '股票名称',
+ dataIndex: 'stockName',
+ align: 'center',
+ },
+ {
+ title: '股票开始时间',
+ dataIndex: 'startTime',
+ align: 'center',
+ },
+ {
+ title: '股票结束时间',
+ dataIndex: 'endTime',
+ align: 'center',
+ },
+ // {
+ // title: '类型',
+ // dataIndex: 'type',
+ // align: 'center',
+ // scopedSlots: {
+ // customRender: 'type'
+ // },
+ // },
+ {
+ title: '金额',
+ dataIndex: 'price',
+ align: 'center',
+ },
- {
- title: '操作',
- key: 'action',
- align: 'center',
- scopedSlots: {
- customRender: 'action',
+ {
+ title: '操作',
+ key: 'action',
+ align: 'center',
+ scopedSlots: {
+ customRender: 'action',
+ },
+ },
+ ],
+ disabledDate: true,
+ // 表头
+ pagination: {
+ total: 0,
+ current: 1,
+ pageSize: 10, // 每页中显示10条数据
+ showSizeChanger: true,
+ pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
+ onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
+ onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
+ showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+ },
+ loading: false,
+ typeValue: 0,
+ queryParam: {
+ pageNum: 1,
+ pageSize: 10,
+ code: '',
+ name: '',
+ zt: undefined,
+ type: 0,
+ },
+ datalist: [],
+ labelCol: {
+ xs: {
+ span: 8,
+ },
+ sm: {
+ span: 8,
+ },
+ md: {
+ span: 8,
},
},
- ],
- disabledDate: true,
- // 表头
- pagination: {
- total: 0,
- current: 1,
- pageSize: 10, // 每页中显示10条数据
- showSizeChanger: true,
- pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
- onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
- onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
- showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
- },
- loading: false,
- typeValue: 0,
- queryParam: {
- pageNum: 1,
- pageSize: 10,
- code: '',
- name: '',
- zt: undefined,
- type: 0,
- },
- datalist: [],
- labelCol: {
- xs: {
- span: 8,
+ wrapperCol: {
+ xs: {
+ span: 14,
+ },
+ sm: {
+ span: 14,
+ },
+ md: {
+ span: 14,
+ },
},
- sm: {
- span: 8,
- },
- md: {
- span: 8,
- },
- },
- wrapperCol: {
- xs: {
- span: 14,
- },
- sm: {
- span: 14,
- },
- md: {
- span: 14,
- },
- },
- addUserform: this.$form.createForm(this),
- addUserdialog: false,
- addUserDialogloading: false,
-
- fields: ['stockCode', 'stockName', 'startTime', 'endTime', 'type', 'price'],
- currentdetail: '',
- subscribeTime: '',
- subscriptionTime: '',
- }
- },
- created() {
- this.getlist()
- },
- methods: {
- getdeleteStock(val) {
- var that = this
- this.$confirm({
- title: '提示',
- content: '确认删除该盘前吗?此操作不可恢复!',
- onOk() {
- var data = {
- id: val.id,
- }
- stockdelete(data).then((res) => {
- if (res.status == 0) {
- that.$message.success({
- content: res.msg,
- duration: 2,
- })
- that.getinit()
- } else {
- that.$message.error({
- content: res.msg,
- })
- }
- })
- },
- onCancel() {
- console.log('Cancel')
- },
- })
- },
- getsubscribeTime(date, dateString) {
- this.subscribeTime = dateString
- },
- getsubscriptionTime(date, dateString) {
- this.subscriptionTime = dateString
- },
- geteditStock(val) {
- this.currentdetail = val
- this.addUserdialog = true
- var currentTime = new Date()
- this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
- this.addUserform.setFieldsValue(pick(val, this.fields))
- this.addUserform.setFieldsValue({
- subscriptionTime: moment(val.subscriptionTime ? val.subscriptionTime : currentTime).format(
- 'YYYY-MM-DD HH:mm:ss'
- ),
- })
- this.addUserform.setFieldsValue({
- subscribeTime: moment(val.subscribeTime ? val.subscribeTime : currentTime).format('YYYY-MM-DD HH:mm:ss'),
- })
- },
- CanceladdUserdialog() {
- this.addUserdialog = false
- const form = this.$refs.addUserform.form
- form.resetFields()
- },
- OkaddUserdialog() {
- const form = this.$refs.addUserform.form
-
- form.validateFields((errors, values) => {
- values.type = 0
- if (!errors) {
- if (this.currentdetail != '') {
- this.addUserDialogloading = true
- values.id = this.currentdetail.id
-
- // values.subscriptionTime = this.subscriptionTime
- // values.subscribeTime = this.subscribeTime
- stockupdata(values).then((res) => {
- if (res.status == 0) {
- this.addUserdialog = false
- this.$message.success('修改成功')
- form.resetFields()
- this.getlist()
- } else {
- this.$message.error(res.msg)
- }
- this.addUserDialogloading = false
- })
- } else {
- this.addUserDialogloading = true
- stockadd(values).then((res) => {
- if (res.status == 0) {
- this.addUserdialog = false
- this.$message.success(res.msg)
- form.resetFields()
- this.getinit()
- } else {
- this.$message.error(res.msg)
- }
- this.addUserDialogloading = false
- })
- }
- }
- })
- },
- getqueryParam() {
- this.queryParam = {
- pageNum: 1,
- pageSize: 10,
- code: '',
- name: '',
- zt: undefined,
- type: undefined,
+ addUserform: this.$form.createForm(this),
+ addUserdialog: false,
+ addUserDialogloading: false,
+ endTime:'',
+ startTime:'',
+ fields: ['stockCode', 'stockName', 'startTime', 'endTime', 'type', 'price'],
+ currentdetail: '',
+ subscribeTime: '',
+ subscriptionTime: '',
}
},
- getinit() {
- this.getqueryParam()
- this.pagination.current = 1
+ created() {
this.getlist()
},
- getlist() {
- this.loading = true
- SettingqueryAll(this.queryParam).then((res) => {
- this.datalist = res.data
- this.pagination.total = res.data.total
- this.loading = false
- })
+ methods: {
+ changeEndTime(time,timeString){
+ this.endTime = timeString
+ },
+ changeStartTime(time,timeString){
+ this.startTime = timeString
+ },
+ getdeleteStock(val) {
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认删除该盘前吗?此操作不可恢复!',
+ onOk() {
+ var data = {
+ id: val.id,
+ }
+ stockdelete(data).then((res) => {
+ if (res.status == 0) {
+ that.$message.success({
+ content: res.msg,
+ duration: 2,
+ })
+ that.getinit()
+ } else {
+ that.$message.error({
+ content: res.msg,
+ })
+ }
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
+ getendTime(date, dateString) {
+ console.log(date, dateString);
+ this.endTime = dateString
+ },
+
+ getstartTime(date, dateString) {
+ this.startTime = dateString
+ },
+ getsubscribeTime(date, dateString) {
+ this.subscribeTime = dateString
+ },
+ getsubscriptionTime(date, dateString) {
+ this.subscriptionTime = dateString
+ },
+ geteditStock(val) {
+ this.currentdetail = val
+ this.addUserdialog = true
+ var currentTime = new Date()
+ this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
+ this.addUserform.setFieldsValue(pick(val, this.fields))
+ this.addUserform.setFieldsValue({
+ subscriptionTime: moment(val.subscriptionTime ? val.subscriptionTime : currentTime).format(
+ 'YYYY-MM-DD HH:mm:ss'
+ ),
+ })
+ this.addUserform.setFieldsValue({
+ subscribeTime: moment(val.subscribeTime ? val.subscribeTime : currentTime).format('YYYY-MM-DD HH:mm:ss'),
+ })
+ // this.addUserform.setFieldsValue({
+ // endTime: moment(val.endTime ? val.endTime : currentTime).format('HH:mm:ss'),
+ // // endTime: moment(currentTime).format('YYYY-MM-DD HH:mm:ss')
+ // })
+ // this.addUserform.setFieldsValue({
+ // startTime: moment(val.startTime ? val.startTime : currentTime).format('HH:mm:ss'),
+ // })
+
+ },
+ CanceladdUserdialog() {
+ this.addUserdialog = false
+ const form = this.$refs.addUserform.form
+ form.resetFields()
+ },
+ OkaddUserdialog() {
+ const form = this.$refs.addUserform.form
+
+ form.validateFields((errors, values) => {
+ values.type = 0
+ if (!errors) {
+ if (this.currentdetail != '') {
+ this.addUserDialogloading = true
+ values.id = this.currentdetail.id
+ values.endTime = this.endTime
+ values.startTime = this.startTime
+ // values.subscriptionTime = this.endTime
+ // values.subscribeTime = this.startTime
+ stockupdata(values).then((res) => {
+ if (res.status == 0) {
+ this.addUserdialog = false
+ this.$message.success('修改成功')
+ form.resetFields()
+ this.getlist()
+ } else {
+ this.$message.error(res.msg)
+ }
+ this.addUserDialogloading = false
+ })
+ } else {
+ this.addUserDialogloading = true
+ values.endTime = this.endTime
+ values.startTime = this.startTime
+ stockadd(values).then((res) => {
+ if (res.status == 0) {
+ this.addUserdialog = false
+ this.$message.success(res.msg)
+ form.resetFields()
+ this.getinit()
+ } else {
+ this.$message.error(res.msg)
+ }
+ this.addUserDialogloading = false
+ })
+ }
+ }
+ })
+ },
+ getqueryParam() {
+ this.queryParam = {
+ pageNum: 1,
+ pageSize: 10,
+ code: '',
+ name: '',
+ zt: undefined,
+ type: undefined,
+ }
+ },
+ getinit() {
+ this.getqueryParam()
+ this.pagination.current = 1
+ this.getlist()
+ },
+ getlist() {
+ this.loading = true
+ SettingqueryAll(this.queryParam).then((res) => {
+ this.datalist = res.data
+ this.pagination.total = res.data.total
+ this.loading = false
+ })
+ },
+ onPageChange(page, pageSize) {
+ this.queryParam.pageNum = page
+ this.pagination.current = page
+ this.getlist()
+ },
+ onSizeChange(current, pageSize) {
+ this.queryParam.pageNum = current
+ this.pagination.current = page
+ this.queryParam.pageSize = pageSize
+ this.getlist()
+ },
},
- onPageChange(page, pageSize) {
- this.queryParam.pageNum = page
- this.pagination.current = page
- this.getlist()
- },
- onSizeChange(current, pageSize) {
- this.queryParam.pageNum = current
- this.pagination.current = page
- this.queryParam.pageSize = pageSize
- this.getlist()
- },
- },
-}
-</script>
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/product/shares.vue b/src/views/product/shares.vue
index 6b753bc..d6934b9 100644
--- a/src/views/product/shares.vue
+++ b/src/views/product/shares.vue
@@ -12,6 +12,15 @@
</a-select>
</a-form-item>
</a-col>
+
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="股票市场">
+ <a-select v-model="queryParam.stockGid" placeholder="请选择股票市场">
+ <a-select-option value="nse">nse</a-select-option>
+ <a-select-option value="bse">bse</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
<a-col :md="12" :lg="6" :sm="24">
<a-form-item label="显示状态">
@@ -264,12 +273,12 @@
align: 'center',
scopedSlots: { customRender: 'stockName' },
},
- // {
- // title: '沪深京股',
- // dataIndex: 'stockType',
- // align: 'center',
- // scopedSlots: { customRender: 'stockType' }
- // },
+ {
+ title: '股票市场',
+ dataIndex: 'stockGid',
+ align: 'center',
+ scopedSlots: { customRender: 'stockGid' }
+ },
{
title: '现价',
dataIndex: 'nowPrice',
@@ -342,6 +351,7 @@
stockType: undefined,
showState: undefined,
lockState: undefined,
+ stockGid: undefined
},
datalist: [],
labelCol: {
@@ -435,6 +445,7 @@
stockType: undefined,
showState: undefined,
lockState: undefined,
+ stockGid:undefined
}
},
getinit() {
diff --git a/src/views/userlist/agentcomponents/EditAgentinfodialog.vue b/src/views/userlist/agentcomponents/EditAgentinfodialog.vue
index cbfcca5..daa26aa 100644
--- a/src/views/userlist/agentcomponents/EditAgentinfodialog.vue
+++ b/src/views/userlist/agentcomponents/EditAgentinfodialog.vue
@@ -36,6 +36,12 @@
v-decorator="['onLineServices', { rules: [{ required: true, message: '请输入客服链接' }] }]"
/>
</a-form-item>
+ <a-form-item label="代理编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入代理编码"
+ v-decorator="['agentCode', { rules: [{ validator: checkSixDigitNumber,required: true, message: '请输入六位数字' }] }]"
+ />
+ </a-form-item>
<a-form-item label="杠杆倍数" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入杠杆倍数" v-decorator="['siteLever', {}]" />
<span>(例:100/50)</span>
@@ -80,11 +86,19 @@
editUserform: this.$form.createForm(this),
editUserdialog: false,
editUserDialogloading: false,
- fields: ['id', 'agentPhone', 'agentRealName', 'agentPwd', 'onLineServices', 'siteLever', 'isLock'],
+ fields: ['id', 'agentPhone', 'agentRealName', 'agentPwd', 'onLineServices', 'siteLever', 'isLock','agentCode'],
currentDetails: {},
}
},
methods: {
+ checkSixDigitNumber(rule, value, callback) {
+ const num = parseInt(value);
+ if (isNaN(num) || value.length !== 6) {
+ callback(new Error('请输入6位数字'));
+ } else {
+ callback();
+ }
+ },
getEditorder(val) {
this.currentDetails = val
this.editUserdialog = true
diff --git a/src/views/userlist/agentcomponents/addagentdialog.vue b/src/views/userlist/agentcomponents/addagentdialog.vue
index 8c6d819..80350c7 100644
--- a/src/views/userlist/agentcomponents/addagentdialog.vue
+++ b/src/views/userlist/agentcomponents/addagentdialog.vue
@@ -14,7 +14,10 @@
placeholder="请选择上级代理"
v-decorator="['parentId', { rules: [{ required: true, message: '请选择上级代理' }] }]"
>
- <a-select-option value="0">总代理</a-select-option>
+
+ <a-select-option :value="item.id" v-for="(item, index) in parentIdList" :key="index">{{
+ item.agentName
+ }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="代理名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -47,12 +50,21 @@
v-decorator="['onLineServices', { rules: [{ required: true, message: '请输入客服链接' }] }]"
/>
</a-form-item>
+ <a-form-item label="代理编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入代理编码"
+ v-decorator="[
+ 'agentCode',
+ { rules: [{ required: true, validator: checkSixDigitNumber, message: '请输入六位数字' }] },
+ ]"
+ />
+ </a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
-import { agentadd } from '@/api/home'
+import { agentadd, getParensAgent } from '@/api/home'
export default {
components: {},
props: {
@@ -77,9 +89,30 @@
addUserform: this.$form.createForm(this),
addUserdialog: false,
addUserDialogloading: false,
+ parentIdList: [],
}
},
methods: {
+ initGetParensAgent() {
+ getParensAgent().then((res) => {
+ if (res.status == 0) {
+ this.parentIdList = [{
+ id: 0,
+ agentName: '总代理'
+ },...res.data]
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
+ },
+ checkSixDigitNumber(rule, value, callback) {
+ const num = parseInt(value)
+ if (isNaN(num) || value.length !== 6) {
+ callback(new Error('请输入6位数字'))
+ } else {
+ callback()
+ }
+ },
// 新增用户取消弹窗
CanceladdUserdialog() {
this.addUserdialog = false
@@ -93,6 +126,7 @@
if (!errors) {
this.addUserDialogloading = true
agentadd(values).then((res) => {
+ if(values.parentId == 0) values.parentId = null
if (res.status == 0) {
this.addUserdialog = false
this.$message.success(res.msg)
diff --git a/src/views/userlist/agentlist.vue b/src/views/userlist/agentlist.vue
index e9626ed..3834852 100644
--- a/src/views/userlist/agentlist.vue
+++ b/src/views/userlist/agentlist.vue
@@ -48,7 +48,7 @@
</a-form>
</div>
<div class="table-operator">
- <a-button type="primary" icon="plus" @click="$refs.addagentdialog.addUserdialog = true">添加下级代理</a-button>
+ <a-button type="primary" icon="plus" @click="$refs.addagentdialog.addUserdialog = true, $refs.addagentdialog.initGetParensAgent()">添加下级代理</a-button>
</div>
</a-card>
@@ -150,6 +150,11 @@
},
},
{
+ title: '代理等级',
+ dataIndex: 'agentLevel',
+ align: 'center',
+ },
+ {
title: '代理状态',
dataIndex: 'isLock',
align: 'center',
diff --git a/src/views/userlist/index.vue b/src/views/userlist/index.vue
index 6973265..5ee9bb1 100644
--- a/src/views/userlist/index.vue
+++ b/src/views/userlist/index.vue
@@ -5,10 +5,47 @@
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="交易状态">
+ <a-select v-model="queryParam.isLock" placeholder="请选择交易状态" :default-value="{ key: '0' }">
+ <a-select-option :value="0">可交易</a-select-option>
+ <a-select-option :value="1">不可交易</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="登录状态">
+ <a-select v-model="queryParam.isLogin" placeholder="请选择登录状态" :default-value="{ key: '0' }">
+ <a-select-option :value="0">可登录</a-select-option>
+ <a-select-option :value="1">不可登录</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="注册时间">
+ <a-date-picker
+ show-time
+ style="width: 50%"
+ @change="getregTime"
+ v-model="regTime"
+ format="YYYY-MM-DD HH:mm:ss"
+ >
+ </a-date-picker>
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
<a-form-item label="用户筛选">
<a-select v-model="queryParam.accountType" placeholder="请选择用户类型" :default-value="{ key: '0' }">
<a-select-option :value="0">真实用户</a-select-option>
<a-select-option :value="1">模拟用户</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ <a-col :md="12" :lg="6" :sm="24">
+ <a-form-item label="实名状态">
+ <a-select v-model="queryParam.isActive" placeholder="请选择实名状态" :default-value="{ key: '0' }">
+ <a-select-option :value="0">未实名</a-select-option>
+ <a-select-option :value="2">已实名</a-select-option>
+ <a-select-option :value="3">被驳回</a-select-option>
</a-select>
</a-form-item>
</a-col>
@@ -70,6 +107,7 @@
:columns="columns"
:data-source="dataList"
rowKey="phone"
+ :scroll="{ x: 2800 }"
>
<span slot="agentName" slot-scope="text, record">
<template>
@@ -109,8 +147,8 @@
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="$refs.EditUserinfodialog.getEditorder(record)">编辑</a>
<a-divider type="vertical" />
- <a slot="action" href="javascript:;" @click="$refs.editUserbankdialog.getbankinfo(record)">银行卡</a>
- <a-divider type="vertical" />
+<!-- <a slot="action" href="javascript:;" @click="$refs.editUserbankdialog.getbankinfo(record)">银行卡</a>
+ <a-divider type="vertical" /> -->
<a slot="action" href="javascript:;" @click="getMoneyzj(record)">资金</a>
<a-divider type="vertical" />
<a
@@ -160,10 +198,15 @@
},
data() {
return {
+ regTime:'',
queryParam: {
agentId: undefined,
realName: '',
+ isLock:'',
+ isLogin:'',
+ isActive:'',
phone: '',
+ regTime:'',
pageNum: 1,
pageSize: 10,
accountType: 0,
@@ -188,8 +231,23 @@
align: 'center',
},
{
- title: '手机号',
+ title: '账号',
dataIndex: 'phone',
+ align: 'center',
+ },
+ {
+ title: '总资产',
+ dataIndex: 'totalMoney',
+ align: 'center',
+ },
+ {
+ title: '可用余额',
+ dataIndex: 'availableBalance',
+ align: 'center',
+ },
+ {
+ title: '冻结金额',
+ dataIndex: 'freezeMoney',
align: 'center',
},
{
@@ -202,11 +260,11 @@
dataIndex: 'fundRatio',
align: 'center',
},
- {
- title: '杠杠',
- dataIndex: 'lever',
- align: 'center',
- },
+ // {
+ // title: '杠杠',
+ // dataIndex: 'lever',
+ // align: 'center',
+ // },
{
title: '认证信息',
dataIndex: 'isActive',
@@ -235,10 +293,18 @@
return moment(text).format('YYYY-MM-DD HH:mm:ss')
},
},
+ // {
+ // title: '操作',
+ // key: 'action',
+ // align: 'center',
+ // scopedSlots: { customRender: 'action' },
+ // },
{
title: '操作',
key: 'action',
align: 'center',
+ fixed: 'right',
+ width: 400,
scopedSlots: { customRender: 'action' },
},
], // 表头
@@ -269,6 +335,9 @@
this.getagentlist()
},
methods: {
+ getregTime(date, dateString) {
+ this.regTime = dateString
+ },
getMoneyzj(record) {
console.log(record.id)
getMoney({ userId: record.id }).then((res) => {
@@ -307,12 +376,17 @@
this.queryParam = {
agentId: undefined,
realName: '',
+ isLock:'',
+ isLogin:'',
+ isActive:'',
phone: '',
+ regTime:'',
pageNum: 1,
pageSize: 10,
accountType: 0,
}
this.pagination.current = 1
+ this.regTime = ''
this.getuserList()
},
geteditinit() {
@@ -321,6 +395,7 @@
getuserList() {
var that = this
this.loading = true
+ this.queryParam.regTime = this.regTime
usermanag(this.queryParam).then((res) => {
this.dataList = res.data.list
this.pagination.total = res.data.total
--
Gitblit v1.9.3