<template>
  <div>
    <div class="pageTitle">资源用户画像信息</div>
    <div class="module1">
      <div class="moduleTitle">资源用户基本信息</div>
      <el-form label-position="right" ref="form" :model="form" :rules="rules" label-width="100px" class="formStyle">
        <el-col :span="9">
          <el-form-item label="单位名称" prop="companyIds">
            <el-col :span="16">
              <el-cascader v-model="form.companyIds" :options="companyNameList"
                :props="{ value: 'dictCode', label: 'dictLabel' }" />
            </el-col>
            <el-col :span="4" :offset="1"><el-button type="primary" @click="goCompany">查看单位</el-button></el-col>
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="单位类别" prop="projectClassId">
            <el-select v-model="form.companyClassId" placeholder="请选择单位类别" style="width: 100%;">
              <el-option v-for="dict in dict.type.company_class" :key="dict.value" :label="dict.label"
                :value="dict.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="姓名" prop="realName">
            <el-input placeholder="请输入姓名" :disabled="true" v-model="form.realName" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="职称" prop="professionalTitle">
            <el-input placeholder="请输入职称" v-model="form.professionalTitle" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="手机号" prop="phone">
            <el-input placeholder="请输入手机号" v-model="form.phone" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="邮箱" prop="email">
            <el-input placeholder="请输入邮箱" v-model="form.email" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="用户类型" prop="userType">
            <el-select v-model="form.userType" placeholder="请选择用户类型" style="width:100%">
              <el-option label="内部用户" value="0" />
              <el-option label="外部用户" value="1" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="用户来源" prop="memberSource">
            <el-input placeholder="请输入用户来源" v-model="form.memberSource" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="邀请人" prop="invitePeople">
            <el-input placeholder="请输入邀请人" v-model="form.invitePeople" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="邀请码" prop="inviteCode">
            <el-input placeholder="请输入邀请码" v-model="form.inviteCode" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="用户属性" prop="contractNumber">
            <el-select v-model="form.userAttributeId" placeholder="请选择用户属性" style="width:100%" multiple>
              <el-option v-for="dict in dict.type.user_attribute" :key="dict.value" :label="dict.label"
                :value="dict.value" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="用户角色" prop="contractNumber">
            <el-select v-model="form.userRoleId" placeholder="请选择用户角色" style="width:100%" multiple>
              <el-option v-for="dict in dict.type.user_role" :key="dict.value" :label="dict.label"
                :value="dict.value" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="备注信息" prop="remarks">
            <el-input type="textarea" placeholder="请输入备注信息" style="width: 99.4%;" maxlength="100" show-word-limit
              :autosize="{ minRows: 2, maxRows: 5 }" v-model="form.remarks" />
          </el-form-item>
        </el-col>
      </el-form>
    </div>
    <div class="module1">
      <div class="moduleTitle">工单账号信息</div>
      <el-form label-position="right" :model="form" :rules="rules" label-width="100px" class="formStyle">
        <el-col :span="9">
          <el-form-item label="账户名" prop="email">
            <el-input placeholder="请输入账户名" v-model="form.email" :disabled="true" />
          </el-form-item>
        </el-col>
        <el-col :span="9">
          <el-form-item label="密码" prop="password">
            <el-input placeholder="请输入密码" v-model="form.password" type="password" :disabled="true" />
          </el-form-item>
        </el-col>
        <el-col :span="4" :offset="1">
          <el-button type="primary" @click="resetPassword" v-if="!showResetPassword">重置密码</el-button>
          <el-button type="primary" @click="submitResetPassword" v-if="showResetPassword">重置密码</el-button>
        </el-col>
      </el-form>
    </div>
    <div class="module1">
      <div class="moduleTitle">工单记录</div>
      <el-table :data="workOrderList">
        <el-table-column label="申请单号" align="center" prop="applyNumber" />
        <el-table-column label="用户姓名" align="center" prop="name" />
        <el-table-column label="工单类型" align="center" prop="resourceClassName" />
        <el-table-column label="工单标题" align="center" prop="orderTitle" />
        <el-table-column label="申请时间" align="center" prop="createAt" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createAt, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="状态" align="center" prop="applyStatus">
          <template slot-scope="scope">
            <!-- ：0-待确认,1-盖章材料待上传,2-待审批,3-审批拒绝,4-待审核,5-审核拒绝,6-待分配,7-进行中,8-驳回,9-已完成 -->
            <span v-if="scope.row.applyStatus == 0">待确认</span>
            <span v-if="scope.row.applyStatus == 1">盖章材料待上传</span>
            <span v-if="scope.row.applyStatus == 2">待审批</span>
            <span v-if="scope.row.applyStatus == 3">审批拒绝</span>
            <span v-if="scope.row.applyStatus == 4">待审核</span>
            <span v-if="scope.row.applyStatus == 5">审核拒绝</span>
            <span v-if="scope.row.applyStatus == 6">待分配</span>
            <span v-if="scope.row.applyStatus == 7">进行中</span>
            <span v-if="scope.row.applyStatus == 8">驳回</span>
            <span v-if="scope.row.applyStatus == 9">已完成</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button size="mini" type="text" @click="handleUpdate(scope.row)"
              v-hasPermi="['cs:csResourceOrderApply:query']" v-if="scope.row.applyStatus == 9">查看</el-button>
          </template>
        </el-table-column>
      </el-table>

      <pagination :autoScroll="false" :total="total1" :page.sync="pageNum1" :limit.sync="pageSize"
        @pagination="getList1" />
    </div>
    <div class="module1">
      <div class="moduleTitle">资源申请信息</div>
      <el-table :data="resourceList">
        <el-table-column label="申请单号" align="center" prop="applyNumber" />
        <el-table-column label="项目标题" align="center" prop="projectName" />
        <el-table-column label="负责人" align="center" prop="name" />
        <el-table-column label="资源类型" align="center" prop="resourceClassName" />
        <el-table-column label="开通时间" align="center" prop="useTimeBegin" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.useTimeBegin, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="到期时间" align="center" prop="useTimeEnd" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.useTimeEnd, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="状态" align="center" prop="applyStatus">
          <template slot-scope="scope">
            <!-- ：0-待确认,1-盖章材料待上传,2-待审批,3-审批拒绝,4-待审核,5-审核拒绝,6-待分配,7-进行中,8-驳回,9-已完成 -->
            <span v-if="scope.row.applyStatus == 0">待确认</span>
            <span v-if="scope.row.applyStatus == 1">盖章材料待上传</span>
            <span v-if="scope.row.applyStatus == 2">待审批</span>
            <span v-if="scope.row.applyStatus == 3">审批拒绝</span>
            <span v-if="scope.row.applyStatus == 4">待审核</span>
            <span v-if="scope.row.applyStatus == 5">审核拒绝</span>
            <span v-if="scope.row.applyStatus == 6">待分配</span>
            <span v-if="scope.row.applyStatus == 7">进行中</span>
            <span v-if="scope.row.applyStatus == 8">驳回</span>
            <span v-if="scope.row.applyStatus == 9">已完成</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button size="mini" type="text" @click="handleUpdate(scope.row)"
              v-hasPermi="['cs:csResourceOrderApply:query']" v-if="scope.row.applyStatus > 6">查看</el-button>
          </template>
        </el-table-column>
      </el-table>

      <pagination :total="total2" :page.sync="pageNum2" :limit.sync="pageSize" @pagination="getList2"
        :autoScroll="false" />
    </div>
    <div class="module1">
      <div class="moduleTitle">用户成果信息
        <el-button icon="el-icon-plus" style="margin-left: 20px;" size="mini"
          @click="addAchievementsModal">新增成果</el-button>
      </div>
      <el-table :data="achievementList">
        <el-table-column label="成果数量" align="center" prop="achievementNum" />
        <el-table-column label="论文" align="center" prop="paperAchievementNum" />
        <el-table-column label="专利" align="center" prop="patentAchievementNum" />
        <el-table-column label="奖项" align="center" prop="prizeAchievementNum" />
        <el-table-column label="其他" align="center" prop="otherAchievementNum" />
        <el-table-column label="预约成果" align="center" prop="reservationAchievementNum" />
        <el-table-column label="使用情况调研" align="center" prop="resourcesAchievementNum" />
      </el-table>
    </div>
    <div class="module1">
      <div class="moduleTitle">收入明细台账
        <el-button icon="el-icon-plus" style="margin-left: 20px;" size="mini"
          @click="addIncomeDetails">新增收入明细</el-button>
      </div>
      <el-table :data="incomeDetailsList">
        <el-table-column label="项目/合同名称" align="center" prop="projectName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.projectName }}</span>
            <el-input v-model="scope.row.projectName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="付款人" align="center" prop="paymentPerson">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.paymentPerson }}</span>
            <el-input v-model="scope.row.paymentPerson" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="付款单位" align="center" prop="paymentCompany">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.paymentCompany }}</span>
            <el-input v-model="scope.row.paymentCompany" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="账户信息" align="center" prop="accountInfo">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.accountInfo }}</span>
            <el-input v-model="scope.row.accountInfo" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="入账摘要" align="center" prop="accountingAbstract">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.accountingAbstract }}</span>
            <el-input v-model="scope.row.accountingAbstract" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="入账日期" align="center" prop="accountingTime" width="180">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ parseTime(scope.row.accountingTime, '{y}-{m}-{d}') }}</span>
            <el-date-picker v-model="scope.row.accountingTime" v-if="scope.row.isEdit" type="date" placeholder="选择日期"
              value-format="yyyy-MM-dd" />
          </template>
        </el-table-column>
        <el-table-column label="金额(元)" align="center" prop="price">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.price }}</span>
            <el-input v-model="scope.row.price" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="凭证编号" align="center" prop="documentNumber">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.documentNumber }}</span>
            <el-input v-model="scope.row.documentNumber" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="到账地点" align="center" prop="deliveryLocation">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.deliveryLocation }}</span>
            <el-input v-model="scope.row.deliveryLocation" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="设备名称" align="center" prop="deviceName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.deviceName }}</span>
            <el-input v-model="scope.row.deviceName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="资源备注" align="center" prop="resourceRemarks">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.resourceRemarks }}</span>
            <el-input v-model="scope.row.resourceRemarks" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="设备编号" align="center" prop="deviceNumber">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.deviceNumber }}</span>
            <el-input v-model="scope.row.deviceNumber" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="入账类别" align="center" prop="accountingClass">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.accountingClass }}</span>
            <el-input v-model="scope.row.accountingClass" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="经办人" align="center" prop="operatorUser">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.operatorUser }}</span>
            <el-input v-model="scope.row.operatorUser" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="隶属部门" align="center" prop="deptName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.deptName }}</span>
            <el-input v-model="scope.row.deptName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="附件凭证" align="center" prop="annex" width="200">
          <template slot-scope="scope">
            <a v-if="!scope.row.isEdit" style="color: #0051AA;text-decoration: none;" :href="scope.row.annex"
              target="_blank">附件凭证</a>
            <ImageUpload :value="scope.row.annex" v-if="scope.row.isEdit" :isShowTip="false" :limit="1" />
          </template>
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remarks">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.remarks }}</span>
            <el-input v-model="scope.row.remarks" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateIncomeDetails(scope.row)"
              v-hasPermi="['cs:csIncomeDetails:edit']" v-if="!scope.row.isEdit">编辑</el-button>
            <el-button size="mini" type="text" icon="el-icon-edit" @click="saveIncomeDetails(scope.row)"
              v-if="scope.row.isEdit">保存</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteIncomeDetails(scope.row)"
              v-hasPermi="['cs:csIncomeDetails:remove']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total4" :page.sync="pageNum4" :limit.sync="pageSize"
        @pagination="getList4" />
    </div>
    <div class="module1">
      <div class="moduleTitle">合同台账
        <el-button icon="el-icon-plus" style="margin-left: 20px;" size="mini"
          @click="addContractDetails">新增合同</el-button>
      </div>
      <el-table :data="contractDetailsList">
        <el-table-column label="部门合同编号" align="center" prop="departmentContractNumber">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.departmentContractNumber }}</span>
            <el-input v-model="scope.row.departmentContractNumber" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="合同号" align="center" prop="contractNumber">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.contractNumber }}</span>
            <el-input v-model="scope.row.contractNumber" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="签订时间" align="center" prop="signingTime" width="180">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ parseTime(scope.row.signingTime, '{y}-{m}-{d}') }}</span>
            <el-date-picker v-model="scope.row.signingTime" v-if="scope.row.isEdit" type="date" placeholder="选择日期"
              value-format="yyyy-MM-dd" />
          </template>
        </el-table-column>
        <el-table-column label="终止时间" align="center" prop="endTime" width="180">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
            <el-date-picker v-model="scope.row.endTime" v-if="scope.row.isEdit" type="date" placeholder="选择日期"
              value-format="yyyy-MM-dd" />
          </template>
        </el-table-column>
        <el-table-column label="项目/合同名称" align="center" prop="contractName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.contractName }}</span>
            <el-input v-model="scope.row.contractName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="合同金额(万元)" align="center" prop="contractPrice">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.contractPrice }}</span>
            <el-input v-model="scope.row.contractPrice" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="合同类别名" align="center" prop="contractClassName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.contractClassName }}</span>
            <el-input v-model="scope.row.contractClassName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="需方" align="center" prop="demandingSide">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.demandingSide }}</span>
            <el-input v-model="scope.row.demandingSide" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="供方" align="center" prop="supplier">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.supplier }}</span>
            <el-input v-model="scope.row.supplier" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="隶属部门" align="center" prop="companyClassName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.companyClassName }}</span>
            <el-input v-model="scope.row.companyClassName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="经办人" align="center" prop="memberUserId">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.memberUserId }}</span>
            <el-input v-model="scope.row.memberUserId" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="入库数量(份)" align="center" prop="warehousingTotal">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.warehousingTotal }}</span>
            <el-input v-model="scope.row.warehousingTotal" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="是否原件" align="center" prop="isOriginal">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.isOriginal == 0 ? '否' : '是' }}</span>
            <el-select v-if="scope.row.isEdit" v-model="scope.row.isOriginal" placeholder="请选择是否原件">
              <el-option label="是" :value="1"></el-option>
              <el-option label="否" :value="0"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="原件缺失原因" align="center" prop="lackReason">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.lackReason }}</span>
            <el-input v-model="scope.row.lackReason" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="附件明细" align="center" prop="annexUrl" width="200">
          <template slot-scope="scope">
            <a v-if="!scope.row.isEdit" style="color: #0051AA;text-decoration: none;" :href="scope.row.annexUrl"
              target="_blank">附件明细</a>
            <ImageUpload :value="scope.row.annexUrl" v-if="scope.row.isEdit" :isShowTip="false" :limit="1" />
          </template>
        </el-table-column>
        <el-table-column label="入库时间" align="center" prop="warehousingTime" width="180">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ parseTime(scope.row.warehousingTime, '{y}-{m}-{d}') }}</span>
            <el-date-picker v-model="scope.row.warehousingTime" v-if="scope.row.isEdit" type="date" placeholder="选择日期"
              value-format="yyyy-MM-dd" />
          </template>
        </el-table-column>
        <el-table-column label="存档位置" align="center" prop="archiveLocation">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.archiveLocation }}</span>
            <el-input v-model="scope.row.archiveLocation" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="内容" align="center" prop="content">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.content }}</span>
            <el-input v-model="scope.row.content" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateContractDetails(scope.row)"
              v-hasPermi="['cs:csContractDetails:edit']" v-if="!scope.row.isEdit">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-edit" @click="saveContractDetails(scope.row)"
              v-if="scope.row.isEdit">保存</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteContractDetails(scope.row)"
              v-hasPermi="['cs:csContractDetails:remove']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>

      <pagination :autoScroll="false" :total="total5" :page.sync="pageNum5" :limit.sync="pageSize"
        @pagination="getList5" />
    </div>
    <div class="module1">
      <div class="moduleTitle">拓展交流台账
        <el-button icon="el-icon-plus" style="margin-left: 20px;" size="mini"
          @click="addExpandInteract">新增交流台账</el-button>
      </div>
      <el-table :data="expandInteractList">
        <el-table-column label="交流时间" align="center" prop="accountingTime" width="180">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ parseTime(scope.row.accountingTime, '{y}-{m}-{d}') }}</span>
            <el-date-picker v-model="scope.row.accountingTime" v-if="scope.row.isEdit" type="date" placeholder="选择日期"
              value-format="yyyy-MM-dd" />
          </template>
        </el-table-column>
        <el-table-column label="交流阶段" align="center" prop="exchangeClass">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.exchangeClass }}</span>
            <el-input v-model="scope.row.exchangeClass" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="单位名称" align="center" prop="companyName">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.companyName }}</span>
            <el-input v-model="scope.row.companyName" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="单位联系人" align="center" prop="companyContacts">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.companyContacts }}</span>
            <el-input v-model="scope.row.companyContacts" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="单位属性" align="center" prop="companyClass">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.companyClass }}</span>
            <el-input v-model="scope.row.companyClass" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="生态领域" align="center" prop="ecologicalField">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.ecologicalField }}</span>
            <el-input v-model="scope.row.ecologicalField" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="中心对接人" align="center" prop="centerLiaison">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.centerLiaison }}</span>
            <el-input v-model="scope.row.centerLiaison" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="参与人员" align="center" prop="participant">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.participant }}</span>
            <el-input v-model="scope.row.participant" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="用户信息简介(产品和服务介绍)" align="center" prop="introduce">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.introduce }}</span>
            <el-input v-model="scope.row.introduce" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="交流内容" align="center" prop="exchangeContent">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.exchangeContent }}</span>
            <el-input v-model="scope.row.exchangeContent" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="下一步计划及截止时间" align="center" prop="planOrTime">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.planOrTime }}</span>
            <el-input v-model="scope.row.planOrTime" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="用户需求类型" align="center" prop="userNeedClass">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.userNeedClass }}</span>
            <el-input v-model="scope.row.userNeedClass" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="合作模式" align="center" prop="cooperateMode">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.cooperateMode }}</span>
            <el-input v-model="scope.row.cooperateMode" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="记录人" align="center" prop="recordPerson">
          <template slot-scope="scope">
            <span v-if="!scope.row.isEdit">{{ scope.row.recordPerson }}</span>
            <el-input v-model="scope.row.recordPerson" v-if="scope.row.isEdit" />
          </template>
        </el-table-column>
        <el-table-column label="交流凭证" align="center" prop="exchangeVoucher">
          <template slot-scope="scope">
            <a v-if="!scope.row.isEdit" style="color: #0051AA;text-decoration: none;" :href="scope.row.exchangeVoucher"
              target="_blank">交流凭证</a>
            <ImageUpload :value="scope.row.exchangeVoucher" v-if="scope.row.isEdit" :isShowTip="false" :limit="1" />
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateExpandInteract(scope.row)"
              v-hasPermi="['cs:csExpandInteract:edit']" v-if="!scope.row.isEdit">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-edit" @click="saveExpandInteract(scope.row)"
              v-if="scope.row.isEdit">保存</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteExpandInteract(scope.row)"
              v-hasPermi="['cs:csExpandInteract:remove']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total6" :page.sync="pageNum6" :limit.sync="pageSize"
        @pagination="getList6" />
    </div>
    <div class="module1">
      <div class="moduleTitle">短信通知记录</div>
      <el-table :data="messageRecordList">
        <el-table-column label="通知时间" align="center" prop="messageTime" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.messageTime, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="通知类型" align="center" prop="messageClass" />
        <el-table-column label="账户名" align="center" prop="accountName" />
        <el-table-column label="通知用户" align="center" prop="messageUser" />
        <el-table-column label="手机号" align="center" prop="phone" />
        <el-table-column label="邮箱" align="center" prop="email" />
        <el-table-column label="通知内容" align="center" prop="messageInfo" />
        <el-table-column label="通知状态" align="center" prop="messageStatus">
          <template slot-scope="scope">
            {{ scope.row.messageStatus == 0 ? '发送中' : scope.row.messageStatus == 1 ? '发送成功' : scope.row.messageStatus ==
            2
            ? '发送失败' : '' }}
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <!-- <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdateMessageRecord(scope.row)"
            v-hasPermi="['cs:csMessageRecord:edit']"
          >修改</el-button> -->
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteMessageRecord(scope.row)"
              v-hasPermi="['cs:csMessageRecord:remove']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total7" :page.sync="pageNum7" :limit.sync="pageSize"
        @pagination="getList7" />
    </div>

    <div class="module1">
      <div class="moduleTitle">项目管理</div>
      <el-table :data="projectRecordList">
        <el-table-column label="项目名称" align="center" prop="projectName" />
        <el-table-column label="项目分类" align="center" prop="projectType">
          <template slot-scope="scope">
            <span>{{ scope.row.projectType == 0 ? '合作项目' : '支持项目' }}</span>
          </template>
        </el-table-column>
        <el-table-column label="项目负责人" align="center" prop="projectLeader" />
        <el-table-column label="项目编号" align="center" prop="projectNumber" />
        <el-table-column label="项目来源" align="center" prop="projectSource" />
        <el-table-column label="项目类别" align="center" prop="projectClassName" />
        <el-table-column label="项目周期" align="center" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.projectCycleBegin, '{y}-{m}-{d}') + '-' + parseTime(scope.row.projectCycleEnd,
              '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="应用领域" align="center" prop="applicationArea" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateProjectRecord(scope.row)"
              v-hasPermi="['cs:csProjectRecord:edit']">查看</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total8" :page.sync="pageNum8" :limit.sync="pageSize"
        @pagination="getList8" />
    </div>
    <div class="module1">
      <div class="moduleTitle">充值付费管理</div>
      <el-table :data="rechargeList">
        <el-table-column label="付费类型" align="center" prop="projectType">
          <template slot-scope="scope">
            <span>{{ scope.row.projectType == 0 ? '合作项目' : '支持项目' }}</span>
          </template>
        </el-table-column>
        <el-table-column label="付费内容" align="center" prop="projectLeader" />
        <el-table-column label="负责人" align="center" prop="projectNumber" />
        <el-table-column label="当前余额" align="center" prop="projectSource" />
        <el-table-column label="充值时间" align="center" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.projectCycleBegin, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total9" :page.sync="pageNum9" :limit.sync="pageSize"
        @pagination="getList9" />
    </div>

    <div class="module1">
      <div class="moduleTitle">团队成员管理</div>
      <el-table :data="teamList">
        <el-table-column label="姓名" align="center" prop="realName" />
        <el-table-column label="手机号" align="center" prop="phone" />
        <el-table-column label="邮箱" align="center" prop="email" />
        <el-table-column label="账号" align="center" width="180" prop="userAccount" />
        <el-table-column label="所属资源" align="center" prop="memberSource" />
        <el-table-column label="工作单位" align="center" width="180" prop="companyName" />
        <el-table-column label="职称" align="center" prop="professionalTitle" />
        <el-table-column label="账号类型" align="center" prop="accountType">
          <template slot-scope="scope">
            <span>{{ scope.row.accountType == 0 ? '主账号' : '子账号' }}</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateTeam(scope.row)"
              v-hasPermi="['cs:csProjectRecord:edit']">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteTeam(scope.row)"
              v-hasPermi="['cs:csProjectRecord:remove']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total10" :page.sync="pageNum10" :limit.sync="pageSize"
        @pagination="getList10" />
    </div>

    <div class="module1">
      <div class="moduleTitle">资源使用情况</div>
      <el-table :data="resourceInfoList">
        <el-table-column label="资源类型" align="center" prop="projectType">
          <template slot-scope="scope">
            <span>{{ scope.row.projectType == 0 ? '合作项目' : '支持项目' }}</span>
          </template>
        </el-table-column>
        <el-table-column label="使用情况" align="center" prop="projectLeader" />
        <el-table-column label="账号" align="center" width="180" />
        <el-table-column label="负责人" align="center" prop="projectSource" />
        <el-table-column label="赋能支持" align="center" width="180" />
        <el-table-column label="资源状态" align="center" prop="projectSource" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdatereSource(scope.row)"
              v-hasPermi="['cs:csProjectRecord:edit']">查看</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :autoScroll="false" :total="total11" :page.sync="pageNum11" :limit.sync="pageSize"
        @pagination="getList11" />
    </div>

    <div class="footer">
      <el-button type="primary" @click="submitAllForm">保存</el-button>
    </div>
    <el-dialog :visible.sync="show">
      <div class="module1">
        <div class="moduleTitle">项目成员管理</div>
        <el-table :data="teamList">
          <el-table-column label="姓名" align="center" prop="realName" />
          <el-table-column label="手机号" align="center" prop="phone" />
          <el-table-column label="邮箱" align="center" prop="email" />
          <el-table-column label="账号" align="center" width="180" prop="userAccount" />
          <el-table-column label="所属资源" align="center" prop="memberSource" />
          <el-table-column label="工作单位" align="center" width="180" prop="companyName" />
          <el-table-column label="职称" align="center" prop="professionalTitle" />
          <el-table-column label="账号类型" align="center" prop="accountType">
            <template slot-scope="scope">
              <span>{{ scope.row.accountType == 0 ? '主账号' : '子账号' }}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
            <template slot-scope="scope">
              <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateTeam(scope.row)"
                v-hasPermi="['cs:csProjectRecord:edit']">修改</el-button>
              <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteTeam(scope.row)"
                v-hasPermi="['cs:csProjectRecord:remove']">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <pagination :autoScroll="false" :total="total10" :page.sync="pageNum10" :limit.sync="pageSize"
          @pagination="getList10" />
      </div>
    </el-dialog>

    <el-dialog :visible.sync="showAchievement" :title="title" append-to-body fullscreen destroy-on-close>
      <div class="module1">
        <div class="moduleTitle">
          <div>使用情况调研</div>
        </div>
        <el-form label-position="right" :model="achievementForm" class="formStyle1">
          <el-col :span="7">
            <el-form-item label="应用领域" prop="applicationArea" label-width="80px">
              <el-input placeholder="请输入应用领域" v-model="achievementForm.applicationArea" />
            </el-form-item>
          </el-col>
          <el-col :span="7" :offset="1">
            <el-form-item label="使用超算平台软件" prop="platformSoftware" label-width="140px">
              <el-input placeholder="请输入使用超算平台软件" v-model="achievementForm.platformSoftware" />
            </el-form-item>
          </el-col>
          <el-col :span="7" :offset="1">
            <el-form-item label="自主安装软件名" prop="softwareName" label-width="120px">
              <el-input v-model="achievementForm.softwareName" placeholder="请输入软件名，可填写多个" />
            </el-form-item>
          </el-col>
        </el-form>
      </div>
      <div class="paperAchievements">
        <div class="smallTitle">论文</div>
        <div v-if="paperAchievementList.length > 0">
          <div v-for="(item, index) in paperAchievementList" :key="index">
            <el-form label-position="right" :model="item" :rules="rules1" class="formStyle1"
              :ref="'paperAchievement' + index" v-if="item.delFlag == null || item.delFlag == '0'">
              <el-col :span="22">
                <el-form-item>
                  <div class="numberDeletion">
                    <div>论文{{ index + 1 }}</div>
                    <el-button type="text" @click="delPaper(index, item)">删除</el-button>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="发表日期" prop="allTime" label-width="100px">
                  <el-date-picker v-model="item.allTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
                    placeholder="请选择发表日期" style="width: 100%;">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="文章题目" prop="articleTitle" label-width="100px">
                  <el-input v-model="item.articleTitle" placeholder="请输入文章题目" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="主要作者" prop="leadAuthor" label-width="100px">
                  <el-input v-model="item.leadAuthor" placeholder="请输入主要作者" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="DOI" prop="doi" label-width="100px">
                  <el-input v-model="item.doi" placeholder="请输入DOI" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="期刊名" prop="journalName" label-width="100px">
                  <el-input v-model="item.journalName" placeholder="请输入期刊名" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="期刊分区" prop="journalPartitionId" label-width="100px">
                  <el-select v-model="item.journalPartitionId" placeholder="请选择期刊分区" style="width: 100%;">
                    <el-option v-for="item in journalPartitionList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="影响因子" prop="impactFactors" label-width="100px">
                  <el-input v-model="item.impactFactors" placeholder="请输入影响因子" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目名称" prop="projectName" label-width="100px">
                  <el-input v-model="item.projectName" placeholder="请输入所属项目名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目编号" prop="projectNumber" label-width="100px">
                  <el-input v-model="item.projectNumber" placeholder="请输入所属项目编号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目来源" prop="projectSource" label-width="100px">
                  <el-input v-model="item.projectSource" placeholder="请输入项目来源" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目类别" prop="projectClassId" label-width="100px">
                  <el-select v-model="item.projectClassId" placeholder="请选择项目类别" style="width: 100%;">
                    <el-option v-for="item in projectClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目周期" prop="projectCycleRange" label-width="100px">
                  <el-date-picker v-model="item.projectCycleRange" type="daterange" range-separator="-"
                    start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                    style="width: 100%;" @change="projectCycleRangeChange('paperAchievementList', index, $event)">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="与郑州中心关联度" prop="correlationClassId" label-width="100px">
                  <el-select v-model="item.correlationClassId" placeholder="请选择与郑州中心关联度" style="width: 100%;">
                    <el-option v-for="item in correlationClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="22">
                <el-form-item label="成果在发表时是否注明“国家超级计算郑州中心支持(Supported by National Supercomputing Center in Zhengzhou)”"
                  prop="isNote">
                  <el-radio-group v-model="item.isNote">
                    <el-radio label="1">是</el-radio>
                    <el-radio label="0">否</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-form>
          </div>
        </div>
        <div @click="addPaper" class="addAchievements">+添加论文信息</div>
      </div>
      <div class="paperAchievements">
        <div class="smallTitle">专利</div>
        <div v-if="patentAchievementList.length > 0">
          <div v-for="(item, index) in patentAchievementList" :key="index">
            <el-form label-position="right" :model="item" :rules="rules2" class="formStyle1"
              :ref="'patentAchievement' + index" v-if="item.delFlag == null || item.delFlag == '0'">
              <el-col :span="22">
                <el-form-item>
                  <div class="numberDeletion">
                    <div>专利{{ index + 1 }}</div>
                    <el-button type="text" @click="delPatent(index, item)">删除</el-button>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="专利申请日期" prop="allTime" label-width="100px">
                  <el-date-picker v-model="item.allTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
                    placeholder="请选择专利申请日期" style="width: 100%;">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="专利类别" prop="patentClassId" label-width="100px">
                  <el-select v-model="item.patentClassId" placeholder="请选择专利类别" style="width: 100%;">
                    <el-option v-for="item in patentClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="专利名称" prop="patentName" label-width="100px">
                  <el-input v-model="item.patentName" placeholder="请输入专利名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="专利号" prop="patentNumber" label-width="100px">
                  <el-input v-model="item.patentNumber" placeholder="请输入专利号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="主要作者" prop="leadAuthor" label-width="100px">
                  <el-input v-model="item.leadAuthor" placeholder="请输入主要作者" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目名称" prop="projectName" label-width="100px">
                  <el-input v-model="item.projectName" placeholder="请输入所属项目名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目编号" prop="projectNumber" label-width="100px">
                  <el-input v-model="item.projectNumber" placeholder="请输入所属项目编号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目来源" prop="projectSource" label-width="100px">
                  <el-input v-model="item.projectSource" placeholder="请输入项目来源" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目类别" prop="projectClassId" label-width="100px">
                  <el-select v-model="item.projectClassId" placeholder="请选择项目类别" style="width: 100%;">
                    <el-option v-for="item in projectClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目周期" prop="projectCycleRange" label-width="100px">
                  <el-date-picker v-model="item.projectCycleRange" type="daterange" range-separator="-"
                    start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                    style="width: 100%;" @change="projectCycleRangeChange('patentAchievementList', index, $event)">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="与郑州中心关联度" prop="correlationClassId" label-width="100px">
                  <el-select v-model="item.correlationClassId" placeholder="请选择与郑州中心关联度" style="width: 100%;">
                    <el-option v-for="item in correlationClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-form>
          </div>
        </div>
        <div @click="addPatent" class="addAchievements">+添加专利信息</div>
      </div>
      <div class="paperAchievements">
        <div class="smallTitle">奖项</div>
        <div v-if="prizeAchievementList.length > 0">
          <div v-for="(item, index) in prizeAchievementList" :key="index">
            <el-form label-position="right" :model="item" :rules="rules3" class="formStyle1"
              :ref="'prizeAchievement' + index" v-if="item.delFlag == null || item.delFlag == '0'">
              <el-col :span="22">
                <el-form-item>
                  <div class="numberDeletion">
                    <div>奖项{{ index + 1 }}</div>
                    <el-button type="text" @click="delAward(index, item)">删除</el-button>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="获奖时间" prop="allTime" label-width="100px">
                  <el-date-picker v-model="item.allTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
                    placeholder="请选择获奖时间" style="width: 100%;">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="奖项级别" prop="prizeClassId" label-width="100px">
                  <el-select v-model="item.prizeClassId" placeholder="请选择奖项级别" style="width: 100%;">
                    <el-option v-for="item in prizeClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="奖项名称" prop="prizeName" label-width="100px">
                  <el-input v-model="item.prizeName" placeholder="请输入奖项名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="奖项题目" prop="prizeTitle" label-width="100px">
                  <el-input v-model="item.prizeTitle" placeholder="请输入奖项题目" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="参与者" prop="leadAuthor" label-width="100px">
                  <el-input v-model="item.leadAuthor" placeholder="请输入参与者,可添加多个" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目名称" prop="projectName" label-width="100px">
                  <el-input v-model="item.projectName" placeholder="请输入所属项目名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目编号" prop="projectNumber" label-width="100px">
                  <el-input v-model="item.projectNumber" placeholder="请输入所属项目编号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目来源" prop="projectSource" label-width="100px">
                  <el-input v-model="item.projectSource" placeholder="请输入项目来源" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目类别" prop="projectClassId" label-width="100px">
                  <el-select v-model="item.projectClassId" placeholder="请选择项目类别" style="width: 100%;">
                    <el-option v-for="item in projectClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目周期" prop="projectCycleRange" label-width="100px">
                  <el-date-picker v-model="item.projectCycleRange" type="daterange" range-separator="-"
                    start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                    style="width: 100%;" @change="projectCycleRangeChange('prizeAchievementList', index, $event)">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="与郑州中心关联度" prop="correlationClassId" label-width="100px">
                  <el-select v-model="item.correlationClassId" placeholder="请选择与郑州中心关联度" style="width: 100%;">
                    <el-option v-for="item in correlationClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-form>
          </div>
        </div>
        <div @click="addAward" class="addAchievements">+添加奖项信息</div>
      </div>
      <div class="paperAchievements">
        <div class="smallTitle">其他成果</div>
        <div v-if="otherAchievementList.length > 0">
          <div v-for="(item, index) in otherAchievementList" :key="index">
            <el-form label-position="right" :model="item" :rules="rules4" class="formStyle1"
              :ref="'otherAchievement' + index" v-if="item.delFlag == null || item.delFlag == '0'">
              <el-col :span="22">
                <el-form-item>
                  <div class="numberDeletion">
                    <div>其他成果{{ index + 1 }}</div>
                    <el-button type="text" @click="delOtherAchievements(index, item)">删除</el-button>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="发表日期" prop="allTime" label-width="100px">
                  <el-date-picker v-model="item.allTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date"
                    placeholder="请选择发表日期" style="width: 100%;">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="成果类型" prop="otherClassId" label-width="100px">
                  <el-input v-model="item.otherClassId" placeholder="请输入成果类型" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="成果名称" prop="otherName" label-width="100px">
                  <el-input v-model="item.otherName" placeholder="请输入成果名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="成果编号" prop="otherNumber" label-width="100px">
                  <el-input v-model="item.otherNumber" placeholder="请输入成果编号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="参与者" prop="leadAuthor" label-width="100px">
                  <el-input v-model="item.leadAuthor" placeholder="请输入参与者,可添加多个" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目名称" prop="projectName" label-width="100px">
                  <el-input v-model="item.projectName" placeholder="请输入所属项目名称" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="所属项目编号" prop="projectNumber" label-width="100px">
                  <el-input v-model="item.projectNumber" placeholder="请输入所属项目编号" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目来源" prop="projectSource" label-width="100px">
                  <el-input v-model="item.projectSource" placeholder="请输入项目来源" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目类别" prop="projectClassId" label-width="100px">
                  <el-select v-model="item.projectClassId" placeholder="请选择项目类别" style="width: 100%;">
                    <el-option v-for="item in projectClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="项目周期" prop="projectCycleRange" label-width="100px">
                  <el-date-picker v-model="item.projectCycleRange" type="daterange" range-separator="-"
                    start-placeholder="开始时间" end-placeholder="结束时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                    style="width: 100%;" @change="projectCycleRangeChange('otherAchievementList', index, $event)">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="与郑州中心关联度" prop="correlationClassId" label-width="100px">
                  <el-select v-model="item.correlationClassId" placeholder="请选择与郑州中心关联度" style="width: 100%;">
                    <el-option v-for="item in correlationClassList" :key="item.classId" :label="item.className"
                      :value="item.classId">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-form>
          </div>
        </div>
        <div @click="addOtherAchievements" class="addAchievements">+添加其他成果信息</div>
      </div>
      <div class="publishAchievements">
        <div class="paperAchievements">
          <div class="smallTitle">预约成果</div>
          <div v-if="reservationAchievementList.length > 0">
            <div v-for="(item, index) in reservationAchievementList" :key="index">
              <el-form label-position="right" :model="item" :rules="rules5" class="formStyle1"
                :ref="'reservationAchievement' + index" v-if="item.delFlag == null || item.delFlag == '0'">
                <el-col :span="22">
                  <el-form-item>
                    <div class="numberDeletion">
                      <div>预约成果{{ index + 1 }}</div>
                      <el-button type="text" @click="delAppointmentResults(index, item)">删除</el-button>
                    </div>
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="拟产出成果时间" prop="reservationTime" label-width="100px">
                    <el-date-picker v-model="item.reservationTime" type="date" placeholder="请选择拟产出成果时间"
                      style="width: 100%;">
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="拟产出成果类别" prop="reservationClassId" label-width="100px">
                    <el-select v-model="item.reservationClassId" placeholder="请选择拟产出成果类别" style="width: 100%;">
                      <el-option v-for="item in reservationClassList" :key="item.classId" :label="item.className"
                        :value="item.classId">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="拟产出成果数量" prop="reservationNum" label-width="100px">
                    <el-input v-model="item.reservationNum" placeholder="请输入拟产出成果数量" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="拟产出成果描述" prop="reservationDescribe" label-width="100px">
                    <el-input v-model="item.reservationDescribe" placeholder="请输入拟产出成果描述" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="研究领域" prop="researchField" label-width="100px">
                    <el-input v-model="item.researchField" placeholder="请输入研究领域" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="研究进展" prop="researchProgress" label-width="100px">
                    <el-input v-model="item.researchProgress" placeholder="请输入研究进展" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="所属项目名称" prop="projectName" label-width="100px">
                    <el-input v-model="item.projectName" placeholder="请输入所属项目名称" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="所属项目编号" prop="projectNumber" label-width="100px">
                    <el-input v-model="item.projectNumber" placeholder="请输入所属项目编号" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="项目来源" prop="projectSource" label-width="100px">
                    <el-input v-model="item.projectSource" placeholder="请输入项目来源" />
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="项目类别" prop="projectClassId" label-width="100px">
                    <el-select v-model="item.projectClassId" placeholder="请选择项目类别" style="width: 100%;">
                      <el-option v-for="item in projectClassList" :key="item.classId" :label="item.className"
                        :value="item.classId">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="9">
                  <el-form-item label="与郑州中心关联度" prop="correlationClassId" label-width="100px">
                    <el-select v-model="item.correlationClassId" placeholder="请选择与郑州中心关联度" style="width: 100%;">
                      <el-option v-for="item in correlationClassList" :key="item.classId" :label="item.className"
                        :value="item.classId">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </div>
          </div>
          <div @click="addAppointmentResults" class="addAchievements">+添加预约成果信息</div>
        </div>
      </div>
      <div class="secondTitle2">
        <div>应用推广</div>
        <div class="agreePromoteStyle">
          <span><span style="color: red;">*</span>是否同意宣传</span>
          <el-radio-group v-model="form.isPublicize">
            <el-radio label="1">是</el-radio>
            <el-radio label="0">否</el-radio>
          </el-radio-group>
        </div>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>


  </div>
</template>

<script>

  import { listDataTree } from "@/api/system/dict/data";
  import { getClassListByMark, listCsResourceOrderApply } from "@/api/cs/csResourceOrderApply";
  import {
    listCsOrderMemberUser, getCsOrderMemberUser,
    delCsOrderMemberUser, addCsOrderMemberUser, updateCsOrderMemberUser,
    resetPassword, selectTeamMemberList, paymentDetailsList, getUserAchievementNum
  } from "@/api/cs/csOrderMemberUser";
  import { listCsIncomeDetails, getCsIncomeDetails, delCsIncomeDetails, addCsIncomeDetails, updateCsIncomeDetails } from "@/api/cs/csIncomeDetails";
  import { listCsContractDetails, getCsContractDetails, delCsContractDetails, addCsContractDetails, updateCsContractDetails } from "@/api/cs/csContractDetails";
  import { listCsExpandInteract, getCsExpandInteract, delCsExpandInteract, addCsExpandInteract, updateCsExpandInteract } from "@/api/cs/csExpandInteract";
  import { listCsMessageRecord, getCsMessageRecord, delCsMessageRecord, addCsMessageRecord, updateCsMessageRecord, bachSendMessage } from "@/api/cs/csMessageRecord";
  import { listCsProjectRecord, getCsProjectRecord, delCsProjectRecord, addCsProjectRecord, updateCsProjectRecord } from "@/api/cs/csProjectRecord";
  import {
    addCsAchievementInfoDetails,
  } from "@/api/cs/csAchievementInfoDetails"

  export default {
    dicts: ['user_attribute', 'user_role', 'company_class'],
    data() {
      return {
        form: {},
        show: false,
        showAchievement: false,
        title: '',
        companyClassList: [],
        rules: {},
        workOrderList: [],
        resourceList: [],
        achievementList: [],
        incomeDetailsList: [],
        contractDetailsList: [],
        expandInteractList: [],
        messageRecordList: [],
        projectRecordList: [],
        rechargeList: [],
        teamList: [],
        projectPersonList: [],
        resourceInfoList: [],
        pageSize: 10,
        pageNum1: 1,
        total1: 0,
        pageNum2: 1,
        total2: 0,
        pageNum3: 1,
        total3: 0,
        pageNum4: 1,
        total4: 0,
        pageNum5: 1,
        total5: 0,
        pageNum6: 1,
        total6: 0,
        pageNum7: 1,
        total7: 0,
        pageNum8: 1,
        total8: 0,
        pageNum9: 1,
        total9: 0,
        pageNum10: 1,
        total10: 0,
        pageNum11: 1,
        total11: 0,
        memberUserId: '',
        companyNameList: [],
        achievementForm: {
          isPublicize: '1',
          applicationArea: '',
          platformSoftware: '',
          softwareName: '',
          paperAchievementList: [],
          patentAchievementList: [],
          prizeAchievementList: [],
          otherAchievementList: [],
          reservationAchievementList: [],
        },
        paperAchievementList: [],
        patentAchievementList: [],
        prizeAchievementList: [],
        otherAchievementList: [],
        reservationAchievementList: [],
        rules1: {
          allTime: [
            { required: true, message: "请选择发表日期", trigger: "change" },
          ],
          articleTitle: [
            { required: true, message: "请输入文章题目", trigger: "blur" },
          ],
          journalPartitionId: [
            { required: true, message: "请选择期刊分区", trigger: "change" },
          ],
          impactFactors: [
            { required: true, message: "请输入影响因子", trigger: "blur" },
          ],
          projectName: [
            { required: true, message: "请输入所属项目名称", trigger: "blur" },
          ],
          projectSource: [
            { required: true, message: "请输入项目来源", trigger: "blur" },
          ],
          projectClassId: [
            { required: true, message: "请选择项目类别", trigger: "change" },
          ],
          projectCycleRange: [
            { required: true, message: "请选择项目周期", trigger: "change" },
          ],
          isNote: [
            { required: true, message: "请选择是否注明该文字", trigger: "change" },
          ],
        },
        rules2: {
          allTime: [
            { required: true, message: "请选择专利申请日期", trigger: "change" },
          ],
          patentClassId: [
            { required: true, message: "请选择专利类别", trigger: "change" },
          ],
          patentName: [
            { required: true, message: "请输入专利名称", trigger: "blur" },
          ],
          patentNumber: [
            { required: true, message: "请输入专利号", trigger: "blur" },
          ],
          projectName: [
            { required: true, message: "请输入所属项目名称", trigger: "blur" },
          ],
          projectSource: [
            { required: true, message: "请输入项目来源", trigger: "blur" },
          ],
          projectClassId: [
            { required: true, message: "请选择项目类别", trigger: "change" },
          ],
          projectCycleRange: [
            { required: true, message: "请选择项目周期", trigger: "change" },
          ],
        },
        rules3: {
          allTime: [
            { required: true, message: "请选择获奖时间", trigger: "change" },
          ],
          prizeClassId: [
            { required: true, message: "请选择奖项级别", trigger: "change" },
          ],
          prizeName: [
            { required: true, message: "请输入奖项名称", trigger: "blur" },
          ],
          prizeTitle: [
            { required: true, message: "请输入奖项题目", trigger: "blur" },
          ],
          projectName: [
            { required: true, message: "请输入所属项目名称", trigger: "blur" },
          ],
          projectSource: [
            { required: true, message: "请输入项目来源", trigger: "blur" },
          ],
          projectClassId: [
            { required: true, message: "请选择项目类别", trigger: "change" },
          ],
          projectCycleRange: [
            { required: true, message: "请选择项目周期", trigger: "change" },
          ],
        },
        rules4: {
          allTime: [
            { required: true, message: "请选择发表日期", trigger: "change" },
          ],
          otherClassId: [
            { required: true, message: "请输入成果类型", trigger: "change" },
          ],
          otherName: [
            { required: true, message: "请输入成果名称", trigger: "blur" },
          ],
          otherNumber: [
            { required: true, message: "请输入成果编号", trigger: "blur" },
          ],
          projectName: [
            { required: true, message: "请输入所属项目名称", trigger: "blur" },
          ],
          projectSource: [
            { required: true, message: "请输入项目来源", trigger: "blur" },
          ],
          projectClassId: [
            { required: true, message: "请选择项目类别", trigger: "change" },
          ],
          projectCycleRange: [
            { required: true, message: "请选择项目周期", trigger: "change" },
          ],
        },
        rules5: {
          reservationTime: [
            { required: true, message: "请选择拟产出成果时间", trigger: "change" },
          ],
          reservationClassId: [
            { required: true, message: "请选择拟产出成果类别", trigger: "change" },
          ],
          reservationNum: [
            { required: true, message: "请输入拟产出成果数量", trigger: "blur" },
          ],
          reservationDescribe: [
            { required: true, message: "请输入拟产出成果描述", trigger: "blur" },
          ],
          researchField: [
            { required: true, message: "请输入研究领域", trigger: "blur" },
          ],
          projectName: [
            { required: true, message: "请输入所属项目名称", trigger: "blur" },
          ],
          projectSource: [
            { required: true, message: "请输入项目来源", trigger: "blur" },
          ],
          projectClassId: [
            { required: true, message: "请选择项目类别", trigger: "change" },
          ],
          researchProgress: [
            { required: true, message: "请输入研究进展", trigger: "blur" },
          ],
        },
        projectClassList: [],
        journalPartitionList: [],
        patentClassList: [],
        prizeClassList: [],
        reservationClassList: [],
        correlationClassList: [],
        showResetPassword: false
      }
    },
    mounted() {
      this.memberUserId = this.$route.params.id
      this.getUserDetail()
      this.getClassList()
      this.getList1()
      this.getList2()
      this.getList3()
      this.getList4()
      this.getList5()
      this.getList6()
      this.getList7()
      this.getList8()
      this.getList9()
      this.getList10()
    },
    methods: {
      submitAllForm(){
        this.form.userAttributeId = this.form.userAttributeId.join(',')
        this.form.userRoleId = this.form.userRoleId.join(',')
        this.form.companyId = this.form.companyIds[0]
        this.form.companyTwoId = this.form.companyIds[1]
        console.log(this.form)
        updateCsOrderMemberUser({ ...this.form }).then(res => {
          if (res.code == 200) {
            this.$message({
              message: '修改成功',
              type: 'success'
            })
            this.getUserDetail()
          }
        })
      },
      resetPassword() {
        this.showResetPassword = true
        this.form.password = ''
      },
      submitResetPassword() {
        if (!this.form.password) {
          this.$message({
            message: '密码不能为空',
            type: 'error'
          })
          return
        }
        if (this.form.password.length < 6 || this.form.password.length > 25) {
          this.$message({
            message: '长度在 6 到 25 个字符',
            type: 'error'
          })
          return
        }
        if (!(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[\W_]).{1,}$/).test(this.form.password)) {
          this.$message({
            message: '密码至少包含1个字母、数字、特殊字符',
            type: 'error'
          })
          return
        }
        resetPassword({
          memberUserId: this.memberUserId,
          password: this.form.password
        }).then(res => {
          this.$message({
            message: '重置密码成功',
            type: 'success'
          })
          this.showResetPassword = false
          this.getUserDetail()
        })
      },
      getUserDetail() {
        getCsOrderMemberUser(this.memberUserId).then(response => {
          this.form = response.data;
          this.form.userAttributeId = response.data.userAttributeId ? response.data.userAttributeId.split(',') : []
          this.form.userRoleId = response.data.userRoleId ? response.data.userRoleId.split(',') : []
          this.form.companyIds = [this.form.companyId, this.form.companyTwoId]
        });
      },
      goCompany() {
        this.$router.push({ name: 'firstUnitDetail', params: { id: this.form.companyId } })
      },
      getClassList() {
        listDataTree({ dictType: 'cs_company_name' }).then(response => {
          this.companyNameList = response.rows
        });

        getClassListByMark({ classMark: 'correlationClass' }).then(res => {
          this.correlationClassList = res.data
        })
        getClassListByMark({ classMark: 'projectClass' }).then(res => {
          this.projectClassList = res.data
        })
        getClassListByMark({ classMark: 'journalPartition' }).then(res => {
          this.journalPartitionList = res.data
        })
        getClassListByMark({ classMark: 'patentClass' }).then(res => {
          this.patentClassList = res.data
        })
        getClassListByMark({ classMark: 'prizeClass' }).then(res => {
          this.prizeClassList = res.data
        })
        getClassListByMark({ classMark: 'reservationClass' }).then(res => {
          this.reservationClassList = res.data
        })
      },

      getList1() {
        listCsResourceOrderApply({
          pageNum: this.pageNum1,
          pageSize: this.pageSize,
          applyType: '1',
          memberUserId: this.memberUserId,
        }).then(response => {
          this.workOrderList = response.rows;
          this.total1 = response.total;
        });
      },
      getList2() {
        listCsResourceOrderApply({
          pageNum: this.pageNum2,
          pageSize: this.pageSize,
          applyType: '0',
          memberUserId: this.memberUserId
        }).then(response => {
          this.resourceList = response.rows;
          this.total2 = response.total;
        });
      },

      addAchievementsModal() {
        this.showAchievement = true;
        this.title = "添加科研成果";
      },
      cancel() {
        this.showAchievement = false
        this.paperAchievementList = []
        this.patentAchievementList = []
        this.prizeAchievementList = []
        this.otherAchievementList = []
        this.reservationAchievementList = []
      },
      projectCycleRangeChange(type, index, valueList) {
        this[type][index].projectCycleBegin = valueList[0]
        this[type][index].projectCycleEnd = valueList[1]
      },
      addPaper() {
        if (this.paperAchievementList.length == 0) {
          this.paperAchievementList.push({
            sort: this.paperAchievementList.length + 1,
            allTime: '',
            articleTitle: '',
            leadAuthor: '',
            doi: '',
            journalName: '',
            journalPartitionId: '',
            impactFactors: '',
            projectName: '',
            projectNumber: '',
            projectSource: '',
            projectClassId: '',
            projectCycleRange: [],
            projectCycleBegin: '',
            projectCycleEnd: '',
            correlationClassId: '',
            isNote: '',
          })
        } else {
          let index = this.paperAchievementList.length - 1
          eval('this.$refs.paperAchievement' + index)[0].validate(valid => {
            if (valid) {
              this.paperAchievementList.push({
                sort: this.paperAchievementList.length + 1,
                allTime: '',
                articleTitle: '',
                leadAuthor: '',
                doi: '',
                journalName: '',
                journalPartitionId: '',
                impactFactors: '',
                projectName: '',
                projectNumber: '',
                projectSource: '',
                projectClassId: '',
                projectCycleRange: [],
                projectCycleBegin: '',
                projectCycleEnd: '',
                correlationClassId: '',
                isNote: ''
              })
              console.log(this.paperAchievementList)
            } else {
              this.$message({
                message: '有未填写的必填项',
                type: 'warning'
              })
            }
          })
        }
      },
      delPaper(index, item) {
        if (item.delFlag == undefined) {
          this.paperAchievementList.splice(index, 1)
        } else {
          console.log(item)
          this.paperAchievementList[index].delFlag = '1'
        }
      },
      addPatent() {
        if (this.patentAchievementList.length == 0) {
          this.patentAchievementList.push({
            sort: this.patentAchievementList.length + 1,
            allTime: '',
            patentClassId: '',
            patentName: '',
            patentNumber: '',
            leadAuthor: '',
            projectName: '',
            projectNumber: '',
            projectSource: '',
            projectClassId: '',
            projectCycleRange: [],
            projectCycleBegin: '',
            projectCycleEnd: '',
            correlationClassId: ''
          })
        } else {
          let index = this.patentAchievementList.length - 1
          eval('this.$refs.patentAchievement' + index)[0].validate(valid => {
            if (valid) {
              this.patentAchievementList.push({
                sort: this.patentAchievementList.length + 1,
                allTime: '',
                patentClassId: '',
                patentName: '',
                patentNumber: '',
                leadAuthor: '',
                projectName: '',
                projectNumber: '',
                projectSource: '',
                projectClassId: '',
                projectCycleRange: [],
                projectCycleBegin: '',
                projectCycleEnd: '',
                correlationClassId: ''
              })
            } else {
              this.$message({
                message: '有未填写的必填项',
                type: 'warning'
              })
            }
          })
        }
      },
      delPatent(index, item) {
        if (item.delFlag == undefined) {
          this.patentAchievementList.splice(index, 1)
        } else {
          this.patentAchievementList[index].delFlag = '1'
        }
      },
      addAward() {
        if (this.prizeAchievementList.length == 0) {
          this.prizeAchievementList.push({
            sort: this.prizeAchievementList.length + 1,
            allTime: '',
            leadAuthor: '',
            prizeClassId: '',
            prizeName: '',
            prizeTitle: '',
            projectName: '',
            projectNumber: '',
            projectSource: '',
            projectClassId: '',
            projectCycleRange: [],
            projectCycleBegin: '',
            projectCycleEnd: '',
            correlationClassId: ''
          })
        } else {
          let index = this.prizeAchievementList.length - 1
          eval('this.$refs.prizeAchievement' + index)[0].validate(valid => {
            if (valid) {
              this.prizeAchievementList.push({
                sort: this.prizeAchievementList.length + 1,
                allTime: '',
                leadAuthor: '',
                prizeClassId: '',
                prizeName: '',
                prizeTitle: '',
                projectName: '',
                projectNumber: '',
                projectSource: '',
                projectClassId: '',
                projectCycleRange: [],
                projectCycleBegin: '',
                projectCycleEnd: '',
                correlationClassId: ''
              })
            } else {
              this.$message({
                message: '有未填写的必填项',
                type: 'warning'
              })
            }
          })
        }
      },
      delAward(index, item) {
        if (item.delFlag == undefined) {
          this.prizeAchievementList.splice(index, 1)
        } else {
          this.prizeAchievementList[index].delFlag = '1'
        }
      },
      addOtherAchievements() {
        if (this.otherAchievementList.length == 0) {
          this.otherAchievementList.push({
            sort: this.otherAchievementList.length + 1,
            allTime: '',
            leadAuthor: '',
            otherClassId: '',
            otherName: '',
            otherNumber: '',
            projectName: '',
            projectNumber: '',
            projectSource: '',
            projectClassId: '',
            projectCycleRange: [],
            projectCycleBegin: '',
            projectCycleEnd: '',
            correlationClassId: ''
          })
        } else {
          let index = this.otherAchievementList.length - 1
          eval('this.$refs.otherAchievement' + index)[0].validate(valid => {
            if (valid) {
              this.otherAchievementList.push({
                sort: this.otherAchievementList.length + 1,
                allTime: '',
                leadAuthor: '',
                otherClassId: '',
                otherName: '',
                otherNumber: '',
                projectName: '',
                projectNumber: '',
                projectSource: '',
                projectClassId: '',
                projectCycleRange: [],
                projectCycleBegin: '',
                projectCycleEnd: '',
                correlationClassId: ''
              })
            } else {
              this.$message({
                message: '有未填写的必填项',
                type: 'warning'
              })
            }
          })
        }
      },
      delOtherAchievements(index, item) {
        if (item.delFlag == undefined) {
          this.otherAchievementList.splice(index, 1)
        } else {
          this.otherAchievementList[index].delFlag = '1'
        }
      },
      addAppointmentResults() {
        if (this.reservationAchievementList.length == 0) {
          this.reservationAchievementList.push({
            sort: this.reservationAchievementList.length + 1,
            researchField: '',
            researchProgress: '',
            reservationTime: '',
            reservationClassId: '',
            reservationNum: '',
            reservationDescribe: '',
            projectName: '',
            projectNumber: '',
            projectSource: '',
            projectClassId: '',
            correlationClassId: ''
          })
        } else {
          let index = this.reservationAchievementList.length - 1
          eval('this.$refs.reservationAchievement' + index)[0].validate(valid => {
            if (valid) {
              this.reservationAchievementList.push({
                sort: this.reservationAchievementList.length + 1,
                researchField: '',
                researchProgress: '',
                reservationTime: '',
                reservationClassId: '',
                reservationNum: '',
                reservationDescribe: '',
                projectName: '',
                projectNumber: '',
                projectSource: '',
                projectClassId: '',
                correlationClassId: ''
              })
            } else {
              this.$message({
                message: '有未填写的必填项',
                type: 'warning'
              })
            }
          })
        }
      },
      delAppointmentResults(index, item) {
        if (item.delFlag == undefined) {
          this.reservationAchievementList.splice(index, 1)
        } else {
          this.reservationAchievementList[index].delFlag = '1'
        }
      },
      submitForm() {
        this.form.paperAchievementList = this.paperAchievementList
        this.form.patentAchievementList = this.patentAchievementList
        this.form.prizeAchievementList = this.prizeAchievementList
        this.form.otherAchievementList = this.otherAchievementList
        this.form.reservationAchievementList = this.reservationAchievementList
        addCsAchievementInfoDetails(this.form).then(response => {
          this.$modal.msgSuccess("新增成功");
          this.showAchievement = false;
        });
      },
      getList3() {
        // achievementList
        getUserAchievementNum({
          memberUserId: this.memberUserId
        }).then(res => {
          let arr = []
          arr.push(res.data)
          this.achievementList = arr
        })
      },

      addIncomeDetails() {
        this.incomeDetailsList.push({
          indexSort: this.incomeDetailsList.length + 1,
          projectName: null,
          paymentPerson: null,
          paymentCompany: null,
          annex: '',
          accountInfo: null,
          accountingAbstract: null,
          accountingTime: null,
          price: null,
          documentNumber: null,
          deliveryLocation: null,
          deviceName: null,
          resourceRemarks: null,
          deviceNumber: null,
          accountingClassId: null,
          operatorUser: null,
          deptId: null,
          remarks: null,
          memberUserId: this.memberUserId,
          isEdit: true
        })
      },
      handleUpdateIncomeDetails(row) {
        let arr = []
        arr = this.incomeDetailsList.map(v => {
          if (v.incomeDetailsId == row.incomeDetailsId) {
            v.isEdit = true
          } else {
            v.isEdit = false
          }
          return v
        })
        this.incomeDetailsList = JSON.parse(JSON.stringify(arr))
      },
      saveIncomeDetails(row) {
        if (row.incomeDetailsId != null) {
          updateCsIncomeDetails(row).then(response => {
            this.$modal.msgSuccess("修改成功");
            this.getList4();
          });
        } else {
          addCsIncomeDetails(row).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.getList4();
          });
        }
      },
      /** 删除按钮操作 */
      handleDeleteIncomeDetails(row) {
        if (!row.indexSort) {
          const incomeDetailsIds = row.incomeDetailsId;
          this.$modal.confirm('是否确认删除收入明细编号为"' + incomeDetailsIds + '"的数据项？').then(function () {
            return delCsIncomeDetails(incomeDetailsIds);
          }).then(() => {
            this.getList4();
            this.$modal.msgSuccess("删除成功");
          }).catch(() => { });
        } else {
          this.incomeDetailsList.pop()
        }
      },
      getList4() {
        listCsIncomeDetails({
          pageNum: this.pageNum4,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.incomeDetailsList = res.rows
            this.total4 = res.total;
          }
        })
      },

      addContractDetails() {
        this.contractDetailsList.push({
          indexSort: this.contractDetailsList.length + 1,
          departmentContractNumber: null,
          contractNumber: null,
          signingTime: null,
          endTime: null,
          contractName: null,
          contractPrice: null,
          contractClassName: null,
          demandingSide: null,
          supplier: null,
          companyClassName: null,
          warehousingTotal: null,
          isOriginal: null,
          lackReason: null,
          annexUrl: '',
          warehousingTime: null,
          archiveLocation: null,
          content: null,
          memberUserId: this.memberUserId,
          isEdit: true
        })
      },
      handleUpdateContractDetails(row) {
        let arr = []
        arr = this.contractDetailsList.map(v => {
          if (v.contractDetailsId == row.contractDetailsId) {
            v.isEdit = true
          } else {
            v.isEdit = false
          }
          return v
        })
        this.contractDetailsList = JSON.parse(JSON.stringify(arr))
      },
      saveContractDetails(row) {
        if (row.contractDetailsId != null) {
          updateCsContractDetails(row).then(response => {
            this.$modal.msgSuccess("修改成功");
            this.getList5();
          });
        } else {
          addCsContractDetails(row).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.getList5();
          });
        }
      },
      
      /** 删除按钮操作 */
      handleDeleteContractDetails(row) {
        if (!row.indexSort) {
          const contractDetailsIds = row.contractDetailsId;
          this.$modal.confirm('是否确认删除合同信息详情编号为"' + contractDetailsIds + '"的数据项？').then(function () {
            return delCsContractDetails(contractDetailsIds);
          }).then(() => {
            this.getList5();
            this.$modal.msgSuccess("删除成功");
          }).catch(() => { });
        } else {
          this.contractDetailsList.pop()
        }
      },
      getList5() {
        listCsContractDetails({
          pageNum: this.pageNum5,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.contractDetailsList = res.rows
            this.total5 = res.total;
          }
        })
      },

      addExpandInteract() {
        this.expandInteractList.push({
          indexSort: this.expandInteractList.length + 1,
          projectName: null,
          paymentPerson: null,
          paymentCompany: null,
          annex: null,
          accountInfo: null,
          accountingAbstract: null,
          accountingTime: null,
          price: null,
          documentNumber: null,
          deliveryLocation: null,
          deviceName: null,
          resourceRemarks: null,
          deviceNumber: null,
          accountingClassId: null,
          operatorUser: null,
          deptId: null,
          remarks: null,
          memberUserId: this.memberUserId,
          isEdit: true
        })
      },
      handleUpdateExpandInteract(row) {
        let arr = []
        arr = this.expandInteractList.map(v => {
          if (v.expandInteractId == row.expandInteractId) {
            v.isEdit = true
          } else {
            v.isEdit = false
          }
          return v
        })
        this.expandInteractList = JSON.parse(JSON.stringify(arr))
      },
      saveExpandInteract(row) {
        if (row.expandInteractId != null) {
          updateCsExpandInteract(row).then(response => {
            this.$modal.msgSuccess("修改成功");
            this.getList6();
          });
        } else {
          addCsExpandInteract(row).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.getList6();
          });
        }
      },
      
      /** 删除按钮操作 */
      handleDeleteExpandInteract(row) {
        if (!row.indexSort) {
          const expandInteractIds = row.expandInteractId || this.ids;
          this.$modal.confirm('是否确认删除拓展交流编号为"' + expandInteractIds + '"的数据项？').then(function () {
            return delCsExpandInteract(expandInteractIds);
          }).then(() => {
            this.getList6();
            this.$modal.msgSuccess("删除成功");
          }).catch(() => { });
        } else {
          this.expandInteractList.pop()
        }
      },
      getList6() {
        listCsExpandInteract({
          pageNum: this.pageNum6,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.expandInteractList = res.rows
            this.total6 = res.total;
          }
        })
      },
      getList7() {
        listCsMessageRecord({
          pageNum: this.pageNum7,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.messageRecordList = res.rows
            this.total7 = res.total;
          }
        })
      },
      getList8() {
        listCsProjectRecord({
          pageNum: this.pageNum5,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.projectRecordList = res.rows
            this.total5 = res.total;
          }
        })
      },
      getList9() {
        paymentDetailsList({
          pageNum: this.pageNum5,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.rechargeList = res.rows
            this.total9 = res.total;
          }
        })
      },
      getList10() {
        selectTeamMemberList({
          pageNum: this.pageNum10,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.teamList = res.rows
            this.total10 = res.total;
          }
        })
      },
      getList11() {
        listCsContractDetails({
          pageNum: this.pageNum5,
          pageSize: this.pageSize,
          memberUserId: this.memberUserId
        }).then(res => {
          if (res.code == 200) {
            this.contractDetailsList = res.rows
            this.total5 = response.total;
          }
        })
      },

      /** 修改按钮操作 */
      handleUpdate(row) {
        const applyId = row.applyId
        if (row.applyType == '1') {
          this.$store.commit('SET_workOrderId', { applyId, type: 0 });
          this.$router.push({ name: 'workOrderApplication', params: { applyId } })
        } else {
          this.$router.push({ name: 'hpcApplication', params: { applyId } })
        }
      },

      handleUpdateMessageRecord(row) {

      },
      /** 删除按钮操作 */
      handleDeleteMessageRecord(row) {
        const messageRecordIds = row.messageRecordId || this.ids;
        this.$modal.confirm('是否确认删除短信通知记录编号为"' + messageRecordIds + '"的数据项？').then(function () {
          return delCsMessageRecord(messageRecordIds);
        }).then(() => {
          this.getList7();
          this.$modal.msgSuccess("删除成功");
        }).catch(() => { });
      },
      handleUpdateProjectRecord(row) {
        this.show = true
      },
      /** 删除按钮操作 */
      handleDeleteProjectRecord(row) {
        const projectRecordIds = row.projectRecordId || this.ids;
        this.$modal.confirm('是否确认删除项目记录编号为"' + projectRecordIds + '"的数据项？').then(function () {
          return delCsProjectRecord(projectRecordIds);
        }).then(() => {
          this.getList8();
          this.$modal.msgSuccess("删除成功");
        }).catch(() => { });
      },
      handleUpdateTeam(row) {

      },
      handleDeleteTeam(row) {

      },
      handleUpdatereSource(row) {

      },
    },
  }
