瀏覽代碼

被服洗涤数据字典和页面控制

seimin 1 年之前
父節點
當前提交
ce2ac10581
共有 26 個文件被更改,包括 3870 次插入517 次删除
  1. 1 1
      proxy.conf.json
  2. 2 2
      src/app/views/building-floor/building-floor.component.html
  3. 1 1
      src/app/views/building-floor/building-floor.component.ts
  4. 0 14
      src/app/views/data-building/data-building-routing.module.ts
  5. 0 28
      src/app/views/data-building/data-building.component.html
  6. 0 130
      src/app/views/data-building/data-building.component.less
  7. 0 222
      src/app/views/data-building/data-building.component.ts
  8. 0 19
      src/app/views/data-building/data-building.module.ts
  9. 0 18
      src/app/views/data-dictionary/data-dictionary-routing.module.ts
  10. 132 11
      src/app/views/data-dictionary/data-dictionary.component.html
  11. 264 40
      src/app/views/data-dictionary/data-dictionary.component.less
  12. 262 29
      src/app/views/data-dictionary/data-dictionary.component.ts
  13. 11 1
      src/app/views/main/main-routing.module.ts
  14. 14 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control-routing.module.ts
  15. 69 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.html
  16. 1251 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.less
  17. 193 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.ts
  18. 19 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.module.ts
  19. 52 0
      src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.service.ts
  20. 14 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control-routing.module.ts
  21. 69 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.html
  22. 1251 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.less
  23. 193 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.ts
  24. 19 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.module.ts
  25. 52 0
      src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.service.ts
  26. 1 1
      src/main.ts

+ 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.4.223",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 2 - 2
src/app/views/building-floor/building-floor.component.html

@@ -50,8 +50,8 @@
50 50
               (nzCheckedChange)="refreshStatus()"></td>
51 51
             <td>{{ data.floorName }}</td>
52 52
             <td>
53
-              <button nz-button nzType="primary" nzSize="small" (click)="showFloorModal($event,'edit',data)">编辑</button>
54
-              <button nz-button nzType="primary" nzSize="small" class="ml8"
53
+              <button nz-button nzType="primary" *ngIf="coopBtns.edit" nzSize="small" (click)="showFloorModal($event,'edit',data)">编辑</button>
54
+              <button nz-button nzType="primary" *ngIf="coopBtns.del" nzSize="small" class="ml8"
55 55
                 (click)="showDelFloorModal($event,data)">删除</button>
56 56
             </td>
57 57
           </tr>

+ 1 - 1
src/app/views/building-floor/building-floor.component.ts

@@ -63,7 +63,7 @@ export class BuildingFloorComponent implements OnInit {
63 63
     this.coopBtns = this.tool.initCoopBtns(this.route);
64 64
     this.hosId = this.tool.getCurrentHospital().id;
65 65
     this.getBuildingList();
66
-    this.tableHeight = document.body.clientHeight - 267;
66
+    this.tableHeight = document.body.clientHeight - 312;
67 67
   }
68 68
 
69 69
   // 楼栋列表

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

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

+ 0 - 28
src/app/views/data-building/data-building.component.html

@@ -1,28 +0,0 @@
1
-<div class="dataBuilding" *ngIf="!loading1">
2
-  <overlay-scrollbars #osComponentRef1 class="dataBuilding-mainBox">
3
-    <div class="dataBuilding-main" [ngStyle]="{width:mainWidth}">
4
-      <div class="ipt" *ngFor="let item of buildingList">
5
-        <input nz-input placeholder="请输入楼栋" [(ngModel)]="item.buildingName" />
6
-        <i class="icon_transport transport-lajitong" (click)="delete(item)" *ngIf="coopBtns.del"></i>
7
-      </div>
8
-      <button nz-button class="add" nzType="primary" (click)="add()" [disabled]="!coopBtns.add">新增</button>
9
-    </div>
10
-  </overlay-scrollbars>
11
-  <div class="dataBuilding-submit">
12
-    <button nz-button nzType="primary" (click)="save()" [nzLoading]="loading3" [disabled]="!coopBtns.edit">保存</button>
13
-  </div>
14
-</div>
15
-<div style="height: 100%;" class="loadingFull display_flex justify-content_flex-center align-items_center"
16
-  *ngIf="loading1">
17
-  <div class="loadingFullInner">
18
-    <img src="../../../assets/images/loading.gif" alt="">
19
-    <div>加载中...</div>
20
-  </div>
21
-</div>
22
-<!-- 操作成功/失败提示框 -->
23
-<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
24
-  [info]="promptInfo">
25
-</app-prompt-modal>
26
-<!-- 删除模态框 -->
27
-<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="loading2"
28
-  (confirmDelEvent)="confirmDel()" [content]="tipsMsg1" [tips]="tips"></app-dialog-delete>

+ 0 - 130
src/app/views/data-building/data-building.component.less

@@ -1,130 +0,0 @@
1
-.dataBuilding {
2
-  height: 100%;
3
-  display: flex;
4
-  flex-direction: column;
5
-  .dataBuilding-mainBox {
6
-    flex: 1;
7
-    .dataBuilding-main {
8
-      margin: 0 auto;
9
-      display: flex;
10
-      flex-wrap: wrap;
11
-      align-content: flex-start;
12
-      position: relative;
13
-      .add {
14
-        width: 80px;
15
-        height: 28px;
16
-        margin: 24px;
17
-      }
18
-      .ipt {
19
-        width: 312px;
20
-        height: 34px;
21
-        margin: 24px 24px 0;
22
-        display: flex;
23
-        justify-content: center;
24
-        align-items: center;
25
-        input {
26
-          height: 100%;
27
-        }
28
-        i {
29
-          font-size: 20px;
30
-          cursor: pointer;
31
-        }
32
-      }
33
-    }
34
-  }
35
-  .dataBuilding-submit {
36
-    height: 65px;
37
-    border-top: 1px solid #e5e9ed;
38
-    display: flex;
39
-    justify-content: center;
40
-    align-items: center;
41
-  }
42
-}
43
-.save {
44
-  position: fixed;
45
-  left: 0;
46
-  top: 0;
47
-  width: 100%;
48
-  height: 100%;
49
-  background: rgba(0, 0, 0, 0.4);
50
-  z-index: 99;
51
-
52
-  .modalBody {
53
-    width: 350px;
54
-    height: 220px;
55
-    background: #fff;
56
-    border-radius: 5px;
57
-    padding: 10px 20px;
58
-    color: #333;
59
-
60
-    .title {
61
-      width: 100%;
62
-      text-align: center;
63
-      font-size: 18px;
64
-      position: relative;
65
-
66
-      i {
67
-        position: absolute;
68
-        right: 0;
69
-        top: 0;
70
-        font-size: 20px;
71
-        color: #666;
72
-        cursor: pointer;
73
-        padding: 0 5px;
74
-      }
75
-    }
76
-
77
-    .content {
78
-      width: 310px;
79
-      height: 117px;
80
-      background: #f9fafb;
81
-      border: 1px solid #e5e9ed;
82
-      border-radius: 5px;
83
-      overflow: hidden;
84
-      margin-top: 12px;
85
-
86
-      & > div {
87
-        text-align: center;
88
-        margin: 0;
89
-
90
-        &.icon {
91
-          margin-top: 17px;
92
-
93
-          i {
94
-            color: #34b349;
95
-            font-size: 30px !important;
96
-
97
-            &.transport-wenhao {
98
-              color: #f5a523;
99
-            }
100
-
101
-            &.transport-shibai {
102
-              color: #ff3a52;
103
-            }
104
-          }
105
-        }
106
-
107
-        &.defeat {
108
-          color: #333;
109
-          font-size: 18px;
110
-        }
111
-
112
-        &:nth-child(3) {
113
-          font-size: 14px;
114
-          color: #666;
115
-        }
116
-      }
117
-      .roundRobinTips {
118
-        font-size: 12px;
119
-      }
120
-    }
121
-
122
-    button {
123
-      margin-top: 10px;
124
-
125
-      &.btn {
126
-        margin-left: 8px;
127
-      }
128
-    }
129
-  }
130
-}

+ 0 - 222
src/app/views/data-building/data-building.component.ts

