<template>
|
<div class="menuPage">
|
<div class="selectMenu">
|
<el-form :inline="true" :model="searchData" class="form-inline">
|
<el-form-item label="客户名称">
|
<el-input v-model="searchData.acctName" placeholder="请输入客户名称" style="width: 197px;"></el-input>
|
</el-form-item>
|
<el-form-item label="银行卡">
|
<el-input v-model="searchData.acctNo" placeholder="请输入银行卡号" style="width: 197px;"></el-input>
|
</el-form-item>
|
<el-form-item label="手机号">
|
<el-input v-model="searchData.phone" placeholder="请输入" style="width: 197px;"></el-input>
|
</el-form-item>
|
<el-form-item label="开始日期">
|
<el-date-picker
|
v-model="searchData.beginTime"
|
type="date"
|
placeholder="选择日期"
|
format="yyyy - MM - dd "
|
value-format="yyyy-MM-dd"
|
style="width: 197px;"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="结束日期">
|
<el-date-picker
|
v-model="searchData.endTime"
|
type="date"
|
placeholder="选择日期"
|
format="yyyy - MM - dd "
|
value-format="yyyy-MM-dd"
|
style="width: 197px;"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="交易类型">
|
<el-select v-model="searchData.transType" placeholder="请选择" clearable>
|
<el-option
|
v-for="(item,index) in backData"
|
:key="item.value"
|
:label="item.value"
|
:value="item.id"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="支付公司">
|
<el-select v-model="searchData.companyId" placeholder="请选择" clearable>
|
<el-option
|
v-for="(item,index) in companyArr"
|
:key="item.companyId"
|
:label="item.payCompany"
|
:value="item.companyId"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="状态">
|
<el-select v-model="searchData.status" placeholder="请选择" clearable>
|
<el-option
|
v-for="(item,index) in orderList"
|
:key="item.value"
|
:label="item.key"
|
:value="item.value"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="订单号">
|
<el-input v-model="searchData.transNo" placeholder="请输入订单号" style="width: 197px;"></el-input>
|
</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" class="table">
|
<el-table-column prop="acctName" align="center" min-width="120" label="客户名称"></el-table-column>
|
<el-table-column prop="acctNo" align="center" min-width="160" label="银行卡号"></el-table-column>
|
<el-table-column prop="phone" align="center" min-width="140" label="手机号"></el-table-column>
|
<el-table-column prop="amount" align="center" min-width="100" label="订单金额"></el-table-column>
|
<el-table-column prop="finishamount" align="center" min-width="100" label="成功金额"></el-table-column>
|
<el-table-column prop="status" align="center" min-width="100" label="状态">
|
<template slot-scope="scope">
|
<span>{{enumerMap(scope.row.status,'transStatus')}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="bankName" align="center" label="银行名称"></el-table-column>
|
<!-- <el-table-column prop="channelName"
|
align="center"
|
min-width="120"
|
label="支付公司">
|
</el-table-column>
|
<el-table-column prop="merId"
|
align="center"
|
min-width="160"
|
label="商户号">
|
</el-table-column>-->
|
<el-table-column prop="transType" align="center" min-width="100" label="交易类型">
|
<template slot-scope="scope">
|
<span>{{enumerMap(scope.row.transType,'transType')}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="submitTime" align="center" min-width="160" label="交易时间"></el-table-column>
|
<el-table-column prop="transNo" align="center" min-width="160" label="订单号"></el-table-column>
|
|
<el-table-column prop="totalcount" align="center" min-width="100" label="拆分笔数"></el-table-column>
|
<el-table-column prop="finishcount" align="center" min-width="80" label="成功笔数"></el-table-column>
|
|
<el-table-column align="center" width="120" fixed="right" label="操作">
|
<template slot-scope="scope">
|
<el-button size="mini" @click="viewDetail(scope.row.transNo)">查看明细</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<el-pagination
|
layout="total,prev, pager, next, jumper"
|
:total.sync="totalCount"
|
:current-page="searchData.page * 1"
|
background
|
ref="pagination"
|
style="margin-top: 10px;"
|
@current-change="handleCurrentChange"
|
></el-pagination>
|
</div>
|
<query-detail v-model="detailShow" :transNo="maskTranNo"></query-detail>
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
import QueryDetail from "./QueryDetail";
|
|
export default {
|
data() {
|
return {
|
menuItems: [],
|
detailShow: false,
|
searchData: {
|
acctNo: null,
|
acctName: null,
|
phone: null,
|
beginTime: null,
|
endTime: null,
|
transType: null,
|
companyId: null,
|
transNo: null,
|
page: "1",
|
pageSize: "10",
|
queryFlag: 0,
|
status: null
|
},
|
backData: [
|
{
|
value: "鉴权",
|
id: 100
|
},
|
{
|
value: "代扣",
|
id: 300
|
},
|
{
|
value: "代付",
|
id: 200
|
},
|
{
|
value: "退款",
|
id: 400
|
}
|
],
|
orderList: [
|
{ value: "100", key: "处理中" },
|
{ value: "200", key: "成功" },
|
{ value: "300", key: "处理完成" },
|
{ value: "400", key: "未能处理" },
|
{ value: "500", key: "交易失败" }
|
],
|
loading: false,
|
totalCount: 0,
|
maskTranNo: null,
|
currentPage: 1,
|
trueMenuItems: [],
|
companyArr: []
|
};
|
},
|
props: ["Data", "channelData"],
|
created() {
|
this.getMenuData();
|
this.getAllData();
|
},
|
components: {
|
QueryDetail
|
},
|
computed: {
|
...mapGetters(["getMenu"])
|
},
|
watch: {
|
getMenu: function (now, old) {
|
this.getMenuData();
|
}
|
},
|
methods: {
|
// 获取表单数据
|
getMenuData() {
|
const that = this;
|
this.loading = true;
|
this.$http
|
.post("trans/getTransData", this.searchData)
|
.then(Menu => {
|
if (Menu.data.retHeader.retCode === "0000") {
|
if (Menu.data.retBody.totalCount) {
|
that.totalCount = Menu.data.retBody.totalCount;
|
}
|
that.menuItems = Menu.data.retBody.transDataList;
|
this.searchData.queryFlag = 1
|
} else {
|
that.totalCount = 0
|
that.menuItems = []
|
this.$message.error(Menu.data.retHeader.retMessage)
|
}
|
this.loading = false;
|
})
|
.catch(err => {
|
console.log(err);
|
});
|
},
|
// 查看
|
viewDetail(transNo) {
|
this.maskTranNo = transNo;
|
this.detailShow = true;
|
},
|
// 查询
|
search() {
|
if (this.searchData.beginTime == null && this.searchData.endTime) {
|
this.$message({ type: 'warning', message: '选择了结束时间,必须选择开始时间' })
|
} else if (this.searchData.endTime == null && this.searchData.beginTime) {
|
this.$message({ type: 'warning', message: '选择了开始时间,必须选择结束时间' })
|
} else {
|
this.searchData.page = 1
|
this.searchData.queryFlag = 0
|
this.getMenuData();
|
}
|
},
|
// 重置
|
reset() {
|
this.currentPage = 1
|
this.searchData = {
|
acctNo: null,
|
acctName: null,
|
transNo: null,
|
phone: null,
|
beginTime: null,
|
endTime: null,
|
transType: null,
|
page: this.currentPage,
|
pageSize: "10",
|
queryFlag: 0
|
};
|
this.getMenuData()
|
},
|
// 分页
|
handleCurrentChange(val) {
|
// this.searchData.queryFlag = 0
|
this.searchData.page = val;
|
this.getMenuData();
|
},
|
|
// 获取机构数据
|
getBankData() {
|
return this.$http.get("manage/getBankCodes");
|
},
|
// 获取公司数据
|
getCompanyData() {
|
return this.$http.get("manage/getCompanys");
|
},
|
// axios并发请求
|
getAllData() {
|
const that = this;
|
this.Axios.all([this.getCompanyData()])
|
.then(
|
this.Axios.spread(function (Company) {
|
that.companyArr = Company.data;
|
})
|
)
|
.catch(err => {
|
console.log(err);
|
});
|
}
|
}
|
};
|
</script>
|
|
<style>
|
.el-input__icon.el-icon-date {
|
display: none;
|
}
|
</style>
|
|
<style lang="less" scoped>
|
table {
|
width: 100%;
|
> tr {
|
width: 100%;
|
&:first-child {
|
> td {
|
background-color: #333333;
|
color: white;
|
}
|
}
|
td {
|
padding: 6px;
|
text-align: center;
|
font-size: 14px;
|
> a {
|
cursor: pointer;
|
}
|
}
|
}
|
}
|
|
.menuPage {
|
width: 100%;
|
padding: 0px 0px;
|
// overflow: hidden;
|
.selectMenu {
|
width: 100%;
|
overflow: hidden;
|
border-radius: 8px;
|
.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;
|
a {
|
font-size: 12px;
|
color: blue;
|
outline: none;
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|