浏览代码

当日工单数

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