@@ -1,222 +0,0 @@
1
-import { Component, OnInit, ViewChild } from "@angular/core";
2
-import { ActivatedRoute, ParamMap } from "@angular/router";
3
-import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
-import { MainService } from "../../services/main.service";
5
-import { ToolService } from "../../services/tool.service";
6
-
7
-@Component({
8
-  selector: "app-data-building",
9
-  templateUrl: "./data-building.component.html",
10
-  styleUrls: ["./data-building.component.less"],
11
-})
12
-export class DataBuildingComponent implements OnInit {
13
-  @ViewChild("osComponentRef1", {
14
-    read: OverlayScrollbarsComponent,
15
-    static: false,
16
-  })
17
-  osComponentRef1: OverlayScrollbarsComponent;
18
-  hosId: any; //院区id
19
-  loading1 = false; //获取楼栋信息列表加载状态
20
-  loading3 = false; //保存
21
-  id: number = 0; //自定义id,负整数
22
-  buildingList: Array<any> = []; //楼栋信息列表
23
-  promptContent: string; //操作提示框提示信息
24
-  ifSuccess: boolean; //操作成功/失败
25
-  promptInfo: string; //操作结果提示信息
26
-  promptModalShow: boolean; //操作提示框是否展示
27
-  delModal: boolean = false; //删除模态框
28
-  tipsMsg1: string; //提示框信息
29
-  tips: string; //提示框信息(附注)
30
-  coop: any; //当前操作列
31
-  loading2 = false; //删除接口
32
-  mainWidth: any = "100%";
33
-  coopBtns = {};
34
-  constructor(
35
-    private mainService: MainService,
36
-    private route: ActivatedRoute,
37
-    private tool: ToolService
38
-  ) {}
39
-  ngOnInit() {
40
-    this.route.queryParamMap.subscribe((params: ParamMap) => {
41
-      this.hosId = params.get("id");
42
-      if (!this.hosId) {
43
-        this.hosId = this.tool.getCurrentHospital().id;
44
-      }
45
-      this.getBuildingList();
46
-    });
47
-    this.coopBtns = this.tool.initCoopBtns("dataDictionary");
48
-    this.changeSize();
49
-    window.addEventListener("resize", () => {
50
-      this.changeSize();
51
-    });
52
-  }
53
-  // 改变窗口大小
54
-  changeSize() {
55
-    let w = window.innerWidth - 582; //屏幕宽-其他元素宽度
56
-    this.mainWidth = Math.floor(w / 360) * 360 + "px";
57
-  }
58
-  // 新增
59
-  add() {
60
-    this.buildingList.push({ id: --this.id, buildingName: "" });
61
-  }
62
-  // 删除
63
-  delete(data) {
64
-    this.showDelModal(
65
-      data,
66
-      "您确认要删除此楼栋吗?",
67
-      "删除后对应的楼栋积分配置也会删除"
68
-    );
69
-  }
70
-  // 删除楼栋
71
-  showDelModal(data: any, tipsMsg1: string, tips?) {
72
-    this.delModal = true;
73
-    this.coop = data;
74
-    this.tipsMsg1 = tipsMsg1;
75
-    this.tips = tips ? tips : "";
76
-  }
77
-  // 隐藏删除框
78
-  hideDelModal() {
79
-    this.delModal = false;
80
-  }
81
-  // 确认删除
82
-  confirmDel() {
83
-    this.loading2 = true;
84
-    if (this.coop.id > 0) {
85
-      //接口删除
86
-      let postData = [this.coop.id];
87
-      this.mainService.delBuildingList(postData).subscribe(
88
-        (result) => {
89
-          this.loading2 = false;
90
-          this.delModal = false;
91
-          if (result["status"] == 200 && !result["data"][0].msg) {
92
-            this.showPromptModal("删除", true, "", false);
93
-            // 过滤掉当前这一条
94
-            this.buildingList = this.buildingList.filter(
95
-              (item) => item.id !== this.coop.id
96
-            );
97
-          } else {
98
-            this.showPromptModal("删除", false, result["data"][0].msg, false);
99
-          }
100
-        },
101
-        (err) => {
102
-          this.loading2 = false;
103
-          this.delModal = false;
104
-          this.showPromptModal("删除", false, "", false);
105
-        }
106
-      );
107
-    } else {
108
-      this.loading2 = false;
109
-      this.delModal = false;
110
-      this.showPromptModal("删除", true, "", false);
111
-      // 过滤掉当前这一条
112
-      this.buildingList = this.buildingList.filter(
113
-        (item) => item.id !== this.coop.id
114
-      );
115
-    }
116
-  }
117
-  // 保存
118
-  save() {
119
-    let arr = []; //排查是否有重复的名称的容器
120
-    let arrStr = ""; //重复名称
121
-    // 过滤空值
122
-    this.buildingList = this.buildingList.filter((item) => {
123
-      return item.buildingName !== "";
124
-    });
125
-    // 数据处理
126
-    let postData = JSON.parse(JSON.stringify(this.buildingList));
127
-    postData.forEach((item) => {
128
-      arr.push(item.buildingName);
129
-      item.deleted = false;
130
-      item.hosId = this.hosId;
131
-      if (item.id < 0) {
132
-        delete item.id;
133
-      }
134
-    });
135
-    if (arr.length > 1) {
136
-      arr.sort();
137
-      for (let i = 0; i < arr.length - 1; i++) {
138
-        if (arr[i] === arr[i + 1]) {
139
-          arrStr += `【${arr[i]}】,`;
140
-        }
141
-      }
142
-    }
143
-    if (arrStr) {
144
-      //有重复名称
145
-      arrStr = [...new Set(arrStr.split(","))].join(); //去重
146
-      this.showPromptModal(
147
-        "保存",
148
-        false,
149
-        `存在重复的楼栋名称${arrStr}请修改后再保存!`,
150
-        false
151
-      );
152
-    } else {
153
-      this.loading3 = true;
154
-      this.mainService.saveBuildingList(postData).subscribe(
155
-        (result) => {
156
-          this.loading3 = false;
157
-          if (result["status"] == 200) {
158
-            this.showPromptModal("保存", true, "");
159
-          } else {
160
-            this.showPromptModal("保存", false, result["msg"]);
161
-          }
162
-        },
163
-        (err) => {
164
-          this.loading3 = false;
165
-          this.showPromptModal("保存", false, "");
166
-        }
167
-      );
168
-    }
169
-  }
170
-  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
171
-  showPromptModal(con, success, promptInfo, isRefresh = true) {
172
-    this.promptModalShow = false;
173
-    this.promptContent = con;
174
-    this.ifSuccess = success;
175
-    this.promptInfo = promptInfo;
176
-    setTimeout(() => {
177
-      this.promptModalShow = true;
178
-    }, 100);
179
-    if (isRefresh) {
180
-      this.getBuildingList();
181
-    }
182
-  }
183
-  // 获取楼栋信息列表
184
-  getBuildingList() {
185
-    this.loading1 = true;
186
-    this.mainService
187
-      .getFetchDataList("simple/data", "building", {
188
-        idx: 0,
189
-        sum: 9999,
190
-        building: { hosId: this.hosId },
191
-      })
192
-      .subscribe((result) => {
193
-        this.loading1 = false;
194
-        if (result["status"] == 200) {
195
-          if (
196
-            result["list"] &&
197
-            Array.isArray(result["list"]) &&
198
-            result["list"].length < 6
199
-          ) {
200
-            let arr = result["list"];
201
-            let len = 6 - arr.length;
202
-            for (let i = 0; i < len; i++) {
203
-              arr.push({ id: --this.id, buildingName: "" });
204
-            }
205
-            this.buildingList = arr;
206
-          } else if (
207
-            result["list"] &&
208
-            Array.isArray(result["list"]) &&
209
-            result["list"].length >= 6
210
-          ) {
211
-            this.buildingList = result["list"];
212
-          } else {
213
-            let arr = [];
214
-            for (let i = 0; i < 6; i++) {
215
-              arr.push({ id: --this.id, buildingName: "" });
216
-            }
217
-            this.buildingList = arr;
218
-          }
219
-        }
220
-      });
221
-  }
222
-}

+ 0 - 19
src/app/views/data-building/data-building.module.ts

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

+ 0 - 18
src/app/views/data-dictionary/data-dictionary-routing.module.ts

