<template>
  <div class="app-container">
    <div>
      <div class="tab-header webtop">
        <div>【查看】项目信息</div>
        <div>
          <el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
        </div>
      </div>
      <div class="listconadd" style="padding-bottom: 50px;">
        <el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
          <div class="titwu">项目信息表</div>
          <div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
            <div>主体信息</div>
          </div>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">项目名称</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                <span>{{temp.entryName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">所属行业</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                 <span>{{temp.industryName}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">项目类型</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                 <span>{{temp.typeName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">授信额度</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                <span>{{temp.creditLimit}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">贷款行</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                 <span>{{temp.bankName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">客户经理</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                 <span>{{temp.bmanagerName}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">接洽日期</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" >
              <el-form-item class="trightb_item">
                 <span>{{temp.engaDate}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">签约日期</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" >
              <el-form-item class="trightb_item">
                 <span>{{temp.signingDate}}</span>
              </el-form-item>
            </el-col>

          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">项目单位</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
               <el-form-item class="trightb_item">
              <span>{{temp.enterpriseName}}</span>
               </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
               <el-form-item class="trightb_item">
               <span slot="label">项目联系人</span>
                </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
               <span>{{temp.econtacts}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">项目说明</span>
              </el-form-item>
            </el-col>
            <el-col :span="20">
              <el-form-item class="trightb_item">
                <span>{{temp.remarks}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">监管负责人</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                <span>{{temp.regulatoryLeader}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">事业部经理</span>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item class="trightb_item">
                <span>{{temp.generalManager}}</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">结束日期</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" >
              <el-form-item class="trightb_item">
                 <span>{{temp.endDate}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">填表日期</span>
              </el-form-item>
            </el-col>
            <el-col :span="8" >
              <el-form-item class="trightb_item">
                <span>{{temp.fillInDate}}</span>
              </el-form-item>
            </el-col>

          </el-row>
          <el-row>
            <el-col :span="4" class="trightb">
              <el-form-item class="trightb_item">
                <span slot="label">关联仓库</span>
              </el-form-item>
            </el-col>
            <el-col :span="20">
              <el-form-item class="trightb_item">
                <div class="Images" v-for="(item,i) in temps"  :key="i" v-show="item.name">
                    <a :href="'http://jianguan.yyundong.com/warehouse/#/pictureList/pictureList?id='+item.shSid" target="_blank">
                    <img v-if="item.picUrl" :src="item.picUrl" alt="">
                    <img v-else src="../../assets/images/notAvailable.jpg" alt="" />
                    <p><u class="Atext">{{ item.name }}</u></p>
                  </a>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

      </div>
    </div>
  </div>
</template>

<script>
  import req from '@/api/project/project'

  export default {
    name: 'CustomerManagementInfo',
    data() {
      return {
        temp: {}, // 添加和修改
        temps:{},
      }
    },
    created() {

    },
    methods: {
    showAdd(sid) {
      req.fetchBySid(sid)
        .then(resp => {
          if (resp.success) {
            this.temp = resp.data
          }

        })
        .catch(e => {
          this.$emit('doback')
        })
        
      req.getStorehouseBySid(sid).then((res) => {
        if (res.success) {
          this.temps=res.data
        }
    })
    },
    // 组件返回
    handleReturn() {
      this.$emit('doback')
    },
    }
  }
</script>
<style scoped>
  .trightb {
    display: flex;
    align-items: center;
    text-align: ;
    justify-content: center;
  }

  .trightb_item {
    padding-top: 5px;
  }

  .span {
    margin-left: 50px;
    font-size: 15px;
    font-weight: 400;
  }

  /deep/ .el-collapse-item__header {
    height: 40px;
    padding: 10px;
    font-weight: bold;
    font-size: 20px;
    text-align: left;
    color: #ffffff;
    background-color: #0294d7;
  }

  /deep/ .el-collapse-item__content {
    padding-bottom: 0;
  }
  .Images{
    width: 150px;
    height: 100px;
    float: left;
    margin: 10px 20px 40px 10px;
  }
  .Images img{
    width: 100%;
    height: 100%;
  }
  .Images:hover p{
    color: #018ad2;
    text-decoration: underline;
  }
  .Images p{
    color: #000;
    text-align: center;
    margin-top: -15px;
  }
  .Images p .Atext{
    text-decoration: none;
  }
</style>
