<template>
  <div class="body1">
    <p class="title">商家概况</p>
    <div class="img_span1">
      <span v-for="(item,index) in img_data " :key="index"  @click="onPreview(item.url)">{{item.name}}（{{item.url.length}}）</span>
      <el-image-viewer
        v-if="showViewer"
        :on-close="closeViewer"
        :url-list="img_url"
        :z-index="9999"
      />
    </div>
    <p class="p_info">托管方类型：机构托管</p>
    <p class="p_info">机构名称：{{contentDatas.shop_data.firm_name}}</p>
    <p class="p_info">统一社会信用代码：{{contentDatas.shop_data.credit_code}}</p>
    <p class="p_info">主体类型：{{contentDatas.shop_data.main_type}}</p>
    <p class="p_info">注册资本：{{contentDatas.shop_data.reg_money}}</p>
    <p class="p_info">法定代表人：{{contentDatas.shop_data.legal_name}}</p>
    <p class="p_info">住所：{{contentDatas.shop_data.domicile}}</p>
    <p class="p_info">成立日期：{{contentDatas.shop_data.establish_time | formatDate}}</p>
    <p class="p_info">
      内部决策情况：
      <el-radio v-model="contentDatas.asset_data.decision" :label="1">个人同意</el-radio>
      <el-radio v-model="contentDatas.asset_data.decision" :label="2">股东会决议</el-radio>
      <el-radio v-model="contentDatas.asset_data.decision" :label="3">董事会决议</el-radio>
      <el-radio v-model="contentDatas.asset_data.decision" :label="4">总经理办公会决议</el-radio>
      <el-radio v-model="contentDatas.asset_data.decision" :label="5">其他</el-radio>
      <el-input v-model="contentDatas.asset_data.decision_case" v-if="contentDatas.shop_data.decision==5" placeholder="请输入其他情况" class="listing_input"></el-input>
    </p>
  </div>
</template>
<script>
export default {
  components: {
    ElImageViewer: () => import('element-ui/packages/image/src/image-viewer')
  },
  props:{
    contentDatas:{
      require: true
    }
  },
  data() {
    return{
      img_data:[],
      showViewer:false,
      img_url:[]
    }
  },
  methods:{
    onPreview(img) {
      this.img_url = img
      this.showViewer = true
    },
    // 关闭查看器
    closeViewer() {
      this.showViewer = false
    },
    //时间戳转换时间
    formatDate(row,colnum){
        return moment(row[colnum.create_time]).format('YYYY-MM-DD HH:mm:ss')
    },
  },
  created(){
    this.img_data=[{name:'营业执照',url:[this.contentDatas.shop_data.business_license]},{name:'法人代表证明书',url:[this.contentDatas.shop_data.legal_certificate]},
      {name:'法人身份证件',url:[this.contentDatas.shop_data.legal_card]},{name:'法人授权委托书',url:[this.contentDatas.shop_data.legal_authorization]},
      {name:'经办人身份证',url:[this.contentDatas.shop_data.operator_card]},{name:'银行开户证明',url:[this.contentDatas.shop_data.bank_account_certificate]},
      {name:'资产托管权属承诺函',url:[this.contentDatas.shop_data.asset_trusteeship]},{name:'其他要求文件',url:[this.contentDatas.shop_data.else_file]},
    ]
  }
}
</script>
<style scoped>
  @import url('../../../../assets/css/sidebar.css');
</style>
