<template>
    <div>
        <div class="headers">
            <div class="headers-left">
                <div class="imgs">

                </div>
                <div class="img-right">
                    <div class="name-title">微育科技</div>
                    <div class="right-name">数智科创 · 通达未来 </div>
                </div>
            </div>
            <div class="headers-right">
                <div class="rights">
                  

                    添加费用支出
                   

                </div>
            </div>
        </div>
        
        <div class="contents">
            <div class="content-left">
                
                <div class="content-lefts">
                    <div class="leftss">
                        <div class="leftss-header">
                            <div>添加费用支出</div>
                            <div @click="btnEdint"> <el-button size="small"
                                    style="background-color: #5165f7;color:white;">保存提交</el-button>
                                    <el-button size="small"
                                    @click="closeguan"
                                    style="width: 82px;">取消</el-button>
                            </div>
                        </div>
                        <div class="table-area" >
                            <div class="table-header">
                                <div>
                                    <span class="times"> 支付信息｜  </span>
                                </div>
                               
                            </div>
                        </div>
                    </div>
                    <div class="content-table">
                       <div class="content-areas">
                         <div class="contents-left">
                           <span style="margin-left: 20px;">费用类型</span>
                         </div>
                         <div class="contents-right">
                            <span style="margin-left: 20px;">出版/文献/信息传播/知识产权事务费</span>
                         </div>
                       </div>
                       <div class="content-areas content-areas2">
                         <div class="contents-left">
                           <span style="margin-left: 20px;">关联合同</span>
                         </div>
                         <div class="contents-right">
                            <span style="margin-left: 20px;">合同编号+名称</span>
                         </div>
                       </div>
                       <div class="content-areas content-areas2">
                         <div class="contents-left">
                           <span style="margin-left: 20px;">摘要信息</span>
                         </div>
                         <div class="contents-right">
                            <span style="margin-left: 20px;"> <el-input v-model="input" placeholder="请输入内容"></el-input></span>
                         </div>
                       </div>
                       <div class="content-areas content-areas2">
                         <div class="contents-left">
                           <span class="table-name">付款时间</span>
                         </div>
                         <div class="contents-right">
                            <div class="rightss rightss1"><span class="table-name"> <el-date-picker
                                style="width: 88%;"
                                v-model="value1"
                               
                                placeholder="选择日期时间">
                                </el-date-picker>  </span></div>
                            <div class="rightss rightss2"><span class="table-name">凭证号</span></div>
                            <div class="rightss rightss3" ><span class="table-name">
                                <el-input v-model="input" placeholder="请输入内容" style="width: 70%;"></el-input>
                            </span></div>
                         </div>
                       </div>
                       <div class="content-areas content-areas2" style="top: 4px;">
                         <div class="contents-left" style="border-top: none;">
                           <span class="table-name">合计会计凭证金额（元）</span>
                         </div>
                         <div class="contents-right" style="border: none;">
                            <div class="rightss rightss1" ><span class="table-name">
                               111
                            </span></div>
                            <div class="rightss rightss2" style="border-top: none;"><span class="table-name">合计属于本项目支出金额（元）</span></div>
                            <div class="rightss rightss3" ><span class="table-name">
                                222
                            </span></div>
                         </div>
                       </div>
                       <div class="content-areas" style="position: relative;top: 5px;">
                         <div class="contents-left">
                           <span style="margin-left: 20px;">收款单位或人</span>
                         </div>
                         <div class="contents-right">
                            <span style="margin-left: 20px;">
                                <el-input v-model="input" placeholder="请输入内容" style="width: 70%;"></el-input>
                            </span>
                         </div>
                       </div>
                     
                     
                    </div>
                    
              
                    <div class="pingzherngs">
                        <div class="table-area" >
                            <div class="table-header">
                                <div>
                                    <span class="times"> 凭证信息｜ </span>  <el-tooltip effect="dark" content="凭证信息" placement="top-start">
                                            <i style="color: #D6D8EA;position: relative;top: 3px;" class="el-icon-info"></i>
                                            </el-tooltip>
                                </div>
                               
                            </div>
                        </div>
                        <div style="margin-top: 20px;"><el-button type="primary" size="mini" style="background: #5165f7;">添加</el-button></div>
                    </div>
                    <div style="width: 90%;margin: 0 auto;margin-top: 20px;">
                        <el-table
                        :data="tableData"
                        border
                        style="width: 100%">
                        <el-table-column
                        align="center"
                        prop="date"
                        label="上传凭证"
                        width="180">
                        <el-upload
                           
                           
                            action="https://jsonplaceholder.typicode.com/posts/"
                            :show-file-list="false"
                            :on-success="handleAvatarSuccess"
                            :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                            </el-upload>
                        </el-table-column>
                        <el-table-column
                           align="center"
                        prop="name"
                        label="会计凭证记载金额（元）"
                        width="180">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>

                        <el-table-column
                           align="center"
                        prop="address"
                        label="属于本项目支出金额（元）">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>
                    </el-table>
                    </div>
                    <div class="pingzherngs">
                        <div class="table-area" >
                            <div class="table-header">
                                <div>
                                    <span class="times"> 付款清单｜选填 </span>  <el-tooltip effect="dark" content="凭证信息" placement="top-start">
                                            <i style="color: #D6D8EA;position: relative;top: 3px;" class="el-icon-info"></i>
                                            </el-tooltip>
                                </div>
                               
                            </div>
                        </div>
                        <div style="margin-top: 20px;"><el-button type="primary" size="mini" style="background: #5165f7;">添加</el-button></div>
                    </div>
                    <div style="width: 90%;margin: 0 auto;margin-top: 20px;">
                        <el-table
                        :data="tableData"
                        border
                        style="width: 100%">
                        <el-table-column
                        align="center"
                        prop="date"
                        label="付款清单项"
                        width="180">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>
                        <el-table-column
                           align="center"
                        prop="name"
                        label="数量"
                        width="180">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>

                        <el-table-column
                           align="center"
                        prop="address"
                        label="金额（元）">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>
                        <el-table-column
                           align="center"
                        prop="address"
                        label="备注">
                        <el-input v-model="input" placeholder="请输入内容"></el-input>
                        </el-table-column>
                    </el-table>
                    </div>
                </div>
                
            </div>
            <div class="content-right">

                <div class="leftss-header right-header">
                    <div class="header-area">
                        <div class="area-name" v-for="(item,index) in listDate" 
                        :key="index"
                        @click="btnNmae(index)"
                        :class="{'active':active ==index}"
                        >
                            {{item.name }}
                        </div>
                      
                    </div>
                    <div> <el-button size="small" style="color:#5165f7;">
                           解析中</el-button>
                    </div>
                </div>
                <div class="right-area"></div>

            </div>
        </div>

    </div>
