seimin 1 рік тому
батько
коміт
ded8da5115

+ 1 - 1
proxy.conf.json

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

+ 21 - 0
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1372,6 +1372,23 @@
1372 1372
                                         </form>
1373 1373
                                       </div>
1374 1374
                                     </div>
1375
+                                    <!-- 工号 -->
1376
+                                    <div
1377
+                                      style="width: 100%; margin: 10px auto 0"
1378
+                                      *ngIf="buildMsg.reserveUserSwitch == 1"
1379
+                                    >
1380
+                                      <p>工号:</p>
1381
+                                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择" [(ngModel)]="account">
1382
+                                        <ng-container *ngFor="let option of accountList">
1383
+                                          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id">
1384
+                                          </nz-option>
1385
+                                        </ng-container>
1386
+                                        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1387
+                                          <i nz-icon nzType="loading" class="loading-icon"></i>
1388
+                                          搜索中...
1389
+                                        </nz-option>
1390
+                                      </nz-select>
1391
+                                    </div>
1375 1392
                                     <!-- 工单备注: -->
1376 1393
                                     <div
1377 1394
                                       style="width: 100%; margin: 10px auto 0"
@@ -3830,3 +3847,7 @@
3830 3847
 <!-- 手术中患者-送回苏醒区 -->
3831 3848
 <app-dialog-delete [delModal]="sendAwakeningRoomModal" (hideDelModalEvent)="hideSendAwakeningRoomModal()" [btnLoading]="sLoading2"
3832 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
+
3851
+<!-- 是否限制业务发起时间模态框 -->
3852
+<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="btnLoading"
3853
+(confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单"></app-dialog-delete>

+ 336 - 200
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -98,6 +98,7 @@ export class HushijiandanComponent implements OnInit {
98 98
   osComponentRef10: OverlayScrollbarsComponent;
99 99
   othersListOptions: any;
100 100
   sortableTimer = null;
101
+  searchAccountSubject = new Subject(); //查工号防抖
101 102
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
102 103
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
103 104
   incidentSearchChangeSubject = new Subject(); //故障现象搜索防抖
@@ -164,6 +165,10 @@ export class HushijiandanComponent implements OnInit {
164 165
     this.currentDept.typeValue == 'surgery' && this.getSurgeryConfig();
165 166
     this.getSpecimenButton();
166 167
     //防抖
168
+    this.getAccountList();
169
+    this.searchAccountSubject.pipe(debounceTime(500)).subscribe((v:any) => {
170
+      this.getAccountList(v);
171
+    });
167 172
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
168 173
       this.getPatient(v);
169 174
     });
@@ -1224,6 +1229,35 @@ export class HushijiandanComponent implements OnInit {
1224 1229
         }
1225 1230
       });
1226 1231
   }
1232
+  // 工号输入搜索
1233
+  searchAccount(e) {
1234
+    this.searchAccountSubject.next(e);
1235
+  }
1236
+
1237
+  // 根据工号获取用户
1238
+  account = null;
1239
+  accountList = [];
1240
+  isLoading:boolean = false;
1241
+  getAccountList(key = ''): void {
1242
+    let postData = {
1243
+      idx: 0,
1244
+      sum: 10,
1245
+      user: {
1246
+        account: key,
1247
+        hospital: {
1248
+          id: this.currentHospital.id
1249
+        }
1250
+      }
1251
+    };
1252
+    this.isLoading = true;
1253
+    this.mainService
1254
+      .getFetchDataList("data", "user", postData)
1255
+      .subscribe((data) => {
1256
+        this.isLoading = false;
1257
+        this.accountList = data.list || [];
1258
+      });
1259
+  }
1260
+
1227 1261
   // 目标科室输入搜索
