Browse Source

各个关联类型中增加限制重复建单开关

seimin 3 years ago
parent
commit
d3dc005c8b

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

@@ -1318,3 +1318,7 @@
1318 1318
   (cancelDelEvent)="hideAccompanyModal($event)" [btnLoading]="accompanyLoading" [cancenlLoading]="cancenlLoading"
1319 1319
   (confirmDelEvent)="confirmAccompany()" confirmTxt="是" cancelTxt="否" content="您选择的患者是危重或特级护理或一级护理患者,请问是否需要医护陪同检查?">
1320 1320
 </app-dialog-delete>
1321
+<!-- 重复建单策略 -->
1322
+<app-dialog-delete [delModal]="repeatModal" (hideDelModalEvent)="hideRepeatModal()" [btnLoading]="loadingRepeat"
1323
+  (confirmDelEvent)="confirmRepeat()" [content]="repeatMsg" confirmTxt="是" cancelTxt="否"
1324
+  (cancelDelEvent)="hideRepeatModal()"></app-dialog-delete>

+ 155 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1284,6 +1284,10 @@ export class HushijiandanComponent implements OnInit {
1284 1284
             that.getDeptTaskType();
1285 1285
           } else if (data.status == 100042) {
1286 1286
             that.showPromptModal("创建", true, data.msg);
1287
+          } else if (data.status == 1000033) {
1288
+            //重复建单那策略
1289
+            this.repeatMsg = data.msg;
1290
+            this.showDelModal(postData, "transport", yuyue);
1287 1291
           } else {
1288 1292
             that.showPromptModal("创建", false, data.msg);
1289 1293
           }
@@ -1325,6 +1329,14 @@ export class HushijiandanComponent implements OnInit {
1325 1329
             this.getDeptTaskType();
1326 1330
           } else if (data.status == 100042) {
1327 1331
             this.showPromptModal("创建", true, data.msg);
1332
+          } else if (data.status == 1000033) {
1333
+            //重复建单那策略
1334
+            this.repeatMsg = data.msg;
1335
+            this.showDelModal(
1336
+              this.accompanyPostData,
1337
+              "accompany1",
1338
+              this.accompanyYuyue
1339
+            );
1328 1340
           } else {
1329 1341
             this.showPromptModal("创建", false, data.msg);
1330 1342
           }
@@ -1347,6 +1359,14 @@ export class HushijiandanComponent implements OnInit {
1347 1359
             this.goodsLis = [];
1348 1360
             this.getOrderList();
1349 1361
             this.getDeptTaskType();
1362
+          } else if (data.status == 1000033) {
1363
+            //重复建单那策略
1364
+            this.repeatMsg = data.msg;
1365
+            this.showDelModal(
1366
+              this.accompanyPostData,
1367
+              "accompany2",
1368
+              this.accompanyYuyue
1369
+            );
1350 1370
           } else {
1351 1371
             this.showPromptModal("创建", false, data.msg);
1352 1372
           }
@@ -1381,6 +1401,14 @@ export class HushijiandanComponent implements OnInit {
1381 1401
             this.getDeptTaskType();
1382 1402
           } else if (data.status == 100042) {
1383 1403
             this.showPromptModal("创建", true, data.msg);
1404
+          } else if (data.status == 1000033) {
1405
+            //重复建单那策略
1406
+            this.repeatMsg = data.msg;
1407
+            this.showDelModal(
1408
+              this.accompanyPostData,
1409
+              "accompany3",
1410
+              this.accompanyYuyue
1411
+            );
1384 1412
           } else {
1385 1413
             this.showPromptModal("创建", false, data.msg);
1386 1414
           }
@@ -1403,6 +1431,14 @@ export class HushijiandanComponent implements OnInit {
1403 1431
             this.goodsLis = [];
1404 1432
             this.getOrderList();
1405 1433
             this.getDeptTaskType();
1434
+          } else if (data.status == 1000033) {
1435
+            //重复建单那策略
1436
+            this.repeatMsg = data.msg;
1437
+            this.showDelModal(
1438
+              this.accompanyPostData,
1439
+              "accompany4",
1440
+              this.accompanyYuyue
1441
+            );
1406 1442
           } else {
1407 1443
             this.showPromptModal("创建", false, data.msg);
1408 1444
           }
@@ -1799,6 +1835,10 @@ export class HushijiandanComponent implements OnInit {
1799 1835
           that.showPromptModal("创建", true, "", "bb");
1800 1836
         } else if (that.buildType == "bb" && data.status == 100043) {
1801 1837
           that.showPromptModal("创建", true, data.msg);
1838
+        } else if (data.status == 1000033) {
1839
+          //重复建单那策略
1840
+          this.repeatMsg = data.msg;
1841
+          this.showDelModal(postData, "other");
1802 1842
         } else {
1803 1843
           that.showPromptModal("创建", false, data.msg);
1804 1844
         }
