瀏覽代碼

预约陪检检查

seimin 3 月之前
父節點
當前提交
b2b662b785

+ 1 - 1
proxy.conf.json

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

+ 2 - 2
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html

@@ -5,7 +5,7 @@
5 5
       <div class="contentHead">工时大类
6 6
 				<div>
7 7
 					<button nz-button class="mar-rig-10 btn cancel" nzType="default" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="delCategoryModal(1)">删除</button>
8
-          <button nz-button class="mar-rig-10 btn" nzType="primary" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="editCategoryModal(1)">修改</button>
8
+          <button nz-button class="mar-rig-10 btn" nzType="primary" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="editCategoryModal(1)">编辑</button>
9 9
 					<button nz-button nzType="primary" nzSize="small" (click)="addCategoryModal(1)">新增</button>
10 10
 				</div>
11 11
 			</div>
@@ -18,7 +18,7 @@
18 18
       <div class="contentHead">工时小类
19 19
 				<div>
20 20
 					<button nz-button class="mar-rig-10 btn cancel" *ngIf="activeCategory2.id && activeCategory1.id" nzType="default" nzSize="small" (click)="delCategoryModal(2)">删除</button>
21
-          <button nz-button class="mar-rig-10 btn" *ngIf="activeCategory2.id && activeCategory1.id" nzType="primary" nzSize="small" (click)="editCategoryModal(2)">修改</button>
21
+          <button nz-button class="mar-rig-10 btn" *ngIf="activeCategory2.id && activeCategory1.id" nzType="primary" nzSize="small" (click)="editCategoryModal(2)">编辑</button>
22 22
 					<button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory1.id" (click)="addCategoryModal(2)">新增</button>
23 23
 				</div>
24 24
 			</div>

+ 51 - 25
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.ts

