<template>
  <div class="project-tab-content">
    <div class="tab-content">
      <el-form :model="jcFormData" label-width="200px" :disabled="isPreview">
        <el-collapse v-model="activeCollapse">
          <!-- 1. 项目基本信息 -->
          <el-collapse-item title="项目基本信息" name="项目基本信息">
            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="项目名称">
                  <el-input v-model="jcFormData.projectName" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="项目编号">
                  <el-input v-model="jcFormData.projectCode" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="是否再决策">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfzjc"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="项目外文名称">
                  <el-input v-model="jcFormData.projectForeignName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否能建联合体项目">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfnjlhtxm"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="投资主体">
                  <el-input v-model="jcFormData.tzzt" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="是否一体化子项目">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfythzxm"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="直属企业">
                  <el-input v-model="jcFormData.zsqy" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否能建重大或重要投资项目">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfnjzdhzytz"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="决策审批单位">
                  <el-input v-model="jcFormData.spdwmc" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="8">
                <el-form-item label="财务报表类型">
                  <CommonSelector
                    v-model="jcFormData.cwbblx"
                    dictName="cwbblx"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="政府(核准、备案)审批级别">
                  <CommonSelector v-model="jcFormData.spjb" dictName="spjb" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否自主决策">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfzzjc"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="8">
                <el-form-item label="主业/非主业">
                  <CommonSelector v-model="jcFormData.zyfzy" dictName="zyfzy" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row :gutter="24">
              <el-col :span="8">
                <el-form-item label="联系人">
                  <el-input v-model="jcFormData.lxr" />
                </el-form-item>
              </el-col>

              <el-col :span="8">
                <el-form-item label="联系电话">
                  <el-input v-model="jcFormData.lxrdh" />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <!-- <el-collapse-item title="项目基本信息" name="项目基本信息">
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="项目名称">
                  <el-input v-model="jcFormData.projectName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="项目外文名称">
                  <el-input v-model="jcFormData.projectForeignName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="曾用名">
                  <el-input v-model="jcFormData.cym" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="项目编号">
                  <el-input v-model="jcFormData.projectCode" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="申报单位">
                  <el-input v-model="jcFormData.sbdw" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="申报单位企业规格">
                  <CommonSelector
                    v-model="jcFormData.sbdwqygg"
                    dictName="sbdwqygg"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目总投资">
                  <el-input-number
                    v-model="jcFormData.xmztz"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>万元</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="所属直属企业">
                  <el-input v-model="jcFormData.zsqy" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="管理主体">
                  <el-input v-model="jcFormData.glzt" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="投资模式">
                  <el-input v-model="jcFormData.tzms" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="对外签约品牌">
                  <el-input v-model="jcFormData.dwqypp" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否能建重大或重要投资">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfnjzdhzytz"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="能建是否牵头方">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.njsfqtf"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="能建占股比">
                  <el-input-number
                    v-model="jcFormData.njzgb"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>%</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否PPP项目">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfpppxm"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目资金来源">
                  <el-select
                    v-model="jcFormData.xmzjly"
                    multiple
                    placeholder="请选择"
                    no-data-text="暂无数据"
                    clearable
                  >
                    <el-option
                      v-for="item in xmzjlyList"
                      :key="item.key"
                      :label="item.name"
                      :value="item.key"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="商务部项目类型">
                  <CommonSelector
                    v-model="jcFormData.swbxmlx"
                    dictName="swbxmlx"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="国民经济行业">
                  <el-tree-select
                    v-model="jcFormData.gmjjhy"
                    :data="gmjjhyList"
                    node-key="id"
                    :props="gmjjhyProps"
                    placeholder="请选择"
                    render-after-expand
                    clearable
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否自主决策">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfzzjc"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="财务报表类型">
                  <CommonSelector
                    v-model="jcFormData.cwbblx"
                    dictName="cwbblx"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目类型">
                  <CommonSelector v-model="jcFormData.xmlx" dictName="xmlx" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目阶段">
                  <CommonSelector v-model="jcFormData.xmjd" dictName="xmjd" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="主业/非主业">
                  <CommonSelector v-model="jcFormData.zyfzy" dictName="zyfzy" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否已经立项">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfyjlx"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否能建联合体项目">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfnjlhtxm"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否重点区域">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfzdqy"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="重点区域">
                  <el-input v-model="jcFormData.zdqy" />
                </el-form-item>
              </el-col>

              <el-col :span="8">
                <el-form-item label="关联项目">
                  <el-select
                    v-model="jcFormData.glxm"
                    placeholder="请选择"
                    no-data-text="暂无数据"
                    clearable
                  ></el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="联系人">
                  <el-input v-model="jcFormData.lxr" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="联系人电话">
                  <el-input v-model="jcFormData.lxrdh" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="投资回收方式">
                  <CommonSelector
                    v-model="jcFormData.tzhsfs"
                    dictName="tzhsfs"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="成本利润率">
                  <el-input-number
                    v-model="jcFormData.cblrl"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>%</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="未通过主要原因与要求">
                  <el-input
                    v-model="jcFormData.wtgzyyyyyq"
                    type="textarea"
                    :autosize="{ minRows: 2, maxRows: 5 }"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item> -->

          <!-- 2. 项目所在地 -->
          <el-collapse-item title="项目所在地" name="项目所在地">
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="境内/外">
                  <CommonSelector
                    v-model="jcFormData.jnw"
                    dictName="dqlx"
                    @change="changeJcJnw"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="省（境内）/洲际（境外）">
                  <CommonSelector
                    v-model="jcFormData.sjnzjjw"
                    :options="jcSzjList"
                    @change="changeJcSzj"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="地市（境内）/国家（境外）">
                  <CommonSelector
                    v-model="jcFormData.dsjngjjw"
                    :options="jcDsgjList"
                    @change="changeJcDsgj"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="区县(境内)/国家(境外)">
                  <CommonSelector
                    v-model="jcFormData.qxjngjjw"
                    :options="jcQxgjList"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目区域">
                  <CommonSelector v-model="jcFormData.xmqy" dictName="xmqy" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否一带一路沿线国家">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfydylyxgj"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>

          <!-- 3. 计量币种 -->
          <el-collapse-item title="计量币种" name="计量币种">
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="币种">
                  <CommonSelector
                    v-model="jcFormData.bizhong"
                    dictName="bizhong"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="汇率">
                  <el-input
                    v-model="jcFormData.huilv"
                    :min="0"
                    controls-position="right"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>

          <!-- 4. 实施时间 -->
          <el-collapse-item title="实施时间" name="实施时间">
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="项目建设期">
                  <el-input-number
                    v-model="jcFormData.xmjsqy"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>月</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="运营年限">
                  <el-input-number
                    v-model="jcFormData.yynxn"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>年</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>

              <el-col :span="8">
                <el-form-item label="项目合作期">
                  <el-input-number
                    v-model="jcFormData.xmhzqn"
                    :min="0"
                    controls-position="right"
                  >
                    <template #suffix><span>年</span></template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目开工时间（预计）">
                  <el-date-picker
                    v-model="jcFormData.xmkgsjyj"
                    type="date"
                    placeholder="请选择"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="项目交工时间（预计）">
                  <el-date-picker
                    v-model="jcFormData.xmjgsjyj"
                    type="date"
                    placeholder="请选择"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item title="投资分类" name="投资分类">
            <el-row :gutter="20">
              <el-col :span="8">
                <div class="col-title">投资属性分类</div>
                <el-form-item label="一级分类">
                  <CommonSelector
                    v-model="jcFormData.tzsxyjfl"
                    dictName="tzsx"
                    @change="changeJcTzsxyjfl"
                  />
                </el-form-item>
                <el-form-item label="二级分类">
                  <CommonSelector
                    v-model="jcFormData.tzsxejfl"
                    :options="jcTzsxejflList"
                  />
                </el-form-item>
                <el-form-item label="投资板块">
                  <CommonSelector
                    v-model="jcFormData.tzbk"
                    dictName="tzbk"
                    @change="changeJcTzsxtzbk"
                  />
                </el-form-item>
                <el-form-item label="细分板块">
                  <CommonSelector
                    v-model="jcFormData.subsector"
                    :options="jcTzsxxfbkList"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <div class="col-title">投资目的分类</div>
                <el-form-item label="一级分类">
                  <CommonSelector
                    v-model="jcFormData.tzmdyjfl"
                    dictName="tzmd"
                    @change="changeJcTzmdyjfl"
                  />
                </el-form-item>
                <el-form-item label="二级分类">
                  <CommonSelector
                    v-model="jcFormData.tzmdejfl"
                    :options="jcTzmdejflList"
                  />
                </el-form-item>
                <el-form-item label="四新分类">
                  <CommonSelector v-model="jcFormData.sxfl" dictName="sxfl" />
                </el-form-item>
                <!-- <el-form-item label="是否纳入补贴目录">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfnrbtml"
                    dictName="sf"
                  />
                </el-form-item> -->
              </el-col>
              <el-col :span="8">
                <div class="col-title">投资指南分类</div>
                <el-form-item label="2+9布局分类">
                  <CommonSelector
                    v-model="jcFormData.bjfl"
                    dictName="layoutType"
                    @change="changeJcTzznyjfl"
                  />
                </el-form-item>
                <el-form-item label="国民经济行业">
                  <el-tree-select
                    v-model="jcFormData.gmjjhy"
                    :data="gmjjhyList"
                    node-key="id"
                    :props="gmjjhyProps"
                    placeholder="请选择"
                    render-after-expand
                    clearable
                  />
                </el-form-item>
                <!-- <el-form-item label="一级分类">
                  <CommonSelector
                    v-model="jcFormData.tzznyjfl"
                    dictName="tzzn"
                    @change="changeJcTzznyjfl"
                  />
                </el-form-item>
                <el-form-item label="二级分类">
                  <CommonSelector
                    v-model="jcFormData.tzznejfl"
                    :options="jcTzznejflList"
                  />
                </el-form-item>
                <el-form-item label="是否再决策">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfzjc"
                    dictName="sf"
                  />
                </el-form-item>
                <el-form-item
                  label="投资指南分类概述"
                  v-if="jcFormData.tzznyjfl !== 233"
                >
                  <el-input
                    v-model="jcFormData.tzznflgs"
                    type="textarea"
                    :autosize="{ minRows: 2, maxRows: 5 }"
                  />
                </el-form-item> -->
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item
            title="特别关注、特别监管类等信息"
            name="特别关注、特别监管类等信息"
          >
            <el-row :gutter="20">
              <el-col :span="6">
                <el-form-item label="是否需报国家发展改革委和商务部核准">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfxbgjfzggwhswbhz"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="是否国家领导见签">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfgjldjq"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="是否境内特别监管类">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfjntbjgl"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="是否列入国资委负面清单">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sflrgzwfmqd"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item
            title="建设规模（实物量指标）"
            name="建设规模（实物量指标）"
          >
            <!-- <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="高速公路里程">
                  <el-input-number
                    v-model="jcFormData.gsgllc"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>km</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="其他收费公路里程">
                  <el-input-number
                    v-model="jcFormData.qtsfgllc"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>km</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
            </el-row> -->
            <div class="tab-handle">
              <el-button type="primary" size="small" @click="addJcSwlzb"
                >新增</el-button
              >
            </div>
            <el-table
              :data="jcSwlzbData"
              style="width: 100%"
              empty-text="暂无数据"
              border
            >
              <el-table-column type="index" width="50" />
              <el-table-column prop="name" label="指标名称">
                <template #default="scope">
                  <el-input v-model="scope.row.name" />
                </template>
              </el-table-column>
              <el-table-column prop="num" label="数量">
                <template #default="scope">
                  <el-input
                    v-model="scope.row.num"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  />
                </template>
              </el-table-column>
              <el-table-column prop="unit" label="单位">
                <template #default="scope">
                  <el-input v-model="scope.row.unit" />
                </template>
              </el-table-column>
              <el-table-column prop="bcsm" label="补充说明">
                <template #default="scope">
                  <el-input v-model="scope.row.bcsm" type="textarea" />
                </template>
              </el-table-column>
              <el-table-column label="操作" width="60">
                <template #default="scope">
                  <el-button
                    link
                    type="danger"
                    size="small"
                    @click="deleteJcSwlzb(scope.$index)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </el-collapse-item>
          <!-- <el-collapse-item
            title="政府审批（核准、备案）情况"
            name="政府审批（核准、备案）情况"
          >
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="是否已经政府审批">
                  <CommonSelector
                    :radio="true"
                    v-model="jcFormData.sfyjzfsp"
                    dictName="sf"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="审批单位名称（全称）">
                  <el-input v-model="jcFormData.spdwmc" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="审批金额">
                  <el-input-number
                    v-model="jcFormData.spje"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="审批文号">
                  <el-input v-model="jcFormData.pwwh" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="审批级别">
                  <CommonSelector v-model="jcFormData.spjb" dictName="spjb" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="审批时间">
                  <el-date-picker
                    v-model="jcFormData.spsj"
                    type="date"
                    placeholder="请选择"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item> -->
          <el-collapse-item title="股东信息" name="股东信息">
            <div class="tab-handle">
              <el-button type="primary" size="small" @click="addJcGdxx"
                >新增</el-button
              >
            </div>
            <el-table
              :data="jcGdxxData"
              style="width: 100%"
              empty-text="暂无数据"
              border
            >
              <el-table-column
                type="index"
                width="50"
                :index="jcgdxxIndexMethod"
              />
              <el-table-column prop="gdlx" label="股东类型" width="180">
                <template #default="scope">
                  <CommonSelector
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.gdlx"
                    dictName="gdlx"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.name }}
                    </div>
                    <div>合计</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="gdmc" label="股东名称" width="180">
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.gdmc"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column
                prop="mycgbl"
                label="名义持股比例（%）"
                width="180"
              >
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.mycgbl"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.mycgbl }}%
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "mycgbl") }}%</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="cgbl" label="持股比例（%）" width="180">
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.cgbl"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.cgbl }}%
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "cgbl") }}%</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="lrfpbl"
                label="利润分配比例（%）"
                width="180"
              >
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.lrfpbl"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.lrfpbl }}%
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "lrfpbl") }}%</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="cze" label="出资额（万元）" width="180">
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.cze"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.cze }}万元
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "cze") }}万元</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column prop="sffldw" label="是否关联单位" width="80">
                <template #default="scope">
                  <el-switch
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.sffldw"
                    inline-prompt
                    active-value="1"
                    active-text="是"
                    inactive-value="2"
                    inactive-text="否"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column
                prop="yjzczb"
                label="应缴注册资本（万元）"
                width="180"
              >
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.yjzczb"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.yjzczb }}万元
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "yjzczb") }}万元</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="ycxmzbj"
                label="应出项目资本金（万元）"
                width="180"
              >
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.ycxmzbj"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                    @change="changeJcGdxxSums"
                  />
                  <div v-else class="sums-column">
                    <div class="" v-for="(value, key) in jcgdxxSums" :key="key">
                      {{ value.ycxmzbj }}万元
                    </div>
                    <div>{{ getObjSums(jcgdxxSums, "ycxmzbj") }}万元</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="sfwqcnsy"
                label="是否为其承诺收益"
                width="100"
              >
                <template #default="scope">
                  <el-switch
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.sfwqcnsy"
                    inline-prompt
                    active-value="1"
                    active-text="是"
                    inactive-value="2"
                    inactive-text="否"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column
                prop="sfwqtgdbhgcnd"
                label="是否为其提供担保回购承诺等"
                width="130"
              >
                <template #default="scope">
                  <el-switch
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.sfwqtgdbhgcnd"
                    inline-prompt
                    active-value="1"
                    active-text="是"
                    inactive-value="2"
                    inactive-text="否"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column
                prop="sfczmgszqx"
                label="是否存在名股实债情形"
                width="130"
              >
                <template #default="scope">
                  <el-switch
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.sfczmgszqx"
                    inline-prompt
                    active-value="1"
                    active-text="是"
                    inactive-value="2"
                    inactive-text="否"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column prop="bz" label="备注" width="180">
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.bz"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column prop="hzfqk" label="合作方情况" width="180">
                <template #default="scope">
                  <el-input
                    v-if="scope.$index < jcGdxxData.length - 1"
                    v-model="scope.row.hzfqk"
                  />
                  <div v-else></div>
                </template>
              </el-table-column>
              <el-table-column label="操作" width="60" fixed="right">
                <template #default="scope">
                  <el-button
                    v-if="scope.$index < jcGdxxData.length - 1"
                    link
                    type="danger"
                    size="small"
                    @click="deleteJcGdxx(scope.$index)"
                    >删除</el-button
                  >
                  <div v-else></div>
                </template>
              </el-table-column>
            </el-table>
            <el-row :gutter="20">
              <el-col :span="24">
                <el-form-item label-width="160px" label="我方出资人及持股比例">
                  <el-input v-model="jcFormData.wfczrjcgbl" />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label-width="160px" label="涉及能建方施工单位">
                  <el-input v-model="jcFormData.sjnjfsgdw" />
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item
            title="我方担保及股权融资情况"
            name="我方担保及股权融资情况"
          >
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item
                  label-width="170px"
                  label="我方负责的股权融资金额"
                >
                  <el-input-number
                    v-model="jcFormData.wffzdgqrzjewy"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label-width="170px" label="融资成本">
                  <el-input-number
                    v-model="jcFormData.rzcbgq"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>%</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label-width="170px" label="期限">
                  <el-input-number
                    v-model="jcFormData.qxgq"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>年</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label-width="170px" label="担保金额">
                  <el-input-number
                    v-model="jcFormData.dbje"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item
            title="我方担保及债权融资情况"
            name="我方担保及债权融资情况"
          >
            <div class="tab-handle">
              <el-button type="primary" size="small" @click="addDbzq"
                >新增</el-button
              >
            </div>
            <el-table
              :data="dbzqData"
              style="width: 100%"
              empty-text="暂无数据"
              border
            >
              <el-table-column type="index" width="50" />
              <el-table-column prop="wffzdzqrzjewy" label="金额">
                <template #default="scope">
                  <el-input-number
                    v-model="scope.row.wffzdzqrzjewy"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </template>
              </el-table-column>
              <el-table-column prop="rzcbzq" label="融资成本">
                <template #default="scope">
                  <el-input-number
                    v-model="scope.row.rzcbzq"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>%</span>
                    </template>
                  </el-input-number>
                </template>
              </el-table-column>
              <el-table-column prop="qxzq" label="期限">
                <template #default="scope">
                  <el-input-number
                    v-model="scope.row.qxzq"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>年</span>
                    </template>
                  </el-input-number>
                </template>
              </el-table-column>
              <el-table-column prop="yjldsjzq" label="预计落地时间">
                <template #default="scope">
                  <el-date-picker
                    v-model="scope.row.yjldsjzq"
                    type="date"
                    placeholder="请选择"
                  />
                </template>
              </el-table-column>
              <el-table-column label="操作" width="60">
                <template #default="scope">
                  <el-button
                    link
                    type="danger"
                    size="small"
                    @click="deleteDbzq(scope.$index)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </el-collapse-item>
          <el-collapse-item title="工程带动情况" name="工程带动情况">
            <el-row :gutter="20">
              <el-col :span="8">
                <el-form-item label="带动工程合同额">
                  <el-input-number
                    v-model="jcFormData.ddgchte"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="投资带动比">
                  <el-input-number
                    v-model="jcFormData.tzddb"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>%</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="工程利润">
                  <el-input-number
                    v-model="jcFormData.gclrwy"
                    :min="0"
                    :max="99999999999.99999999"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>万元</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="工程利润率">
                  <el-input-number
                    v-model="jcFormData.gclrl"
                    :min="0"
                    :max="99999.99"
                    controls-position="right"
                  >
                    <template #suffix>
                      <span>%</span>
                    </template>
                  </el-input-number>
                </el-form-item>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item title="项目内容及必要性" name="项目内容及必要性">
            <el-col :span="24">
              <el-form-item label="建设内容及规模">
                <el-input
                  v-model="jcFormData.jsnrjgm"
                  type="textarea"
                  :autosize="{ minRows: 2, maxRows: 5 }"
                />
              </el-form-item>
            </el-col>
            <el-form-item label="项目必要性">
              <el-input
                v-model="jcFormData.xmbyx"
                type="textarea"
                :autosize="{ minRows: 2, maxRows: 5 }"
              />
            </el-form-item>
            <el-form-item label="其他说明">
              <el-input
                v-model="jcFormData.qtsm"
                type="textarea"
                :autosize="{ minRows: 2, maxRows: 5 }"
              />
            </el-form-item>
          </el-collapse-item>
          <el-collapse-item title="风险管理" name="风险管理">
            <div class="tab-handle">
              <el-button type="primary" size="small" @click="addFxgl"
                >新增</el-button
              >
            </div>
            <el-table
              :data="fxglData"
              style="width: 100%"
              empty-text="暂无数据"
              border
            >
              <el-table-column type="index" width="50" />
              <el-table-column prop="fxlb" label="风险类别">
                <template #default="scope">
                  <el-input v-model="scope.row.fxlb" />
                </template>
              </el-table-column>
              <el-table-column prop="fxms" label="风险描述">
                <template #default="scope">
                  <el-input v-model="scope.row.fxms" type="textarea" />
                </template>
              </el-table-column>
              <el-table-column prop="ydcs" label="应对措施">
                <template #default="scope">
                  <el-input v-model="scope.row.ydcs" type="textarea" />
                </template>
              </el-table-column>
              <el-table-column label="操作" width="60">
                <template #default="scope">
                  <el-button
                    link
                    type="danger"
                    size="small"
                    @click="deleteFxgl(scope.$index)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </el-collapse-item>
          <el-collapse-item title="里程碑节点" name="里程碑节点">
            <div class="tab-handle">
              <el-button type="primary" size="small" @click="addLcbjd"
                >新增</el-button
              >
            </div>
            <el-table
              :data="lcbjdData"
              style="width: 100%"
              empty-text="暂无数据"
              border
            >
              <el-table-column type="index" width="50" />
              <el-table-column prop="lcbjdmc" label="里程碑节点名称">
                <template #default="scope">
                  <el-input v-model="scope.row.lcbjdmc" />
                </template>
              </el-table-column>
              <el-table-column prop="jdwcms" label="节点完成描述">
                <template #default="scope">
                  <el-input v-model="scope.row.jdwcms" type="textarea" />
                </template>
              </el-table-column>
              <el-table-column prop="yjwcsj" label="预计完成时间">
                <template #default="scope">
                  <el-date-picker
                    v-model="scope.row.yjwcsj"
                    type="date"
                    placeholder="请选择"
                  />
                </template>
              </el-table-column>
              <el-table-column label="操作" width="60">
                <template #default="scope">
                  <el-button
                    link
                    type="danger"
                    size="small"
                    @click="deleteLcbjd(scope.$index)"
                    >删除</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
            <el-form-item label="里程碑计划审批表" :label-width="130">
              <FileUploader v-model="jcFormData.tpbgjcsb" />
            </el-form-item>
          </el-collapse-item>
          <el-collapse-item title="投评决策资料" name="投评决策资料">
            <el-form-item label="可研材料">
              <FileUploader v-model="kyclData" />
            </el-form-item>

            <el-form-item label="经济指标初步测算资料">
              <FileUploader v-model="jjzbcsData" />
            </el-form-item>

            <el-form-item label="补充相关支撑材料">
              <FileUploader v-model="tpbczcclData" />
            </el-form-item>

            <el-form-item label="其他相关支撑材料">
              <FileUploader v-model="tpzcclData" />
            </el-form-item>

            <el-form-item label="上会议案">
              <FileUploader v-model="shyaData" />
            </el-form-item>
          </el-collapse-item>
        </el-collapse>
      </el-form>
    </div>
  </div>
