Browse Source

增加业务信息菜单中的药品信息和静配信息

seimin 3 years ago
parent
commit
0b7b0e7075

+ 1 - 1
proxy.conf.json

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

+ 76 - 1
src/app/views/drug-search/drug-search.component.html

@@ -1 +1,76 @@
1
-<p>drug-search works!</p>
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='16' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">请领单号:</span>
7
+          <input nz-input class="formItem" placeholder="请输入请领单号" [(ngModel)]="searchCriteria.packid" />
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">发药科室:</span>
11
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
12
+            nzPlaceHolder="请选择发药科室" [(ngModel)]="searchCriteria.launch" (nzOnSearch)="changeInp($event)"
13
+            (nzOpenChange)="changeSearch($event)">
14
+            <ng-container *ngFor="let data of deptList">
15
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
16
+            </ng-container>
17
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
18
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
19
+            </nz-option>
20
+          </nz-select>
21
+        </div>
22
+        <div class="list-template__searchItem">
23
+          <span class="label">申请科室:</span>
24
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
25
+            nzPlaceHolder="请选择申请科室" [(ngModel)]="searchCriteria.target" (nzOnSearch)="changeInp($event)"
26
+            (nzOpenChange)="changeSearch($event)">
27
+            <ng-container *ngFor="let data of deptList">
28
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
29
+            </ng-container>
30
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
31
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
32
+            </nz-option>
33
+          </nz-select>
34
+        </div>
35
+      </div>
36
+      <div nz-col nzXl="8" class="list-template__btns">
37
+        <button nz-button class="btn default" (click)='reset()'>重置</button>
38
+        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
39
+      </div>
40
+    </div>
41
+    <div class="list-template__bottom">
42
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
43
+        [nzLoading]="loading1">
44
+        <thead>
45
+          <tr class="thead">
46
+            <th nzWidth="6%">序号</th>
47
+            <th nzWidth="14%">发药科室</th>
48
+            <th nzWidth="14%">申请科室</th>
49
+            <th nzWidth="14%">创建时间</th>
50
+            <th nzWidth="14%">药品状态</th>
51
+            <th nzWidth="14%">批次号</th>
52
+            <th nzWidth="12%">请领单号</th>
53
+            <th nzWidth="12%">药品标识</th>
54
+          </tr>
55
+        </thead>
56
+        <tbody>
57
+          <tr *ngFor="let data of listOfData;let i = index">
58
+            <td>{{i+1}}</td>
59
+            <td>{{ data.launch?.dept}}</td>
60
+            <td>{{ data.target?.dept }}</td>
61
+            <td>{{ data.creatTime }}</td>
62
+            <td>{{ data.drugsState?.name }}</td>
63
+            <td>{{data.batchNo}}</td>
64
+            <td>{{ data.packid }}</td>
65
+            <td>{{data.id}}</td>
66
+          </tr>
67
+        </tbody>
68
+      </nz-table>
69
+      <div class="list-template__pagination">
70
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
71
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
72
+        </nz-pagination>
73
+      </div>
74
+    </div>
75
+  </div>
76
+</div>

+ 167 - 0
src/app/views/drug-search/drug-search.component.less