@@ -171,7 +171,7 @@ export class ConfigurationManHourComponent implements OnInit {
171 171
   categoryLoading1:boolean = false;
172 172
   categoryLoading2:boolean = false;
173 173
   categoryLoading3:boolean = false;
174
-  getCategoryList(type:number, parentId = 0) {
174
+  getCategoryList(type:number, parentId = 0, isEdit = false, isOnly = false) {
175 175
     setTimeout(() => {
176 176
       this['categoryLoading' + type] = true;
177 177
     }, 0)
@@ -190,6 +190,14 @@ export class ConfigurationManHourComponent implements OnInit {
190 190
 		  .subscribe((res) => {
191 191
 		    this['categoryLoading' + type] = false;
192 192
 		    this['categoryList' + type] = res.list || [];
193
+        console.log(this['activeCategory' + type])
194
+        if(isEdit){
195
+          this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this['activeCategory' + type].id);
196
+        }
197
+
198
+        if(isOnly){
199
+          this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this.validateCategoryForm.value.parent);
200
+        }
193 201
 		  });
194 202
   }
195 203
 
@@ -206,11 +214,11 @@ export class ConfigurationManHourComponent implements OnInit {
206 214
     this.initCategoryForm();
207 215
   }
208 216
   isLoading:boolean = false;
209
-  // 修改
217
+  // 编辑
210 218
   editCategoryModal(type:number) {
211 219
     this.coopType = type;
212
-    this.modelName = "修改";
213
-    this.add = false; //修改
220
+    this.modelName = "编辑";
221
+    this.add = false; //编辑
214 222
     this.modalCategory = true;
215 223
     this.initCategoryForm();
216 224
     if(type == 1){
@@ -288,36 +296,40 @@ export class ConfigurationManHourComponent implements OnInit {
288 296
     let postData:any;
289 297
     if(this.add){
290 298
       postData = {
291
-        ...this.validateCategoryForm.value,
292
-        integral:{
293
-          id:this.validateCategoryForm.value.integral
294
-        },
295
-        hosId: this.hosId,
296
-        treeLevel: this.coopType,
297
-        parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
299
+        workHourManagement: {
300
+          ...this.validateCategoryForm.value,
301
+          integral:{
302
+            id:this.validateCategoryForm.value.integral
303
+          },
304
+          hosId: this.hosId,
305
+          treeLevel: this.coopType,
306
+          parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
307
+        }
298 308
       }
299 309
     }else{
300 310
       postData = {
301
-        ...this['activeCategory' + this.coopType],
302
-        ...this.validateCategoryForm.value,
303
-        integral:{
304
-          id:this.validateCategoryForm.value.integral
305
-        },
306
-        hosId: this.hosId,
307
-        treeLevel: this.coopType,
308
-        parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
311
+        workHourManagement: {
312
+          ...this['activeCategory' + this.coopType],
313
+          ...this.validateCategoryForm.value,
314
+          integral:{
315
+            id:this.validateCategoryForm.value.integral
316
+          },
317
+          hosId: this.hosId,
318
+          treeLevel: this.coopType,
319
+          parent: { id: this.validateCategoryForm.value.parent },
320
+        }
309 321
       }
310 322
     }
311 323
 
312 324
 		this.mainService
313
-			.simplePost(this.add ? "addData" : "updData", "workHourManagement", postData)
325
+			.coopData(this.add ? "addData" : "updData", "workHourManagement", postData)
314 326
 			.subscribe((data) => {
315 327
 				this.btnLoading = false;
316 328
 				if (data.status == 200) {
317 329
 					this.modalCategory = false
318
-					this.showPromptModal(this.add ? "新增" : "修改", true, "");
330
+					this.showPromptModal(this.add ? "新增" : "编辑", true, "");
319 331
 				} else {
320
-					this.showPromptModal(this.add ? "新增" : "修改", false, data.msg);
332
+					this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
321 333
 				}
322 334
 			});
323 335
     // -----------------------------------
@@ -364,10 +376,24 @@ export class ConfigurationManHourComponent implements OnInit {
364 376
     setTimeout(() => {
365 377
       this.promptModalShow = true;
366 378
     }, 100);
367
-    if(this.coopType !== 0){
368
-      this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
379
+    if(con === '编辑'){
380
+      if(success){
381
+        if(this.coopType === 1){
382
+          this.getCategoryList(1, 0, true);
383
+        }else if(this.coopType === 2){
384
+          this.getCategoryList(1, 0, false, true);
385
+          this.getCategoryList(2, this.validateCategoryForm.value.parent, true);
386
+        }
387
+      }
369 388
     }else{
370
-      this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
389
+      if(this.coopType !== 0){
390
+        this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
391
+      }else{
392
+        this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
393
+      }
394
+      if(this.activeCategory2.id || this.activeCategory1.id){
395
+        this.getCategoryList(this.activeCategory2.id || this.activeCategory1.id);
396
+      }
371 397
     }
372 398
   }
373 399
 }

+ 2 - 2
src/app/services/main.service.ts

@@ -305,10 +305,10 @@ export class MainService {
305 305
     });
306 306
   }
307 307
   //服务台新建工单—调度台建单获取起点科室或者终点科室列表
308
-  getdeptList(taskTypeId, patientCode = undefined) {
308
+  getdeptList(taskTypeId, patientCode = undefined, startTime, endTime) {
309 309
     return this.http.post(
310 310
       host.host + "/ser/getdeptList",
311
-      { taskTypeId, patientCode: patientCode || undefined },
311
+      { taskTypeId, patientCode: patientCode || undefined, startTime, endTime },
312 312
       { headers: this.headers }
313 313
     );
314 314
   }

+ 30 - 16
src/app/views/fuwutai/fuwutai.component.html

@@ -1097,24 +1097,38 @@
1097 1097
                           </nz-form-item>
1098 1098
                         </div>
1099 1099
                         <div nz-col [nzSpan]="24" *ngIf="isTaskTypeInspect && radioValueZy">
1100
-                          <!-- 检查 -->
1101
-                          <nz-form-item>
1102
-                            <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck" style="text-align: left;">关联的检查</nz-form-label>
1103
-                            <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1104
-                              <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1105
-                                <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1106
-                                  <div nz-col nzSpan="24">
1107
-                                    <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1108
-                                    <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1100
+                          <div class="pos">
1101
+                            <div class="pos-item" style="left: 90px;top: 7px;">
1102
+                              <span style="font-size: 14px">{{inspectToday| date:'yyyy-MM-dd'}}</span>
1103
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="previousDayNew()">
1104
+                                上一日
1105
+                              </button>
1106
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="todayNew()">
1107
+                                今天
1108
+                              </button>
1109
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="nextDayNew()">
1110
+                                下一日
1111
+                              </button>
1112
+                            </div>
1113
+                            <!-- 检查 -->
1114
+                            <nz-form-item>
1115
+                              <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck" style="text-align: left;">关联的检查</nz-form-label>
1116
+                              <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1117
+                                <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1118
+                                  <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1119
+                                    <div nz-col nzSpan="24">
1120
+                                      <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1121
+                                      <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1122
+                                    </div>
1109 1123
                                   </div>
1124
+                                </nz-checkbox-wrapper>
1125
+                                <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1126
+                                  您选择的检查包含了多个科室,请您只包含一个科室。
1110 1127
                                 </div>
1111
-                              </nz-checkbox-wrapper>
1112
-                              <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1113
-                                您选择的检查包含了多个科室,请您只包含一个科室。
1114
-                              </div>
1115
-                            </nz-form-control>
1116
-                            <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1117
-                          </nz-form-item>
1128
+                              </nz-form-control>
1129
+                              <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1130
+                            </nz-form-item>
1131
+                          </div>
1118 1132
                         </div>
1119 1133
                         <div *ngIf="!isTaskTypeInspect && radioValueZy" nz-col [nzSpan]="deptZyList['startStatus'] != 201 ? 12 : 24" [ngStyle]="{ display: (deptZyList['startStatus'] != 201 && !isTaskTypeInspect) ? 'block' : 'none'}">
1120 1134
                           <nz-form-item>

+ 5 - 0
src/app/views/fuwutai/fuwutai.component.less

@@ -116,6 +116,11 @@
116 116
       left: 110px;
117 117
       z-index: 9;
118 118
     }
119
+    .pos-btn:focus,.pos-btn:hover{
120
+      color: rgba(0, 0, 0, 0.65)!important;
121
+      background-color: #fff!important;
122
+      border-color: #d9d9d9!important;
123
+    }
119 124
     .ant-form-item-label{
120 125
       text-align: left;
121 126
     }

+ 47 - 3
src/app/views/fuwutai/fuwutai.component.ts

@@ -21,7 +21,7 @@ import { Subject, forkJoin } from "rxjs";
21 21
 import { debounceTime, filter, map } from "rxjs/operators";
22 22
 import { SourceId } from "src/app/type/types";
23 23
 import { ToolService } from 'src/app/services/tool.service';
24
-import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours } from 'date-fns';
24
+import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours, startOfDay, endOfDay } from 'date-fns';
25 25
 import { UploadFile } from 'ng-zorro-antd';