</template>
<script>
export default {
    data() {
        return {
            active:0,
            listDate:[
                {
                    name:'凭证材料'
                },
               
            ],
            value1:"",
            yuanright: 0,
            tables: [
                {
                    name: '有效'
                },
                {
                    name: '无效'
                },
            ],
            shu: 0,
           
            lastActiveKey: 'headerActiveIndex',
            tableData: [
                {
                    date: "其中",
                    name: "",
                    address: "",
                    children: [
                        { date: "2024", name: "年度审计报告及财务情况说明书", address: "8000" },
                        { date: "2025", name: "年度审计报告及财务情况说明书", address: "7500" },
                      
                    ],
                },
                { date: "其他项目", name: "5000", address: "4000" },
            ],

            tableData2: [
       
            { date: "2025", name: "年度审计报告及财务情况说明书", address: "7500" },]
        }
    },

    created() {

    },

    watch: {

    },

    methods: {
        //取消
        closeguan(){
            this.$router.go(-1)
        },
        btnNmae(e){
            this.active=e
        },
        //切换时效性
        btnYuan(e) {
            this.yuanright = e
        },
        //编辑跳转
        btnEdint() {
            
        },
        btnShang() {
            this.$router.push('/annual')
        }

    }
}
</script>
<style>
.el-tooltip__popper.is-dark {
    color: #F04B4B !important;
    background: #FCF1EB !important;
}

.el-tooltip__popper .popper__arrow {
    border-top-color: #FCF1EB !important;
    /* 上方箭头 */
}

.el-tooltip__popper .popper__arrow::after {
    border-top-color: #FCF1EB !important;
}

/* 其他方向的箭头（按需添加） */
.el-tooltip__popper[x-placement^='bottom'] .popper__arrow {
    border-bottom-color: #FCF1EB !important;
}

.el-tooltip__popper[x-placement^='left'] .popper__arrow {
    border-left-color: #FCF1EB !important;
}

