liuxiangqi пре 1 година
родитељ
комит
a6b828de25

+ 5 - 4
src/views/admin/project/index.vue

@@ -236,10 +236,11 @@
           })
       },
       handleAuditAdmin(row) {
-        this.auditVisible = true
-        this.$nextTick(() => {
-          this.$refs.auditProject.init(row.id)
-        })
+        this.$router.push({name: 'editProject', query: {id: row.id, entId: row.entId, type: 'view', oper: 'audit'}})
+        // this.auditVisible = true
+        // this.$nextTick(() => {
+        //   this.$refs.auditProject.init(row.id)
+        // })
       },
       handleDelete(row) {
         const id = row.id;

+ 18 - 3
src/views/enterprise/project/components/year-edit.vue

@@ -191,9 +191,10 @@
             </el-form-item>
           </el-col>
         </el-row>
-      </template>
+      </template>
+      
     </el-form>
-
+    <audit-project v-if="auditVisible" ref="auditProject" @refreshData="getList()"></audit-project>
   </div>
 </template>
 
@@ -203,11 +204,13 @@ import { techScopeOptions,yesOrNoOptions,businessIndustryOptions,booleanOptions
 import FileUpload from '@/components/FileUpload'
 import { listEntUserApi } from "@/api/ent/ent"
 import { validAmount,validNumber,validPercentage} from '@/utils/validate'
+import AuditProject from "./audit.vue"
 
 export default {
   name: "First",
   components: {
-    FileUpload
+    FileUpload,
+    AuditProject
   },
   props: {
     type: {
@@ -238,6 +241,9 @@ export default {
   },
   data() {
     return {
+      oper: this.$route.query.oper || "",
+      auditVisible: false,
+      year: this.$route.query.year || "",
       yearVisible: false,
       options: businessIndustryOptions,
       tableLoading: false,
@@ -365,8 +371,17 @@ export default {
     if(this.type == 'update') {
       this.yearVisible = true
     }
+    if(this.year) {
+      this.handleYear(this.year)
+    }
   },
   methods: {
+    handleAudit(type) {
+      this.auditVisible = true
+      this.$nextTick(() => {
+        this.$refs.auditProject.init(row.id)
+      })
+    },
     getYears(){
       let optionsArray = new Array();
       let years= new Date().getFullYear();

+ 24 - 3
src/views/enterprise/project/edit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container" v-loading="loading">
+  <div class="app-container" v-loading="loading">
     <el-tabs stretch v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="加计年度企业基本信息" name="1">
         <year-edit :type="type" :info.sync="form"></year-edit>
@@ -10,7 +10,11 @@
       <el-tab-pane label="上传文件" name="3" :disabled="encDisabled">
         <enclosure-edit :type="type"></enclosure-edit>
       </el-tab-pane>
-    </el-tabs>
+    </el-tabs>
+    <div class="oper" v-if="oper == 'audit'">
+      <el-button @click="handleAudit('4')">通过审核</el-button>
+      <el-button @click="handleAudit('1')">驳回</el-button>
+    </div>
   </div>
 </template>
 
@@ -19,7 +23,7 @@ import YearEdit from "./components/year-edit.vue"
 import EntEdit from "./components/ent-edit.vue"
 import EnclosureEdit from "./components/enclosure-edit.vue"
 import { devProjectApi } from "@/api/enterprise/project/project"
-
+import {submitDeclareApi} from "@/api/enterprise/declare/declare"
 export default {
   name: "projectEdit",
   computed: {
@@ -34,6 +38,7 @@ export default {
   },
   data() {
     return {
+      oper: this.$route.query.oper || "",
       activeName: "1",
       loading: false,
       id: undefined,
@@ -72,6 +77,22 @@ export default {
         this.form = res.data || {}
       })
     },
+    handleAudit(type) {
+      let _self = this
+      this.$confirm('是否确认提交审核该数据?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return submitDeclareApi(_self.id,type);
+        }).then(() => {
+          _self.$message({
+            message: '提交成功',
+            type: 'success'
+          });
+          _self.$router.go(-1)
+        })
+    },
   }
 };
 </script>

+ 1 - 1
src/views/index.vue

@@ -198,7 +198,7 @@ export default {
     },
     //编辑
     handleEdit(row) {
-      this.$router.push({name: 'editProject', query: {id: row.id, entId: row.entId, type: 'update', activeName: '1', source: 'add'}})
+      this.$router.push({name: 'editProject', query: {year: row.projectYear, entId: row.entId, type: 'update', activeName: '1', source: 'add'}})
     },
     getDeclareList() {
       this.loading = true;