|
|
|
@ -9,7 +9,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
|
|
<a-button type="primary" @click="openAdd" :icon="h(PlusOutlined)">新增用户</a-button>
|
|
|
|
<!-- <a-button type="primary" @click="openAdd" :icon="h(PlusOutlined)">新增用户</a-button> -->
|
|
|
|
<!-- <a-button type="" class="g_border_d g_ml_16" @click="handleToForm('add', { id: 0 })" :icon="h(DownloadOutlined)">导出模版</a-button> -->
|
|
|
|
<!-- <a-button type="" class="g_border_d g_ml_16" @click="handleToForm('add', { id: 0 })" :icon="h(DownloadOutlined)">导出模版</a-button> -->
|
|
|
|
<!--
|
|
|
|
<!--
|
|
|
|
<a-dropdown :trigger="['click']">
|
|
|
|
<a-dropdown :trigger="['click']">
|
|
|
|
@ -115,30 +115,20 @@
|
|
|
|
<a-button @click="submitForm" type="primary">确定</a-button>
|
|
|
|
<a-button @click="submitForm" type="primary">确定</a-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</a-modal> -->
|
|
|
|
</a-modal> -->
|
|
|
|
<a-modal
|
|
|
|
<a-modal destroyOnClose ref="modalRef" v-model:open="tableDetail.isShow" title="持股详情" width="1200px" :bodyStyle="{ 'border-radius': '4px'}">
|
|
|
|
ref="modalRef"
|
|
|
|
|
|
|
|
v-model:open="tableDetail.isShow"
|
|
|
|
|
|
|
|
title="持股详情"
|
|
|
|
|
|
|
|
width="1200px"
|
|
|
|
|
|
|
|
:bodyStyle="{
|
|
|
|
|
|
|
|
'border-radius': '4px',
|
|
|
|
|
|
|
|
}"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div class="g_pt_8 g_pb_16" style=" overflow-y: auto">
|
|
|
|
<div class="g_pt_8 g_pb_16" style=" overflow-y: auto">
|
|
|
|
<div class="g_float_right">
|
|
|
|
<div class="g_float_right">
|
|
|
|
|
|
|
|
<a href="http://a.matripe.com.cn/api_stock/admin/user/stock/record/download">
|
|
|
|
<a-button class="g_mr_12">
|
|
|
|
<a-button class="g_mr_12">
|
|
|
|
<template #icon>
|
|
|
|
<template #icon>
|
|
|
|
<DownloadOutlined />
|
|
|
|
<DownloadOutlined />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
导出模板
|
|
|
|
导出模板
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
<a-button type="primary">
|
|
|
|
</a>
|
|
|
|
<template #icon>
|
|
|
|
<a-upload :action="baseUrl + '/admin/user/stock/record/import'" :data="{userId}" accept=".xlsx, .xls, .xlsm, .xltx, .xltm" @change="getMoreInfo">
|
|
|
|
<PlusOutlined />
|
|
|
|
<a-button type="primary"><PlusOutlined />导入文件</a-button>
|
|
|
|
</template>
|
|
|
|
</a-upload>
|
|
|
|
导入文件
|
|
|
|
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="g_float_none"></div>
|
|
|
|
<div class="g_float_none"></div>
|
|
|
|
|
|
|
|
|
|
|
|
@ -152,7 +142,7 @@
|
|
|
|
</a-table>
|
|
|
|
</a-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="g_mt_20">
|
|
|
|
<div class="g_mt_20">
|
|
|
|
<a-pagination v-model:current="tableDetail.page" v-model:page-size="tableDetail.size" :total="tableDetail.count" :pageSize="tableDetail.size" :show-total="(total) => `共 ${total} 条`" @change="handleModalPage" @showSizeChange="handleModalSize" :show-quick-jumper="tableData.count < tableData.size ? false : true" :showSizeChanger="tableData.count < tableData.size ? false : true" :hideOnSinglePage="false" />
|
|
|
|
<a-pagination v-model:current="tableDetail.page" v-model:page-size="tableDetail.size" :total="tableDetail.count" :pageSize="tableDetail.size" :show-total="(total) => `共 ${total} 条`" @change="handleModalDetailPage" @showSizeChange="handleModalDetailSize" :show-quick-jumper="tableDetail.count < tableDetail.size ? false : true" :showSizeChanger="tableDetail.count < tableDetail.size ? false : true" :hideOnSinglePage="false" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
@ -173,10 +163,11 @@
|
|
|
|
class="g_ml_51"
|
|
|
|
class="g_ml_51"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a-form-item label="姓名" name="name" required>
|
|
|
|
<a-form-item label="姓名" name="name" required>
|
|
|
|
|
|
|
|
<span class="ant-form-text">{{modalInfo.form.name}}</span>
|
|
|
|
<!-- <a-input style="width: 100%" placeholder="请输入姓名" v-model:value="modalInfo.form.name" /> -->
|
|
|
|
<!-- <a-input style="width: 100%" placeholder="请输入姓名" v-model:value="modalInfo.form.name" /> -->
|
|
|
|
<a-select ref="select" v-model:value="modalInfo.form.name" placeholder="请选择用户" @focus="focus" @change="handleChange">
|
|
|
|
<!-- <a-select ref="select" v-model:value="modalInfo.form.name" placeholder="请选择用户" @focus="focus" @change="handleChange">
|
|
|
|
<a-select-option v-for="item in userList" :value="item.id" :title="item.id">{{ item.name }}</a-select-option>
|
|
|
|
<a-select-option v-for="item in userList" :value="item.id" :title="item.id">{{ item.name }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-select> -->
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label="持股数" name="num" required>
|
|
|
|
<a-form-item label="持股数" name="num" required>
|
|
|
|
<a-input style="width: 100%" placeholder="请输入持股数" v-model:value="modalInfo.form.num" />
|
|
|
|
<a-input style="width: 100%" placeholder="请输入持股数" v-model:value="modalInfo.form.num" />
|
|
|
|
@ -202,11 +193,12 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
|
|
|
|
import request from "../../utils/request"; // 引入基础路径
|
|
|
|
import { ref, onMounted, getCurrentInstance, h, watch } from "vue";
|
|
|
|
import { ref, onMounted, getCurrentInstance, h, watch } from "vue";
|
|
|
|
import { PlusOutlined, EllipsisOutlined, UploadOutlined, DownOutlined } from "@ant-design/icons-vue";
|
|
|
|
import { PlusOutlined, EllipsisOutlined, UploadOutlined, DownOutlined } from "@ant-design/icons-vue";
|
|
|
|
import { Modal, message } from "ant-design-vue";
|
|
|
|
import { Modal, message } from "ant-design-vue";
|
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
|
import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi,updateUserApi,getStockUserListApi,addStockUserApi} from "../../api/userList/userList";
|
|
|
|
import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi,updateUserStockApi,getStockUserListApi,addStockUserApi, getUserMoreListApi} from "../../api/userList/userList";
|
|
|
|
import { DownloadOutlined } from "@ant-design/icons-vue";
|
|
|
|
import { DownloadOutlined } from "@ant-design/icons-vue";
|
|
|
|
import idCardPanel from "../components/upload/image.vue";
|
|
|
|
import idCardPanel from "../components/upload/image.vue";
|
|
|
|
|
|
|
|
|
|
|
|
@ -218,7 +210,7 @@ const speed = ref(0);
|
|
|
|
const showAdd = ref(0);
|
|
|
|
const showAdd = ref(0);
|
|
|
|
const userList = ref([]);
|
|
|
|
const userList = ref([]);
|
|
|
|
const userId = ref(0);
|
|
|
|
const userId = ref(0);
|
|
|
|
|
|
|
|
let baseUrl = ref(request.userCustom);
|
|
|
|
|
|
|
|
|
|
|
|
const handleChange = value => {
|
|
|
|
const handleChange = value => {
|
|
|
|
console.log(`selected ${value}`);
|
|
|
|
console.log(`selected ${value}`);
|
|
|
|
@ -247,7 +239,8 @@ const handleViewDetail = (item) => {
|
|
|
|
// 打开明细弹窗
|
|
|
|
// 打开明细弹窗
|
|
|
|
tableDetail.value = {
|
|
|
|
tableDetail.value = {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
size: 50,
|
|
|
|
size: 20,
|
|
|
|
|
|
|
|
limit: 20,
|
|
|
|
count: 0,
|
|
|
|
count: 0,
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
speed: -1,
|
|
|
|
speed: -1,
|
|
|
|
@ -256,6 +249,7 @@ const handleViewDetail = (item) => {
|
|
|
|
columns: [],
|
|
|
|
columns: [],
|
|
|
|
pagination: {},
|
|
|
|
pagination: {},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
userId.value = item.userId
|
|
|
|
|
|
|
|
|
|
|
|
// itemData.value = {
|
|
|
|
// itemData.value = {
|
|
|
|
// userId: item.id,
|
|
|
|
// userId: item.id,
|
|
|
|
@ -276,26 +270,28 @@ const getModalDetail = () => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "取得方式",
|
|
|
|
title: "取得方式",
|
|
|
|
key: "userName",
|
|
|
|
key: "sourceFrom",
|
|
|
|
dataIndex: "userName",
|
|
|
|
dataIndex: "sourceFrom",
|
|
|
|
ellipsis: true,
|
|
|
|
ellipsis: true,
|
|
|
|
minWidth: "100px",
|
|
|
|
minWidth: "100px",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "持股主体",
|
|
|
|
title: "持股主体",
|
|
|
|
key: "storeJobName",
|
|
|
|
key: "name",
|
|
|
|
dataIndex: "storeJobName",
|
|
|
|
dataIndex: "name",
|
|
|
|
width: "240px",
|
|
|
|
width: "240px",
|
|
|
|
ellipsis: true,
|
|
|
|
ellipsis: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "持股数量",
|
|
|
|
title: "持股数量",
|
|
|
|
key: "time",
|
|
|
|
key: "num",
|
|
|
|
dataIndex: "time",
|
|
|
|
dataIndex: "num",
|
|
|
|
width: "200px",
|
|
|
|
width: "200px",
|
|
|
|
ellipsis: true,
|
|
|
|
ellipsis: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getUserMoreList();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -333,21 +329,22 @@ const submitForm = ()=>{
|
|
|
|
|
|
|
|
|
|
|
|
console.log(userList.value);
|
|
|
|
console.log(userList.value);
|
|
|
|
console.log(modalInfo.value.form.userId);
|
|
|
|
console.log(modalInfo.value.form.userId);
|
|
|
|
let obj = userList.value.find(item => item.id === modalInfo.value.form.userId)
|
|
|
|
// let obj = userList.value.find(item => item.id === modalInfo.value.form.userId)
|
|
|
|
|
|
|
|
|
|
|
|
console.log(obj);
|
|
|
|
// console.log(obj);
|
|
|
|
|
|
|
|
|
|
|
|
params = {
|
|
|
|
params = {
|
|
|
|
name:obj.name,
|
|
|
|
name:modalInfo.value.form.name,
|
|
|
|
num:modalInfo.value.form.num,
|
|
|
|
num:modalInfo.value.form.num,
|
|
|
|
percent:modalInfo.value.form.percent,
|
|
|
|
percent:modalInfo.value.form.percent,
|
|
|
|
amount:modalInfo.value.form.amount,
|
|
|
|
amount:modalInfo.value.form.amount,
|
|
|
|
userId:modalInfo.value.form.userId,
|
|
|
|
userId:modalInfo.value.form.userId,
|
|
|
|
|
|
|
|
id:modalInfo.value.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(modalInfo.value.id){
|
|
|
|
if(modalInfo.value.id){
|
|
|
|
delete params.password;
|
|
|
|
delete params.password;
|
|
|
|
updateUserApi(params).then((res)=>{
|
|
|
|
updateUserStockApi(params).then((res)=>{
|
|
|
|
showAdd.value = false;
|
|
|
|
showAdd.value = false;
|
|
|
|
message.success("修改成功");
|
|
|
|
message.success("修改成功");
|
|
|
|
getTable();
|
|
|
|
getTable();
|
|
|
|
@ -371,9 +368,10 @@ const handleToForm = ($type, $data) => {
|
|
|
|
title:'修改个人数据',
|
|
|
|
title:'修改个人数据',
|
|
|
|
form:{
|
|
|
|
form:{
|
|
|
|
name:$data.name,
|
|
|
|
name:$data.name,
|
|
|
|
username:$data.username,
|
|
|
|
num:$data.num,
|
|
|
|
idcard:$data.idcard,
|
|
|
|
percent:$data.percent,
|
|
|
|
description:$data.description,
|
|
|
|
amount:$data.amount,
|
|
|
|
|
|
|
|
userId:$data.userId
|
|
|
|
},
|
|
|
|
},
|
|
|
|
id:$data.id
|
|
|
|
id:$data.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -481,6 +479,9 @@ const columns = ref([
|
|
|
|
dataIndex: "percent",
|
|
|
|
dataIndex: "percent",
|
|
|
|
width: "240px",
|
|
|
|
width: "240px",
|
|
|
|
ellipsis: true,
|
|
|
|
ellipsis: true,
|
|
|
|
|
|
|
|
customRender: (record) => {
|
|
|
|
|
|
|
|
return record.record.percent+"%";
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -579,6 +580,56 @@ const handleModalSize = ($page, $size) => {
|
|
|
|
tableData.value.size = $size;
|
|
|
|
tableData.value.size = $size;
|
|
|
|
getTable();
|
|
|
|
getTable();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
/* #################### 分页器事件 #################### */
|
|
|
|
|
|
|
|
const handleModalDetailPage = ($page, $size) => {
|
|
|
|
|
|
|
|
// 监听明细页码
|
|
|
|
|
|
|
|
console.log($page);
|
|
|
|
|
|
|
|
console.log($size);
|
|
|
|
|
|
|
|
tableDetail.value.page = $page;
|
|
|
|
|
|
|
|
getUserMoreList();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleModalDetailSize = ($page, $size) => {
|
|
|
|
|
|
|
|
// 监听明细size
|
|
|
|
|
|
|
|
tableDetail.value.page = 1;
|
|
|
|
|
|
|
|
tableDetail.value.size = $size;
|
|
|
|
|
|
|
|
getUserMoreList();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取持股列表
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
const getUserMoreList = () => {
|
|
|
|
|
|
|
|
getUserMoreListApi({ limit: tableDetail.value.limit, page: tableDetail.value.page, userId: userId.value }).then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tableDetail.value = { ...res.data, keyword: tableData.value.keyword, page: res.data.current, limit: res.data.size };
|
|
|
|
|
|
|
|
tableDetail.value.list = res.data.records
|
|
|
|
|
|
|
|
tableDetail.value.count = res.data.total
|
|
|
|
|
|
|
|
tableDetail.value.list.forEach((item, index) => {
|
|
|
|
|
|
|
|
item.rank = index + 1;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// stockMoreList.value = res.data;
|
|
|
|
|
|
|
|
// stockMoreList.value.forEach((item, index) => {
|
|
|
|
|
|
|
|
// item.rank = index + 1;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 上传持股文件
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
const getMoreInfo = (info) => {
|
|
|
|
|
|
|
|
console.log(info);
|
|
|
|
|
|
|
|
if (info.file.response) {
|
|
|
|
|
|
|
|
if (info.file.response.code == 200) {
|
|
|
|
|
|
|
|
getUserMoreList();
|
|
|
|
|
|
|
|
message.success("操作成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
<style lang="less">
|
|
|
|
|