@@ -0,0 +1,167 @@
1
+@import "../../../../src/theme.less";
2
+
3
+.save {
4
+  position: fixed;
5
+  left: 0;
6
+  top: 0;
7
+  width: 100%;
8
+  height: 100%;
9
+  background: rgba(0, 0, 0, 0.4);
10
+  z-index: 99;
11
+
12
+  .modalBody {
13
+    width: 350px;
14
+    height: 220px;
15
+    background: #fff;
16
+    border-radius: 5px;
17
+    padding: 10px 20px;
18
+    color: #333;
19
+
20
+    .title {
21
+      width: 100%;
22
+      text-align: center;
23
+      font-size: 18px;
24
+      position: relative;
25
+
26
+      i {
27
+        position: absolute;
28
+        right: 0;
29
+        top: 0;
30
+        font-size: 20px;
31
+        color: #666;
32
+        cursor: pointer;
33
+        padding: 0 5px;
34
+      }
35
+    }
36
+
37
+    .content {
38
+      width: 310px;
39
+      height: 117px;
40
+      background: #f9fafb;
41
+      border: 1px solid #e5e9ed;
42
+      border-radius: 5px;
43
+      overflow: hidden;
44
+      margin-top: 12px;
45
+
46
+      & > div {
47
+        text-align: center;
48
+        margin: 0;
49
+
50
+        &.icon {
51
+          margin-top: 17px;
52
+
53
+          i {
54
+            color: #34b349;
55
+            font-size: 30px !important;
56
+
57
+            &.transport-wenhao {
58
+              color: #f5a523;
59
+            }
60
+
61
+            &.transport-shibai {
62
+              color: #ff3a52;
63
+            }
64
+          }
65
+        }
66
+
67
+        &.defeat {
68
+          color: #333;
69
+          font-size: 18px;
70
+        }
71
+
72
+        &:nth-child(3) {
73
+          font-size: 14px;
74
+          color: #666;
75
+        }
76
+      }
77
+      .roundRobinTips {
78
+        font-size: 12px;
79
+      }
80
+    }
81
+
82
+    button {
83
+      margin-top: 10px;
84
+
85
+      &.btn {
86
+        margin-left: 8px;
87
+      }
88
+    }
89
+  }
90
+
91
+  // 新增
92
+  &.add {
93
+    .modalBody {
94
+      width: 480px;
95
+      height: auto;
96
+
97
+      .content {
98
+        width: 100%;
99
+        height: auto;
100
+        padding: 18px 14px 0 14px;
101
+        max-height: 497px;
102
+        overflow-y: auto;
103
+
104
+        .addForm {
105
+          .ant-form-item {
106
+            margin-bottom: 15px;
107
+
108
+            .ant-form-item-label {
109
+              line-height: 14px;
110
+              text-align: left;
111
+            }
112
+
113
+            .desc {
114
+              margin-top: 5px;
115
+            }
116
+          }
117
+
118
+          .datesControl {
119
+            margin-top: -16px;
120
+
121
+            .ant-form-item-label {
122
+              line-height: 40px;
123
+            }
124
+          }
125
+
126
+          .timer {
127
+            .ant-form-item-label {
128
+              width: 100%;
129
+              text-align: left;
130
+            }
131
+
132
+            .numInp {
133
+              margin-right: 5px;
134
+            }
135
+
136
+            .line {
137
+              margin-right: 5px;
138
+            }
139
+          }
140
+
141
+          .timer2 {
142
+            .ant-form-item-label {
143
+              line-height: 20px;
144
+            }
145
+          }
146
+        }
147
+
148
+        .editForm {
149
+          .ant-form-item {
150
+            margin-bottom: 15px;
151
+
152
+            .ant-form-item-label {
153
+              line-height: 14px;
154
+              text-align: left;
155
+            }
156
+          }
157
+        }
158
+      }
159
+
160
+      button {
161
+        &:nth-child(1) {
162
+          margin-right: 20px;
163
+        }
164
+      }
165
+    }
166
+  }
167
+}

+ 123 - 6
src/app/views/drug-search/drug-search.component.ts

@@ -1,15 +1,132 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit } from "@angular/core";
2
+import { Subject } from "rxjs";
3
+import { debounceTime } from "rxjs/operators";
4
+import { MainService } from "src/app/services/main.service";
5
+import { ToolService } from "src/app/services/tool.service";
2 6
 
3 7
 @Component({
4
-  selector: 'app-drug-search',
5
-  templateUrl: './drug-search.component.html',
6
-  styleUrls: ['./drug-search.component.less']
8
+  selector: "app-drug-search",
9
+  templateUrl: "./drug-search.component.html",
10
+  styleUrls: ["./drug-search.component.less"],
7 11
 })
