| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- <style>
- .header {
- padding: 18px 20px;
- background: #fff;
- margin-bottom: 10px;
- border-radius: 5px;
- border: 1px solid #EBEEF5;
- }
- .el-card {
- box-shadow: none !important;
- }
- .inquires_box {
- flex-wrap: wrap;
- }
- .condition {
- width: 450px;
- }
- .condition2 {
- margin-right: 30px;
- margin-bottom: 20px;
- }
- .operat_btn_list .el-button {
- padding: 8px 20px;
- }
- .table_box {
- margin-top: 10px;
- }
- .give_btn {
- border-radius: 5px;
- background: #fff;
- padding: 2px 0;
- border: 1px solid #DCDFE6;
- width: 80px;
- cursor: pointer;
- }
- /*.el-table .cell {*/
- /* display: flex;*/
- /* justify-content: center;*/
- /*}*/
- .operat1 {
- color: #3399FF;
- margin-right: 20px;
- cursor: pointer;
- }
- .operat2 {
- color: #FF336E;
- cursor: pointer;
- }
- .pagination_box {
- margin-top: 30px;
- justify-content: flex-end;
- }
- .types {
- cursor: pointer;
- }
- .coupon_type_list_box {
- flex-wrap: wrap;
- }
- .coupon_type_list {
- background: #F4F4F4;
- border-radius: 4px;
- padding: 8px 6px;
- width: 110px;
- margin-bottom: 15px;
- margin-right: 15px;
- position: relative;
- }
- /* .coupon_type_list:last-child */
- .coupon_type_list_box :nth-child(5n) {
- margin-right: 0px;
- }
- .coupon_type_title {
- font-size: 16px;
- margin-bottom: 10px;
- }
- .coupon_type_content {
- font-size: 12px;
- margin-bottom: 4px;
- }
- .coupon_type_list_expired {
- width: 100px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- opacity: 0.2;
- zoom: 1.05;
- }
- .el-dialog__body {
- padding: 20px 20px 10px;
- }
- .switchStyle .el-switch__label {
- position: absolute;
- display: none;
- color: #fff;
- }
- .switchStyle .el-switch__label--left {
- z-index: 9;
- left: 6px;
- }
- .switchStyle .el-switch__label--right {
- z-index: 9;
- left: -14px;
- }
- .switchStyle .el-switch__label.is-active {
- display: block;
- }
- .switchStyle.el-switch .el-switch__core,
- .el-switch .el-switch__label {
- width: 56px !important;
- }
- /* 公共样式 */
- .flex {
- display: -webkit-box;
- display: -webkit-flex;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- }
- .flex-x-center {
- display: -webkit-box;
- display: -webkit-flex;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- }
- .flex-x-between {
- display: -webkit-box;
- display: -webkit-flex;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- -webkit-box-pack: space-between;
- -webkit-justify-content: space-between;
- -ms-flex-pack: space-between;
- justify-content: space-between;
- }
- .flex-y-center {
- display: -webkit-box;
- display: -webkit-flex;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- -webkit-box-align: center;
- -webkit-align-items: center;
- -ms-flex-align: center;
- -ms-grid-row-align: center;
- align-items: center;
- }
- .give-info {
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- }
- /* 溢出隐藏 */
- .over1 {
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- }
- .over2 {
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .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;
- }
- </style>
- <div id='app' v-cloak style="min-width: 1000px;">
- <div class="header">
- </div>
- <el-card v-loading='loading'>
- <!-- 条件查询 -->
- <div class="inquires_box flex">
- <div class="condition condition2 flex flex-y-center">
- <div style="width: 90px;">会员ID:</div>
- <el-input size="small" style="flex: 1;margin-left:10px" placeholder="请输入会员ID"
- v-model="user_id"></el-input>
- </div>
- <div class="condition condition2 flex flex-y-center">
- <div style="width: 90px;">会员:</div>
- <el-input size="small" style="flex: 1;margin-left:10px" placeholder="请输入会员昵称/手机号"
- v-model="word"></el-input>
- </div>
- <el-date-picker size="small" v-model="date" type="datetimerange"
- style="float: left"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至" start-placeholder="开始日期"
- @change="selectDateTime"
- end-placeholder="结束日期">
- </el-date-picker>
- <el-button type="primary" size="small" style="margin-bottom: 20px;" @click='query'>查询</el-button>
- </div>
- <div :data="all" style="color: #0A54EA">
- 赠送余额:{{all.all_balance}},
- 赠送积分:{{all.all_score}}
- </div>
- <div class="table_box">
- <el-table :data="tableData" stripe style="width: 100%;font-size:13px">
- <el-table-column prop="user_id" label="会员ID" width="180" align="center"></el-table-column>
- <el-table-column label="会员名称" min-width="150">
- <template slot-scope="scope">
- <div class="user_img">
- <image style="width: 50px;height: 50px; border-radius: 50%;" :src="scope.row.user.avatar_url? scope.row.user.avatar_url:'resources/img/mall/default_avatar_url.png'"></image>
- </div>
- <div>
- <div style="color:#000;">{{scope.row.user.nickname}}</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="recharge_num" label="充值金额" width="150" align="center"></el-table-column>
- <el-table-column prop="give_content" label="赠送内容" align="center">
- <template slot-scope="scope">
- <el-tooltip placement="bottom">
- <div slot="content">
- <div style="margin-bottom: 6px;" v-for="(item,index) in scope.row.give_content"
- :key="index">
- <div v-if="item.type == 'coupon'">
- {{item.name}}:
- <div v-for="(couponItem,coupoIndex) in item.data" :key="couponItem.id">
- {{couponItem.discount_method}}*{{couponItem.num}}张
- </div>
- </div>
- <span v-else>
- {{item.name}}:{{item.data}}
- </span>
- </div>
- </div>
- <div class="give-info">
- <span style="margin-bottom: 6px;" v-for="(item,index) in scope.row.give_content"
- :key="index">
- <span v-if="item.type == 'coupon'">
- {{item.name}}:
- <span v-for="(couponItem,coupoIndex) in item.data" :key="couponItem.id">
- {{couponItem.discount_method}}*{{couponItem.num}}张
- </span>
- </span>
- <span v-else>
- {{item.name}}:{{item.data}}
- </span>
- </span>
- </div>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column prop="created_at" label="充值时间" width='150' 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>
- </div>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next"
- :page-count="pageCount"></el-pagination>
- </div>
- </el-card>
- </div>
- <script>
- new Vue({
- el: '#app',
- data() {
- return {
- loading: false,
- value: '',
- tableData: [],
- dialogVisible: false,
- all: [],
- date: '',
- start_date: '',
- end_date: '',
- pageCount: 0,
- recharge_active_id: '',
- user_id: '',
- word: '',
- page: 1,
- limit: 50,
- }
- },
- mounted() {
- this.getData();
- },
- methods: {
- query() {
- this.page = 1;
- this.getData();
- },
- search() {
- this.page = 1;
- if (this.date == null) {
- this.start_date = '';
- this.end_date = ''
- }
- this.getData();
- },
- getData() {
- this.loading = true;
- request({
- params: {
- r: 'recharge/default/list',
- },
- data: {
- user_id: this.user_id,
- recharge_active_id: this.recharge_active_id,
- word: this.word,
- start_date: this.start_date,
- end_date: this.end_date,
- page: this.page,
- limit: this.limit,
- },
- method: 'post',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.total_count = e.data.data.list.pagination.totalCount;
- this.tableData = e.data.data.list.list;
- this.all = e.data.data.all;
- this.pageCount = e.data.data.list.page_count;
- } else {
- this.$message.error(e.data.msg);
- }
- });
- }, pagination(currentPage) {
- this.page = currentPage;
- this.getData();
- },
- handleSizeChange(val) {
- this.limit = val;
- this.getData();
- },
- handleCurrentChange(val) {
- thia.page = val;
- this.getData();
- }, selectDateTime(e) {
- if (e != null) {
- this.start_date = e[0];
- this.end_date = e[1];
- } else {
- this.start_date = '';
- this.end_date = '';
- }
- this.search();
- }
- }, mounted: function () {
- this.recharge_active_id = getQuery('recharge_active_id');
- this.getData();
- }
- })
- </script>
|