123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <!-- -->
- <template>
- <div class="app-container">
- <!-- 查询和其他操作 -->
- <div class="filter-container">
- <el-input
- v-model="listQuery.shopName" clearable size="mini" class="filter-item"
- style="width: 200px;"
- placeholder="请输入店铺名称"
- />
- <el-input
- v-model="listQuery.shopCode" clearable size="mini" class="filter-item"
- style="width: 200px;margin-left: 10px;" placeholder="请输入店铺编码"
- />
- <el-date-picker
- v-model="listQuery.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"
- size="mini" class="filter-item" style="width: 200px;margin-left: 10px;"
- />
- <el-select
- v-model="listQuery.state" clearable size="mini" class="filter-item"
- style="width: 200px;margin-left: 10px;" placeholder="请选择处理状态"
- >
- <el-option label="待处理" value="0" />
- <el-option label="已处理" value="1" />
- <el-option label="通过" value="2" />
- <el-option label="拒绝" value="3" />
- <el-option label="打款失败" value="4" />
- </el-select>
- <el-button
- size="mini" class="filter-item" type="primary" icon="el-icon-search"
- style="margin-left: 10px;"
- @click="handleSearch"
- >
- 查找
- </el-button>
- <el-button size="mini" type="info" class="filter-item" @click="handleReset">
- 重置
- </el-button>
- </div>
- <!-- 查询结果 -->
- <div v-tableHeight>
- <el-table
- v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
- v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
- >
- <el-table-column align="center" width="150" label="店铺名称" prop="shopName" show-overflow-tooltip />
- <el-table-column align="center" min-width="150" label="店铺编码" prop="shopCode" show-overflow-tooltip />
- <el-table-column align="center" width="120" label="提现金额" prop="withdrawalMoney" show-overflow-tooltip />
- <el-table-column align="center" label="处理状态" prop="state">
- <template slot-scope="{ row }">
- <el-tag v-if="row.state === 0" effect="plain" type="info">待处理</el-tag>
- <el-tag v-else-if="row.state === 1" effect="plain" type="success">已处理</el-tag>
- <el-tag v-else-if="row.state === 2" effect="plain">通过</el-tag>
- <el-tag v-else-if="row.state === 3" effect="plain" type="warning">拒绝</el-tag>
- <el-tag v-else-if="row.state === 4" effect="plain" type="danger">打款失败</el-tag>
- <span v-else>--</span>
- </template>
- </el-table-column>
- <el-table-column align="center" width="150" label="备注" prop="cause" show-overflow-tooltip />
- <el-table-column label="操作" width="180" fixed="right" class-name="small-padding fixed-width">
- <template slot-scope="{ row }">
- <el-button type="warning" size="mini" @click="handleDetail(row)">
- 详情
- </el-button>
- <el-button v-if="(row.state == 0) || (row.state == 2)" size="mini" @click="handleResolve(row)">
- 处理
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
- layout="total, sizes, prev, pager, next, jumper" :total="total"
- @size-change="(val) => ((listQuery.pageSize = val) && getList())"
- @current-change="(val) => ((listQuery.page = val) && getList())"
- />
- </div>
- <!-- 提现处理 -->
- <WithdrawalProcessing ref="WithdrawalProcessing" @success="getList" />
- <!-- 查看详情 -->
- <DetailModal ref="DetailModal" />
- </div>
- </template>
- <script>
- import WithdrawalProcessing from './components/WithdrawalProcessing'
- import DetailModal from './components/DetailModal'
- import { withdrawalGetAll } from '@/api/withdrawal'
- export default {
- name: 'Withdrawal',
- components: {
- WithdrawalProcessing,
- DetailModal
- },
- data() {
- return {
- listQuery: {
- shopName: '', // 店铺名称
- shopCode: '', // 店铺编号
- startTime: '', // 申请时间数组
- state: '', // 处理状态 1-已处理 0-未处理
- page: 1,
- pageSize: 10
- },
- list: [],
- total: 0,
- listLoading: true
- }
- },
- mounted() {
- this.getList()
- },
- methods: {
- async getList() {
- this.listLoading = true
- try {
- const res = await withdrawalGetAll(this.listQuery)
- this.list = res.data.list
- this.total = res.data.total
- } finally {
- this.listLoading = false
- }
- },
- handleSearch() {
- this.listQuery.page = 1
- this.getList()
- },
- handleReset() {
- this.listQuery = { shopName: '', shopCode: '', dates: [], state: '', page: 1, pageSize: 10 }
- this.getList()
- },
- handleDetail(row) {
- this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
- },
- handleResolve(row) {
- this.$refs.WithdrawalProcessing && this.$refs.WithdrawalProcessing.handleOpen(row)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .app-container {
- padding: 20px;
- display: flex;
- flex-direction: column;
- .filter-container {
- .filter-item {
- display: inline-block;
- vertical-align: middle;
- margin-bottom: 10px;
- }
- }
- .small-padding {
- .cell {
- padding-left: 5px;
- padding-right: 5px;
- }
- }
- .fixed-width {
- .el-button--mini {
- padding: 7px 10px;
- }
- }
- }
- </style>
|