8 12
 export class DrugSearchComponent implements OnInit {
13
+  constructor(private mainService: MainService, private tool: ToolService) {}
9 14
 
10
-  constructor() { }
11
-
15
+  searchCriteria = {
16
+    //搜索条件
17
+    packid: "", //请领单号
18
+    launch: null, //发药科室
19
+    target: null, //发药科室
20
+  };
21
+  deptList = []; // 院区下的支助人员列表(搜索框)
22
+  hosId;
23
+  listOfData: any[] = []; //表格数据
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 10; //表格每页展示条数
26
+  listLength: number = 10; //表格总数据量
27
+  changeInpSubject = new Subject();
12 28
   ngOnInit() {
29
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
30
+      this.searchDept(v);
31
+    });
32
+    this.getHospital();
33
+  }
34
+  // 重置
35
+  reset() {
36
+    this.searchCriteria = {
37
+      //搜索条件
38
+      packid: "",
39
+      launch: null,
40
+      target: null,
41
+    };
42
+    this.getList(1);
43
+  }
44
+
45
+  // 获取所有院区
46
+  getHospital() {
47
+    this.hosId = this.tool.getCurrentHospital().id;
48
+    this.getList(1);
49
+  }
50
+  // 查看标本历史记录
51
+  historyPromptModalShow = false; //标本历史记录弹窗开关
52
+  scode = ""; //查看历史记录携带
53
+  viewSpecimenHistory(data) {
54
+    this.scode = data.scode;
55
+    this.historyPromptModalShow = true;
56
+  }
57
+  // 关闭标本历史记录弹窗
58
+  closeModelHistory(e) {
59
+    this.historyPromptModalShow = JSON.parse(e).show;
60
+  }
61
+  // 打开搜索框
62
+  changeSearch(flag) {
63
+    if (flag) {
64
+      this.changeInp("no");
65
+    }
66
+  }
67
+  // 边输边搜节流阀
68
+  isLoading = false;
69
+  changeInp(dept) {
70
+    if (!dept) {
71
+      return;
72
+    }
73
+    if (dept === "no") {
74
+      dept = "";
75
+    }
76
+    this.isLoading = true;
77
+    this.changeInpSubject.next(dept);
78
+  }
79
+  // 搜索科室
80
+  searchDept(dept) {
81
+    let postData = {
82
+      department: {
83
+        hospital: { id: this.hosId },
84
+        dept,
85
+      },
86
+      idx: 0,
87
+      sum: 10,
88
+    };
89
+    this.mainService
90
+      .getFetchDataList("data", "department", postData)
91
+      .subscribe((result) => {
92
+        if (result.status == 200) {
93
+          this.isLoading = false;
94
+          this.deptList = result.list;
95
+        }
96
+      });
13 97
   }
14 98
 
99
+  // 表格数据
100
+  loading1 = false;
101
+  getList(type) {
102
+    if (type == 1) {
103
+      this.pageIndex = 1;
104
+    }
105
+    let postData: any = {
106
+      idx: this.pageIndex - 1,
107
+      sum: this.pageSize,
108
+      drugsBag: {
109
+        hosId: this.hosId,
110
+      },
111
+    };
112
+    if (this.searchCriteria.target) {
113
+      postData.drugsBag.target = { id: this.searchCriteria.target };
114
+    }
115
+    if (this.searchCriteria.launch) {
116
+      postData.drugsBag.launch = { id: this.searchCriteria.launch };
117
+    }
118
+    if (this.searchCriteria.packid) {
119
+      postData.drugsBag.packid = this.searchCriteria.packid;
120
+    }
121
+    this.loading1 = true;
122
+    this.mainService
123
+      .getFetchDataList("drugsBag", "drugsBag", postData)
124
+      .subscribe((data) => {
125
+        this.loading1 = false;
126
+        if (data["status"] == 200) {
127
+          this.listOfData = data["list"];
128
+          this.listLength = data["totalNum"];
129
+        }
130
+      });
131
+  }
15 132
 }

+ 19 - 27
src/app/views/jp-search/jp-search.component.html

@@ -3,20 +3,16 @@
3 3
     <div class="list-template__top" nz-row>
4 4
       <div nz-col nzXl='16' class="list-template__searchBox">
5 5
         <div class="list-template__searchItem">
6
-          <span class="label">请领单号:</span>
7
-          <input nz-input class="formItem" placeholder="请输入请领单号" [(ngModel)]="searchCriteria.patientName" />
6
+          <span class="label">静配标识:</span>
7
+          <input nz-input class="formItem" placeholder="请输入静配标识" [(ngModel)]="searchCriteria.id" />
8 8
         </div>