1228 1262
   searchDept(type, msg, e) {
1229 1263
     this.getDeptList(type, msg, e);
@@ -1443,13 +1477,18 @@ export class HushijiandanComponent implements OnInit {
1443 1477
     }
1444 1478
     this.btnLoading3 = true;
1445 1479
     this.confirmPostData.workOrder.isAccompany = 0; //是否需要医护陪同检查
1446
-    this.mainService
1480
+    this.newOrderTimeFun(this.confirmPostData.workOrder.taskType.id, () => {
1481
+      this.btnLoading3 = false;
1482
+      this.cancel();
1483
+    }, () => {
1484
+      this.mainService
1447 1485
       .postCustom(
1448 1486
         "api",
1449 1487
         this.confirmYuyue ? "appointmentOrder" : "startOrder",
1450 1488
         this.confirmPostData
1451 1489
       )
1452 1490
       .subscribe((data) => {
1491
+        this.message.remove(this.jdFlagId);
1453 1492
         this.btnLoading3 = false;
1454 1493
         this.cancel();
1455 1494
         if (data.status == 200) {
@@ -1483,6 +1522,7 @@ export class HushijiandanComponent implements OnInit {
1483 1522
           this.showPromptModal("创建", false, data.msg);
1484 1523
         }
1485 1524
       });
1525
+    })
1486 1526
   }
1487 1527
   cancel() {
1488 1528
     this.confirmSub = false;
@@ -1568,6 +1608,7 @@ export class HushijiandanComponent implements OnInit {
1568 1608
       return { required: true };
1569 1609
     }
1570 1610
   };
1611
+
1571 1612
   pickUpModal: boolean = false; //模态框
1572 1613
   pickUpInfo:string = '';
1573 1614
   pickUpItem: any = {};
@@ -1981,37 +2022,42 @@ export class HushijiandanComponent implements OnInit {
1981 2022
         }
1982 2023
       }
1983 2024
       postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
1984
-      this.mainService
1985
-      .postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
1986
-      .subscribe((data) => {
2025
+      this.newOrderTimeFun(postData.workOrder.taskType.id, () => {
1987 2026
         this.hidePatientOrder();
1988
-        if (data.status == 200) {
1989
-          if(this.currentDept.typeValue == 'recovery'){
1990
-            this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: postData.workOrder.patient.patientCode}).subscribe((resultData) => {
1991
-              this.showPromptModal("创建", true, "");
1992
-              this.goodsLis = [];
1993
-              this.getOrderList();
1994
-              this.getDeptTaskType();
1995
-              this.getTodayNum();
1996
-            });
1997
-          }else{
1998
-            this.showPromptModal("创建", true, "");
1999
-            this.goodsLis = [];
2000
-            this.getOrderList();
2001
-            this.getDeptTaskType();
2002
-            this.getTodayNum();
2003
-          }
2004
-        } else if (data.status == 100042) {
2005
-          this.showPromptModal("创建", false, data.msg);
2006
-          this.getPatient(this.tabSearchCont);
2007
-        } else if (data.status == 1000033) {
2008
-          //重复建单那策略
2009
-          this.repeatMsg = data.msg;
2010
-          this.showDelModal(postData, "transport", yuyue);
2011
-        } else {
2012
-          this.showPromptModal("创建", false, data.msg);
2013
-        }
2014
-      });
2027
+      }, () => {
2028
+        this.mainService
2029
+          .postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
2030
+          .subscribe((data) => {
2031
+            this.message.remove(this.jdFlagId);
2032
+            this.hidePatientOrder();
2033
+            if (data.status == 200) {
2034
+              if(this.currentDept.typeValue == 'recovery'){
2035
+                this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: postData.workOrder.patient.patientCode}).subscribe((resultData) => {
2036
+                  this.showPromptModal("创建", true, "");
2037
+                  this.goodsLis = [];
2038
+                  this.getOrderList();
2039
+                  this.getDeptTaskType();
2040
+                  this.getTodayNum();
2041
+                });
2042
+              }else{
2043
+                this.showPromptModal("创建", true, "");
2044
+                this.goodsLis = [];
2045
+                this.getOrderList();
2046
+                this.getDeptTaskType();
2047
+                this.getTodayNum();
2048
+              }
2049
+            } else if (data.status == 100042) {
2050
+              this.showPromptModal("创建", false, data.msg);
2051
+              this.getPatient(this.tabSearchCont);
2052
+            } else if (data.status == 1000033) {
2053
+              //重复建单那策略
2054
+              this.repeatMsg = data.msg;
2055
+              this.showDelModal(postData, "transport", yuyue);
2056
+            } else {
2057
+              this.showPromptModal("创建", false, data.msg);
2058
+            }
2059
+          });
2060
+      })
2015 2061
     }
2016 2062
   }
2017 2063
   // 是否需要护士医生陪同模态框
