zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
    <div class="static">
        <el-dialog title="失败详情"
               width="80%"
               ref="dialog"
               id="detail"
               @close="close"
               :visible.sync="dialogVisible">
            <div class="clearfix">
                <div class="title">
                    <span>支付公司: {{payCompany}}</span>
                    <span>商户号: {{info.merId}}</span>
                    <span>交易: {{enumerMap(info.transType,'transType')}}</span>
                    <span>笔数: {{info.failCount}}</span>
                    <el-button type="primary" size="medium" icon="el-icon-download" @click="print">导出</el-button>
                </div>
                <el-table :data="tableData.list"
                        v-loading="loading"
                        border
                        class="table">>
                    <el-table-column prop="transTime"
                                    align="center"
                                    min-width="80"
                                    label="交易日期">
                    </el-table-column>
                    <el-table-column prop="acctName"
                                    align="center"
                                    label="姓名">
                    </el-table-column>
                    <el-table-column prop="idNo"
                                    align="center"
                                    min-width="100"
                                    label="身份证号">
                    </el-table-column>
                    <el-table-column prop="bankName"
                                    align="center"
                                    label="银行名称">
                    </el-table-column>
                    <el-table-column prop="acctNo"
                                    align="center"
                                    min-width="100"
                                    label="银行卡">
                    </el-table-column>
                    <el-table-column prop="phone"
                                    align="center"
                                    label="手机号">
                    </el-table-column>
                    <el-table-column prop="retCode"
                                    align="center"
                                    label="返回代码">
                    </el-table-column>
                    <el-table-column prop="retMessage"
                                    align="center"
                                    label="描述">
                    </el-table-column>
                </el-table>
 
                <el-pagination @current-change="handleCurrentChange"
                            layout="total,prev, pager, next, jumper"
                            style="margin: 10px 0px;"
                            background
                            :total.sync="tableData.totalSize">
                </el-pagination>
            </div>
        </el-dialog>
    </div>
</template>
 
<script>
import { statisticsFailDetail, exportStatisticsFail } from "@/assets/api/api";
 
export default {
    name: "analysisDetail",
 
    props: {
        value: {
            type: String,
            default: ""
        },
        info: {
            type: Object,
            default() {
                return {};
            }
        },
        failInfo: {
            type: Object,
            default() {
                return {};
            }
        },
        payCompany: {
            type: String,
            default: ""
        }
    },
 
    data() {
        return {
            dialogVisible: false,
            tableData: [],
            loading: false,
            searchData: {
                transDate: null,
                companyId: null,
                merId: null,
                transType: null,
                retCode: null,
                retMessage: null,
                page: 1,
                pageSize: 10
            }
        };
    },
 
    watch: {
        value: async function (n) {
            this.dialogVisible = n === "analysisDetail" ? true : false;
            if (this.dialogVisible) {
                this.searchData.transDate = this.info.transDate
                this.searchData.companyId = this.info.companyId
                this.searchData.merId = this.info.merId
                this.searchData.transType = this.info.transType
                this.searchData.retCode = this.failInfo.retCode
                this.searchData.retMessage = this.failInfo.retMessage
 
                let res = await statisticsFailDetail(this.searchData);
                if (res.data.retHeader.retCode === '0000') {
                    this.tableData = res.data.retBody;
                } else {
                    this.tableData = { totalSize: 0, list: [] }
                }
            }
        }
    },
 
    methods: {
        // 关闭
        close() {
            this.$emit("input", "");
        },
        // 分页
        async handleCurrentChange(val) {
            this.searchData.page = val
            let res = await statisticsFailDetail(this.searchData);
            this.tableData = res.data.retBody;
        },
 
        // excel导出
        async print() {
            exportStatisticsFail(this.searchData)
        },
    }
};
</script>
 
<style lang="less" scoped>
#detail {
  .title {
    width: 100%;
    line-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
</style>