9
-        <!-- <div class="list-template__searchItem">
10
-          <span class="label">检查单号:</span>
11
-          <input nz-input class="formItem" placeholder="请输入检查单号" [(ngModel)]="searchCriteria.inspectCode" />
12
-        </div> -->
13 9
         <div class="list-template__searchItem">
14 10
           <span class="label">发药科室:</span>
15 11
           <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
16
-            nzPlaceHolder="请选择发药科室" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
12
+            nzPlaceHolder="请选择发药科室" [(ngModel)]="searchCriteria.launch" (nzOnSearch)="changeInp($event)"
17 13
             (nzOpenChange)="changeSearch($event)">
18
-            <ng-container *ngFor="let data of workerSearch">
19
-              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
14
+            <ng-container *ngFor="let data of deptList">
15
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
20 16
             </ng-container>
21 17
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
22 18
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -26,10 +22,10 @@
26 22
         <div class="list-template__searchItem">
27 23
           <span class="label">申请科室:</span>
28 24
           <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
29
-            nzPlaceHolder="请选择申请科室" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
25
+            nzPlaceHolder="请选择申请科室" [(ngModel)]="searchCriteria.target" (nzOnSearch)="changeInp($event)"
30 26
             (nzOpenChange)="changeSearch($event)">
31
-            <ng-container *ngFor="let data of workerSearch">
32
-              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
27
+            <ng-container *ngFor="let data of deptList">
28
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
33 29
             </ng-container>
34 30
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
35 31
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -47,26 +43,22 @@
47 43
         [nzLoading]="loading1">
48 44
         <thead>
49 45
           <tr class="thead">
50
-            <th nzWidth="6%">序号</th>
51
-            <th nzWidth="14%">发药科室</th>
52
-            <th nzWidth="14%">申请科室</th>
53
-            <th nzWidth="14%">创建时间</th>
54
-            <th nzWidth="14%">药品状态</th>
55
-            <th nzWidth="14%">批次号</th>
56
-            <th nzWidth="12%">请领单号</th>
57
-            <th nzWidth="12%">药品标识</th>
46
+            <th nzWidth="5%">序号</th>
47
+            <th nzWidth="19%">发药科室</th>
48
+            <th nzWidth="19%">申请科室</th>
49
+            <th nzWidth="19%">创建时间</th>
50
+            <th nzWidth="19%">静配状态</th>
51
+            <th nzWidth="19%">静配标识</th>
58 52
           </tr>
59 53
         </thead>
60 54
         <tbody>
61 55
           <tr *ngFor="let data of listOfData;let i = index">
62 56
             <td>{{i+1}}</td>
63
-            <td>{{ data.patientName||'-' }}</td>
64
-            <td>{{ data.patientCode||'-' }}</td>
65
-            <td>{{ data.inspectCode||'-' }}</td>
66
-            <td>{{ data.patientBedNum||'-' }}</td>
67
-            <td>{{data.inspectName||'-'}}</td>
68
-            <td>{{ data.yyTime||'-' }}</td>
69
-            <td>{{data.arriveTime||'-'}}</td>
57
+            <td>{{ data.launch?.dept}}</td>
58
+            <td>{{ data.target?.dept }}</td>
59
+            <td>{{ data.creatTime }}</td>
60
+            <td>{{ data.jpstate?.name }}</td>
61
+            <td>{{data.id}}</td>
70 62
           </tr>
71 63
         </tbody>
72 64
       </nz-table>

+ 38 - 34
src/app/views/jp-search/jp-search.component.ts

@@ -14,13 +14,12 @@ export class JpSearchComponent implements OnInit {
14 14
 
15 15
   searchCriteria = {
16 16
     //搜索条件
17
-    patientName: "",
18
-    inspectCode: "",
19
-    hospital: null,
20
-    workerId: null,
17
+    id: "", //静配标识
18
+    launch: null, //发药科室
19
+    target: null, //发药科室
21 20
   };
22
-  workerSearch = []; // 院区下的支助人员列表(搜索框)
23
-  allHospital: any = []; //院区下拉框
21
+  deptList = []; // 院区下的支助人员列表(搜索框)
22
+  hosId;
24 23
   listOfData: any[] = []; //表格数据
25 24
   pageIndex: number = 1; //表格当前页码
26 25
   pageSize: number = 10; //表格每页展示条数
@@ -28,26 +27,24 @@ export class JpSearchComponent implements OnInit {
28 27
   changeInpSubject = new Subject();
29 28
   ngOnInit() {
30 29
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
31
-      this.searchWorker(v);
30
+      this.searchDept(v);
32 31
     });
33
-    this.getAllHospital();
32
+    this.getHospital();
34 33
   }
