<template>
|
<div class="menuPage">
|
<div class="selectMenu">
|
<el-form :inline="true"
|
:model="searchData"
|
ref="searcForm"
|
class="form-inline">
|
<el-form-item label="对账日期" prop="checkDate">
|
<el-date-picker
|
v-model="searchData.checkDate"
|
type="daterange"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
value-format="yyyy-MM-dd">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item label="接入机构" prop="institutionId">
|
<el-select v-model="searchData.institutionId"
|
placeholder="请选择"
|
clearable>
|
<el-option v-for="item in institution"
|
:key="item.institutionId"
|
:label="item.institution"
|
:value="item.institutionId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="支付公司" prop="companyId">
|
<el-select v-model="searchData.companyId"
|
placeholder="请选择"
|
clearable>
|
<el-option v-for="item in company"
|
:key="item.companyId"
|
:label="item.payCompany"
|
:value="item.companyId">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item class="search">
|
<el-button @click="search" type="primary">查询</el-button>
|
<el-button @click="reset">重置</el-button>
|
</el-form-item>
|
</el-form>
|
<div class="channelMenu">
|
<el-table :data="menuItems"
|
v-loading="loading"
|
border
|
class="table">
|
<el-table-column prop="checkDate"
|
min-width="120"
|
align="center"
|
label="对账日期">
|
</el-table-column>
|
<el-table-column prop="institution"
|
align="center"
|
min-width="100"
|
label="接入机构">
|
</el-table-column>
|
<el-table-column prop="payCompany"
|
align="center"
|
min-width="120"
|
label="支付公司">
|
</el-table-column>
|
<el-table-column prop="merId"
|
align="center"
|
min-width="180"
|
label="商户号">
|
</el-table-column>
|
<el-table-column prop="checkBatchNo"
|
align="center"
|
min-width="220"
|
label="对账批次">
|
</el-table-column>
|
<el-table-column prop="checkStatus"
|
align="center"
|
min-width="100"
|
label="对账状态">
|
<template slot-scope="scope">
|
<span>{{enumerMap(scope.row.checkStatus,'checkStatus')}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="recsTime"
|
align="center"
|
min-width="100"
|
label="代收笔数">
|
</el-table-column>
|
<el-table-column prop="recFee"
|
align="center"
|
min-width="100"
|
label="代收费用">
|
</el-table-column>
|
<el-table-column prop="paysTime"
|
align="center"
|
min-width="100"
|
label="代付笔数">
|
</el-table-column>
|
<el-table-column prop="recsAmount"
|
align="center"
|
min-width="100"
|
label="代收金额">
|
</el-table-column>
|
<el-table-column prop="paysAmount"
|
align="center"
|
min-width="100"
|
label="代付金额">
|
</el-table-column>
|
<el-table-column prop="payFee"
|
align="center"
|
min-width="100"
|
label="代付费用">
|
</el-table-column>
|
<el-table-column prop="refundTime"
|
align="center"
|
min-width="100"
|
label="退款笔数">
|
</el-table-column>
|
<el-table-column prop="refundAmount"
|
align="center"
|
min-width="100"
|
label="退款金额">
|
</el-table-column>
|
<el-table-column prop="errorTime"
|
align="center"
|
min-width="100"
|
label="差错笔数">
|
</el-table-column>
|
<el-table-column align="center"
|
min-width="200"
|
fixed="right"
|
label="操作">
|
<template slot-scope="scope">
|
<el-button size="mini"
|
@click="total(scope.row.checkBatchNo,scope.row.institutionId,scope.row.merId)">对账汇总</el-button>
|
<el-button size="mini"
|
@click="goDetail(scope.row.checkDate,scope.row.institutionId,scope.row.companyId,scope.row.merId, scope.row.checkBatchNo)">对账明细</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-pagination @current-change="handleCurrentChange"
|
:current-page="searchData.page * 1"
|
layout="total, prev, pager,next, jumper"
|
:total.sync="totalCount"
|
background
|
style="margin-top: 10px;">
|
</el-pagination>
|
</div>
|
</div>
|
<my-mask v-on:showMask="hideMask"
|
v-model="isShowMask"
|
:Data="maskData"></my-mask>
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters, mapMutations } from "vuex";
|
import { Message } from "element-ui";
|
import MyMask from "./Mask";
|
|
export default {
|
data() {
|
return {
|
isShowMask: false,
|
maskData: {},
|
menuItems: [],
|
searchData: {
|
page: "1",
|
pageSize: "10"
|
},
|
institution: [],
|
loading: false,
|
company: [],
|
detailTable: {
|
tableTitle: [
|
{
|
name: "对账日期",
|
value: "",
|
backStageId: "channelName"
|
},
|
{
|
name: "接入机构",
|
value: "",
|
backStageId: "institution"
|
},
|
{
|
name: "订单号",
|
value: "",
|
backStageId: "merId"
|
},
|
{
|
name: "订单金额",
|
value: "",
|
backStageId: "payCompany"
|
},
|
{
|
name: "子订单",
|
value: "",
|
backStageId: "payCompany"
|
},
|
{
|
name: "子订单金额",
|
value: "",
|
backStageId: "payCompany"
|
},
|
{
|
name: "交易类型",
|
value: "",
|
backStageId: "status"
|
},
|
{
|
name: "支付公司",
|
value: "",
|
backStageId: "creater"
|
},
|
{
|
name: "商户号",
|
value: "",
|
backStageId: "createTime"
|
},
|
{
|
name: "支付状态",
|
value: "",
|
backStageId: "createTime"
|
},
|
{
|
name: "对账单金额",
|
value: "",
|
backStageId: "createTime"
|
},
|
{
|
name: "对账单手续费",
|
value: "",
|
backStageId: "createTime"
|
},
|
{
|
name: "对账结果",
|
value: "",
|
backStageId: "createTime"
|
}
|
]
|
},
|
detailSearch: "",
|
totalCount: 0
|
};
|
},
|
props: ["Data", "channelData"],
|
components: {
|
MyMask
|
},
|
created() {
|
this.getMenuData();
|
this.getAllData();
|
},
|
methods: {
|
// 获取机构数据
|
getInstitutionsData() {
|
return this.$http.get("manage/getInstitutions");
|
},
|
// 获取公司数据
|
getCompanyData() {
|
return this.$http.get("manage/getCompanys");
|
},
|
// axios并发请求
|
getAllData() {
|
const that = this;
|
this.loading = true;
|
this.Axios.all([this.getInstitutionsData(), this.getCompanyData()])
|
.then(
|
this.Axios.spread(function(Institutions, Company) {
|
that.institution = Institutions.data;
|
that.company = Company.data;
|
that.loading = false;
|
})
|
)
|
.catch(err => {
|
console.log(err);
|
});
|
},
|
// 获取表单数据
|
getMenuData() {
|
const that = this;
|
this.loading = true;
|
let {searchData} = this
|
const checkDate = searchData.checkDate
|
if(Array.isArray(checkDate) && checkDate.length > 1 ) {
|
searchData.beginCheckDate = checkDate[0]
|
searchData.endCheckDate = checkDate[1]
|
} else {
|
searchData.beginCheckDate = ''
|
searchData.endCheckDate = ''
|
}
|
this.$http
|
.post("check/getCheckBillSum", {...searchData})
|
.then(response => {
|
if (response.data.retHeader.retCode === "0000") {
|
if (response.data.retBody.totalCount) {
|
that.totalCount = response.data.retBody.totalCount;
|
}
|
that.menuItems = response.data.retBody.list;
|
} else {
|
that.totalCount = 0
|
that.menuItems = []
|
this.$message.error(response.data.retHeader.retMessage)
|
}
|
this.loading = false;
|
})
|
.catch(err => {
|
console.log(err)
|
return;
|
});
|
},
|
// 查询
|
search() {
|
this.getMenuData();
|
},
|
// 重置
|
reset() {
|
this.$refs['searcForm'].resetFields();
|
},
|
// 查看明细
|
goDetail(checkDate, institutionId, companyId, merId, checkBatchNo) {
|
this.$router.push({
|
path: "/balanceDetail",
|
name: "BalanceDetail",
|
params: {
|
table: this.detailTable,
|
data: this.mymapData(checkDate, institutionId, companyId, merId, checkBatchNo)
|
}
|
});
|
},
|
|
// 查看汇总
|
total(checkBatchNo, institutionId, merId) {
|
for (var i = 0; i < this.menuItems.length; i++) {
|
if (
|
checkBatchNo == this.menuItems[i].checkBatchNo &&
|
institutionId == this.menuItems[i].institutionId &&
|
merId == this.menuItems[i].merId
|
) {
|
this.maskData = this.menuItems[i];
|
this.isShowMask = true;
|
}
|
}
|
},
|
// 隐藏蒙版
|
hideMask() {
|
this.isShowMask = false;
|
},
|
// 数据映射函数
|
mymapData(checkDate, institutionId, companyId, merId, checkBatchNo) {
|
for (let i = 0; i < this.menuItems.length; i++) {
|
if (
|
checkDate == this.menuItems[i].checkDate &&
|
institutionId == this.menuItems[i].institutionId &&
|
companyId == this.menuItems[i].companyId &&
|
merId == this.menuItems[i].merId
|
) {
|
this.detailSearch = {
|
checkDate: this.menuItems[i].checkDate,
|
institutionId: this.menuItems[i].institutionId,
|
companyId: this.menuItems[i].companyId,
|
merId: this.menuItems[i].merId,
|
checkBatchNo: this.menuItems[i].checkBatchNo,
|
page: 1,
|
pageSize: 10
|
};
|
return this.detailSearch;
|
}
|
}
|
},
|
// 点积分页
|
handleCurrentChange(val) {
|
this.searchData.page = val;
|
this.getMenuData();
|
}
|
}
|
};
|
</script>
|
|
|
<style>
|
.selectMenu .form-inline .el-form-item {
|
width: 25%;
|
}
|
.el-input__icon.el-icon-date {
|
display: none;
|
}
|
</style>
|
<style lang="less" scoped>
|
|
|
.detail {
|
float: right;
|
color: black;
|
}
|
|
.menuPage {
|
width: 100%;
|
padding: 0px 0px;
|
overflow: hidden;
|
.selectMenu {
|
width: 100%;
|
overflow: hidden;
|
.selectOptions {
|
width: 60%;
|
overflow: hidden;
|
border-bottom: 1px solid #eee;
|
.subMenuItem {
|
width: 50%;
|
float: left;
|
padding: 8px 0px;
|
color: black;
|
> span {
|
display: inline-block;
|
font-size: 14px;
|
width: 26%;
|
height: 100%;
|
text-align: right;
|
}
|
}
|
}
|
.selectBtn {
|
width: 60%;
|
height: 100%;
|
padding: 10px 0px;
|
.center {
|
margin-left: 50%;
|
transform: translateX(-50%);
|
> button {
|
padding: 8px 23px;
|
margin-right: 20px;
|
}
|
}
|
}
|
.channelMenu {
|
width: 100%;
|
margin-top: 20px;
|
.channelMenuTitle {
|
width: 100%;
|
height: 30px;
|
> div {
|
height: 100%;
|
float: left;
|
background-color: #333333;
|
border: 1px solid #999;
|
line-height: 30px;
|
text-align: center;
|
color: white;
|
font-size: 14px;
|
width: 12.5%;
|
margin-right: -1px;
|
}
|
}
|
.add {
|
margin: 10px 0px 5px;
|
}
|
.channelMenuContent {
|
width: 100%;
|
.contentItem {
|
width: 100%;
|
height: 36px;
|
> .contentValue {
|
float: left;
|
height: 36px;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
border: 1px solid #797979;
|
border-top: none;
|
text-align: center;
|
line-height: 36px;
|
background-color: #fff;
|
margin-right: -1px;
|
> a {
|
font-size: 12px;
|
width: 100%;
|
height: 50%;
|
display: block;
|
float: left;
|
line-height: 17px;
|
text-decoration: none;
|
color: blue;
|
}
|
> button {
|
font-size: 12px;
|
height: 70%;
|
padding: 0px;
|
margin: 0px;
|
border-radius: 6px;
|
outline: none;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|