<template>
  <modal  v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
    <header slot="modal-header" class="modal-header">
      <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
    </header>
    <article slot="modal-body" class="modal-body clearfix">
      <div class="form-group" >
        <div style="height: auto;text-align: center" class="col-sm-12">
          <span style="color: red;font-family: 微软雅黑;font-weight: bold;font-size: 18px">请注意被退回原因为:{{data.f_back_reason}} 退回时间：{{data.f_date}}</span>
        </div>
      </div>
    </article>
    <footer slot="modal-footer" class="modal-footer">
    </footer>
  </modal>
</template>
<script>
import {HttpResetClass} from 'vue-client'

export default {
  title: '退回原因展示',
  props: ['selectdata'],
  data () {
    return {
      data: null,
      showButModal:false
    }
  },
  methods: {
    closeModal(){
      this.showButModal=false
    }
  },
  async created () {
    let data = {
      tablename: 't_backcause',
      condition: `actid = '${this.selectdata.actid}' and f_process_id = '${this.selectdata.f_process_id}'`
    }
    let http = new HttpResetClass()
    let res = await http.load(
      'POST',
      `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
      {data: data}, {
        resolveMsg: null,
        rejectMsg: '退回原因查询失败！！！'
      })
    this.data = res.data[0]
    if(this.data){
      this.showButModal=true
    }

  }
}
</script>