</template>

<script setup>
import { inject } from "vue";
import CommonSelector from "@/components/CommonSelector.vue";
import FileUploader from "@/components/FileUploader/index.vue";

const {
  jcFormData,
  formData,
  isPreview,
  activeCollapse,
  jcSwlzbData,
  jcGdxxData,
  jcgdxxSums,
  dbzqData,
  fxglData,
  lcbjdData,
  lcbspData,
  lcbspSelectIds,
  kyclData,
  kyclSelectIds,
  jjzbcsData,
  jjzbcsSelectIds,
  tpbczcclData,
  tpbczcclSelectIds,
  tpzcclData,
  tpzcclSelectIds,
  shyaData,
  shyaSelectIds,
  jcztshqkData,
  tzztshqkData,
  jcspyjData,
  downloadFile,
  ElMessageBox,
  addJcSwlzb,
  deleteJcSwlzb,
  addJcGdxx,
  deleteJcGdxx,
  changeJcGdxxSums,
  getObjSums,
  jcgdxxIndexMethod,
  addDbzq,
  deleteDbzq,
  addFxgl,
  deleteFxgl,
  addLcbjd,
  deleteLcbjd,
  addLcbspFile,
  deleteLcbsp,
  lcbspSelectionChange,
  multiDeleteLcbsp,
  addKyclFile,
  deleteKycl,
  kyclSelectionChange,
  multiDeleteKycl,
  addJjzbcsFile,
  deleteJjzbcs,
  jjzbcsSelectionChange,
  multiDeleteJjzbcs,
  addTpbczcclFile,
  deleteTpbczccl,
  tpbczcclSelectionChange,
  multiDeleteTpbczccl,
  addTpzcclFile,
  deleteTpzccl,
  tpzcclSelectionChange,
  multiDeleteTpzccl,
  addShyaFile,
  deleteShya,
  shyaSelectionChange,
  multiDeleteShya,
  addJcztshqk,
  deleteJcztshqk,
  addJcztshqkFile,
  deleteJcztshqkFile,
  addTzztshqk,
  deleteTzztshqk,
  addTzztshqkFile,
  deleteTzztshqkFile,
  addJcspyj,
  deleteJcspyj,
  addJcspyjFile,
  deleteRowFile,
  changeJcJnw,
  changeJcSzj,
  changeJcDsgj,
  changeJcTzsxyjfl,
  changeJcTzsxtzbk,
  changeJcTzmdyjfl,
  changeJcTzznyjfl,
  xmzjlyList,
  jcSzjList,
  jcDsgjList,
  jcQxgjList,
  jcTzsxejflList,
  jcTzsxxfbkList,
  jcTzmdejflList,
  jcTzznejflList,
  gmjjhyList,
  gmjjhyProps,
  windowConfig,
  token,
} = inject("jcShared");
</script>
