| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 | 
							- <template>
 
-   <div class="app-container">
 
-     <el-form :model="queryParams" ref="queryForm" :inline="true" size="small">
 
-       <el-form-item label="项目编号" prop="projectNo">
 
-         <el-input v-model="queryParams.projectNo" style="width: 200px;" placeholder="请输入项目编号" clearable></el-input>
 
-       </el-form-item>
 
-       <el-form-item label="项目名称" prop="projectName">
 
-         <el-input v-model="queryParams.projectName" style="width: 200px;" placeholder="请输入项目名称" clearable></el-input>
 
-       </el-form-item>
 
-       <el-form-item>
 
-         <el-button type="primary" @click="handleQuery">搜索</el-button>
 
-         <el-button @click="resetQuery">重置</el-button>
 
-       </el-form-item>
 
-     </el-form>
 
-     <h3 class="toolbar">
 
-       <span class="title">列表</span>
 
-       <div class="tool">
 
-         <el-button type="text" style="color: red">当技术、财务资料达到 100%时,可提交项目申报</el-button>
 
-         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleYear" v-if="checkRole(['entAdmin'])">添加加计年度基本信息</el-button>
 
-         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-if="checkRole(['entAdmin'])">项目申报</el-button>
 
-         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownloadBatch">下载</el-button>
 
-         <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDel">批量删除</el-button>
 
-       </div>
 
-     </h3>
 
-     <el-table v-loading="loading" :data="list" border @selection-change="handleSelectionChange">
 
-       <el-table-column type="selection" width="55" align="center" />
 
-       <el-table-column type="index" width="50" label="序号"></el-table-column>
 
-       <el-table-column label="加计扣除年度" prop="projectYear" align="center"></el-table-column>
 
-       <el-table-column label="项目名称" prop="projectName" align="center" width="180"></el-table-column>
 
-       <el-table-column label="是否跨年项目" prop="overYearFlag" :formatter="overYearFormat"></el-table-column>
 
-       <!-- <el-table-column label="跨年申报" prop="backFlag"></el-table-column> -->
 
-       <el-table-column label="是否追溯项目" prop="backFlag" :formatter="flagFormat"></el-table-column>
 
-       <el-table-column label="项目起止时间" align="center" width="200">
 
-         <template slot-scope="scope">
 
-           <span>{{scope.row.projectStartDate}} - {{scope.row.projectEndDate}}</span>
 
-         </template>
 
-       </el-table-column>
 
-       <el-table-column label="资料完善度" prop="linkEmail" align="center" width="340">
 
-         <template slot-scope="scope">
 
-           <span>技术 {{scope.row.techCompRate}} 财务 {{scope.row.finCompRate}}</span>
 
-         </template>
 
-       </el-table-column>
 
-       <el-table-column label="申报状态" prop="reportState" align="center" width="160" :formatter="reportStateFormat"></el-table-column>
 
-       </el-table-column>
 
-       <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width" fixed="right">
 
-         <template slot-scope="scope">
 
-           <el-button type="text" @click="handleView(scope.row)" v-if="(!roleTypeFlag &&(scope.row.reportState == 3 || scope.row.reportState == 4)) || roleTypeFlag">查看</el-button>
 
-           <template v-if="scope.row.attachCnt != 0">
 
-             <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
 
-           </template>
 
-           <template v-if="!roleTypeFlag && (scope.row.reportState == 1 || scope.row.reportState == 2)">
 
-             <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
 
-             <el-button type="text" @click="handleDeclare(scope.row)">提交申报</el-button>
 
-             <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_ADMIN'">删除</el-button>
 
-           </template>
 
-         </template>
 
-       </el-table-column>
 
-     </el-table>
 
-     <pagination
 
-       v-show="total>0"
 
-       :total="total"
 
-       :page.sync="queryParams.pageNum"
 
-       :limit.sync="queryParams.pageSize"
 
-       @pagination="getList"/>
 
-       <add-project v-if="addProjectVisible" ref="addProject" @refreshData="getList()"></add-project>
 
-       <declare v-if="declareVisible" ref="declare" @refreshData="getList()"></declare>
 
