<template>
|
<el-dialog class="menuPage"
|
title="支付交易详情页"
|
:visible.sync="dialogVisible"
|
width="80%"
|
@close="close"
|
ref="dialog">
|
<div class="clearfix">
|
<el-table :data="menuItems"
|
height="500"
|
v-loading="loading"
|
class="table"
|
>
|
<el-table-column prop="acctName"
|
align="center"
|
min-width="80"
|
label="客户名称">
|
</el-table-column>
|
<!-- <el-table-column prop="acctNo"
|
align="center"
|
min-width="180"
|
label="银行卡号">
|
</el-table-column>
|
<el-table-column prop="phone"
|
align="center"
|
min-width="120"
|
label="手机号">
|
</el-table-column>
|
<el-table-column prop="bankName"
|
align="center"
|
min-width="120"
|
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="120"
|
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="transNo"
|
align="center"
|
min-width="220"
|
label="订单号">
|
</el-table-column>
|
<el-table-column prop="transAmount"
|
align="center"
|
min-width="100"
|
label="订单金额">
|
</el-table-column>
|
<el-table-column prop="submitTime"
|
align="center"
|
width="160"
|
label="交易时间">
|
</el-table-column>
|
<el-table-column prop="sn"
|
align="center"
|
min-width="270"
|
label="子订单">
|
</el-table-column>
|
<el-table-column prop="amount"
|
align="center"
|
min-width="100"
|
label="子订单金额">
|
</el-table-column>
|
<el-table-column prop="transSn"
|
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,'transStatus')}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="transResult"
|
align="center"
|
min-width="120"
|
label="备注">
|
</el-table-column>
|
<el-table-column align="center"
|
min-width="100"
|
fixed="right"
|
label="操作">
|
<template slot-scope="scope">
|
<el-button size="mini"
|
@click="refund(scope.row.transNo)">退款</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-pagination @current-change="handleCurrentChange"
|
style="padding: 10px 0px;"
|
background
|
layout="prev, pager, next, jumper"
|
:total.sync="totalPage">
|
</el-pagination>
|
</div>
|
<el-dialog width="80%"
|
title="退款"
|
:visible.sync="maskShow"
|
append-to-body>
|
<my-mask
|
v-on:isCancel="hideMask"></my-mask>
|
</el-dialog>
|
|
</el-dialog>
|
</template>
|
|
<script>
|
import { mapGetters } from "vuex";
|
import MyMask from "./Mask";
|
|
export default {
|
data() {
|
return {
|
maskShow: false,
|
menuItems: [],
|
tableTitle: [
|
"客户名称",
|
"银行卡号",
|
"手机号",
|
"银行名称",
|
"支付公司",
|
"商户号",
|
"交易类型",
|
"订单号",
|
"订单金额",
|
"子订单",
|
"子订单金额",
|
"支付订单号",
|
"交易状态",
|
"备注"
|
],
|
trueMenuItems: [],
|
totalPage: 1,
|
currentPage: 1,
|
dialogVisible: this.value,
|
loading: false
|
};
|
},
|
|
props: {
|
value: {
|
type: Boolean,
|
default: false
|
},
|
transNo: {
|
type: [Number, String],
|
default: ""
|
}
|
},
|
|
watch: {
|
value: function(n) {
|
this.dialogVisible = n;
|
if (n) {
|
this.getMenuData();
|
}
|
}
|
|
// getMenu: function(now, old) {
|
// this.getMenuData();
|
// }
|
},
|
|
components: {
|
MyMask
|
},
|
computed: {
|
...mapGetters(["getMenu"])
|
},
|
|
methods: {
|
// 获取表单数据,通过路由带过来的id等进行ajax请求
|
getMenuData() {
|
const that = this;
|
this.$http
|
.post("trans/getTransDetail", {
|
transNo: this.transNo
|
})
|
.then(Menu => {
|
if (Menu.data.retHeader.retCode === "0000") {
|
that.trueMenuItems = Menu.data.retBody;
|
if (that.trueMenuItems.length >= 10) {
|
that.menuItems = that.trueMenuItems.slice(0, 10);
|
that.handleCurrentChange(that.currentPage);
|
} else {
|
that.menuItems = that.trueMenuItems;
|
}
|
that.totalPage = parseInt(Menu.data.retBody.length);
|
}else {
|
that.totalPage = 0
|
that.menuItems = []
|
this.$message.error(Menu.data.retHeader.retMessage)
|
}
|
})
|
.catch(err => {
|
console.log(err);
|
});
|
},
|
|
// 退款
|
refund() {
|
this.maskShow = true;
|
},
|
|
// 隐藏mask
|
hideMask() {
|
this.maskShow = false;
|
},
|
// 分页
|
handleCurrentChange(val) {
|
this.currentPage = val;
|
const start = (val - 1) * 10;
|
if (parseInt(start) + 10 <= this.trueMenuItems.length) {
|
const end = parseInt(start) + 10;
|
this.menuItems = this.trueMenuItems.slice(start, end);
|
} else {
|
this.menuItems = this.trueMenuItems.slice(start);
|
}
|
},
|
// 关闭按钮
|
close() {
|
this.$emit("input", false);
|
},
|
// 打开退款详情页
|
refund(transNo) {
|
this.maskShow = true;
|
}
|
}
|
};
|
</script>
|
|
|
<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 {
|
color: blue;
|
font-size: 14px;
|
}
|
}
|
}
|
}
|
|
.menuPage {
|
width: 100%;
|
.el-dialog__body {
|
overflow: hidden;
|
}
|
.selectMenu {
|
width: 100%;
|
margin: 30px auto 0px;
|
background-color: #fff;
|
border-radius: 6px;
|
font-size: 14px;
|
height: 480px;
|
padding: 10px;
|
position: relative;
|
.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;
|
> h5 {
|
text-align: center;
|
font-size: 18px;
|
margin: 20px 0px;
|
}
|
.channelMenuTitle {
|
width: 100%;
|
height: 30px;
|
}
|
.add {
|
margin: 10px 0px 5px;
|
}
|
.channelMenuContent {
|
width: 100%;
|
.contentItem {
|
width: 100%;
|
height: 36px;
|
}
|
}
|
}
|
.btn {
|
position: absolute;
|
bottom: 10px;
|
width: 100%;
|
> button {
|
display: block;
|
margin: 16px auto 0px;
|
}
|
}
|
}
|
}
|
</style>
|