</script>

<style scoped>
  .pageTitle {
    margin-left: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333333;
    font-weight: bold;
  }

  .formStyle {
    display: flex;
    flex-wrap: wrap;
  }

  .module1 {
    height: auto;
    margin-bottom: 10px;
    padding: 16px 16px 20px 16px;
    background: #FFFFFF;
    border-radius: 4px;
  }

  .moduleTitle {
    height: 22px;
    margin-bottom: 10px;
    margin-left: 6px;
    font-weight: bold;
    font-size: 16px;
    color: #0051AA;
    line-height: 22px;
    text-align: left;
    font-style: normal;
    text-transform: none;
  }

  .formStyle1 {
    display: flex;
    flex-wrap: wrap;
  }

  .paperAchievements {
    padding-bottom: 30px;
  }

  .smallTitle {
    font-weight: bold;
    padding-left: 6px;
  }

  .numberDeletion {
    display: flex;
    justify-content: space-around;
  }

  .addAchievements {
    height: 50px;
    text-align: center;
    line-height: 50px;
    color: #0051AA;
    border: 1px dashed #0051AA;
    margin: 10px 0;
    cursor: pointer;
  }

  .secondTitle2>div:nth-of-type(1) {
    color: #0051AA;
    font-weight: bold;
    margin-bottom: 10px;
  }

  .agreePromoteStyle>span {
    padding-right: 20px;
  }
  .footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
  }
</style>