@@ -2032,91 +2078,106 @@ export class HushijiandanComponent implements OnInit {
2032 2078
     this.accompanyLoading = true;
2033 2079
     if (this.accompanyType == "patient") {
2034 2080
       //患者列表直接建单
2035
-      this.mainService
2036
-      .postCustom(
2037
-        "api",
2038
-        this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2039
-        this.accompanyPostData
2040
-      )
2041
-      .subscribe((data) => {
2081
+      this.newOrderTimeFun(this.accompanyPostData.workOrder.taskType.id, () => {
2042 2082
         this.hidePatientOrder();
2043 2083
         this.accompanyModal = false;
2044 2084
         this.accompanyLoading = false;
2045
-        if (data.status == 200) {
2046
-          if(this.currentDept.typeValue == 'recovery'){
2047
-            this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2085
+      }, () => {
2086
+        this.mainService
2087
+        .postCustom(
2088
+          "api",
2089
+          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2090
+          this.accompanyPostData
2091
+        )
2092
+        .subscribe((data) => {
2093
+          this.message.remove(this.jdFlagId);
2094
+          this.hidePatientOrder();
2095
+          this.accompanyModal = false;
2096
+          this.accompanyLoading = false;
2097
+          if (data.status == 200) {
2098
+            if(this.currentDept.typeValue == 'recovery'){
2099
+              this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2100
+                this.showPromptModal("创建", true, "");
2101
+                this.goodsLis = [];
2102
+                this.getOrderList();
2103
+                this.getDeptTaskType();
2104
+                this.getTodayNum();
2105
+              });
2106
+            }else{
2048 2107
               this.showPromptModal("创建", true, "");
2049 2108
               this.goodsLis = [];
2050 2109
               this.getOrderList();
2051 2110
               this.getDeptTaskType();
2052 2111
               this.getTodayNum();
2053
-            });
2054
-          }else{
2055
-            this.showPromptModal("创建", true, "");
2056
-            this.goodsLis = [];
2057
-            this.getOrderList();
2058
-            this.getDeptTaskType();
2059
-            this.getTodayNum();
2112
+            }
2113
+          } else if (data.status == 100042) {
2114
+            this.showPromptModal("创建", false, data.msg);
2115
+            this.getPatient(this.tabSearchCont);
2116
+          } else if (data.status == 1000033) {
2117
+            //重复建单那策略
2118
+            this.repeatMsg = data.msg;
2119
+            this.showDelModal(
2120
+              this.accompanyPostData,
2121
+              "accompany1",
2122
+              this.accompanyYuyue
2123
+            );
2124
+          } else {
2125
+            this.showPromptModal("创建", false, data.msg);
2060 2126
           }
2061
-        } else if (data.status == 100042) {
2062
-          this.showPromptModal("创建", false, data.msg);
2063
-          this.getPatient(this.tabSearchCont);
2064
-        } else if (data.status == 1000033) {
2065
-          //重复建单那策略
2066
-          this.repeatMsg = data.msg;
2067
-          this.showDelModal(
2068
-            this.accompanyPostData,
2069
-            "accompany1",
2070
-            this.accompanyYuyue
2071
-          );
2072
-        } else {
2073
-          this.showPromptModal("创建", false, data.msg);
2074
-        }
2075
-      });
2127
+        });
2128
+      })
2076 2129
     } else if (this.accompanyType == "patient-yy") {
2077 2130
       //患者列表预约建单
2078
-      this.mainService
2079
-      .postCustom(
2080
-        "api",
2081
-        this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2082
-        this.accompanyPostData
2083
-      )
2084
-      .subscribe((data) => {
2131
+      this.newOrderTimeFun(this.accompanyPostData.workOrder.taskType.id, () => {
2085 2132
         this.btnLoading3 = false;
2086 2133
         this.accompanyModal = false;
2087 2134
         this.accompanyLoading = false;
2088 2135
         this.cancel();
2089
-        if (data.status == 200) {
2090
-          if(this.currentDept.typeValue == 'recovery'){
2091
-            this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2136
+      }, () => {
2137
+        this.mainService
2138
+        .postCustom(
2139
+          "api",
2140
+          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2141
+          this.accompanyPostData
2142
+        )
2143
+        .subscribe((data) => {
2144
+          this.message.remove(this.jdFlagId);
2145
+          this.btnLoading3 = false;
2146
+          this.accompanyModal = false;
2147
+          this.accompanyLoading = false;
2148
+          this.cancel();
2149
+          if (data.status == 200) {
2150
+            if(this.currentDept.typeValue == 'recovery'){
2151
+              this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2152
+                this.showPromptModal("创建", true, "");
2153
+                this.goodsLis = [];
2154
+                this.getOrderList();
2155
+                this.getDeptTaskType();
2156
+                this.getTodayNum();
2157
+              });
2158
+            }else{
2092 2159
               this.showPromptModal("创建", true, "");
2093 2160
               this.goodsLis = [];
2094 2161
               this.getOrderList();
2095 2162
               this.getDeptTaskType();
2096 2163
               this.getTodayNum();
2097
-            });
2098
-          }else{
2099
-            this.showPromptModal("创建", true, "");
2100
-            this.goodsLis = [];
2101
-            this.getOrderList();
2102
-            this.getDeptTaskType();
2103
-            this.getTodayNum();
2164
+            }
2165
+          } else if (data.status == 100042) {
2166
+            this.showPromptModal("创建", false, data.msg);
2167
+            this.getPatient(this.tabSearchCont);
2168
+          } else if (data.status == 1000033) {
2169
+            //重复建单那策略
2170
+            this.repeatMsg = data.msg;
2171
+            this.showDelModal(
2172
+              this.accompanyPostData,
2173
+              "accompany2",
2174
+              this.accompanyYuyue
2175
+            );
2176
+          } else {
2177
+            this.showPromptModal("创建", false, data.msg);
2104 2178
           }
2105
-        } else if (data.status == 100042) {
2106
-          this.showPromptModal("创建", false, data.msg);
2107
-          this.getPatient(this.tabSearchCont);
2108
-        } else if (data.status == 1000033) {
2109
-          //重复建单那策略
2110
-          this.repeatMsg = data.msg;
2111
-          this.showDelModal(
2112
-            this.accompanyPostData,
2113
-            "accompany2",
2114
-            this.accompanyYuyue
2115
-          );
2116
-        } else {
2117
-          this.showPromptModal("创建", false, data.msg);
2118
-        }
2119
-      });
2179
+        });
2180
+      })
2120 2181
     }
