<template>
    <div class="panel panel-info auto">
      <div class="panel-heading auto" style="height: 35px">
        <h4 style="margin-top: auto">气量核对</h4>
      </div>
      <div class="auto info-content" style="height:auto" v-if="pared != 0">
        <div class="row">
          <label class = "col-sm-4 ">核对项</label>

          <label class = "col-sm-6">值</label>
        </div>
        <div class="row"  info-content v-for="row in model">
          <label class = "col-sm-4 " >{{row.字段名}}:</label>
          <label class = "col-sm-6" >{{row.值}}</label>
        </div>
      </div>
  </div>
</template>

<script>
  import {HttpResetClass} from 'vue-client'
  let checkGas = async function (self) {
    let temp = {data:[]}
    try {
      let http = new HttpResetClass()
      temp = await http.load('POST', 'rs/sql/sale_checkGas', {data: {id: self.data.f_userinfo_id}}, {resolveMsg: null, rejectMsg: null})
    } catch (error) {
    }
    self.model = temp.data
    self.pared = temp.data.length
  }
export default {
    title: '气量核对',
    data () {
      return {
        model: {},
        pared: 0
      }
    },
    props: ['data'],
    ready () {
      checkGas(this)
    },
    watch: {
      'data' () {
        if (this.data == null) {
          this.model = {}
        } else {
          checkGas(this)
        }
      }
    }

}
</script>
