Browse Source

修改上报和填报

lcmxs 1 year ago
parent
commit
3f524d0e7b
2 changed files with 28 additions and 27 deletions
  1. 3 3
      src/api/portal/GATHER/GATHER.js
  2. 25 24
      src/views/GATHER/index.vue

+ 3 - 3
src/api/portal/GATHER/GATHER.js

@@ -64,9 +64,9 @@ export function getInfoByColl(id) {
 
 
 // 上报
-export function approve(data) {
+export function report(data) {
   return request({
-    url: '/gather/approve/',
+    url: '/gather/report',
     method: 'post',
     data: data
   })
@@ -74,7 +74,7 @@ export function approve(data) {
 
 
 // 提交审核
-export function report(data) {
+export function approve(data) {
   return request({
     url: '/gather/approve',
     method: 'post',

+ 25 - 24
src/views/GATHER/index.vue

@@ -68,12 +68,12 @@
           />
         </el-select>
       </el-form-item>
-	   <el-form-item label="年度" prop="acname">
+	   <el-form-item label="年度" prop="year">
         <el-input v-model="queryParams.year" placeholder="请输入年度"></el-input>
       </el-form-item>
-	   <el-form-item label="月份" prop="acname">
+	   <el-form-item label="月份" prop="month">
         <el-input v-model="queryParams.month" placeholder="请输入月份"></el-input>
-      </el-form-item>	  
+      </el-form-item>
       <el-form-item>
         <el-button
           type="primary"
@@ -123,7 +123,7 @@
     </el-row>
 
     <el-table
-      
+
       :data="GATHERList"
       @selection-change="handleSelectionChange"
       @row-click="showRow"
@@ -156,7 +156,7 @@
         <template slot-scope="scope">
           {{ scope.row.year }}
         </template>
-      </el-table-column>	  
+      </el-table-column>
       <el-table-column label="月份" align="center" prop="month">
         <template slot-scope="scope">
           {{ scope.row.month }}
@@ -203,34 +203,35 @@
             @click="handleUpdate(scope.row)"
             >录入</el-button
           >
-
-          <el-popconfirm
-            title="确定上报吗?"
-            @confirm="handleReport(scope.row)"
-          >
-            <el-button
-              style="margin: 0 2px"
-              v-if="scope.row.reportStatus == 0 && scope.row.collStatus == 1"
-              size="mini"
-              slot="reference"
-              type="text"
-              >上报</el-button
+          <template v-if="scope.row.reportStatus == 0 && scope.row.collStatus == 1">
+            <el-popconfirm
+              title="确定上报吗?"
+              @confirm="handleReport(scope.row)"
             >
-          </el-popconfirm>
+              <el-button
+                style="margin: 0 2px"
+                size="mini"
+                slot="reference"
+                type="text"
+              >上报</el-button
+              >
+            </el-popconfirm>
+          </template>
 
+          <template  v-if="scope.row.approveStatus == 0 && scope.row.collStatus == 1">
           <el-popconfirm
             title="确定提交吗?"
             @confirm="handleApprove(scope.row)"
           >
             <el-button
               style="margin: 0 2px"
-              v-if="scope.row.approveStatus == 0 && scope.row.collStatus == 1"
               size="mini"
               type="text"
               slot="reference"
               >提交审核</el-button
             >
           </el-popconfirm>
+          </template>
           <el-button
             style="margin: 0 2px"
             v-if="scope.row.collStatus == 1"
@@ -390,7 +391,7 @@
         :model="listItem"
         :ref="'form' + listIndex"
         :rules="rules"
-       
+
       >
         <!-- :rules="rules" ref="form" -->
         <el-form-item
@@ -398,14 +399,14 @@
           :label="listItem.normfeeName"
           :required="true"
           prop="collCalue"
-          
+
         >
           <!-- 这里科研失败!想动态绑定校验规则的 -->
           <!-- :prop="listItem.normfeeId" -->
           <!-- :rules="rules.listItem.normfeeId" -->
           <el-input
             v-model="listItem.collCalue"
-            :placeholder="'请输入' + listItem.normfeeName" 
+            :placeholder="'请输入' + listItem.normfeeName"
           ></el-input>
         </el-form-item>
       </el-form>
@@ -524,7 +525,7 @@ import axios from "axios";
 export default {
   name: "GATHER",
   data() {
-    
+
     return {
       edit: Boolean, //false 查看  true修改
       tabList: [],
@@ -682,8 +683,8 @@ export default {
     },
     //提交审核
     handleApprove(data) {
-      this.$modal.msgSuccess("提交审核成功");
       approve(data).then((res) => {
+        this.$modal.msgSuccess("提交审核成功");
         this.getList();
       });
     },