2121 2182
   }
2122 2183
 
@@ -2131,94 +2192,109 @@ export class HushijiandanComponent implements OnInit {
2131 2192
     this.cancenlLoading = true;
2132 2193
     if (this.accompanyType == "patient") {
2133 2194
       //患者列表直接建单
2134
-      this.mainService
2135
-      .postCustom(
2136
-        "api",
2137
-        this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2138
-        this.accompanyPostData
2139
-      )
2140
-      .subscribe((data) => {
2195
+      this.newOrderTimeFun(this.accompanyPostData.workOrder.taskType.id, () => {
2141 2196
         this.hidePatientOrder();
2142 2197
         this.accompanyModal = false;
2143 2198
         this.cancenlLoading = false;
2144
-        if (data.status == 200) {
2145
-          if(this.currentDept.typeValue == 'recovery'){
2146
-            this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2147
-              this.showPromptModal("创建", true, "");
2148
-              this.goodsLis = [];
2149
-              this.getOrderList();
2150
-              this.getDeptTaskType();
2151
-              this.getTodayNum();
2152
-            });
2153
-          }else{
2154
-            this.showPromptModal("创建", true, "");
2155
-            this.goodsLis = [];
2156
-            this.getOrderList();
2157
-            this.getDeptTaskType();
2158
-            this.getTodayNum();
2159
-          }
2160
-        } else if (data.status == 100042) {
2161
-          this.showPromptModal("创建", false, data.msg);
2162
-          this.getPatient(this.tabSearchCont);
2163
-        } else if (data.status == 1000033) {
2164
-          //重复建单那策略
2165
-          this.repeatMsg = data.msg;
2166
-          this.showDelModal(
2167
-            this.accompanyPostData,
2168
-            "accompany3",
2169
-            this.accompanyYuyue
2170
-          );
2171
-        } else {
2172
-          this.showPromptModal("创建", false, data.msg);
2173
-        }
2174
-      });
2199
+      }, () => {
2200
+        this.mainService
2201
+          .postCustom(
2202
+            "api",
2203
+            this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2204
+            this.accompanyPostData
2205
+          )
2206
+          .subscribe((data) => {
2207
+            this.message.remove(this.jdFlagId);
2208
+            this.hidePatientOrder();
2209
+            this.accompanyModal = false;
2210
+            this.cancenlLoading = false;
2211
+            if (data.status == 200) {
2212
+              if(this.currentDept.typeValue == 'recovery'){
2213
+                this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2214
+                  this.showPromptModal("创建", true, "");
2215
+                  this.goodsLis = [];
2216
+                  this.getOrderList();
2217
+                  this.getDeptTaskType();
2218
+                  this.getTodayNum();
2219
+                });
2220
+              }else{
2221
+                this.showPromptModal("创建", true, "");
2222
+                this.goodsLis = [];
2223
+                this.getOrderList();
2224
+                this.getDeptTaskType();
2225
+                this.getTodayNum();
2226
+              }
2227
+            } else if (data.status == 100042) {
2228
+              this.showPromptModal("创建", false, data.msg);
2229
+              this.getPatient(this.tabSearchCont);
2230
+            } else if (data.status == 1000033) {
2231
+              //重复建单那策略
2232
+              this.repeatMsg = data.msg;
2233
+              this.showDelModal(
2234
+                this.accompanyPostData,
2235
+                "accompany3",
2236
+                this.accompanyYuyue
2237
+              );
2238
+            } else {
2239
+              this.showPromptModal("创建", false, data.msg);
2240
+            }
2241
+          });
2242
+      })
2175 2243
     } else if (this.accompanyType == "patient-yy") {
2176 2244
       //患者列表预约建单
2177
-      this.mainService
2178
-      .postCustom(
2179
-        "api",
2180
-        this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2181
-        this.accompanyPostData
2182
-      )
2183
-      .subscribe((data) => {
2245
+      this.newOrderTimeFun(this.accompanyPostData.workOrder.taskType.id, () => {
2184 2246
         this.btnLoading3 = false;
2185 2247
         this.accompanyModal = false;
2186 2248
         this.cancenlLoading = false;
2187 2249
         this.cancel();
2188
-        if (data.status == 200) {
2189
-          if(this.currentDept.typeValue == 'recovery'){
2190
-            this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2191
-              this.showPromptModal("创建", true, "");
2192
-              this.goodsLis = [];
2193
-              this.getOrderList();
2194
-              this.getDeptTaskType();
2195
-              this.getTodayNum();
2196
-            });
2197
-          }else{
2198
-            this.showPromptModal("创建", true, "");
2199
-            this.goodsLis = [];
2200
-            this.getOrderList();
2201
-            this.getDeptTaskType();
2202
-            this.getTodayNum();
2203
-          }
2204
-        } else if (data.status == 100042) {
2205
-          this.showPromptModal("创建", false, data.msg);
2206
-          this.getPatient(this.tabSearchCont);
2207
-        } else if (data.status == 1000033) {
2208
-          //重复建单那策略
2209
-          this.repeatMsg = data.msg;
2210
-          this.showDelModal(
2211
-            this.accompanyPostData,
2212
-            "accompany4",
2213
-            this.accompanyYuyue
2214
-          );
2215
-        } else {
2216
-          this.showPromptModal("创建", false, data.msg);
2217
-        }
2218
-      });
2250
+      }, () => {
2251
+        this.mainService
2252
+          .postCustom(
2253
+            "api",
2254
+            this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2255
+            this.accompanyPostData
2256
+          )
2257
+          .subscribe((data) => {
2258
+            this.message.remove(this.jdFlagId);
2259
+            this.btnLoading3 = false;
2260
+            this.accompanyModal = false;
2261
+            this.cancenlLoading = false;
2262
+            this.cancel();
2263
+            if (data.status == 200) {
2264
+              if(this.currentDept.typeValue == 'recovery'){
2265
+                this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
2266
+                  this.showPromptModal("创建", true, "");
2267
+                  this.goodsLis = [];
2268
+                  this.getOrderList();
2269
+                  this.getDeptTaskType();
2270
+                  this.getTodayNum();
2271
+                });
2272
+              }else{
2273
+                this.showPromptModal("创建", true, "");
2274
+                this.goodsLis = [];
2275
+                this.getOrderList();
2276
+                this.getDeptTaskType();
2277
+                this.getTodayNum();
2278
+              }
2279
+            } else if (data.status == 100042) {
2280
+              this.showPromptModal("创建", false, data.msg);
2281
+              this.getPatient(this.tabSearchCont);
2282
+            } else if (data.status == 1000033) {
2283
+              //重复建单那策略
2284
+              this.repeatMsg = data.msg;
2285
+              this.showDelModal(
2286
+                this.accompanyPostData,
2287
+                "accompany4",
2288
+                this.accompanyYuyue
2289
+              );
2290
+            } else {
2291
+              this.showPromptModal("创建", false, data.msg);
2292
+            }
2293
+          });
2294
+      })
2219 2295
     }
