<template>
  <el-dialog
    title="退票支付详情"
    :visible.sync="visible"
    width="80%"
    @close="visible=false">
    <el-table
      v-if="data && data.boc_cancel_trade_no"
      border
      :data="[getPayResponse(data.boc_cancel_trade_no)]">
      <el-table-column
        :prop="key"
        :key="key"
        :label="key"
        v-for="(val,key) in getPayResponse(data.boc_cancel_trade_no)"
      >
      </el-table-column>
    </el-table>
    <span slot="footer">
      <el-button @click="visible= false">取消</el-button>
      <el-button
        type="primary"
        @click="visible= false">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { getPayResponse } from '@/utils/posUtils'

export default {
  data () {
    return {
      visible: false,
      data: ''
    }
  },
  methods: {
    getPayResponse,
    show (data) {
      this.data = data
      this.visible = true
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
