Prechádzať zdrojové kódy

项目组成员权限

lizhenhao 2 rokov pred
rodič
commit
7756ce5a79

+ 6 - 0
src/api/cw/projectRecords/ProjectRecordsService.js

@@ -72,4 +72,10 @@ export default class ProjectRecordsService {
       data: inputForm
     })
   }
+  getHaveProjectIds () {
+    return request({
+      url: '/cwProjectRecords/getHaveProjectIds',
+      method: 'get'
+    })
+  }
 }

+ 12 - 2
src/views/modules/cw/projectRecords/ProjectMembersList.vue

@@ -72,7 +72,7 @@
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           <vxe-column title="操作" width="70px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin)" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
+              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">编辑</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -125,7 +125,8 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
-        isAdmin: false
+        isAdmin: false,
+        haveProjectIds: ''
       }
     },
     projectRecordsService: null,
@@ -194,6 +195,15 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
+          this.projectRecordsService.getHaveProjectIds().then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
           this.dataList = data.records
           this.tablePage.total = data.total
           this.loading = false

+ 13 - 3
src/views/modules/cw/projectRecords/ProjectRecordsList.vue

@@ -84,10 +84,10 @@
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           <vxe-column title="操作" width="150px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin)" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
 <!--              <el-button v-else-if="hasPermission('cwProjectRecords:edit')&&isAdmin" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>-->
 <!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>-->
-              <el-button v-if="hasPermission('cwProjectRecords:del')&&(scope.row.createBy.id === $store.state.user.id||isAdmin)" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cwProjectRecords:del')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
 <!--              <el-button v-else-if="hasPermission('cwProjectRecords:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3' ||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
             </template>
           </vxe-column>
@@ -141,7 +141,8 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
-        isAdmin: false
+        isAdmin: false,
+        haveProjectIds: ''
       }
     },
     projectRecordsService: null,
@@ -209,6 +210,15 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
+          this.projectRecordsService.getHaveProjectIds().then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
           this.dataList = data.records
           this.tablePage.total = data.total
           // this.tableKey = Math.random()

+ 19 - 6
src/views/modules/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -136,7 +136,7 @@
           <vxe-column min-width="200" align="center" title="归档时间" field="auditDate"></vxe-column>
           <vxe-column min-width="150" align="center" title="创建人" field="createBy.name"></vxe-column>
           <vxe-column min-width="200" align="center" title="创建时间" field="createDate"></vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
+          <vxe-column  min-width="110px"align="center" fixed="right" title="状态" field="status" >
             <template slot-scope="scope">
               <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
@@ -144,11 +144,11 @@
               </el-button>
             </template>
           </vxe-column>
