<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-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="searchData.remark" placeholder="请输入备注" style="width: 270px;" clearable></el-input>
|
</el-form-item>
|
<el-form-item label="收款金额">
|
<el-input v-model.number="searchData.minAmount" placeholder="请输入最小金额" style="width: 150px;" clearable></el-input> -
|
<el-input v-model.number="searchData.maxAmount" placeholder="请输入最大金额" style="width: 150px;" clearable></el-input>
|
</el-form-item>
|
<el-form-item label="状态">
|
<el-select v-model="searchData.status" placeholder="请选择" clearable>
|
<el-option
|
v-for="(item,index) in statusList"
|
:key=index
|
:label="item.key"
|
:value="item.value"
|
></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">
|
<div class="add">
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
<el-button @click="openBatchDelete()">选中删除</el-button>
|
<el-button @click="openBatchUpload()">选中上传</el-button>
|
</div>
|
<el-table ref="multipleTable" :data="menuItems" v-loading="loading" @selection-change="handleSelectionChange">
|
<el-table-column prop="transNumber" align="center" min-width="200" label="网银流水"></el-table-column>
|
<el-table-column fixed="left" type="selection" width="50" align="center" :selectable="checkboxInit"></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="200" 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="100" label="摘要"></el-table-column>
|
<el-table-column prop="remark" align="center" min-width="240" label="备注"></el-table-column>
|
<el-table-column prop="status" align="center" min-width="100" label="状态">
|
<template slot-scope="scope">
|
<span>{{enumerMap(scope.row.status,'bankTransStatus')}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="transSet" align="center" min-width="200" label="回单编号"></el-table-column>
|
<el-table-column fixed="right" align="center" min-width="150" label="操作">
|
<template slot-scope="scope">
|
<el-button size="mini" type="primary" v-if="scope.row.status === '1'" @click="openUpload(scope.$index, scope.row)">上传</el-button>
|
<el-button size="mini" v-if="scope.row.status === '1'" type="danger" @click="openDelete(scope.$index, scope.row)">删除</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>
|
</div>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
import { uploadInterceptTrans, deleteInterceptTrans } from "@/assets/api/api";
|
|
export default {
|
data() {
|
return {
|
menuItems: [],
|
searchData: {
|
reqNo: null,
|
settleAcctNo: null,
|
repayName: null,
|
remark: null,
|
beginDate: null,
|
endDate: null,
|
minAmount: null,
|
maxAmount: null,
|
status: null,
|
page: "1",
|
pageSize: "10",
|
queryFlag: 0
|
},
|
loading: false,
|
totalCount: 0,
|
maskTranNo: null,
|
currentPage: 1,
|
statusList: [
|
{ value: "1", key: "拦截" },
|
{ value: "2", key: "已删除" },
|
{ value: "3", key: "已上传" }
|
],
|
settleAcctArr: [],
|
multipleSelection: [],
|
singleSelection: []
|
};
|
},
|
props: ["Data", "channelData"],
|
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/queryInterceptTrans", 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,
|
status: null,
|
page: this.currentPage,
|
pageSize: "10",
|
queryFlag: 0
|
};
|
this.getMenuData()
|
},
|
// 分页
|
handleCurrentChange(val) {
|
this.searchData.page = val;
|
this.getMenuData();
|
},
|
handleSelectionChange(val) {
|
this.multipleSelection = val
|
},
|
// 获取结算户信息
|
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);
|
});
|
},
|
// 弹出上传确认框
|
openUpload(index, val) {
|
this.$confirm('选中项上传之后,流水无法删除,且同步到核心系统, 是否继续?', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
this.handleUpload(index, val)
|
}).catch(() => {
|
this.getMenuData();
|
});
|
},
|
// 上传
|
async handleUpload(index, val) {
|
this.singleSelection.push(val);
|
let res = await uploadInterceptTrans(this.singleSelection);
|
if (res.data.retHeader.retCode === "0000") {
|
this.$message({
|
type: "success",
|
message: "上传成功"
|
});
|
} else {
|
this.$message({
|
type: "error",
|
message: res.data.retHeader.retMessage
|
});
|
}
|
this.singleSelection = []
|
this.getMenuData();
|
},
|
// 弹出删除确认框
|
openDelete(index, val) {
|
this.$confirm('此操作将删除该笔流水, 是否继续?', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
this.handleDelete(index, val)
|
}).catch(() => {
|
this.getMenuData();
|
});
|
},
|
// 删除流水
|
async handleDelete(index, val) {
|
this.singleSelection.push(val);
|
let res = await deleteInterceptTrans(this.singleSelection);
|
if (res.data.retHeader.retCode === "0000") {
|
this.$message({
|
type: "success",
|
message: "删除成功"
|
});
|
} else {
|
this.$message({
|
type: "error",
|
message: res.data.retHeader.retMessage
|
});
|
}
|
this.singleSelection = []
|
this.getMenuData();
|
},
|
toggleSelection() {
|
this.$refs.multipleTable.clearSelection();
|
},
|
// 全部删除按钮
|
openBatchDelete() {
|
this.$confirm('此操作将删除选中的流水, 是否继续?', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
this.deleteSelection()
|
}).catch(() => {
|
this.getMenuData();
|
});
|
},
|
// 批量删除流水
|
async deleteSelection() {
|
let res = await deleteInterceptTrans(this.multipleSelection);
|
if (res.data.retHeader.retCode === "0000") {
|
this.$message({
|
type: "success",
|
message: "删除成功"
|
});
|
} else {
|
this.$message({
|
type: "error",
|
message: res.data.retHeader.retMessage
|
});
|
}
|
this.singleSelection = []
|
this.getMenuData();
|
},
|
// 批量上传流水
|
openBatchUpload() {
|
this.$confirm('选中项上传之后流水无法删除,且同步到核心系统, 是否继续?', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(() => {
|
this.uploadSelection()
|
}).catch(() => {
|
this.getMenuData();
|
});
|
},
|
// 批量上传流水
|
async uploadSelection() {
|
let res = await uploadInterceptTrans(this.multipleSelection);
|
if (res.data.retHeader.retCode === "0000") {
|
this.$message({
|
type: "success",
|
message: "上传成功"
|
});
|
} else {
|
this.$message({
|
type: "error",
|
message: res.data.retHeader.retMessage
|
});
|
}
|
this.singleSelection = []
|
this.getMenuData();
|
},
|
checkboxInit(row, index) {
|
if(row.status === '1') {
|
return true;
|
}
|
return false;
|
}
|
}
|
};
|
</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>
|