@@ -7,24 +7,6 @@ const routes: Routes = [
7 7
   {
8 8
     path: '',
9 9
     component: DataDictionaryComponent,
10
-    children: [
11
-      {
12
-        // 默认
13
-        path: '',
14
-        redirectTo: 'dataBuilding',
15
-        pathMatch: 'full'
16
-      },
17
-      {
18
-        // 楼栋
19
-        path: 'dataBuilding',
20
-        loadChildren: () => import('../data-building/data-building.module').then(m => m.DataBuildingModule),
21
-      },
22
-      {
23
-        // 楼层
24
-        path: 'dataFloor',
25
-        loadChildren: () => import('../data-floor/data-floor.module').then(m => m.DataFloorModule),
26
-      }
27
-    ]
28 10
    }
29 11
 ];
30 12
 

+ 132 - 11
src/app/views/data-dictionary/data-dictionary.component.html

@@ -1,15 +1,136 @@
1
-<div class="dataDictionary">
2
-  <div class="nav">
3
-    <div class="nav-title">
4
-      <span>数据字典</span>
5
-    </div>
6
-    <div *ngFor="let item of navList;let index = index;" class="nav-menu" [routerLink]="item.url"
7
-      (click)="selectedNav(index)" [class.active]="currentIndex==index">
8
-      {{item.name}}</div>
1
+<div class="groupManagement">
2
+  <div class="groupInfo">
3
+    <div class="title">数据字典</div>
4
+    <div class="groups" [ngStyle]="{display:!dictionaryLoading?'block':'none'}">
5
+      <overlay-scrollbars #osComponentRef1 [ngStyle]="{ height:'100%' }">
6
+        <div [ngClass]="{'item':true,'checked':data.id == checkedDictionary.id}" *ngFor="let data of dictionaryList"
7
+          (click)="checkDictionary(data)" [title]="data.dictionaryName">{{data.dictionaryName}}</div>
8
+      </overlay-scrollbars>
9
+    </div>
10
+    <div class="groups" *ngIf="dictionaryLoading">
11
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
12
+        <div class="loadingFullInner">
13
+          <img src="../../../assets/images/loading.gif" alt="">
14
+          <div>加载中...</div>
15
+        </div>
16
+      </div>
17
+    </div>
18
+  </div>
19
+  <div class="userInfo">
20
+    <div class="top display_flex justify-content_flex-end align-items_center">
21
+      <div class="display_flex align-items_center">
22
+        <span>已选择 {{selectedDictionary.length}} 个</span>
23
+        <button class="btn default" *ngIf="coopBtns.add&&dictionaryList.length" nzType="primary" nz-button
24
+          (click)="showModal($event,'add')">新增</button>
25
+        <button class="btn default" *ngIf="coopBtns.del&&dictionaryList.length" nzType="primary" nz-button
26
+          (click)="showDelDictionaryModal($event)" [disabled]="allDataList.length===0">批量删除</button>
27
+      </div>
28
+    </div>
29
+    <div class="table" *ngIf="!dictionaryLoading">
30
+      <nz-table class="groupManagementTable" #rowSelectionTable [nzPageSize]="9999" [nzData]="allDataList"
31
+        [nzShowPagination]="false" [nzScroll]="{ y: tableHeight+'px' }" [nzLoading]="dictionaryLoading">
32
+        <thead>
33
+          <tr class="thead">
34
+            <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
35
+              (nzCheckedChange)="checkAll($event)"></th>
36
+            <th nzWidth="15%">名称</th>
37
+            <th nzWidth="10%">值</th>
38
+            <th nzWidth="10%">排序号</th>
39
+            <th nzWidth="10%">单价</th>
40
+            <th nzWidth="30%">附加说明</th>
41
+            <th nzWidth="20%">操作</th>
42
+          </tr>
43
+        </thead>
44
+        <tbody>
45
+          <tr *ngFor="let data of rowSelectionTable.data" (click)="selectedUser(data)">
46
+            <td nzShowCheckbox [(nzDisabled)]="!coopBtns.edit" [(nzChecked)]="mapOfCheckedId[data.id]"
47
+              (nzCheckedChange)="refreshStatus()"></td>
48
+            <td>{{ data.name }}</td>
49
+            <td>{{ data.value }}</td>
50
+            <td>{{ data.orders }}</td>
51
+            <td>{{ data.extra3 }}</td>
52
+            <td>{{ data.desc }}</td>
53
+            <td>
54
+              <button nz-button nzType="primary" *ngIf="coopBtns.edit" nzSize="small" (click)="showModal($event,'edit',data)">编辑</button>
55
+              <button nz-button nzType="primary" *ngIf="coopBtns.del" nzSize="small" class="ml8"
56
+                (click)="showDelDictionaryModal($event,data)">删除</button>
57
+            </td>
58
+          </tr>
59
+        </tbody>
60
+      </nz-table>
61
+    </div>
9 62
   </div>
