|
@@ -5,6 +5,7 @@ import { MainService } from "../../services/main.service";
|
5
|
5
|
import { ToolService } from "../../services/tool.service";
|
6
|
6
|
import { Subject } from "rxjs";
|
7
|
7
|
import { debounceTime } from "rxjs/operators";
|
|
8
|
+import { NzMessageService } from 'ng-zorro-antd/message';
|
8
|
9
|
@Component({
|
9
|
10
|
selector: "app-order-management",
|
10
|
11
|
templateUrl: "./order-management.component.html",
|
|
@@ -15,7 +16,8 @@ export class OrderManagementComponent implements OnInit {
|
15
|
16
|
public route: ActivatedRoute,
|
16
|
17
|
private router: Router,
|
17
|
18
|
private mainService: MainService,
|
18
|
|
- private tool: ToolService
|
|
19
|
+ private tool: ToolService,
|
|
20
|
+ private message: NzMessageService,
|
19
|
21
|
) {}
|
20
|
22
|
searchTimerSubject = new Subject();
|
21
|
23
|
ngOnInit() {
|
|
@@ -190,6 +192,11 @@ export class OrderManagementComponent implements OnInit {
|
190
|
192
|
// 表格数据
|
191
|
193
|
loading1 = false;
|
192
|
194
|
getList() {
|
|
195
|
+ // 有备注,无发起时间则提示
|
|
196
|
+ if(this.workOrderRemark && !this.dateRange.length){
|
|
197
|
+ this.message.info('请选择发起时间!');
|
|
198
|
+ return;
|
|
199
|
+ }
|
193
|
200
|
// 三个权限都没有,则不展示
|
194
|
201
|
if(!this.coopBtns.currentDept && !this.coopBtns.currentUser && !this.coopBtns.allOrders){
|
195
|
202
|
this.listOfData = [];
|
|
@@ -399,6 +406,15 @@ export class OrderManagementComponent implements OnInit {
|
399
|
406
|
// 导出
|
400
|
407
|
loading2 = false;
|
401
|
408
|
export() {
|
|
409
|
+ // 有备注,无发起时间则提示
|
|
410
|
+ if(this.workOrderRemark && !this.dateRange.length){
|
|
411
|
+ this.message.info('请选择发起时间!');
|
|
412
|
+ return;
|
|
413
|
+ }
|
|
414
|
+ // 三个权限都没有,则不展示
|
|
415
|
+ if(!this.coopBtns.currentDept && !this.coopBtns.currentUser && !this.coopBtns.allOrders){
|
|
416
|
+ return;
|
|
417
|
+ }
|
402
|
418
|
let that = this;
|
403
|
419
|
let postData: any = {
|
404
|
420
|
idx: that.pageIndex - 1,
|
|
@@ -406,12 +422,21 @@ export class OrderManagementComponent implements OnInit {
|
406
|
422
|
workOrder: {
|
407
|
423
|
worker: { id: that.worker },
|
408
|
424
|
gdState: { id: that.gdState },
|
|
425
|
+ gdcode: this.gdcode,
|
|
426
|
+ specialCloseFlag: that.specialCloseFlag,
|
409
|
427
|
createDept: that.department,
|
410
|
428
|
hosId: that.hospital,
|
411
|
429
|
abnormityType: that.checkOptionsOne[1].checked ? 1 : undefined,
|
412
|
430
|
timeOut: that.checkOptionsOne[0].checked ? 1 : 0,
|
413
|
431
|
},
|
414
|
432
|
};
|
|
433
|
+ if (that.checkOptionsOne[2]) {
|
|
434
|
+ if (that.checkOptionsOne[2].checked) {
|
|
435
|
+ postData.workOrder.deleteFlag = 1;
|
|
436
|
+ } else {
|
|
437
|
+ delete postData.workOrder.deleteFlag;
|
|
438
|
+ }
|
|
439
|
+ }
|
415
|
440
|
if (that.association) {
|
416
|
441
|
postData.workOrder.taskType = {
|
417
|
442
|
associationType: { id: that.association },
|
|
@@ -426,6 +451,12 @@ export class OrderManagementComponent implements OnInit {
|
426
|
451
|
if (!postData.workOrder.gdState.id) {
|
427
|
452
|
delete postData.workOrder.gdState;
|
428
|
453
|
}
|
|
454
|
+ if (
|
|
455
|
+ postData.workOrder.specialCloseFlag === undefined ||
|
|
456
|
+ postData.workOrder.specialCloseFlag === null
|
|
457
|
+ ) {
|
|
458
|
+ delete postData.workOrder.specialCloseFlag;
|
|
459
|
+ }
|
429
|
460
|
if (!postData.workOrder.createDept) {
|
430
|
461
|
delete postData.workOrder.createDept;
|
431
|
462
|
}
|
|
@@ -440,6 +471,9 @@ export class OrderManagementComponent implements OnInit {
|
440
|
471
|
postData.workOrder.endTime1 = that.endDate;
|
441
|
472
|
postData.workOrder.workOrderRemark = that.workOrderRemark;
|
442
|
473
|
}
|
|
474
|
+ that.mapOfCheckedId = {};
|
|
475
|
+ that.checkedDepIds = [];
|
|
476
|
+ that.isAllDisplayDataChecked = false;
|
443
|
477
|
this.loading2 = true;
|
444
|
478
|
that.mainService.dataExport("workOrder", postData).subscribe(
|
445
|
479
|
(data) => {
|