| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 800px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>资金明细</span>
- <span style="float: right">
- <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' action_url="qi-ding-dong/fund/download" :params="searchData">
- </com-export-dialog>
- </span>
- </div>
- <el-row :gutter="10" style="margin-bottom: 10px;">
- <el-col :span="is_master ? 12 : 8">
- <el-card shadow="never">
- <template #header>
- <strong>
- 累计充值金额
- <el-tooltip v-if="is_master" class="item" effect="dark" content="所有子商城累计充值金额" placement="top">
- <i class="el-icon-question"></i>
- </el-tooltip>
- </strong>
- </template>
- <template>
- <div>
- <strong class="text-danger" style="font-size: 32px">{{statistics.recharge | amount}}</strong><span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
- </div>
- </template>
- </el-card>
- </el-col>
- <el-col :span="is_master ? 12 : 8">
- <el-card shadow="never">
- <template #header>
- <strong>
- 累计已使用金额
- <el-tooltip v-if="is_master" class="item" effect="dark" content="所有子商城累计支出金额" placement="top">
- <i class="el-icon-question"></i>
- </el-tooltip>
- </strong>
- </template>
- <template>
- <div>
- <span class="text-info" style="font-size: 12px;">¥</span><strong class="text-danger" style="font-size: 32px">{{statistics.deduct | amount}}</strong><span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
- </div>
- </template>
- </el-card>
- </el-col>
- <el-col :span="8" v-if="!is_master">
- <el-card shadow="never">
- <template #header>
- <strong>
- 平台联系方式: {{config.mobile ? config.mobile : '-'}}
- </strong>
- </template>
- <template>
- <div>
- <div style="width: 43px; height: 43px; overflow: hidden">
- <el-image :preview-src-list="[config.contact_image]" class="table-info-img" :src="config.contact_image">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- </div>
- </div>
- </template>
- </el-card>
- </el-col>
- </el-row>
- <div class="table-body">
- <el-form size="small" :inline="true">
- <el-form-item v-if="is_master">
- <el-input style="width: 200px" v-model="searchData.keyword" placeholder="商城名称/ID" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-date-picker size="small" v-model="searchData.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-form-item>
- <el-form-item>
- <el-button type="primary" @click="searchs">搜索</el-button>
- </el-form-item>
- </el-form>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;">
- <el-table-column label="商城信息">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.mall.logo">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/admin/mall-logo.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">{{scope.row.mall.name}}</div>
- <div style="font-size: 12px;">{{scope.row.mall.id}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="单号" align="center">
- <template slot-scope="scope">
- {{scope.row.order_no}}
- </template>
- </el-table-column>
- <el-table-column label="异动类型" align="center">
- <template slot-scope="scope">
- {{scope.row.type_txt}}
- </template>
- </el-table-column>
- <el-table-column label="异动金额" align="center">
- <template slot-scope="scope">
- <el-tag size="mini" :type="scope.row.direction == 1 ? 'success' : 'danger'">
- {{scope.row.direction == 1 ? '+' : '-'}} {{scope.row.amount|amount}}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="异动后金额" align="center">
- <template slot-scope="scope">
- <el-tag size="mini">
- {{scope.row.after_amount|amount}}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="异动说明" prop="remark" align="left"></el-table-column>
- <el-table-column label="创建时间" 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>
- </el-tabs>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="list && list.length > 0" style="display: inline-block;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :total="pagination.totalCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- searchData: {
- keyword: '',
- start_date: '',
- end_date: '',
- page: 1,
- limit: 10,
- },
- loading: false,
- activeName: '-1',
- list: [],
- pagination: null,
- edit: {
- show: false,
- },
- status: {
- 0: {
- title: '待结算',
- type: 'warning'
- },
- 1: {
- title: '已结算',
- type: 'success'
- },
- 50: {
- title: '已关闭',
- type: 'danger'
- }
- },
- statistics: {
- recharge: 0,
- deduct: 0
- },
- is_master: <?= $is_master ? 1 : 0 ?>,
- export_list: <?= $export_list ?>,
- config: {
- mobile: '',
- contact_image: ''
- },
- },
- mounted() {
- this.loadData();
- },
- methods: {
- confirmSubmit() {
- this.search.status = this.activeName
- },
- selectDateTime(e) {
- if (e != null) {
- this.searchData.start_date = e[0];
- this.searchData.end_date = e[1];
- } else {
- this.searchData.start_date = '';
- this.searchData.end_date = '';
- }
- this.searchs();
- },
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'qi-ding-dong/fund/index',
- ...this.searchData
- },
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.list = e.data.data.list
- this.pagination = e.data.data.pagination;
- this.statistics = e.data.data.statistics
- this.config = e.data.data.config
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pageChange(page) {
- this.searchData.page = page;
- this.loadData();
- },
- handleClick(tab, event) {},
- searchs() {
- this.searchData.page = 1;
- this.loadData();
- },
- },
- filters: {
- amount: function(val) {
- return parseFloat(val * 0.01).toFixed(2)
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .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;
- }
- </style>
|