<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.reqNo" placeholder="请输入网银流水号" style="width: 270px;" clearable></el-input>
|
</el-form-item>
|
<el-form-item label="结算户">
|
<el-select v-model="searchData.settleAcctNo" placeholder="请选择结算户" style="width: 270px;" clearable>
|
<el-option
|
v-for="(item, index) in settleAcctArr"
|
:key="index"
|
:label="item.acctNo + '/' + item.acctName"
|
:value="item.acctNo"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="客户名称">
|
<el-input v-model="searchData.repayName" placeholder="请输入客户名称" style="width: 270px;" clearable></el-input>
|
</el-form-item>
|
<el-form-item label="备注">
|
<el-input v-model="searchData.remark" placeholder="请输入备注" style="width: 270px;" clearable></el-input>
|
</el-form-item>
|
<el-form-item label="收款日期">
|
<el-date-picker
|
v-model="searchData.beginDate"
|
type="date"
|
placeholder="请输入开始日期"
|
format="yyyy - MM - dd "
|
value-format="yyyy-MM-dd"
|
style="width: 125px;"
|
clearable
|
/>
|
-
|
<el-date-picker
|
v-model="searchData.endDate"
|
type="date"
|
placeholder="请输入结束日期"
|
format="yyyy - MM - dd "
|
value-format="yyyy-MM-dd"
|
style="width: 125px;"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="收款金额">
|
<el-input v-model.number="searchData.minAmount" placeholder="请输入最小金额" style="width: 150px;" clearable /> -
|
<el-input v-model.number="searchData.maxAmount" placeholder="请输入最大金额" style="width: 150px;" clearable />
|
</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="transNumber" align="center" min-width="200" label="网银流水"></el-table-column>
|
<el-table-column prop="transDate" align="center" min-width="100" label="交易日期"></el-table-column>
|
<el-table-column prop="settleAcctNo" align="center" min-width="200" label="对公结算户"></el-table-column>
|
<el-table-column prop="acctNo" align="center" min-width="230" label="专属账号"></el-table-column>
|
<el-table-column prop="income" align="center" min-width="100" label="收入"></el-table-column>
|
<el-table-column prop="repayName" align="center" min-width="240" label="对方户名"></el-table-column>
|
<el-table-column prop="repayAcctNo" align="center" min-width="200" label="对方账号"></el-table-column>
|
<el-table-column prop="summary" align="center" min-width="200" label="摘要"></el-table-column>
|
<el-table-column prop="remark" align="center" min-width="240" label="备注"></el-table-column>
|
<el-table-column prop="transSet" align="center" min-width="200" label="回单编号"></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>
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
|
export default {
|
data() {
|
var validateFloat = (rule, value, callback) => {
|
if (/^[0-9]*(\.[0-9]{0,2})?$/.test(value)) {
|
callback();
|
} else {
|
callback(new Error("请输入数字"));
|
}
|
};
|
var validateNumber = (rule, value, callback) => {
|
if (/^[0-9]*$/.test(value)) {
|
callback();
|
} else {
|
callback(new Error("请输入整数"));
|
}
|
};
|
return {
|
menuItems: [],
|
searchData: {
|
reqNo: null,
|
settleAcctNo: null,
|
repayName: null,
|
remark: null,
|
beginDate: null,
|
endDate: null,
|
minAmount: null,
|
maxAmount: null,
|
page: "1",
|
pageSize: "10",
|
queryFlag: 0
|
},
|
loading: false,
|
totalCount: 0,
|
maskTranNo: null,
|
currentPage: 1,
|
trueMenuItems: [],
|
companyArr: [],
|
settleAcctArr: [],
|
rules: {
|
}
|
};
|
},
|
created() {
|
this.getMenuData();
|
this.getAllData();
|
},
|
computed: {
|
...mapGetters(["getMenu"])
|
},
|
watch: {
|
getMenu: function (now, old) {
|
this.getMenuData();
|
}
|
},
|
methods: {
|
// 获取表单数据
|
getMenuData() {
|
const that = this;
|
this.loading = true;
|
this.$http
|
.post("bankTrans/queryBankTrans", 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.list;
|
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);
|
});
|
},
|
// 查询
|
search() {
|
if(this.searchData.minAmount > this.searchData.maxAmount) {
|
this.$message({ type: 'warning', message: '最小金额大于最大金额' })
|
} else if (this.searchData.beginDate == null && this.searchData.endDate) {
|
this.$message({ type: 'warning', message: '选择了结束时间,必须选择开始时间' })
|
} else if (this.searchData.endDate == null && this.searchData.beginDate) {
|
this.$message({ type: 'warning', message: '选择了开始时间,必须选择结束时间' })
|
} else {
|
this.searchData.page = 1
|
this.searchData.queryFlag = 0
|
this.getMenuData();
|
}
|
},
|
// 重置
|
reset() {
|
this.currentPage = 1
|
this.searchData = {
|
reqNo: null,
|
settleAcctNo: null,
|
repayName: null,
|
remark: null,
|
beginDate: null,
|
endDate: null,
|
minAmount: null,
|
maxAmount: null,
|
page: this.currentPage,
|
pageSize: "10",
|
queryFlag: 0
|
};
|
this.getMenuData()
|
},
|
// 分页
|
handleCurrentChange(val) {
|
this.searchData.page = val;
|
this.getMenuData();
|
},
|
// 获取结算户信息
|
getSettleAcctDate() {
|
return this.$http.post("bankTrans/getSettleAccounts");
|
},
|
// axios并发请求
|
getAllData() {
|
const that = this;
|
this.Axios.all([this.getSettleAcctDate()])
|
.then(
|
this.Axios.spread(function (SettleAcct) {
|
that.settleAcctArr = SettleAcct.data.retBody;
|
})
|
)
|
.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>
|