Bladeren bron

业务信息增加被服洗涤

seimin 1 jaar geleden
bovenliggende
commit
7deda9005d

+ 4 - 0
src/app/services/httpInterceptor.service.ts

@@ -36,6 +36,10 @@ export class HttpInterceptorService implements HttpInterceptor {
36 36
             // console.log(event);
37 37
             if(event.body == 520){
38 38
               this.message.info('登录失效,请重新登录!').onClose!.subscribe(() => {
39
+                localStorage.removeItem("user");
40
+                localStorage.removeItem("menu");
41
+                localStorage.removeItem("phones");
42
+                localStorage.removeItem("index");
39 43
                 this.router.navigate(['/login']);
40 44
               })
41 45
             }

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

@@ -288,6 +288,11 @@ const routes: Routes = [
288 288
         path: "infoSearch",
289 289
         loadChildren: () => import("../info-search/info-search.module").then((m) => m.InfoSearchModule),
290 290
       },
291
+      // 被服洗涤
292
+      {
293
+        path: "quiltWashingSearch",
294
+        loadChildren: () => import("../quilt-washing-search/quilt-washing-search.module").then((m) => m.QuiltWashingSearchModule),
295
+      },
291 296
       // 院区系统配置
292 297
       {
293 298
         path: "hospitalConfig",

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

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

+ 75 - 0
src/app/views/quilt-washing-search/quilt-washing-search.component.html

@@ -0,0 +1,75 @@
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.batchCode" />
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.relatedDept" (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>
23
+      <div nz-col nzXl="8" class="list-template__btns">
24
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
25
+        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
26
+      </div>
27
+    </div>
28
+    <div class="list-template__bottom">
29
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
30
+        [nzLoading]="loading1">
31
+        <thead>
32
+          <tr class="thead">
33
+            <th nzWidth="6%">序号</th>
34
+            <th nzWidth="8%">关联科室</th>
35
+            <th nzWidth="8%">批次号</th>
36
+            <th nzWidth="8%">被服类型</th>
37
+            <th nzWidth="8%">回收数量</th>
38
+            <th nzWidth="8%">送回数量</th>
39
+            <th nzWidth="8%">是否异常</th>
40
+            <th nzWidth="8%">回收人</th>
41
+            <th nzWidth="11%">回收时间</th>
42
+            <th nzWidth="8%">送回人</th>
43
+            <th nzWidth="11%">送回时间</th>
44
+            <th nzWidth="8%">状态</th>
45
+          </tr>
46
+        </thead>
47
+        <tbody>
48
+          <tr *ngFor="let data of listOfData;let i = index">
49
+            <td>{{i+1}}</td>
50
+            <td>{{ data.relatedDept?.dept }}</td>
51
+            <td>{{ data.batchCode }}</td>
52
+            <td>{{ data.clothesType?.name }}</td>
53
+            <td>{{ data.recyclingNum }}</td>
54
+            <td>{{ data.sendBackNum }}</td>
55
+            <td>{{ data.exception == 1 ? '是' : '否' }}</td>
56
+            <td>{{ data.recyclersId?.name }}</td>
57
+            <td>{{ data.recyclingTime | date:'yyyy-MM-dd HH:mm' }}</td>
58
+            <td>{{ data.sendBackId?.name }}</td>
59
+            <td>{{ data.sendBackTime | date:'yyyy-MM-dd HH:mm' }}</td>
60
+            <td>{{ data.clothesState?.name }}</td>
61
+          </tr>
62
+        </tbody>
63
+      </nz-table>
64
+      <div class="list-template__pagination">
65
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
66
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
67
+        </nz-pagination>
68
+      </div>
69
+    </div>
70
+  </div>
71
+</div>
72
+<!-- 操作成功/失败提示框 -->
73
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
74
+  [info]="promptInfo">
75
+</app-prompt-modal>

+ 1 - 0
src/app/views/quilt-washing-search/quilt-washing-search.component.less

@@ -0,0 +1 @@
1
+@import "../../../../src/theme.less";

+ 134 - 0
src/app/views/quilt-washing-search/quilt-washing-search.component.ts

@@ -0,0 +1,134 @@
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-quilt-washing-search",
9
+  templateUrl: "./quilt-washing-search.component.html",
10
+  styleUrls: ["./quilt-washing-search.component.less"],
11
+})
12
+
13
+export class QuiltWashingSearchComponent implements OnInit {
14
+  constructor(private mainService: MainService, private tool: ToolService) {}
15
+
16
+  searchCriteria = {
17
+    //搜索条件
18
+    batchCode: "", //请领单号
19
+    relatedDept: 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();
28
+  ngOnInit() {
29
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
30
+      this.searchDept(v);
31
+    });
32
+    this.getHospital();
33
+  }
34
+
35
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
36
+  promptContent: string; //操作提示框提示信息
37
+  ifSuccess: boolean; //操作成功/失败
38
+  promptInfo: string; //操作结果提示信息
39
+  promptModalShow: boolean; //操作提示框是否展示
40
+  showPromptModal(con, success, promptInfo?) {
41
+    this.promptModalShow = false;
42
+    this.promptContent = con;
43
+    this.ifSuccess = success;
44
+    this.promptInfo = promptInfo;
45
+    setTimeout(() => {
46
+      this.promptModalShow = true;
47
+    }, 100);
48
+    this.getList(0);
49
+  }
50
+  // 重置
51
+  reset() {
52
+    this.searchCriteria = {
53
+      //搜索条件
54
+      batchCode: "",
55
+      relatedDept: null,
56
+    };
57
+    this.getList(1);
58
+  }
59
+
60
+  // 获取所有院区
61
+  getHospital() {
62
+    this.hosId = this.tool.getCurrentHospital().id;
63
+    this.getList(1);
64
+  }
65
+
66
+  // 打开搜索框
67
+  changeSearch(flag) {
68
+    if (flag) {
69
+      this.changeInp("no");
70
+    }
71
+  }
72
+  // 边输边搜节流阀
73
+  isLoading = false;
74
+  changeInp(dept) {
75
+    if (!dept) {
76
+      return;
77
+    }
78
+    if (dept === "no") {
79
+      dept = "";
80
+    }
81
+    this.isLoading = true;
82
+    this.changeInpSubject.next(dept);
83
+  }
84
+  // 搜索科室
85
+  searchDept(dept) {
86
+    let postData = {
87
+      department: {
88
+        searchType: 1,// 简单查询
89
+        cascadeHosId: this.hosId,
90
+        dept,
91
+      },
92
+      idx: 0,
93
+      sum: 10,
94
+    };
95
+    this.mainService
96
+      .getFetchDataList("data", "department", postData)
97
+      .subscribe((result) => {
98
+        if (result.status == 200) {
99
+          this.isLoading = false;
100
+          this.deptList = result.list;
101
+        }
102
+      });
103
+  }
104
+
105
+  // 表格数据
106
+  loading1 = false;
107
+  getList(type) {
108
+    if (type == 1) {
109
+      this.pageIndex = 1;
110
+    }
111
+    let postData: any = {
112
+      idx: this.pageIndex - 1,
113
+      sum: this.pageSize,
114
+      clothesWashing: {
115
+        hosId: this.hosId,
116
+        batchCode: this.searchCriteria.batchCode || undefined,
117
+      },
118
+    };
119
+    if (this.searchCriteria.relatedDept) {
120
+      postData.clothesWashing.relatedDept = { id: this.searchCriteria.relatedDept };
121
+    }
122
+    this.loading1 = true;
123
+    this.mainService
124
+      .getFetchDataList("simple/data", "clothesWashing", postData)
125
+      .subscribe((data) => {
126
+        this.loading1 = false;
127
+        if (data["status"] == 200) {
128
+          this.listOfData = data["list"];
129
+          this.listLength = data["totalNum"];
130
+        }
131
+      });
132
+  }
133
+}
134
+

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

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