Sfoglia il codice sorgente

批量建单配置

seimin 1 mese fa
parent
commit
f5d0ccf422

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-		"target": "http://192.168.3.108",
3
+		"target": "http://192.168.4.129",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 136 - 41
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.html

@@ -6,51 +6,146 @@
6 6
       </overlay-scrollbars>
7 7
     </div>
8 8
     <div class="addressAssign">
9
-      <div class="contentBody">
10
-        <div class="dictionaryRow">
11
-          <div class="orders">排序号</div>
12
-          <div class="name">注意事项</div>
13
-          <div class="value">备注</div>
14
-        </div>
15
-        <overlay-scrollbars #osComponentRef2 class="contentBody2">
16
-          <form nz-form [formGroup]="validateDictionaryForm" class="w100">
17
-            <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
18
-              <div class="orders">
19
-                <nz-form-item>
20
-                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
21
-                    <nz-input-group>
22
-                      <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
23
-                    </nz-input-group>
24
-                  </nz-form-control>
25
-                </nz-form-item>
9
+      <ng-container *ngIf="activeDictionaryKey.id == 1">
10
+        <div class="contentBody">
11
+          <div class="dictionaryRow">
12
+            <div class="orders">排序号</div>
13
+            <div class="name">注意事项</div>
14
+            <div class="value">备注</div>
15
+          </div>
16
+          <overlay-scrollbars #osComponentRef2 class="contentBody2">
17
+            <form nz-form [formGroup]="validateDictionaryForm" class="w100">
18
+              <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
19
+                <div class="orders">
20
+                  <nz-form-item>
21
+                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
22
+                      <nz-input-group>
23
+                        <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
24
+                      </nz-input-group>
25
+                    </nz-form-control>
26
+                  </nz-form-item>
27
+                </div>
28
+                <div class="name">
29
+                  <nz-form-item class="w100">
30
+                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入注意事项!">
31
+                      <nz-input-group>
32
+                        <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
33
+                      </nz-input-group>
34
+                    </nz-form-control>
35
+                  </nz-form-item>
36
+                </div>
37
+                <div class="value">
38
+                  <nz-form-item>
39
+                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入备注!">
40
+                      <nz-input-group>
41
+                        <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
42
+                      </nz-input-group>
43
+                    </nz-form-control>
44
+                  </nz-form-item>
45
+                  <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)" *ngIf="!(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')"></i>
46
+                  <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system && !(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')" (click)="removeField(data, i)"></i>
47
+                </div>
26 48
               </div>
27
-              <div class="name">
28
-                <nz-form-item class="w100">
29
-                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入注意事项!">
30
-                    <nz-input-group>
31
-                      <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
32
-                    </nz-input-group>
33
-                  </nz-form-control>
34
-                </nz-form-item>
49
+            </form>
50
+          </overlay-scrollbars>
51
+        </div>
52
+        <div class="contentBtns">
53
+          <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
54
+        </div>
55
+      </ng-container>
56
+      <ng-container *ngIf="activeDictionaryKey.id == 2">
57
+        <div class="contentBody2">
58
+          <div class="TaskTypeManagement">
59
+            <div class="taskTypeInfo">
60
+              <div class="top">
61
+                <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
62
+                  特性配置
63
+                </div>
64
+                <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
65
+                  自动建单配置
66
+                </div>
35 67
               </div>
36
-              <div class="value">
37
-                <nz-form-item>
38
-                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入备注!">
39
-                    <nz-input-group>
40
-                      <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
41
-                    </nz-input-group>
42
-                  </nz-form-control>
43
-                </nz-form-item>
44
-                <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)" *ngIf="!(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')"></i>
45
-                <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system && !(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')" (click)="removeField(data, i)"></i>
68
+              <ng-container *ngFor="let item of dictionaryKeyList">
69
+                <div class="list" *ngIf="!loading && activeDictionaryKey.id === item.id">
70
+                  <!-- 特性配置 -->
71
+                  <div *ngIf="tabModalName=='characteristics'">
72
+                    <div class="timeRange">
73
+                      <div class="timeRangeTitle green">默认时间区间1</div>
74
+                      <div class="timeRangeActive">
75
+                        有效时间范围:
76
+                        <span>
77
+                          <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
78
+                          ~
79
+                          <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
80
+                        </span>
81
+                        <span class="ml16">
82
+                          <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
83
+                          ~
84
+                          <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
85
+                        </span>
86
+                      </div>
87
+                      <div class="timeRangeDefault">
88
+                        默认时间:
89
+                        <span style="visibility: hidden;">囧囧</span>
90
+                        <span>
91
+                          <nz-time-picker [(ngModel)]="item.postData.ibDefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
92
+                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayStart"></nz-checkbox-group>
93
+                          ~
94
+                          <nz-time-picker class="ml8" [(ngModel)]="item.postData.ibDefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
95
+                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayEnd"></nz-checkbox-group>
96
+                        </span>
97
+                      </div>
98
+                    </div>
99
+
100
+                    <div class="timeRange">
101
+                      <div class="timeRangeTitle green">默认时间区间2</div>
102
+                      <div class="timeRangeActive">
103
+                        有效时间范围:
104
+                        <span>
105
+                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
106
+                          ~
107
+                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
108
+                        </span>
109
+                        <span class="ml16">
110
+                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
111
+                          ~
112
+                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
113
+                        </span>
114
+                      </div>
115
+                      <div class="timeRangeDefault">
116
+                        默认时间:
117
+                        <span style="visibility: hidden;">囧囧</span>
118
+                        <span>
119
+                          <nz-time-picker [(ngModel)]="item.postData.ib2DefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
120
+                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayStart"></nz-checkbox-group>
121
+                          ~
122
+                          <nz-time-picker class="ml8" [(ngModel)]="item.postData.ib2DefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
123
+                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayEnd"></nz-checkbox-group>
124
+                        </span>
125
+                      </div>
126
+                    </div>
127
+                  </div>
128
+                  <!-- 自动建单配置 -->
129
+                  <div *ngIf="tabModalName=='automaticOrderCreation'">
130
+                    <!-- 自动建单 -->
131
+                  </div>
132
+                  <div class="bottom">
133
+                    <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
134
+                  </div>
135
+                </div>
136
+              </ng-container>
137
+              <div class="list" *ngIf="loading">
138
+                <div class="loadingFull display_flex justify-content_flex-center align-items_center">
139
+                  <div class="loadingFullInner">
140
+                    <img src="../../../assets/images/loading.gif" alt="">
141
+                    <div>加载中...</div>
142
+                  </div>
143
+                </div>
46 144
               </div>
47 145
             </div>
48
-          </form>
49
-        </overlay-scrollbars>
50
-      </div>
51
-      <div class="contentBtns">
52
-        <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
53
-      </div>
146
+          </div>
147
+        </div>
148
+      </ng-container>
54 149
     </div>
55 150
   </div>
56 151
 </div>

+ 698 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.less

@@ -175,4 +175,702 @@
175 175
       align-items: center;
176 176
     }
177 177
   }
178
+
179
+  .TaskTypeManagement {
180
+    height: calc(100vh - 136px);
181
+    background: #f9fafb;
182
+    overflow: hidden;
183
+    padding: 16px 20px;
184
+
185
+    .pagination {
186
+      margin-top: 14px;
187
+      margin-bottom: 14px;
188
+      bottom: 12px;
189
+      right: 5px;
190
+    }
191
+
192
+    .taskType {
193
+      float: left;
194
+      width: 24%;
195
+      height: 100%;
196
+      border: 1px solid #e5e9ed;
197
+      background: #fff;
198
+      color: #333;
199
+      font-size: 14px;
200
+      position: relative;
201
+      overflow: hidden;
202
+
203
+      .title {
204
+        width: 100%;
205
+        height: 40px;
206
+        line-height: 40px;
207
+        padding-left: 16px;
208
+        border-bottom: 1px solid #e5e9ed;
209
+        position: relative;
210
+        background: #fff;
211
+        z-index: 2;
212
+      }
213
+
214
+      .operate {
215
+        width: 100%;
216
+        border-bottom: 1px solid #e5e9ed;
217
+        position: relative;
218
+        background: #fff;
219
+        z-index: 2;
220
+        display: flex;
221
+
222
+        .item {
223
+          flex: 1;
224
+          height: 34px;
225
+          line-height: 34px;
226
+          border-right: 1px solid #e5e9ed;
227
+          text-align: center;
228
+          color: #666; // cursor: default;
229
+          cursor: pointer;
230
+
231
+          &:hover {
232
+            color: @primary-color;
233
+            background: #f0f6ed;
234
+          }
235
+
236
+          &:nth-last-child(1) {
237
+            border: none;
238
+          }
239
+        }
240
+      }
241
+
242
+      .taskTypes {
243
+        // width: 110%;
244
+        width: 100%;
245
+        height: 92%;
246
+        // padding-right: 10%;
247
+        overflow-y: auto;
248
+        z-index: 1;
249
+        padding-bottom: 30px;
250
+
251
+        .itemChoice {
252
+          color: @primary-color;
253
+          background: #f0f6ed;
254
+        }
255
+
256
+        .item {
257
+          width: 100%;
258
+          height: 34px;
259
+          line-height: 34px;
260
+          text-align: center;
261
+          cursor: pointer;
262
+          overflow: hidden;
263
+          text-overflow: ellipsis;
264
+          white-space: nowrap;
265
+
266
+          &:hover {
267
+            color: @primary-color;
268
+            background: #f0f6ed;
269
+          }
270
+
271
+          &.checked {
272
+            color: @primary-color;
273
+            background: #f0f6ed;
274
+          }
275
+        }
276
+      }
277
+    }
278
+
279
+    //任务类型管理-主体
280
+    .taskTypeInfo {
281
+      height: 100%;
282
+      border: 1px solid #e5e9ed;
283
+      background: #fff;
284
+      color: #333;
285
+      position: relative;
286
+
287
+      .top {
288
+        height: 61px;
289
+        line-height: 60px;
290
+        display: flex;
291
+        align-items: center;
292
+        border-bottom: 1px solid #e5e9ed;
293
+        position: relative;
294
+        z-index: 2;
295
+
296
+        .items {
297
+          background: #f0f6ed;
298
+        }
299
+
300
+        & > div {
301
+          border-right: 1px solid #e5e9ed;
302
+          width: 30%;
303
+          text-align: center; // display: flex;
304
+          // align-items: center;
305
+          cursor: pointer;
306
+
307
+          &:hover {
308
+            background: #f0f6ed;
309
+          }
310
+        }
311
+
312
+        &:nth-last-child(4) {
313
+          border: none;
314
+        }
315
+      }
316
+
317
+      .list {
318
+        width: 100%; // height: 100%;
319
+        padding: 16px; // position: absolute;
320
+        // top: 0;
321
+        // padding-top: 90px;
322
+        background: #fff;
323
+        height: 89%;
324
+        overflow: auto;
325
+
326
+        nz-form-label {
327
+          margin-left: 0px !important;
328
+        }
329
+
330
+        & > div {
331
+          background: #f9fafb;
332
+          border: 1px solid #e5e9ed;
333
+          border-radius: 10px 10px 0px 0px;
334
+          padding: 24px 120px;
335
+
336
+          .label {
337
+            margin-left: 16px;
338
+            font-size: 14px;
339
+            color: #333;
340
+          }
341
+        }
342
+
343
+        // 规则信息
344
+        .ruleList {
345
+          padding: 15px 15px 0px 15px;
346
+          background: #fff;
347
+
348
+          .table {
349
+            width: 100%;
350
+            height: 100%;
351
+
352
+            .box {
353
+              // background: #f9fafb;
354
+              // border: 1px solid #e5e9ed;
355
+              border-radius: 5px;
356
+              position: relative;
357
+
358
+              .table_title {
359
+                font-size: 18px;
360
+                margin: 14px 0px;
361
+                text-align: center;
362
+              }
363
+
364
+              .thead {
365
+                background-image: linear-gradient(to right, @bg-start, @bg-end);
366
+
367
+                th {
368
+                  background: transparent;
369
+                  color: #fff;
370
+                  text-align: center;
371
+                  font-size: 14px;
372
+                }
373
+              }
374
+
375
+              .ant-table-body {
376
+                border-bottom: 1px solid #e5e9ed;
377
+                background: #f9fafb;
378
+              }
379
+
380
+              .ant-table-tbody {
381
+                background: #f9fafb;
382
+                border: 1px solid #e5e9ed;
383
+
384
+                .zzBontton {
385
+                  & > td {
386
+                    border-bottom: 1px solid #e5e9ed;
387
+                  }
388
+                }
389
+
390
+                tr {
391
+                  text-align: center;
392
+                  font-size: 14px;
393
+                  border: none;
394
+                  color: #333;
395
+                  overflow: hidden;
396
+
397
+                  .lin {
398
+                    width: 68.2%;
399
+                    height: 2rem;
400
+                    border-bottom: 0.1rem solid #e5e9ed;
401
+                    position: absolute;
402
+                    text-align: center;
403
+                    margin-left: 0%;
404
+                    margin-top: -0.8%;
405
+                    transform: rotate(6.5deg);
406
+                  }
407
+
408
+                  td {
409
+                    border: none;
410
+
411
+                    nz-input-number {
412
+                      width: 50px;
413
+                    }
414
+
415
+                    .coop {
416
+                      .line {
417
+                        margin: 10px;
418
+                      }
419
+
420
+                      span:nth-child(2n-1) {
421
+                        cursor: pointer;
422
+
423
+                        &:hover {
424
+                          color: @primary-color;
425
+                        }
426
+
427
+                        &:active {
428
+                          color: @primary-color;
429
+                        }
430
+                      }
431
+                    }
432
+                  }
433
+                }
434
+
435
+                tr:nth-child(even) {
436
+                  background: #fff;
437
+                }
438
+              }
439
+            }
440
+          }
441
+        }
442
+
443
+        //运送过程
444
+        .ysgcItem {
445
+          padding: 0px 0px 0px 0px; // background: #fff;
446
+
447
+          .ysgc_top {
448
+            height: 88px;
449
+            background: #fff;
450
+            border-radius: 10px 10px 0px 0px;
451
+            padding: 15px 22px 0px 22px;
452
+
453
+            .title {
454
+              span {
455
+                font-size: 18px;
456
+              }
457
+            }
458
+
459
+            .carrItems {
460
+              color: @primary-color;
461
+              border-color: @primary-color !important;
462
+            }
463
+
464
+            .process {
465
+              width: 80%;
466
+              display: flex;
467
+              justify-content: center;
468
+              align-items: center;
469
+              margin: 5px auto;
470
+              font-size: 14px;
471
+
472
+              .carrItem {
473
+                height: 40px;
474
+                line-height: 28px;
475
+                cursor: pointer;
476
+                display: flex;
477
+                justify-content: center;
478
+                align-items: center;
479
+
480
+                .carrItem_icon {
481
+                  width: 35px;
482
+                  height: 35px;
483
+                  border: 1px solid #e5e9ed;
484
+                  border-radius: 50%;
485
+                  text-align: center;
486
+                  line-height: 35px;
487
+                  margin-right: 10px;
488
+
489
+                  i {
490
+                    font-size: 18px;
491
+                  }
492
+                }
493
+              }
494
+
495
+              .carrItem1 {
496
+                float: left;
497
+                width: 45%;
498
+                height: 40px;
499
+                line-height: 28px;
500
+                padding-left: 10%;
501
+                cursor: pointer;
502
+
503
+                .carrItem_icon {
504
+                  width: 35px;
505
+                  height: 35px;
506
+                  border: 1px solid #e5e9ed;
507
+                  border-radius: 50%;
508
+                  text-align: center;
509
+                  line-height: 35px;
510
+                  float: left;
511
+                  margin-right: 10px;
512
+
513
+                  i {
514
+                    font-size: 18px;
515
+                  }
516
+                }
517
+              }
518
+            }
519
+          }
520
+
521
+          .ysgc_cont {
522
+            padding: 0px 240px 24px 240px;
523
+
524
+            textarea {
525
+              padding-right: 10%;
526
+            }
527
+
528
+            .icon_btn {
529
+              cursor: pointer;
530
+              font-size: 18px;
531
+            }
532
+
533
+            .icon_text {
534
+              display: block;
535
+              cursor: pointer;
536
+              position: relative;
537
+              right: 5px;
538
+            }
539
+
540
+            .item_type_cont {
541
+              height: 70px;
542
+              padding-top: 4px;
543
+
544
+              & > div {
545
+                height: 65px;
546
+                border: 1px solid #e5e9ed;
547
+                border-radius: 5px;
548
+                background: #fff;
549
+
550
+                .item_type_cont_L {
551
+                  height: 100%;
552
+                  width: 90%;
553
+                  float: left;
554
+                  padding: 2px 12px;
555
+                  overflow: auto;
556
+
557
+                  .item_yq {
558
+                    width: 24%;
559
+                    height: 28px;
560
+                    display: inline-block;
561
+                    border: 1px solid #e5e9ed;
562
+                    border-radius: 20px;
563
+                    text-align: center;
564
+                    line-height: 26px;
565
+                    background: #f9fafb;
566
+                    margin-right: 1%;
567
+                    margin-bottom: 2px;
568
+                    font-size: 12px;
569
+                    padding-left: 8px;
570
+
571
+                    span {
572
+                      width: 75%;
573
+                      float: left;
574
+                      overflow: hidden;
575
+                      text-overflow: ellipsis;
576
+                      white-space: nowrap;
577
+                    }
578
+
579
+                    i {
580
+                      font-size: 14px;
581
+                      color: #999;
582
+                      cursor: pointer;
583
+                    }
584
+                  }
585
+                }
586
+
587
+                .item_type_cont_R {
588
+                  height: 100%;
589
+                  width: 10%;
590
+                  float: right;
591
+                  text-align: center;
592
+                  padding-top: 15px;
593
+                  border-left: 1px solid #e5e9ed;
594
+                  cursor: pointer;
595
+
596
+                  i {
597
+                    display: block;
598
+                    font-size: 16px;
599
+                  }
600
+
601
+                  i:hover {
602
+                    color: @primary-color;
603
+                  }
604
+
605
+                  .icon_text {
606
+                    right: 1px;
607
+                  }
608
+                }
609
+              }
610
+            }
611
+          }
612
+        }
613
+
614
+        //关联信息
615
+        .glxxItem {
616
+          padding: 10px 15px 0px 15px;
617
+          background: #fff;
618
+
619
+          .tab_btn {
620
+            cursor: pointer;
621
+          }
622
+
623
+          .tab_btn:hover {
624
+            color: @primary-color;
625
+          }
626
+
627
+          .table_title {
628
+            font-size: 18px;
629
+            margin: 14px 0px;
630
+            text-align: center;
631
+          }
632
+
633
+          .thead {
634
+            background-image: linear-gradient(to right, @bg-start, @bg-end);
635
+
636
+            th {
637
+              background: transparent;
638
+              color: #fff;
639
+              text-align: center;
640
+              font-size: 14px;
641
+            }
642
+          }
643
+
644
+          .ant-table-body {
645
+            // border-bottom: 1px solid #e5e9ed;
646
+            background: #f9fafb;
647
+          }
648
+
649
+          .ant-table-tbody {
650
+            background: #f9fafb;
651
+            border: 1px solid #e5e9ed;
652
+
653
+            tr {
654
+              text-align: center;
655
+              font-size: 14px;
656
+              border: none;
657
+              color: #333;
658
+
659
+              td {
660
+                border: none; // font-size: 14px;
661
+
662
+                nz-input-number {
663
+                  width: 40px;
664
+                }
665
+
666
+                .coop {
667
+                  .line {
668
+                    margin: 10px;
669
+                  }
670
+
671
+                  span:nth-child(2n-1) {
672
+                    cursor: pointer;
673
+
674
+                    &:hover {
675
+                      color: @primary-color;
676
+                    }
677
+
678
+                    &:active {
679
+                      color: @primary-color;
680
+                    }
681
+                  }
682
+                }
683
+              }
684
+            }
685
+
686
+            tr:nth-child(even) {
687
+              background: #fff;
688
+            }
689
+          }
690
+        }
691
+
692
+        // 开通科室
693
+        .ktksItem {
694
+          padding: 0px 0px 0px 0px;
695
+          background: #fff;
696
+
697
+          .top {
698
+            width: 100%; // padding-bottom: 7px;
699
+            // border-bottom: 1px solid #e5e9ed;
700
+            position: relative;
701
+            overflow: hidden;
702
+            z-index: 2;
703
+            display: flex;
704
+            align-items: center;
705
+            justify-content: space-between;
706
+
707
+            .top_L {
708
+              width: 70%;
709
+              text-align: left;
710
+              display: flex;
711
+              flex-wrap: wrap;
712
+              align-items: center;
713
+              padding: 0 4px;
714
+              .top_L_item {
715
+                margin-left: 4px;
716
+              }
717
+
718
+              .label {
719
+                font-size: 14px;
720
+                color: #333;
721
+                margin-left: 0;
722
+              }
723
+
724
+              nz-select {
725
+                font-size: 12px;
726
+                width: 100px;
727
+              }
728
+
729
+              input {
730
+                font-size: 12px;
731
+                width: 100px;
732
+              }
733
+            }
734
+
735
+            .top_R {
736
+              border: 0px;
737
+
738
+              .btn {
739
+                margin-left: 10px;
740
+              }
741
+            }
742
+          }
743
+
744
+          .ktksItemList {
745
+            padding: 10px 15px 0px 15px;
746
+            .table {
747
+              min-height: 528px;
748
+            }
749
+
750
+            .operate {
751
+              float: right;
752
+              margin-bottom: 5px;
753
+
754
+              span {
755
+                font-size: 14px;
756
+              }
757
+
758
+              .num {
759
+                font-size: 18px;
760
+                color: @primary-color;
761
+              }
762
+            }
763
+
764
+            .thead {
765
+              background-image: linear-gradient(to right, @bg-start, @bg-end);
766
+
767
+              th {
768
+                background: transparent;
769
+                color: #fff;
770
+                text-align: center;
771
+                font-size: 14px;
772
+              }
773
+            }
774
+
775
+            .ant-table-body {
776
+              border-bottom: 1px solid #e5e9ed;
777
+              background: #f9fafb;
778
+            }
779
+
780
+            .ant-table-tbody {
781
+              background: #f9fafb;
782
+              border: 1px solid #e5e9ed;
783
+
784
+              .zzBontton {
785
+                & > td {
786
+                  border-bottom: 1px solid #e5e9ed;
787
+                }
788
+              }
789
+
790
+              tr {
791
+                text-align: center;
792
+                font-size: 14px;
793
+                border: none;
794
+                color: #333;
795
+
796
+                td {
797
+                  border: none; // font-size: 14px;
798
+
799
+                  nz-input-number {
800
+                    width: 40px;
801
+                  }
802
+
803
+                  .coop {
804
+                    .line {
805
+                      margin: 10px;
806
+                    }
807
+
808
+                    span:nth-child(2n-1) {
809
+                      cursor: pointer;
810
+
811
+                      &:hover {
812
+                        color: @primary-color;
813
+                      }
814
+
815
+                      &:active {
816
+                        color: @primary-color;
817
+                      }
818
+                    }
819
+                  }
820
+                }
821
+              }
822
+
823
+              tr:nth-child(even) {
824
+                background: #fff;
825
+              }
826
+            }
827
+          }
828
+
829
+          .pagination {
830
+            margin-top: 25px;
831
+            margin-bottom: 14px;
832
+            bottom: 12px;
833
+            right: 5px;
834
+            position: relative;
835
+            height: 30px;
836
+            .page {
837
+              position: absolute;
838
+              right: 5px;
839
+            }
840
+          }
841
+        }
842
+
843
+        .bottom {
844
+          height: 60px;
845
+          border-radius: 0px 0px 10px 10px;
846
+          padding: 10px 240px 0px 240px;
847
+          border-top: 0px;
848
+
849
+          button {
850
+            width: 80px;
851
+            height: 34px;
852
+            display: block;
853
+            margin: 0 auto;
854
+          }
855
+        }
856
+      }
857
+    }
858
+  }
859
+  .timeRange{
860
+    margin-bottom: 56px;
861
+    &:last-of-type{
862
+      margin-bottom: 0;
863
+    }
864
+    .timeRangeActive{
865
+      margin-top: 16px;
866
+      padding-left: 60px;
867
+    }
868
+    .timeRangeDefault{
869
+      margin-top: 16px;
870
+      padding-left: 60px;
871
+    }
872
+    .timeRangeCheckbox{
873
+      margin-left: 16px;
874
+    }
875
+  }
178 876
 }