26 26
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
27 27
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -166,6 +166,7 @@ export class FuwutaiComponent implements OnInit {
166 166
   searchHosDepartmentSubject = new Subject();
167 167
   searchHosDepartmentQtSubject = new Subject();
168 168
   searchPatientListSubject = new Subject();
169
+  inspectSubject = new Subject();
169 170
 
170 171
   // 运维相关
171 172
   incidentModel:any = {};
@@ -809,6 +810,9 @@ export class FuwutaiComponent implements OnInit {
809 810
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
810 811
       this.searchApplicationDepartment(v[0], v[1]);
811 812
     });
813
+    this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
814
+      this.refreshInspectList();
815
+    });
812 816
     this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
813 817
       if(v[0] === 'requester'){
814 818
         this.searchApplicationRequester(v[1]);
@@ -4537,7 +4541,7 @@ export class FuwutaiComponent implements OnInit {
4537 4541
     // 返回值的status是204 则让前端自己调用科室搜索接口
4538 4542
     // 返回值的status是205 则是固定科室类型,会返回科室列表
4539 4543
     // 返回值的status是206 则是默认患者所在科室,把患者所在科室作为值
4540
-    this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
4544
+    this.mainService.getdeptList(value, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
4541 4545
       this.deptZyList = data;
4542 4546
       // 预约start
4543 4547
       this.currentTasktype = data.taskType;
@@ -5697,7 +5701,7 @@ export class FuwutaiComponent implements OnInit {
5697 5701
         patientCode = undefined;
5698 5702
       }
5699 5703
 
5700
-      this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
5704
+      this.mainService.getdeptList(value, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
5701 5705
         this.linkCheckLis = [];
5702 5706
         if(data.data && Array.isArray(data.data.data) && data.data.data.length) {
5703 5707
           let arr = [];
@@ -5740,4 +5744,44 @@ export class FuwutaiComponent implements OnInit {
5740 5744
       this.noteList = result || [];
5741 5745
     });
5742 5746
   }
5747
+
5748
+  // 关联的检查-上一日,下一日,今天
5749
+  inspectToday:Date = new Date();
5750
+  // 上一日
5751
+  previousDayNew(){
5752
+    this.inspectToday = addDays(this.inspectToday, -1);
5753
+    this.inspectSubject.next();
5754
+  }
5755
+
5756
+  // 今天
5757
+  todayNew(){
5758
+    this.inspectToday = new Date();
5759
+    this.inspectSubject.next();
5760
+  }
5761
+
5762
+  // 下一日
5763
+  nextDayNew(){
5764
+    this.inspectToday = addDays(this.inspectToday, 1);
5765
+    this.inspectSubject.next();
5766
+  }
5767
+
5768
+  refreshInspectList(){
5769
+    this.linkCheckLis = [];
5770
+    this.mainService.getdeptList(this.radioValueZy, this.patientZy, format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss')).subscribe((data:any) => {
5771
+      if (data.data && Array.isArray(data.data.data) && data.data.data.length) {
5772
+        let arr = [];
5773
+        data.data.data.forEach((e) => {
5774
+          arr.push({
5775
+            execDeptId: e.execDept.id,
5776
+            yyTime: e.yyTime,
5777
+            priority: e.priority,
5778
+            label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
5779
+            value: e["id"],
5780
+            checked: false,
5781
+          });
5782
+        });
5783
+        this.linkCheckLis = arr;
5784
+      }
5785
+    });
5786
+  }
5743 5787
 }

+ 41 - 19
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1270,6 +1270,7 @@
1270 1270
                             <!-- <button (click)="viewBx(data)">查看</button> -->
1271 1271
                             <button class="btn1 mr8 mb8 mt8" (click)="detailBx(data)">查看</button>
1272 1272
                             <button class="btn1 mr8 mb8 mt8" (click)="showAppraiseBx(data)" *ngIf="data.state && data.state.value == 'close' && !data.wxdegree">评价</button>
1273
+                            <button class="btn1 mr8 mb8 mt8" (click)="delBx(data)" *ngIf="data.state && data.state.value == 'accept'">撤销</button>
1273 1274
                           </td>
1274 1275
                         </tr>
1275 1276
                       </tbody>
@@ -1462,25 +1463,39 @@
1462 1463
             </div>
1463 1464
           </ng-container>
1464 1465
           <ng-container *ngIf="!cLoading">
1465
-            <!-- 检查 -->
1466
-            <nz-form-item *ngIf="checkedShowMsg.status == 200">
1467
-              <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck">关联的检查</nz-form-label>
1468
-              <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1469
-                <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1470
-                  <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1471
-                    <div nz-col nzSpan="24">
1472
-                      <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1473
-                      <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1466
+            <div class="pos" *ngIf="checkedShowMsg.status == 200">
1467
+              <div class="pos-item" style="left: 110px;top: -4px;">
1468
+                <span style="font-size: 18px">{{inspectToday| date:'yyyy-MM-dd'}}</span>
1469
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="previousDayNew()">
1470
+                  上一日
1471
+                </button>
1472
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="todayNew()">
1473
+                  今天
1474
+                </button>
1475
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="nextDayNew()">
1476
+                  下一日
1477
+                </button>
1478
+              </div>
1479
+              <!-- 检查 -->
1480
+              <nz-form-item>
1481
+                <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck">关联的检查</nz-form-label>
1482
+                <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1483
+                  <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1484
+                    <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1485
+                      <div nz-col nzSpan="24">
1486
+                        <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1487
+                        <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1488
+                      </div>
1474 1489
                     </div>
1490
+                  </nz-checkbox-wrapper>
1491
+                  <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1492
+                    您选择的检查包含了多个科室,请您只包含一个科室。
1475 1493
                   </div>
1476
-                </nz-checkbox-wrapper>
1477
-                <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1478
-                  您选择的检查包含了多个科室,请您只包含一个科室。
1479
-                </div>
1480
-              </nz-form-control>
1481
-              <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1482
-            </nz-form-item>
1483
-            <div class="pos" *ngIf="(currentTasktype.associationType.value === 'patientTransport' && appointmentZyBuildFlag == 1) || (currentTasktype.associationType.value === 'inspect' && appointmentBuildFlag == 1)">
1494
+                </nz-form-control>
1495
+                <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1496
+              </nz-form-item>
1497
+            </div>
1498
+            <div class="pos" *ngIf="(currentTasktype.associationType.value === 'patientTransport' && appointmentZyBuildFlag == '1') || (currentTasktype.associationType.value === 'inspect' && appointmentBuildFlag == '1')">
1484 1499
               <!-- 需要预约检查 -->
1485 1500
               <nz-form-item class="pos-item">
1486 1501
                 <nz-form-control>
@@ -2313,6 +2328,14 @@
2313 2328
   (confirmDelEvent)="confirmDelAdvice()"
2314 2329
   content="您确认要删除此条意见吗?"
2315 2330
 ></app-dialog-delete>
2331
+<!-- 撤销报修 -->
2332
+<app-dialog-delete
2333
+  [delModal]="delBxModal"
2334
+  (hideDelModalEvent)="hideDelBxModal()"
2335
+  [btnLoading]="btnLoading"
2336
+  (confirmDelEvent)="confirmDelBx()"
2337
+  content="您确认要删除吗?"
2338
+></app-dialog-delete>
2316 2339
 <!-- 关注模态框 -->
2317 2340
 <div class="commonModal display_flex justify-content_flex-center align-items_center" *ngIf="commonModal">
2318 2341
   <div class="modalBody">
@@ -2592,8 +2615,7 @@
2592 2615
 				提示:查询到{{viewData[0].patientDTO.patientName}}({{viewData[0].patientDTO.patientCode}})患者有多条申请单,请选择对应申请单
2593 2616
 			</div>
2594 2617
 			<div class="list-template__bottom">
2595
-				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
2596
-					[nzLoading]="grossLoading">
2618
+				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false">
2597 2619
 					<thead>
2598 2620
 						<tr class="thead">
2599 2621
 							<th>申请单类型</th>

+ 5 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -87,6 +87,11 @@
87 87
       top: -10px;
88 88
       z-index: 9;
89 89
     }
