Browse Source

change title

lhl 1 year ago
parent
commit
5e8450cefc

+ 9 - 0
src/api/finance.js

@@ -273,3 +273,12 @@ export function delTs(id) {
 		method: 'get',
 		method: 'get',
 	});
 	});
 }
 }
+
+//资金冻结记录
+export function djList(data) {
+	return request({
+		url: `/work/freeze/lst`,
+		method: 'get',
+		params: data
+	});
+}

+ 249 - 0
src/pages/finance/dj/index.vue

@@ -0,0 +1,249 @@
+<template>
+	<!-- 用户-会员管理-等级列表 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 相关操作 -->
+		
+			<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">
+						<div v-if="row.user.delete_time != null" style="color:#ed4014;">{{row.member.nickname}} (已注销)</div>
+						<div v-else v-text="row.user.nickname"></div>
+					</div>
+					<div>uid:{{row.user.uid}}</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 {
+		getYhJlTx,
+		passYhJlTx
+	} from '@/api/finance'
+	import user from "@/components/userList/index"
+	export default {
+		name: 'guquanIndex',
+		data() {
+			return {
+				// 股权发放弹窗
+				modalss: false,
+				// 用户列表弹窗
+				modals: false,
+				loading: false,
+				columns1: [{
+						title: 'ID',
+						key: 'id',
+						width: 80
+					},
+					{
+						title: '用户',
+						slot: 'name',
+						minWidth: 150
+					},
+					{
+						title: '提现股权',
+						key: 'reward_share',
+						minWidth: 100
+					},
+					{
+						title: '预计金额',
+						key: 'money',
+						minWidth: 100
+					},
+					{
+						title: '提现时间',
+						key: 'create_time',
+						minWidth: 100
+					},
+					{
+						title: '审核状态',
+						slot: 'status',
+						minWidth: 100
+					},
+					{
+						title: '操作',
+						slot: 'action',
+						fixed: 'right',
+						minWidth: 120
+					}
+				],
+				listFrom: {
+					is_shareholder: 1,
+					page: 1,
+					limit: 10
+				},
+				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();
+		},
+		methods: {
+			// 确认发放股权
+			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.user.nickname} 的股权提现申请`: `拒绝用户:${row.user.nickname} 的股权提现申请`,
+					loading: true,
+					onOk: () => {
+						this.$Modal.remove();
+						// this.add(res.uid)
+						passYhJlTx({
+							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;
+				getYhJlTx(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>

+ 219 - 0
src/pages/finance/dj/list.vue

@@ -0,0 +1,219 @@
+<template>
+	<!-- 用户-会员管理-等级列表 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 相关操作 -->
+<!-- 			<Input v-model="listFrom.work_member_id" icon="ios-search" @on-click='openmid' placeholder="请输入员工ID" class="input-add mr14" />
+			<Button type="primary" @click="getList" style="margin-left: 20px;">查询</Button>
+			<Button type="primary" @click="reset" style="margin-left: 20px;">重置</Button> -->
+			<!-- <Input v-model="listFrom.uid" icon="ios-search" @on-click='openmid' placeholder="请输入用户ID" class="input-add mr14" />
+			<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">
+						<div v-if="row.user.delete_time != null" style="color:#ed4014;">{{row.user.nickname}} (已注销)</div>
+						<div v-else v-text="row.user.nickname"></div>
+					</div> -->
+					<div >{{row.member.name}}</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="create_time">
+					<span class="tabBox_pice">{{row.add_time| formatDate}}</span>
+				</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>
+		<Modal v-model="modals" width='80' mask title="员工选择">
+			<staffList :is_reservation='0' @getProductId='checkmember'></staffList>
+			<template #footer>
+				<Button @click="memberListShow=false">取消</Button>
+			</template>
+		</Modal>
+	</div>
+</template>
+<script>
+	import staffList from "@/components/staffList/index";
+	import {
+		formatDate
+	} from '@/utils/validate';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getYhJlList,
+		passYgGqTx,
+		djList
+	} from '@/api/finance'
+	import { getUserJlList} from '@/api/user'
+	import userLists from "@/components/userLists/index";
+	export default {
+		name: 'guquanList',
+		components: {
+			userLists,
+			staffList
+		},
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, 'yyyy-MM-dd hh:mm');
+				}
+			}
+		},
+		data() {
+			return {
+				modals: false,
+				loading: false,
+				columns1: [{
+						title: 'ID',
+						key: 'id',
+						width: 80
+					},
+					{
+						title: '员工',
+						slot: 'name',
+						minWidth: 150
+					},
+					{
+						title: '详情',
+						key: 'mark',
+						minWidth: 200
+					},
+					// {
+					// 	title: '金额',
+					// 	key: 'reward_share',
+					// 	minWidth: 100
+					// },
+					{
+						title: '剩余金额',
+						key: 'balance',
+						minWidth: 100
+					},
+					{
+						title: '变更时间',
+						slot: 'create_time',
+						minWidth: 200
+					}
+				],
+				listFrom: {
+					page: 1,
+					limit: 10,
+					work_member_id: '',
+				},
+				list: [],
+				total: 0,
+			}
+		},
+		created() {
+			console.log('zs');
+			this.getList();
+		},
+		methods: {
+			// 打开弹窗
+			openmid(e) {
+				this.modals = true;
+			},
+			// 打开弹窗
+			openmid(e) {
+				this.modals = true;
+			},
+			// 选中员工
+			checkmember(res) {
+				let data = res[0];
+				this.modals = false;
+				this.listFrom.work_member_id = data.id;
+			},
+			// // 选中员工
+			// checkmember(res) {
+			// 	console.log(res,'res')
+			// 	let data = res[0];
+			// 	this.modals = false;
+			// 	this.listFrom.uid = data.uid;
+			// 	console.log(this.listFrom.uid,'this.listFrom.uid')
+			// },
+			reset() {
+				this.listFrom.member_id = 0,
+				this.getList()
+			},
+			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('取消成功');
+					}
+				});
+			},
+			getList() {
+				this.loading = true;
+				djList(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();
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 2 - 1
src/pages/finance/ts/list.vue

@@ -172,7 +172,7 @@
 					// subscribe_id
 					// subscribe_id
 					
 					
 					{
 					{
-						title: "打赏用户",
+						title: "用户",
 						align: "user",
 						align: "user",
 						slot: "user",
 						slot: "user",
 						minWidth: 80,
 						minWidth: 80,
@@ -260,6 +260,7 @@
 					this.$Message.success(res.msg);
 					this.$Message.success(res.msg);
 					this.blaclItem = {}
 					this.blaclItem = {}
 					this.tsmodals = false;
 					this.tsmodals = false;
+					this.getList();
 				})
 				})
 				
 				
 			},
 			},

+ 9 - 0
src/router/modules/finance.js

@@ -121,6 +121,15 @@ export default {
 		        title: '投诉记录'
 		        title: '投诉记录'
 		    },
 		    },
 		    component: () => import('@/pages/finance/ts/list')
 		    component: () => import('@/pages/finance/ts/list')
+		},
+		{
+		    path: 'dj/list',
+		    name: `${pre}JclList`,
+		    meta: {
+		        auth: ['admin-finance-dj-list'],
+		        title: '冻结记录'
+		    },
+		    component: () => import('@/pages/finance/dj/list')
 		}
 		}
     ]
     ]
 };
 };