2220 2296
   }
2221
-  
2297
+
2222 2298
   // 切换患者送检检查项目
2223 2299
   checkedShowMsg: any = {}; //患者送检检查项目对应展示信息
2224 2300
   current_allowUrgent = false; //当前任务类型是否允许加急
@@ -2615,11 +2691,15 @@ export class HushijiandanComponent implements OnInit {
2615 2691
     let postData;
2616 2692
     that.buildType = "other";
2617 2693
     if (that.buildType == "other") {
2694
+      let userAccount = null;
2695
+      if(this.account){
2696
+        userAccount = this.accountList.find(v => v.id == this.account);
2697
+      }
2618 2698
       // 其他
2619 2699
       postData = {
2620 2700
         workOrder: {
2621 2701
           sourceId: SourceId.hushi,
2622
-          workOrderRemark: this.workOrderRemark,
2702
+          workOrderRemark: userAccount ? `${userAccount.account}-${userAccount.name}:${this.workOrderRemark}` : this.workOrderRemark,
2623 2703
           taskType: { id: that.shortcutMsg.id },
2624 2704
           createDept: that.loginUserDeptId,
2625 2705
           startDept: { id: that.buildMsg.startDept },
@@ -2643,9 +2723,13 @@ export class HushijiandanComponent implements OnInit {
2643 2723
       }
2644 2724
     }
2645 2725
     console.log(postData);
2646
-    that.mainService
2647
-      .postCustom("api", "startOrder", postData)
2726
+    this.newOrderTimeFun(postData.workOrder.taskType.id, () => {
2727
+      that.loading5 = false;
2728
+    }, () => {
2729
+      that.mainService
2730
+      .postCustom("api", this.shortcutMsg.reserveSwitch == 1 && this.currentDept.typeValue != 'recovery' && this.currentDept.typeValue != 'surgery' ? "reserveOrder" :"startOrder", postData)
2648 2731
       .subscribe((data) => {
2732
+        this.message.remove(this.jdFlagId);
2649 2733
         that.loading5 = false;
2650 2734
         if (data.status == 200 && that.buildType == "other") {
2651 2735
           that.showPromptModal("创建", true, "", "other");
@@ -2664,6 +2748,7 @@ export class HushijiandanComponent implements OnInit {
2664 2748
           that.showPromptModal("创建", false, data.msg);
2665 2749
         }
2666 2750
       });
2751
+    })
2667 2752
   }
2668 2753
   // ======================start===============================
2669 2754
   // 快捷一键发起建单
@@ -2750,6 +2835,46 @@ export class HushijiandanComponent implements OnInit {
2750 2835
       return { required: true };
2751 2836
     }
2752 2837
   };
2838
+  // 建单判断时间-护士端建单通用方法
2839
+  newOrderTimeFun(taskTypeId, fun1, fun2){
2840
+    if(this.currentDept.typeValue != 'recovery' && this.currentDept.typeValue != 'surgery'){
2841
+      let maskFlag = this.message.loading("正在加载中..", {
2842
+        nzDuration: 0,
2843
+      }).messageId;
2844
+      this.mainService
2845
+      .postCustom("api", "compareReserveDate", {taskTypeId})
2846
+      .subscribe((data) => {
2847
+        this.message.remove(maskFlag);
2848
+        if(!data.data){
2849
+          fun2.call(this);
2850
+        }else{
2851
+          fun1.call(this);
2852
+          this.limitTimeModal = true;
2853
+          this.limitTimeItem = {taskTypeId, fun1, fun2};
2854
+          this.limitTimeInfo = data.data;
2855
+        }
2856
+      })
2857
+    }else{
2858
+      fun2.call(this);
2859
+    }
2860
+  }
2861
+  limitTimeModal: boolean = false; //模态框
2862
+  limitTimeInfo:string = '';
2863
+  limitTimeItem: any = {};
2864
+  hideLimitTimeModal() {
2865
+    this.limitTimeModal = false;
2866
+  }
2867
+  // 确认
2868
+  jdFlagId;
2869
+  confirmLimitTime() {
2870
+    console.log(this.limitTimeItem);
2871
+    this.btnLoading = true;
2872
+    this.limitTimeModal = false;
2873
+    this.jdFlagId = this.message.loading("正在加载中..", {
2874
+      nzDuration: 0,
2875
+    }).messageId;
2876
+    this.limitTimeItem.fun2.call(this);
2877
+  }
2753 2878
   // 一键发起建单保存
2754 2879
   confirmShortcut1() {
2755 2880
     var that = this;
@@ -2775,30 +2900,35 @@ export class HushijiandanComponent implements OnInit {
2775 2900
       };
2776 2901
     }
2777 2902
     console.log(postData);
2778
-    that.mainService
2779
-      .postCustom("api", "startOrder", postData)
2780
-      .subscribe((data) => {
2781
-        this.hideShortcutOrder();
2782
-        console.log(that.buildType, data.status);
2783
-        if (data.status == 200 && that.buildType == "other") {
2784
-          that.showPromptModal("创建", true, "", "other");
2785
-          this.getTodayNum();
2786
-        } else if (data.status == 200 && that.buildType == "bb") {
2787
-          that.showPromptModal("创建", true, "", "bb");
2788
-          this.getTodayNum();
2789
-        } else if (that.buildType == "bb" && data.status == 100043) {
2790
-          that.showPromptModal("创建", true, data.msg);
2791
-          this.getOrderList();
2792
-          this.getSpecimenWorkOrderMsg();
2793
-          this.getTodayNum();
2794
-        } else if (data.status == 1000033) {
2795
-          //重复建单那策略
2796
-          this.repeatMsg = data.msg;
2797
-          this.showDelModal(postData, "specimen");
2798
-        } else {
2799
-          that.showPromptModal("创建", false, data.msg);
2800
-        }
2801
-      });
2903
+    this.newOrderTimeFun(postData.workOrder.taskType.id, () => {
2904
+      this.hideShortcutOrder();
2905
+    }, () => {
2906
+      that.mainService
2907
+        .postCustom("api", "startOrder", postData)
2908
+        .subscribe((data) => {
2909
+          this.message.remove(this.jdFlagId);
2910
+          this.hideShortcutOrder();
2911
+          console.log(that.buildType, data.status);
2912
+          if (data.status == 200 && that.buildType == "other") {
2913
+            that.showPromptModal("创建", true, "", "other");
2914
+            this.getTodayNum();
2915
+          } else if (data.status == 200 && that.buildType == "bb") {
2916
+            that.showPromptModal("创建", true, "", "bb");
2917
+            this.getTodayNum();
2918
+          } else if (that.buildType == "bb" && data.status == 100043) {
2919
+            that.showPromptModal("创建", true, data.msg);
2920
+            this.getOrderList();
2921
+            this.getSpecimenWorkOrderMsg();
2922
+            this.getTodayNum();
2923
+          } else if (data.status == 1000033) {
2924
+            //重复建单那策略
2925
+            this.repeatMsg = data.msg;
2926
+            this.showDelModal(postData, "specimen");
2927
+          } else {
2928
+            that.showPromptModal("创建", false, data.msg);
2929
+          }
2930
+        });
2931
+    });
2802 2932
   }
2803 2933
   repeatModal: boolean = false; //删除模态框
2804 2934
   repeatMsg = "";
@@ -2819,13 +2949,18 @@ export class HushijiandanComponent implements OnInit {
2819 2949
   confirmRepeat() {
2820 2950
     this.loadingRepeat = true;
2821 2951
     this.repeatPostData.tipsCreateOder = 1;
2822
-    this.mainService
2952
+    this.newOrderTimeFun(this.repeatPostData.workOrder.taskType.id, () => {
2953
+      this.loadingRepeat = false;
2954
+      this.repeatModal = false;
2955
+    }, () => {
2956
+      this.mainService
2823 2957
       .postCustom(
2824 2958
         "api",
2825 2959
         this.isYuyue ? "appointmentOrder" : "startOrder",
2826 2960
         this.repeatPostData
2827 2961
       )
2828 2962
       .subscribe((data) => {
2963
+        this.message.remove(this.jdFlagId);
2829 2964
         this.loadingRepeat = false;
2830 2965
         this.repeatModal = false;
2831 2966
         if(this.currentDept.typeValue == 'recovery'){
@@ -2836,6 +2971,7 @@ export class HushijiandanComponent implements OnInit {
2836 2971
           this.confirmRepeatFun(data);
2837 2972
         }
2838 2973
       });
2974
+    })
2839 2975
   }
2840 2976
   confirmRepeatFun(data){
2841 2977
     if (this.sourceType === "specimen") {

+ 8 - 7
src/app/views/task-type-management/task-type-management.component.html

@@ -129,6 +129,13 @@
129 129
             <label nz-radio nzValue='0'>否</label>
130 130
           </nz-radio-group>
131 131
         </div>
132
+        <div class="mb8 w100" *ngIf="association.value == 'other'">
133
+          <nz-form-label class="label" nzRequired>是否需要填写工号</nz-form-label>
134
+          <nz-radio-group class="handlerType" [(ngModel)]="reserveUserSwitch" (ngModelChange)="isReserveUserSwitchChange()">
135
+            <label nz-radio nzValue='1'>是</label>
136
+            <label nz-radio nzValue='0'>否</label>
137
+          </nz-radio-group>
138
+        </div>
132 139
         <div class="mb8 w100" *ngIf="association.value == 'patientTransport' || association.value == 'inspect' || association.value == 'specimen' || association.value == 'other'">
133 140
           <nz-form-label class="label" nzRequired>是否需要备注信息</nz-form-label>
134 141
           <nz-radio-group class="handlerType" [(ngModel)]="isRemarks" (ngModelChange)="isRemarksChange()">
@@ -232,6 +239,7 @@
232 239
             <label nz-radio nzValue='0'>否</label>
233 240
           </nz-radio-group>
234 241
         </div>
242
+        
235 243
         <div class="mb8 w100" *ngIf="association.value == 'other'">
236 244
           <nz-form-label class="label" nzRequired>是否预定工单</nz-form-label>
237 245
           <nz-radio-group class="handlerType" [(ngModel)]="reserveSwitch">
@@ -239,13 +247,6 @@
239 247
             <label nz-radio nzValue='0'>否</label>
240 248
           </nz-radio-group>
241 249
         </div>
242
-        <div class="mb8 w100" *ngIf="association.value == 'other'">
243
-          <nz-form-label class="label" nzRequired>是否需要填写工号</nz-form-label>
244
-          <nz-radio-group class="handlerType" [(ngModel)]="reserveUserSwitch">
245
-            <label nz-radio nzValue='1'>是</label>
246
-            <label nz-radio nzValue='0'>否</label>
247
-          </nz-radio-group>
248
-        </div>
249 250
         <div class="mb8 w100">
250 251
           <nz-form-label class="label" nzRequired>是否限制业务发起时间</nz-form-label>
251 252
           <nz-radio-group class="handlerType" [(ngModel)]="reserveType" (ngModelChange)="changeReserveType($event)">

+ 9 - 2
src/app/views/task-type-management/task-type-management.component.ts

@@ -901,7 +901,7 @@ export class TaskTypeManagementComponent implements OnInit {
901 901
       !data.reserveType
902 902
         ? '1'
903 903
         : data.reserveType.value + ""; //是否限制业务发起时间
904
-    this.reserveDate =  data.reserveDate === undefined ? null : data.reserveDate; //是否限制业务发起时间-时间
904
+    this.reserveDate =  data.reserveDate === undefined ? null : new Date(data.reserveDate); //是否限制业务发起时间-时间
905 905
     this.reserveMsg =  data.reserveMsg === undefined ? '' : data.reserveMsg; //是否限制业务发起时间-提示
906 906
     // this.wechatFocusSwitch =
907 907
     //   data.wechatFocusSwitch === undefined ? "0" : data.wechatFocusSwitch + ""; //支助中心端是否能标记重点关注
@@ -1245,7 +1245,7 @@ export class TaskTypeManagementComponent implements OnInit {
1245 1245
     this.taskData.taskType.reserveSwitch = this.reserveSwitch === "1" ? 1 : 0; //是否预定工单
1246 1246
     this.taskData.taskType.reserveUserSwitch = this.reserveUserSwitch === "1" ? 1 : 0; //是否需要填写工号
1247 1247
     this.taskData.taskType.reserveType = this.reserveTypes.find(v => v.value == this.reserveType); //是否限制业务发起时间-字典
1248
-    
1248
+
1249 1249
     // 根据时间限制
1250 1250
     if(this.reserveType == '3'){
1251 1251
       this.taskData.taskType.reserveDate = this.reserveDate ? format(startOfSecond(this.reserveDate), 'yyyy-MM-dd HH:mm:ss') : undefined; //是否限制业务发起时间-时间
@@ -2561,6 +2561,13 @@ export class TaskTypeManagementComponent implements OnInit {
2561 2561
     }
2562 2562
   }
2563 2563
 
2564
+   //修改是否需要填写工号
2565
+   isReserveUserSwitchChange(){
2566
+    if(this.reserveUserSwitch == '1'){
2567
+      this.isRemarks = '1';
2568
+    }
2569
+  }
2570
+
2564 2571
   // 修改是否支持多院区签到
2565 2572
   changeActionsSwitch(e){
2566 2573
     if(!e){