90
+    .pos-btn:focus,.pos-btn:hover{
91
+      color: rgba(0, 0, 0, 0.65)!important;
92
+      background-color: #fff!important;
93
+      border-color: #d9d9d9!important;
94
+    }
90 95
   }
91 96
 
92 97
   .addRemarks {

+ 104 - 19
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -33,7 +33,7 @@ import {
33 33
   startOfDay,
34 34
   endOfDay,
35 35
   parse,
36
-	subHours 
36
+	subHours
37 37
 } from "date-fns";
38 38
 import { SourceId } from "src/app/type/types";
39 39
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -116,6 +116,7 @@ export class HushijiandanComponent implements OnInit {
116 116
   searchAccountSubject = new Subject(); //查工号防抖
117 117
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
118 118
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
119
+  inspectSubject = new Subject();
119 120
   isYyInspect = false; //需要预约检查
120 121
   inspectAndPatientTransportConfig:any = {timeMod: 30};
121 122
   constructor(
@@ -202,6 +203,9 @@ export class HushijiandanComponent implements OnInit {
202 203
     this.otherSearchChangeSubject.pipe(debounceTime(500)).subscribe((v) => {
203 204
       this.getDeptTaskType(v);
204 205
     });
206
+    this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
207
+      this.refreshInspectList();
208
+    });
205 209
 
206 210
     this.getTodayNum();
207 211
     this.initLogin();
@@ -336,7 +340,7 @@ export class HushijiandanComponent implements OnInit {
336 340
 		    }
337 341
 		  });