@@ -1927,11 +1967,126 @@ export class HushijiandanComponent implements OnInit {
1927 1967
           that.showPromptModal("创建", true, data.msg);
1928 1968
           this.getOrderList();
1929 1969
           this.getSpecimenWorkOrderMsg();
1970
+        } else if (data.status == 1000033) {
1971
+          //重复建单那策略
1972
+          this.repeatMsg = data.msg;
1973
+          this.showDelModal(postData, "specimen");
1930 1974
         } else {
1931 1975
           that.showPromptModal("创建", false, data.msg);
1932 1976
         }
1933 1977
       });
1934 1978
   }
1979
+  repeatModal: boolean = false; //删除模态框
1980
+  repeatMsg = "";
1981
+  loadingRepeat = false;
1982
+  repeatPostData;
1983
+  sourceType;
1984
+  isYuyue;
1985
+  showDelModal(postData, sourceType, yuyue?) {
1986
+    this.repeatModal = true;
1987
+    this.repeatPostData = postData;
1988
+    this.sourceType = sourceType;
1989
+    this.isYuyue = yuyue ? yuyue : false;
1990
+  }
1991
+  hideRepeatModal() {
1992
+    this.repeatModal = false;
1993
+    this.btnLoading = false;
1994
+  }
1995
+  confirmRepeat() {
1996
+    this.loadingRepeat = true;
1997
+    this.repeatPostData.tipsCreateOder = 1;
1998
+    this.mainService
1999
+      .postCustom(
2000
+        "api",
2001
+        this.isYuyue ? "appointmentOrder" : "startOrder",
2002
+        this.repeatPostData
2003
+      )
2004
+      .subscribe((data) => {
2005
+        this.loadingRepeat = false;
2006
+        this.repeatModal = false;
2007
+        if (this.sourceType === "specimen") {
2008
+          // 标本建单
2009
+          if (data.status == 200 && this.buildType == "other") {
2010
+            this.showPromptModal("创建", true, "", "other");
2011
+          } else if (data.status == 200 && this.buildType == "bb") {
2012
+            this.showPromptModal("创建", true, "", "bb");
2013
+          } else if (this.buildType == "bb" && data.status == 100043) {
2014
+            this.showPromptModal("创建", true, data.msg);
2015
+            this.getOrderList();
2016
+            this.getSpecimenWorkOrderMsg();
2017
+          } else {
2018
+            this.showPromptModal("创建", false, data.msg);
2019
+          }
2020
+        } else if (this.sourceType === "other") {
2021
+          // 其他建单
2022
+          if (data.status == 200 && this.buildType == "other") {
2023
+            this.showPromptModal("创建", true, "", "other");
2024
+          } else if (data.status == 200 && this.buildType == "bb") {
2025
+            this.showPromptModal("创建", true, "", "bb");
2026
+          } else if (this.buildType == "bb" && data.status == 100043) {
2027
+            this.showPromptModal("创建", true, data.msg);
2028
+          } else {
2029
+            this.showPromptModal("创建", false, data.msg);
2030
+          }
2031
+        } else if (this.sourceType === "transport") {
2032
+          // 转运
2033
+          if (data.status == 200) {
2034
+            this.showPromptModal("创建", true, "");
2035
+            this.goodsLis = [];
2036
+            this.getOrderList();
2037
+            this.getDeptTaskType();
2038
+          } else if (data.status == 100042) {
2039
+            this.showPromptModal("创建", true, data.msg);
2040
+          } else {
2041
+            this.showPromptModal("创建", false, data.msg);
2042
+          }
2043
+        } else if (this.sourceType === "accompany1") {
2044
+          // 陪检
2045
+          if (data.status == 200) {
2046
+            this.showPromptModal("创建", true, "");
2047
+            this.goodsLis = [];
2048
+            this.getOrderList();
2049
+            this.getDeptTaskType();
2050
+          } else if (data.status == 100042) {
2051
+            this.showPromptModal("创建", true, data.msg);
2052
+          } else {
2053
+            this.showPromptModal("创建", false, data.msg);
2054
+          }
2055
+        } else if (this.sourceType === "accompany2") {
2056
+          // 陪检
2057
+          if (data.status == 200) {
2058
+            this.showPromptModal("创建", true, "");
2059
+            this.goodsLis = [];
2060
+            this.getOrderList();
2061
+            this.getDeptTaskType();
2062
+          } else {
2063
+            this.showPromptModal("创建", false, data.msg);
2064
+          }
2065
+        } else if (this.sourceType === "accompany3") {
2066
+          // 陪检
2067
+          if (data.status == 200) {
2068
+            this.showPromptModal("创建", true, "");
2069
+            this.goodsLis = [];
2070
+            this.getOrderList();
2071
+            this.getDeptTaskType();
2072
+          } else if (data.status == 100042) {
2073
+            this.showPromptModal("创建", true, data.msg);
2074
+          } else {
2075
+            this.showPromptModal("创建", false, data.msg);
2076
+          }
2077
+        } else if (this.sourceType === "accompany4") {
2078
+          // 陪检
2079
+          if (data.status == 200) {
2080
+            this.showPromptModal("创建", true, "");
2081
+            this.goodsLis = [];
2082
+            this.getOrderList();
2083
+            this.getDeptTaskType();
2084
+          } else {
2085
+            this.showPromptModal("创建", false, data.msg);
2086
+          }
2087
+        }
2088
+      });
2089
+  }
1935 2090
   // =======================end=================================
