| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <?php
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>团长奖励明细</span>
- </div>
- <el-row :gutter="10" style="margin-bottom: 10px;">
- <el-col :span="8">
- <el-card shadow="never">
- <template #header>
- <strong>
- 提成总金额
- </strong>
- </template>
- <template>
- <div>
- <strong class="text-danger" style="font-size: 32px">{{total_commission|amount}}</strong>
- <span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
- </div>
- </template>
- </el-card>
- </el-col>
- <el-col :span="8">
- <el-card shadow="never">
- <template #header>
- <strong>
- 今日笔数
- </strong>
- </template>
- <template>
- <div>
- <strong class="text-danger" style="font-size: 32px">{{today_count}}</strong>
- <span class="text-info" style="font-size: 12px; margin-left: 5px">笔</span>
- </div>
- </template>
- </el-card>
- </el-col>
- <el-col :span="8">
- <el-card shadow="never">
- <template #header>
- <strong>
- 今日金额
- </strong>
- </template>
- <template>
- <div>
- <strong class="text-danger" style="font-size: 32px">{{today_commission|amount}}</strong>
- <span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
- </div>
- </template>
- </el-card>
- </el-col>
- </el-row>
- <div class="table-body">
- <div style="padding-bottom: 20px;">
- <div class="flex">
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="请输入团长会员ID" v-model="searchData.user_id">
- </el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="团长昵称/手机号" v-model="searchData.member">
- </el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="自提点名称" v-model="searchData.name">
- </el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <span class="demonstration">更新时间</span>
- <el-date-picker style="margin-top: 1px;" @change="changeTime" v-model="datetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
- </div>
- <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
- <el-button type="warning" @click="clereSearch" v-if="searchData.user_id || searchData.name ||
- searchData.member" style="font-size:12px;padding: 9px 15px !important;">清除搜索条件</el-button>
- </div>
- </div>
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
- <el-table-column prop="id" label="序号" width="100" align="center"></el-table-column>
- <el-table-column label="团长昵称" width="200" prop="user_id" align="center">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
- <div style="font-size: 12px; text-align: left">ID:{{scope.row.user.id}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="手机号" width="160" prop="mobile" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.head.mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="自提点名称" prop="name" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.head.name}}</div>
- </template>
- </el-table-column>
- <el-table-column label="自提点logo" prop="license_img" align="center">
- <template slot-scope="scope">
- <com-image mode="aspectFill" :width="'auto'" :src="scope.row.head.logo"></com-image>
- </template>
- </el-table-column>
- <el-table-column label="奖励" prop="status" width="200" align="center">
- <template slot-scope="scope">
- <div>
- <strong style="font-size: 18px">{{scope.row.commission|amount}}</strong>{{reward_map[scope.row.reward_type]}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="提成说明" prop="intro" align="center"></el-table-column>
- <el-table-column label="更新时间" prop="updated_at" align="center">
- <template slot-scope="scope">
- <div>
- {{scope.row.updated_at | dateTimeFormat('Y-m-d H:i:s')}}
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- searchData: {
- user_id: '',
- member: '',
- name: '',
- start: null,
- end: null,
- limit: 10
- },
- currPage: 1,
- pageCount: 0,
- loading: false,
- dialogVisible: false,
- list: [],
- dialogLoading: false,
- addTime: '', //注册时间
- storeStatus: {
- 1: '正常',
- 2: '禁用'
- },
- total_commission: 0,
- today_count: 0,
- today_commission: 0,
- reward_map: {},
- datetime: [],
- },
- mounted() {
- this.loadData();
- },
- methods: {
- searchs() {
- this.currPage = 1;
- this.loadData();
- },
- addTimeChange(v) {
- this.searchData.date_start = v ? v[0] : '';
- this.searchData.date_end = v ? v[1] : '';
- },
- clereSearch() {
- this.searchData.member = '';
- this.searchData.user_id = '';
- this.searchData.name = '';
- this.searchData.start = '';
- this.searchData.end = '';
- this.currPage = 1;
- this.loadData();
- },
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'community/commission/index',
- page: this.currPage,
- ...this.searchData,
- },
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.list = e.data.data.list;
- this.total_commission = e.data.data.commission
- this.today_count = e.data.data.today_count
- this.today_commission = e.data.data.today_commission
- this.pageCount = e.data.data.page_count;
- this.reward_map = e.data.data.reward_map
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pagination(currentPage) {
- let self = this;
- self.currPage = currentPage;
- self.loadData();
- },
- changeTime(e) {
- if (e === null) {
- this.searchData.start = null
- this.searchData.end = null
- }else {
- this.searchData.start = e[0]
- this.searchData.end = e[1]
- }
- },
- },
- filters: {
- amount: function(val) {
- if (!val) {
- val = 0
- }
- return parseFloat(val / 100).toFixed(2)
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- width: 250px;
- margin-right: 40px;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-table .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- #app .copy .el-input-group__append {
- background-color: #409EFF;
- border-color: #409EFF;
- padding: 0 10px;
- }
- #app .table-body .copybtn {
- color: #fff;
- padding: 0 30px;
- }
- .el-alert {
- padding: 0;
- padding-left: 5px;
- padding-bottom: 5px;
- }
- .el-alert--info .el-alert__description {
- color: #606266;
- }
- .el-alert .el-button {
- margin-left: 20px;
- }
- .el-alert__content {
- display: flex;
- align-items: center;
- }
- .table-body .el-alert__title {
- margin-top: 5px;
- font-weight: 400;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .item-box {
- margin-right: 20px;
- }
- .flex {
- display: flex;
- align-items: center;
- }
- .input-title {
- margin-right: 15px;
- }
- .item-box .label {
- margin-right: 8px;
- }
- .com-share-pop {
- display: inline-block;
- }
- .grid-icon {
- color: #999;
- cursor: pointer;
- font-size: 18px;
- }
- .el-input__inner {
- height: 32px;
- line-height: 32px;
- }
- .el-range-editor.el-input__inner {
- padding: 0 15px;
- }
- .el-date-editor .el-range-input,
- .el-date-editor .el-range-separator {
- font-size: 13px;
- height: auto;
- }
- </style>
|