财务-用户订单完成

This commit is contained in:
tt 2024-10-25 14:53:55 +08:00
parent 51b9d188cf
commit 8cefd74d3b
2 changed files with 90 additions and 122 deletions

View File

@ -1,313 +1,324 @@
import request from './request'
import request from "./request";
/**
* @description 提现 -- 列表
*/
export function extractListApi(data) {
return request.get('user/extract/lst', data)
return request.get("user/extract/lst", data);
}
/**
* @description 提现 -- 审核
*/
export function extractStatusApi(id, data) {
return request.post(`user/extract/status/${id}`, data)
return request.post(`user/extract/status/${id}`, data);
}
/**
* @description 导出订单
*/
export function exportInancialRecordApi(data) {
return request.get(`financial_record/mer_export`, data)
return request.get(`financial_record/mer_export`, data);
}
/**
* @description 下载订单
*/
export function exportmerDetailExportApi(data) {
return request.get(`financial_record/mer_detail_export`, data)
return request.get(`financial_record/mer_detail_export`, data);
}
/**
* @description 用户账单-下载订单
*/
export function exportUserExportApi(data) {
return request.get(`user/brokerage/bill/excel`, data);
}
/**
* @description 用户账单-列表
*/
export function getUserPriceListApi(data) {
return request.get(`user/userprice/list`, data);
}
/**
* @description 充值记录 -- 列表
*/
export function rechargeListApi(data) {
return request.get(`user/recharge/list`, data)
return request.get(`user/recharge/list`, data);
}
/**
* @description 充值记录 -- 统计
*/
export function rechargeTotalApi() {
return request.get(`user/recharge/total`)
return request.get(`user/recharge/total`);
}
/**
* @description 资金记录 -- 列表
*/
export function billListApi(data) {
return request.get(`bill/list`, data)
return request.get(`bill/list`, data);
}
/**
* @description 资金记录 -- 记录类型
*/
export function billTypeApi() {
return request.get(`bill/type`)
return request.get(`bill/type`);
}
/**
* @description 财务对账 -- 对账单列表
*/
export function reconciliationListApi(data) {
return request.get(`merchant/order/reconciliation/lst`, data)
return request.get(`merchant/order/reconciliation/lst`, data);
}
/**
* @description 财务对账 -- 确认打款
*/
export function reconciliationStatusApi(id, data) {
return request.post(`merchant/order/reconciliation/status/${id}`, data)
return request.post(`merchant/order/reconciliation/status/${id}`, data);
}
/**
* @description 财务对账 -- 查看订单
*/
export function reconciliationOrderApi(id, data) {
return request.get(`merchant/order/reconciliation/${id}/order`, data)
return request.get(`merchant/order/reconciliation/${id}/order`, data);
}
/**
* @description 财务对账 -- 退款订单
*/
export function reconciliationRefundApi(id, data) {
return request.get(`merchant/order/reconciliation/${id}/refund`, data)
return request.get(`merchant/order/reconciliation/${id}/refund`, data);
}
/**
* @description 财务对账 -- 备注
*/
export function reconciliationMarkApi(id) {
return request.get(`merchant/order/reconciliation/mark/${id}/form`)
return request.get(`merchant/order/reconciliation/mark/${id}/form`);
}
/**
* @description 资金流水 -- 列表
*/
export function capitalFlowLstApi(data) {
return request.get(`financial_record/list`, data)
return request.get(`financial_record/list`, data);
}
/**
* @description 资金流水 -- 导出
*/
export function capitalFlowExportApi(data) {
return request.get(`financial_record/export`, data)
return request.get(`financial_record/export`, data);
}
/**
* @description 商户列表导出 -- 导出
*/
export function billExport(data) {
return request.get(`financial/bill_export`, data)
return request.get(`financial/bill_export`, data);
}
/**
* @description 转账记录 -- 导出
*/
export function transferRecordsExportApi(data) {
return request.get(`financial/export`, data)
return request.get(`financial/export`, data);
}
/**
* @description 资金记录 -- 导出
*/
export function fundingRecordsExportApi(data) {
return request.get(`bill/export`, data)
return request.get(`bill/export`, data);
}
/**
* @description 提现管理 -- 导出
*/
export function extractManageExportApi(data) {
return request.get(`user/extract/export`, data)
return request.get(`user/extract/export`, data);
}
/**
* @description 提现管理 -- 审核
*/
export function extractManageAudit(id) {
return request.get(`user/extract/status_form/${id}`)
return request.get(`user/extract/status_form/${id}`);
}
/**
* @description 提现管理 -- 详情
*/
export function extractManageDetail(id) {
return request.get(`user/extract/detail/${id}`)
return request.get(`user/extract/detail/${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 transferReviewFirstApi(id, data) {
return request.post(`financial/status_first/${id}`, data)
return request.post(`financial/status_first/${id}`, data);
}
/**
* @description 申请转账 -- 最终审核
*/
export function transferReviewSecondApi(id, data) {
return request.post(`financial/status_second/${id}`, data)
return request.post(`financial/status_second/${id}`, data);
}
/**
* @description 申请转账 -- 批量审核
*/
export function transferReviewBatchApi(data) {
return request.post(`financial/status_batch`, data)
return request.post(`financial/status_batch`, data);
}
/**
* @description 申请转账 -- 批量审核
*/
export function transferBatchApi(data) {
return request.post(`financial/status_update`, data)
return request.post(`financial/status_update`, 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}`)
return request.get(`receipt/detail/${id}`);
}
/**
* @description 分账单 -- 获取配置
*/
export function getSettingApi() {
return request.get(`profitsharing/config`)
return request.get(`profitsharing/config`);
}
/**
* @description 分账单 -- 修改配置
*/
export function updateSettingApi(data) {
return request.post(`profitsharing/config`, data)
return request.post(`profitsharing/config`, data);
}
/**
* @description 商户账单 -- 列表
*/
export function merchantBillList(data) {
return request.get(`financial_record/mer_lst`, data)
return request.get(`financial_record/mer_lst`, data);
}
/**
* @description 商户结算明细 -- 列表
*/
export function financialBillApi(data) {
return request.get(`financial/bill`, data)
return request.get(`financial/bill`, data);
}
/**
* @description 单个商户账单 -- 列表
*/
export function singleMerBillList(id, data) {
return request.get(`financial_record/mer_list/${id}`, data)
return request.get(`financial_record/mer_list/${id}`, data);
}
/**
* @description 单个商户账单 -- 详情
*/
export function singleMerBillDetail(type, data) {
return request.get(`financial_record/mer_detail/${type}`, data)
return request.get(`financial_record/mer_detail/${type}`, data);
}
/**
* @description 单个商户账单 -- 导出
*/
export function singleMerBillExport(type, data) {
return request.get(`financial_record/mer_excel/${type}`, data)
return request.get(`financial_record/mer_excel/${type}`, data);
}
/**
* @description 单个商户账单 -- 统计
*/
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

