Ver código fonte

被服统计详情跳转

seimin 10 meses atrás
pai
commit
7b19d6bce4

+ 7 - 7
src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.html

@@ -73,19 +73,19 @@
73 73
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
74 74
               (nzCheckedChange)="checkAll($event)"></th>
75 75
             <th nzWidth="5%">序号</th>
76
-            <th nzWidth="5%">科室名称</th>
77
-            <th nzShowSort nzWidth="17%" nzSortKey="clothesTypeNum" [(nzSort)]="sortCurrent.clothesTypeNum">回收种类数</th>
78
-            <th nzShowSort nzWidth="17%" nzSortKey="getOrder" [(nzSort)]="sortCurrent.getOrder">回收单数</th>
79
-            <th nzShowSort nzWidth="17%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回单数</th>
80
-            <th nzShowSort nzWidth="17%" nzSortKey="sendClothesNum" [(nzSort)]="sortCurrent.sendClothesNum">洗涤被服数量</th>
81
-            <th nzShowSort nzWidth="17%" nzSortKey="price" [(nzSort)]="sortCurrent.price">费用(元)</th>
76
+            <th nzWidth="15%">科室名称</th>
77
+            <th nzShowSort nzWidth="15%" nzSortKey="clothesTypeNum" [(nzSort)]="sortCurrent.clothesTypeNum">回收种类数</th>
78
+            <th nzShowSort nzWidth="15%" nzSortKey="getOrder" [(nzSort)]="sortCurrent.getOrder">回收单数</th>
79
+            <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回单数</th>
80
+            <th nzShowSort nzWidth="15%" nzSortKey="sendClothesNum" [(nzSort)]="sortCurrent.sendClothesNum">洗涤被服数量</th>
81
+            <th nzShowSort nzWidth="15%" nzSortKey="price" [(nzSort)]="sortCurrent.price">费用(元)</th>
82 82
           </tr>
83 83
         </thead>
84 84
         <tbody>
85 85
           <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
86 86
             <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
87 87
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
88
-            <td>{{ data.dept || '' }}</td>
88
+            <td (click)="toDetail($event, data)" class="clickable">{{ data.dept || '' }}</td>
89 89
             <td>{{ data.clothesTypeNum }}</td>
90 90
             <td>{{ data.getOrder }}</td>
91 91
             <td>{{ data.sendOrder }}</td>

+ 10 - 3
src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.ts

@@ -1,6 +1,6 @@
1 1
 import { Component, OnInit } from "@angular/core";
2 2
 import { ActivatedRoute, Router } from "@angular/router";
3
-import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear } from "date-fns";
3
+import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear, startOfDay, endOfDay } from "date-fns";
4 4
 
5 5
 import { MainService } from "../../services/main.service";
6 6
 import { DateService } from "../../services/date.service";
@@ -459,8 +459,15 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
459 459
       this.startDate = this.endDate = "";
460 460
       return;
461 461
     }
462
-    this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
463
-    this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
462
+    this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
463
+    this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
464
+  }
465
+
466
+  // 跳转详情
467
+  toDetail(e, data){
468
+    e.stopPropagation();
469
+    console.log(data);
470
+    window.open(`${location.origin}/#/quiltWashingDepartment/${data.id}/${this.dateType}/${this.startDate}/${this.endDate}`);
464 471
   }
465 472
 
466 473
   // 月份选择

+ 1 - 1
src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.html

@@ -58,7 +58,7 @@
58 58
         <tbody>
59 59
           <tr *ngFor="let data of listOfData;let index=index;">
60 60
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
61
-            <td>{{ data.date }}</td>
61
+            <td (click)="toDetail($event, data)" class="clickable">{{ data.date }}</td>
62 62
             <td>{{ data.deptNum }}</td>
63 63
             <td>{{ data.clothesTypeNum }}</td>
64 64
             <td>{{ data.getOrder }}</td>

+ 10 - 3
src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.ts

@@ -1,6 +1,6 @@
1 1
 import { Component, OnInit } from "@angular/core";
2 2
 import { ActivatedRoute, Router } from "@angular/router";
3
-import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear } from "date-fns";
3
+import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear, startOfDay, endOfDay } from "date-fns";
4 4
 
5 5
 import { MainService } from "../../services/main.service";
6 6
 import { DateService } from "../../services/date.service";
@@ -313,8 +313,8 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
313 313
       this.startDate = this.endDate = "";
314 314
       return;
315 315
     }
316
-    this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
317
-    this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
316
+    this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
317
+    this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
318 318
   }
319 319
 
320 320
   // 月份选择
@@ -433,6 +433,13 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
433 433
     }, 100);
434 434
   }
435 435
 
436
+  // 跳转详情
437
+  toDetail(e, data){
438
+    e.stopPropagation();
439
+    console.log(data);
440
+    window.open(`${location.origin}/#/quiltWashingHospital/${data.date}/${this.dateType}`);
441
+  }
442
+
436 443
   // 边输入边搜索节流阀
437 444
   isLoading: boolean = false;
438 445
   searchTimer(fun, e, those) {

+ 3 - 3
src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.ts

@@ -1,6 +1,6 @@
1 1
 import { Component, OnInit } from "@angular/core";
2 2
 import { ActivatedRoute, Router } from "@angular/router";
3
-import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear } from "date-fns";
3
+import { differenceInCalendarDays, endOfMonth, endOfYear, format, startOfMonth, startOfYear, endOfDay, startOfDay } from "date-fns";
4 4
 
5 5
 import { MainService } from "../../services/main.service";
6 6
 import { DateService } from "../../services/date.service";
@@ -376,8 +376,8 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
376 376
       this.startDate = this.endDate = "";
377 377
       return;
378 378
     }
379
-    this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
380
-    this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
379
+    this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
380
+    this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
381 381
   }
382 382
 
383 383
   // 月份选择

+ 6 - 0
src/common.less

@@ -215,6 +215,12 @@
215 215
   }
216 216
 }
217 217
 
218
+// 可点击
219
+.clickable{
220
+  text-decoration: underline;
221
+  cursor: pointer
222
+}
223
+
218 224
 // list模板样式 start
219 225
 .list-template {
220 226
   padding: 8px;