This commit is contained in:
parent
1768164c81
commit
4a8da7ad26
|
@ -14,7 +14,12 @@ export function extractListApi(data) {
|
||||||
export function extractStatusApi(id, data) {
|
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)
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description 充值记录 -- 列表
|
* @description 充值记录 -- 列表
|
||||||
*/
|
*/
|
||||||
|
@ -180,6 +185,12 @@ export function transferReviewSecondApi(id, data) {
|
||||||
export function transferReviewBatchApi(data) {
|
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)
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description 申请转账 -- 备注
|
* @description 申请转账 -- 备注
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<div class="selCard">
|
<div class="selCard">
|
||||||
<el-form size="small" label-width="85px">
|
<el-form size="small" inline label-width="85px">
|
||||||
<el-form-item label="商户名称:">
|
<el-form-item label="商户名称:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableForm.mer_id"
|
v-model="tableForm.mer_id"
|
||||||
|
@ -19,9 +19,21 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="账单日期:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="tableForm.date"
|
||||||
|
value-format="yyyy-MM"
|
||||||
|
format="yyyy-MM"
|
||||||
|
type="month"
|
||||||
|
clearable
|
||||||
|
@change="getList(1)"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-card class="mt14">
|
<el-card class="mt14">
|
||||||
|
<el-button class="mb10" type="primary" size="small" @click="exports">导出列表</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="tableData.data"
|
:data="tableData.data"
|
||||||
|
@ -40,23 +52,23 @@
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="account.sum"
|
prop="date"
|
||||||
label="累计交易额"
|
label="账单日期"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="account.charge"
|
prop="order_amount"
|
||||||
label="累计应入账金额"
|
label="贷款金额"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="mer_money"
|
prop="postage_amount"
|
||||||
label="商户余额"
|
label="邮费金额"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="account.line"
|
prop="amount"
|
||||||
label="可提现金额"
|
label="可提现金额"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
/>
|
/>
|
||||||
|
@ -86,9 +98,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { merchantBillList } from '@/api/accounts'
|
import { merchantBillList,exportInancialRecordApi } from '@/api/accounts'
|
||||||
import { merSelectApi } from "@/api/product";
|
import { merSelectApi } from "@/api/product";
|
||||||
import { roterPre } from '@/settings'
|
import { roterPre } from '@/settings'
|
||||||
|
import createWorkBook from '@/utils/newToExcel.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'MerchantBill',
|
name: 'MerchantBill',
|
||||||
data() {
|
data() {
|
||||||
|
@ -104,7 +117,8 @@ export default {
|
||||||
tableForm: {
|
tableForm: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
mer_id: ''
|
mer_id: '',
|
||||||
|
date:''
|
||||||
},
|
},
|
||||||
merSelect: [],
|
merSelect: [],
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
|
@ -141,6 +155,32 @@ export default {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async exports() {
|
||||||
|
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 = await this.downOrderData(excelData)
|
||||||
|
pageCount = Math.ceil(lebData.count / excelData.limit)
|
||||||
|
if (lebData.export.length) {
|
||||||
|
data = data.concat(lebData.export)
|
||||||
|
excelData.page++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename)
|
||||||
|
return
|
||||||
|
},
|
||||||
|
/** 订单 */
|
||||||
|
downOrderData(excelData) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
exportInancialRecordApi(excelData).then((res) => {
|
||||||
|
return resolve(res.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 列表
|
// 列表
|
||||||
getList(num) {
|
getList(num) {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
|
|
|
@ -108,7 +108,8 @@
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="mb20">
|
<div class="mb20">
|
||||||
<el-button size="small" type="primary" @click="exports">导出列表</el-button>
|
<el-button size="small" type="primary" @click="exports">导出列表</el-button>
|
||||||
<!-- <el-button size="small" :disabled="multipleSelection.length==0" @click="batch">批量审核</el-button> -->
|
<el-button size="small" :disabled="multipleSelection.length==0" @click="batch">批量审核</el-button>
|
||||||
|
<el-button size="small" :disabled="multipleSelection.length==0" @click="batTransferAdd">批量转账</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -161,7 +162,7 @@
|
||||||
<el-table-column prop="mer_money" label="商户余额(元)" min-width="120"/>
|
<el-table-column prop="mer_money" label="商户余额(元)" min-width="120"/>
|
||||||
<el-table-column label="操作" min-width="180" fixed="right">
|
<el-table-column label="操作" min-width="180" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="(scope.row.status == 0 || scope.row.status == 10 || scope.row.status == 11)" type="text" size="small" @click="transferDetail(scope.row.financial_id)">{{ getStatusName(scope.row.status) }}</el-button>
|
<el-button v-if="scope.row.status == 0" type="text" size="small" @click="transferDetail(scope.row.financial_id)">审核</el-button>
|
||||||
<el-button v-if="scope.row.status == 1 && scope.row.financial_status != 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,1)">转账</el-button>
|
<el-button v-if="scope.row.status == 1 && scope.row.financial_status != 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,1)">转账</el-button>
|
||||||
<el-button v-if="scope.row.status == 1 && scope.row.financial_status == 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,0)">转账信息</el-button>
|
<el-button v-if="scope.row.status == 1 && scope.row.financial_status == 1" type="text" size="small" @click="transferDetail(scope.row.financial_id,0)">转账信息</el-button>
|
||||||
<el-button type="text" size="small" @click="transferMark(scope.row.financial_id)">备注</el-button>
|
<el-button type="text" size="small" @click="transferMark(scope.row.financial_id)">备注</el-button>
|
||||||
|
@ -208,7 +209,7 @@
|
||||||
<div class="item" v-if="transferData.status != 0&&isShow"><label class="name">审核状态:</label>{{ getStatus(transferData.status) }}</div>
|
<div class="item" v-if="transferData.status != 0&&isShow"><label class="name">审核状态:</label>{{ getStatus(transferData.status) }}</div>
|
||||||
<div class="item" v-if="transferData.status == 1"><label class="name">审核时间:</label>{{ transferData.status_time }}</div>
|
<div class="item" v-if="transferData.status == 1"><label class="name">审核时间:</label>{{ transferData.status_time }}</div>
|
||||||
<div class="item" v-if="transferData.status == -1&&isShow"><label class="name">审核未通过原因:</label>{{ transferData.refusal }}</div>
|
<div class="item" v-if="transferData.status == -1&&isShow"><label class="name">审核未通过原因:</label>{{ transferData.refusal }}</div>
|
||||||
<el-form-item label="审核状态:" required v-if="transferData.status == 0 || transferData.status == 10 || transferData.status == 11 || !isShow" class="item">
|
<el-form-item label="审核状态:" required v-if="transferData.status == 0 || !isShow" class="item">
|
||||||
<el-radio-group v-model="formValidate.status">
|
<el-radio-group v-model="formValidate.status">
|
||||||
<el-radio :label="1" class="radio">通过</el-radio>
|
<el-radio :label="1" class="radio">通过</el-radio>
|
||||||
<el-radio :label="-1">拒绝</el-radio>
|
<el-radio :label="-1">拒绝</el-radio>
|
||||||
|
@ -236,11 +237,26 @@
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="dialogVisible=false">取消</el-button>
|
<el-button size="small" @click="dialogVisible=false">取消</el-button>
|
||||||
<el-button v-if="(transferData.status == 0 || transferData.status == 10 || transferData.status == 11) && isShow" type="primary" size="small" @click="transferReview(transferData.financial_id,transferData.status)">提交</el-button>
|
<el-button v-if="transferData.status == 0 && isShow" type="primary" size="small" @click="transferReview(transferData.financial_id)">提交</el-button>
|
||||||
<el-button v-if="!isShow" type="primary" size="small" @click="transferReviewBatchApi()">提交</el-button>
|
<el-button v-if="!isShow" type="primary" size="small" @click="transferReviewBatchApi()">提交</el-button>
|
||||||
<el-button v-if="transferData.status == 1" type="primary" size="small" @click="onSubmit(transferData.financial_id)">提交</el-button>
|
<el-button v-if="transferData.status == 1" type="primary" size="small" @click="onSubmit(transferData.financial_id)">提交</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 转账 -->
|
||||||
|
<el-dialog title="转账信息" :visible.sync="transferVisible" width="700px" v-if="transferVisible">
|
||||||
|
<el-form ref="ruleForm" size="small">
|
||||||
|
<el-form-item label="转账状态:" required class="item">
|
||||||
|
<el-radio-group v-model="formValidate.status">
|
||||||
|
<el-radio :label="1" class="radio">通过</el-radio>
|
||||||
|
<el-radio :label="-1">拒绝</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button size="small" @click="transferVisible=false">取消</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="transferBatchApi">提交</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
<!--查看二维码-->
|
<!--查看二维码-->
|
||||||
<el-dialog :visible.sync="pictureVisible" width="700px" v-if="pictureVisible">
|
<el-dialog :visible.sync="pictureVisible" width="700px" v-if="pictureVisible">
|
||||||
<img :src="pictureUrl" class="pictures"/>
|
<img :src="pictureUrl" class="pictures"/>
|
||||||
|
@ -252,7 +268,7 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { merSelectApi } from '@/api/product'
|
import { merSelectApi } from '@/api/product'
|
||||||
import { transferReviewBatchApi,transferReviewFirstApi,transferReviewSecondApi,transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts'
|
import { transferBatchApi,transferReviewBatchApi,transferReviewFirstApi,transferReviewSecondApi,transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts'
|
||||||
import cardsData from "@/components/cards/index";
|
import cardsData from "@/components/cards/index";
|
||||||
import createWorkBook from '@/utils/newToExcel.js';
|
import createWorkBook from '@/utils/newToExcel.js';
|
||||||
import fileList from '@/components/exportFile/fileList'
|
import fileList from '@/components/exportFile/fileList'
|
||||||
|
@ -276,6 +292,7 @@ export default {
|
||||||
isShow:false,
|
isShow:false,
|
||||||
cardLists: [],
|
cardLists: [],
|
||||||
voucher_image: [],
|
voucher_image: [],
|
||||||
|
transferVisible:false,
|
||||||
formValidate: {
|
formValidate: {
|
||||||
status: 1,
|
status: 1,
|
||||||
refusal: ''
|
refusal: ''
|
||||||
|
@ -332,24 +349,10 @@ export default {
|
||||||
this.getHeaderData();
|
this.getHeaderData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getStatusName(val){
|
|
||||||
switch (val) {
|
|
||||||
case 0:
|
|
||||||
return '初始审核';
|
|
||||||
case 10:
|
|
||||||
return '第二步审核';
|
|
||||||
case 11:
|
|
||||||
return '最终审核';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getStatus(val){
|
getStatus(val){
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
return '待审核';
|
return '待审核';
|
||||||
case 10:
|
|
||||||
return '初步审核通过';
|
|
||||||
case 11:
|
|
||||||
return '二次审核通过';
|
|
||||||
case -1:
|
case -1:
|
||||||
return '审核未通过';
|
return '审核未通过';
|
||||||
}
|
}
|
||||||
|
@ -361,6 +364,25 @@ export default {
|
||||||
this.$refs.searchForm.resetFields()
|
this.$refs.searchForm.resetFields()
|
||||||
this.getList(1)
|
this.getList(1)
|
||||||
},
|
},
|
||||||
|
transferBatchApi(){
|
||||||
|
let parmas = {
|
||||||
|
status: this.formValidate.status,
|
||||||
|
refusal: this.formValidate.refusal,
|
||||||
|
ids:this.OffId
|
||||||
|
}
|
||||||
|
transferBatchApi(parmas).then((res)=>{
|
||||||
|
this.$message.success(res.message)
|
||||||
|
this.getList(1)
|
||||||
|
this.transferVisible = false
|
||||||
|
}).catch(res => {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
batTransferAdd(){
|
||||||
|
if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录')
|
||||||
|
this.transferData = {}
|
||||||
|
this.transferVisible = true
|
||||||
|
},
|
||||||
selectable(row, index){
|
selectable(row, index){
|
||||||
// return !row.status
|
// return !row.status
|
||||||
},
|
},
|
||||||
|
@ -377,6 +399,7 @@ export default {
|
||||||
batch() {
|
batch() {
|
||||||
if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录')
|
if(this.multipleSelection.length === 0) return this.$message.warning('请先选择记录')
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
|
this.transferData = {}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
transferReviewBatchApi(){
|
transferReviewBatchApi(){
|
||||||
|
@ -440,15 +463,20 @@ export default {
|
||||||
this.pictureUrl = url;
|
this.pictureUrl = url;
|
||||||
},
|
},
|
||||||
// 审核
|
// 审核
|
||||||
transferReview(id,val){
|
transferReview(id){
|
||||||
switch (val) {
|
let parmas = {
|
||||||
case 0:
|
status: this.formValidate.status,
|
||||||
return this.transferReviewFirstApi(id)
|
refusal: this.formValidate.refusal,
|
||||||
case 10:
|
|
||||||
return this.transferReviewSecondApi(id)
|
|
||||||
case 11:
|
|
||||||
return this.transferReviewApi(id)
|
|
||||||
}
|
}
|
||||||
|
transferReviewApi(id,parmas).then(res => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.$message.success(res.message);
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.getList(1);
|
||||||
|
}).catch(res => {
|
||||||
|
this.listLoading = false;
|
||||||
|
this.$message.error(res.message)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 最终审核
|
// 最终审核
|
||||||
transferReviewApi(id,val){
|
transferReviewApi(id,val){
|
||||||
|
|
Loading…
Reference in New Issue