Browse Source

当日工单数

seimin 2 years ago
parent
commit
7def74853d
1 changed files with 33 additions and 1 deletions
  1. 33 1
      src/app/views/hushijiandan/hushijiandan.component.ts

+ 33 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -30,6 +30,8 @@ import {
30 30
   addDays,
31 31
   differenceInCalendarDays,
32 32
   getHours,
33
+  startOfDay,
34
+  endOfDay,
33 35
 } from "date-fns";
34 36
 import { SourceId } from "src/app/type/types";
35 37
 // 日期禁用
@@ -177,6 +179,7 @@ export class HushijiandanComponent implements OnInit {
177 179
       if (this.logTime === 0) {
178 180
         this.logTime = this.logTimeConst;
179 181
         this.listDeptOrderRecord();
182
+        this.getTodayNum();//当日工单数量
180 183
       }
181 184
     }, 1000);
182 185
     // 综合日志倒计时 end
@@ -238,7 +241,11 @@ export class HushijiandanComponent implements OnInit {
238 241
       .getFetchDataList("nurse", "workOrder", {
239 242
         idx: 0,
240 243
         sum: 1,
241
-        workOrder: { createDept: this.loginUser.dept.id },
244
+        workOrder: { 
245
+          createDept: this.loginUser.dept.id,
246
+          startTime1:format(startOfDay(new Date()),'yyyy-MM-dd HH:mm:ss'),
247
+          endTime1:format(endOfDay(new Date()),'yyyy-MM-dd HH:mm:ss'),
248
+        },
242 249
       })
243 250
       .subscribe((data) => {
244 251
         if (data.status == 200) {
@@ -1146,6 +1153,7 @@ export class HushijiandanComponent implements OnInit {
1146 1153
           this.goodsLis = [];
1147 1154
           this.getOrderList();
1148 1155
           this.getDeptTaskType();
1156
+          this.getTodayNum();
1149 1157
         } else if (data.status == 100042) {
1150 1158
           this.showPromptModal("创建", false, data.msg);
1151 1159
           this.getPatient(this.tabSearchCont);
@@ -1530,6 +1538,7 @@ export class HushijiandanComponent implements OnInit {
1530 1538
             that.goodsLis = [];
1531 1539
             that.getOrderList();
1532 1540
             that.getDeptTaskType();
1541
+            that.getTodayNum();
1533 1542
           } else if (data.status == 100042) {
1534 1543
             that.showPromptModal("创建", false, data.msg);
1535 1544
             this.getPatient(this.tabSearchCont);
@@ -1576,6 +1585,7 @@ export class HushijiandanComponent implements OnInit {
1576 1585
             this.goodsLis = [];
1577 1586
             this.getOrderList();
1578 1587
             this.getDeptTaskType();
1588
+            this.getTodayNum();
1579 1589
           } else if (data.status == 100042) {
1580 1590
             this.showPromptModal("创建", false, data.msg);
1581 1591
             this.getPatient(this.tabSearchCont);
@@ -1609,6 +1619,7 @@ export class HushijiandanComponent implements OnInit {
1609 1619
             this.goodsLis = [];
1610 1620
             this.getOrderList();
1611 1621
             this.getDeptTaskType();
1622
+            this.getTodayNum();
1612 1623
           } else if (data.status == 100042) {
1613 1624
             this.showPromptModal("创建", false, data.msg);
1614 1625
             this.getPatient(this.tabSearchCont);
@@ -1652,6 +1663,7 @@ export class HushijiandanComponent implements OnInit {
1652 1663
             this.goodsLis = [];
1653 1664
             this.getOrderList();
1654 1665
             this.getDeptTaskType();
1666
+            this.getTodayNum();
1655 1667
           } else if (data.status == 100042) {
1656 1668
             this.showPromptModal("创建", false, data.msg);
1657 1669
             this.getPatient(this.tabSearchCont);
@@ -1685,6 +1697,7 @@ export class HushijiandanComponent implements OnInit {
1685 1697
             this.goodsLis = [];
1686 1698
             this.getOrderList();
1687 1699
             this.getDeptTaskType();
1700
+            this.getTodayNum();
1688 1701
           } else if (data.status == 100042) {
1689 1702
             this.showPromptModal("创建", false, data.msg);
1690 1703
             this.getPatient(this.tabSearchCont);
@@ -2091,10 +2104,13 @@ export class HushijiandanComponent implements OnInit {
2091 2104
         that.loading5 = false;
2092 2105
         if (data.status == 200 && that.buildType == "other") {
2093 2106
           that.showPromptModal("创建", true, "", "other");
2107
+          this.getTodayNum();
2094 2108
         } else if (data.status == 200 && that.buildType == "bb") {
2095 2109
           that.showPromptModal("创建", true, "", "bb");
2110
+          this.getTodayNum();
2096 2111
         } else if (that.buildType == "bb" && data.status == 100043) {
2097 2112
           that.showPromptModal("创建", true, data.msg);
2113
+          this.getTodayNum();
2098 2114
         } else if (data.status == 1000033) {
2099 2115
           //重复建单那策略
2100 2116
           this.repeatMsg = data.msg;
@@ -2221,12 +2237,15 @@ export class HushijiandanComponent implements OnInit {
2221 2237
         console.log(that.buildType, data.status);
2222 2238
         if (data.status == 200 && that.buildType == "other") {
2223 2239
           that.showPromptModal("创建", true, "", "other");
2240
+          this.getTodayNum();
2224 2241
         } else if (data.status == 200 && that.buildType == "bb") {
2225 2242
           that.showPromptModal("创建", true, "", "bb");
2243
+          this.getTodayNum();
2226 2244
         } else if (that.buildType == "bb" && data.status == 100043) {
2227 2245
           that.showPromptModal("创建", true, data.msg);
2228 2246
           this.getOrderList();
2229 2247
           this.getSpecimenWorkOrderMsg();
2248
+          this.getTodayNum();
2230 2249
         } else if (data.status == 1000033) {
2231 2250
           //重复建单那策略
2232 2251
           this.repeatMsg = data.msg;
@@ -2268,12 +2287,15 @@ export class HushijiandanComponent implements OnInit {
2268 2287
           // 标本建单
2269 2288
           if (data.status == 200 && this.buildType == "other") {
2270 2289
             this.showPromptModal("创建", true, "", "other");
2290
+            this.getTodayNum();
2271 2291
           } else if (data.status == 200 && this.buildType == "bb") {
2272 2292
             this.showPromptModal("创建", true, "", "bb");
2293
+            this.getTodayNum();
2273 2294
           } else if (this.buildType == "bb" && data.status == 100043) {
2274 2295
             this.showPromptModal("创建", true, data.msg);
2275 2296
             this.getOrderList();
2276 2297
             this.getSpecimenWorkOrderMsg();
2298
+            this.getTodayNum();
2277 2299
           } else {
2278 2300
             this.showPromptModal("创建", false, data.msg);
2279 2301
           }
@@ -2281,10 +2303,13 @@ export class HushijiandanComponent implements OnInit {
2281 2303
           // 其他建单
2282 2304
           if (data.status == 200 && this.buildType == "other") {
2283 2305
             this.showPromptModal("创建", true, "", "other");
2306
+            this.getTodayNum();
2284 2307
           } else if (data.status == 200 && this.buildType == "bb") {
2285 2308
             this.showPromptModal("创建", true, "", "bb");
2309
+            this.getTodayNum();
2286 2310
           } else if (this.buildType == "bb" && data.status == 100043) {
2287 2311
             this.showPromptModal("创建", true, data.msg);
2312
+            this.getTodayNum();
2288 2313
           } else {
2289 2314
             this.showPromptModal("创建", false, data.msg);
2290 2315
           }
@@ -2295,6 +2320,7 @@ export class HushijiandanComponent implements OnInit {
2295 2320
             this.goodsLis = [];
2296 2321
             this.getOrderList();
2297 2322
             this.getDeptTaskType();
2323
+            this.getTodayNum();
2298 2324
           } else if (data.status == 100042) {
2299 2325
             this.showPromptModal("创建", false, data.msg);
2300 2326
             this.getPatient(this.tabSearchCont);
@@ -2308,6 +2334,7 @@ export class HushijiandanComponent implements OnInit {
2308 2334
             this.goodsLis = [];
2309 2335
             this.getOrderList();
2310 2336
             this.getDeptTaskType();
2337
+            this.getTodayNum();
2311 2338
           } else if (data.status == 100042) {
2312 2339
             this.showPromptModal("创建", false, data.msg);
2313 2340
             this.getPatient(this.tabSearchCont);
@@ -2321,6 +2348,7 @@ export class HushijiandanComponent implements OnInit {
2321 2348
             this.goodsLis = [];
2322 2349
             this.getOrderList();
2323 2350
             this.getDeptTaskType();
2351
+            this.getTodayNum();
2324 2352
           } else if (data.status == 100042) {
2325 2353
             this.showPromptModal("创建", false, data.msg);
2326 2354
             this.getPatient(this.tabSearchCont);
@@ -2334,6 +2362,7 @@ export class HushijiandanComponent implements OnInit {
2334 2362
             this.goodsLis = [];
2335 2363
             this.getOrderList();
2336 2364
             this.getDeptTaskType();
2365
+            this.getTodayNum();
2337 2366
           } else if (data.status == 100042) {
2338 2367
             this.showPromptModal("创建", false, data.msg);
2339 2368
             this.getPatient(this.tabSearchCont);
@@ -2347,6 +2376,7 @@ export class HushijiandanComponent implements OnInit {
2347 2376
             this.goodsLis = [];
2348 2377
             this.getOrderList();
2349 2378
             this.getDeptTaskType();
2379
+            this.getTodayNum();
2350 2380
           } else if (data.status == 100042) {
2351 2381
             this.showPromptModal("创建", false, data.msg);
2352 2382
             this.getPatient(this.tabSearchCont);
@@ -2360,6 +2390,7 @@ export class HushijiandanComponent implements OnInit {
2360 2390
             this.goodsLis = [];
2361 2391
             this.getOrderList();
2362 2392
             this.getDeptTaskType();
2393
+            this.getTodayNum();
2363 2394
           } else if (data.status == 100042) {
2364 2395
             this.showPromptModal("创建", false, data.msg);
2365 2396
             this.getPatient(this.tabSearchCont);
@@ -2826,6 +2857,7 @@ export class HushijiandanComponent implements OnInit {
2826 2857
       if (data.status == 200) {
2827 2858
         that.getOrderList();
2828 2859
         that.changeInfo();
2860
+        this.getTodayNum();
2829 2861
         that.showPromptModal("撤销", true, "");
2830 2862
       } else {
2831 2863
         that.showPromptModal("撤销", false, data.msg);