338 342
 	}
339
-	
343
+
340 344
 	// 新增申请单自选类型
341 345
 	applicationType:any;
342 346
 	isPathologyVisible:any = false;
@@ -348,18 +352,18 @@ export class HushijiandanComponent implements OnInit {
348 352
 			this.submitPathlogyForm()
349 353
 		}
350 354
 	}
351
-	
355
+
352 356
 	// 取消新增申请单自选类型
353 357
 	handlePathologyCancel(){
354 358
 		this.applicationType = null
355 359
 		this.isPathologyVisible = false
356 360
 	}
357
-	
361
+
358 362
 	// 确定新增申请单自选类型
359 363
 	handlePathologyOk(){
360 364
 		this.submitPathlogyForm()
361 365
 	}
362
-	
366
+
363 367
 	// 新增申请单自选类型
364 368
 	submitPathlogyForm(){
365 369
 		if(this.openType=='btn'){
@@ -387,7 +391,7 @@ export class HushijiandanComponent implements OnInit {
387 391
 			this.pathologyModal = true
388 392
 		});
389 393
 	}
390
-	
394
+
391 395
 	// 手术排程-病理申请单
392 396
 	openType:any;
393 397
 	scheduleItem:any;
@@ -513,7 +517,7 @@ export class HushijiandanComponent implements OnInit {
513 517
 			}
