| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px;
- }
- .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 .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- } */
- .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-date-editor .el-range-separator {
- /* 设置选择日期框的中间的 ‘至’ 的宽度 */
- width: 8%;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1000px;">
- <div slot="header">
- <div>
- <span>支付记录列表</span>
- <div style="float: right; margin: -5px 0">
- <!-- <el-button type="primary" size="small" @click="handle('edit')">添加商品</el-button>-->
- <!-- <el-button type="primary" size="small">订单导出</el-button>-->
- <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search">
- </com-export-dialog>
- </div>
- </div>
- </div>
- <div class="table-body">
- <div class="head" style="display: flex;flex-wrap: wrap;">
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">会员ID</div>
- <el-input clearable size="small" type="text" v-model="search.user_id" placeholder="请输入会员ID精准搜索" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">会员昵称/手机号</div>
- <el-input clearable size="small" type="text" v-model="search.user_keyword" placeholder="请输入会员昵称/手机号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">支付单号</div>
- <el-input clearable size="small" type="text" v-model="search.out_trade_no" placeholder="请输入支付单号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">订单号</div>
- <el-input clearable size="small" type="text" v-model="search.order_no" placeholder="请输入订单号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">支付方式</div>
- <!-- <el-input type="text" v-model="search.order_no" placeholder="请输入订单号" @keyup.enter.native="toSearch"></el-input> -->
- <el-select clearable size="small" v-model="search.pay_type" placeholder="请选择支付类型" @keyup.enter.native="toSearch">
- <el-option :key="0" label="全部" :value="0">全部</el-option>
- <el-option :key="1" label="快捷支付" :value="7">快捷支付</el-option>
- <el-option :key="2" label="聚合支付" :value="8">聚合支付</el-option>
- </el-select>
- </div>
- <div style="display: flex;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">创建时间</div>
- <el-date-picker size="small" v-model="time" @change="datetimeChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" align="center">
- </el-date-picker><!-- type="datetimerange" @change="datetimeChange" v-model="time"-->
- </div>
- <!-- <el-button type="primary" size="small" icon="el-icon-search" style="margin-bottom: 20px;" @click='toSearch'>搜索</el-button> -->
- <div class="item-box" flex="dir:left cross:center">
- <el-button size="small" type="primary" style="margin-bottom: 20px;" @click="toSearch">搜索
- </el-button>
- </div>
- <div class="item-box" flex="dir:left cross:center" v-if="search.order_no || search.start_time || search.end_time || search.user_id || search.user_keyword || search.out_trade_no || search.pay_type">
- <el-button size="small" type="warning" style="margin-bottom: 20px; margin-left: 10px;" @click="resetFun">清除搜索条件 </el-button>
- </div>
- </div>
- <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
- <el-table-column label="会员ID" min-width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.user_id}}</div>
- </template>
- </el-table-column>
- <el-table-column prop="avatar_url,nickname" label="会员名称" min-width="120">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.avatar_url"> </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.nickname">{{scope.row.nickname}}</div>
- <div>{{scope.row.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="订单号" min-width="150" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.order_no}}</div>
- </template>
- </el-table-column>
- <el-table-column label="支付单号" min-width="150" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.out_trade_no}}</div>
- </template>
- </el-table-column>
- <el-table-column label="支付金额" min-width="100" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.amount}}</div>
- </template>
- </el-table-column>
- <el-table-column label="类型" min-width="80" align="center">
- <template slot-scope="scope">
- <div size="small" v-if="scope.row.pay_type==7">快捷支付</div>
- <div size="small" v-else-if="scope.row.pay_type==8">聚合支付</div>
- <div size="small" v-else>-</div>
- </template>
- </el-table-column>
- <el-table-column label="订单状态" min-width="80" align="center">
- <template slot-scope="scope">
- <div size="small">{{payStatus[scope.row.is_pay]}}</div>
- </template>
- </el-table-column>
- <!--
- <el-table-column
- label="操作"
- align="center"
- min-width="100">
- <template slot-scope="scope">
- <el-button style="margin: 1px;" type="primary" size="mini" @click="seeOrder(scope.row)">查看订单<i class="el-icon-caret-right el-icon--right"></i></el-button>
- </template>
- </el-table-column>
- -->
- <el-table-column label="创建时间" prop="user_id" min-width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- <!-- <el-table-column label="支付时间" prop="user_id" min-width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column> -->
- </el-table>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- export_list: {},
- export_url: 'join-pay/default/pay-record',
- list: [],
- listLoading: false,
- page: 1,
- pageCount: 0,
- search: {
- page: 1,
- start_time: '',
- end_time: '',
- user_id: null,
- user_keyword: '',
- out_trade_no: '',
- order_no: '',
- pay_type: 0,
- },
- time: '',
- pagination: null,
- payStatus: {
- 0: '未支付',
- 1: '已支付'
- }
- };
- },
- methods: {
- resetFun() {
- this.search = {
- page: 1,
- start_time: '',
- end_time: '',
- user_id: null,
- user_keyword: '',
- out_trade_no: '',
- order_no: '',
- pay_type: 0,
- }
- this.time = '';
- this.toSearch();
- },
- datetimeChange() {
- if (this.time) {
- this.search.start_time = this.time[0];
- this.search.end_time = this.time[1];
- } else {
- this.search.start_time = '';
- this.search.end_time = '';
- }
- this.toSearch();
- },
- toSearch() {
- this.search.page = 1;
- this.getList();
- },
- pageChange(currentPage) {
- let self = this;
- self.search.page = currentPage;
- self.getList();
- },
- getList() {
- let self = this;
- self.listLoading = true;
- let params = {
- r: 'join-pay/default/pay-record',
- }
- params = Object.assign(params, this.search);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- self.listLoading = false;
- if (e.data.code == 0) {
- self.list = e.data.data.list;
- self.export_list = e.data.data.export_list;
- this.pagination = e.data.data.pagination;
- self.pageCount = e.data.data.page_count;
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- console.log(e);
- self.$message.error(e);
- });
- },
- },
- mounted: function() {
- this.getList();
- }
- });
- </script>
|