1
This commit is contained in:
parent
8f31cc5c76
commit
1b8d74a01a
@ -9,6 +9,21 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import request from './request'
|
import request from './request'
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资金管理 -- 列表
|
||||||
|
*/
|
||||||
|
export function managementApi(data) {
|
||||||
|
return request.get('financial_record/management', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 资金管理 -- 解冻资金
|
||||||
|
*/
|
||||||
|
export function unfreezeApi(id) {
|
||||||
|
return request.get(`financial_record/unfreeze/${id}`)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 提现 -- 列表
|
* @description 提现 -- 列表
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +46,14 @@ const accountsRouter =
|
|||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/accounts/capital/index')
|
component: () => import('@/views/accounts/capital/index')
|
||||||
|
}, {
|
||||||
|
path: 'management',
|
||||||
|
name: 'AccountsManagement',
|
||||||
|
meta: {
|
||||||
|
title: '资金管理',
|
||||||
|
noCache: true
|
||||||
|
},
|
||||||
|
component: () => import('@/views/accounts/management/index')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'reconciliation',
|
path: 'reconciliation',
|
||||||
|
137
src/views/accounts/management/index.vue
Normal file
137
src/views/accounts/management/index.vue
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<div class="divBox">
|
||||||
|
<div class="selCard mb14">
|
||||||
|
<el-form :model="tableFrom" ref="searchForm" size="small" inline label-width="85px">
|
||||||
|
<el-form-item label="商户名称:" prop="mer_id">
|
||||||
|
<el-select v-model="tableFrom.mer_id" clearable filterable placeholder="请选择" class="selWidth"
|
||||||
|
@change="getList(1)">
|
||||||
|
<el-option v-for="item in merSelect" :key="item.mer_id" :label="item.mer_name"
|
||||||
|
:value="item.mer_id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="关键字:" prop="keyword">
|
||||||
|
<el-input v-model="tableFrom.nickname" @keyup.enter.native="getList(1)" placeholder="请输入订单号/用户昵称"
|
||||||
|
class="selWidth" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
||||||
|
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<el-card>
|
||||||
|
<el-table v-loading="listLoading" :data="tableData.data" size="small" class="table" highlight-current-row>
|
||||||
|
<el-table-column prop="title" label="标题" min-width="150" />
|
||||||
|
<el-table-column prop="mer_name" label="店铺名称" min-width="200" />
|
||||||
|
<el-table-column prop="nickname" label="姓名" min-width="150" sortable />
|
||||||
|
<el-table-column prop="number" label="可调整金额" min-width="150" />
|
||||||
|
<el-table-column prop="create_time" label="调整时间" min-width="150" />
|
||||||
|
<el-table-column prop="mark" label="备注" min-width="150" />
|
||||||
|
<el-table-column label="操作" min-width="120" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click="handleChange(scope.row)">金额调整</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination background :page-size="tableFrom.limit" :current-page="tableFrom.page"
|
||||||
|
layout="total, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
|
||||||
|
@current-change="pageChange" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { unfreezeApi, managementApi } from '@/api/accounts'
|
||||||
|
import { merSelectApi } from "@/api/product";
|
||||||
|
export default {
|
||||||
|
name: 'AccountsCapitalFlow',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: {
|
||||||
|
data: [],
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
listLoading: true,
|
||||||
|
tableFrom: {
|
||||||
|
nickname: '',//昵称
|
||||||
|
mer_id: '',//商户id
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
merSelect: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
this.getMerSelect();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 商户列表;
|
||||||
|
getMerSelect() {
|
||||||
|
merSelectApi().then((res) => {
|
||||||
|
this.merSelect = res.data;
|
||||||
|
}).catch((res) => {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 金额调整
|
||||||
|
handleChange(item) {
|
||||||
|
this.$confirm('您确定要将"' + item.mer_name + '"的暂存金额调整到可提现金额中?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
unfreezeApi(item.bill_id).then(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.$message.success('操作成功!');
|
||||||
|
this.getList("");
|
||||||
|
} else {
|
||||||
|
this.$message.success('操作失败!');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.info('操作取消!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**重置 */
|
||||||
|
searchReset() {
|
||||||
|
this.tableFrom.date = ""
|
||||||
|
this.tableFrom.mer_id = '';
|
||||||
|
this.tableFrom.nickname = '';
|
||||||
|
this.$refs.searchForm.resetFields()
|
||||||
|
this.getList(1)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 列表
|
||||||
|
getList(num) {
|
||||||
|
this.listLoading = true
|
||||||
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
|
managementApi(this.tableFrom).then((res) => {
|
||||||
|
this.tableData.data = res.data.data
|
||||||
|
this.tableData.total = res.data.count
|
||||||
|
this.listLoading = false
|
||||||
|
}).catch((res) => {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
pageChange(page) {
|
||||||
|
this.tableFrom.page = page
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.tableFrom.limit = val
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
x
Reference in New Issue
Block a user