|
@@ -0,0 +1,266 @@
|
|
|
+<template>
|
|
|
+ <!-- 用户-会员管理-等级列表 -->
|
|
|
+ <div>
|
|
|
+ <Card :bordered="false" dis-hover class="ivu-mt">
|
|
|
+ <!-- 相关操作 -->
|
|
|
+ <Select v-model="listFrom.member_id" style="width: 250px">
|
|
|
+ <Option v-for="item in ygList" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
|
+ </Select>
|
|
|
+ <Button type="primary" @click="getList" style="margin-left: 20px;">查询</Button>
|
|
|
+ <Button type="primary" @click="reset" style="margin-left: 20px;">重置</Button>
|
|
|
+ <Table :columns="columns1" :data="list" ref="table" class="mt25" :loading="loading" highlight-row
|
|
|
+ no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
|
|
|
+ <template slot-scope="{ row, index }" slot="icons">
|
|
|
+ <viewer>
|
|
|
+ <div class="tabBox_img">
|
|
|
+ <img v-lazy="row.member.avatar">
|
|
|
+ </div>
|
|
|
+ </viewer>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot-scope="{ row, index }" slot="name">
|
|
|
+ <div class="acea-row">
|
|
|
+ <Icon type="md-male" v-show="row.sex === '男'" color="#2db7f5" size="15" class="mr5" />
|
|
|
+ <Icon type="md-female" v-show="row.sex === '女'" color="#ed4014" size="15" class="mr5" />
|
|
|
+ <div v-if="row.delete_time != null" style="color:#ed4014;">{{row.member.name}} (已注销)</div>
|
|
|
+ <div v-else v-text="row.member.name"></div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="status">
|
|
|
+ <Tag color="primary" v-if="row.status == 1">待审核</Tag>
|
|
|
+ <Tag color="success" v-if="row.status == 2">已通过</Tag>
|
|
|
+ <Tag color="error" v-if="row.status == 0">未通过</Tag>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="action">
|
|
|
+ <template v-if="row.status == 1">
|
|
|
+ <a @click="pass(row,2)">通过</a>
|
|
|
+ <Divider type="vertical" />
|
|
|
+ <a @click="pass(row,0)">拒绝</a>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </Table>
|
|
|
+ <div class="acea-row row-right page">
|
|
|
+ <Page :total="total" :current="listFrom.page" show-elevator show-total @on-change="pageChange"
|
|
|
+ :page-size="listFrom.limit" />
|
|
|
+ </div>
|
|
|
+ </Card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
+ import {
|
|
|
+ userList
|
|
|
+ } from '@/api/user';
|
|
|
+ import {
|
|
|
+ updateShareholdingRecord,
|
|
|
+ deleteShareholder,
|
|
|
+ addShareholder
|
|
|
+ } from '@/api/shareholder';
|
|
|
+ import {
|
|
|
+ getYgList
|
|
|
+ } from "@/api/store"
|
|
|
+ import {
|
|
|
+ getYgGqList,
|
|
|
+ passYgGqTx
|
|
|
+ } from '@/api/finance'
|
|
|
+ import user from "@/components/userList/index"
|
|
|
+ export default {
|
|
|
+ name: 'guquanList',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ ygList: [],
|
|
|
+ // 股权发放弹窗
|
|
|
+ modalss: false,
|
|
|
+ // 用户列表弹窗
|
|
|
+ modals: false,
|
|
|
+ loading: false,
|
|
|
+ columns1: [{
|
|
|
+ title: 'ID',
|
|
|
+ key: 'id',
|
|
|
+ width: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '员工',
|
|
|
+ slot: 'name',
|
|
|
+ minWidth: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '详情',
|
|
|
+ key: 'content',
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '数量',
|
|
|
+ key: 'shareholding',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '变动后',
|
|
|
+ key: 'balance',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '变更时间',
|
|
|
+ key: 'create_time',
|
|
|
+ minWidth: 200
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ listFrom: {
|
|
|
+ is_shareholder: 1,
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
+ member_id: 0,
|
|
|
+ },
|
|
|
+ fromHolder: {
|
|
|
+ uid: 0,
|
|
|
+ initial_share: 0,
|
|
|
+ bonus_share: 0,
|
|
|
+ initial_status: "1",
|
|
|
+ bonus_status: "1",
|
|
|
+ mark: ''
|
|
|
+ },
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ user: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ console.log('zs');
|
|
|
+ this.getList();
|
|
|
+ this.getYgList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ reset() {
|
|
|
+ this.listFrom.member_id = 0,
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ getYgList() {
|
|
|
+ getYgList({
|
|
|
+ page: 1,
|
|
|
+ limit: 1000
|
|
|
+ }).then(res => {
|
|
|
+ this.ygList = res.data.list
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 确认发放股权
|
|
|
+ comInput(res) {
|
|
|
+ updateShareholdingRecord(this.fromHolder).then((res) => {
|
|
|
+ this.getList();
|
|
|
+ this.$Message.success(res.msg);
|
|
|
+ }).catch(res => {
|
|
|
+ this.$Message.error(res.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 打开股权发放
|
|
|
+ changeholder(res) {
|
|
|
+ // 保存当前选中的对象
|
|
|
+ this.fromHolder.uid = res.uid;
|
|
|
+ this.modalss = true;
|
|
|
+ },
|
|
|
+ pass(row,type) {
|
|
|
+ console.log('row',row)
|
|
|
+ let that = this
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: type == 2 ? `通过员工:${row.member.name} 的股权提现申请`: `拒绝员工:${row.member.name} 的股权提现申请`,
|
|
|
+ loading: true,
|
|
|
+ onOk: () => {
|
|
|
+ this.$Modal.remove();
|
|
|
+ // this.add(res.uid)
|
|
|
+ passYgGqTx({
|
|
|
+ id: row.id,
|
|
|
+ status: type
|
|
|
+ }).then(res=> {
|
|
|
+ that.$Message.success('审核完成');
|
|
|
+ that.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ // this.$Message.info('取消成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getProductId(res) {
|
|
|
+ console.log(res);
|
|
|
+ this.modals = false;
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否将用户${res.name}(UID:${res.uid})添加为股东`,
|
|
|
+ loading: true,
|
|
|
+ onOk: () => {
|
|
|
+ this.$Modal.remove();
|
|
|
+ this.add(res.uid)
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ // this.$Message.info('取消成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ del(row) {
|
|
|
+ let delfromData = {
|
|
|
+ title: "删除股东",
|
|
|
+ url: `stockRights/deleteShareholder`,
|
|
|
+ method: 'post',
|
|
|
+ ids: {
|
|
|
+ uid: row.uid
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$modalSure(delfromData).then((res) => {
|
|
|
+ this.$Message.success(res.msg);
|
|
|
+ this.getList();
|
|
|
+ }).catch(res => {
|
|
|
+ this.$Message.error(res.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 等级列表
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ getYgGqList(this.listFrom).then(async res => {
|
|
|
+ let data = res.data
|
|
|
+ this.list = data.list;
|
|
|
+ this.total = res.data.count;
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(res => {
|
|
|
+ console.log(res, 'res');
|
|
|
+ this.loading = false;
|
|
|
+ this.$Message.error(res.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ pageChange(index) {
|
|
|
+ this.listFrom.page = index;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ add(uid) {
|
|
|
+ addShareholder({
|
|
|
+ uid
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.getList();
|
|
|
+ this.$Message.success(res.msg);
|
|
|
+ }).catch((res) => {
|
|
|
+ this.$Message.error(res.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+ .tabBox_img {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|