This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-25 16:59:29 +08:00
parent 8f31cc5c76
commit 1b8d74a01a
3 changed files with 324 additions and 164 deletions

View File

@ -9,6 +9,21 @@
// +----------------------------------------------------------------------
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 提现 -- 列表
*/
@ -100,19 +115,19 @@ export function capitalFlowExportApi(data) {
/**
* @description 转账记录 -- 导出
*/
export function transferRecordsExportApi(data) {
export function transferRecordsExportApi(data) {
return request.get(`financial/export`, data)
}
/**
* @description 资金记录 -- 导出
*/
export function fundingRecordsExportApi(data) {
export function fundingRecordsExportApi(data) {
return request.get(`bill/export`, data)
}
/**
* @description 提现管理 -- 导出
*/
export function extractManageExportApi(data) {
export function extractManageExportApi(data) {
return request.get(`user/extract/export`, data)
}
/**
@ -132,115 +147,115 @@ export function extractManageDetail(id) {
* @description 获取版本号
*/
export function getVersion() {
return request.get(`version`)
return request.get(`version`)
}
/**
* @description 转账设置
*/
export function transferSettingApi(key) {
return request.get(`config/${key}`)
return request.get(`config/${key}`)
}
/**
* @description 转账记录
*/
export function transferRecordApi(data) {
return request.get(`financial/lst`, data)
return request.get(`financial/lst`, data)
}
/**
* @description 转账记录 -- 头部数据
*/
export function transferHeaderDataApi() {
return request.get(`financial/title`)
return request.get(`financial/title`)
}
/**
* @description 转账信息
*/
export function transferDetailApi(id) {
return request.get(`financial/detail/${id}`)
return request.get(`financial/detail/${id}`)
}
/**
* @description 申请转账 -- 审核
*/
export function transferReviewApi(id, data) {
return request.post(`financial/status/${id}`, data)
return request.post(`financial/status/${id}`, data)
}
/**
* @description 申请转账 -- 备注
*/
export function transferMarkApi(id) {
return request.get(`financial/mark/${id}/form`)
return request.get(`financial/mark/${id}/form`)
}
/**
* @description 申请转账 -- 转账
*/
export function transferEditApi(id, data) {
return request.post(`financial/update/${id}`, data)
return request.post(`financial/update/${id}`, data)
}
/**
* @description 财务账单 -- 列表
*/
export function financialLstApi(data) {
return request.get(`financial_record/lst`, data)
return request.get(`financial_record/lst`, data)
}
/**
* @description 财务账单 -- 详情
*/
export function financialDetailApi(type, data) {
return request.get(`financial_record/detail/${type}`, data)
return request.get(`financial_record/detail/${type}`, data)
}
/**
* @description 财务账单 -- 头部数据
*/
export function finaHeaderDataApi(data) {
return request.get(`financial_record/title`, data)
return request.get(`financial_record/title`, data)
}
/**
* @description 财务账单 -- 下载账单
*/
export function downloadFinancialApi(type, data) {
return request.get(`financial_record/detail_export/${type}`, data)
return request.get(`financial_record/detail_export/${type}`, data)
}
/**
* @description 资金流水 -- 统计数据
*/
export function getStatisticsApi(data) {
return request.get(`financial_record/count`,data)
return request.get(`financial_record/count`, data)
}
/**
* @description 发票 -- 获取发票说明
*/
export function getReceiptApi(key) {
return request.get(`agreement/${key}`)
return request.get(`agreement/${key}`)
}
/**
* @description 发票 -- 编辑发票说明
*/
export function updateReceiptApi(type, data) {
return request.post(`agreement/${type}`, data)
return request.post(`agreement/${type}`, data)
}
/**
* @description 发票 -- 列表
*/
export function invoiceListApi(data) {
return request.get(`receipt/lst`, data)
return request.get(`receipt/lst`, data)
}
/**
* @description 发票 -- 详情
*/
export function invoiceDetailApi(id) {
return request.get(`receipt/detail/${id}`)
export function invoiceDetailApi(id) {
return request.get(`receipt/detail/${id}`)
}
/**
* @description 分账单 -- 获取配置
*/
export function getSettingApi() {
return request.get(`profitsharing/config`)
export function getSettingApi() {
return request.get(`profitsharing/config`)
}
/**
* @description 分账单 -- 修改配置
*/
export function updateSettingApi(data) {
return request.post(`profitsharing/config`, data)
export function updateSettingApi(data) {
return request.post(`profitsharing/config`, data)
}
/**
* @description 商户账单 -- 列表
@ -251,25 +266,25 @@ export function merchantBillList(data) {
/**
* @description 单个商户账单 -- 列表
*/
export function singleMerBillList(id,data) {
export function singleMerBillList(id, data) {
return request.get(`financial_record/mer_list/${id}`, data)
}
/**
* @description 单个商户账单 -- 详情
*/
export function singleMerBillDetail(type,data) {
export function singleMerBillDetail(type, data) {
return request.get(`financial_record/mer_detail/${type}`, data)
}
/**
* @description 单个商户账单 -- 导出
*/
export function singleMerBillExport(type,data) {
export function singleMerBillExport(type, data) {
return request.get(`financial_record/mer_excel/${type}`, data)
}
/**
* @description 单个商户账单 -- 统计
*/
export function singleMerBillHeader(id,data) {
export function singleMerBillHeader(id, data) {
return request.get(`financial_record/mer_title/${id}`, data)
}
/**

View File

@ -10,156 +10,164 @@
import Layout from '@/layout'
import { roterPre } from '@/settings'
const accountsRouter =
{
path: `${roterPre}/accounts`,
name: 'accounts',
meta: {
icon: '',
title: '财务'
{
path: `${roterPre}/accounts`,
name: 'accounts',
meta: {
icon: '',
title: '财务'
},
alwaysShow: true,
component: Layout,
children: [
{
path: 'extract',
name: 'AccountsExtract',
meta: {
title: '提现管理',
noCache: true
},
component: () => import('@/views/accounts/extract/index')
},
alwaysShow: true,
component: Layout,
children: [
{
path: 'extract',
name: 'AccountsExtract',
meta: {
title: '提现管理',
noCache: true
},
component: () => import('@/views/accounts/extract/index')
{
path: 'bill',
name: 'AccountsBill',
meta: {
title: '充值记录',
noCache: true
},
{
path: 'bill',
name: 'AccountsBill',
meta: {
title: '充值记录',
noCache: true
},
component: () => import('@/views/accounts/bill/index')
component: () => import('@/views/accounts/bill/index')
},
{
path: 'capital',
name: 'AccountsCapital',
meta: {
title: '资金记录',
noCache: true
},
{
path: 'capital',
name: 'AccountsCapital',
meta: {
title: '资金记录',
noCache: true
},
component: () => import('@/views/accounts/capital/index')
component: () => import('@/views/accounts/capital/index')
}, {
path: 'management',
name: 'AccountsManagement',
meta: {
title: '资金管理',
noCache: true
},
{
path: 'reconciliation',
name: 'AccountsReconciliation',
meta: {
title: '财务对账',
noCache: true
},
component: () => import('@/views/accounts/reconciliation/index')
component: () => import('@/views/accounts/management/index')
},
{
path: 'reconciliation',
name: 'AccountsReconciliation',
meta: {
title: '财务对账',
noCache: true
},
{
path: 'statement',
name: 'AccountsStatement',
meta: {
title: '平台账单',
noCache: true
},
component: () => import('@/views/accounts/statement/index')
component: () => import('@/views/accounts/reconciliation/index')
},
{
path: 'statement',
name: 'AccountsStatement',
meta: {
title: '平台账单',
noCache: true
},
{
path: 'merchantBill',
name: 'AccountsMerchantBill',
meta: {
title: '商户账单',
noCache: true
},
component: () => import('@/views/accounts/statement/merchantBill')
component: () => import('@/views/accounts/statement/index')
},
{
path: 'merchantBill',
name: 'AccountsMerchantBill',
meta: {
title: '商户账单',
noCache: true
},
{
path: 'billDetails/:id',
name: 'BillDetails',
meta: {
title: '商户账单详情',
noCache: true,
activeMenu: `${roterPre}/accounts/merchantBill`
},
component: () => import('@/views/accounts/statement/merchantDetail'),
hidden: true
component: () => import('@/views/accounts/statement/merchantBill')
},
{
path: 'billDetails/:id',
name: 'BillDetails',
meta: {
title: '商户账单详情',
noCache: true,
activeMenu: `${roterPre}/accounts/merchantBill`
},
{
path: 'reconciliation/order/:id/:type?',
name: 'ReconciliationOrder',
component: () => import('@/views/merchant/list/record'),
meta: {
title: '查看订单',
noCache: true,
activeMenu: `${roterPre}/accounts/reconciliation`
},
hidden: true
component: () => import('@/views/accounts/statement/merchantDetail'),
hidden: true
},
{
path: 'reconciliation/order/:id/:type?',
name: 'ReconciliationOrder',
component: () => import('@/views/merchant/list/record'),
meta: {
title: '查看订单',
noCache: true,
activeMenu: `${roterPre}/accounts/reconciliation`
},
{
path: 'capitalFlow',
name: 'AccountsCapitalFlow',
meta: {
title: '资金流水',
noCache: true
},
component: () => import('@/views/accounts/capitalFlow/index')
hidden: true
},
{
path: 'capitalFlow',
name: 'AccountsCapitalFlow',
meta: {
title: '资金流水',
noCache: true
},
{
path: 'subsidy',
name: 'subsidy',
meta: {
title: '补贴记录',
noCache: true
},
component: () => import('@/views/accounts/subsidy/index')
component: () => import('@/views/accounts/capitalFlow/index')
},
{
path: 'subsidy',
name: 'subsidy',
meta: {
title: '补贴记录',
noCache: true
},
{
path: 'transferRecord',
name: 'AccountsTransferRecord',
meta: {
title: '转账记录',
noCache: true
},
component: () => import('@/views/accounts/transferRecord/index')
component: () => import('@/views/accounts/subsidy/index')
},
{
path: 'transferRecord',
name: 'AccountsTransferRecord',
meta: {
title: '转账记录',
noCache: true
},
{
path: 'setting',
name: 'AccountsTransferSetting',
meta: {
title: '转账设置',
noCache: true
},
component: () => import('@/views/accounts/transferManage/setting')
component: () => import('@/views/accounts/transferRecord/index')
},
{
path: 'setting',
name: 'AccountsTransferSetting',
meta: {
title: '转账设置',
noCache: true
},
{
path: 'invoiceDesc',
name: 'AccountsInvoiceDesc',
meta: {
title: '发票说明',
noCache: true
},
component: () => import('@/views/accounts/invoiceDesc/index')
component: () => import('@/views/accounts/transferManage/setting')
},
{
path: 'invoiceDesc',
name: 'AccountsInvoiceDesc',
meta: {
title: '发票说明',
noCache: true
},
{
path: 'receipt',
name: 'AccountsReceipt',
meta: {
title: '发票列表',
noCache: true
},
component: () => import('@/views/accounts/receipt/index')
component: () => import('@/views/accounts/invoiceDesc/index')
},
{
path: 'receipt',
name: 'AccountsReceipt',
meta: {
title: '发票列表',
noCache: true
},
{
path: 'settings',
name: 'AccountsSetting',
meta: {
title: '转账设置',
noCache: true
},
component: () => import('@/views/accounts/settings/index')
component: () => import('@/views/accounts/receipt/index')
},
{
path: 'settings',
name: 'AccountsSetting',
meta: {
title: '转账设置',
noCache: true
},
]
}
component: () => import('@/views/accounts/settings/index')
},
]
}
export default accountsRouter

View 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>