ggooalice 2 年之前
父節點
當前提交
4bcd0d0d2f

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

@@ -935,7 +935,7 @@
             </el-form-item>
           </el-form>
           <div slot="footer" class="dialog-footer" style="text-align: center;">
-            <el-button @click.native="quarterExport" type="primary">导出</el-button>
+            <el-button @click.native="quarterExport" :loading="exportLoading" type="primary">导出</el-button>
           </div>
         </el-dialog>
   </section>
@@ -1062,7 +1062,8 @@ export default {
       quarterParameter: {
         year: '2022',
         quarter: 1
-      }
+      },
+      exportLoading: false
     };
   },
   computed: {},
@@ -1421,6 +1422,11 @@ export default {
           sl.startDate = this.rangeDatas[0]
           sl.endDate = this.rangeDatas[1]
           sl.projectId = this.proJuctId
+          let deptid = []
+          for(let i in this.departmentIdArray){
+            deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
+          }
+          sl.departmentId = deptid
         } else if (this.ins == 7) {
           fName = this.$t('timecostearlywarningtable')  + '.xls';
           url += "/exportBaseCostAndRealCost";
@@ -1502,6 +1508,7 @@ export default {
         this.byQuarterDialog = true
       },
       quarterExport(){
+        this.exportLoading = true
         this.http.post('/project/exportReportTimelinessRateByQuarter', this.quarterParameter,
             res => {
                 if (res.code == "ok") {
@@ -1512,7 +1519,9 @@ export default {
                     a.setAttribute('href', filePath);// href链接
                     a.click(); //自执行点击事件
                     a.remove();
+                    this.exportLoading = false
                     this.byQuarterDialog  = false
+                    
                 } else {
                     this.$message({
                     message: res.msg,
@@ -1746,7 +1755,11 @@ export default {
         obj.userId = this.userId
       }
       if(this.departmentIdArray.length != 0){
-        obj.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
+        let deptid = []
+        for(let i in this.departmentIdArray){
+          deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
+        }
+        obj.departmentId = deptid
       }
       this.http.post('/project/getOvertimeList', obj,
         res => {
@@ -2294,10 +2307,24 @@ export default {
         this.getDepartmentsInvolved()
       }else{
       if(e == 9){
+        console.log(this.departmentIdArray);
         this.userId = null
         if(this.departmentIdArray.length != 0){
-          let deptid = this.departmentIdArray[this.departmentIdArray.length - 1]
-          this.selUserList = this.userList.filter(item => item.departmentId == deptid)
+          let deptid = []
+          for(let i in this.departmentIdArray){
+            deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
+          }
+          // let deptid = this.departmentIdArray[this.departmentIdArray.length - 1]
+          this.selUserList = this.userList.filter(item => {
+            let boo = false
+            for(let i in deptid){
+              if(item.departmentId == deptid[i]){
+                boo = true
+              }
+            }
+            return boo
+            // item.departmentId == deptid
+          })
         }else{
           this.selUserList = this.userList
         }
@@ -2308,7 +2335,7 @@ export default {
         this.selUserList = this.userList
         this.userId = ''
       }
-      this.getList()
+      this.getList(true)
       }
     },
     // 成本查看明细

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -516,7 +516,7 @@
 
                         <!-- 相关维度/自定义维度 -->
                         <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList != undefined && domain.wuduList.length != 0 ? { required: true, message: $t('defaultText.pleaseChoose') + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
-                            <el-select v-model="domain.degreeId" clearable :placeholder="$t('defaultText.pleaseChoose')" :disabled="!domain.canEdit" style="width:200px;">
+                            <el-select v-model="domain.degreeId" clearable :placeholder="$t('defaultText.pleaseChoose')" :disabled="!domain.canEdit" style="width:200px;" filterable>
                                 <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                                 </el-option>
                             </el-select>