.el-tooltip__popper[x-placement^='right'] .popper__arrow {
    border-right-color: #FCF1EB !important;
}
</style>
<style scoped>
.area-name{
margin-left: 30px;
cursor: pointer;
}
.active{
   
    border-bottom: 3px solid #5165f7;
    height: 45px;
}
.header-area{
    display: flex;
    position: relative;
    left: -30px;
}
.rightss3{
    border-right: none;
    border-left: none;
}
.table-name{
    margin-left: 20px;
}
.rightss2{
    background: #EDEFFE;
}
.rightss1{
    border-left: none !important;
    border-right: none !important;
   
}
.rightss{
    height: 100%;
    border: 1px solid #DCE0FD;
    width: 100%;
    border-top: none;

}
.content-areas2{
    position: relative;
    top: 1px;

}
.contents-right{
    flex: 1;
    border: 1px solid #DCE0FD;
    line-height: 50px;
    font-size: 14px;
    color: #363636;
    display: flex
}
.contents-left{
    width: 30%;
    border: 1px solid #DCE0FD;
    background: #EDEFFE;;
    line-height: 50px;
    font-size: 14px;
    color: #363636;
    
}
.content-areas{
    display: flex;
    height: 50px;
    flex-wrap: wrap;
}
.tab-area{
    margin-top: 24px;
}
.namess{
    color: #5B5E72;
    font-size: 13px;
    margin-left: 12px;
}
.names{
    font-size: 14px;
    color: #363636;
}
:deep .el-tooltip__popper.is-dark {
    color: #F04B4B !important;
}

.right-area {
    width: 90%;
    margin: 0 auto;
    height: 80vh;
    background: #f8f8f8;
}

.right-header {
    width: 90%;
    margin: 0 auto;
}

.ths {
    text-align: center;
    background: #DCE0FD !important;
    color: #363636;
}

