lhl 1 місяць тому
батько
коміт
acb456ab59

+ 10 - 0
src/api/finance.js

@@ -227,4 +227,14 @@ export function passYhJlTx(data) {
 	    method: 'post',
 	    data
 	});
+}
+
+//getJcList
+//用户奖池记录
+export function getJcList(data) {
+	return request({
+	    url: `stockRights/record_lst`,
+	    method: 'get',
+	    params: data
+	});
 }

+ 1 - 0
src/components/goodsList/index.vue

@@ -125,6 +125,7 @@
 		},
 		data() {
 			return {
+				staffData:[],
 				//选中商品集合
 				selectEquips: [],
 				// 选中的id集合

+ 235 - 0
src/pages/finance/jc/list.vue

@@ -0,0 +1,235 @@
+<template>
+	<!-- 用户-会员管理-等级列表 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 相关操作 -->
+			<Input v-model="listFrom.uid" icon="ios-search" @on-click='openmid' placeholder="请输入用户ID" class="input-add mr14" />
+			<Input v-model="listFrom.product_id" icon="ios-search" @on-click='changeGoods' placeholder="请输入商品ID" class="input-add mr14" />
+			<Select v-model="listFrom.pm" class="input-add">
+				<Option v-for="(item, index) in num" :value="item.value" :key="index">{{ 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="user">
+					<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 >uid:{{row.user.uid}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="product">
+					<div>{{row.product.store_name}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="type">
+					<div>{{row.type == 1? '普通商品':(row.type == 2?'服务项目':'分红')}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<div>{{row.pm == 1? '+': '-' }} {{row.number}}</div>
+				</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="员工选择">
+			<userLists :is_reservation='0' @getProductId='checkmember'></userLists>
+			<template #footer>
+				<Button @click="memberListShow=false">取消</Button>
+			</template>
+		</Modal>
+		<Modal v-model="goodsmodals" title="商品列表" footerHide class="paymentFooter" scrollable width="900"
+		    @on-cancel="cancel">
+		    <goods-list ref="goodslist" :goodsType="1" v-if="goodsmodals" @getProductId="getProductId" :serviceCard="1"></goods-list>
+		</Modal>
+	</div>
+</template>
+<script>
+	import goodsList from "@/components/goodsList/index";
+	
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getYhJlList,
+		passYgGqTx,
+		getJcList
+	} from '@/api/finance'
+	import { getUserJlList} from '@/api/user'
+	import userLists from "@/components/userLists/index";
+	export default {
+		name: 'guquanList',
+		components: {
+			userLists,
+			goodsList
+		},
+		data() {
+			return {
+				num: [{
+						name: '收入',
+						value: 1
+					}, {
+						name: '支出',
+						value: 0
+					},
+				],
+				goodsmodals:false,
+				modals: false,
+				loading: false,
+				columns1: [{
+						title: 'ID',
+						key: 'id',
+						width: 80
+					},
+					{
+						title: '用户',
+						slot: 'user',
+						minWidth: 150
+					},
+					{
+						title: '类型',
+						slot: 'type',
+						minWidth: 100
+					},
+					{
+						title: '商品',
+						slot: 'product',
+						minWidth: 200
+					},
+					{
+						title: '金额',
+						slot: 'number',
+						minWidth: 100
+					},
+					{
+						title: '备注',
+						key: 'mark',
+						minWidth: 200
+					}
+				],
+				listFrom: {
+					page: 1,
+					limit: 10,
+					uid: '',
+					product_id: '',
+					pm: 1
+				},
+				list: [],
+				total: 0,
+			}
+		},
+		created() {
+			console.log('zs');
+			this.getList();
+		},
+		methods: {
+			// 商品id
+			getProductId(row) {
+				console.log(row,'这个');
+			    this.goodsmodals = false;
+				this.listFrom.product_id = row.id
+			  //   setTimeout(() => {
+					// this.formData.product_id = row.id
+					// 	this.formData.card_name = row.store_name
+					// 	this.formData.product_id = row.id
+					// 	this.formData.card_price = row.price
+					// 	this.formData.unit_name = row.unit_name
+					// 	this.formData.image = row.image
+					// 	this.formData.images = row.slider_image
+					// 	this.formData.is_show = 1
+					// 	this.formData.repertory = row.stock
+					// // this.formData.image = row.image
+			  //   }, 500);
+			},
+			// 选择商品
+			changeGoods() {
+			    this.goodsmodals = true;
+			},
+			cancel() {
+				this.modals = false;
+			},
+			// 打开弹窗
+			openmid(e) {
+				this.modals = true;
+			},
+			// 选中员工
+			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;
+				getJcList(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>

+ 22 - 0
src/pages/product/productAdd/index.vue

@@ -1098,6 +1098,25 @@
 					</FormItem>
 					</Col>
 					<Col span="24">
+					<FormItem label="分红比例:" prop="">
+						<Input v-model="formValidate.product_ratio" placeholder="请输入分红比例" v-width="'50%'" />
+						<div class="tips">商品支付金额分到奖池的比例</div>
+					</FormItem>
+					</Col>
+					<!-- //'bonus_ratio -->
+					<Col span="24">
+					<FormItem label="每日分红比例:" prop="">
+						<Input v-model="formValidate.bonus_ratio" placeholder="请输入每日分红比例" v-width="'50%'" />
+						<div class="tips">奖池每日分红比例</div>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="购买奖励上限:" prop="">
+						<Input v-model="formValidate.top" placeholder="请输入购买奖励上限" v-width="'50%'" />
+						<!-- <div class="tips">奖池每日分红比例</div> -->
+					</FormItem>
+					</Col>
+					<Col span="24">
 					<FormItem label="商品简介:" prop="">
 						<Input v-model="formValidate.store_info" type="textarea" :rows="3" placeholder="请输入商品简介"
 							v-width="'50%'" />
@@ -1798,6 +1817,9 @@
 					label_id: [],
 					ensure_id: [],
 					keyword: "",
+					product_ratio:0,
+					bonus_ratio: 0,
+					top:0,
 					applicable_type: 1,
 					unit_name: "",
 					specs_id: 0,

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

@@ -94,6 +94,15 @@ export default {
 		        title: '股权记录'
 		    },
 		    component: () => import('@/pages/finance/jl/list')
+		},
+		{
+		    path: 'jc/list',
+		    name: `${pre}JclList`,
+		    meta: {
+		        auth: ['admin-finance-jc-list'],
+		        title: '奖池记录'
+		    },
+		    component: () => import('@/pages/finance/jc/list')
 		}
     ]
 };