| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-image');
- ?>
- <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>
- <div class="table-body">
- <div style="padding-bottom: 20px;">
- <div class="flex">
- <div class="flex" style="margin-right: 20px;">
- <div class="input-title" style="flex-shrink: 0;">小店名称</div>
- <el-input size="small" style="width: 130px;" placeholder="请输入门店名称"
- v-model="searchData.store_name"></el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <div class="input-title" style="flex-shrink: 0;">店长</div>
- <el-input size="small" style="width: 130px;" placeholder="请输入店长姓名"
- v-model="searchData.storeowner">
- </el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <div class="input-title" style="flex-shrink: 0;">绑定会员</div>
- <el-input size="small" style="width: 130px;" placeholder="请输入会员名称"
- v-model="searchData.nickname">
- </el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">小店状态</div>
- <el-select v-model="searchData.status" @change='searchs' class="select" size="small"
- style="width: 130px;">
- <el-option :key="0" label="全部" :value="0"></el-option>
- <el-option :key="1" label="正常" :value="1"></el-option>
- <el-option :key="3" label="禁用" :value="3"></el-option>
- </el-select>
- </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.store_name || searchData.storeowner || searchData.nickname || searchData.cate_id || searchData.status"
- style="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="小店ID" width="100" align="center"></el-table-column>
- <el-table-column label="小店名称" width="200" prop="store_name" align="center">
- <template slot-scope="scope">
- <com-image style="float: left;margin-right: 10px;" mode="aspectFill"
- :src="scope.row.logo_img"></com-image>
- <div>{{scope.row.store_name}}</div>
- <div>{{scope.row.shop_mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="小店地址" prop="store_address" width="180" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.store_address}}</div>
- </template>
- </el-table-column>
- <el-table-column label="会员" width="150" align="center">
- <template slot-scope="scope">
- <com-image style="float: left;margin-right: 5px;" mode="aspectFill"
- :src="scope.row.avatar_url"></com-image>
- <div>{{scope.row.nickname}}</div>
- <div>{{scope.row.user_mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="店长姓名" prop="shop_owner" width="120" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.shop_owner}}</div>
- </template>
- </el-table-column>
- <el-table-column label="所属业务" width="170" align="center">
- <template slot-scope="scope">
- <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row
- .business.avatar_url"></com-image>
- <div>{{scope.row.business.nickname}}</div>
- <div>{{scope.row.business.mobile}}</div>
- </template>
- </el-table-column>
- <el-table-column label="" prop="" width="160" align="center">
- <template slot="header">
- 小店累计收入
- </template>
- <template slot-scope="scope">
- <div>
- <span style="color: #409EFF;">{{scope.row.total_money || 0}}</span><br/>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="会员总数" prop="user_nums" width="100" align="center">
- <template slot-scope="scope">
- <div>
- {{scope.row.user_nums}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="状态" prop="store_status" width="80" align="center">
- <template slot-scope="scope">
- <div>
- <span>{{storeStatus[scope.row.store_status]}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="user_count" width="100" align="center">
- <template slot-scope="scope">
- <div>
- {{scope.row.created_at | dateTimeFormat('Y-m-d H:i:s')}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" style="width: 200px;" fixed="right" align="center">
- <template slot-scope="scope">
- <el-button type="text" size="small" @click="goToDetail(scope.row.id)">详情</el-button>
- </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 src="/resources/unpkg/clipboard@1.0.0/dist/clipboard.min.js"></script>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- searchData: {
- cate_id: 0,
- nickname: '',
- storeowner: '',
- store_name: '',
- status: 0,
- },
- currPage: 1,
- pageCount: 0,
- loading: false,
- store_id:0,
- recharge: '',
- dialogVisible: false,
- dialogSendVisible: false,
- btnLoading:false,
- recharge_list: [],
- list: [],
- dialogLoading: false,
- // exportList: [],
- categorys: [],
- storeStatus: {
- 1: '正常',
- 2: '过期',
- 3: '禁用',
- 4: '冻结',
- },
- store_login_url: '', // 门店登录 url
- store_collection_url: '', // 门店收款码链接
- shareData: {
- url: "", //链接
- img: "", //二维码
- qrcode_filename: '', // 二维码文件名
- },
- applet_url: '',
- },
- mounted() {
- this.loadData();
- },
- methods: {
- searchs() {
- this.currPage = 1;
- this.loadData();
- },
- clereSearch() {
- this.searchData.cate_id = 0;
- this.searchData.nickname = '';
- this.searchData.storeowner = '';
- this.searchData.store_name = '';
- this.searchData.status = 0;
- this.currPage = 1;
- this.loadData();
- },
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'happiness/agent/store/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.store_login_url = e.data.data.store_login_url;
- this.store_collection_url = e.data.data.store_collection_url;
- this.pageCount = e.data.data.page_count;
- this.edit_status = e.data.data.edit_status;
- this.categorys = e.data.data.cate_list;
- this.recharge_list = e.data.data.recharge_list;
- console.log(this.recharge_list)
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pagination(currentPage) {
- let self = this;
- self.currPage = currentPage;
- self.loadData();
- },
- // 跳转门店详情页
- goToDetail(id) {
- navigateTo({
- r: 'happiness/agent/store/detail',
- store_id: id,
- });
- },
- }
- });
- var clipboard = new ClipboardJS('#copy_btn');
- var self = this;
- clipboard.on('success', function (e) {
- self.ELEMENT.Message.success('复制成功');
- e.clearSelection();
- });
- clipboard.on('error', function (e) {
- self.ELEMENT.Message.success('复制失败,请手动复制');
- });
- </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;
- }
- </style>
|