<template>
  <div class="from-table font-line-space">
    <div v-if="tabsData[0].isShow">
      <a-form-model ref="form" :model="formData" :rules="rules" style="border-top: 0px">
        <a-row>
          <a-col :span="24" style="border-top: 0px">
            <div class="tb-title">
              <span>单位基本情况</span>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>单位名称</div>
            </div>
          </a-col>
          <a-col :span="21">
            <div class="special-middle">
              <div>
                <a-form-model-item>
                  <div>{{ formData.appUnitName }}</div>
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>注册单位类型</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item>
                  医疗机构
                </a-form-model-item>
                <!-- <a-form-model-item prop="unitType">
                <a-input placeholder="注册单位类型" v-model="formData.unitType" :maxLength="100" style="width:80%" />
              </a-form-model-item> -->
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">组织机构代码/统一社会信用代码</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="organizationCode">
                  <a-input placeholder="组织机构代码/统一社会信用代码" v-model="formData.organizationCode" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">通讯地址</div>
            </div>
          </a-col>
          <a-col :span="21">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="unitAddress">
                  <a-input placeholder="通讯地址" v-model="formData.unitAddress" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">注册所在地(县/区)</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="registeredAddress">
                  <a-input placeholder="注册所在地" v-model="formData.registeredAddress" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">邮编</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="postCode">
                  <a-input placeholder="邮编" v-model="formData.postCode" :maxLength="10" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">法定代表人</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="legalPerson">
                  <a-input placeholder="法定代表人" v-model="formData.legalPerson" :maxLength="50" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">职工总数</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="workforce">
                  <a-input-number v-model="formData.workforce" :min="0" :step="1" style="width: 100px" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">其中专科以上人员</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="specializedPersonnel">
                  <a-input-number v-model="formData.specializedPersonnel" :min="0" :step="1" style="width: 100px" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">研究开发人员</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="researchPersonnel">
                  <a-input-number v-model="formData.researchPersonnel" :min="0" :step="1" style="width: 100px" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">开户银行</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="depositBank">
                  <a-input placeholder="开户银行" v-model="formData.depositBank" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">银行账号</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="bankAccount">
                  <a-input placeholder="银行账号" v-model="formData.bankAccount" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">开户银行地址</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="depositBankAddress">
                  <a-input placeholder="开户银行地址" v-model="formData.depositBankAddress" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">银行联行号</div>
            </div>
          </a-col>
          <a-col :span="9">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="interbankNumber">
                  <a-input placeholder="开户银行地址" v-model="formData.interbankNumber" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="24" style="border-top: 0px">
            <div class="tb-title">
              <span>项目负责人</span>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>姓名</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.appPersonName }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>性别</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.sex }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>出生日期</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ moment(formData.birthday).format('YYYY-MM-DD') }}
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>证件类型</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                身份证
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>证件号码</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.certId }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>民族</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.nationName }}
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>职称</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.titleName }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>从事专业</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.specName }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目分工</div>
            </div>
          </a-col>
          <a-col :span="5">
            <a-form-model-item prop="projWork">
              <a-input v-model="formData.projWork" :maxLength="20" placeholder="项目分工" style="width: 60%" />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>学位</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.degreeName }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>职务</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.dutyName }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>传真</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="fax">
                  <a-input v-model="formData.fax" :maxLength="20" placeholder="传真" style="width: 60%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>手机</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.mobile }}
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>联系电话</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="telephone">
                  <a-input v-model="formData.telephone" :maxLength="20" placeholder="联系电话" style="width: 60%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="3" class="bg-gray">
            <div class="special-middle">
              <div>电子邮箱</div>
            </div>
          </a-col>
          <a-col :span="5">
            <div class="special-middle">
              <div>
                {{ formData.email }}
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="24" style="border-top: 0px">
            <div class="tb-title">
              <span>项目基本情况</span>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目编号</div>
            </div>
          </a-col>
          <a-col :span="20">
            <a-form-model-item prop="projNo">
              <div>{{ formData.projNo }}</div>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目名称</div>
            </div>
          </a-col>
          <a-col :span="20">
            <a-form-model-item prop="projName">
              <div>{{ formData.projName }}</div>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">所属我省重点领域</div>
            </div>
          </a-col>
          <a-col :span="20">
            <a-form-model-item prop="keyAreas">
              <a-input placeholder="所属我省重点领域" v-model="formData.keyAreas" :maxLength="50" style="width: 80%" />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项日开始时间</div>
            </div>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="startDate" style="width:200px;display: inline-block;">
              <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.startDate" style="width: 180px" />
            </a-form-model-item>
          </a-col>
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目结束时间</div>
            </div>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="endDate" style="width:200px;display: inline-block;">
              <a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="formData.endDate" style="width: 180px" />
            </a-form-model-item>
          </a-col>
        </a-row>
        <!-- <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div class="required">项目负责人</div>
          </div>
        </a-col>
        <a-col :span="8">
          <div class="special-middle">
            <div>
              {{  formData.appPersonName }}
            </div>
          </div>
        </a-col>
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div class="required">联系电话</div>
          </div>
        </a-col>
        <a-col :span="8">
          <div class="special-middle">
            <div>
              {{  formData.mobile }}
            </div>
          </div>
        </a-col>
      </a-row> -->
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目联系人姓名</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="unitLinkName">
                  <a-input placeholder="项目联系人姓名" v-model="formData.linkName" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">联系人电话</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="unitLinkMobile">
                  <a-input placeholder="联系人电话" v-model="formData.linkMobile" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">传真</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="unitLinkFax">
                  <a-input placeholder="传真" v-model="formData.linkFax" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">电子信箱</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="unitLinkEmail">
                  <a-input placeholder="电子信箱" v-model="formData.linkEmail" :maxLength="100" style="width:80%" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>

        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">项目总经费（万元）</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="isTechnologyReport">
                  {{formData.totalFunding}}
                </a-form-model-item>
              </div>
            </div>
          </a-col>
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">财政经费（万元）</div>
            </div>
          </a-col>
          <a-col :span="8">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="isTechnologyReport">
                  {{formData.govFunding}}
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">是否科技报告</div>
            </div>
          </a-col>
          <a-col :span="20">
            <div class="special-middle">
              <div>
                <a-form-model-item prop="isTechnologyReport">
                  <base-select v-model="formData.isTechnologyReport" :type="12" :isAll="true" :width="120" />
                </a-form-model-item>
              </div>
            </div>
          </a-col>
        </a-row>
        <a-row type="flex">
          <a-col :span="4" class="bg-gray">
            <div class="special-middle">
              <div class="required">科技报告类型</div>
            </div>
          </a-col>
          <a-col :span="20">
            <div class="special-middle">
              <div>
                <span style="margin:0 6px 0 6px;">立项报告</span><a-input-number v-model="formData.projectReport" :min="0" :step="1" style="width: 60px" />
                <span style="margin:0 6px 0 24px;">进展报告</span><a-input-number v-model="formData.progressReport" :min="0" :step="1" style="width: 60px;" />
                <span style="margin:0 6px 0 24px;">专题报告</span><a-input-number v-model="formData.specialReport" :min="0" :step="1" style="width: 60px" />
                <span style="margin:0 6px 0 24px;">最终报告</span><a-input-number v-model="formData.finalReport" :min="0" :step="1" style="width: 60px" />
              </div>
            </div>
          </a-col>
        </a-row>
      </a-form-model>
      <!-- 项目主要参与单位及分工 -->
      <participate-units-info :dataList.sync="formData.participateUnits" />
    </div>
    <div v-if="tabsData[1].isShow">
      <a-row>
        <a-col :span="24" style="border-top: 0px">
          <div class="main-title">
            <span>项目人员情况</span>
          </div>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="24" style="border-top: 0px">
          <div class="tb-title">
            <span>项目负责人</span>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>姓名</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.appPersonName }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>性别</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.sex }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>出生日期</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ moment(formData.birthday).format('YYYY-MM-DD') }}
            </div>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>证件类型</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              身份证
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>证件号码</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.certId }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>民族</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.nationName }}
            </div>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>职称</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.titleName }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>从事专业</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.specName }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>学位</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.degreeName }}
            </div>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>职务</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.dutyName }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>电话</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.mobile }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>电子邮箱</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.email }}
            </div>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>个人通讯地址</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.address }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>工作单位</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.appUnitName }}
            </div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>每年工作时间(月)</div>
          </div>
        </a-col>
        <a-col :span="5">
          <div class="special-middle">
            <div>
              {{ formData.jobTime }}
            </div>
          </div>
        </a-col>
      </a-row>
      <!-- 项目组成员 -->
      <project-member-info :dataList.sync="formData.members" />
      <a-row type="flex">
        <a-col :span="24" style="text-align: center;">
          <div class="special-middle">
            &nbsp;
          </div>
        </a-col>
      </a-row>
      <a-row type="flex" class="row_center">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>总人数</div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>高级</div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>中级</div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>初级</div>
          </div>
        </a-col>
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>博士后</div>
          </div>
        </a-col>
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>博士生</div>
          </div>
        </a-col>
        <a-col :span="3" class="bg-gray">
          <div class="special-middle">
            <div>硕士生</div>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex" class="row_center">
        <a-col :span="4">
          <div class="special-middle">
            <div>
              {{ formData.memCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="3">
          <div class="special-middle">
            <div>
              {{ formData.memHighCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="3">
          <div class="special-middle">
            <div>
              {{ formData.memMiddleCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="3">
          <div class="special-middle">
            <div>
              {{ formData.memLowCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="4">
          <div class="special-middle">
            <div>
              {{ formData.memBshCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="4">
          <div class="special-middle">
            <div>
              {{ formData.memBsCount }}
            </div>
          </div>
        </a-col>
        <a-col :span="3">
          <div class="special-middle">
            <div>
              {{ formData.memSsCount }}
            </div>
          </div>
        </a-col>
      </a-row>
    </div>
    <div v-if="tabsData[2].isShow">
      <a-row>
        <a-col :span="24" style="border-top: 0px">
          <div class="main-title">
            <span>项目主要实施内容和目标</span>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>项目实施目标</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.researchContent)"></div>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="24" style="border-top: 0px">
          <div class="tb-title">
            <span>项目考核指标</span>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>主要技术指标</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.technologyTarget)"></div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>主要经济指标</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.economyTarget)"></div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>项目实施中形成的示范基地、中试线、生产线及其规模等</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.achievementTarget)"></div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>科技报告考核指标</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.technologyReportsTarget)"></div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="4" class="bg-gray">
          <div class="special-middle">
            <div>其他应考核的指标</div>
          </div>
        </a-col>
        <a-col :span="20">
          <div v-html="toTextarea(formData.otherTarget)"></div>
        </a-col>
      </a-row>
    </div>
    <div v-if="tabsData[3].isShow">
      <a-row>
        <a-col :span="24" style="border-top: 0px">
          <div class="main-title">
            <span>申请书正文</span>
          </div>
        </a-col>
      </a-row>
      <a-row type="flex">
        <a-col :span="24" class="bg-gray">
          <div class="special-middle" style="font-weight: bold;text-align: center;">
            <document-view :fileUrl="formData.downloadUrl" :fileName="formData.fileName" :imageArray="[formData.downloadUrl]" v-if="!!formData.downloadUrl"></document-view>
          </div>
        </a-col>
      </a-row>
    </div>
    <div v-if="tabsData[4].isShow">
      <!-- 经费预算 -->
      <budget-info :budget.sync="formData.budget" />
      <a-row type="flex">
        <a-col :span="24" style="text-align: center;">
          <div class="special-middle">
            &nbsp;
          </div>
        </a-col>
      </a-row>
      <!-- 分年度用款计划 -->
      <fund-plan-info :fundPlan.sync="formData.fundPlan" />
      <!-- 设备费-购置设备预算明细表 -->
      <device-info :deviceList.sync="formData.deviceList" />
      <!-- 设备费-试制设备预算明细表 -->
      <manufacture-info :manufactureList.sync:="formData.manufactureList" />
      <!-- 项目承担单位研究资金支出预算明细表 -->
      <unit-payment-info :unitPayment.sync="formData.unitPayment" />
    </div>
    <div v-if="tabsData[5].isShow">
      <!-- 项目安排及阶段目标 -->
      <proj-stage-goals-info :stageGoals.sync="formData.stageGoals" />
    </div>
    <div v-if="tabsData[6].isShow">
      <!-- 项目课题设置 -->
      <project-sub-info :dataList.sync="formData.projectSubList" />
    </div>
    <div v-if="tabsData[7].isShow">
      <project-kpi-info v-if="formData.projectKPI" :projectKPI.sync="formData.projectKPI" />
    </div>
    <div v-if="tabsData[8].isShow">
      <!-- 附件 -->
      <file-info :fileList.sync="formData.fileList" />
    </div>
  </div>
</template>

<script>

import { isEmptyParams } from "@/views/utils/common"
import moment from 'moment'
import cooperativeUnitsInfo from '@/views/report/project/components/cooperativeUnitsInfo'
import participateUnitsInfo from '@/views/report/project/components/participateUnitsInfo'
import projectMemberInfo from '@/views/report/project/components/projectMemberInfo'
import projectKpiInfo from '@/views/report/project/components/projectKpiInfo.vue'
import budgetInfo from '@/views/report/project/components/budgetInfo'
import fundPlanInfo from '@/views/report/project/components/fundPlanInfo'
import unitPaymentInfo from '@/views/report/project/components/unitPaymentInfo'
import deviceInfo from '@/views/report/project/components/deviceInfo'
import manufactureInfo from '@/views/report/project/components/manufactureInfo'
import projStageGoalsInfo from "@/views/report/project/components/projStageGoalsInfo";
import projectSubInfo from '@/views/report/project/components/projectSubInfo'
import fileInfo from "@/views/report/project/components/fileInfo";
import { toTextarea } from '@/views/utils/common'

export default {
  name: 'projectEdit',
  components: {
    cooperativeUnitsInfo, projectMemberInfo, projectKpiInfo, budgetInfo, fundPlanInfo, unitPaymentInfo, deviceInfo, manufactureInfo, fileInfo, projStageGoalsInfo, projectSubInfo, participateUnitsInfo
  },
  props: {
    value: {
      type: String,
      default: () => {
        return null
      }
    },
    tabsData: {
      type: Array,
      default: () => {
        return []
      }
    },
  },
  data () {
    return {
      formData: {
        id: null,
        appPersonName: null,
        sex: null,
        birthday: null,
        nationName: null,
        degreeName: null,
        titleName: null,
        mobile: null,
        email: null,
        appUnitName: null,
        unitLinkName: null,
        unitLinkMobile: null,
        unitLinkEmail: null,
        unitLinkFax: null,
        projName: null,
        knowledgeId: null,
        startDate: null,
        endDate: null,
        jobTime: null,
        mainResearchAreas: null,
        address: null,
        subjectScope: null,
        projClass: null,
        projAbstract: null,
        projKeywords: null,
        totalFunding: null,
        govFunding: null,
        unitFunding: null,
        selfFunding: null,
        researchContent: null,
        technologyTarget: null,
        economyTarget: null,
        achievementTarget: null,
        otherTarget: null,
        remark: null,
        yearTarget: null,
        year1Goal: null,
        year2Goal: null,
        year3Goal: null,
        cooperativeUnits: [],
        participateUnits: [],
        members: [],
        budget: [],
        fundPlan: [],
        deviceList: [],
        manufactureList: [],
        unitPayment: [],
        stageGoals: [],
        projectSubList: [],
        fileList: [],
        auditList: [],
        managerDept: null,
        organizationCode: null,
        unitAddress: null,
        registeredAddress: null,
        postCode: null,
        legalPerson: null,
        workforce: null,
        specializedPersonnel: null,
        researchPersonnel: null,
        depositBank: null,
        bankAccount: null,
        depositBankAddress: null,
        interbankNumber: null,
        projWork: null,
        fax: null,
        telephone: null,
        keyAreas: null,
        startDate: null,
        endDate: null,
        linkName: null,
        linkMobile: null,
        linkEmail: null,
        linkFax: null,
        isTechnologyReport: null,
      },
      rules: {
        organizationCode: [{ required: true, message: '请填写统一社会信用代码', trigger: 'blur' },],
        unitAddress: [{ required: true, message: '请填写通讯地址', trigger: 'blur' },],
        registeredAddress: [{ required: true, message: '请填写注册所在地', trigger: 'blur' },],
        postCode: [{ required: true, message: '请填写邮编', trigger: 'blur' },],
        legalPerson: [{ required: true, message: '请填写法定代表人', trigger: 'blur' },],
        workforce: [{ required: true, message: '请填写职工总数', trigger: 'blur' },],
        specializedPersonnel: [{ required: true, message: '请填写其中专科以上人员', trigger: 'blur' },],
        researchPersonnel: [{ required: true, message: '请填写研究开发人员', trigger: 'blur' },],
        depositBank: [{ required: true, message: '请填写开户银行', trigger: 'blur' },],
        bankAccount: [{ required: true, message: '请填写银行账号', trigger: 'blur' },],
        depositBankAddress: [{ required: true, message: '请填写开户银行地址', trigger: 'blur' },],
        interbankNumber: [{ required: true, message: '请填写银行联行号', trigger: 'blur' },],
        projWork: [{ required: true, message: '请填写项目分工', trigger: 'blur' },],
        fax: [{ required: false, message: '请填写传真', trigger: 'blur' },],
        telephone: [{ required: false, message: '请填写联系电话', trigger: 'blur' },],
        keyAreas: [{ required: true, message: '请填写所属我省重点领域', trigger: 'blur' },],
        startDate: [{ required: true, message: '请选择项日开始时间', trigger: 'change' },],
        endDate: [{ required: true, message: '请选择项目结束时间', trigger: 'change' },],
        linkName: [{ required: true, message: '请填写项目联系人', trigger: 'blur' },],
        linkMobile: [{ required: true, message: '请填写联系人电话', trigger: 'blur' },],
        linkEmail: [{ required: true, message: '请填写联系人电子邮箱', trigger: 'blur' },],
        linkFax: [{ required: true, message: '请填写联系人传真', trigger: 'blur' },],
        isTechnologyReport: [{ required: true, message: '请选择是否科技报告', trigger: 'blur' },],
      },
    }
  },
  created () {
    this.getProjectTask()
  },
  computed: {
  },
  mounted () {
  },
  methods: {
    moment, toTextarea,
    save () {
      this.$emit('load', true)
      let pars = isEmptyParams(this.formData)
      let par = { ...pars }
      this.$api.task.save(par).then(({ data = {} }) => {
        if (data) {
          this.formData.id = data
          this.$message.success('保存成功！')
          this.$emit('close', 'save')
        }
        this.$emit('load', false)
      }).catch(() => {
        this.$emit('load', false)
      })
    },
    submit () {
      this.$refs.form.validate(valid => {
        if (valid) {
          this.$emit('load', true)
          let state = this.formData.taskState
          if (state != 30)
            this.formData.taskState = 10
          let pars = isEmptyParams(this.formData)
          let par = { ...pars }
          this.$api.task.save(par).then(({ data = {} }) => {
            if (data) {
              this.formData.id = data
              this.$message.success('成功！')
              this.$emit('close', 'submit')
            }
            this.$emit('load', false)
          }).catch(() => {
            this.$emit('load', false)
          })
        } else {
          this.$message.error('信息未填写完全！')
          return false
        }
      })

    },
    getProjectTask () {
      this.$emit('load', true)
      if (!!this.value) {
        this.$api.task.getTaskByProjId({ id: this.value }).then(({ data = {} }) => {
          if (data) {
            this.formData = data
          } else
            this.$emit('close', 'error')
          this.$emit('load', false)
        }).catch(() => {
          this.$emit('close', 'error')
          this.$emit('load', false)
        })
      }
    },
  }
}
</script>
<style scoped lang="less">
</style>

