<template>
  <el-dialog
    :title="'公司详情'"
    :center="true"
    align="left"
    top="20vh"
    width="600px"
    @close="showModelThis = false"
    :close-on-click-modal="false"
    :visible.sync="showModelThis"
    v-loading="loading"
    element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
  >
    <el-card style="margin-top:-20px">
      <el-row :gutter="10">
        <el-col :span="24">
          <el-form
           label-position="right" :size="'mini'"   label-width="110px"
            :model="ruleForm"
            ref="ruleForm"
          >
            <el-row>
              <el-col :span="24">
                <el-form-item label="公司名称：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.companyName }}</div>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="纳税人识别号：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.invoice_code }}</div>
                </el-form-item>
              </el-col>

              <el-col :span="24">
                <el-form-item label="银行名称：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.invoice_bank }}</div>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="银行卡号：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.invoice_bankNo }}</div>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="发票纳税人：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.invoice_people }}</div>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系电话：" style="margin:0 0 10px 0">
                  <div>{{ ruleForm.invoice_mobile }}</div>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系地址：" style="margin: 0">
                  <div >{{ ruleForm.invoice_addr }}</div>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-col>
      </el-row>
    </el-card>
  </el-dialog>
</template>
   <script>
import resToken from "@/mixins/resToken";
export default {
  name: "goodsBack",
  props: ["showModel", "sitem"],
  mixins: [resToken],
  data() {
    return {
      loading: false,
      showModelThis: this.showModel,
      ruleForm: {},
    };
  },
  watch: {
    showModel: function (val) {
      this.showModelThis = val;
      if (val) {
        this.initForm();
      }
    },
    showModelThis(val) {
      if (!val) {
        this.$emit("cancel");
      }
    },
  },
  methods: {
    
    async initForm() {
      this.loading = true;
      await this.resetForm();
      this.loading = false;
    },
   
    async resetForm() {
      await this.$nextTick(() => {
        if (this.$refs.ruleForm) {
          this.$refs.ruleForm.resetFields();
          this.$refs.ruleForm.clearValidate();
          this.ruleForm = this.sitem;
        }
      });
    },

  
  },
};
</script>

   <style lang="scss" scoped>
.storeAnomaly {
  // width: calc( 100% - 110px);
}
</style>
   