10
-  <div class="main">
11
-    <div class="main-box">
12
-      <router-outlet></router-outlet>
63
+
64
+  <!-- 新增/编辑模态框 -->
65
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="dictionaryModal">
66
+    <div class="modalBody">
67
+      <div class="title">{{add?'新增':'编辑'}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
68
+      </div>
69
+      <div class="content">
70
+        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
71
+          <nz-form-item>
72
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="key">数据字典</nz-form-label>
73
+            <nz-form-control nzErrorTip="请选择数据字典!">
74
+              <nz-select formControlName="key" nzPlaceHolder="请选择数据字典" nzDisabled>
75
+                <nz-option *ngFor="let option of dictionaryList" [nzLabel]="option.dictionaryName" [nzValue]="option.key">
76
+                </nz-option>
77
+              </nz-select>
78
+            </nz-form-control>
79
+          </nz-form-item>
80
+          <nz-form-item>
81
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">名称</nz-form-label>
82
+            <nz-form-control nzErrorTip="请输入名称!">
83
+              <nz-input-group>
84
+                <input nz-input formControlName="name" placeholder="请输入名称" />
85
+              </nz-input-group>
86
+            </nz-form-control>
87
+          </nz-form-item>
88
+          <nz-form-item>
89
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="value">值</nz-form-label>
90
+            <nz-form-control nzErrorTip="请输入值!">
91
+              <nz-input-group>
92
+                <input nz-input formControlName="value" placeholder="请输入值" />
93
+              </nz-input-group>
94
+            </nz-form-control>
95
+          </nz-form-item>
96
+          <nz-form-item>
97
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="orders">排序号</nz-form-label>
98
+            <nz-form-control nzErrorTip="请输入排序号!">
99
+              <nz-input-group>
100
+                <nz-input-number formControlName="orders" placeholder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
101
+              </nz-input-group>
102
+            </nz-form-control>
103
+          </nz-form-item>
104
+          <nz-form-item>
105
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="extra3">单价</nz-form-label>
106
+            <nz-form-control nzErrorTip="请输入单价!">
107
+              <nz-input-group>
108
+                <nz-input-number formControlName="extra3" placeholder="请输入单价" [nzMin]="0" [nzStep]="1" [nzPrecision]="2"></nz-input-number>
109
+              </nz-input-group>
110
+            </nz-form-control>
111
+          </nz-form-item>
112
+          <nz-form-item>
113
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="desc">附加说明</nz-form-label>
114
+            <nz-form-control nzErrorTip="请输入附加说明!">
115
+              <nz-input-group>
116
+                <input nz-input formControlName="desc" placeholder="请输入附加说明" />
117
+              </nz-input-group>
118
+            </nz-form-control>
119
+          </nz-form-item>
120
+        </form>
121
+      </div>
122
+      <div class="display_flex justify-content_flex-center">
123
+        <button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">确认</button>
124
+        <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
125
+      </div>
13 126
     </div>
14 127
   </div>
128
+  <!-- 删除模态框 -->
129
+  <app-dialog-delete [delModal]="delDictionaryModal" (hideDelModalEvent)="hideDelDictionaryModal()" [btnLoading]="btnLoading"
130
+    (confirmDelEvent)="confirmDictionaryDel()" content="您确认要删除吗?"></app-dialog-delete>
15 131
 </div>
132
+
133
+<!-- 操作成功/失败提示框 -->
134
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
135
+  [info]="promptInfo">
136
+</app-prompt-modal>

+ 264 - 40
src/app/views/data-dictionary/data-dictionary.component.less

@@ -1,57 +1,281 @@
1 1
 @import "../../../../src/theme.less";
2
-.dataDictionary {
3
-  padding: 16px;
4
-  height: calc(100vh - 88px);
5
-  display: flex;
6
-  background-color: #f9fafb;
7
-  .nav {
8
-    width: 280px;
2
+:host {
3
+  width: 100%;
4
+  height: 100%;
5
+}
6
+
7
+.groupManagement {
8
+  width: 100%;
9
+  height: 100%;
10
+  background: #f9fafb;
11
+  padding: 16px 20px;
12
+  min-height: 532px;
13
+  overflow: hidden;
14
+
15
+  .groupInfo {
16
+    float: left;
17
+    width: 24%;
18
+    height: 100%;
19
+    min-height: calc(100vh - 120px);
9 20
     border: 1px solid #e5e9ed;
10
-    border-radius: 1px;
11
-    font-size: 14px;
21
+    background: #fff;
12 22
     color: #333;
13
-    background-color: #fff;
14
-    .nav-title {
15
-      padding-left: 16px;
23
+    font-size: 14px;
24
+    position: relative;
25
+    overflow: hidden;
26
+
27
+    .title {
28
+      width: 100%;
16 29
       height: 40px;
17 30
       line-height: 40px;
31
+      padding-left: 16px;
18 32
       border-bottom: 1px solid #e5e9ed;
19
-      display: flex;
20
-      align-items: center;
21
-      justify-content: space-between;
22
-      .selectHospital{
23
-        width: 140px;
24
-        margin-right: 8px;
33
+      position: relative;
34
+      background: #fff;
35
+      z-index: 2;
36
+    }
37
+
38
+    .operate {
39
+      width: 100%;
40
+      border-bottom: 1px solid #e5e9ed;
41
+      position: relative;
42
+      background: #fff;
43
+      z-index: 2;
44
+
45
+      .item {
46
+        display: inline-block;
47
+        width: 33.33%;
48
+        height: 34px;
49
+        line-height: 34px;
50
+        border-right: 1px solid #e5e9ed;
51
+        text-align: center;
52
+        color: #666;
53
+        cursor: pointer;
54
+
55
+        &:nth-last-child(1) {
56
+          border: none;
57
+        }
25 58
       }
26 59
     }
27
-    .nav-menu {
28
-      height: 34px;
29
-      line-height: 34px;
30
-      text-align: center;
31
-      cursor: pointer;
32
-      &.active,
33
-      &:active {
34
-        background-color: #f0f6ed;
35
-        color: @primary-color;
36
-        outline: none;
60
+
61
+    .groups {
62
+      width: 100%;
63
+      height: 100%;
64
+      position: absolute;
65
+      top: 0;
66
+      padding-top: 40px;
67
+      overflow-y: auto;
68
+      z-index: 1;
69
+
70
+      .item {
71
+        width: 100%;
72
+        height: 34px;
73
+        line-height: 34px;
74
+        text-align: center;
75
+        cursor: pointer;
76
+        overflow: hidden;
77
+        text-overflow: ellipsis;
78
+        white-space: nowrap;
79
+
80
+        &:hover {
81
+          color: @primary-color;
82
+          background: #f0f6ed;
83
+        }
84
+
85
+        &.checked {
86
+          color: @primary-color;
87
+          background: #f0f6ed;
88
+        }
37 89
       }
38 90
     }
39 91
   }
40
-  .main {
41
-    flex: 1;
42
-    margin-left: 16px;
43
-    border: 1px solid #dde1e5;
44
-    border-radius: 1px;
45
-    background-color: #fff;
46
-    padding: 16px;
92
+
93
+  .userInfo {
94
+    float: right;
95
+    width: 74%;
96
+    height: 100%;
97
+    min-height: calc(100vh - 120px);
98
+    border: 1px solid #e5e9ed;
99
+    background: #fff;
100
+    color: #333;
47 101
     position: relative;
48
-    .main-box {
49
-      position: absolute;
102
+
103
+    .top {
104
+      height: 74px;
105
+      padding: 0 16px;
106
+      line-height: 74px;
107
+      border-bottom: 1px solid #e5e9ed;
108
+      position: relative;
109
+      z-index: 2;
110
+
111
+      & > div {
112
+        input {
113
+          width: 224px;
114
+        }
115
+
116
+        button {
117
+          margin-left: 8px;
118
+        }
119
+      }
120
+    }
121
+
122
+    .table {
50 123
       width: 100%;
51 124
       height: 100%;
52
-      background-color: #f9fafb;
53
-      border: 1px solid #e5e9ed;
54
-      border-radius: 8px;
125
+      padding: 15px;
126
+      position: absolute;
127
+      top: 0;
128
+      padding-top: 90px;
129
+
130
+      .groupManagementTable {
131
+        border-radius: 5px;
132
+        padding: 16px;
133
+        background: #f9fafb;
134
+        border: 1px solid #e5e9ed;
135
+        .thead th {
136
+          text-align: center;
137
+        }
138
+
139
+        .ant-table-tbody {
140
+          tr {
141
+            td {
142
+              text-align: center;
143
+            }
144
+          }
145
+
146
+          tr:nth-child(2n-1) {
147
+            background: #f9fafb;
148
+          }
149
+        }
150
+      }
151
+    }
152
+  }
153
+
154
+  .save {
155
+    position: fixed;
156
+    left: 0;
157
+    top: 0;
158
+    width: 100%;
159
+    height: 100%;
160
+    background: rgba(0, 0, 0, 0.4);
161
+    z-index: 99;
162
+
163
+    .modalBody {
164
+      width: 350px;
165
+      height: 220px;
166
+      background: #fff;
167
+      border-radius: 5px;
168
+      padding: 10px 20px;
169
+      color: #333;
170
+
171
+      .title {
172
+        width: 100%;
173
+        text-align: center;
174
+        font-size: 18px;
175
+        position: relative;
176
+
177
+        i {
178
+          position: absolute;
179
+          right: 0;
180
+          top: 0;
181
+          font-size: 20px;
182
+          color: #666;
183
+          cursor: pointer;
184
+          padding: 0 5px;
185
+        }
186
+      }
187
+
188
+      .content {
189
+        width: 310px;
190
+        height: 117px;
191
+        background: #f9fafb;
192
+        border: 1px solid #e5e9ed;
193
+        border-radius: 5px;
194
+        overflow: hidden;
195
+        margin-top: 12px;
196
+
197
+        div {
198
+          text-align: center;
199
+          margin: 0;
200
+
201
+          &.icon {
202
+            margin-top: 17px;
203
+
204
+            i {
205
+              color: #34b349;
206
+              font-size: 30px !important;
207
+
208
+              &.transport-wenhao {
209
+                color: #f5a523;
210
+              }
211
+
212
+              &.transport-shibai {
213
+                color: #ff3a52;
214
+              }
215
+            }
216
+          }
217
+
218
+          &.defeat {
219
+            color: #333;
220
+            font-size: 18px;
221
+          }
222
+
223
+          &:nth-child(3) {
224
+            font-size: 14px;
225
+            color: #666;
226
+          }
227
+        }
228
+      }
229
+
230
+      button {
231
+        margin-top: 10px;
232
+
233
+        &.btn {
234
+          margin-left: 8px;
235
+        }
236
+      }
237
+    }
238
+
239
+    // 新增
240
+    &.add {
241
+      .modalBody {
242
+        width: 480px;
243
+        height: auto;
244
+
245
+        .content {
246
+          width: 100%;
247
+          height: auto;
248
+          padding: 18px 14px 0 14px;
249
+
250
+          .addForm {
251
+            .ant-form-item {
252
+              margin-bottom: 15px;
253
+
254
+              .ant-form-item-label {
255
+                line-height: 0;
256
+                text-align: left;
257
+              }
258
+            }
259
+          }
260
+
261
+          .editForm {
262
+            .ant-form-item {
263
+              margin-bottom: 15px;
264
+
265
+              .ant-form-item-label {
266
+                line-height: 0;
267
+                text-align: left;
268
+              }
269
+            }
270
+          }
271
+        }
272
+
273
+        button {
274
+          &:nth-child(1) {
275
+            margin-right: 20px;
276
+          }
277
+        }
278
+      }
55 279
     }
56 280
   }
57 281
 }

+ 262 - 29
src/app/views/data-dictionary/data-dictionary.component.ts

@@ -1,5 +1,9 @@
1
-import { Component, OnInit } from "@angular/core";
2
-import { ActivatedRoute, Router } from "@angular/router";
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
3 7
 import { ToolService } from "../../services/tool.service";
4 8
 
5 9
 @Component({
@@ -8,41 +12,270 @@ import { ToolService } from "../../services/tool.service";
8 12
   styleUrls: ["./data-dictionary.component.less"],
9 13
 })
10 14
 export class DataDictionaryComponent implements OnInit {
11
-  navList: Array<any> = [
12
-    { name: "楼栋", url: "/main/dataDictionary/dataBuilding" },
13
-    { name: "楼层", url: "/main/dataDictionary/dataFloor" },
14
-  ];
15
-  coopBtns = {};
16
-  hospitalList = []; //权限下的院区列表
17
-  selectedHospital: any; //权限下的选中的院区
18
-  currentIndex = 0; //当前高亮的导航
15
+  tableHeight;
16
+  validateForm: FormGroup;
17
+  allDataList: any[] = []; //数据字典下的数据列表
18
+  mapOfCheckedId: { [key: string]: boolean } = {};
19
+  checkedDictionary: any = {}; //选中
20
+  dictionaryList: Array<any> = []; //数据字典信息
21
+  hosId: any; //当前选择的院区id
22
+  promptContent: string; //操作提示框提示信息
23
+  ifSuccess: boolean; //操作成功/失败
24
+  promptInfo: string; //操作结果提示信息
25
+  promptModalShow: boolean; //是否展示提示框
26
+  btnLoading: boolean = false; //确认按钮loading状态
27
+  coopBtns: any = {}; // 初始化增删改按钮
28
+  dictionaryLoading = false; //loading
29
+  positionY = 0; //记录Y轴滚动距离
30
+  selectedDictionary = []; //选中的
31
+  add: boolean = true; //新增的标识,true:新增;false:编辑
32
+  dictionaryModal: boolean = false; //模态框是否展示
33
+  dataEdit; //正在编辑的
34
+  delModal: boolean = false; //删除,模态框是否显示
35
+  delDictionaryModal: boolean = false; //删除,模态框是否显示
36
+  isDelSingle: boolean = false; //是否单个删除
37
+  isAllDisplayDataChecked = false; //当前页是否全选
38
+
19 39
   constructor(
40
+    private fb: FormBuilder,
20 41
     private route: ActivatedRoute,
21
-    private tool: ToolService,
22
-    private router: Router
42
+    private mainService: MainService,
43
+    private tool: ToolService
23 44
   ) {}
24 45
 
46
+  @ViewChild("osComponentRef1", {
47
+    read: OverlayScrollbarsComponent,
48
+    static: true,
49
+  })
50
+  osComponentRef1: OverlayScrollbarsComponent;
51
+
25 52
   ngOnInit() {
26
-    console.log(this.router.url);
27
-    this.hospitalList = this.tool.getHospitalList();
28
-    let urlArr = this.router.url.split("?");
29
-    let url = urlArr[0];
30
-    let id = urlArr[1];
31
-    this.currentIndex = this.navList.findIndex((item) => item.url == url);
32
-    if (id) {
33
-      this.selectedHospital = parseInt(id.split("=")[1]);
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
54
+    this.hosId = this.tool.getCurrentHospital().id;
55
+    this.getDictionaryList();
56
+    this.tableHeight = document.body.clientHeight - 312;
57
+  }
58
+
59
+  // 数据字典列表
60
+  getDictionaryList() {
61
+    this.dictionaryList = [
62
+      {
63
+        id: -1,
64
+        dictionaryName: '被服种类',
65
+        key: 'clothes_type',
66
+      }
67
+    ];
68
+    if (Object.keys(this.checkedDictionary).length) {
69
+      this.dictionaryList.forEach((item) => {
70
+        if (item.id == this.checkedDictionary.id) {
71
+          this.checkDictionary(item);
72
+        }
73
+      });
34 74
     } else {
35
-      this.selectedHospital = this.tool.getCurrentHospital().id;
75
+      this.checkDictionary(this.dictionaryList[0]);
36 76
     }
37
-    this.coopBtns = this.tool.initCoopBtns(this.route);
38 77
   }
39
-  // 导航跳转
40
-  selectedNav(index) {
41
-    this.currentIndex = index;
78
+
79
+  // 获取选中数据字典列表
80
+  getAll() {
81
+    // 初始化的时候搜索一次,然后前端过滤
82
+    this.dictionaryLoading = true;
83
+    let postData = {
84
+      idx: 0,
85
+      sum: 9999,
86
+      dictionary: {
87
+        key: this.checkedDictionary.key,
88
+      },
89
+    };
90
+    this.mainService
91
+      .getFetchDataList("simple/data", "dictionary", postData)
92
+      .subscribe((result) => {
93
+        this.dictionaryLoading = false;
94
+        if (result.status == 200) {
95
+          this.allDataList = result.list;
96
+          this.refreshStatus();
97
+        }
98
+      });
99
+  }
100
+
101
+  // 选中数据字典
102
+  checkDictionary(data) {
103
+    this.positionY = this.osComponentRef1.osInstance() ? this.osComponentRef1.osInstance().scroll().position.y : 0; //内容滚动的距离
104
+    this.checkedDictionary = data ? data : {};
105
+    this.mapOfCheckedId = {};
106
+    this.getAll();
107
+  }
108
+
109
+  selectedUser(data) {
110
+    this.mapOfCheckedId[data.id] = !this.mapOfCheckedId[data.id];
111
+    this.refreshStatus();
112
+  }
113
+  // 选中列表中
114
+  refreshStatus(): void {
115
+    let arr = [];
116
+    if (this.allDataList.length) {
117
+      this.isAllDisplayDataChecked = this.allDataList.every(
118
+        (item) => this.mapOfCheckedId[item.id]
119
+      );
120
+    } else {
121
+      this.isAllDisplayDataChecked = false;
122
+    }
123
+
124
+    for (var m in this.mapOfCheckedId) {
125
+      if (this.mapOfCheckedId[m]) {
126
+        arr.push({ id: m });
127
+      }
128
+    }
129
+    this.selectedDictionary = arr;
130
+  }
131
+
132
+  // 新增/编辑模态框
133
+  showModal(e, type, data?) {
134
+    this.dictionaryModal = true;
135
+    this.add = type == "add";
136
+    if (type == "edit") {
137
+      this.initForm();
138
+      this.dataEdit = data;
139
+      this.validateForm.controls.key.setValue(data.key);
140
+      this.validateForm.controls.name.setValue(data.name);
141
+      this.validateForm.controls.value.setValue(data.value);
142
+      this.validateForm.controls.orders.setValue(data.orders);
143
+      this.validateForm.controls.extra3.setValue(data.extra3);
144
+      this.validateForm.controls.desc.setValue(data.desc);
145
+    } else {
146
+      this.initForm();
147
+    }
148
+    e.stopPropagation();
149
+  }
150
+
151
+  // 隐藏模态框
152
+  hideModal() {
153
+    this.dictionaryModal = false;
154
+  }
155
+
156
+  // 初始化新增form表单dictionary
157
+  initForm() {
158
+    this.validateForm = this.fb.group({
159
+      key: [this.checkedDictionary.key, [Validators.required]],
160
+      name: [null, [Validators.required]],
161
+      value: [null, [Validators.required]],
162
+      orders: [0, [Validators.required]],
163
+      extra3: [0, [Validators.required]],
164
+      desc: [null, [Validators.required]],
165
+    });
166
+  }
167
+
168
+  // 新增/编辑提交
169
+  submitForm(): void {
170
+    for (const i in this.validateForm.controls) {
171
+      this.validateForm.controls[i].markAsDirty();
172
+      this.validateForm.controls[i].updateValueAndValidity();
173
+    }
174
+    if (this.validateForm.invalid) return;
175
+    this.btnLoading = true;
176
+    let postData;
177
+
178
+    if (this.add) {
179
+      postData = {
180
+        key: this.validateForm.value.key,
181
+        name: this.validateForm.value.name,
182
+        value: this.validateForm.value.value,
183
+        orders: this.validateForm.value.orders,
184
+        extra3: this.validateForm.value.extra3,
185
+        desc: this.validateForm.value.desc,
186
+      };
187
+    } else {
188
+      postData = {
189
+        key: this.validateForm.value.key,
190
+        name: this.validateForm.value.name,
191
+        value: this.validateForm.value.value,
192
+        orders: this.validateForm.value.orders,
193
+        extra3: this.validateForm.value.extra3,
194
+        desc: this.validateForm.value.desc,
195
+        id: this.dataEdit.id,
196
+      };
197
+    }
198
+    this.addHandler(postData);
199
+  }
200
+
201
+  //新增/编辑
202
+  addHandler(postData) {
203
+    this.mainService
204
+      .simplePost("addData", "dictionary", postData)
205
+      .subscribe((result) => {
206
+        this.hideModal();
207
+        this.btnLoading = false;
208
+        if (result["status"] == 200) {
209
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
210
+        } else {
211
+          this.showPromptModal(
212
+            this.add ? "新增" : "编辑",
213
+            false,
214
+            result["msg"]
215
+          );
216
+        }
217
+      });
42 218
   }
43
-  // 切换院区
44
-  selectedHospitalChange() {
45
-    let url = this.router.url.split("?")[0];
46
-    this.router.navigate([url], { queryParams: { id: this.selectedHospital } });
219
+
220
+  /**
221
+   * 删除
222
+   * @param e 事件对象
223
+   * @param data 有值就是单个删除,无值就是批量删除
224
+   */
225
+  showDelDictionaryModal(e, data?) {
226
+    if (data) {
227
+      this.isDelSingle = true;
228
+      this.dataEdit = data;
229
+    } else {
230
+      this.isDelSingle = false;
231
+    }
232
+    this.delDictionaryModal = true;
233
+    e.stopPropagation();
234
+  }
235
+  hideDelDictionaryModal() {
236
+    this.delDictionaryModal = false;
237
+  }
238
+  // 确认删除
239
+  confirmDictionaryDel() {
240
+    this.btnLoading = true;
241
+    let selectedDictionary = this.selectedDictionary.map((item) => item.id);
242
+    let postData = this.isDelSingle ? [this.dataEdit.id] : selectedDictionary;
243
+    this.mainService.simplePost("rmvData", "dictionary", postData).subscribe((result) => {
244
+      this.hideDelDictionaryModal();
245
+      this.btnLoading = false;
246
+      if (result.status == 200) {
247
+        this.showPromptModal("删除", true, "");
248
+      } else {
249
+        this.showPromptModal("删除", false, result.msg);
250
+      }
251
+    });
252
+  }
253
+  // 全选
254
+  checkAll(value: boolean): void {
255
+    console.log(this.allDataList);
256
+    this.allDataList.forEach((item) => {
257
+      this.mapOfCheckedId[item.id] = value;
258
+    });
259
+    this.refreshStatus();
260
+  }
261
+
262
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
263
+  showPromptModal(con, success, promptInfo) {
264
+    this.promptModalShow = false;
265
+    this.promptContent = con;
266
+    this.ifSuccess = success;
267
+    this.promptInfo = promptInfo;
268
+    this.osComponentRef1.osInstance().scroll({ x: 0, y: this.positionY });
269
+    if (success) {
270
+      setTimeout(() => {
271
+        this.promptModalShow = true;
272
+        this.getDictionaryList();
273
+      }, 100);
274
+    } else {
275
+      setTimeout(() => {
276
+        this.promptModalShow = true;
277
+      }, 100);
278
+    }
47 279
   }
48 280
 }
281
+

+ 11 - 1
src/app/views/main/main-routing.module.ts

@@ -93,11 +93,21 @@ const routes: Routes = [
93 93
         path: "drugPageControl",
94 94
         loadChildren: () => import("../drug-page-control/drug-page-control.module").then((m) => m.DrugPageControlModule),
95 95
       },
96
-      // 药品页面控制
96
+      // 临床服务页面控制
97 97
       {
98 98
         path: "otherPageControl",
99 99
         loadChildren: () => import("../other-page-control/other-page-control.module").then((m) => m.OtherPageControlModule),
100 100
       },
101
+      // 被服洗涤-回收页面控制
102
+      {
103
+        path: "quiltWashingGetPageControl",
104
+        loadChildren: () => import("../quilt-washing-get-page-control/quilt-washing-get-page-control.module").then((m) => m.QuiltWashingGetPageControlModule),
105
+      },
106
+      // 被服洗涤-送回页面控制
107
+      {
108
+        path: "quiltWashingSendPageControl",
109
+        loadChildren: () => import("../quilt-washing-send-page-control/quilt-washing-send-page-control.module").then((m) => m.QuiltWashingSendPageControlModule),
110
+      },
101 111
       // 限制发起时间
102 112
       {
103 113
         path: "limitInitiationTime",

+ 14 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control-routing.module.ts

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

+ 69 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.html

@@ -0,0 +1,69 @@
1
+<div class="TaskTypeManagement">
2
+  <div class="taskTypeInfo">
3
+    <div class="top">
4
+      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
+        特性配置
6
+      </div>
7
+      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
8
+        自动建单配置
9
+      </div>
10
+    </div>
11
+    <div class="list" *ngIf="!loading">
12
+      <!-- 特性配置 -->
13
+      <div *ngIf="tabModalName=='characteristics'">
14
+        <!-- 被服洗涤-回收 -->
15
+        <div class="display_flex align-items_center mb8">
16
+          <nz-form-label class="label" nzRequired>被服洗涤-回收</nz-form-label>
17
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
18
+            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择被服洗涤-回收" [(ngModel)]="clothingGetTypeId">
19
+            <ng-container *ngFor="let option of taskTypes">
20
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
21
+            </ng-container>
22
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
+            </nz-option>
25
+          </nz-select>
26
+        </div>
27
+        <!-- 被服洗涤科室 -->
28
+        <div class="display_flex align-items_center mb8">
29
+          <nz-form-label class="label" nzRequired>被服洗涤科室</nz-form-label>
30
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择" (nzOnSearch)="changeDept($event)" [(ngModel)]="clothingDept">
31
+            <ng-container *ngFor="let data of clothingDepts">
32
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [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
+        <!-- 批次号生成规则 -->
40
+        <div class="display_flex align-items_center mb8">
41
+          <nz-form-label class="label" nzRequired>批次号生成规则</nz-form-label>
42
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="batchNoRule">
43
+            <ng-container *ngFor="let data of clothing_batchno_rule">
44
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
45
+            </ng-container>
46
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
47
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
48
+            </nz-option>
49
+          </nz-select>
50
+        </div>
51
+
52
+      </div>
53
+      <!-- 自动建单配置 -->
54
+      <div *ngIf="tabModalName=='automaticOrderCreation'">
55
+      </div>
56
+      <div class="bottom">
57
+        <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
58
+      </div>
59
+    </div>
60
+    <div class="list" *ngIf="loading">
61
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
62
+        <div class="loadingFullInner">
63
+          <img src="../../../assets/images/loading.gif" alt="">
64
+          <div>加载中...</div>
65
+        </div>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</div>

文件差異過大導致無法顯示
+ 1251 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.less


+ 193 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.component.ts

@@ -0,0 +1,193 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
6
+import { QuiltWashingGetPageControlService } from './quilt-washing-get-page-control.service';
7
+
8
+@Component({
9
+  selector: "app-quilt-washing-get-page-control",
10
+  templateUrl: "./quilt-washing-get-page-control.component.html",
11
+  styleUrls: ["./quilt-washing-get-page-control.component.less"],
12
+})
13
+export class QuiltWashingGetPageControlComponent implements OnInit {
14
+  loading:boolean = false; //页面加载的loading
15
+  btnLoading:boolean = false; //提交按钮的loading
16
+  tabModalName:string = 'characteristics'; //当前选中的tab
17
+  hosId = this.tool.getCurrentHospital().id; //当前院区
18
+
19
+  // 积分计算方式
20
+  clothingDept:any = null;
21
+  // 批次号生成规则
22
+  batchNoRule:any = null;
23
+  // 配置
24
+  configs:any = {};
25
+  searchTimerSubject = new Subject();
26
+  constructor(private otherPageControlService: QuiltWashingGetPageControlService, private tool: ToolService, private msg: NzMessageService) {}
27
+
28
+  ngOnInit():void {
29
+    // todo
30
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
31
+      let fun = v[0];
32
+      fun.call(this, v[1]);
33
+    });
34
+    this.getTaskTypes();
35
+    this.getDepts();
36
+    this.getClothingBatchnoRule();
37
+    this.getConfig();
38
+  }
39
+
40
+  // 边输入边搜索节流阀
41
+  searchTimer(fun, e) {
42
+    this.isLoading = true;
43
+    this.searchTimerSubject.next([fun, e]);
44
+  }
45
+
46
+  // 用户输入搜索任务类型
47
+  isLoading: boolean = false;
48
+  clothingGetTypeId:any = null;
49
+  taskTypes:any[] = [];
50
+  changeTasktype(e) {
51
+    this.searchTimer(this.getTaskTypes, e);
52
+  }
53
+
54
+  changeDept(e) {
55
+    this.searchTimer(this.getDepts, e);
56
+  }
57
+
58
+  //获取任务类型
59
+  getTaskTypes(e:string = '') {
60
+    let postData:any = {
61
+      idx: 0,
62
+      sum: 9999,
63
+      taskType: {
64
+        taskName: e,
65
+        simpleQuery: true,
66
+        hosId: {
67
+          id: this.hosId
68
+        },
69
+        ordinaryField: {
70
+          key: 'ordinary_field',
71
+          value: 'clothingGet'
72
+        }
73
+      }
74
+    };
75
+    this.isLoading = true;
76
+    this.otherPageControlService
77
+      .getTaskTypes(postData)
78
+      .subscribe((result) => {
79
+        this.isLoading = false;
80
+        if (result.status == 200) {
81
+          this.taskTypes = result.list || [];
82
+        }
83
+      });
84
+  }
85
+
86
+  //获取科室
87
+  clothingDepts:any = [];
88
+  getDepts(e:string = '') {
89
+    this.isLoading = true;
90
+    let postData = {
91
+      idx: 0,
92
+      sum: 9999,
93
+      department: {
94
+        searchType: 1,// 简单查询
95
+        dept: e,
96
+        cascadeHosId: this.hosId,
97
+      }
98
+    };
99
+    this.otherPageControlService
100
+      .getDepts(postData)
101
+      .subscribe((result) => {
102
+        this.isLoading = false;
103
+        if (result.status == 200) {
104
+          this.clothingDepts = result.list || [];
105
+        }
106
+      });
107
+  }
108
+  //获取批次号生成规则
109
+  clothing_batchno_rule:any = [];
110
+  getClothingBatchnoRule() {
111
+    this.isLoading = true;
112
+    this.otherPageControlService
113
+      .getDictionary("clothing_batchno_rule")
114
+      .subscribe((data) => {
115
+        this.isLoading = false;
116
+        this.clothing_batchno_rule = data;
117
+      });
118
+  }
119
+  // 切换tab
120
+  tabModal(tabModalName:string){
121
+    this.tabModalName = tabModalName;
122
+  }
123
+
124
+  // 保存
125
+  submitForm() {
126
+    if(!this.clothingGetTypeId){
127
+      this.msg.create("warning", "请先配置被服洗涤-回收任务类型!");
128
+      return;
129
+    }
130
+
131
+    if(!this.clothingDept){
132
+      this.msg.create("warning", "请先配置被服洗涤科室!");
133
+      return;
134
+    }
135
+
136
+    if(!this.batchNoRule){
137
+      this.msg.create("warning", "请先配置批次号生成规则!");
138
+      return;
139
+    }
140
+
141
+    let postData:any = {
142
+      id: this.configs.id,
143
+      taskType: this.clothingGetTypeId,
144
+      clothingGetTypeId: this.clothingGetTypeId,
145
+      hosId: this.hosId,
146
+      clothingDept: this.clothingDept,
147
+      batchNoRule: { id: this.batchNoRule },
148
+    };
149
+    this.btnLoading = true;
150
+    this.otherPageControlService
151
+      .simplePost("addData", "taskTypeConfig", postData)
152
+      .subscribe((result) => {
153
+        this.btnLoading = false;
154
+        if (result.status == 200) {
155
+          this.getConfig();
156
+        }
157
+      });
158
+  }
159
+
160
+  // 获取配置
161
+  getConfig() {
162
+    this.loading = true;
163
+    let postData = {
164
+      idx: 0,
165
+      sum: 10,
166
+      taskTypeConfig: {
167
+        taskTypeDTO: {
168
+          hosId: {
169
+            id: this.hosId
170
+          },
171
+          ordinaryField: {
172
+            key: 'ordinary_field',
173
+            value: 'clothingGet'
174
+          }
175
+        }
176
+      }
177
+    };
178
+    this.otherPageControlService
179
+      .getConfig(postData)
180
+      .subscribe((result) => {
181
+        this.loading = false;
182
+        if (result.status == 200) {
183
+          this.configs = result.list[0] || {};
184
+          this.clothingDept = this.configs.clothingDept;
185
+          this.batchNoRule = this.configs.batchNoRule ? this.configs.batchNoRule.id : null;
186
+          this.clothingGetTypeId = this.configs.clothingGetTypeId || null;
187
+        }
188
+      });
189
+  }
190
+}
191
+
192
+
193
+

+ 19 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.module.ts

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

+ 52 - 0
src/app/views/quilt-washing-get-page-control/quilt-washing-get-page-control.service.ts

@@ -0,0 +1,52 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class QuiltWashingGetPageControlService {
9
+
10
+  constructor(
11
+    private mainService: MainService,
12
+  ) { }
13
+
14
+  // 字典
15
+  getDictionary(type) {
16
+    return this.mainService.getDictionary("list", type);
17
+  }
18
+
19
+  // 获取配置列表
20
+  getConfig(postData) {
21
+    return this.mainService.getFetchDataList("simple/data", "taskTypeConfig", postData);
22
+  }
23
+
24
+  // 获取其他临床服务任务类型列表
25
+  getTaskTypes(postData) {
26
+    return this.mainService.getFetchDataList("simple/data", "taskType", postData).pipe(map((v:any) => {
27
+      if(Array.isArray(v.list)){
28
+        v.list = v.list.map(vv => ({id: vv.id, taskName: vv.taskName}));
29
+      }else{
30
+        v.list = [];
31
+      }
32
+      return v;
33
+    }));
34
+  }
35
+
36
+  // 获取科室列表
37
+  getDepts(postData) {
38
+    return this.mainService.getFetchDataList("simple/data", "department", postData).pipe(map((v:any) => {
39
+      if(Array.isArray(v.list)){
40
+        v.list = v.list.map(vv => ({id: vv.id, dept: vv.dept}));
41
+      }else{
42
+        v.list = [];
43
+      }
44
+      return v;
45
+    }));
46
+  }
47
+
48
+  // simple增删改
49
+  simplePost(type, model, postData) {
50
+    return this.mainService.simplePost(type, model, postData);
51
+  }
52
+}

+ 14 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control-routing.module.ts

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

+ 69 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.html

@@ -0,0 +1,69 @@
1
+<div class="TaskTypeManagement">
2
+  <div class="taskTypeInfo">
3
+    <div class="top">
4
+      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
+        特性配置
6
+      </div>
7
+      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
8
+        自动建单配置
9
+      </div>
10
+    </div>
11
+    <div class="list" *ngIf="!loading">
12
+      <!-- 特性配置 -->
13
+      <div *ngIf="tabModalName=='characteristics'">
14
+        <!-- 被服洗涤-送回 -->
15
+        <div class="display_flex align-items_center mb8">
16
+          <nz-form-label class="label" nzRequired>被服洗涤-送回</nz-form-label>
17
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
18
+            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择被服洗涤-送回" [(ngModel)]="clothingSendTypeId">
19
+            <ng-container *ngFor="let option of taskTypes">
20
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
21
+            </ng-container>
22
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
+            </nz-option>
25
+          </nz-select>
26
+        </div>
27
+        <!-- 被服洗涤科室 -->
28
+        <div class="display_flex align-items_center mb8">
29
+          <nz-form-label class="label" nzRequired>被服洗涤科室</nz-form-label>
30
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择" (nzOnSearch)="changeDept($event)" [(ngModel)]="clothingDept">
31
+            <ng-container *ngFor="let data of clothingDepts">
32
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [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
+        <!-- 批次号生成规则 -->
40
+        <div class="display_flex align-items_center mb8">
41
+          <nz-form-label class="label" nzRequired>批次号生成规则</nz-form-label>
42
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="batchNoRule">
43
+            <ng-container *ngFor="let data of clothing_batchno_rule">
44
+              <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
45
+            </ng-container>
46
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
47
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
48
+            </nz-option>
49
+          </nz-select>
50
+        </div>
51
+
52
+      </div>
53
+      <!-- 自动建单配置 -->
54
+      <div *ngIf="tabModalName=='automaticOrderCreation'">
55
+      </div>
56
+      <div class="bottom">
57
+        <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
58
+      </div>
59
+    </div>
60
+    <div class="list" *ngIf="loading">
61
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
62
+        <div class="loadingFullInner">
63
+          <img src="../../../assets/images/loading.gif" alt="">
64
+          <div>加载中...</div>
65
+        </div>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</div>

文件差異過大導致無法顯示
+ 1251 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.less


+ 193 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.component.ts

@@ -0,0 +1,193 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
6
+import { QuiltWashingSendPageControlService } from './quilt-washing-send-page-control.service';
7
+
8
+@Component({
9
+  selector: "app-quilt-washing-send-page-control",
10
+  templateUrl: "./quilt-washing-send-page-control.component.html",
11
+  styleUrls: ["./quilt-washing-send-page-control.component.less"],
12
+})
13
+export class QuiltWashingSendPageControlComponent implements OnInit {
14
+  loading:boolean = false; //页面加载的loading
15
+  btnLoading:boolean = false; //提交按钮的loading
16
+  tabModalName:string = 'characteristics'; //当前选中的tab
17
+  hosId = this.tool.getCurrentHospital().id; //当前院区
18
+
19
+  // 积分计算方式
20
+  clothingDept:any = null;
21
+  // 批次号生成规则
22
+  batchNoRule:any = null;
23
+  // 配置
24
+  configs:any = {};
25
+  searchTimerSubject = new Subject();
26
+  constructor(private otherPageControlService: QuiltWashingSendPageControlService, private tool: ToolService, private msg: NzMessageService) {}
27
+
28
+  ngOnInit():void {
29
+    // todo
30
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
31
+      let fun = v[0];
32
+      fun.call(this, v[1]);
33
+    });
34
+    this.getTaskTypes();
35
+    this.getDepts();
36
+    this.getClothingBatchnoRule();
37
+    this.getConfig();
38
+  }
39
+
40
+  // 边输入边搜索节流阀
41
+  searchTimer(fun, e) {
42
+    this.isLoading = true;
43
+    this.searchTimerSubject.next([fun, e]);
44
+  }
45
+
46
+  // 用户输入搜索任务类型
47
+  isLoading: boolean = false;
48
+  clothingSendTypeId:any = null;
49
+  taskTypes:any[] = [];
50
+  changeTasktype(e) {
51
+    this.searchTimer(this.getTaskTypes, e);
52
+  }
53
+
54
+  changeDept(e) {
55
+    this.searchTimer(this.getDepts, e);
56
+  }
57
+
58
+  //获取任务类型
59
+  getTaskTypes(e:string = '') {
60
+    let postData:any = {
61
+      idx: 0,
62
+      sum: 9999,
63
+      taskType: {
64
+        taskName: e,
65
+        simpleQuery: true,
66
+        hosId: {
67
+          id: this.hosId
68
+        },
69
+        ordinaryField: {
70
+          key: 'ordinary_field',
71
+          value: 'clothingSend'
72
+        }
73
+      }
74
+    };
75
+    this.isLoading = true;
76
+    this.otherPageControlService
77
+      .getTaskTypes(postData)
78
+      .subscribe((result) => {
79
+        this.isLoading = false;
80
+        if (result.status == 200) {
81
+          this.taskTypes = result.list || [];
82
+        }
83
+      });
84
+  }
85
+
86
+  //获取科室
87
+  clothingDepts:any = [];
88
+  getDepts(e:string = '') {
89
+    this.isLoading = true;
90
+    let postData = {
91
+      idx: 0,
92
+      sum: 9999,
93
+      department: {
94
+        searchType: 1,// 简单查询
95
+        dept: e,
96
+        cascadeHosId: this.hosId,
97
+      }
98
+    };
99
+    this.otherPageControlService
100
+      .getDepts(postData)
101
+      .subscribe((result) => {
102
+        this.isLoading = false;
103
+        if (result.status == 200) {
104
+          this.clothingDepts = result.list || [];
105
+        }
106
+      });
107
+  }
108
+  //获取批次号生成规则
109
+  clothing_batchno_rule:any = [];
110
+  getClothingBatchnoRule() {
111
+    this.isLoading = true;
112
+    this.otherPageControlService
113
+      .getDictionary("clothing_batchno_rule")
114
+      .subscribe((data) => {
115
+        this.isLoading = false;
116
+        this.clothing_batchno_rule = data;
117
+      });
118
+  }
119
+  // 切换tab
120
+  tabModal(tabModalName:string){
121
+    this.tabModalName = tabModalName;
122
+  }
123
+
124
+  // 保存
125
+  submitForm() {
126
+    if(!this.clothingSendTypeId){
127
+      this.msg.create("warning", "请先配置被服洗涤-送回任务类型!");
128
+      return;
129
+    }
130
+
131
+    if(!this.clothingDept){
132
+      this.msg.create("warning", "请先配置被服洗涤科室!");
133
+      return;
134
+    }
135
+
136
+    if(!this.batchNoRule){
137
+      this.msg.create("warning", "请先配置批次号生成规则!");
138
+      return;
139
+    }
140
+
141
+    let postData:any = {
142
+      id: this.configs.id,
143
+      taskType: this.clothingSendTypeId,
144
+      clothingSendTypeId: this.clothingSendTypeId,
145
+      hosId: this.hosId,
146
+      clothingDept: this.clothingDept,
147
+      batchNoRule: { id: this.batchNoRule },
148
+    };
149
+    this.btnLoading = true;
150
+    this.otherPageControlService
151
+      .simplePost("addData", "taskTypeConfig", postData)
152
+      .subscribe((result) => {
153
+        this.btnLoading = false;
154
+        if (result.status == 200) {
155
+          this.getConfig();
156
+        }
157
+      });
158
+  }
159
+
160
+  // 获取配置
161
+  getConfig() {
162
+    this.loading = true;
163
+    let postData = {
164
+      idx: 0,
165
+      sum: 10,
166
+      taskTypeConfig: {
167
+        taskTypeDTO: {
168
+          hosId: {
169
+            id: this.hosId
170
+          },
171
+          ordinaryField: {
172
+            key: 'ordinary_field',
173
+            value: 'clothingSend'
174
+          }
175
+        }
176
+      }
177
+    };
178
+    this.otherPageControlService
179
+      .getConfig(postData)
180
+      .subscribe((result) => {
181
+        this.loading = false;
182
+        if (result.status == 200) {
183
+          this.configs = result.list[0] || {};
184
+          this.clothingDept = this.configs.clothingDept;
185
+          this.batchNoRule = this.configs.batchNoRule ? this.configs.batchNoRule.id : null;
186
+          this.clothingSendTypeId = this.configs.clothingSendTypeId || null;
187
+        }
188
+      });
189
+  }
190
+}
191
+
192
+
193
+

+ 19 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.module.ts

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

+ 52 - 0
src/app/views/quilt-washing-send-page-control/quilt-washing-send-page-control.service.ts

@@ -0,0 +1,52 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class QuiltWashingSendPageControlService {
9
+
10
+  constructor(
11
+    private mainService: MainService,
12
+  ) { }
13
+
14
+  // 字典
15
+  getDictionary(type) {
16
+    return this.mainService.getDictionary("list", type);
17
+  }
18
+
19
+  // 获取配置列表
20
+  getConfig(postData) {
21
+    return this.mainService.getFetchDataList("simple/data", "taskTypeConfig", postData);
22
+  }
23
+
24
+  // 获取其他临床服务任务类型列表
25
+  getTaskTypes(postData) {
26
+    return this.mainService.getFetchDataList("simple/data", "taskType", postData).pipe(map((v:any) => {
27
+      if(Array.isArray(v.list)){
28
+        v.list = v.list.map(vv => ({id: vv.id, taskName: vv.taskName}));
29
+      }else{
30
+        v.list = [];
31
+      }
32
+      return v;
33
+    }));
34
+  }
35
+
36
+  // 获取科室列表
37
+  getDepts(postData) {
38
+    return this.mainService.getFetchDataList("simple/data", "department", postData).pipe(map((v:any) => {
39
+      if(Array.isArray(v.list)){
40
+        v.list = v.list.map(vv => ({id: vv.id, dept: vv.dept}));
41
+      }else{
42
+        v.list = [];
43
+      }
44
+      return v;
45
+    }));
46
+  }
47
+
48
+  // simple增删改
49
+  simplePost(type, model, postData) {
50
+    return this.mainService.simplePost(type, model, postData);
51
+  }
52
+}

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.49');
11
+    console.info('v2.4.50');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)