|
@@ -1,128 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch">
|
|
|
- <el-form-item label="捐款项目" prop="projectId">
|
|
|
- <el-select v-model="queryParams.projectId" placeholder="请选择捐款项目筛选" clearable>
|
|
|
- <el-option v-for="item in projectList" :key="item.id" :label="item.title" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="捐赠者(单位/个人)" prop="name">
|
|
|
- <el-input v-model="queryParams.name" placeholder="请输入" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="联系电话" prop="phone">
|
|
|
- <el-input v-model="queryParams.phone" placeholder="请输入联系电话" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:donate:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
|
|
|
- <span class="spa">累计捐赠金额:{{ item.total.toFixed(2) || 0 }}元</span>
|
|
|
- <span class="spa">捐赠总次数:{{ item.totalNum }}次</span>
|
|
|
- <span class="spa">支付次数:{{ item.success }}次</span>
|
|
|
- <span class="spa">待支付次数:{{ item.fail }}次</span>
|
|
|
- <span class="spa">单笔最大捐赠金额:{{ item.max || 0 }}元</span>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
- <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="捐赠项目" align="left" prop="projectName" width="200" />
|
|
|
- <el-table-column label="是否匿名" align="center" width="90">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.isAnonymous == 0 ? '匿名' : '否' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="捐赠者(单位/个人)" align="center" prop="name" width="200" />
|
|
|
- <el-table-column label="联系电话" align="center" prop="phone" width="135" />
|
|
|
- <el-table-column label="捐款金额(¥)" align="center" prop="money" width="115" />
|
|
|
- <el-table-column label="是否需要票据" align="center" prop="isBill" width="115">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.isBill == 0 ? '不需要' : '需要' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="邮箱" align="center" prop="email" width="200" />
|
|
|
- <el-table-column label="支付状态" align="center" prop="state" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="danger" v-if="scope.row.state == 0">待支付</el-tag>
|
|
|
- <el-tag type="success" v-if="scope.row.state == 1">支付成功</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="创建时间" prop="createTime" align="center" width="170" />
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:donate:remove']">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <template slot="empty">
|
|
|
- <el-empty></el-empty>
|
|
|
- </template>
|
|
|
- </el-table>
|
|
|
- <pagination v-if="response.total > 0" :total="response.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-export default {
|
|
|
- name: 'Log',
|
|
|
- data() {
|
|
|
- return {
|
|
|
- item: {},
|
|
|
- ids: [],
|
|
|
- showSearch: true,
|
|
|
- projectList: [],
|
|
|
- response: {},
|
|
|
- queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- projectId: null,
|
|
|
- name: null,
|
|
|
- phone: null,
|
|
|
- orderByColumn: 'id',
|
|
|
- isAsc: 'desc'
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- watch: {
|
|
|
- 'queryParams.projectId'(val) {
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getList();
|
|
|
- this.ajax({ url: '/work/project/select/all' }).then((response) => {
|
|
|
- this.projectList = response.data;
|
|
|
- });
|
|
|
- this.ajax({ url: '/work/donate/home' }).then((response) => {
|
|
|
- this.item = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getList() {
|
|
|
- this.ajax({ url: '/work/donate/list', data: this.queryParams }).then((response) => {
|
|
|
- this.response = response;
|
|
|
- });
|
|
|
- },
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- resetQuery() {
|
|
|
- this.resetForm('queryForm');
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- selects(rows) {
|
|
|
- this.ids = rows.map((item) => item.id);
|
|
|
- },
|
|
|
- del(row) {
|
|
|
- this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
- this.get({ url: '/work/donate/remove/' + (row.id || this.ids) }).then((response) => {
|
|
|
- this.$modal.msgSuccess('删除成功');
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|