| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472 |
- <?
- /*
- * @Descripttion:
- * @version:
- * @Author: ewgof
- * @Date: 2022-05-18 10:43:57
- * @LastEditors: ewgof
- * @LastEditTime: 2022-05-18 15:46:14
- */
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <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>
- <el-button type="primary" size="small" style="padding: 9px 15px !important; float: right; position: relative; bottom: 8px;" @click="addStore">添加门店</el-button>
- </div> -->
- <div class="table-body">
- <el-tabs type="card" v-model="activityTab" @tab-click="handleTabClick">
- <el-tab-pane label="待打款" name="waiting-payment"></el-tab-pane>
- <el-tab-pane label="已打款" name="payment"></el-tab-pane>
- <el-tab-pane label="驳回" name="refund"></el-tab-pane>
- <div style="padding-bottom: 20px;">
- <div class="flex">
- <div class="flex" style="margin-right: 20px;">
- <div class="input-title" style="flex-shrink: 0;">会员ID</div>
- <el-input size="small" style="width: 130px;" placeholder="请输入会员ID" v-model="searchData.user_id"> </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="flex" style="margin-right: 20px;">
- <div class="input-title" style="flex-shrink: 0;">创建时间</div>
- <el-date-picker v-model="dates" size="small" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="selectedDates"> </el-date-picker>
- </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.user_id || searchData.nickname || searchData.start_time || searchData.end_time" style="padding: 9px 15px !important;">清除搜索条件</el-button>
- </div>
- <com-export-dialog style="float: right;margin-top: -31px;" :field_list='exportList' :action_url="exportUrl" :params="searchData"> </com-export-dialog>
- </div>
- <el-table :data="cashdrawList" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
- <el-table-column label="ID" prop="id"></el-table-column>
- <el-table-column label="会员信息" 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_id}}</div> -->
- </template>
- </el-table-column>
- <el-table-column label="手机号" prop="mobile" align="center">
- <template slot-scope="scope">
- <div> <span>{{scope.row.mobile}}</span> </div>
- </template>
- </el-table-column>
- <el-table-column label="账户信息" min-width="200" align="center">
- <template slot-scope="scope">
- <template v-if="scope.row.type == 'wechat'">
- <div style="text-align: center"> 微信收款码
- <br>
- <el-image @click.stop="handleClickItem" :src="scope.row.account_info.wechat_qrcode" :preview-src-list="[scope.row.account_info.wechat_qrcode]" style="height: 80px;width: 80px;">
- </el-image>
- </div>
- </template>
- <template v-if="scope.row.type == 'alipay_offline' || scope.row.type == 'alitopay' || scope.row.type == 'alipay_tax'">
- <div>支付宝姓名:{{scope.row.account_info.name}}</div>
- <div>支付宝账号:{{scope.row.account_info.mobile}}</div>
- </template>
- <template v-if="scope.row.type == 'bank'">
- <div>开户人:{{scope.row.account_info.name}}</div>
- <div>银行卡号:{{scope.row.account_info.bank_account}}</div>
- <div>开户行:{{scope.row.account_info.bank_name}}</div>
- </template>
- <template v-if="scope.row.type == 'joinpay'">
- <div v-if="scope.row.account_info.bank_account_type==1">账户类型:对私账户</div>
- <div v-if="scope.row.account_info.bank_account_type==2">账户类型:对公账户</div>
- <div>持卡人:{{scope.row.account_info.name}}</div>
- <div>银行卡号:{{scope.row.account_info.bank_account}}</div>
- </template>
- </template>
- </el-table-column>
- <el-table-column label="提现金额" prop="cashdraw_info" align="center">
- <template slot-scope="scope">
- <div>
- <span>提现金额:{{scope.row.num}}</span>
- </div>
- <div>
- <span>手续费:{{scope.row.poundage_num}}</span>
- </div>
- <div>
- <span>实际打款金额:<b style="color: red;">{{scope.row.actual_num}}</b></span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="提现方式" prop="type_name" align="center">
- </el-table-column>
- <el-table-column label="备注" prop="remark" align="center">
- </el-table-column>
- <el-table-column label="申请时间" prop="user_count" 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="操作" prop="user_count" align="center">
- <template slot-scope="scope" v-if="activityTab=='waiting-payment'">
- <el-button type="text" size="small" @click="auditAction(scope.row.id, 'pass')">确认打款</el-button>
- <el-button type="text" size="small" @click="auditAction(scope.row.id, 'refund')">拒绝</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>
- </el-tabs>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- searchData: {
- user_id: null,
- nickname: '',
- start_time: '',
- end_time: '',
- curr_tabname: '',
- },
- dates: null,
- activityTab: 'waiting-payment',
- currPage: 1,
- pageCount: 0,
- loading: false,
- // 导出路径
- exportUrl: 'store/store-cashdraw/index',
- exportList: {},
- cashdrawList: [],
- },
- mounted() {
- this.searchData.curr_tabname = this.activityTab;
- this.loadData();
- },
- methods: {
- searchs() {
- this.currPage = 1;
- this.loadData();
- },
- clereSearch() {
- this.searchData.user_id = null;
- this.searchData.nickname = '';
- this.searchData.start_time = '';
- this.searchData.end_time = '';
- this.dates = null;
- this.currPage = 1;
- this.loadData();
- },
- // 选中时间
- selectedDates(e) {
- if (e) {
- this.searchData.start_time = e[0];
- this.searchData.end_time = e[1];
- } else {
- this.searchData.start_time = '';
- this.searchData.end_time = '';
- this.dates = null;
- }
- this.currPage = 1;
- this.loadData();
- },
- // 标签页切换
- handleTabClick(e) {
- this.searchData.curr_tabname = this.activityTab;
- this.loadData();
- },
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'store/store-cashdraw/index',
- page: this.currPage,
- tabname: this.activityTab,
- ...this.searchData,
- },
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.cashdrawList = e.data.data.list;
- this.exportList = e.data.data.export_list;
- this.pageCount = e.data.data.page_count;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pagination(currentPage) {
- let self = this;
- self.currPage = currentPage;
- self.loadData();
- },
- // 审核操作
- auditAction(id, action, index) {
- let self = this;
- let tip = notice = '';
- if ('pass' == action) {
- tip = '是否确认打款?';
- notice = '打款备注';
- } else {
- tip = '是否驳回提现申请?';
- notice = '驳回原因';
- }
- self.loading = true;
- self.$prompt(tip, '审核', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputPlaceholder: '请填写' + notice,
- }).then(({
- value
- }) => {
- if (!value) {
- self.loading = false;
- self.$message.error(notice + '不能为空');
- return false;
- }
- request({
- params: {
- r: 'store/store-cashdraw/audit',
- },
- method: 'post',
- data: {
- id: id,
- action: action,
- remark: value,
- },
- }).then(e => {
- self.loading = false;
- if (e.data.code == 0) {
- self.cashdrawList.splice(index, 1)
- self.$message.success('操作成功');
- this.loadData();
- return true;
- } else {
- self.$message.error(e.data.msg);
- return false;
- }
- }).catch(e => {
- self.$message.error('网络错误');
- console.log(e);
- });
- }).catch(() => {
- console.log('取消驳回审核');
- });
- },
- }
- });
- </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; */
- padding: 9px;
- 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;
- }
- .stat-item {
- margin: 10px 0px;
- padding-left: 7px;
- color: #A2A2A2;
- }
- .stat-item>span {
- margin: 0px 10px;
- }
- </style>
|