<template >
  <div id="stand-work-list" style="height: -webkit-fill-available" class="auto  row flex bg-white p-10">
    <div class="row" style="margin-top:5px;height: auto">
      <p class="bg-info text-center" style="padding: 8px;">基本信息</p>
    </div>
    <div class="panel panel-primary datapanel" style="height: auto;padding-right:20px;">
      <div class="row">
        <div class="col-xs-2">
          <label type="text"  class="form-control mystylecenter" >卡号:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter "> {{row.f_card_id}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >购气次数:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_times}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text"  class="form-control mystylecenter" >用户姓名:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter "> {{row.f_user_name}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用户状态:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter "> {{row.f_table_state}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >建档时间:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_createfile_date}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用户电话:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control  mystylecenter"> {{row.f_user_phone}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用户类型:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_user_type}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用气性质:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_gasproperties}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用气设备:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_devices_type}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >气表品牌:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_meter_brand}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >用户地址:</label>
        </div>
        <div class="col-xs-10">
          <label type="text" class="form-control mystylecenter "> {{row.f_address}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >备注信息:</label>
        </div>
        <div class="col-xs-10">
          <label type="text" class="form-control mystylecenter "> {{row.f_reason}}</label>
        </div>
      </div>
    </div>
    <div class="row" style="margin-top:20px;height: auto">
      <p class="bg-info text-center" style="padding: 8px;">参数信息</p>
    </div>
    <div class="panel panel-primary datapanel" style="height: auto;padding-right:20px;">
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >累计金额:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_total_fee}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >累计气量:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.f_total_gas}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >安检年数:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter"> {{row.anjianyear}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >报废年数:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.baofeiyear}}</label>
        </div>

      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >报警气量:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.onealarm}}/{{row.twoalarm}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >限购上限:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.is_tablelimit}}/{{row.is_tablelimit_gas}}</label>
        </div>

      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >死表关阀:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.is_close}}/{{row.is_close_one}}/{{row.is_close_two}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >单价生效日期:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.pricedate}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >新单价:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.pricenew}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >单价:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_price_name}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >表号:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_meternumber}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >表封号:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_metertitles}}</label>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >计量表编号:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_barcode}}</label>
        </div>
        <div class="col-xs-2">
          <label type="text" class="form-control mystylecenter" >换表时间:</label>
        </div>
        <div class="col-xs-4">
          <label type="text" class="form-control mystylecenter">  {{row.f_changetable_date}}</label>
        </div>
      </div>

    </div>
    <div class="row" style="margin-top:10px;">
      <button  type="button" class="btn btn-info btn-ln fr"  @click="$parent.$parent.cancel()" >关闭</button>
    </div>
  </div>
</template>

<script>
  import vue from 'vue'

  import {HttpResetClass} from 'vue-client'

  export default {
    title: '表具信息',
    // 表相关信息1
    props: ['searchdata'],

    data () {
      return {
        model: null,
        row:{},
        meterInfo:{}
      }
    },
    methods: {
      // 发送请求数据
      search () {
        let http = new HttpResetClass()
        let constr=' 1=1 '
        if(this.searchdata.f_card_id){
          constr=constr+' and '+` f_card_id ='${this.searchdata.f_card_id}' `
        }else if(this.searchdata.f_user_id) {
          constr=constr+' and '+` f_user_id ='${this.searchdata.f_user_id}' `
        }else if(this.searchdata.f_userinfo_id) {
          constr=constr+' and '+` f_userinfo_id ='${this.searchdata.f_userinfo_id}' `
        }else {
          return
        }
        http.load('POST','rs/sql/mange_getMsgByCardId',{data: {condition: constr}},
          {resolveMsg: null, rejectMsg: null}).then((res) => {
          this.row = res.data[0]})
      },
    },
    ready () {
      this.search()
    },
    watch: {

    },
    computed: {
    }
  }
</script>
<style scoped>

  .datapanel {
    color: #111;
    background-color: white;
    box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
    padding: 10px 10px 10px 10px;
    border-radius:15px;
  }
  .mystylecenter{
    border: 0px;
    text-align: center;
    padding-left: 1px;
  }
</style>
