|
@@ -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>
|