+ 222 - 1
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts

@@ -6,6 +6,7 @@ import { ToolService } from 'src/app/services/tool.service';
6 6
 import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
7 7
 import { NzMessageService } from 'ng-zorro-antd';
8 8
 import { v4 as uuidv4, validate as uuidValidate } from 'uuid';
9
+import { addDays, startOfMinute, endOfMinute, set, getYear, getMonth, getDate, format } from 'date-fns';
9 10
 
10 11
 @Component({
11 12
   selector: "app-configuration-inspect",
@@ -41,13 +42,37 @@ export class ConfigurationInspectComponent implements OnInit {
41 42
   // 数据字典key列表
42 43
   dictionaryKeyList:any[] = [
43 44
     { id: 1, name: '注意事项', key: "inspect_notes"},
45
+    { id: 2, name: '批量建单配置', key: "", postData: {
46
+      ibActiveStartTime1: undefined,
47
+      ibActiveEndTime1: undefined,
48
+      ibActiveStartTime2: undefined,
49
+      ibActiveEndTime2: undefined,
50
+      ibDefaultStartTime: undefined,
51
+      ibDefaultEndTime: undefined,
52
+      ibDefaultDayStart: [{ label:'+1天', value: 0 }],
53
+      ibDefaultDayEnd: [{ label:'+1天', value: 0 }],
54
+      ib2ActiveStartTime1: undefined,
55
+      ib2ActiveEndTime1: undefined,
56
+      ib2ActiveStartTime2: undefined,
57
+      ib2ActiveEndTime2: undefined,
58
+      ib2DefaultStartTime: undefined,
59
+      ib2DefaultEndTime: undefined,
60
+      ib2DefaultDayStart: [{ label:'+1天', value: 0 }],
61
+      ib2DefaultDayEnd: [{ label:'+1天', value: 0 }],
62
+    }},
44 63
   ]
45 64
 
46 65
   // 点击数据字典key
47 66
   activeDictionaryKey:any;
48 67
   clickDictionaryKey(item){
49 68
     this.activeDictionaryKey = item;
50
-    this.getDictionaryList();
69
+    if(this.activeDictionaryKey.id == 1){
70
+      this.getDictionaryList();
71
+      this.initDictionaryForm();
72
+    }else{
73
+      this.tabModal('characteristics');
74
+      this.init();
75
+    }
51 76
   }
52 77
 
53 78
   btnLoading: boolean = false; //提交按钮loading状态
@@ -254,4 +279,200 @@ export class ConfigurationInspectComponent implements OnInit {
254 279
         }
255 280
       });
256 281
   }
