Browse Source

管理员撤回签章功能

lizhenhao 2 years atrás
parent
commit
cecf2189f9

+ 7 - 0
src/api/cw/reportManagement/ProjectReportService.js

@@ -152,4 +152,11 @@ export default class ProjectReportService {
       responseType: 'blob'
     })
   }
+  rebackSign (id) {
+    return request({
+      url: '/cwProjectReport/rebackSign',
+      method: 'get',
+      params: {reportId: id}
+    })
+  }
 }

+ 22 - 0
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -205,6 +205,12 @@
 <!--              公章+执业章流程-->
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '0' || scope.row.status2 === '3')" type="text" size="small" @click="pushS2(scope.row)">公章+执业章</el-button>
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '2' || scope.row.status2 === '6' || scope.row.status2 === '7')" type="text" size="small" @click="rebackS2(scope.row)">撤回签章申请</el-button>
+<!--              签章撤回 (只有管理员在签章完成后可使用此功能)-->
+              <el-button v-if="(
+                                (scope.row.signatureType === '1' && scope.row.status1 === '5') ||
+                                (scope.row.signatureType === '2' && scope.row.status2 === '5') ||
+                                (scope.row.signatureType === '3' && scope.row.status3 === '5')
+                                ) && isAdmin" type="text" size="small" @click="rebackSign(scope.row)">撤回签章</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -908,6 +914,22 @@
             // console.log(err.response)
           }
         })
+      },
+      // 撤回签章
+      rebackSign (row) {
+        this.$confirm(`确定要撤回已完成的签章吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.projectReportService.rebackSign(row.id).then(() => {
+            this.refreshList()
+            this.$message.success('签章已撤回')
+          }).catch(() => {
+            this.refreshList()
+            this.$message.error('签章已撤回')
+          })
+        })
       }
     }
   }