Pārlūkot izejas kodu

药品和静配信息页面,轮巡计划

seimin 3 gadi atpakaļ
vecāks
revīzija
1e4a20f1d4

+ 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": {

+ 12 - 0
src/app/views/drug-search/drug-search-routing.module.ts

@@ -0,0 +1,12 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { DrugSearchComponent } from './drug-search.component';
4
+
5
+
6
+const routes: Routes = [{ path: "", component: DrugSearchComponent }];
7
+
8
+@NgModule({
9
+  imports: [RouterModule.forChild(routes)],
10
+  exports: [RouterModule]
11
+})
12
+export class DrugSearchRoutingModule { }

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

@@ -0,0 +1 @@
1
+<p>drug-search works!</p>

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


+ 15 - 0
src/app/views/drug-search/drug-search.component.ts

@@ -0,0 +1,15 @@
1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-drug-search',
5
+  templateUrl: './drug-search.component.html',
6
+  styleUrls: ['./drug-search.component.less']
7
+})
8
+export class DrugSearchComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 17 - 0
src/app/views/drug-search/drug-search.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { DrugSearchRoutingModule } from './drug-search-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { DrugSearchComponent } from './drug-search.component';
7
+
8
+
9
+@NgModule({
10
+  declarations: [DrugSearchComponent],
11
+  imports: [
12
+    CommonModule,
13
+    DrugSearchRoutingModule,
14
+    ShareModule
15
+  ]
16
+})
17
+export class DrugSearchModule { }

+ 12 - 0
src/app/views/jp-search/jp-search-routing.module.ts

@@ -0,0 +1,12 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { JpSearchComponent } from './jp-search.component';
4
+
5
+
6
+const routes: Routes = [{ path: "", component: JpSearchComponent }];
7
+
8
+@NgModule({
9
+  imports: [RouterModule.forChild(routes)],
10
+  exports: [RouterModule]
11
+})
12
+export class JpSearchRoutingModule { }

+ 80 - 0
src/app/views/jp-search/jp-search.component.html

@@ -0,0 +1,80 @@
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.patientName" />
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
+        <div class="list-template__searchItem">
14
+          <span class="label">发药科室:</span>
15
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
16
+            nzPlaceHolder="请选择发药科室" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
17
+            (nzOpenChange)="changeSearch($event)">
18
+            <ng-container *ngFor="let data of workerSearch">
19
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
20
+            </ng-container>
21
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
22
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
23
+            </nz-option>
24
+          </nz-select>
25
+        </div>
26
+        <div class="list-template__searchItem">
27
+          <span class="label">申请科室:</span>
28
+          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
29
+            nzPlaceHolder="请选择申请科室" [(ngModel)]="searchCriteria.workerId" (nzOnSearch)="changeInp($event)"
30
+            (nzOpenChange)="changeSearch($event)">
31
+            <ng-container *ngFor="let data of workerSearch">
32
+              <nz-option *ngIf="!isLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
33
+            </ng-container>
34
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
35
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
36
+            </nz-option>
37
+          </nz-select>
38
+        </div>
39
+      </div>
40
+      <div nz-col nzXl="8" class="list-template__btns">
41
+        <button nz-button class="btn default" (click)='reset()'>重置</button>
42
+        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
43
+      </div>
44
+    </div>
45
+    <div class="list-template__bottom">
46
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
47
+        [nzLoading]="loading1">
48
+        <thead>
49
+          <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>
58
+          </tr>
59
+        </thead>
60
+        <tbody>
61
+          <tr *ngFor="let data of listOfData;let i = index">
62
+            <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>
70
+          </tr>
71
+        </tbody>
72
+      </nz-table>
73
+      <div class="list-template__pagination">
74
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
75
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
76
+        </nz-pagination>
77
+      </div>
78
+    </div>
79
+  </div>
80
+</div>

+ 167 - 0
src/app/views/jp-search/jp-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
+}

+ 128 - 0
src/app/views/jp-search/jp-search.component.ts

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

+ 17 - 0
src/app/views/jp-search/jp-search.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { JpSearchRoutingModule } from './jp-search-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { JpSearchComponent } from './jp-search.component';
7
+
8
+
9
+@NgModule({
10
+  declarations: [JpSearchComponent],
11
+  imports: [
12
+    CommonModule,
13
+    JpSearchRoutingModule,
14
+    ShareModule
15
+  ]
16
+})
17
+export class JpSearchModule { }

+ 14 - 0
src/app/views/main/main-routing.module.ts

@@ -250,6 +250,20 @@ const routes: Routes = [
250 250
           ),
251 251
       },
252 252
       {
253
+        // 药品信息
254
+        path: "drugSearch",
255
+        loadChildren: () =>
256
+          import("../drug-search/drug-search.module").then(
257
+            (m) => m.DrugSearchModule
258
+          ),
259
+      },
260
+      {
261
+        // 静配信息
262
+        path: "jpSearch",
263
+        loadChildren: () =>
264
+          import("../jp-search/jp-search.module").then((m) => m.JpSearchModule),
265
+      },
266
+      {
253 267
         // 院区系统配置
254 268
         path: "hospitalConfig",
255 269
         loadChildren: () =>

+ 4 - 4
src/app/views/round-robin/round-robin.component.html

@@ -46,12 +46,12 @@
46 46
             <td>{{ data.title }}</td>
47 47
             <td>{{ data.taskType.taskName }}</td>
48 48
             <td [ngSwitch]="data.timeStep">
49
-              <ng-container *ngSwitchCase="'day'">每日{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}</ng-container>
50
-              <ng-container *ngSwitchCase="'week'">每周{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
49
+              <ng-container *ngSwitchCase="'day'">每日{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}}</ng-container>
50
+              <ng-container *ngSwitchCase="'week'">每周{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}}
51 51
               </ng-container>
52
-              <ng-container *ngSwitchCase="'month'">每月{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
52
+              <ng-container *ngSwitchCase="'month'">每月{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}}
53 53
               </ng-container>
54
-              <ng-container *ngSwitchCase="'year'">每年{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
54
+              <ng-container *ngSwitchCase="'year'">每年{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}}
55 55
               </ng-container>
56 56
             </td>
57 57
             <td [ngSwitch]="data.timeStep">

+ 2 - 1
src/app/views/round-robin/round-robin.component.ts

@@ -484,7 +484,7 @@ export class RoundRobinComponent implements OnInit {
484 484
       ).getTime();
485 485
     }
486 486
     console.log(postData);
487
-    return; //baba
487
+    // return; //baba
488 488
     this.mainService
489 489
       .addRoundRobin(this.add ? "addPlan" : "updatePlan", postData)
490 490
       .subscribe((data) => {
@@ -556,6 +556,7 @@ export class RoundRobinComponent implements OnInit {
556 556
     }
557 557
     // 轮巡类型end
558 558
     this.validateForm.controls.timeStep.setValue(data.timeStep); //轮巡策略
559
+    this.validateForm.controls.executeTime.setValue(new Date(data.executeTime)); //轮巡策略
559 560
     this.defaultSelectTimesOption = data.executeTime;
560 561
     //轮巡策略(时间) start
561 562
     if (data.timeStep == "year") {