hwq 1 éve
szülő
commit
97345db710

+ 21 - 0
src/api/newApi.js

@@ -156,3 +156,24 @@ export function award_lake_post(data) {
     });
 }
 
+/**
+ * @description 发放奖励
+ */
+export function award_set(data) {
+    return request({
+        url: `/user/award_set`,
+        method: 'get',
+		params:data
+    });
+}
+/**
+ * @description 佣金记录 -- 个人提现列表
+ * @param {Number} param id {Number} 佣金记录 用户ID
+ */
+export function extractListApi(data) {
+        return request({
+            url: `finance/finance/extract_list`,
+            method: 'get',
+            params: data
+        });
+}

+ 189 - 0
src/pages/finance/bonus/card/cards.vue

@@ -0,0 +1,189 @@
+<template>
+<!-- 卡片样式 -->
+  <div>
+    <!--v-if="item.count && item.count!='0.00'"-->
+    <Row type="flex" align="middle" :gutter="16" class="ivu-mt">
+      <Col
+        :xs="24"
+        :sm="24"
+        :md="24"
+        :lg="12"
+        :xl="8"
+        :xxl="{ span: item.col }"
+        class="ivu-mb"
+        v-for="(item, index) in cardLists"
+        :key="index"
+      >
+        <Card shadow :padding="0" class="card_cent">
+          <div class="card_box" @click="checkedData(item)">
+            <div
+              class="card_box_cir"
+              :class="{
+                one: index % 5 == 0,
+                two: index % 5 == 1,
+                three: index % 5 == 2,
+                four: index % 5 == 3,
+                five: index % 5 == 4,
+              }"
+            >
+              <div
+                class="card_box_cir1"
+                :class="{
+                  one1: index % 5 == 0,
+                  two1: index % 5 == 1,
+                  three1: index % 5 == 2,
+                  four1: index % 5 == 3,
+                  five1: index % 5 == 4,
+                }"
+              >
+                <span
+                  class="iconfont"
+                  :class="item.className"
+                  v-if="item.type"
+                ></span>
+                <Icon :type="item.className" v-else />
+              </div>
+            </div>
+            <div class="card_box_txt">
+              <span class="sp1" v-text="item.count || 0"></span>
+              <span class="sp2" v-text="item.name"></span>
+              <span class="sp2">分红人数:{{item.user||0}}人</span>
+            </div>
+          </div>
+        </Card>
+      </Col>
+    </Row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "cards",
+  data() {
+    return {};
+  },
+  props: {
+    cardLists: Array,
+  },
+  data() {
+    return {};
+  },
+  methods: {
+		checkedData(item){
+			console.log(item,'11')
+			this.$emit('clickitem',item)
+		},
+  },
+  created() {},
+};
+</script>
+
+<style scoped lang="stylus">
+/* .card_cent >>> .ivu-card-body */
+/* width 100% */
+/* height 100% */
+.card_box_cir1 >>> .ivu-icon {
+  font-size: 26px;
+  color: #fff;
+}
+.card_box{
+	cursor: pointer;
+}
+
+.one {
+  background: #E4ECFF;
+}
+
+.two {
+  background: #FFF3E0;
+}
+
+.three {
+  background: #EAF9E1;
+}
+
+.four {
+  background: #FFEAF4;
+}
+
+.five {
+  background: #F1E4FF;
+}
+
+.one1 {
+  background: #4D7CFE;
+}
+
+.two1 {
+  background: #FFAB2B;
+}
+
+.three1 {
+  background: #6DD230;
+}
+
+.four1 {
+  background: #FF85C0;
+}
+
+.five1 {
+  background: #B37FEB;
+}
+
+.card_box {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  /* justify-content: center */
+  padding: 25px;
+  box-sizing: border-box;
+  border-radius: 4px;
+
+  .card_box_cir {
+    width: 60px;
+    height: 60px;
+    border-radius: 50%;
+    overflow: hidden;
+    margin-right: 20px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+
+    .card_box_cir1 {
+      width: 48px;
+      height: 48px;
+      border-radius: 50%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+
+  .card_box_txt {
+    .sp1 {
+      display: block;
+      color: #252631;
+      font-size: 24px;
+    }
+
+    .sp2 {
+      display: block;
+      color: #98A9BC;
+      font-size: 12px;
+    }
+  }
+}
+
+.card_box_cir1 .iconfont {
+  color: #fff;
+  font-size: 23px;
+}
+@media (min-width: 1600px) {
+  .ivu-col-span-xxl-4-8 {
+    display: block;
+    flex: 0 0 20%;
+    max-width: 20%;
+  }
+}
+</style>

+ 11 - 9
src/pages/finance/bonus/list/index.vue

@@ -24,7 +24,7 @@
 			</div>
 		</Card>
 		<!-- 中间数据卡片 -->
-		<cards-data :cardLists="cardLists" v-if="cardLists.length >= 0"></cards-data>
+		<cards-data @clickitem='clickitem' :cardLists="cardLists" v-if="cardLists.length >= 0"></cards-data>
 		<Card :bordered="false" dis-hover>
 			<!--      <div>充值记录列表</div>-->
 			<!-- 表格 -->
@@ -69,7 +69,7 @@
 	</div>
 </template>
 <script>
-	import cardsData from "@/components/cards/cards";
+	import cardsData from "../card/cards";
 	import {
 		mapState
 	} from "vuex";
@@ -77,14 +77,9 @@
 	import {
 		award_lake,
 		award_lake_log,
-		award_lake_post
-		// userRechargeApi,
-		// refundEditApi,
-		// exportUserRechargeApi,
+		award_lake_post,
+		award_set,
 	} from "@/api/newApi";
-	// import {
-	// 	userRechargeApi,
-	// } from "@/api/finance";
 	import timeOptions from "@/utils/timeOptions";
 	import { formatDate } from "@/utils/validate";
 	export default {
@@ -168,6 +163,11 @@
 			this.get_award_lake()
 		},
 		methods: {
+			clickitem(item){
+				console.log('item',item)
+				console.log(	this.$modalForm);
+				this.$modalForm(award_set({ id: item.id })).then(() => this.get_award_lake());
+			},
 			// 发放奖励
 			sendBonus(){
 				award_lake_post({
@@ -244,6 +244,8 @@
 				    col: 6,
 				    count: res.award,
 				    name: res.name,
+					id:res.id,
+					user:res.user,
 				    // className: "md-basket",
 				  }
 				})

+ 246 - 0
src/pages/finance/commission/flowing.vue

@@ -0,0 +1,246 @@
+<template>
+<!-- 财务-佣金记录 -->
+  <div>
+    <Card :bordered="false" dis-hover class="ivu-mt" :padding= "0">
+      <div class="new_card_pd">
+        <!-- 查询条件 -->
+      <Form
+        ref="formValidate"
+        :label-width="labelWidth"
+        :label-position="labelPosition"
+        inline
+        class="tabform"
+        @submit.native.prevent
+      >
+            <FormItem label="时间选择:">
+              <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd HH:mm"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="input-add"
+                :options="options"
+              ></DatePicker>
+            </FormItem>
+            <FormItem label="昵称/ID:">
+              <Input
+                enter-button
+                placeholder="请输入"
+                element-id="nickname"
+                class="input-add"
+                v-model="formValidate.nickname"
+                clearable
+              />
+			  <Button type="primary" @click="userSearchs"
+			  >查询</Button>
+			  <!-- <Button
+			  class="export"
+			  @click="exports"
+			  >导出</Button> -->
+            </FormItem>
+      </Form>
+      </div>
+    </Card>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <!-- 表格 -->
+      <Table
+        ref="table"
+        :columns="columns"
+        :data="tabList"
+        class="mt25"
+        :loading="loading"
+        no-data-text="暂无数据"
+        no-filtered-data-text="暂无筛选结果"
+        @on-sort-change="sortChanged"
+      >
+				<template slot-scope="{ row, index }" slot="nickname">
+					<span>{{ row.nickname }} </span>
+					<span style="color: #ed4014;" v-if="row.delete_time != null"> (已注销)</span>
+				</template>
+        <template slot-scope="{ row, index }" slot="action">
+          <a @click="Info(row)">详情</a>
+        </template>
+      </Table>
+      <div class="acea-row row-right page">
+        <Page
+          :total="total"
+          :current="formValidate.page"
+          show-elevator
+          show-total
+          :page-size="formValidate.limit"
+          @on-change="pageChange"
+        />
+      </div>
+    </Card>
+    <commission-details ref="commission"></commission-details>
+  </div>
+</template>
+<script>
+import { mapState } from "vuex";
+import { extractListApi } from "@/api/newApi";
+import commissionDetails from "./handle/commissionDetails";
+import exportExcel from "@/utils/newToExcel.js";
+import timeOptions from "@/utils/timeOptions";
+export default {
+  name: "commissionRecord",
+  components: { commissionDetails },
+  data() {
+    return {
+      timeVal: [], //时间筛选
+      total: 0,
+      loading: false,
+      tabList: [],
+      formValidate: {
+        nickname: "",
+        price_max: "",
+        price_min: "",
+        excel: 0,
+        page: 1, // 当前页
+        limit: 20, // 每页显示条数
+      },
+      options:timeOptions,
+      columns: [
+        {
+          title: "昵称/姓名/ID",
+          slot: "nickname",
+          minWidth: 150,
+        },
+		{
+		  title: "佣金金额",
+		  key: "number",
+		  // sortable: "custom",
+		  minWidth: 100,
+		},
+        {
+          title: "获得时间",
+          key: "_add_time",
+          // sortable: "custom",
+          minWidth: 140,
+        },
+        {
+          title: "备注",
+          key: "mark",
+          minWidth: 300,
+        },
+      ],
+    };
+  },
+  computed: {
+    ...mapState("admin/layout", ["isMobile"]),
+    labelWidth() {
+      return this.isMobile ? undefined : 96;
+    },
+    labelPosition() {
+      return this.isMobile ? "top" : "right";
+    },
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    // 列表
+    getList() {
+      this.loading = true;
+      extractListApi(this.formValidate)
+        .then(async (res) => {
+          let data = res.data;
+          this.tabList = data.data;
+          this.total = data.count;
+          this.loading = false;
+        })
+        .catch((res) => {
+          this.loading = false;
+          this.$Message.error(res.msg);
+        });
+    },
+    // 选择时间
+    selectChange(tab) {
+      this.formValidate.page = 1;
+      this.formValidate.date = tab;
+      this.timeVal = [];
+      this.getList();
+    },
+    // 具体日期
+    onchangeTime(e) {
+      this.timeVal = e;
+      this.formValidate.date = this.timeVal[0] ? this.timeVal.join("-") : "";
+      this.formValidate.page = 1;
+      if (!e[0]) {
+        this.formValidate.date = "";
+      }
+      this.getList();
+    },
+    pageChange(index) {
+      this.formValidate.page = index;
+      this.getList();
+    },
+    // 搜索
+    userSearchs() {
+      this.formValidate.page = 1;
+      this.getList();
+    },
+    // 数据导出;
+    async exports() {
+      let [th, filekey, data, fileName] = [[], [], [], ""];
+      //   let fileName = "";
+      let excelData = JSON.parse(JSON.stringify(this.formValidate));
+      excelData.page = 1;
+      for (let i = 0; i < excelData.page + 1; i++) {
+        let lebData = await this.getExcelData(excelData);
+        if (!fileName) fileName = lebData.filename;
+        if (!filekey.length) {
+          filekey = lebData.filekey;
+        }
+        if (!th.length) th = lebData.header;
+        if (lebData.export.length) {
+          data = data.concat(lebData.export);
+          excelData.page++;
+        } else {
+          exportExcel(th, filekey, fileName, data);
+          return;
+        }
+      }
+    },
+    getExcelData(excelData) {
+      return new Promise((resolve, reject) => {
+        extractListApi(excelData).then((res) => {
+          return resolve(res.data);
+        });
+      });
+    },
+    // 详情
+    Info(row) {
+      this.$refs.commission.modals = true;
+      this.$refs.commission.getDetails(row.uid);
+      this.$refs.commission.getList(row.uid);
+    },
+    // 排序
+    sortChanged(e) {
+      if (e.key == "sum_number") {
+        delete this.formValidate.brokerage_price;
+      } else {
+        delete this.formValidate.sum_number;
+      }
+      this.formValidate[e.key] = e.order;
+      this.getList();
+    },
+  },
+};
+</script>
+
+<style scoped lang="stylus">
+.lines {
+  padding-top: 6px !important;
+}
+
+.tabform .export {
+  margin-left: 10px;
+}
+
+.tab_data >>> .ivu-form-item-content {
+  display: flex !important;
+}
+</style>

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

@@ -1128,6 +1128,17 @@
               />
             </FormItem>
           </Col>
+		  <Col span="24" v-if="merchantType == 0">
+		    <FormItem label="赠送绿积分:" prop="give_green_integral">
+		      <InputNumber
+		          v-width="'50%'"
+		          v-model="formValidate.give_green_integral"
+		          :min="0"
+		          :max="999999"
+		          placeholder="请输入积分"
+		      />
+		    </FormItem>
+		  </Col>
           <Col v-bind="grid3" v-if="merchantType == 0">
             <FormItem label="赠送优惠券:">
               <div v-if="couponName.length" class="mb20">
@@ -2262,6 +2273,7 @@ export default {
         description: "",
         ficti: 0,
         give_integral: 0,
+		give_green_integral:0,
         sort: 0,
         is_show: 1,
         is_hot: 0,

+ 61 - 1
src/pages/user/list/handle/userDetails.vue

@@ -1,6 +1,6 @@
 <template>
     <!-- <div style="width: 100%"> -->
-  <Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
+  <Drawer :closable="false" width="1300" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
         <div class="acea-row user-row">
             <div class="avatar mr15">
                 <img :src="psInfo.avatar">
@@ -125,6 +125,8 @@
                     { val: 'info', label: '用户信息' },
                     { val: 'order', label: '消费记录' },
                     { val: 'integral', label: '积分明细' },
+                    { val: 'green_integral', label: '绿积分明细' },
+                    { val: 'base_integral', label: '母积分明细' },
                     { val: 'sign', label: '签到记录' },
                     { val: 'coupon', label: '持有优惠券' },
                     { val: 'balance_change', label: '余额变动' },
@@ -429,6 +431,64 @@
                                 }
                             ]
                             break;
+						case 'green_integral':
+						    this.columns = [
+						        {
+						            title: '来源/用途',
+						            key: 'title',
+						            minWidth: 120
+						        },
+						        {
+						            title: '积分变化',
+						            key: 'number',
+						            minWidth: 120
+						        },
+						        {
+						            title: '变化后积分',
+						            key: 'balance',
+						            minWidth: 120
+						        },
+						        {
+						            title: '日期',
+						            key: 'add_time',
+						            minWidth: 120
+						        },
+						        {
+						            title: '备注',
+						            key: 'mark',
+						            minWidth: 120
+						        }
+						    ]
+						    break;
+						case 'base_integral':
+						    this.columns = [
+						        {
+						            title: '来源/用途',
+						            key: 'title',
+						            minWidth: 120
+						        },
+						        {
+						            title: '积分变化',
+						            key: 'number',
+						            minWidth: 120
+						        },
+						        {
+						            title: '变化后积分',
+						            key: 'balance',
+						            minWidth: 120
+						        },
+						        {
+						            title: '日期',
+						            key: 'add_time',
+						            minWidth: 120
+						        },
+						        {
+						            title: '备注',
+						            key: 'mark',
+						            minWidth: 120
+						        }
+						    ]
+						    break;
                         case 'sign':
                             this.columns = [
                                 // {

+ 11 - 0
src/pages/user/list/index.vue

@@ -455,8 +455,19 @@
         </vxe-column>
         <vxe-column field="level" title="用户等级" min-width="90"></vxe-column>
         <vxe-column field="group_vip_name" title="团队等级" min-width="90"></vxe-column>
+		<vxe-column field="area_admin"  title="代理" min-width="100">
+			<template v-slot="{ row }">
+				<div>
+					<span v-if="row.area_admin==1">{{row.area_district}}区代</span>
+					<span v-if="row.area_admin==2">{{row.area_city}}市代</span>
+					<span v-if="row.area_admin==3">{{row.area_province}}省代</span>
+				</div>
+			</template>
+		</vxe-column>
         <vxe-column field="award_range" title="分红额度" min-width="90"></vxe-column>
         <vxe-column field="award_piece" title="分红值" min-width="90"></vxe-column>
+        <vxe-column field="green_integral" title="绿积分" min-width="90"></vxe-column>
+        <vxe-column field="base_integral" title="母积分" min-width="90"></vxe-column>
         <vxe-column field="group_id" title="分组" min-width="100"></vxe-column>
         <vxe-column field="phone" title="手机号" min-width="110"></vxe-column>
         <vxe-column field="user_type" title="用户类型" min-width="100"></vxe-column>

+ 10 - 1
src/router/modules/finance.js

@@ -67,6 +67,15 @@ export default {
                 title: '佣金记录'
             },
             component: () => import('@/pages/finance/commission/index')
-        }
+        },
+		{
+		    path: 'finance/flowing',
+		    name: `${pre}flowing`,
+		    meta: {
+		        auth: ['finance-finance-flowing'],
+		        title: '佣金流水'
+		    },
+		    component: () => import('@/pages/finance/commission/flowing')
+		}
     ]
 };