<template>
  <el-dialog :title="enterpriseInfo.projectName + '文件上传'" :visible.sync="openCity" width="850px" append-to-body @close="close" :close-on-click-modal="false" :close-on-press-escape="false">
    <el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left" class="form">
      <el-row>
        <el-col :span="24" v-if="(enterpriseInfo.templateId == 2 )|| (enterpriseInfo.templateId == 4 ) || (enterpriseInfo.templateId == 5 ) || (enterpriseInfo.templateId == 6 ) || (enterpriseInfo.templateId == 8 ) ">
          <el-form-item :label="uploadLabel" label-width="350px"  prop="fileList">
            <div v-if="enterpriseInfo.templateId == 4" class="form_item">如不宜公开则上传封面及盖章页</div>
            <!-- 品牌打造奖补模版 -->
            <div v-if="enterpriseInfo.templateId == 5" class="form_item">上级发文、新闻报道、现场照片、发票</div>
            <!-- 场景开放模版 -->
            <div v-if="enterpriseInfo.templateId == 6" class="form_item">公示、发文证明、专家评分表</div>
            <el-upload
              class="upload-demo"
              :show-file-list="false"
              action=""
              accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
              :http-request="handleFileUpload"
              :file-list="fileList"
              :on-remove="handleRemove">
                <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
                <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileList.length >0" class="upload_ul">
              <li v-for="item in uploadList" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUpload(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 项目落户奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 1 " class="upload_col">
          <el-form-item label="招商协议" label-width="340px"  prop="fileListOne">
            <div class="form_item">如不宜公开则上传封面及盖章页</div>
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 1 " class="upload_col">
          <el-form-item label="验资报告" label-width="340px"  prop="fileListTwo">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 1 " class="upload_col">
          <el-form-item label="营业执照" label-width="340px"  prop="fileListThree">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 1 " class="upload_col">
          <el-form-item label="其他证明材料" label-width="340px"  prop="fileListFour">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadFour"
            :file-list="fileListFour"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListFour.length >0" class="upload_ul">
              <li v-for="item in uploadListFour" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadFour(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 载体建设奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 3 " class="upload_col">
          <el-form-item label="相关佐证材料" label-width="340px"  prop="fileListOne">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 3 " class="upload_col">
          <el-form-item label="项目工商登记许可" label-width="340px"  prop="fileListTwo">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 3 " class="upload_col">
          <el-form-item label="消防验收报告" label-width="340px"  prop="fileListThree">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 信用管理奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 7 " class="upload_col">
          <el-form-item label="项目方案" label-width="340px"  prop="fileListOne">
            <div class="form_item">包括项目基本情况、项目投资情况以及实施进展、项目目标及取得的主要成效</div>
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 7 " class="upload_col">
          <el-form-item label="资金使用说明" label-width="340px"  prop="fileListTwo">
            <div class="form_item">项目未完成的需提供，内容主要包括项目计划投资额，投资明细，目前已完成投资情况和后续投入计划等</div>
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 7 " class="upload_col">
          <el-form-item label="项目专项审计报告" label-width="340px"  prop="fileListThree">
            <div class="form_item">项目已完成的需提供</div>
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 制造服务业有效投入奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 9 " class="upload_col">
          <el-form-item label="企业投资项目备案通知书或核准批复文件" label-width="340px"  prop="fileListOne">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 9 " class="upload_col">
          <el-form-item label="购置设备发票清单及发票扫描件" label-width="340px"  prop="fileListTwo">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 9 " class="upload_col">
          <el-form-item label="会计师事务所出具的企业申报项目购置设备情况的专项审计报告" label-width="340px"  prop="fileListThree">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 9 " class="upload_col">
          <el-form-item label="会计师事务所出具的企业财务报表审计报告" label-width="340px"  prop="fileListFour">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadFour"
            :file-list="fileListFour"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListFour.length >0" class="upload_ul">
              <li v-for="item in uploadListFour" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadFour(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 物流发展奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 10 " class="upload_col">
          <el-form-item label="荣誉证明文件" label-width="340px"  prop="fileListOne">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 10 " class="upload_col">
          <el-form-item label="平台名称" label-width="340px"  prop="fileListTwo">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 10 " class="upload_col">
          <el-form-item label="企业投资项目备案通知书或核准批复文件" label-width="340px"  prop="fileListThree">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 10 " class="upload_col">
          <el-form-item label="会计师事务所出具的企业财务报表审计报告" label-width="340px"  prop="fileListFour">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadFour"
            :file-list="fileListFour"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListFour.length >0" class="upload_ul">
              <li v-for="item in uploadListFour" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadFour(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <!-- 物流发展奖补模版 -->
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="证明文件" label-width="340px"  prop="fileListOne">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadOne"
            :file-list="fileListOne"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListOne.length >0" class="upload_ul">
              <li v-for="item in uploadListOne" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadOne(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="营业执照" label-width="340px"  prop="fileListTwo">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadTwo"
            :file-list="fileListTwo"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListTwo.length >0" class="upload_ul">
              <li v-for="item in uploadListTwo" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadTwo(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="完税证明" label-width="340px"  prop="fileListThree">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadThree"
            :file-list="fileListThree"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListThree.length >0" class="upload_ul">
              <li v-for="item in uploadListThree" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadThree(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="审计报告" label-width="340px"  prop="fileListFour">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadFour"
            :file-list="fileListFour"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListFour.length >0" class="upload_ul">
              <li v-for="item in uploadListFour" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadFour(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="股权架构图" label-width="340px"  prop="fileListFive">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadFive"
            :file-list="fileListFive"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListFive.length >0" class="upload_ul">
              <li v-for="item in uploadListFive" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadFive(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="项目申报报告" label-width="340px"  prop="fileListSix">
            <div class="form_item">含企业基本情况和项目基本情况</div>
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadSix"
            :file-list="fileListSix"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListSix.length >0" class="upload_ul">
              <li v-for="item in uploadListSix" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadSix(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="独立核算相关证明" label-width="340px"  prop="fileListSeven">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadSeven"
            :file-list="fileListSeven"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListSeven.length >0" class="upload_ul">
              <li v-for="item in uploadListSeven" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL}}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadSeven(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="验资报告" label-width="340px"  prop="fileListEight">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadEight"
            :file-list="fileListEight"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListEight.length >0" class="upload_ul">
              <li v-for="item in uploadListEight" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name | dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadEight(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="enterpriseInfo.templateId == 11 " class="upload_col">
          <el-form-item label="其他证明材料" label-width="340px"  prop="fileListNine">
            <el-upload
            class="upload-demo"
            :show-file-list="false"
            action=""
            accept=".xlsx,.XLSX,.XSL,.doc,.xls,.ppt,.pdf,.png,.jpg,.jpeg,.rar,.zip,.docx"
            :http-request="handleFileUploadNine"
            :file-list="fileListNine"
            :on-remove="handleRemove">
              <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
              <div slot="tip" class="el-upload__tip">请上传格式为<span style="color: red;">doc/xls/ppt/pdf/png/jpg/jpeg/rar/zip/docx/xlsx</span>的文件</div>
            </el-upload>
            <ul v-if="fileListNine.length >0" class="upload_ul">
              <li v-for="item in uploadListNine" :key="item.url" class="upload_li">
                <img src="@/assets/images/uploadBgc.jpg" class="li_img" alt="">
                <span class="icon_name">{{ item.name |dealURL }}</span>
                <el-button type="text" style="color: red;" @click="deleteUploadNine(item)">删除</el-button>
              </li>
            </ul>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24" style="display: flex;justify-content: flex-end;margin-top: 10px">
          <el-button @click="close">关闭</el-button>
          <el-button type="primary" @click="submitForm">提交</el-button>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>
<script>
import { 
  getDeclarationRecords, 
  templateOneUpdata,
  templateTwoUpdata,
  templateThreeUpdata,
  templateFourUpdata,
  templateFiveUpdata,
  templateSixUpdata,
  templateSevenUpdata,
  templateEightUpdata, 
  templateNineUpdata,
  templateTenUpdata,
  templateElevenUpdata,
  uploadFile, 
} from "@/api/onlineDeclartion/declareAddContent"
import { dealFormatDate } from "@/utils/index.js"
export default {
  name:"updataChange",
  data() {
    return {
      openCity: false,
      enterpriseInfo: {},
      form:{
        fileList:[]
      },
      rules: {
        fileList: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListOne: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListTwo: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListThree: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListFour: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListFive: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListSix: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListSeven: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListEight: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
        fileListNine: [
          { required: true, message: "请上传协议", trigger: "blur" }
        ],
      },
      uploadLabel: null,
      fileList:[],
      fileListOne: [],
      fileListTwo: [],
      fileListThree: [],
      fileListFour: [],
      fileListFive: [],
      fileListSix: [],
      fileListSeven: [],
      fileListEight: [],
      fileListNine: [],
      // 上传列表
      uploadList: [],
      uploadListOne: [],
      uploadListTwo: [],
      uploadListThree: [],
      uploadListFour: [],
      uploadListFive: [],
      uploadListSix: [],
      uploadListSeven: [],
      uploadListEight: [],
      uploadListNine: [],
    }
  },
  filters: {
    dealURL : (value)=>{
      let arr = value.split("/")
      return arr[arr.length - 1]
    }
  },
  methods:{
    open(option){
      this.enterpriseInfo = option
      switch (this.enterpriseInfo.templateId){
        case 2:
          this.uploadLabel = '企业近3年发展情况及未来发展计划'
          break;
        case 4:
          this.uploadLabel = '合作协议'
          break;
        case 5:
          this.uploadLabel = '证明材料'
          break;
        case 6:
          this.uploadLabel = '证明材料'
          break;
        case 8:
          this.uploadLabel = '证明材料'
          break;
      }
      // console.log(this.enterpriseInfo.templateId,"uploadLabel");
      getDeclarationRecords({id:option.id}).then(response => {
        // console.log(response,"response");
        if(option.templateId == "1") {
          this.form = response.data.bmsProjectSettlementAwardQueryVo //1
          let agreement = this.form.agreement.split(',')
          let businessLicense = this.form.businessLicense.split(',')
          let otherMaterials = this.form.otherMaterials.split(',')
          let report = this.form.report.split(',')
          agreement.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          businessLicense.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          otherMaterials.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
          report.forEach(item => {
            this.uploadListFour.push({name: item,url: item})
            this.fileListFour = [...this.uploadListFour]
            this.form.fileListFour = [...this.uploadListFour]
          })
        }
        if(option.templateId == "2") {
          this.form = response.data.bmsBigStrongAwardQueryVo //2
          let developmentPlan = this.form.developmentPlan.split(',')
          developmentPlan.forEach(item => {
            this.uploadList.push({name: item,url: item})
            this.fileList = [...this.uploadList]
            this.form.fileList = [...this.uploadList]
          })
        }
        if(option.templateId == "3") {
          this.form = response.data.bmsCarrierConstructionAward //3
          let supportingMaterials = this.form.supportingMaterials.split(',')
          let businessLicense = this.form.businessLicense.split(',')
          let fireReport = this.form.fireReport.split(',')
          supportingMaterials.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          businessLicense.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          fireReport.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
        }
        if(option.templateId == "4") {
          this.form = response.data.bmsPlatformConstructionAward //4
          let agreement = this.form.agreement.split(',')
          agreement.forEach(item => {
            this.uploadList.push({name: item,url: item})
            this.fileList = [...this.uploadList]
            this.form.fileList = [...this.uploadList]
          })
        }
        if(option.templateId == "5") {
          this.form = {...response.data.bmsBrandingAward} //5
          this.form.level = this.form.level + ''
          let evidence = this.form.evidence.split(',')
          evidence.forEach(item => {
            this.uploadList.push({name: item,url: item})
            this.fileList = [...this.uploadList]
            this.form.fileList = [...this.uploadList]
          })
        }
        if(option.templateId == "6") {
          this.form = response.data.bmsSceneOpeningAward //6
          this.form.type = this.form.type + ''
          let material = this.form.material.split(',')
          material.forEach(item => {
            this.uploadList.push({name: item,url: item})
            this.fileList = [...this.uploadList]
            this.form.fileList = [...this.uploadList]
          })
        }
        if(option.templateId == "7") {
          this.form = response.data.bmsCreditManagement //7
          let projectPlan = this.form.projectPlan.split(',')
          let usesFunds = this.form.usesFunds.split(',')
          let auditReport = this.form.auditReport.split(',')
          projectPlan.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          usesFunds.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          auditReport.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
        }
        if(option.templateId == "8") {
          this.form = response.data.bmsIndustrialInternetAward //8
          let material = this.form.material.split(',')
          material.forEach(item => {
            this.uploadList.push({name: item,url: item})
            // console.log(this.uploadList);
            this.fileList = [...this.uploadList]
            this.form.fileList = [...this.uploadList]
          })
        }
        if(option.templateId == "9") {
          this.form = response.data.bmsManufacturingServicesAward //9
          let filingNotice = this.form.filingNotice.split(',')
          let invoice = this.form.invoice.split(',')
          let auditReport = this.form.auditReport.split(',')
          let financialStatements = this.form.financialStatements.split(',')
          filingNotice.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          invoice.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          auditReport.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
          financialStatements.forEach(item => {
            this.uploadListFour.push({name: item,url: item})
            this.fileListFour = [...this.uploadListFour]
            this.form.fileListFour = [...this.uploadListFour]
          })
        }
        if(option.templateId == "10") {
          this.form = response.data.bmsLogisticsDevelopmentAward //10
          let honorCertificate = this.form.honorCertificate.split(',')
          let platformName = this.form.platformName.split(',')
          let filingNotice = this.form.filingNotice.split(',')
          let auditReport = this.form.auditReport.split(',')
          honorCertificate.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          platformName.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          filingNotice.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
          auditReport.forEach(item => {
            this.uploadListFour.push({name: item,url: item})
            this.fileListFour = [...this.uploadListFour]
            this.form.fileListFour = [...this.uploadListFour]
          })
        }
        if(option.templateId == "11") {
          this.form = response.data.bmsIntegrationIndustries //11
          let evidence = this.form.evidence.split(',')
          let businessLicense = this.form.businessLicense.split(',')
          let taxPaymentCertificate = this.form.taxPaymentCertificate.split(',')
          let auditReport = this.form.auditReport.split(',')
          let equityStructureChart = this.form.equityStructureChart.split(',')
          let declarationReport = this.form.declarationReport.split(',')
          let independentAccounting = this.form.independentAccounting.split(',')
          let capitalVerificationReport = this.form.capitalVerificationReport.split(',')
          let otherEvidence = this.form.otherEvidence.split(',')
          evidence.forEach(item => {
            this.uploadListOne.push({name: item,url: item})
            this.fileListOne = [...this.uploadListOne]
            this.form.fileListOne = [...this.uploadListOne]
          })
          businessLicense.forEach(item => {
            this.uploadListTwo.push({name: item,url: item})
            this.fileListTwo = [...this.uploadListTwo]
            this.form.fileListTwo = [...this.uploadListTwo]
          })
          taxPaymentCertificate.forEach(item => {
            this.uploadListThree.push({name: item,url: item})
            this.fileListThree = [...this.uploadListThree]
            this.form.fileListThree = [...this.uploadListThree]
          })
          auditReport.forEach(item => {
            this.uploadListFour.push({name: item,url: item})
            this.fileListFour = [...this.uploadListFour]
            this.form.fileListFour = [...this.uploadListFour]
          })
          equityStructureChart.forEach(item => {
            this.uploadListFive.push({name: item,url: item})
            this.fileListFive = [...this.uploadListFive]
            this.form.fileListFive = [...this.uploadListFive]
          })
          declarationReport.forEach(item => {
            this.uploadListSix.push({name: item,url: item})
            this.fileListSix = [...this.uploadListSix]
            this.form.fileListSix = [...this.uploadListSix]
          })
          independentAccounting.forEach(item => {
            this.uploadListSeven.push({name: item,url: item})
            this.fileListSeven = [...this.uploadListSeven]
            this.form.fileListSeven = [...this.uploadListSeven]
          })
          capitalVerificationReport.forEach(item => {
            this.uploadListEight.push({name: item,url: item})
            this.fileListEight = [...this.uploadListEight]
            this.form.fileListEight = [...this.uploadListEight]
          })
          otherEvidence.forEach(item => {
            this.uploadListNine.push({name: item,url: item})
            this.fileListNine = [...this.uploadListNine]
            this.form.fileListNine = [...this.uploadListNine]
          })
        }
        this.openCity = true
      })
    },
    close(){
      this.openCity = false
      this.fileList = [];
      this.uploadList = [];
      this.fileListOne = [];
      this.fileListTwo = [];
      this.fileListThree = [];
      this.fileListFour = [];
      this.fileListFive = [];
      this.fileListSix = [];
      this.fileListSeven = [];
      this.fileListEight = [];
      this.fileListNine = [];
      this.uploadListOne = [];
      this.uploadListTwo = [];
      this.uploadListThree = [];
      this.uploadListFour = [];
      this.uploadListFive = [];
      this.uploadListSix = [];
      this.uploadListSeven = [];
      this.uploadListEight = [];
      this.uploadListNine = [];
      this.$refs.form.resetFields();
    },
    deleteUpload(value) {
      this.uploadList =  this.uploadList.filter(item => {
        return item.url != value.url
      })
    },
    handleRemove(file, fileList) {
      this.fileList = fileList
    },
    // 提交
    submitForm(){
      this.$refs["form"].validate(valid => {
        if (valid) {
          let params = {
            id: this.enterpriseInfo.detailId,
            agreement:'', //招商协议1
            businessLicense: '', //营业执照1,3,11
            otherMaterials: '',  //其它证明材料1
            report: '',  //验资报告1
            supportingMaterials: '',  //相关佐证材料3
            fireReport: '',  //消防验收报告3
            projectPlan: '',  //项目方案7
            usesFunds: '',  //资金使用说明7
            auditReport: '',  //项目专项审计报告7,9,10,11
            filingNotice: '',  //企业投资项目备案通知书或核准批复文件9,10
            invoice: '',  //购置设备发票清单及发票扫描件9
            financialStatements: '',  //会计师事务所出具的企业财务报表审计报告9
            material: '',  //证明材料6,8,11
            honorCertificate: '',  //荣誉证明文件10
            platformName: '',  //平台名称10
            evidence: '',  //证明文件11
            taxPaymentCertificate: '',  //完税证明11
            equityStructureChart: '',  //股权架构图11
            declarationReport: '',  //项目申报报告11
            independentAccounting: '',  //独立核算相关证明11
            capitalVerificationReport: '',  //验资报告11
            otherEvidence: '',  //其他证明材料11
          }
          if(this.enterpriseInfo.templateId == "1") {
            params.agreement = '' //招商协议
            params.businessLicense = '' //营业执照
            params.otherMaterials = ''  //其它证明材料
            params.report = ''  //验资报告
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.agreement+=`${item.url}`
              } else {
                params.agreement+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.report+=`${item.url}`
              } else {
                params.report+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.businessLicense+=`${item.url}`
              } else {
                params.businessLicense+=`${item.url},`
              }
            })
            this.uploadListFour.forEach((item,index) => {
              if(this.uploadListFour.length-1 == index){
                params.otherMaterials+=`${item.url}`
              } else {
                params.otherMaterials+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateOneUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.fileListFour = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.uploadListFour = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "2") {
            params.developmentPlan = ''
            this.uploadList.forEach((item,index) => {
              if(this.uploadList.length-1 == index){
                params.developmentPlan+=`${item.url}`
              } else {
                params.developmentPlan+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateTwoUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileList = [];
                this.uploadList = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "3") {
            params.quantityProportion = this.form.quantityProportion
            params.revenueProportion = this.form.revenueProportion
            params.personnelProportion = this.form.personnelProportion
            params.fillingTime = dealFormatDate(new Date())
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.supportingMaterials+=`${item.url}`
              } else {
                params.supportingMaterials+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.businessLicense+=`${item.url}`
              } else {
                params.businessLicense+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.fireReport+=`${item.url}`
              } else {
                params.fireReport+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateThreeUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "4") {
            params.agreement = ''
            this.uploadList.forEach((item,index) => {
              if(this.uploadList.length-1 == index){
                params.agreement+=`${item.url}`
              } else {
                params.agreement+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateFourUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileList = [];
                this.uploadList = [];
                this.$refs.form.resetFields();
              }
            })
          }
          if(this.enterpriseInfo.templateId == "5") {
            params.evidence = ''
            this.uploadList.forEach((item,index) => {
              if(this.uploadList.length-1 == index){
                params.evidence+=`${item.url}`
              } else {
                params.evidence+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateFiveUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileList = [];
                this.uploadList = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "6") {
            this.uploadList.forEach((item,index) => {
              if(this.uploadList.length-1 == index){
                params.material+=`${item.url}`
              } else {
                params.material+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateSixUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileList = [];
                this.uploadList = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "7") {
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.projectPlan+=`${item.url}`
              } else {
                params.projectPlan+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.usesFunds+=`${item.url}`
              } else {
                params.usesFunds+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.auditReport+=`${item.url}`
              } else {
                params.auditReport+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateSevenUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == '8') {
            this.uploadList.forEach((item,index) => {
              if(this.uploadList.length-1 == index){
                params.material+=`${item.url}`
              } else {
                params.material+=`${item.url},`
              }
            })
            templateEightUpdata(params).then(response=>{
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileList = [];
                this.uploadList = [];
                this.$refs.form.resetFields();
              }
            })
          }
          if(this.enterpriseInfo.templateId == "9") {
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.filingNotice+=`${item.url}`
              } else {
                params.filingNotice+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.invoice+=`${item.url}`
              } else {
                params.invoice+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.auditReport+=`${item.url}`
              } else {
                params.auditReport+=`${item.url},`
              }
            })
            this.uploadListFour.forEach((item,index) => {
              if(this.uploadListFour.length-1 == index){
                params.financialStatements+=`${item.url}`
              } else {
                params.financialStatements+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateNineUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.fileListFour = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.uploadListFour = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "10") {
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.honorCertificate+=`${item.url}`
              } else {
                params.honorCertificate+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.platformName+=`${item.url}`
              } else {
                params.platformName+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.filingNotice+=`${item.url}`
              } else {
                params.filingNotice+=`${item.url},`
              }
            })
            this.uploadListFour.forEach((item,index) => {
              if(this.uploadListFour.length-1 == index){
                params.auditReport+=`${item.url}`
              } else {
                params.auditReport+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateTenUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.fileListFour = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.uploadListFour = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
          if(this.enterpriseInfo.templateId == "11") {
            params.declarationType = this.form.declarationType
            params.fillingTime = dealFormatDate(new Date())
            this.uploadListOne.forEach((item,index) => {
              if(this.uploadListOne.length-1 == index){
                params.evidence+=`${item.url}`
              } else {
                params.evidence+=`${item.url},`
              }
            })
            this.uploadListTwo.forEach((item,index) => {
              if(this.uploadListTwo.length-1 == index){
                params.businessLicense+=`${item.url}`
              } else {
                params.businessLicense+=`${item.url},`
              }
            })
            this.uploadListThree.forEach((item,index) => {
              if(this.uploadListThree.length-1 == index){
                params.taxPaymentCertificate+=`${item.url}`
              } else {
                params.taxPaymentCertificate+=`${item.url},`
              }
            })
            this.uploadListFour.forEach((item,index) => {
              if(this.uploadListFour.length-1 == index){
                params.auditReport+=`${item.url}`
              } else {
                params.auditReport+=`${item.url},`
              }
            })
            this.uploadListFive.forEach((item,index) => {
              if(this.uploadListFive.length-1 == index){
                params.equityStructureChart+=`${item.url}`
              } else {
                params.equityStructureChart+=`${item.url},`
              }
            })
            this.uploadListSix.forEach((item,index) => {
              if(this.uploadListSix.length-1 == index){
                params.declarationReport+=`${item.url}`
              } else {
                params.declarationReport+=`${item.url},`
              }
            })
            this.uploadListSeven.forEach((item,index) => {
              if(this.uploadListSeven.length-1 == index){
                params.independentAccounting+=`${item.url}`
              } else {
                params.independentAccounting+=`${item.url},`
              }
            })
            this.uploadListEight.forEach((item,index) => {
              if(this.uploadListEight.length-1 == index){
                params.capitalVerificationReport+=`${item.url}`
              } else {
                params.capitalVerificationReport+=`${item.url},`
              }
            })
            this.uploadListNine.forEach((item,index) => {
              if(this.uploadListNine.length-1 == index){
                params.otherEvidence+=`${item.url}`
              } else {
                params.otherEvidence+=`${item.url},`
              }
            })
            // console.log('11', params);
            templateElevenUpdata(params).then((response) => {
              if(response.code == 200) {
                this.$message.success("修改成功");
                this.openCity = false;
                this.fileListOne = [];
                this.fileListTwo = [];
                this.fileListThree = [];
                this.fileListFour = [];
                this.fileListFive = [];
                this.fileListSix = [];
                this.fileListSeven = [];
                this.fileListEight = [];
                this.fileListNine = [];
                this.uploadListOne = [];
                this.uploadListTwo = [];
                this.uploadListThree = [];
                this.uploadListFour = [];
                this.uploadListFive = [];
                this.uploadListSix = [];
                this.uploadListSeven = [];
                this.uploadListEight = [];
                this.uploadListNine = [];
                this.$refs.form.resetFields();
              }
            }).catch((response) => {

            })
          }
        }
      })
    },
    handleFileUpload(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileList.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadList.push(data)
        this.form.fileList = this.fileList
      })
    },
    /* 上传一 */
    handleFileUploadOne(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListOne.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListOne.push(data)
        this.form.fileListOne = this.fileListOne
        // console.log('this.fileListOne: ', this.fileListOne);
      })
    },
    /* 上传二 */
    handleFileUploadTwo(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListTwo.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListTwo.push(data)
        this.form.fileListTwo = this.fileListTwo
        // console.log('this.fileListTwo: ', this.fileListTwo);
      })
    },
    /* 上传三 */
    handleFileUploadThree(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListThree.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListThree.push(data)
        this.form.fileListThree = this.fileListThree
        // console.log('this.fileListThree: ', this.fileListThree);
      })
    },
    /* 上传四 */
    handleFileUploadFour(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListFour.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListFour.push(data)
        this.form.fileListFour = this.fileListFour
        // console.log('this.fileListFour: ', this.fileListFour);
      })
    },
    /* 上传五 */
    handleFileUploadFive(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListFive.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListFive.push(data)
        this.form.fileListFive = this.fileListFive
        // console.log('this.fileListFive: ', this.fileListFive);
      })
    },
    /* 上传六 */
    handleFileUploadSix(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListSix.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListSix.push(data)
        this.form.fileListSix = this.fileListSix
        // console.log('this.fileListSix: ', this.fileListSix);
      })
    },
    /* 上传七 */
    handleFileUploadSeven(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListSeven.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListSeven.push(data)
        this.form.fileListSeven = this.fileListSeven
        // console.log('this.fileListSeven: ', this.fileListSeven);
      })
    },
    /* 上传八 */
    handleFileUploadEight(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListEight.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListEight.push(data)
        this.form.fileListEight = this.fileListEight
        // console.log('this.fileListEight: ', this.fileListEight);
      })
    },
    /* 上传九 */
    handleFileUploadNine(params) {
      // console.log('params: ', params);
      this.form.fileName = params.file.name
      const file = params.file
      let form = new FormData()
      form.append('file', file)
      uploadFile(form).then(response => {
        // this.fileList = []
        this.fileListNine.push(file)
        let data = {};
        data.name = response.originalFilename;
        data.url = response.url;
        this.uploadListNine.push(data)
        this.form.fileListNine = this.fileListNine
        // console.log('this.fileListNine: ', this.fileListNine);
      })
    },
    /* 删除上传一 */
    deleteUploadOne(value) {
      this.uploadListOne =  this.uploadListOne.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListOne.length == 0) {
        this.form.fileListOne = []
      }
    },
    /* 删除上传二 */
    deleteUploadTwo(value) {
      this.uploadListTwo =  this.uploadListTwo.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListTwo.length == 0) {
        this.form.fileListTwo = []
      }
    },
    /* 删除上传三 */
    deleteUploadThree(value) {
      this.uploadListThree =  this.uploadListThree.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListThree.length == 0) {
        this.form.fileListThree = []
      }
    },
    /* 删除上传四 */
    deleteUploadFour(value) {
      this.uploadListFour =  this.uploadListFour.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListFour.length == 0) {
        this.form.fileListFour = []
      }
    },
    /* 删除上传五 */
    deleteUploadFive(value) {
      this.uploadListFive =  this.uploadListFive.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListFive.length == 0) {
        this.form.fileListFive = []
      }
    },
    /* 删除上传六 */
    deleteUploadSix(value) {
      this.uploadListSix =  this.uploadListSix.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListSix.length == 0) {
        this.form.fileListSix = []
      }
    },
    /* 删除上传七 */
    deleteUploadSeven(value) {
      this.uploadListSeven =  this.uploadListSeven.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListSeven.length == 0) {
        this.form.fileListSeven = []
      }
    },
    /* 删除上传八 */
    deleteUploadEight(value) {
      this.uploadListEight =  this.uploadListEight.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListEight.length == 0) {
        this.form.fileListEight = []
      }
    },
    /* 删除上传九 */
    deleteUploadNine(value) {
      this.uploadListNine =  this.uploadListNine.filter(item => {
        return item.url != value.url
      })
      if(this.uploadListNine.length == 0) {
        this.form.fileListNine = []
      }
    },
  },
}
</script>
<style lang="scss" scoped>
ul, li {
list-style: none; /* 清除列表项前的标记 */
  margin: 0; /* 清除上下外边距 */
  padding: 0; /* 清除左右内边距 */
}
.upload_ul {
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  .upload_li {
    // width: 45%;
    display: flex;
    // justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    color: inherit;
    border: 1px solid #e4e7ed;
    border-radius: 2px;
    margin: 10px 20px 10px 0;
    .li_img {
      width: 25px;
      height: 30px;
      margin-right: 10px;
      padding: 2px;
    }
    .icon_name {
      text-overflow: ellipsis;
      overflow: hidden;
      word-wrap: break-word;
      white-space: nowrap;
    }
  }
}
.upload_col {
  // border-bottom: 1px solid #ebeef5;
  padding: 10px 30px;
}
.form_item {
  position: absolute;
  width: 300px;
  top: 40px;
  left: -340px;
  color: red;
  font-size: 12px;
  line-height: 24px;
}
</style>
