<template>
  <div class="home_wrapper">
    <!--  头部开始  -->
    <div class="header">
      <div class="header_left" @click="onClickLeft">
        <img src="../../../../static/images/agriculturalTrusteeship/return.png">
        <p>需求详情</p>
      </div>
    </div>
    <!--  头部结束  -->

    <!--  内容开始  -->
    <div class="main">
      <div class="main_content_right_list">
        <div class="main_tit">
          <i></i>
          <p>{{stockBase.economicName}}</p>
        </div>
        <p class="main_content">{{stockBase.remark}}</p>
        <div class="main_money">
          <p><span>需求金额</span><span>￥</span>{{stockBase.financeAmount}}</p>
        </div>
        <van-divider />

        <van-field
          readonly
          label="负责人"
          input-align="right"
          :border="false"
          placeholder="负责人"
          v-model="stockBase.legalPerson"
        />

        <van-field
          readonly
          label="联系方式"
          input-align="right"
          :border="false"
          placeholder="联系方式"
          v-model="stockBase.legalPersonPhone"
        />

        <van-field
          readonly
          label="地址"
          input-align="right"
          :border="false"
          placeholder="地址"
          v-model="stockBase.shareholdersAddress"
        />

      </div>
      <div class="main_content_right_list2">
        <div>
          <p>托管农户数（户）</p>
          <p>{{depositTghtNum}}</p>
        </div>
        <div>
          <p>托管面积（亩）</p>
          <p>{{depositArea}}</p>
        </div>
      </div>
    </div>
    <!--  内容结束  -->

  </div>
</template>
<script>
  import Cookies from "js-cookie";
  import {subjectDetail} from "@/api/agriculturalTrusteeship";
  export default {
    name: "shopOrganizationDetail",
    data() {
      return {
        stockBase:{},
        depositTghtNum:'',
        depositArea:'',
      };
    },
    created() {
      this.getDetail();
    },
    methods: {
      getDetail(){
        subjectDetail(this.$route.query.id,{translate_dict:1}).then(response => {
          this.stockBase = response.data.stockBase;
          this.depositTghtNum = response.data.depositTghtNum;
          this.depositArea = response.data.depositArea;
        });
      }
    },
  }
