seimin преди 3 години
родител
ревизия
4014cdee0e
променени са 4 файла, в които са добавени 64 реда и са изтрити 13 реда
  1. 14 12
      src/app/views/fuwutai/fuwutai.component.html
  2. 1 1
      src/app/views/fuwutai/fuwutai.component.less
  3. 40 0
      src/app/views/fuwutai/fuwutai.component.ts
  4. 9 0
      src/common.less

+ 14 - 12
src/app/views/fuwutai/fuwutai.component.html

@@ -75,15 +75,15 @@
75 75
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
76 76
       </div>
77 77
       <div class="searchBox">
78
-        <div class="search">
79
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
80
-          <div class="magnifier" (click)="searchUnassigned()">
78
+        <label nz-checkbox [(ngModel)]="allUnassignedList" (ngModelChange)="changeAllUnassignedList($event)">全选</label>
79
+        <div class="search wp60">
80
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
81
+          <div class="magnifier wp20" (click)="searchUnassigned()">
81 82
             <i class="icon_transport transport-sousuo"></i>
82 83
             <span>搜索</span>
83 84
           </div>
84 85
         </div>
85
-        <button nz-button nzType="primary" (click)="batchDispatch()" nzSize="small"
86
-          [disabled]="!batchType">批量派单</button>
86
+        <button nz-button nzType="primary" (click)="batchDispatch()" [disabled]="!batchType">批量派单</button>
87 87
       </div>
88 88
       <div class="cots_body weifenpai" *ngIf="txtLabelCol==1">
89 89
         <overlay-scrollbars #osComponentRef2 [ngStyle]="{ height:'100%' }">
@@ -239,15 +239,15 @@
239 239
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
240 240
       </div>
241 241
       <div class="searchBox">
242
-        <div class="search">
243
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
244
-          <div class="magnifier" (click)="searchArrive()">
242
+        <label nz-checkbox [(ngModel)]="allArriveList" (ngModelChange)="changeAllArriveList($event)">全选</label>
243
+        <div class="search wp60">
244
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
245
+          <div class="magnifier wp20" (click)="searchArrive()">
245 246
             <i class="icon_transport transport-sousuo"></i>
246 247
             <span>搜索</span>
247 248
           </div>
248 249
         </div>
249
-        <button nz-button nzType="primary" (click)="batchWithdrawal()" nzSize="small"
250
-          [disabled]="!batchType1">批量撤回</button>
250
+        <button nz-button nzType="primary" (click)="batchWithdrawal()" [disabled]="!batchType1">批量撤回</button>
251 251
       </div>
252 252
       <div class="cots_body daidaoda" *ngIf="txtLabelCol==1">
253 253
         <overlay-scrollbars #osComponentRef3 [ngStyle]="{ height:'100%' }">
@@ -266,7 +266,8 @@
266 266
                 </div>
267 267
                 <!-- 地点 -->
268 268
                 <div class="didian" (click)='openDetails(data.id,data.taskType.associationType.id)'>
269
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
269
+                  <span class="left"
270
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
270 271
                     {{data.startDept?data.startDept.dept:''}}
271 272
                     <span *ngFor="let item of data.middleDept">
272 273
                       ->{{item.dept}}
@@ -427,7 +428,8 @@
427 428
                 </div>
428 429
                 <!-- 地点 -->
429 430
                 <div class="didian">
430
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
431
+                  <span class="left"
432
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
431 433
                     {{data.startDept?data.startDept.dept:''}}
432 434
                     <span *ngFor="let item of data.middleDept">
433 435
                       ->{{item.dept}}

+ 1 - 1
src/app/views/fuwutai/fuwutai.component.less

@@ -364,7 +364,7 @@
364 364
 
