seimin 1 jaar geleden
bovenliggende
commit
8902a61351

+ 3 - 3
src/app/views/form-management-detail/form-management-detail.component.ts

@@ -51,7 +51,7 @@ export class FormManagementDetailComponent implements OnInit {
51 51
             id: v,
52 52
             name: Object.values(Object.values(data[v])[0])[0][0][3],
53 53
             departments: (
54
-              Object.values(data[v]).map(vv => Object.keys(vv).map(vvv => ({id: vvv, name: vv[vvv][0][6], orders: vv[vvv], checked: false, isDisabled: vv[vvv].every(vvvv => !(vvvv[12] == 2 || (!vvvv[8] && vvvv[12] != 2)))}))) as any
54
+              Object.values(data[v]).map(vv => Object.keys(vv).map(vvv => ({id: vvv, name: vv[vvv][0][6], orders: vv[vvv], checked: false, isDisabled: vv[vvv].every(vvvv => !(vvvv[12] == 2 || (!vvvv[8] && vvvv[12] != 2 && vvvv[12] != 6 && vvvv[12] != 7 && vvvv[12] != 11)))}))) as any
55 55
             ).flat()
56 56
           }));
57 57
           console.log(buildings)
@@ -72,7 +72,7 @@ export class FormManagementDetailComponent implements OnInit {
72 72
     this.buildings.forEach(v => {
73 73
       v.departments.forEach(vv => {
74 74
         if(vv.checked){
75
-          arr = arr.concat(vv.orders.filter(vvv => vvv[12] == 2 || (!vvv[8] && vvv[12] != 2)));
75
+          arr = arr.concat(vv.orders.filter(vvv => vvv[12] == 2 || (!vvv[8] && vvv[12] != 2 && vvv[12] != 6 && vvv[12] != 7 && vvv[12] != 11)));
76 76
         }
77 77
       })
78 78
     })
@@ -87,7 +87,7 @@ export class FormManagementDetailComponent implements OnInit {
87 87
       if (item[12] == 2) {
88 88
         //普通派单
89 89
         ids_types.push(`${item[9]}_assign`);
90
-      } else if (!item[8] && item[12] != 2) {
90
+      } else if (!item[8] && item[12] != 2 && item[12] != 6 && item[12] != 7 && item[12] != 11) {
91 91
         ids_types.push(`${item[9]}_reassign`);
92 92
       }
93 93
       stateIds.push(item[10]);

+ 2 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1378,7 +1378,7 @@
1378 1378
                                       *ngIf="buildMsg.reserveUserSwitch == 1"
1379 1379
                                     >
1380 1380
                                       <p>工号:</p>
1381
-                                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择" [(ngModel)]="account">
1381
+                                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择" [(ngModel)]="account" (ngModelChange)="changeAccount($event)">
1382 1382
                                         <ng-container *ngFor="let option of accountList">
1383 1383
                                           <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id">
1384 1384
                                           </nz-option>
@@ -3849,5 +3849,5 @@
3849 3849
 (confirmDelEvent)="confirmSendAwakeningRoom($event)" [content]="sendAwakeningRoomInfo" [isChecked]="surgeryConfigs && surgeryConfigs.remandClean == 1" [isSelected]="surgeryCarryingCourse && (surgeryCarryingCourse.departmentStrategy.value == 2 || surgeryCarryingCourse.departmentStrategy.value == 3)" [isSelectedArr]="surgeryCarryingCourseDepts" [deptDisplay]="deptDisplay"></app-dialog-delete>
3850 3850
 
3851 3851
 <!-- 是否限制业务发起时间模态框 -->
3852
-<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="btnLoading"
3852
+<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
3853 3853
 (confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单"></app-dialog-delete>

+ 7 - 6
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -2677,6 +2677,11 @@ export class HushijiandanComponent implements OnInit {
2677 2677
       return { required: true };
2678 2678
     }
2679 2679
   };
2680
+  // 修改工号
2681
+  userAccount = null;
2682
+  changeAccount(e){
2683
+    this.userAccount =this.accountList.find(v => v.id == e);
2684
+  }
2680 2685
   // 一键发起建单保存
2681 2686
   loading5 = false;
2682 2687
   confirmShortcut() {
@@ -2691,15 +2696,11 @@ export class HushijiandanComponent implements OnInit {
2691 2696
     let postData;
2692 2697
     that.buildType = "other";
2693 2698
     if (that.buildType == "other") {
2694
-      let userAccount = null;
2695
-      if(this.account){
2696
-        userAccount = this.accountList.find(v => v.id == this.account);
2697
-      }
2698 2699
       // 其他
2699 2700
       postData = {
2700 2701
         workOrder: {
2701 2702
           sourceId: SourceId.hushi,
2702
-          workOrderRemark: userAccount ? `${userAccount.account}-${userAccount.name}:${this.workOrderRemark}` : this.workOrderRemark,
2703
+          workOrderRemark: this.userAccount ? `${this.userAccount.account}-${this.userAccount.name}:${this.workOrderRemark}` : this.workOrderRemark,
2703 2704
           taskType: { id: that.shortcutMsg.id },
2704 2705
           createDept: that.loginUserDeptId,
2705 2706
           startDept: { id: that.buildMsg.startDept },
@@ -2866,9 +2867,9 @@ export class HushijiandanComponent implements OnInit {
2866 2867
   }
2867 2868
   // 确认
2868 2869
   jdFlagId;
2870
+  limitTimeLoading:boolean = false;
2869 2871
   confirmLimitTime() {
2870 2872
     console.log(this.limitTimeItem);
2871
-    this.btnLoading = true;
2872 2873
     this.limitTimeModal = false;
2873 2874
     this.jdFlagId = this.message.loading("正在加载中..", {
2874 2875
       nzDuration: 0,

+ 5 - 1
src/app/views/task-type-management/task-type-management.component.ts

@@ -112,7 +112,7 @@ export class TaskTypeManagementComponent implements OnInit {
112 112
   isDigitalHandover = "0"; //是否允许数字交接
113 113
   reserveSwitch = "0"; //是否预定工单
114 114
   reserveUserSwitch = "0"; //是否需要填写工号
115
-  reserveType = "0"; //是否限制业务发起时间
115
+  reserveType = "1"; //是否限制业务发起时间
116 116
   reserveTypes:any = []; //是否限制业务发起时间-字典
117 117
   reserveDate = null; //是否限制业务发起时间-时间
118 118
   reserveMsg = ''; //是否限制业务发起时间-提示
@@ -1380,6 +1380,10 @@ export class TaskTypeManagementComponent implements OnInit {
1380 1380
     this.remarks = ""; //提前生效时间,默认20分钟
1381 1381
     this.quickRemarks = ""; //备注快速输入
1382 1382
     this.styleType = false;
1383
+    this.isRepeatCreateOder = '2';
1384
+    this.reserveType = '1';
1385
+    this.reserveSwitch = '0';
1386
+    this.reserveUserSwitch = '0';
1383 1387
     this.styleDes(this.styleType);
1384 1388
     this.carryingCourses = [
1385 1389
       {

+ 32 - 0
src/polyfills.ts

@@ -69,6 +69,38 @@ if (!Array.prototype.includes) {
69 69
     },
70 70
   });
71 71
 }
72
+if (!Object.values) {
73
+  Object.values = function(obj) {
74
+    if (obj !== Object(obj)) throw new TypeError('Object.values called on a non-object');
75
+    var val=[],key;
76
+    for (key in obj) {
77
+        if (Object.prototype.hasOwnProperty.call(obj,key)) {
78
+            val.push(obj[key]);
79
+        }
80
+    }
81
+    return val;
82
+  }
83
+}
84
+
85
+if(!Array.prototype['flat']){
86
+  Array.prototype['flat'] = function(depth = 1) {
87
+    if (!Number(depth) || Number(depth) < 0) {
88
+        return this
89
+    }
90
+    let arr = this // 获得调用 fakeFlat 函数的数组
91
+    while (depth > 0) {
92
+        if (arr.some(item => Array.isArray(item))) {
93
+             // 数组中还有数组元素的话并且 num > 0,继续展开一层数组
94
+            arr = [].concat.apply([], arr)
95
+        } else {
96
+            break // 数组中没有数组元素并且不管 num 是否依旧大于 0,停止循环。
97
+        }
98
+        depth--
99
+    }
100
+    return arr
101
+  }
102
+}
103
+
72 104
 // (function () {
73 105
 //     Object.setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
74 106