1936 2091
 
1937 2092
   // 页面中间部分tab切换

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

@@ -205,6 +205,14 @@
205 205
             <label nz-radio nzValue='0'>否</label>
206 206
           </nz-radio-group>
207 207
         </div>
208
+        <div class="mb8 w100">
209
+          <nz-form-label class="label" nzRequired>限制重复建单</nz-form-label>
210
+          <nz-radio-group class="handlerType" [(ngModel)]="isRepeatCreateOder">
211
+            <label nz-radio nzValue='2'>可重复建单</label>
212
+            <label nz-radio nzValue='1'>可重复需提示</label>
213
+            <label nz-radio nzValue='0'>不可重复建单</label>
214
+          </nz-radio-group>
215
+        </div>
208 216
         <div nz-row *ngIf='carryShow&&(association.id == 260 || association.id == 255)'>
209 217
           <div nz-col nzSpan="5" class="label ml8">携带设备:</div>
210 218
           <div nz-col nzSpan="18">

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

@@ -98,6 +98,7 @@ export class TaskTypeManagementComponent implements OnInit {
98 98
   isAccompany = "0"; //是否需要医护陪同检查
99 99
   isHalfInspect = "0"; //是否半陪检
100 100
   isMoreDept = "0"; //关联检查是否允许多个科室
101
+  isRepeatCreateOder = "2"; //限制重复建单
101 102
   wechatFocusSwitch = "0"; //支助中心端是否能标记重点关注
102 103
   isRemarks: any = "0"; //是否需要备注信息(其他类型)
103 104
   remarks = ""; //备注信息提示用语(其他类型)
@@ -743,6 +744,10 @@ export class TaskTypeManagementComponent implements OnInit {
743 744
       data.isHalfInspect === undefined ? "0" : data.isHalfInspect + ""; //是否半陪检
744 745
     this.isMoreDept =
745 746
       data.isMoreDept === undefined ? "0" : data.isMoreDept + ""; //关联检查是否允许多个科室
747
+    this.isRepeatCreateOder =
748
+      data.isRepeatCreateOder === undefined
749
+        ? "2"
750
+        : data.isRepeatCreateOder + ""; //限制重复建单
746 751
     this.wechatFocusSwitch =
747 752
       data.wechatFocusSwitch === undefined ? "0" : data.wechatFocusSwitch + ""; //支助中心端是否能标记重点关注
748 753
     this.leadTime =
@@ -1041,6 +1046,10 @@ export class TaskTypeManagementComponent implements OnInit {
1041 1046
     this.taskData.taskType.isAccompany = this.isAccompany === "1" ? 1 : 0; //是否需要医护陪同检查
1042 1047
     this.taskData.taskType.isHalfInspect = this.isHalfInspect === "1" ? 1 : 0; //是否半陪检
1043 1048
     this.taskData.taskType.isMoreDept = this.isMoreDept === "1" ? 1 : 0; //关联检查是否允许多个科室
1049
+    if (this.isRepeatCreateOder !== "2") {
1050
+      this.taskData.taskType.isRepeatCreateOder =
1051
+        this.isRepeatCreateOder === "1" ? 1 : 0; //限制重复建单
1052
+    }
1044 1053
     this.taskData.taskType.wechatFocusSwitch =
1045 1054
       this.wechatFocusSwitch === "1" ? 1 : 0; //支助中心端重点关注开关
1046 1055
     this.taskData.taskType.remarksSwitch = this.isRemarks === "1" ? 1 : 0; //是否需要备注信息