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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<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>