| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('components/apply-edit', __DIR__);
- ?>
- <style>
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .table1 .el-table__footer-wrapper,
- .table1 .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .user_img{
- position: relative;
- margin-right: 8px;
- /* height: 50px;
- width: 50px; */
- }
- .default-avatar{
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- </style>
- <div id="app">
- <div class="table-body" style="min-width: 1000px;">
- <div slot="header" class="clearfix" style="height: 20px;">
- <span>申请列表</span>
- </div>
- <div slot="header" class="clearfix" style="margin-top: 20px;">
- <div class="demo-input-suffix" style="margin-top: 20px;margin-bottom: 10px;">
- <el-input @keyup.enter.native="toSearchActivity" size="small" style="width:300px;margin-right: 20px;" placeholder="请输入会员昵称/ID" v-model="keyword" clearable>
- </el-input>
- <el-select size="small" v-model="check_status" @change='toSearch' class="select" style="margin-right: 20px;width: 150px;" placeholder="请选择审核状态">
- <el-option :key="index" :label="item.name" :value="item.level" v-for="(item, index) in checkStatusList"></el-option>
- </el-select>
- <el-date-picker
- size="small"
- v-model="month"
- type="month"
- placeholder="选择月份"
- style="margin-right: 20px;"
- @change="toSearch"
- value-format="yyyy-MM">
- </el-date-picker>
- <el-button type="primary" size="small" @click="toSearch">搜索</el-button>
- </div>
- </div>
- <template>
- <el-table :data="list" stripe style="width: 100%" v-loading="listLoading" class="table1">
- <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
- <el-table-column label="基本信息" >
- <template slot-scope="scope">
- <div class="user_img" flex="cross:center">
- <el-image class="default-avatar" :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="uer-nickname over1" v-if="scope.row.user.nickname" style="color:#000;">{{scope.row.user.nickname}}</div>
- <div class="uer-nickname over1" style="color:#000;" v-else>ID:{{scope.row.user.id}}</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="mobile" label="手机号" align="center"></el-table-column>
- <el-table-column prop="realname" label="真实姓名" align="center"></el-table-column>
- <el-table-column label="申请代理身份" align="center">
- <template slot-scope="scope">
- <div >{{level_map[scope.row.level]}}</div>
- </template>
- </el-table-column>
- <el-table-column prop="address" label="申请区域" align="center"></el-table-column>
- <el-table-column label="申请时间" align="center">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column label="申请金额" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.pay_price > 0">{{scope.row.pay_price}}</div>
- <div v-else>-</div>
- </template>
- </el-table-column>
- <el-table-column label="退回时间" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.is_refund == 1">{{scope.row.refund_time|dateTimeFormat('Y-m-d H:i:s')}}</div>
- <div v-else>-</div>
- </template>
- </el-table-column>
- <el-table-column prop="marks" label="备注" align="center"></el-table-column>
- <el-table-column label="状态" align="center">
- <template slot-scope="scope">
- {{check_status_map[scope.row.check_status]}}
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <el-button type="primary" size="small" v-if="scope.row.check_status==0" @click="editApply(scope.row)">
- 未审核
- <i class="el-icon-caret-right el-icon--right"></i>
- </el-button>
- <el-button type="danger" size="small" v-if="scope.row.check_status==2">不通过</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div flex="main:right cross:center" style="margin-top: 20px;">
- <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
- style="display: inline-block;float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.totalCount">
- </el-pagination>
- </div>
- </template>
- </div>
- <apply-edit v-model="show" :row="row" @success="loadData"></apply-edit>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- listLoading: false,
- list: [],
- pagination: {
- total: 0
- },
- loading: false,
- LoadDataType: -1, //默认显示全部数据
- dialogFormVisible: false, //默认不显示弹窗
- group_buy_attr_list: [],
- goodsDetail: {},
- dialogLoading:false,
- commander_level_limit_text:'',
- user_level_limit_text:'',
- level_map:null,
- check_status_map:[],
- keyword:'',
- check_status:'',
- month:'',
- page: 1,
- checkStatusList:[
- {
- name:'全部状态',
- level:-1
- }
- ,{
- name:'未审核',
- level:0
- },
- {
- name:'审核通过',
- level:1
- },
- {
- name:'不通过',
- level:2
- },
- ],
- show:false,
- row: {},
- }
- },
- methods: {
- edit(id) {
- navigateTo({
- r: 'bargain/default/edit',
- id: id
- })
- },
- //状态按钮的点击事件
- toSearch() {
- this.loadData();
- },
- toSearchActivity() {
- this.loadData()
- },
- update(row) {
- if(row.status==0){
- this.$confirm('此操作将删除该砍价商品, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.delGoods(row.id);
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- }
- if(row.status==1){
- this.$confirm('此操作将使该砍价活动失效, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.invalidGoods(row.id);
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- }
- },
- pageChange(page) {
- this.page = page;
- this.loadData();
- },
- // 请求获取数据--获取拼团商品列表
- loadData() {
- this.listLoading = true;
- let params = {
- r: 'area/default/apply-list',
- page: this.page,
- limit:10,
- keyword: this.keyword,
- check_status: this.check_status,
- month:this.month
- };
- request({
- params: params,
- method: 'get',
- }).then(e => {
- let res = e.data;
- this.listLoading = false;
- if (res.code === 0) {
- this.list = res.data.list;
- this.level_map = res.data.level_map;
- this.check_status_map = res.data.check_status_map;
- this.pagination = res.data.pagination; //拿到关于页码页容量的数据
- } else {
- this.$message.error(res.msg);
- }
- }).catch(e => {});
- },
- editApply(row) {
- this.show = true;
- this.row.id=row.id;
- },
- },
- // 加载的时候获取到列表页
- mounted() {
- // 数据初始化
- this.LoadDataType = -1;
- this.loadData();
- }
- })
- </script>
|