365 365
     .search {
366 366
       height: 34px;
367
-      width: 80%;
367
+      width: 90%;
368 368
       background-color: white;
369 369
       border: 1px rgb(225, 229, 232) solid;
370 370
       border-radius: 20px;

+ 40 - 0
src/app/views/fuwutai/fuwutai.component.ts

@@ -154,6 +154,30 @@ export class FuwutaiComponent implements OnInit {
154 154
   searchHosDepartmentSubject = new Subject();
155 155
   searchHosDepartmentQtSubject = new Subject();
156 156
   searchPatientListSubject = new Subject();
157
+  // 选中未派单列表-全选
158
+  changeAllUnassignedList(e) {
159
+    this.unassignedList.forEach((v) => (v.checked = e));
160
+    this.unassignedList.forEach((item1) => {
161
+      this.unassignedListClone.forEach((item2) => {
162
+        if (item1.id == item2.id) {
163
+          item2.checked = item1.checked;
164
+        }
165
+      });
166
+    });
167
+    this.batchType = this.unassignedListClone.some((item) => item.checked);
168
+  }
169
+  // 选中待到达列表-全选
170
+  changeAllArriveList(e) {
171
+    this.arriveList.forEach((v) => (v.checked = e));
172
+    this.arriveList.forEach((item1) => {
173
+      this.arriveListClone.forEach((item2) => {
174
+        if (item1.id == item2.id) {
175
+          item2.checked = item1.checked;
176
+        }
177
+      });
178
+    });
179
+    this.batchType1 = this.arriveListClone.some((item) => item.checked);
180
+  }
157 181
   // 添加备注
158 182
   addRemarks(item) {
159 183
     this.remarksEle.nativeElement.focus();
@@ -198,6 +222,7 @@ export class FuwutaiComponent implements OnInit {
198 222
     this.openRecallModal(ids.join("-"));
199 223
   }
200 224
   // 批量分派选中
225
+  allUnassignedList = false;
201 226
   batchDispatchSelect(e, id) {
202 227
     this.unassignedList.forEach((item) => {
203 228
       if (item.id == id) {
@@ -212,8 +237,16 @@ export class FuwutaiComponent implements OnInit {
212 237
       });
213 238
     });
214 239
     this.batchType = this.unassignedListClone.some((item) => item.checked);
240
+    if (this.unassignedListClone.length) {
241
+      this.allUnassignedList = this.unassignedListClone.every(
242
+        (item) => item.checked
243
+      );
244
+    } else {
245
+      this.allUnassignedList = false;
246
+    }
215 247
   }
216 248
   // 批量撤回选中
249
+  allArriveList = false;
217 250
   batchWithdrawalSelect(e, id) {
218 251
     this.arriveList.forEach((item) => {
219 252
       if (item.id == id) {
@@ -228,6 +261,11 @@ export class FuwutaiComponent implements OnInit {
228 261
       });
229 262
     });
230 263
     this.batchType1 = this.arriveListClone.some((item) => item.checked);
264
+    if (this.arriveListClone.length) {
265
+      this.allArriveList = this.arriveListClone.every((item) => item.checked);
266
+    } else {
267
+      this.allArriveList = false;
268
+    }
231 269
   }
232 270
 
233 271
   // 获取科室
@@ -818,6 +856,7 @@ export class FuwutaiComponent implements OnInit {
818 856
               item.checked = false;
819 857
             });
820 858
             that.batchType = false;
859
+            that.allUnassignedList = false;
821 860
             that.unassignedListClone = JSON.parse(
822 861
               JSON.stringify(that.unassignedList)
823 862
             );
@@ -855,6 +894,7 @@ export class FuwutaiComponent implements OnInit {
855 894
               item.checked = false;
856 895
             });
857 896
             that.batchType1 = false;
897
+            that.allArriveList = false;
858 898
             that.arriveListClone = JSON.parse(JSON.stringify(that.arriveList));
859 899
           } else {
860 900
             that.arriveList.forEach((item1) => {

+ 9 - 0
src/common.less

@@ -16,6 +16,15 @@
16 16
 .w100 {
17 17
   width: 100% !important;
18 18
 }
19
+.wp75 {
20
+  width: 75% !important;
21
+}
22
+.wp60 {
23
+  width: 60% !important;
24
+}
25
+.wp20 {
26
+  width: 20% !important;
27
+}
19 28
 .dib {
20 29
   display: inline-block !important;
21 30
 }