282
+
283
+
284
+  // ==============================页面控制============================
285
+  tabModalName:string = 'characteristics'; //当前选中的tab
286
+  loading:boolean = false; //页面加载的loading
287
+  hosId = this.tool.getCurrentHospital().id; //当前院区
288
+  tasktype:any = {};// 任务类型
289
+  configs:any = {};// 配置
290
+  // 切换tab
291
+  tabModal(tabModalName:string){
292
+    this.tabModalName = tabModalName;
293
+  }
294
+  // 保存
295
+  submitForm() {
296
+    if(!this.tasktype.id){
297
+      this.message.create("warning", "请先配置任务类型!");
298
+      return;
299
+    }
300
+
301
+    // 默认时间区间1
302
+
303
+    if(
304
+      (this.activeDictionaryKey.postData.ibActiveStartTime1 && !this.activeDictionaryKey.postData.ibActiveEndTime1) ||
305
+      (!this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1) ||
306
+      (this.activeDictionaryKey.postData.ibActiveStartTime2 && !this.activeDictionaryKey.postData.ibActiveEndTime2) ||
307
+      (!this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2)
308
+    ){
309
+      this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
310
+      return;
311
+    }else if(
312
+      (this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1 && +this.activeDictionaryKey.postData.ibActiveStartTime1 > +this.activeDictionaryKey.postData.ibActiveEndTime1) ||
313
+      (this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2 && +this.activeDictionaryKey.postData.ibActiveStartTime2 > +this.activeDictionaryKey.postData.ibActiveEndTime2)
314
+    ){
315
+      this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
316
+      return;
317
+    }
318
+
319
+    if(
320
+      (this.activeDictionaryKey.postData.ibDefaultStartTime && !this.activeDictionaryKey.postData.ibDefaultEndTime) ||
321
+      (!this.activeDictionaryKey.postData.ibDefaultStartTime && this.activeDictionaryKey.postData.ibDefaultEndTime)
322
+    ){
323
+      this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
324
+      return;
325
+    }else if(
326
+      this.activeDictionaryKey.postData.ibDefaultStartTime &&
327
+      this.activeDictionaryKey.postData.ibDefaultEndTime &&
328
+      (this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? +addDays(this.activeDictionaryKey.postData.ibDefaultStartTime, 1) : +this.activeDictionaryKey.postData.ibDefaultStartTime) > (this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? +addDays(this.activeDictionaryKey.postData.ibDefaultEndTime, 1) : +this.activeDictionaryKey.postData.ibDefaultEndTime)
329
+    ){
330
+      this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
331
+      return;
332
+    }
333
+
334
+    // 默认时间区间2
335
+
336
+    if(
337
+      (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && !this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
338
+      (!this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
339
+      (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && !this.activeDictionaryKey.postData.ib2ActiveEndTime2) ||
340
+      (!this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2)
341
+    ){
342
+      this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
343
+      return;
344
+    }else if(
345
+      (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1 && +this.activeDictionaryKey.postData.ib2ActiveStartTime1 > +this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
346
+      (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2 && +this.activeDictionaryKey.postData.ib2ActiveStartTime2 > +this.activeDictionaryKey.postData.ib2ActiveEndTime2)
347
+    ){
348
+      this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
349
+      return;
350
+    }
351
+
352
+    if(
353
+      (this.activeDictionaryKey.postData.ib2DefaultStartTime && !this.activeDictionaryKey.postData.ib2DefaultEndTime) ||
354
+      (!this.activeDictionaryKey.postData.ib2DefaultStartTime && this.activeDictionaryKey.postData.ib2DefaultEndTime)
355
+    ){
356
+      this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
357
+      return;
358
+    }else if(
359
+      this.activeDictionaryKey.postData.ib2DefaultStartTime &&
360
+      this.activeDictionaryKey.postData.ib2DefaultEndTime &&
361
+      (this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? +addDays(this.activeDictionaryKey.postData.ib2DefaultStartTime, 1) : +this.activeDictionaryKey.postData.ib2DefaultStartTime) > (this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? +addDays(this.activeDictionaryKey.postData.ib2DefaultEndTime, 1) : +this.activeDictionaryKey.postData.ib2DefaultEndTime)
362
+    ){
363
+      this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
364
+      return;
365
+    }
366
+
367
+    let postData:any = {
368
+      ...this.configs,
369
+      taskType: this.tasktype.id,
370
+      hosId: this.hosId,
371
+      ibActiveStartTime1: this.activeDictionaryKey.postData.ibActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
372
+      ibActiveEndTime1: this.activeDictionaryKey.postData.ibActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
373
+      ibActiveStartTime2: this.activeDictionaryKey.postData.ibActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
374
+      ibActiveEndTime2: this.activeDictionaryKey.postData.ibActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
375
+      ibDefaultStartTime: this.activeDictionaryKey.postData.ibDefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ibDefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
376
+      ibDefaultEndTime: this.activeDictionaryKey.postData.ibDefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ibDefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
377
+      ibDefaultDayStart: this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? 1 : 0,
378
+      ibDefaultDayEnd: this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? 1 : 0,
379
+      ib2ActiveStartTime1: this.activeDictionaryKey.postData.ib2ActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
380
+      ib2ActiveEndTime1: this.activeDictionaryKey.postData.ib2ActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
381
+      ib2ActiveStartTime2: this.activeDictionaryKey.postData.ib2ActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
382
+      ib2ActiveEndTime2: this.activeDictionaryKey.postData.ib2ActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
383
+      ib2DefaultStartTime: this.activeDictionaryKey.postData.ib2DefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ib2DefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
384
+      ib2DefaultEndTime: this.activeDictionaryKey.postData.ib2DefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ib2DefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
385
+      ib2DefaultDayStart: this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? 1 : 0,
386
+      ib2DefaultDayEnd: this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? 1 : 0,
387
+    };
388
+    console.log(postData);
389
+    this.btnLoading = true;
390
+    this.mainService
391
+      .simplePost("addData", "taskTypeConfig", postData)
392
+      .subscribe((result) => {
393
+        this.btnLoading = false;
394
+        if (result.status == 200) {
395
+          this.message.success("保存成功!");
396
+          this.getConfig();
397
+        }else{
398
+          this.message.success("保存失败!");
399
+        }
400
+      });
401
+  }
402
+
403
+  //初始化
404
+  init() {
405
+    this.loading = true;
406
+    this.getTaskType();
407
+  }
408
+
409
+  //获取任务类型
410
+  getTaskType() {
411
+    this.loading = true;
412
+    let postData = {
413
+      idx: 0,
414
+      sum: 1,
415
+      taskType: {
416
+        simpleQuery: true,
417
+        hosId: {
418
+          id: this.hosId
419
+        },
420
+        associationType: {
421
+          key: 'association_types',
422
+          value: 'inspect',
423
+        }
424
+      }
425
+    };
426
+    this.mainService
427
+      .getFetchDataList("simple/data", "taskType", postData)
428
+      .subscribe((result) => {
429
+        this.loading = false;
430
+        if (result.status == 200) {
431
+          this.tasktype = result.list[0] || {};
432
+          this.getConfig();
433
+        }
434
+      });
435
+  }
436
+
437
+  // 获取配置
438
+  getConfig() {
439
+    this.loading = true;
440
+    let postData = {
441
+      idx: 0,
442
+      sum: 1,
443
+      taskTypeConfig: {
444
+        taskTypeDTO: {
445
+          hosId: {
446
+            id: this.hosId
447
+          },
448
+          associationType: this.tasktype.associationType,
449
+        }
450
+      }
451
+    };
452
+    this.mainService
453
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
454
+      .subscribe((result) => {
455
+        this.loading = false;
456
+        if (result.status == 200) {
457
+          this.configs = result.list[0] || {};
458
+          this.activeDictionaryKey.postData.ibActiveStartTime1 = this.configs.ibActiveStartTime1 || undefined;
459
+          this.activeDictionaryKey.postData.ibActiveEndTime1 = this.configs.ibActiveEndTime1 || undefined;
460
+          this.activeDictionaryKey.postData.ibActiveStartTime2 = this.configs.ibActiveStartTime2 || undefined;
461
+          this.activeDictionaryKey.postData.ibActiveEndTime2 = this.configs.ibActiveEndTime2 || undefined;
462
+          this.activeDictionaryKey.postData.ibDefaultStartTime = this.configs.ibDefaultStartTime || undefined;
463
+          this.activeDictionaryKey.postData.ibDefaultEndTime = this.configs.ibDefaultEndTime || undefined;
464
+          this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked = this.configs.ibDefaultDayStart == 1;
465
+          this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked = this.configs.ibDefaultDayEnd == 1;
466
+
467
+          this.activeDictionaryKey.postData.ib2ActiveStartTime1 = this.configs.ib2ActiveStartTime1 || undefined;
468
+          this.activeDictionaryKey.postData.ib2ActiveEndTime1 = this.configs.ib2ActiveEndTime1 || undefined;
469
+          this.activeDictionaryKey.postData.ib2ActiveStartTime2 = this.configs.ib2ActiveStartTime2 || undefined;
470
+          this.activeDictionaryKey.postData.ib2ActiveEndTime2 = this.configs.ib2ActiveEndTime2 || undefined;
471
+          this.activeDictionaryKey.postData.ib2DefaultStartTime = this.configs.ib2DefaultStartTime || undefined;
472
+          this.activeDictionaryKey.postData.ib2DefaultEndTime = this.configs.ib2DefaultEndTime || undefined;
473
+          this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked = this.configs.ib2DefaultDayStart == 1;
474
+          this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked = this.configs.ib2DefaultDayEnd == 1;
475
+        }
476
+      });
477
+  }
257 478
 }

+ 1 - 1
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -262,7 +262,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
262 262
     let signTypeIds = this.checkInModes.filter(v => v.checked).map(v => v.value).toString();
263 263
     // let closeTypeIds = this.automaticCustomsOrders.filter(v => v.checked).map(v => v.value).toString();
264 264
     let postData:any = {
265
-      id: this.configs.id,
265
+      ...this.configs,
266 266
       taskType: this.tasktype.id,
267 267
       hosId: this.hosId,
268 268
       multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,