瀏覽代碼

手动建单

seimin 1 年之前
父節點
當前提交
45e0b08986

+ 10 - 0
src/app/services/main.service.ts

@@ -674,4 +674,14 @@ export class MainService {
674 674
       { headers: this.headers }
675 675
     );
676 676
   }
677
+  //手动创建手术工单
678
+  createOrTakeOrder(data) {
679
+    return this.http.post(
680
+      host.host + "/transflow/createOrTakeOrder",
681
+      data,
682
+      {
683
+        headers: this.headers,
684
+      }
685
+    );
686
+  }
677 687
 }

+ 3 - 3
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2677,7 +2677,7 @@
2677 2677
         *ngIf="
2678 2678
           currentTasktype.associationType.value === 'inspect' &&
2679 2679
           isYyInspect &&
2680
-          !(currentTasktype.isMoreDept === 0 && isInspects)
2680
+          !(currentTasktype.isMoreDept === 0 && isInspects) && checkedShowMsg.status != 100009
2681 2681
         "
2682 2682
       >
2683 2683
         预约建单
@@ -2689,7 +2689,7 @@
2689 2689
         (click)="confirmPatient1('patient-zy-yuyue')"
2690 2690
         *ngIf="
2691 2691
           currentTasktype.associationType.value === 'patientTransport' &&
2692
-          isYyInspect
2692
+          isYyInspect && checkedShowMsg.status != 100009
2693 2693
         "
2694 2694
       >
2695 2695
         预约建单
@@ -2706,7 +2706,7 @@
2706 2706
             linkCheckLisTrue) ||
2707 2707
             (!isYyInspect &&
2708 2708
               currentTasktype.associationType.value === 'patientTransport')) &&
2709
-          !(currentTasktype.isMoreDept === 0 && isInspects)
2709
+          !(currentTasktype.isMoreDept === 0 && isInspects) && checkedShowMsg.status != 100009
2710 2710
         "
2711 2711
       >
2712 2712
         直接建单

+ 3 - 3
src/app/views/hushijiandan/hushijiandan.component.less

@@ -1223,10 +1223,10 @@
1223 1223
           .table {
1224 1224
             width: 100%;
1225 1225
             height: 100%;
1226
-            position: absolute;
1227
-            top: 0;
1226
+            // position: absolute;
1227
+            // top: 0;
1228 1228
             padding: 8px;
1229
-            padding-top: 208px;
1229
+            // padding-top: 208px;
1230 1230
 
1231 1231
             &.turn {
1232 1232
               padding-top: 162px;

+ 23 - 34
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1418,41 +1418,30 @@ export class HushijiandanComponent implements OnInit {
1418 1418
   }
1419 1419
   // 确认
1420 1420
   confirmPickUp() {
1421
-    alert('建单,无接口')
1422 1421
     console.log(this.pickUpItem);
1423
-    return;
1424
-    this.showPromptModal("创建", true, "");
1425
-    this.getOrderList();
1426
-    this.getDeptTaskType();
1427
-    this.getTodayNum();
1428
-    // var that = this;
1429
-    // that.btnLoading = true;
1430
-    // that.mainService
1431
-    //   .coopData(
1432
-    //     "rmvData",
1433
-    //     "department",
1434
-    //     1
1435
-    //   )
1436
-    //   .subscribe((data) => {
1437
-    //     that.btnLoading = false;
1438
-    //     that.pickUpModal = false;
1439
-    //     if (data.data && data.data[0]) {
1440
-    //       if (!data.data[0].msg) {
1441
-    //         if (
1442
-    //           that.listOfData.length == 1 &&
1443
-    //           that.pageIndex == Math.ceil(that.listLength / that.pageSize)
1444
-    //         ) {
1445
-    //           that.listLength--;
1446
-    //           that.pageIndex = Math.ceil(that.listLength / that.pageSize);
1447
-    //         }
1448
-    //         that.showPromptModal("删除", true, "");
1449
-    //       } else {
1450
-    //         that.showPromptModal("删除", false, data.data[0].msg);
1451
-    //       }
1452
-    //     } else {
1453
-    //       that.showPromptModal("删除", false, "");
1454
-    //     }
1455
-    //   });
1422
+    this.btnLoading = true;
1423
+    this.mainService
1424
+      .createOrTakeOrder({
1425
+        type: 'surgery',
1426
+        id: this.pickUpItem.id,
1427
+        workOrder: {
1428
+          sourceld: 2,
1429
+          createDept: this.loginUser.dept.id,
1430
+          platform: 2
1431
+        }
1432
+      })
1433
+      .subscribe((result:any) => {
1434
+        this.btnLoading = false;
1435
+        this.pickUpModal = false;
1436
+        if(result.state == 200){
1437
+          this.showPromptModal("创建", true, "");
1438
+          this.getOrderList();
1439
+          this.getDeptTaskType();
1440
+          this.getTodayNum();
1441
+        }else{
1442
+          this.showPromptModal("创建", false, result.msg);
1443
+        }
1444
+      });
1456 1445
   }
1457 1446
   // 手术安排信息-一键接患者
1458 1447
   pickUpPatient(e, item){