浏览代码

2022.6.28 17:35

ggooalice 2 年之前
父节点
当前提交
1622d19d5b

+ 6 - 10
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -66,12 +66,12 @@
           </template>
 
         <!-- 按部门/项目筛选 -->
-        <el-select v-if="ins == 10" v-model="departmentOrProject" placeholder="请选择" size="small" @change="selcts(10)" style="margin-left:10px;width:120px">
+        <!-- <el-select v-if="ins == 10" v-model="departmentOrProject" placeholder="请选择" size="small" @change="selcts(10)" style="margin-left:10px;width:120px">
           <el-option label="查看项目审核人" :value="1"></el-option>
           <el-option label="查看部门审核人" :value="0"></el-option>
-        </el-select>
+        </el-select> -->
         <!-- 项目筛选 -->
-        <el-select v-if="(ins != 4 && ins != 8 && ins != 9 && ins != 10) || (ins == 10 && departmentOrProject == 1)" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
+        <el-select v-if="(ins != 4 && ins != 8 && ins != 9 && ins != 10) || ins == 10" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
           <el-option v-for="(item) in proListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
             <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
@@ -79,7 +79,7 @@
         </el-select>
           
           <!-- 部门筛选 -->
-          <el-cascader v-if="ins == 9 || ins == 8 || ins == 6 || (ins == 10 && departmentOrProject == 0)" v-model="departmentIdArray" :options="departmentList" placeholder="请选择部门"
+          <el-cascader v-if="ins == 9 || ins == 8 || ins == 6" v-model="departmentIdArray" :options="departmentList" placeholder="请选择部门"
             :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
             @change="selcts(9)" size="small" style="margin-left:10px"
           ></el-cascader>
@@ -1286,16 +1286,12 @@ export default {
         startDate: this.rangeDatas[0],
         endDate: this.rangeDatas[1],
         pageIndex: this.page,
-        pageSize: this.size,
-        stateKey: this.departmentOrProject
+        pageSize: this.size
       }
       if(this.userId){
         parameter.userId = this.userId
       }
-      if(this.departmentIdArray.length != 0 && this.departmentOrProject == 0){
-        parameter.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
-      }
-      if(this.proJuctId && this.departmentOrProject == 1){
+      if(this.proJuctId){
         parameter.projectId = this.proJuctId
       }
       this.listLoading = true

+ 11 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -1054,6 +1054,10 @@ a {
 
             // 批量添加项目参与人
             addProPreson(){
+                if(this.checkedProjectArr.length == 0){
+                    this.$message('请选择项目')
+                    return
+                }
                 this.addGroupPersonDialog = true
                 this.isAddGroupPerson = false
             },
@@ -1065,9 +1069,13 @@ a {
                     })
                     return
                 }
-                this.http.post('/project/batchAddMembToGroup',{
-                    membIdArray: JSON.stringify(this.addGroupPersonData.person),
-                    groupIds: JSON.stringify(groupList)
+                let proArr = []
+                for(let i=0;i<this.checkedProjectArr.length;i++){
+                    proArr.push(this.checkedProjectArr[i].id)
+                }
+                this.http.post('/project/batchSetParticipation',{
+                    userIds: JSON.stringify(this.addGroupPersonData.person),
+                    projectIdArray: JSON.stringify(proArr)
                 },res => {
                     if(res.code == 'ok'){
                         this.addGroupPersonDialog = false,

+ 5 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -451,6 +451,7 @@
                             }
                         }
                         this.projectss = res.data;
+                        this.project = res.data;
                         this.projectss = this.projectss.filter(p=>p.status == 1);
                         this.proads = res.data
                     } else {
@@ -514,8 +515,9 @@
                 domainItem.projectAuditorName = null;
                 domainItem.auditUserList = null;
                 //获取项目审核人
+                console.log(domainItem.projectId,this.project);
                 var curProject = this.project.filter(p=>p.id == domainItem.projectId)[0];
-                if (curProject.taskGpIncharge == 0) {
+                if (curProject && curProject.taskGpIncharge == 0) {
                     this.getProjectAuditorList(domainItem, index);
                 }
                 domainItem.taskGpIncharge = curProject.taskGpIncharge;
@@ -833,7 +835,7 @@
                 .then(res => {
                     if(res.code == "ok") {
                         this.$toast.clear();
-                        this.project = res.data;
+                        
                         
                         // if (this.project.length > 0) {
                         //     console.log('this.project[0].id=='+this.project[0].id);
@@ -1111,7 +1113,7 @@
                 
                 //检查当前的项目是否需要获取分组的负责人
                 var curProject = this.project.filter(p=>p.id == this.form.domains[this.clickIndex].projectId)[0];
-                if (curProject.taskGpIncharge == 1) {
+                if (curProject && curProject.taskGpIncharge == 1) {
                     this.$axios.post("/task-group/getGroupIncharger", {groupId: domainItem.groupId})
                     .then(res => {
                         if(res.code == "ok") {