35 34
   // 重置
36 35
   reset() {
37 36
     this.searchCriteria = {
38 37
       //搜索条件
39
-      patientName: "",
40
-      inspectCode: "",
41
-      hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
42
-      workerId: null,
38
+      id: "",
39
+      launch: null,
40
+      target: null,
43 41
     };
44 42
     this.getList(1);
45 43
   }
46 44
 
47 45
   // 获取所有院区
48
-  getAllHospital() {
49
-    this.allHospital = [this.tool.getCurrentHospital()];
50
-    this.searchCriteria.hospital = this.tool.getCurrentHospital().id + "";
46
+  getHospital() {
47
+    this.hosId = this.tool.getCurrentHospital().id;
51 48
     this.getList(1);
52 49
   }
53 50
   // 查看标本历史记录
@@ -69,33 +66,32 @@ export class JpSearchComponent implements OnInit {
69 66
   }
70 67
   // 边输边搜节流阀
71 68
   isLoading = false;
72
-  changeInp(worker) {
73
-    if (!worker) {
69
+  changeInp(dept) {
70
+    if (!dept) {
74 71
       return;
75 72
     }
76
-    if (worker === "no") {
77
-      worker = "";
73
+    if (dept === "no") {
74
+      dept = "";
78 75
     }
79 76
     this.isLoading = true;
80
-    this.changeInpSubject.next(worker);
77
+    this.changeInpSubject.next(dept);
81 78
   }
82
-  // 搜索支助人员
83
-  searchWorker(worker) {
79
+  // 搜索科室
80
+  searchDept(dept) {
84 81
     let postData = {
85
-      user: {
86
-        name: worker,
87
-        hospital: { id: this.searchCriteria.hospital },
88
-        usertype: { id: 106 },
82
+      department: {
83
+        hospital: { id: this.hosId },
84
+        dept,
89 85
       },
90 86
       idx: 0,
91 87
       sum: 10,
92 88
     };
93 89
     this.mainService
94
-      .getFetchDataList("data", "user", postData)
90
+      .getFetchDataList("data", "department", postData)
95 91
       .subscribe((result) => {
96 92
         if (result.status == 200) {
97 93
           this.isLoading = false;
98
-          this.workerSearch = result.list;
94
+          this.deptList = result.list;
99 95
         }
100 96
       });
101 97
   }
@@ -106,17 +102,25 @@ export class JpSearchComponent implements OnInit {
106 102
     if (type == 1) {
107 103
       this.pageIndex = 1;
108 104
     }
109
-    let postData = {
105
+    let postData: any = {
110 106
       idx: this.pageIndex - 1,
111 107
       sum: this.pageSize,
112
-      hosId: this.searchCriteria.hospital,
113
-      patientName: this.searchCriteria.patientName,
114
-      inspectCode: this.searchCriteria.inspectCode,
115
-      workerId: this.searchCriteria.workerId,
108
+      jPBag: {
109
+        hosId: this.hosId,
110
+      },
116 111
     };
112
+    if (this.searchCriteria.target) {
113
+      postData.jPBag.target = { id: this.searchCriteria.target };
114
+    }
115
+    if (this.searchCriteria.launch) {
116
+      postData.jPBag.launch = { id: this.searchCriteria.launch };
117
+    }
118
+    if (this.searchCriteria.id) {
119
+      postData.jPBag.id = this.searchCriteria.id;
120
+    }
117 121
     this.loading1 = true;
118 122
     this.mainService
119
-      .listMsgByMain("listInspect", postData)
123
+      .getFetchDataList("pivas", "jPBag", postData)
120 124
       .subscribe((data) => {
121 125
         this.loading1 = false;
122 126
         if (data["status"] == 200) {