<template>
  <div class="auto">
    <partial-view v-ref:pv>
      <div class="row">
        <label class = "col-sm-3 control-label">用户姓名:</label>
        <span class = "col-sm-3">{{model.f_user_name}}</span>
        <label class="col-sm-3 control-label">用户编号:</label>
        <span class = "col-sm-3">{{model.f_userinfo_id}}</span>
      </div>
      <div class="row">
        <label class = " col-sm-3 control-label">收费类型:</label>
        <span class = "col-sm-3">{{model.f_charge_type}}</span>
        <label class="col-sm-3 control-label">收费金额:</label>
        <span class = "col-sm-3">{{model.f_collection}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-3 control-label">撤销人:</label>
        <span class = "col-sm-3">{{data.f_operator}}</span>
        <label class = "col-sm-3">原操作编号:</label>
        <span class = "col-sm-3">{{data.f_cancel_record_id}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-3 control-label">撤销原因:</label>
        <span class = "col-sm-9">{{data.f_cancel_reason}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-3 control-label">撤销时间:</label>
        <span class = "col-sm-9">{{data.f_operate_date}}</span>
      </div>
    </partial-view>
  </div>
</template>

<script>
  export default {
    title: '其他收费撤销详情',
    props: ['data'],
    data () {
      return {
        model: {}
      }
    },
    ready () {
      let sql = 'otherChange'
      let condition = {
        id: this.data.f_cancel_record_id,
        f_userinfo_id: this.data.f_userinfo_id + ''
      }
      this.$info(`加载数据中, sqlname:${sql}`)
      this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: {condition: condition}}}).then((a) => {
        this.model = a.data
        this.$info(`加载数据成功, model:${JSON.stringify(this.model)}`)
      }).catch((error) => {
        if (error.status) {
          this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
          return
        }
        throw error
      })
    }
  }
</script>