514 518
 		});
515 519
 	}
516
-	
520
+
517 521
 	// 获取病理申请单最新数据
518 522
 	getPathologyData(){
519 523
 		if(this.openType=='btn'){
@@ -549,7 +553,7 @@ export class HushijiandanComponent implements OnInit {
549 553
 			}
550 554
 		})
551 555
 	}
552
-	
556
+
553 557
 	// 申请单号点击
554 558
 	itemClick(item){
555 559
 		this.detailId = item.id
@@ -567,7 +571,7 @@ export class HushijiandanComponent implements OnInit {
567 571
 			}
568 572
 		},200)
569 573
 	}
570
-	
574
+
571 575
 	// 申请单作废
572 576
 	cancellationLoading:any = false;
573 577
 	cancellationModal:any = false;
@@ -575,7 +579,7 @@ export class HushijiandanComponent implements OnInit {
575 579
 		this.coopId = data.id
576 580
 		this.cancellationModal = true
577 581
 	}
578
-	
582
+
579 583
 	// 确定作废
580 584
 	confirmCancellation(){
581 585
 		this.cancellationLoading = true;
@@ -591,12 +595,12 @@ export class HushijiandanComponent implements OnInit {
591 595
 			}
592 596
 		});
593 597
 	}
594
-	
598
+
595 599
 	// 取消作废
596 600
 	cancelCancellation(){
597 601
 		this.cancellationModal = false
598 602
 	}
599
-	
603
+
600 604
 	hideModal(){
601 605
 		this.multiDialog = false
602 606
 	}
@@ -1013,6 +1017,7 @@ export class HushijiandanComponent implements OnInit {
1013 1017
   detailBx(data){
1014 1018
     this.router.navigateByUrl("nurse/detailBx/" + data.id);
1015 1019
   }
1020
+
1016 1021
   // 查看报修信息弹窗
1017 1022
   bxPromptModalShow = false; //弹窗开关
1018 1023
   bData = ""; //查看详情携带所有数据
@@ -3037,11 +3042,7 @@ export class HushijiandanComponent implements OnInit {
3037 3042
       }
3038 3043
     }
3039 3044
     // 获取患者其他服务,护士端是否预约建单