</script>
<style scoped lang="scss">
.home_wrapper{
  background: #f9f9f9;
  height: 100vh;
  overflow: hidden;
}
  /*头部*/
  .header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
    padding: 2vh 4% 2vh;
    .header_left{
      display: flex;
      align-items: center;
      p{
        font-size: .4rem;
        color: #ffffff;
        line-height: 1;
        margin-left: 10PX;
      }
    }
    .header_right{
      font-size: .35rem;
      background: #334281;
      padding: 2PX 10PX;
      border-radius: 50PX;
      /deep/ .van-checkbox__icon--checked .van-icon{
        color: #334281;
      }
      /deep/ .van-checkbox__label{
        color: #ffffff;
      }
      /deep/ .van-checkbox__icon .van-icon{
        width: .9em;
        height: .9em;
        line-height: .9em;
      }
      /deep/ .van-icon-success::before{
        width: .9em;
        height: .9em;
      }
      /deep/ .van-checkbox__icon{
        height: auto;
      }
    }
  }

  .main_btn{
    display: flex;
    background: #ffffff;
    border-top-left-radius: 25PX;
    border-top-right-radius: 25PX;
    overflow: hidden;
    padding: 4vw 4% 0;
    justify-content: space-between;
    .btn_box_01{
      width: 48%;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1Px dashed #4E7FFF;
      color: #4E7FFF;
      font-size: .35rem;
      line-height: 15vw;
      border-radius: 10Px;
      p:first-child{
        font-weight: bold;
        margin-right: 5PX;
      }
    }
    .btn_box_02{
      width: 48%;
      display: flex;
      justify-content: center;
      align-items: center;
      background: rgba(78,127,255,0.17);
      color: #1E49BB;
      font-size: .35rem;
      line-height: 15vw;
      border-radius: 10Px;
      p{
        margin-left: 5PX;
      }
    }
  }

  .serviceName{
    display: flex;
    align-items: center;
    justify-content: space-between;
    span{
      background: #E8E8E8;
      padding: 0 8PX;
      border-radius: 5PX;
      color: #7A7A7A;
      margin-right: 5PX;
    }
    .active{
      background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
      color: #ffffff;
    }
  }

  .nav{
    background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
    padding-bottom: 15PX;
    .tt{
      font-size: .45rem;
      color: #334281;
    }
    .content{
      background: #ffffff;
      width: 92%;
      margin: 0 auto;
      box-shadow: 0px 0px 10PX rgba(0,0,0,0.1);
      border-radius: 25PX;
      padding: 1.5vh 4%;
    }
    /deep/ .van-cell{
      padding: 0;
      margin-bottom: 10PX;
      &:last-child{
        margin: 0;
      }
    }
  }

  /* 内容 */
  .main{
    background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4);
    background-size: 100% 20PX;
    background-repeat: no-repeat;
    /deep/ .van-tabs__nav{
      border-top-left-radius: 25PX;
      border-top-right-radius: 25PX;
      overflow: hidden;
      background: #f9f9f9;
    }
    /deep/ .van-tabs__line{
      background: #334281!important;
    }
    /deep/ .van-tab--active{
      color: #334281;
    }
    /deep/ .van-tabs__content{
      background: #f9f9f9;
      padding-top: 2vh;
    }
    .search{
       display: flex;
       justify-content: space-between;
       align-items: center;
       width: 92%;
       margin: 0PX auto;
       border: 1px solid #6E93F3;
       padding: 1PX 1PX 1PX 12PX ;
       border-radius: 50PX;
       input{
         flex: 1;
         background: transparent;
         margin-left: 10PX;
       }
    }
    .content{
      width: 92%;
      margin: 0 auto;
      margin-top: 2vh;
      .content_tt{
        font-size: .35rem;
      }
      .content_con{
        display: flex;
        justify-content: space-between;
        margin-top: 1.5vh;
        .content_con_left{
          display: flex;
          flex-direction:column;
          justify-content: space-between;
          p{
            font-size: .35rem;
            padding-left: 18PX;
            &:nth-child(1){
              background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_project.png") no-repeat left center;
            }
            &:nth-child(2){
              background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_name.png") no-repeat left center;
            }
            &:nth-child(3){
              background: url("../../../../static/images/agriculturalTrusteeship/insurance/insurance_list_iphone.png") no-repeat left center;
            }
          }
        }
        .content_con_right{
          display: flex;
          justify-content: end;
          align-items: center;
          img{
            border-radius: 10PX;
            width: 40%;
            margin-left: 5%;
            box-shadow: 0px 5PX 10PX rgba(0,0,0,0.2);
            &:last-child{
              width: auto;
              box-shadow: none;
            }
          }
        }
      }
    }
    .main_content_right_list{
      margin: 0 auto;
      margin-bottom: 2vh;
      width: 92%;
      background: #ffffff;
      padding: 15PX 3%;
      border-radius: 10Px;
      box-shadow: 0px 5PX 10PX rgba(0,0,0,0.1);
      text-align: center;
      /deep/ .van-cell{
        padding: 0;
        margin-bottom: 10PX;
        &:last-child{
          margin: 0;
        }
      }
      .main_content{
        font-size: .35rem;
        line-height: .7rem;
        margin-top: 10PX;
        text-align: left;
      }
      .main_tit{
        color: #4E7FFF;
        font-size: .38rem;
        display: flex;
        align-items: center;
        i{
          display: block;
          width: 16PX;
          height: 16PX;
          margin-right: 5PX;
          flex-shrink: 0;
          background: url("../../../../static/images/agriculturalTrusteeship/insurance/shop_needs_icon01.png");
        }
        p{
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          word-break: break-all;
          overflow: hidden;
        }
        span{
          font-size: .3rem;
          color: #8B8B8B;
          flex-shrink: 0;
        }
      }
      .main_money{
        background: rgba(255,94,0,0.15);
        display: inline-block;
        padding: 5PX 15PX;
        border-radius: 8PX;
        margin: 10PX auto;
        p{
          &:nth-child(1){
            color: #FF5E00;
            font-size: .4rem;
            span{
              font-size: .3rem;
            }
          }
          &:nth-child(2){
            color: #8B8B8B;
            font-size: .35rem;
          }
        }
        span:nth-child(1){
          margin-right: 5PX;
        }
      }
    }
    .main_content_right_list2{
      margin: 0 auto;
      margin-bottom: 2vh;
      width: 92%;
      display: flex;
      justify-content: space-between;
      div{
        box-shadow: 0px 5PX 10PX rgba(0,0,0,0.1);
        width: 48%;
        background: #ffffff;
        text-align: center;
        padding: 10PX 0;
        border-radius: 10Px;
        p{
          &:nth-child(1){
            font-size: .38rem;
            color: #8B8B8B;
          }
          &:nth-child(2){
            font-size: .4rem;
            color: #4E7FFF;
            margin-top: 10PX;
          }
        }
      }

    }
  }
</style>