.tou {
    height: 30px;
    line-height: 30px;
    color: #606266;
    text-align: center;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.financial-table th,
.financial-table td {
    border: 1px solid #ddd;
    padding: 8px 7px;
    text-align: center;
}

.financial-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.financial-table .nested-label {
   
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}

.table-right {
    flex: 1;
}

.table-left {
    flex: 1;
}

.content-table {
   
    width: 90%;
    margin: 0 auto;
    margin-top: 14px;
}

/* 默认情况（有效）左边圆角 */
.left-radius {
    border-bottom-left-radius: 16px !important;
    border-top-left-radius: 16px !important;
}

/* 无效情况右边圆角 */
.right-radius {
    border-bottom-right-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.yuan-left {
    flex: 1;
    text-align: center;
    line-height: 30px;
    background: #f8f8f8;
    /* border-bottom-left-radius: 16px;
    border-top-left-radius: 16px; */
    cursor: pointer;
}

.yuanright {
    flex: 1;
    background: #5165f7;
    color: white;

    /* border-bottom-right-radius: 16px;
    border-top-right-radius: 16px;  */
    text-align: center;
    line-height: 30px;
    cursor: pointer;

}

.youxiaos {
    position: relative;
    top: 6px;
    left: -12px;
    cursor: pointer;
}

/* 修改.yuan的样式，移除外层圆角 */
.yuan {
    width: 100px;
    height: 30px;
    background: white;
    display: flex;
    font-size: 14px;
    overflow: hidden;
    /* 关键：确保内部div的圆角效果不被截断 */
}

/* 默认状态下两个按钮的外侧圆角 */
.yuan-left:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.yuan-left:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* 选中状态样式 */
.yuanright {
    background: #5165f7;
    color: white;
}

/* 选中"有效"时的样式 */
.yuan-left.left-radius {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* 选中"无效"时的样式 */
.yuan-left.right-radius {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}


.times {
    position: relative;
    top: 3px;
}

.youxiao {
    color: #5B5D76;
    font-size: 13px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.table-area {
    margin-top: 12px;
    font-size: 15px;
}

.leftss-header {
    display: flex;
    height: 60px;
    line-height: 60px;
    border-bottom: 1px solid #3333;
    font-weight: bold;
    justify-content: space-between;
}

.leftss {
    width: 90%;
    margin: 0 auto;
}

.content-lefts {
    background: white;
    height: 100%;
    width: 100%;
}

.content-left {
  flex: 1;
  padding-right: 12px;
  min-height: 100%;  /* 确保最小高度填满父容器 */
}

.content-right {
    width: 600px;
    min-height: 100%;
    background: white;
}

.contents {
    width: 100%;
  min-height: calc(100vh - 70px);  /* 70px 是 headers 的高度 */
  background: #f8f8f8;
  display: flex;
  margin-top: 6px;
}

.pingzherngs{
    width: 90%;
    margin: 0px auto;
    margin-top: 20px;
    display: flex
;
    justify-content: space-between;
}
.shu {
    width: 3px;
    height: 18px;
    background: #5165f7;
    position: relative;
    display: inline-block;
    top: 7px;
}

::v-deep .el-table thead {
    background-color: #DCE0FD !important;
    color: #363636 !important;
    font-weight: bold;
}

::v-deep .el-table__header th {
    background-color: #DCE0FD !important;
    color: #363636 !important;
    font-weight: bold;
}




.rights {
    width: 96%;
    height: 100%;
    margin: 0 auto;
    line-height: 88px;
    display: flex;
    position: relative;
    left: 32vw;
    top: -6px;
}

.name-title {
    position: relative;
    top: -6px;
    font-weight: bold;
}

.right-name {
    font-size: 12px;
}

.img-right {
    font-size: 14px;
    position: relative;
    top: 35px;
    height: 40px;
    margin-left: 12px;
}

.imgs {
    width: 42px;
    height: 40px;
    background: #5165f7;
    border-radius: 6px;
    position: relative;
    top: 26px;
    margin-left: 24px
}

.headers-right {
    flex: 1;
    background: white;
   
}

.headers-left {
    width: 222px;
    height: 100%;
    display: flex;
    background: white;
}

.headers {
    width: 100%;
    height: 70px;
    display: flex;
}





.patent-container {
      max-width: 1000px;
      margin: 0 auto;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      overflow: hidden;
    }
    .patent-header {
      background: linear-gradient(135deg, #6a5acd, #8a7dff);
      color: white;
      padding: 20px 30px;
      text-align: center;
    }
    .patent-header h1 {
      font-size: 24px;
      margin-bottom: 10px;
      font-weight: 600;
    }
    .patent-header p {
      opacity: 0.9;
      font-size: 14px;
    }
    .search-box {
      padding: 15px 30px;
      background-color: #f8f9fa;
      border-bottom: 1px solid #eaeaea;
    }
    .search-box input {
      width: 100%;
      padding: 10px 15px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
      transition: border-color 0.3s;
    }
    .search-box input:focus {
      outline: none;
      border-color: #8a7dff;
      box-shadow: 0 0 0 2px rgba(138, 125, 255, 0.2);
    }
    .patent-table {
      width: 100%;
      border-collapse: collapse;
    }
    .patent-table th {
      background-color: #f0e6ff;
      color: #5a4fcf;
      padding: 12px 15px;
      text-align: left;
      font-weight: 600;
      border-bottom: 1px solid #ddd;
    }
    .patent-table td {
      padding: 12px 15px;
      border-bottom: 1px solid #f0f0f0;
      transition: background-color 0.2s;
    }
    .patent-table tr:hover td {
      background-color: #f9f7ff;
    }
    .patent-table tr:last-child td {
      border-bottom: none;
    }
    .status-badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 500;
    }
    .status-paid {
      background-color: #e8f5e9;
      color: #2e7d32;
    }
    .patent-footer {
      padding: 15px 30px;
      text-align: center;
      color: #777;
      font-size: 14px;
      border-top: 1px solid #eaeaea;
      background-color: #fafafa;
    }


    .shu{
  width: 10px;
    height: 20px;
    background: #5165f7;
    position: relative;
    top: -24px;
    left: 40%;
}
.active{
    color: #5165f7 !important;
}
.rights-names{
    margin-left: 32px;
    cursor: pointer;
}
.rights{
    width: 96%;
    height: 100%;
    margin: 0 auto;
    line-height: 94px;
    display: flex;
    position: relative;
    left: -27px;
    display: flex;
    justify-content: center;
}
.name-title{
    position: relative;
    top: -6px;
    font-weight: bold;
}
.right-name{
    font-size: 12px;
}
.img-right{
    font-size: 14px;
    position: relative;
    top: 40px;
    height: 40px;
    margin-left: 12px;
}
.imgs{
    width: 45px;
    height: 46px;
    background: #5165f7;
    border-radius: 6px;
    position: relative;
    top: 26px;
    margin-left: 24px
}
.headers-right{
    flex: 1;
    background: white;
  
}
.headers-left{
    width: 222px;
    height: 100%;
    display: flex;
    background: white;
    border-right: 1px solid #EDEFFE;
}
.headers{
  width: 100%;
    height: 90px;
    display: flex
;
    border-bottom: 1px solid #EDEFFE;
}
</style>