3040
-    let appointmentZyBuildFlag = this.checkTypeLis.filter(
3041
-      (item) =>
3042
-        item.id == this.patientForm.controls.checkedType.value &&
3043
-        item.associationType.value == "patientTransport"
3044
-    );
3045
+    let appointmentZyBuildFlag = this.checkTypeLis.filter((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "patientTransport");
3045 3046
     if (appointmentZyBuildFlag.length) {
3046 3047
       this.appointmentZyBuildFlag =
3047 3048
         appointmentZyBuildFlag[0].appointmentOtherSwitch == 1 ? "1" : "0";
@@ -3068,9 +3069,12 @@ export class HushijiandanComponent implements OnInit {
3068 3069
     // 判断这个任务类型是否允许加急 start
3069 3070
     // 判断这个任务类型是否允许加急 end
3070 3071
     let that = this;
3072
+    let isInpect = this.checkTypeLis.some((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "inspect");
3071 3073
     let postData = {
3072 3074
       taskTypeId: that.patientForm.controls.checkedType.value,
3073 3075
       patientCode: that.patientMsg.patientCode,
3076
+      startTime: isInpect ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
3077
+      endTime: isInpect ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
3074 3078
     };
3075 3079
     this.cLoading = true;
3076 3080
     that.mainService
@@ -4002,7 +4006,7 @@ export class HushijiandanComponent implements OnInit {
4002 4006
         that.adviceListLength = data.totalNum || 0;
4003 4007
       });
4004 4008
   }
4005
-	
4009
+
4006 4010
 	startDate:any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
4007 4011
 	endDate:any = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
4008 4012
 	scheduleTime: any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
@@ -4015,7 +4019,7 @@ export class HushijiandanComponent implements OnInit {
4015 4019
 			this.endDate = null
4016 4020
 		}
4017 4021
 	}
4018
-	
4022
+
4019 4023
   // 手术排程信息表格数据
4020 4024
   surgeryList: any = [];
4021 4025
   surgeryPageIndex: number = 1; //表格当前页码
@@ -4382,6 +4386,31 @@ export class HushijiandanComponent implements OnInit {
4382 4386
   hideDelAdviceModal() {
4383 4387
     this.delAdviceModal = false;
4384 4388
   }
4389
+  // 报修撤销模态框
4390
+  delBxModal: boolean = false;
4391
+  delBxData: any; //删除的data
4392
+  delBx(data) {
4393
+    this.delBxData = data;
4394
+    this.delBxModal = true;
4395
+  }
4396
+  confirmDelBx() {
4397
+    this.btnLoading = true;
4398
+    this.mainService
4399
+      .flowPost("incident/task/cancel", { incident: this.delBxData })
4400
+      .subscribe((result) => {
4401
+        if(result.state == 200){
4402
+          this.delBxModal = false;
4403
+          this.showPromptModal("撤销", true, "");
4404
+          this.getBxlb(true);
4405
+        }else{
4406
+          this.delBxModal = false;
4407
+          this.showPromptModal("撤销", false, result.msg);
4408
+        }
4409
+      });
4410
+  }
4411
+  hideDelBxModal() {
4412
+    this.delBxModal = false;
4413
+  }
4385 4414
   // 报修提示框
4386 4415
   reqModal: boolean = false;
4387 4416
   extraData:any = {};
@@ -5146,4 +5175,60 @@ export class HushijiandanComponent implements OnInit {
5146 5175
       this.noteList = result || [];
5147 5176
     });
5148 5177
   }
5178
+
5179
+  // 关联的检查-上一日,下一日,今天
5180
+  inspectToday:Date = new Date();
5181
+  // 上一日
5182
+  previousDayNew(){
5183
+    this.inspectToday = addDays(this.inspectToday, -1);
5184
+    this.inspectSubject.next();
5185
+  }
5186
+
5187
+  // 今天
5188
+  todayNew(){
5189
+    this.inspectToday = new Date();
5190
+    this.inspectSubject.next();
5191
+  }
5192
+
5193
+  // 下一日
5194
+  nextDayNew(){
5195
+    this.inspectToday = addDays(this.inspectToday, 1);
5196
+    this.inspectSubject.next();
5197
+  }
5198
+
5199
+  refreshInspectList(){
5200
+    let postData = {
5201
+      taskTypeId: this.patientForm.controls.checkedType.value,
5202
+      patientCode: this.patientMsg.patientCode,
5203
+      startTime: format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
5204
+      endTime: format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
5205
+    };
5206
+    this.linkCheckLis = [];
5207
+    this.mainService
5208
+      .postCustom("nurse", "workOrder/buildTrip", postData)
5209
+      .subscribe((data) => {
5210
+        // 工单备注配置 end
5211
+        if (data.status == 200 && data.data && data.data.length) {
5212
+          let arr = [];
5213
+          data.data.forEach((e) => {
5214
+            arr.push({
5215
+              execDeptId: e.execDept.id,
5216
+              yyTime: e.yyTime,
5217
+              priority: e.priority,
5218
+              label:
5219
+                (e.yyTime || "") +
5220
+                " " +
5221
+                (this.deptDisplay == 2
5222
+                  ? e.execDept.deptalias
5223
+                  : e.execDept.dept) +
5224
+                " 进行 " +
5225
+                (e.inspectName || "检查"),
5226
+              value: e["id"],
5227
+              checked: false,
5228
+            });
5229
+          });
5230
+          this.linkCheckLis = arr;
5231
+        }
5232
+      });
5233
+  }
5149 5234
 }