| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog', '@backend/views/components/common');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>使用记录</span>
- <el-form size="small" :inline="true" style="float: right;margin-top: -5px;">
- <el-form-item>
- <com-export-dialog :field_list='exportList' :action_url="export_url" :params="searchData" @selected="exportConfirm"></com-export-dialog>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <div class="table-body">
- 卡编号:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="请输入卡编号" v-model="searchData.order_no" clearable @clear="search"></el-input>
- </div>
- 开卡用户:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="请输入用户昵称" v-model="searchData.nickname" clearable @clear="search"></el-input>
- </div>
- 核销门店:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="请输入核销门店" v-model="searchData.store_name" clearable @clear="search"></el-input>
- </div>
- 核销人:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="请输入核销人" v-model="searchData.clerk_nickname" clearable @clear="search"></el-input>
- </div>
- 核销时间:
- <el-date-picker
- size="small"
- v-model="searchData.date_time"
- type="datetimerange"
- range-separator="至"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
- </el-date-picker>
- <div style="display: inline-block;margin-left: 10px;">
- <el-button type="primary" size="small" @click="search">查询</el-button>
- <el-button type="primary" size="small" @click="resetForm" style=" margin-left: 0px;background-color: #ef1818;border-color: #ef1818;">重置</el-button>
- </div>
- </div>
- <div class="table-body">
- <template>
- <el-table ref="multipleTable" :data="list" @sort-change="sortChange"
- >
- <!-- 空数据 -->
- <template slot="empty">
- <el-empty description="暂无数据"></el-empty>
- </template>
- <el-table-column prop="order_no" label="卡号" align="center"></el-table-column>
- <el-table-column prop="secondary_card_name" label="次卡名称" align="center"></el-table-column>
- <el-table-column prop="user_id" label="会员ID" align="center"></el-table-column>
- <el-table-column label="开卡用户" width="200">
- <template slot-scope="scope">
- <div class="user_img" flex="cross:center">
- <el-image class="default-avatar" :src="scope.row.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
- </div>
- </el-image>
- <div class="uer-nickname over1" v-if="scope.row.nickname">{{scope.row.nickname}}
- <br/>{{scope.row.mobile}}
- </div>
- <div class="uer-nickname over1" v-else >ID:{{scope.row.user_id}}</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="开卡时间" prop="open_time" align="center" width="200" sortable="open_time">
- <template slot-scope="scope">
- {{scope.row.open_time|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column prop="clerk_nums" label="单次核销次数" align="center" ></el-table-column>
- <el-table-column prop="store_name" label="核销门店" align="center" ></el-table-column>
- <el-table-column prop="clerk_nickname" label="核销人" align="center" ></el-table-column>
- <el-table-column label="核销时间" prop="created_at" align="center" width="200" sortable="created_at">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- </el-table>
- </template>
- <!-- 分页 -->
- <el-row type="flex" class="page" justify="end">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount" v-if="list"></el-pagination>
- </el-row>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- loading: false,
- list: [],
- searchData: {
- order_no: '',
- nickname: '',
- store_name: '',
- clerk_nickname: '',
- date_time: '',
- },
- pageCount: 0,
- page: 1,
- currentPage: null,
- listLoading: false,
- type: '',
- sort: '',
- sort_column:'',
- sort_order:'',
- exportList: {},
- export_url: 'secondary-card/default/use-log',
- };
- },
- created() {
- this.searchData.order_no = getQuery('order_no')
- },
- methods: {
- exportConfirm(){},
- //搜索
- search() {
- this.page = 1;
- this.loadData();
- },
- pagination(currentPage) {
- this.page = currentPage;
- this.loadData();
- },
- loadData() {
- this.listLoading = true;
- var param = {
- r: 'secondary-card/default/use-log',
- page: this.page,
- order_no: this.searchData.order_no,
- nickname: this.searchData.nickname,
- store_name: this.searchData.store_name,
- clerk_nickname: this.searchData.clerk_nickname,
- date_time: this.searchData.date_time,
- sort_column:this.sort_column,
- sort_order:this.sort_order,
- limit: 15
- }
- request({
- params: param,
- }).then(e => {
- if (e.data.code === 0) {
- this.list = e.data.data.list;
- this.exportList = e.data.data.export_list;
- this.pageCount = e.data.data.page_count;
- this.currentPage = e.data.data.pagination.current_page;
- } else {
- this.$message.error(e.data.msg);
- }
- this.listLoading = false;
- }).catch(e => {
- this.listLoading = false;
- });
- },
- //重置
- resetForm() {
- this.searchData.order_no = '';
- this.searchData.date_time = '';
- this.searchData.nickname = '';
- this.searchData.store_name = '';
- this.searchData.clerk_nickname = '';
- },
- sortChange( column, prop, order){
- this.sort_order = column.order;
- this.sort_column = column.prop;
- this.loadData();
- },
- },
- mounted: function() {
- this.page = getQuery('page') ? getQuery('page') : 1;
- this.loadData();
- },
- });
- </script>
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- /* .table-info .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- } */
- .input-item {
- display: inline-block;
- width: 150px;
- margin: 0 0 20px;
- margin-right: 10px;
- }
- .input-item .el-input__inner {
- border-right: 1px solid #dcdfe6;
- }
- .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;
- }
- .select {
- float: left;
- width: 100px;
- margin-right: 10px;
- }
- .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;
- }
- .search-sort {
- display: inline-block;
- margin: 0px 10px;
- cursor: pointer;
- color: rgb(51, 51, 51);
- }
- .caret-wrapper {
- display: inline-flex;
- flex-direction: column;
- align-items: center;
- height: 25px;
- width: 11px;
- vertical-align: middle;
- cursor: pointer;
- overflow: initial;
- position: relative;
- }
- .caret-top {
- border: 5px solid transparent;
- margin: 1px 0;
- border-bottom-color: rgb(51, 51, 51);
- }
- .caret-bottom {
- border: 5px solid transparent;
- margin: 1px 0;
- border-top-color: rgb(51, 51, 51);
- }
- .active {
- border-top-color: rgb(41, 186, 156);
- }
- .ellipsis {
- font-size: 14px;
- color: #333;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .goods-wrapper {
- border: 2px solid #CCCCCC;
- display: inline-block
- }
- .goods-select {
- border: 2px solid #bb730c;
- }
- .goods-price {
- text-align: center;
- }
- .goods-price .number {
- color: red;
- font-weight: 600;
- font-size: 18px;
- }
- .goods-price .title {
- padding: 5px 0;
- color: #999;
- ;
- font-size: 10px;
- font-weight: 600;
- }
- .bottom-price .title {
- padding: 5px 0;
- color: #8b8888;
- ;
- font-size: 10px;
- }
- .bottom-price .number {
- color: #ff5100;
- font-size: 10px;
- }
- .goods-action {
- margin-top: 8px;
- }
- .goods-action .title {
- color: #0634aa;
- }
- .bottom-active {
- border-bottom-color: rgb(186, 41, 92);
- }
- .top-active {
- border-top-color: rgb(186, 41, 92);
- }
- .price {
- white-space: nowrap;
- }
- .goods-image {
- display: flex;
- justify-content: center;
- }
- .page {
- padding: 10px 0;
- }
- .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>
|