-       <audit-project v-if="auditVisible" ref="auditProject" @refreshData="getList()"></audit-project>
 
-   </div>
 
- </template>
 
- <script>
 
-   import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
 
-   import {listProjectApi, deleteEntApi, deleteProjectApi} from '@/api/enterprise/project/project'
 
-   import {listProjectAdminApi} from '@/api/admin/project/project'
 
-   import {entStateOptions, getLabel, authStateOptions, reportStateOptions,booleanOptions} from '@/utils/dataFormat'
 
-   import AddProject from './components/addProject'
 
-   import declare from './components/declare'
 
-   import {projectAuditApi} from '@/api/admin/project/project'
 
-   import AuditProject from './components/audit'
 
-   import {downloadProjectByIDApi} from '@/api/common/common'
 
-   import { downLoadZip } from "@/utils/zipdownload";
 
-   import { checkRole } from "@/utils/permission"; // 权限判断函数
 
-   import {submitDeclareApi} from "@/api/enterprise/declare/declare"
 
-   export default {
 
-     components: {
 
-       AddProject,
 
-       declare,
 
-       AuditProject
 
-     },
 
-     // ADMIN,GOV_PROV,GOV_CITY,GOV_DISTRI,ENT_ADMIN,ENT_TECH,ENT_ADMIN_TECH,ENT_FIN,ENT_ADMIN_FIN
 
-     data () {
 
-       return {
 
-         years: [],
 
-         loading: false,
 
-         addProjectVisible: false,
 
-         declareVisible: false,
 
-         auditVisible: false,
 
-         ids: [],
 
-         selectCount: '',
 
-         provinceDataList: [],
 
-         cityDataList: [],
 
-         districtDataList: [],
 
-         entStateOptions: entStateOptions,
 
-         authStateOptions: authStateOptions,
 
-         // 模板状态
 
-         // statusOptions: accessStatus,
 
-         dateRange: [],
 
-         queryParams: {
 
-           pageNum: 1,
 
-           pageSize: 10,
 
-           provinceId: undefined,
 
-           cityId: undefined,
 
-           districtId: undefined,
 
-           entName: '',
 
-           year: '',
 
-           license: '',
 
-           projectNo: '',
 
-           projectName: ''
 
-         },
 
-         list: [],
 
-         total: 0,
 
-         open: false,
 
-         openInfo: false
 
-       }
 
-     },
 
-     computed: {
 
-       userType() {
 
-         return this.$store.state.user.userType
 
-       },
 
-       roleTypeFlag() {
 
-         let roleType = this.$store.state.user.userType
 
-         return ['ENT_ADMIN_TECH', 'ENT_ADMIN_FIN'].includes(roleType) //判断是否为技术负责人,财务负责人
 
-       }
 
-     },
 
-     created() {
 
-       this.getList()
 
-       this.getProvinceData()
 
-     },
 
-     methods: {
 
-       checkRole,
 
-       // 多选框选中数据
 
-       handleSelectionChange(selection) {
 
-         this.ids = selection.map(item => item.id)
 
-         this.selectCount = selection.length;
 
-       },
 
-       handleBatchDel() {
 
-         if(this.selectCount <= 0) {
 
-           this.$message.error('请选择要删除的数据');
 
-           return
 
-         }
 
-         const delIds = this.ids.join(',')
 
-         this.$confirm('是否确认删除该数据?', "警告", {
 
-             confirmButtonText: "确定",
 
-             cancelButtonText: "取消",
 
-             type: "warning"
 
-           }).then(function() {
 
-             return deleteProjectApi(delIds);
 
-           }).then(() => {
 
-             this.queryParams.pageNum = 1;
 
-             this.getList();
 
-             this.$message({
 
-               message: '删除成功',
 
-               type: 'success'
 
-             });
 
-           })
 
-       },
 
-       //选择省份
 
-       getCityData() {
 
-         this.queryParams.cityId = ''
 
-         this.queryParams.districtId = ''
 
-         getRegionChildrenApi(this.queryParams.provinceId).then(res => {
 
-           if(res.code == 200) {
 
-             this.cityDataList = res.data
 
-           }
 
-         })
 
-       },
 
-       //选择市
 
-       getDistrictData() {
 
-         this.queryParams.districtId = ''
 
-         getRegionChildrenApi(this.queryParams.cityId).then(res => {
 
-           if(res.code == 200) {
 
-             this.districtDataList = res.data
 
-           }
 
-         })
 
-       },
 
-       getProvinceData() {
 
-         getProvinceDataApi().then(res => {
 
-           if(res.code == 200) {
 
-             this.provinceDataList = res.data
 
-           }
 
-         })
 
-       },
 
-       getList() {
 
-         this.loading = true;
 
-         this.queryParams.year = this.years.join(',')
 
-         listProjectApi(this.queryParams).then(response => {
 
-           this.list = response.data.records;
 
-           this.total = response.data.total;
 
-           this.loading = false;
 
-         });
 
-       },
 
-       handleAdd() {
 
-         this.addProjectVisible = true
 
-         this.$nextTick(() => {
 
-           this.$refs.addProject.init()
 
-         })
 
-       },
 
-       handleDownload(row) {
 
-         downLoadZip('/project/download/' +row.id, "项目附件")
 
-       },
 
-       handleDownloadBatch() {
 
-         if(this.selectCount <= 0) {
 
-           this.$message.error('请选择要下载的项目');
 
-           return
 
-         }
 
-         const delIds = this.ids.join(',')
 
-         downLoadZip('/project/download/' +delIds, "项目附件")
 
-       },
 
-       //提交申报
 
-       handleDeclare(row) {
 
-         const id = row.id;
 
-         const reportState = '3'
 
-         this.$confirm('是否确认申报该数据?', "警告", {
 
-             confirmButtonText: "确定",
 
-             cancelButtonText: "取消",
 
-             type: "warning"
 
-           }).then(function() {
 
-             return submitDeclareApi(id, reportState);
 
-           }).then(() => {
 
-             this.queryParams.pageNum = 1;
 
-             this.getList();
 
-             this.$message({
 
-               message: '申报成功',
 
-               type: 'success'
 
-             });
 
-           })
 
-       },
 
-       //编辑
 
-       handleEdit(row) {
 
-         this.$router.push({name: 'editProject', query: {id: row.id, entId: row.entId, type: 'update', activeName: '2'}})
 
-       },
 
-       //添加年度信息 type用来区分tab页是否可以切换
 
-       handleYear() {
 
-         this.$router.push({name: 'editProject', query: {type: 'year'}})
 
-       },
 
-       // 查看
 
-       handleView(row) {
 
-         this.$router.push({name: 'editProject', query: {id: row.id, entId: row.entId, type: 'view'}})
 
-       },
 
-       handleDelete(row) {
 
-         const id = row.id;
 
-         this.$confirm('是否确认删除该数据?', "警告", {
 
-             confirmButtonText: "确定",
 
-             cancelButtonText: "取消",
 
-             type: "warning"
 
-           }).then(function() {
 
-             return deleteProjectApi(id);
 
-           }).then(() => {
 
-             this.queryParams.pageNum = 1;
 
-             this.getList();
 
-             this.$message({
 
-               message: '删除成功',
 
-               type: 'success'
 
-             });
 
-           })
 
-       },
 
-       // 重置
 
-       resetQuery() {
 
-         this.years = [];
 
-         this.resetForm("queryForm");
 
-         this.handleQuery();
 
-       },
 
-       // 搜索
 
-       handleQuery() {
 
-         this.queryParams.pageNum = 1;
 
-         this.getList();
 
-       },
 
-       reportStateFormat(row, col, val, index) {
 
-         return getLabel(reportStateOptions, val)
 
-       },
 
-       flagFormat(row, col, val, index) {
 
-         return getLabel(booleanOptions, val)
 
-       },
 
-       overYearFormat(row, col, val, index) {
 
-         return getLabel(booleanOptions, val)
 
-       }
 
-     }
 
-   }
 
- </script>
 
- <style>
 
- </style>
 
 
  |