Min 1 year ago
parent
commit
b996ae5fd5

+ 2 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -4283,6 +4283,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             map=new HashMap();
             List<String> dateList = mapList.stream().map(m -> String.valueOf(m.get("createDate"))).distinct().collect(Collectors.toList());
             dateList.addAll(dataStringList.stream().filter(dl->!dateList.contains(dl)).collect(Collectors.toList()));
+            List<String> stringList = dateList.stream().sorted().collect(Collectors.toList());
             Map<Object, List<Map<String, Object>>> listMap = mapList.stream().collect(Collectors.groupingBy(m -> m.get("createDate")));
             List<Map<String,Object>> resultList=new ArrayList<>();
             List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
@@ -4293,7 +4294,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             deptIds.addAll(otherDeptIds);
             List<Integer> targetDeptIds = deptIds.stream().distinct().collect(Collectors.toList());
             boolean canViewAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部人员工时工价");
-            for (String s : dateList) {
+            for (String s : stringList) {
                 Map<String,Object> item=new HashMap();
                 List<Map<String, Object>> list = listMap.get(s);
                 item.put("createDate",s);

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue

@@ -48,7 +48,7 @@
       <van-button round type="info" size="small" :loading="loadingBtn" @click="handClick()">确定</van-button>
     </div>
     <div class="chooseSomeone_btn" v-if="!newGroupViewBack">
-      <van-button round type="info" size="small" style="width: 100%;" @click="treeHandClick()">确定</van-button>
+      <van-button round type="info" size="small" style="width: 100%;" :loading="loadingBtn" @click="treeHandClick()">确定</van-button>
     </div>
   </div>
 </template>

+ 23 - 22
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/statistic/index.vue

@@ -71,7 +71,7 @@
                 <el-table-column align="center" prop="name" label="人员" min-width="250"></el-table-column>
                 <el-table-column v-for="(item, index) in personWorkHoursWagesHead" :key="index" :label="item" align="center" min-width="250">
                     <template slot-scope="scope">
-                        <div v-for="(items, indexs) in scope.row.personWorkHoursWages" :key="indexs" @click="showReportDetail(scope.row)" class="colorText">
+                        <div v-for="(items, indexs) in scope.row.personWorkHoursWages" :key="indexs" @click="showReportDetail(scope.row,item)" class="colorText">
                             <div v-if="items.crateDate == item">
                                 {{items.workTime}}分钟  {{items.cost}}元
                             </div>
@@ -551,11 +551,11 @@ export default {
       this.taskName=item.taskName
       this.getPlanDetail(item);
     },
-    showReportDetail(item){
+    showReportDetail(row,item){
       console.log(item)
       this.reportDetailDialog=true
-      this.detailUserId=item.id
-      this.getPersonWorkHoursWagesDetail()
+      this.detailUserId=row.id
+      this.getPersonWorkHoursWagesDetail(item)
     },
     authorityToJudge() {
     //   if(this.permissions.reportProject || this.permissions.reportAllProject) {this.ssl(0);this.defaultActive = '1-1';return} else
@@ -691,28 +691,29 @@ export default {
         });
     },
     //点击详情(人员工时工价表)
-    getPersonWorkHoursWagesDetail(){
-        this.http.post( "/report/getPersonWorkHoursWagesDetail", {
-            date: this.simpleDateChoose.substring(0,4)+"-"+this.simpleDateChoose.substring(4,6)+"-"+this.simpleDateChoose.substring(6,this.simpleDateChoose.length),
-            userId:this.detailUserId
-        },
-        res => {
-          if (res.code == "ok") {
-            this.personWorkHoursWagesDetail=res.data.record
-            this.totalCost=res.data.totalCost
-            this.totalWorkingTime=res.data.totalWorkingTime
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
-        },error => {
+    getPersonWorkHoursWagesDetail(item){
+      this.simpleDateChoose=item
+      this.http.post( "/report/getPersonWorkHoursWagesDetail", {
+          date: this.simpleDateChoose.substring(0,4)+"-"+this.simpleDateChoose.substring(4,6)+"-"+this.simpleDateChoose.substring(6,this.simpleDateChoose.length),
+          userId:this.detailUserId
+      },
+      res => {
+        if (res.code == "ok") {
+          this.personWorkHoursWagesDetail=res.data.record
+          this.totalCost=res.data.totalCost
+          this.totalWorkingTime=res.data.totalWorkingTime
+        } else {
           this.$message({
-            message: error,
+            message: res.msg,
             type: "error"
           });
+        }
+      },error => {
+        this.$message({
+          message: error,
+          type: "error"
         });
+      });
     },
     //计划实际工时表
     getPlanRealTimeProgressList(){