-          <vxe-column title="操作" width="150px" fixed="right" align="center">
+          <vxe-column title="操作" width="70px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='0'||scope.row.status==='1'||scope.row.status==='3')" type="text"  size="small" @click="push(scope.row)">归档</el-button>
-              <el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改归档信息</el-button>
-              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&(scope.row.createBy.id === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&(scope.row.status==='0'||scope.row.status==='1'||scope.row.status==='3')" type="text"  size="small" @click="push(scope.row)">归档</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&(scope.row.createBy.id === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
 <!--              <el-button v-if="hasPermission('cwProjectReportArchive:del')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
 <!--              <el-button v-else-if="hasPermission('cwProjectReportArchive:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5'||scope.row.status==='4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
             </template>
@@ -180,6 +180,7 @@
   import ProjectRecordsForm from '../projectRecords/ProjectRecordsForm'
   import ProjectReportArchiveForm from './ProjectReportArchiveForm'
   import UserSelect from '@/components/userSelect'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   export default {
     data () {
       return {
@@ -211,14 +212,17 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
-        isAdmin: false
+        isAdmin: false,
+        haveProjectIds: ''
       }
     },
     projectReportArchiveService: null,
     taskService: null,
     processService: null,
     userService: null,
+    projectRecordsService: null,
     created () {
+      this.projectRecordsService = new ProjectRecordsService()
       this.projectReportArchiveService = new ProjectReportArchiveService()
       this.taskService = new TaskService()
       this.processService = new ProcessService()
@@ -278,6 +282,15 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
+          this.projectRecordsService.getHaveProjectIds().then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
           this.dataList = data.records
           this.tablePage.total = data.total
           // this.tableKey = Math.random()

+ 1 - 0
src/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom.vue

@@ -151,6 +151,7 @@
         this.loading = true
         if (this.commonJS.isNotEmpty(this.projectId)) {
           this.searchForm.projectId = this.projectId
+          this.searchForm.isTrue = '1'
           this.workClientService.list({
             'current': this.tablePage.currentPage,
             'size': this.tablePage.pageSize,

+ 44 - 27
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -110,7 +110,7 @@
 <!--          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>-->
           <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="复核状态" field="reviewStatus" >
+          <vxe-column  min-width="110px"align="center" fixed="right" title="复核状态" field="reviewStatus" >
             <template slot-scope="scope">
               <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.reviewStatus, '-')">
@@ -118,7 +118,7 @@
               </el-button>
             </template>
           </vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="签章状态" >
+          <vxe-column  min-width="110px"align="center" fixed="right" title="签章状态" >
             <template slot-scope="scope">
               <el-button v-if="scope.row.signatureType === '1'"  type="text" @click="detailS(scope.row)" effect="dark" size="mini"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status1, '-')">
@@ -137,23 +137,38 @@
 
           <vxe-column title="操作" width="150px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
-              <el-button v-else-if="hasPermission('cwProjectReport:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
-<!--              <el-button v-if="hasPermission('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>-->
-<!--              <el-button v-if="hasPermission('cwProjectReport:del')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
-              <el-button v-else-if="hasPermission('cwProjectReport:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cwProjectReport:edit')&&
+                              (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId))&&
+                              scope.row.status === '5'&&
+                              (scope.row.reviewStatus === '0' || scope.row.reviewStatus === '1' || scope.row.reviewStatus === '3' || scope.row.reviewStatus === '4' || scope.row.reviewStatus === '5' || commonJS.isEmpty(scope.row.reviewStatus)) &&
+                              (
+                              (scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3' || scope.row.status1 === '5')) ||
+                              (scope.row.signatureType === '2' && (scope.row.status2 === '0' || scope.row.status2 === '3' || scope.row.status2 === '5')) ||
+                              (scope.row.signatureType === '3' && (scope.row.status3 === '0' || scope.row.status3 === '3' || scope.row.status3 === '5'))
+                              )
+                              " type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cwProjectReport:del')&&
+                              (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId))&&
+                              scope.row.status === '5'&&
+                              (scope.row.reviewStatus === '0' || scope.row.reviewStatus === '1' || scope.row.reviewStatus === '3' || scope.row.reviewStatus === '4' || scope.row.reviewStatus === '5' || commonJS.isEmpty(scope.row.reviewStatus)) &&
+                              (
+                              (scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3' || scope.row.status1 === '5')) ||
+                              (scope.row.signatureType === '2' && (scope.row.status2 === '0' || scope.row.status2 === '3' || scope.row.status2 === '5')) ||
+                              (scope.row.signatureType === '3' && (scope.row.status3 === '0' || scope.row.status3 === '3' || scope.row.status3 === '5'))
+                              )
+                              " type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
 <!--              复核流程-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5'&& (scope.row.reviewStatus === '0' || scope.row.reviewStatus === '3' || scope.row.reviewStatus === '4' || scope.row.reviewStatus === undefined || scope.row.reviewStatus === '')" type="text" size="small" @click="pushF(scope.row)">复核</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5'&& scope.row.reviewStatus === '2'" type="text" size="small" @click="rebackF(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 === '0' || scope.row.reviewStatus === '3' || scope.row.reviewStatus === '4' || scope.row.reviewStatus === undefined || scope.row.reviewStatus === '')" type="text" size="small" @click="pushF(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 === '2'" type="text" size="small" @click="rebackF(scope.row)">撤回复核申请</el-button>
 <!--              公章流程-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3')" type="text" size="small" @click="pushS(scope.row)">公章</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(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 === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3')" type="text" size="small" @click="pushS(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 === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回签章申请</el-button>
 <!--              实体章流程-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '3' && (scope.row.status3 === '0' || scope.row.status3 === '3')" type="text" size="small" @click="pushS3(scope.row)">实体章</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '3' && scope.row.status3 === '2'" type="text" size="small" @click="rebackS3(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 === '3' && (scope.row.status3 === '0' || scope.row.status3 === '3')" type="text" size="small" @click="pushS3(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 === '3' && scope.row.status3 === '2'" type="text" size="small" @click="rebackS3(scope.row)">撤回签章申请</el-button>
 <!--              公章+执业章流程-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '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.status === '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="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>
             </template>
           </vxe-column>
         </vxe-table>
@@ -186,6 +201,7 @@
   import pick from 'lodash.pick'
   import UserService from '@/api/sys/UserService'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   export default {
     data () {
       return {
@@ -215,7 +231,8 @@
         processDefinitionSId: '',
         procDefSKey: '',
         processDefinitionSId2: '',
-        procDefSKey2: ''
+        procDefSKey2: '',
+        haveProjectIds: ''
       }
     },
     workClientService: null,
@@ -224,7 +241,9 @@
     taskService: null,
     processService: null,
     userService: null,
+    projectRecordsService: null,
     created () {
+      this.projectRecordsService = new ProjectRecordsService()
       this.workClientService = new WorkClientService()
       this.projectReportService = new ProjectReportService()
       this.reportReviewService = new ReportReviewService()
@@ -284,23 +303,21 @@
       // 获取数据列表
       refreshList () {
         this.loading = true
-        // this.workClientService.list({
-        //   'current': this.tablePage.currentPage,
-        //   'size': this.tablePage.pageSize,
-        //   'orders': this.tablePage.orders,
-        //   ...this.searchForm
-        // }).then(({data}) => {
-        //   this.dataList = data.records
-        //   this.tablePage.total = data.total
-        //   this.tableKey = Math.random()
-        //   this.loading = false
-        // })
         this.projectReportService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
+          this.projectRecordsService.getHaveProjectIds().then(({data}) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
           this.dataList = data.records
           this.tablePage.total = data.total
           this.tableKey = Math.random()

+ 1 - 1
src/views/modules/cw/workClientInfo/WorkClientChooseForm.vue

@@ -159,7 +159,7 @@
       list () {
         this.dataList = []
         this.loading = true
-        this.searchForm.status = '5'
+        this.searchForm.isTrue = '1'
         this.workClientService.listTree({
           'current': 1,
           'size': -1,

+ 1 - 1
src/views/modules/cw/workClientInfo/WorkClientChooseRadio.vue

@@ -145,7 +145,7 @@
       list () {
         this.dataList = []
         this.loading = true
-        this.searchForm.status = '5'
+        this.searchForm.isTrue = '1'
         this.workClientService.listTree({
           'current': 1,
           'size': -1,

+ 1 - 1
src/views/modules/cw/workClientInfo/WorkClientListForm.vue

@@ -148,7 +148,7 @@
       list () {
         this.dataList = []
         this.loading = true
-        this.searchForm.status = '5'
+        this.searchForm.isTrue = '1'
         this.workClientService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,