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

View File

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