Bladeren bron

被服视图

seimin 1 jaar geleden
bovenliggende
commit
0d95c7eb80

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

@@ -62,6 +62,11 @@ const routes: Routes = [
62 62
     loadChildren: () => import('./views/specimen-view2/specimen-view2.module').then(m => m.SpecimenView2Module),
63 63
     canActivate: [SpecimenView2Guard]
64 64
   },
65
+  // 洗涤批次视图
66
+  {
67
+    path: 'washingBatchView',
68
+    loadChildren: () => import('./views/washing-batch-view/washing-batch-view.module').then(m => m.WashingBatchViewModule),
69
+  },
65 70
   // 全局业务查看
66 71
   {
67 72
     path: 'disinfectionSupply',

+ 16 - 0
src/app/views/washing-batch-view/washing-batch-view-routing.module.ts

@@ -0,0 +1,16 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { WashingBatchViewComponent } from "./washing-batch-view.component";
4
+
5
+const routes: Routes = [
6
+  {
7
+    path: "",
8
+    component: WashingBatchViewComponent,
9
+  },
10
+];
11
+
12
+@NgModule({
13
+  imports: [RouterModule.forChild(routes)],
14
+  exports: [RouterModule],
15
+})
16
+export class WashingBatchViewRoutingModule {}

+ 60 - 0
src/app/views/washing-batch-view/washing-batch-view.component.html

@@ -0,0 +1,60 @@
1
+<div class="washingBatchView">
2
+  <!-- 头部 -->
3
+  <div class="head">
4
+    <div class="logo"><img [src]="tool.logoUrl" [alt]="tool.logoTitle"></div>
5
+    <div class="title">被服洗涤</div>
6
+  </div>
7
+  <!-- 主体 -->
8
+  <div class="main">
9
+    <div class="search top display_flex justify-content_space-between align-items_center">
10
+      <div class="flex_1 display_flex">
11
+        <div class="searchItem">
12
+          <span class="label">父级被服分类</span>:
13
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
14
+            nzPlaceHolder="请选择父级被服分类" [(ngModel)]="searchDto.parent">
15
+            <ng-container *ngFor="let data of parentList">
16
+              <nz-option [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
17
+            </ng-container>
18
+          </nz-select>
19
+        </div>
20
+        <div class="searchItem">
21
+          <span class="label">被服分类</span>:
22
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
23
+            nzPlaceHolder="请选择被服分类" [(ngModel)]="searchDto.child">
24
+            <ng-container *ngFor="let data of childList">
25
+              <nz-option [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
26
+            </ng-container>
27
+          </nz-select>
28
+        </div>
29
+      </div>
30
+      <div class="display_flex align-items_center">
31
+        <button nzType="primary" nz-button>搜索</button>
32
+        <button nzType="primary" nz-button>打印功能</button>
33
+        <button nzType="primary" nz-button>查看异常</button>
34
+        <button nzType="primary" nz-button>批量送回</button>
35
+      </div>
36
+    </div>
37
+    <div class="list">
38
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
39
+        [nzLoading]="loading" [nzScroll]="{ x: '100%', y: scrollY + 'px' }">
40
+        <thead>
41
+          <tr class="thead">
42
+            <th nzLeft="0px" nzAlign="center" nzWidth="50px" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
43
+              (nzCheckedChange)="checkAll($event)"></th>
44
+            <th [nzLeft]="first ? '50px' : null" [nzRight]="last ? '0px' : null" nzAlign="center" [nzWidth]="(first || last) ? '150px' : '70px'" *ngFor="let row of rows;let first = first;let last = last;">{{ row }}</th>
45
+          </tr>
46
+        </thead>
47
+        <tbody>
48
+          <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
49
+            <td nzLeft="0px" nzAlign="center" nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
50
+            <td [nzLeft]="first ? '50px' : null" [nzRight]="last ? '0px' : null" nzAlign="center" *ngFor="let row of data;let first = first;let last = last;">{{ row }}</td>
51
+          </tr>
52
+        </tbody>
53
+      </nz-table>
54
+    </div>
55
+    <div class="bottom">
56
+      <strong>总件数:1365件</strong>
57
+      <strong>总费用:4089.4元</strong>
58
+    </div>
59
+  </div>
60
+</div>

+ 113 - 0
src/app/views/washing-batch-view/washing-batch-view.component.less

@@ -0,0 +1,113 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  width: 100vw;
4
+  height: 100vh;
5
+  overflow: hidden;
6
+  background: #F9FAFB;
7
+  .washingBatchView{
8
+    height: 100%;
9
+    display: flex;
10
+    flex-direction: column;
11
+    // 头部
12
+    .head{
13
+      height: 130px;
14
+      background-color: #fff;
15
+      display: flex;
16
+      align-items: center;
17
+      .logo{
18
+        width: 300px;
19
+        height: 100%;
20
+        padding: 16px;
21
+        display: flex;
22
+        justify-content: center;
23
+        align-items: center;
24
+        border-right: 1px solid #E7E7E7;
25
+        img{
26
+          max-width: 100%;
27
+          max-height: 100%;
28
+        }
29
+      }
30
+
31
+      .title{
32
+        font-size: 30px;
33
+        font-weight: bold;
34
+        color: @primary-color;
35
+        margin-left: 30px;
36
+      }
37
+    }
38
+
39
+    // 主体
40
+    .main{
41
+      margin: 20px;
42
+      background-color: #fff;
43
+      border: 1px solid #E3E3E3;
44
+      flex: 1;
45
+      display: flex;
46
+      flex-direction: column;
47
+
48
+      .search{
49
+        height: 75px;
50
+        &.top {
51
+          height: 74px;
52
+          padding: 0 16px;
53
+          line-height: 74px;
54
+          border-bottom: 1px solid #e5e9ed;
55
+          position: relative;
56
+          z-index: 2;
57
+
58
+          & > div {
59
+            input {
60
+              width: 224px;
61
+            }
62
+
63
+            button {
64
+              margin-left: 8px;
65
+              width: 117px;
66
+              height: 45px;
67
+              font-size: 20px;
68
+            }
69
+          }
70
+        }
71
+        .searchItem {
72
+          font-size: 20px;
73
+          .label {
74
+            margin-left: 16px;
75
+            color: #333;
76
+            display: inline-block;
77
+            text-align-last: justify;
78
+            text-align: justify;
79
+          }
80
+          .formItem {
81
+            width: 150px;
82
+            font-size: 18px;
83
+          }
84
+        }
85
+      }
86
+      .list{
87
+        flex: 1;
88
+        th{
89
+          background-color: #7FD98A!important;
90
+          color: #fff!important;
91
+          font-size: 22px;
92
+        }
93
+        td{
94
+          font-size: 20px;
95
+          &:first-of-type{
96
+            font-size: 22px;
97
+          }
98
+        }
99
+      }
100
+      .bottom{
101
+        height: 90px;
102
+        padding-top: 20px;
103
+        display: flex;
104
+        justify-content: flex-end;
105
+        strong{
106
+          font-size: 22px;
107
+          margin-right: 25px;
108
+          color: @primary-color;
109
+        }
110
+      }
111
+    }
112
+  }
113
+}

+ 142 - 0
src/app/views/washing-batch-view/washing-batch-view.component.ts

@@ -0,0 +1,142 @@
1
+import { Component, OnInit, AfterViewInit, HostListener } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { fromEvent } from 'rxjs';
4
+import { MainService } from 'src/app/services/main.service';
5
+
6
+@Component({
7
+  selector: "app-washing-batch-view",
8
+  templateUrl: "./washing-batch-view.component.html",
9
+  styleUrls: ["./washing-batch-view.component.less"],
10
+})
11
+export class WashingBatchViewComponent implements OnInit, AfterViewInit {
12
+  constructor(
13
+    public tool: ToolService,
14
+    private mainService: MainService,
15
+  ){}
16
+
17
+  ngOnInit() {
18
+    this.hosId = this.tool.getCurrentHospital().id;
19
+    this.getParentList();
20
+    this.getChildList();
21
+  }
22
+
23
+  ngAfterViewInit(){
24
+    this.resizeInit();
25
+  }
26
+  _timer = null;
27
+  @HostListener('window:resize')
28
+  resizeInit(){
29
+    clearTimeout(this._timer);
30
+    this._timer = setTimeout(() => {
31
+      this.scrollY = window.innerHeight - 383;
32
+    }, 500)
33
+  }
34
+
35
+  listOfData: any[] = [
36
+    ['眼科康复科睡', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
37
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
38
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
39
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
40
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
41
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
42
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
43
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
44
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
45
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
46
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
47
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
48
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
49
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
50
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
51
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
52
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
53
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
54
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
55
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
56
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
57
+    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
58
+  ]; //表格数据
59
+  loading:boolean = false;
60
+  isAllDisplayDataChecked = false; //当前页是否全选
61
+  mapOfCheckedId: { [key: string]: boolean } = {};
62
+  checkedDepIds = []; //已选中单列id
63
+  scrollY:number = 0;
64
+  hosId:any;
65
+  searchDto:any = {
66
+    parent: null,
67
+  }
68
+  parentList: Array<any> = []; //父级分类数据字典信息
69
+  childList: Array<any> = []; //分类数据字典信息
70
+  rows:any[] = ['', '双单', '洗手衣上', '大包布', '中包布', '隔离衣', '无菌巾', '小洞巾', '大洞巾', '小毛巾', '病员服', '仪器套', '裤腿', '床套', '沙发套', '窗帘', '隔帘', '浴巾', '件数', '费用/元'];
71
+
72
+  // 全选
73
+  checkAll(value: boolean): void {
74
+    this.listOfData.forEach((item) => {
75
+      this.mapOfCheckedId[item.id] = value;
76
+    });
77
+    this.refreshStatus();
78
+  }
79
+
80
+  // 单选
81
+  refreshStatus(): void {
82
+    this.isAllDisplayDataChecked = this.listOfData.every(
83
+      (item) => this.mapOfCheckedId[item.id]
84
+    );
85
+    let arr = [];
86
+    for (var k in this.mapOfCheckedId) {
87
+      if (this.mapOfCheckedId[k]) {
88
+        arr.push(Number(k));
89
+      }
90
+    }
91
+    this.checkedDepIds = arr;
92
+  }
93
+
94
+  // 整行操作
95
+  selectedListData(data) {
96
+    this.mapOfCheckedId[data.id] = !this.mapOfCheckedId[data.id];
97
+    this.refreshStatus();
98
+  }
99
+
100
+  // 获取父级分类
101
+  getParentList() {
102
+    let postData = {
103
+      idx: 0,
104
+      sum: 9999,
105
+      dictionaryTree: {
106
+        hosId: this.hosId,
107
+        level: 1,
108
+        key: 'clothes_type_parent',
109
+        deleted: 0,
110
+      },
111
+    };
112
+    this.mainService
113
+      .getFetchDataList("simple/data", "dictionaryTree", postData)
114
+      .subscribe((result) => {
115
+        if(result.status == 200){
116
+          this.parentList = result.list || [];
117
+        }
118
+      });
119
+  }
120
+
121
+  // 获取分类
122
+  getChildList() {
123
+    let postData = {
124
+      idx: 0,
125
+      sum: 9999,
126
+      dictionaryTree: {
127
+        hosId: this.hosId,
128
+        level: 2,
129
+        key: 'clothes_type',
130
+        deleted: 0,
131
+      },
132
+    };
133
+    this.mainService
134
+      .getFetchDataList("simple/data", "dictionaryTree", postData)
135
+      .subscribe((result) => {
136
+        if(result.status == 200){
137
+          this.childList = result.list || [];
138
+        }
139
+      });
140
+  }
141
+}
142
+

+ 17 - 0
src/app/views/washing-batch-view/washing-batch-view.module.ts

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