@ -2,34 +2,20 @@
<div class="divBox">
<div class="selCard">
<el-form ref="searchForm" size="small" inline label-width="85px">
<el-form-item label="用户姓名:" prop="user_name">
<el-form-item label="关键字:" prop="keyword">
<el-input
v-model="tableForm.user_name"
placeholder="请输入用户姓名"
v-model="tableForm.keyword"
placeholder="请输入用户电话/姓名"
class="selWidth"
></el-input>
</el-form-item>
<el-form-item label="用户电话:" prop="user_phone">
<el-form-item label="身份证号:" prop="card_id">
<el-input
v-model="tableForm.user_phone"
placeholder="请输入用户电话"
class="selWidth"
></el-input>
</el-form-item>
<el-form-item label="身份证号:" prop="user_number">
<el-input
v-model="tableForm.user_number"
v-model="tableForm.card_id"
placeholder="请输入用户身份证号"
class="selWidth"
></el-input>
</el-form-item>
<el-form-item label="用户ID" prop="user_id">
<el-input
v-model="tableForm.user_id"
placeholder="请输入用户ID"
class="selWidth"
></el-input>
</el-form-item>
<el-form-item label="账单日期:" prop="date">
<el-date-picker
v-model="tableForm.date"
@ -69,18 +55,18 @@
}}</span>
</template>
</el-table-column>
<el-table-column prop="user_id" label="用户ID" min-width="120" />
<el-table-column prop="user_name" label="用户姓名" min-width="120" />
<el-table-column prop="user_phone" label="用户电话" min-width="120" />
<el-table-column prop="uid" label="用户ID" min-width="120" />
<el-table-column prop="nickname" label="用户姓名" min-width="120" />
<el-table-column prop="account" label="用户电话" min-width="120" />
<el-table-column prop="card_id" label="用户身份证号" min-width="120" />
<el-table-column prop="create_time" label="账单日期" min-width="120" />
<el-table-column
prop="user_number"
label="用户身份证号"
prop="brokerage_price"
label="成长值"
min-width="120"
/>
<el-table-column prop="date" label="账单日期" min-width="120" />
<el-table-column prop="as_price" label="成长值" min-width="120" />
<el-table-column
prop="order_amount"
prop="bonus_price"
label="申请奖励金额"
min-width="120"
/>
@ -89,7 +75,7 @@
<el-button
type="text"
size="small"
@click="exports('download', scope.row.mer_id, scope.row.date)"
@click="exports('download', scope.row.user_id)"
>下载明细</el-button
>
</template>
@ -111,11 +97,7 @@
</template>
<script>
import {
merchantBillList,
exportInancialRecordApi,
exportmerDetailExportApi,
} from "@/api/accounts";
import { getUserPriceListApi, exportUserExportApi } from "@/api/accounts";
import { merSelectApi } from "@/api/product";
import { roterPre } from "@/settings";
import createWorkBook from "@/utils/newToExcel.js";
@ -134,26 +116,11 @@ export default {
tableForm: {
page: 1,
limit: 10,
mer_id: "",
card_id: "",
keyword: "",
date: "",
},
merSelect: [],
ruleForm: {
status: "0",
},
dialogVisible: false,
rules: {
status: [
{ required: true, message: "请选择对账状态", trigger: "change" },
],
},
reconciliationId: 0,
accountDetails: {
date: "",
charge: {},
expend: {},
income: {},
},
};
},
computed: {},
@ -165,7 +132,9 @@ export default {
/**重置 */
searchReset() {
this.timeVal = [];
this.tableFrom.date = "";
this.tableForm.date = "";
this.tableForm.keyword = "";
this.tableForm.card_id = "";
this.$refs.searchForm.resetFields();
this.getList(1);
},
@ -181,23 +150,19 @@ export default {
},
async exports(type, id, date) {
let params = {
mer_id: id,
uid: id ? id : "",
page: 1,
limit: 500,
date,
keyword: this.tableForm.keyword,
};
const excelData = JSON.parse(JSON.stringify(this.tableForm));
let data = [];
excelData.page = 1;
excelData.limit = 200;
// excelData.ids = this.checkedIds.toString()
let pageCount = 1;
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData =
type == "download"
? await this.exportmerDetailExportApi(params)
: await this.downOrderData(excelData);
lebData = await this.exportmerDetailExportApi(params);
pageCount = Math.ceil(lebData.count / excelData.limit);
if (lebData.export.length) {
data = data.concat(lebData.export);
@ -213,18 +178,10 @@ export default {
);
return;
},
/** 订单 */
downOrderData(excelData) {
return new Promise((resolve, reject) => {
exportInancialRecordApi(excelData).then((res) => {
return resolve(res.data);
});
});
},
/** 下载订单 */
/** 下载订单 --新接口*/
exportmerDetailExportApi(excelData) {
return new Promise((resolve, reject) => {
exportmerDetailExportApi(excelData).then((res) => {
exportUserExportApi(excelData).then((res) => {
return resolve(res.data);
});
});
@ -233,7 +190,7 @@ export default {
getList(num) {
this.listLoading = true;
this.tableForm.page = num ? num : this.tableForm.page;
merchantBillList(this.tableForm)
getUserPriceListApi(this.tableForm)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;