|
@@ -5,6 +5,7 @@ import { MainService } from "../../services/main.service";
|
5
|
5
|
import { DateService } from "../../services/date.service";
|
6
|
6
|
import { MyServiceService } from "../../services/my-service.service";
|
7
|
7
|
import { ToolService } from "../../services/tool.service";
|
|
8
|
+import { format } from 'date-fns';
|
8
|
9
|
|
9
|
10
|
@Component({
|
10
|
11
|
selector: "app-worker-statistics",
|
|
@@ -90,8 +91,8 @@ export class WorkerStatisticsComponent implements OnInit {
|
90
|
91
|
}
|
91
|
92
|
if (this.startDate) {
|
92
|
93
|
this.searchData["dateRange"] = {
|
93
|
|
- start: this.startDate + " " + "00:00:00",
|
94
|
|
- end: this.endDate + " " + "23:59:59",
|
|
94
|
+ start: this.startDate,
|
|
95
|
+ end: this.endDate,
|
95
|
96
|
};
|
96
|
97
|
}
|
97
|
98
|
if (num !== undefined) {
|
|
@@ -119,8 +120,8 @@ export class WorkerStatisticsComponent implements OnInit {
|
119
|
120
|
export(obj) {
|
120
|
121
|
let postData: any = {
|
121
|
122
|
hosId: this.hospital,
|
122
|
|
- startTime: this.startDate + " " + "00:00:00",
|
123
|
|
- endTime: this.endDate + " " + "23:59:59",
|
|
123
|
+ startTime: this.startDate,
|
|
124
|
+ endTime: this.endDate,
|
124
|
125
|
groupId: this.group || "",
|
125
|
126
|
specialClose: this.checkOptionsOne[0].checked ? 0 : undefined,
|
126
|
127
|
};
|
|
@@ -251,18 +252,8 @@ export class WorkerStatisticsComponent implements OnInit {
|
251
|
252
|
this.startDate = this.endDate = "";
|
252
|
253
|
return;
|
253
|
254
|
}
|
254
|
|
- this.startDate =
|
255
|
|
- result[0].getFullYear() +
|
256
|
|
- "-" +
|
257
|
|
- (result[0].getMonth() + 1) +
|
258
|
|
- "-" +
|
259
|
|
- result[0].getDate();
|
260
|
|
- this.endDate =
|
261
|
|
- result[1].getFullYear() +
|
262
|
|
- "-" +
|
263
|
|
- (result[1].getMonth() + 1) +
|
264
|
|
- "-" +
|
265
|
|
- result[1].getDate();
|
|
255
|
+ this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
|
|
256
|
+ this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
|
266
|
257
|
this.search();
|
267
|
258
|
}
|
268
|
259
|
// 修改搜素条件工作组
|
|
@@ -337,8 +328,8 @@ export class WorkerStatisticsComponent implements OnInit {
|
337
|
328
|
}
|
338
|
329
|
//获取配送人员工单详情列表
|
339
|
330
|
personDetail(workerId) {
|
340
|
|
- let startDate = this.startDate + " " + "00:00:00";
|
341
|
|
- let endDate = this.endDate + " " + "23:59:59";
|
|
331
|
+ let startDate = this.startDate;
|
|
332
|
+ let endDate = this.endDate;
|
342
|
333
|
let group = this.group || "null";
|
343
|
334
|
this.router.navigateByUrl(
|
344
|
335
|
`/main/workerStatistics/workerStatisticsDetail/${workerId}/${startDate}/${endDate}/${group}/workerStatistics/null/${this.checkOptionsOne[0].checked ? 0 : 'null'}`
|