Browse Source

被服洗涤

seimin 1 year ago
parent
commit
bd7864681b

+ 6 - 0
src/app/services/main.service.ts

@@ -761,4 +761,10 @@ export class MainService {
761
       headers: this.headers,
761
       headers: this.headers,
762
     });
762
     });
763
   }
763
   }
764
+  // transflow
765
+  transflow(data, type): any {
766
+    return this.http.post(host.host + "/transflow/" + type, data, {
767
+      headers: this.headers,
768
+    });
769
+  }
764
 }
770
 }

+ 29 - 0
src/app/share/businessData-detail-modal/businessData-detail-modal.component.html

@@ -124,6 +124,35 @@
124
         </tbody>
124
         </tbody>
125
       </nz-table>
125
       </nz-table>
126
 
126
 
127
+      <!-- 被服洗涤批次管理-查看视图-查看异常 -->
128
+      <nz-table *ngIf="type === 'washingException'" class="hospitalTable" [nzData]="washingExceptionList" nzSize="middle" [nzShowPagination]="false"
129
+        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
130
+        <thead>
131
+          <tr class="thead">
132
+            <th nzWidth="5%">序号</th>
133
+            <th nzWidth="13%">关联科室</th>
134
+            <th nzWidth="11%">被服种类</th>
135
+            <th nzWidth="5%">调整数量</th>
136
+            <th nzWidth="20%">调整原因</th>
137
+            <th nzWidth="20%">备注</th>
138
+            <th nzWidth="15%">时间</th>
139
+            <th nzWidth="11%">操作人</th>
140
+          </tr>
141
+        </thead>
142
+        <tbody>
143
+          <tr *ngFor="let data of washingExceptionList;let i = index;">
144
+            <td>{{i+1}}</td>
145
+            <td>{{ data.clothesDeptDTO?.dept }}</td>
146
+            <td>{{ data.clothesType?.name }}</td>
147
+            <td>{{ data.changeNum }}</td>
148
+            <td>{{ data.clothesExceptionRe?.name }}</td>
149
+            <td>{{ data.remarks }}</td>
150
+            <td>{{ data.changeTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
151
+            <td>{{ data.changerDTO?.name }}</td>
152
+          </tr>
153
+        </tbody>
154
+      </nz-table>
155
+
127
       <div class="pagination" *ngIf="type !== 'blood'">
156
       <div class="pagination" *ngIf="type !== 'blood'">
128
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
157
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
129
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
158
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"

+ 28 - 0
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -12,6 +12,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
12
   hosId;
12
   hosId;
13
   hsLoading = false;
13
   hsLoading = false;
14
   bloodList: any = [];// 血制品列表
14
   bloodList: any = [];// 血制品列表
15
+  washingExceptionList: any = [];// 被服洗涤异常列表
15
   specimenList: any = [];// 标本列表
16
   specimenList: any = [];// 标本列表
16
   inspectionRateStatisticsList: any = [];// 科室检查率统计列表
17
   inspectionRateStatisticsList: any = [];// 科室检查率统计列表
17
   pageIndex: number = 1;//表格当前页码
18
   pageIndex: number = 1;//表格当前页码
@@ -45,6 +46,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
45
       case 'deptInspectionRateStatistics':
46
       case 'deptInspectionRateStatistics':
46
           this.getDeptInspectionRateStatistics(1);
47
           this.getDeptInspectionRateStatistics(1);
47
           break;
48
           break;
49
+      case 'washingException':
50
+          this.getWashingException(1);
51
+          break;
48
     }
52
     }
49
   }
53
   }
50
   // 关闭弹窗
54
   // 关闭弹窗
@@ -84,6 +88,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
84
       case 'deptInspectionRateStatistics':
88
       case 'deptInspectionRateStatistics':
85
         this.getDeptInspectionRateStatistics();
89
         this.getDeptInspectionRateStatistics();
86
         break;
90
         break;
91
+      case 'washingException':
92
+        this.getWashingException();
93
+        break;
87
     }
94
     }
88
   }
95
   }
89
 
96
 
@@ -154,6 +161,27 @@ export class BusinessDataDetailModalComponent implements OnInit {
154
     })
161
     })
155
   }
162
   }
156
 
163
 
164
+  // 获取被服洗涤异常列表
165
+  getWashingException(idx?) {
166
+    if (idx) {
167
+      this.pageIndex = 1;
168
+    }
169
+    let postData = {
170
+      idx: this.pageIndex - 1,
171
+      sum: this.pageSize,
172
+      clothesException: {
173
+        hosId: this.hosId,
174
+        id: this.orderId,
175
+      }
176
+    }
177
+    this.hsLoading = true;
178
+    this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
179
+      this.hsLoading = false;
180
+      this.washingExceptionList = data.list || [];
181
+      this.total = data.totalNum || 0;
182
+    })
183
+  }
184
+
157
   // 获取科室检查率统计-详情列表
185
   // 获取科室检查率统计-详情列表
158
   getDeptInspectionRateStatistics(idx?) {
186
   getDeptInspectionRateStatistics(idx?) {
159
     if (idx) {
187
     if (idx) {

+ 67 - 7
src/app/views/washing-batch-view/washing-batch-view.component.html

@@ -29,9 +29,10 @@
29
       </div>
29
       </div>
30
       <div class="display_flex align-items_center">
30
       <div class="display_flex align-items_center">
31
         <button nzType="primary" nz-button (click)="getList()">搜索</button>
31
         <button nzType="primary" nz-button (click)="getList()">搜索</button>
32
+        <button nzType="primary" nz-button (click)="reset()">重置</button>
32
         <button nzType="primary" nz-button>打印功能</button>
33
         <button nzType="primary" nz-button>打印功能</button>
33
-        <button nzType="primary" nz-button>查看异常</button>
34
-        <button nzType="primary" nz-button (click)="showDelModal()">批量送回</button>
34
+        <button nzType="primary" nz-button (click)="viewDetail()">查看异常</button>
35
+        <button nzType="primary" nz-button (click)="showDelModal()" [disabled]="checkedDepIds.length === 0">批量送回</button>
35
       </div>
36
       </div>
36
     </div>
37
     </div>
37
     <div class="list">
38
     <div class="list">
@@ -39,15 +40,23 @@
39
         [nzLoading]="loading" [nzScroll]="{ x: '100%', y: scrollY + 'px' }">
40
         [nzLoading]="loading" [nzScroll]="{ x: '100%', y: scrollY + 'px' }">
40
         <thead>
41
         <thead>
41
           <tr class="thead">
42
           <tr class="thead">
43
+            <!-- 多选框 -->
42
             <th nzLeft="0px" nzAlign="center" nzWidth="40px" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
44
             <th nzLeft="0px" nzAlign="center" nzWidth="40px" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
43
               (nzCheckedChange)="checkAll($event)"></th>
45
               (nzCheckedChange)="checkAll($event)"></th>
44
-            <th [nzLeft]="first ? '40px' : null" [nzRight]="last ? '0px' : (index == rows.length - 2 ? '100px' : null)" nzAlign="center" [nzWidth]="first ? '140px' : (last ? '100px' : (index == rows.length - 3 ? null : '65px'))" *ngFor="let row of rows;let first = first;let last = last;let index = index;">{{ row }}</th>
46
+            <!-- 固定列-first -->
47
+            <th nzLeft="40px" nzAlign="center" nzWidth="140px">{{ row }}</th>
48
+            <!-- 动态列 -->
49
+            <th nzAlign="center" nzWidth="65px" *ngFor="let row of rows[1]">{{ row }}</th>
50
+            <!-- 固定列-last -->
51
+            <th [nzRight]="last ? '0px' : (first ? null : '100px')" nzAlign="center" [nzWidth]="(last ? '100px' : (first ? null : '65px'))" *ngFor="let row of rows[2];let first = first;let last = last;">{{ row }}</th>
45
           </tr>
52
           </tr>
46
         </thead>
53
         </thead>
47
         <tbody>
54
         <tbody>
48
-          <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
49
-            <td nzLeft="0px" nzAlign="center" nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data[0]]" (nzCheckedChange)="refreshStatus()"></td>
50
-            <td [nzLeft]="index == 1 ? '40px' : null" [nzRight]="last ? '0px' : (index == data.length - 2 ? '100px' : null)" nzAlign="center" *ngFor="let row of data;let first = first;let last = last;let index = index;" [hidden]="first">{{ row }}</td>
55
+          <tr *ngFor="let data of listOfData" (click)="selectedListData(data)">
56
+            <td nzLeft="0px" nzAlign="center" nzShowCheckbox [nzDisabled]="data[0][1] == 5" [(nzChecked)]="mapOfCheckedId[data[0][0]]" (nzCheckedChange)="refreshStatus()"></td>
57
+            <td nzLeft="40px" nzAlign="center"><span>{{ data[0][data[0].length - 1] }}</span></td>
58
+            <td nzAlign="center" *ngFor="let row of data[1];let index = index;"><span (click)="clickNum($event, row)" class="table_hover" [ngClass]="{ red: row.exception == 1 }">{{ row.sendBackNum }}</span></td>
59
+            <td [nzRight]="last ? '0px' : (first ? null : '100px')" nzAlign="center" *ngFor="let row of data[2];let first = first;let last = last;"><span>{{ row }}</span></td>
51
           </tr>
60
           </tr>
52
         </tbody>
61
         </tbody>
53
       </nz-table>
62
       </nz-table>
@@ -58,10 +67,61 @@
58
     </div>
67
     </div>
59
   </div>
68
   </div>
60
 </div>
69
 </div>
61
-<!-- 模态框 -->
70
+<!-- 批量送回模态框 -->
62
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="loading3"
71
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="loading3"
63
 (confirmDelEvent)="confirmDel()" [content]="content"></app-dialog-delete>
72
 (confirmDelEvent)="confirmDel()" [content]="content"></app-dialog-delete>
64
 
73
 
74
+<!-- 修改数量模态框 -->
75
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="washingModal">
76
+  <div class="modalBody">
77
+    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideWashingModal()"></i>
78
+    </div>
79
+    <div class="content">
80
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="confirmWashing()">
81
+        <nz-form-item>
82
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="sendBackNum">调整数量</nz-form-label>
83
+          <nz-form-control nzErrorTip="请输入调整数量!">
84
+            <nz-input-group>
85
+              <nz-input-number formControlName="sendBackNum" placeholder="请输入调整数量" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
86
+            </nz-input-group>
87
+          </nz-form-control>
88
+        </nz-form-item>
89
+        <nz-form-item>
90
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="clothesExceptionResId">调整原因</nz-form-label>
91
+          <nz-form-control nzErrorTip="请选择调整原因!">
92
+            <nz-select formControlName="clothesExceptionResId" nzPlaceHolder="请选择调整原因">
93
+              <nz-option *ngFor="let option of dictionaryList" [nzLabel]="option.name" [nzValue]="option.id">
94
+              </nz-option>
95
+            </nz-select>
96
+          </nz-form-control>
97
+        </nz-form-item>
98
+        <nz-form-item>
99
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="remarks">备注</nz-form-label>
100
+          <nz-form-control nzErrorTip="请输入备注!">
101
+            <nz-input-group>
102
+              <input nz-input formControlName="remarks" placeholder="请输入备注" />
103
+            </nz-input-group>
104
+          </nz-form-control>
105
+        </nz-form-item>
106
+
107
+      </form>
108
+    </div>
109
+    <div class="display_flex justify-content_flex-center">
110
+      <button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="confirmWashing()">确认</button>
111
+      <button class="btn cancel" nz-button nzType="default" (click)="hideWashingModal()">取消</button>
112
+    </div>
113
+  </div>
114
+</div>
115
+
65
 <!-- 操作成功/失败提示框 -->
116
 <!-- 操作成功/失败提示框 -->
66
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
117
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
67
   [info]="promptInfo"></app-prompt-modal>
118
   [info]="promptInfo"></app-prompt-modal>
119
+
120
+<!-- 异常查看 -->
121
+<app-businessData-detail-modal
122
+  *ngIf="washingExceptionModalShow"
123
+  [show]="washingExceptionModalShow"
124
+  type="washingException"
125
+  [orderId]="route.snapshot.paramMap.get('id')"
126
+  (closeModelHs)="closeModelWashingException($event)"
127
+></app-businessData-detail-modal>

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

@@ -98,6 +98,10 @@
98
             font-size: 22px;
98
             font-size: 22px;
99
           }
99
           }
100
         }
100
         }
101
+        .table_hover:hover{
102
+          text-decoration: underline;
103
+          cursor: pointer;
104
+        }
101
       }
105
       }
102
       .bottom{
106
       .bottom{
103
         height: 90px;
107
         height: 90px;
@@ -113,4 +117,131 @@
113
       }
117
       }
114
     }
118
     }
115
   }
119
   }
120
+  .save {
121
+    position: fixed;
122
+    left: 0;
123
+    top: 0;
124
+    width: 100%;
125
+    height: 100%;
126
+    background: rgba(0, 0, 0, 0.4);
127
+    z-index: 99;
128
+
129
+    .modalBody {
130
+      width: 350px;
131
+      height: 220px;
132
+      background: #fff;
133
+      border-radius: 5px;
134
+      padding: 10px 20px;
135
+      color: #333;
136
+
137
+      .title {
138
+        width: 100%;
139
+        text-align: center;
140
+        font-size: 18px;
141
+        position: relative;
142
+
143
+        i {
144
+          position: absolute;
145
+          right: 0;
146
+          top: 0;
147
+          font-size: 20px;
148
+          color: #666;
149
+          cursor: pointer;
150
+          padding: 0 5px;
151
+        }
152
+      }
153
+
154
+      .content {
155
+        width: 310px;
156
+        height: 117px;
157
+        background: #f9fafb;
158
+        border: 1px solid #e5e9ed;
159
+        border-radius: 5px;
160
+        overflow: hidden;
161
+        margin-top: 12px;
162
+
163
+        div {
164
+          text-align: center;
165
+          margin: 0;
166
+
167
+          &.icon {
168
+            margin-top: 17px;
169
+
170
+            i {
171
+              color: #34b349;
172
+              font-size: 30px !important;
173
+
174
+              &.transport-wenhao {
175
+                color: #f5a523;
176
+              }
177
+
178
+              &.transport-shibai {
179
+                color: #ff3a52;
180
+              }
181
+            }
182
+          }
183
+
184
+          &.defeat {
185
+            color: #333;
186
+            font-size: 18px;
187
+          }
188
+
189
+          &:nth-child(3) {
190
+            font-size: 14px;
191
+            color: #666;
192
+          }
193
+        }
194
+      }
195
+
196
+      button {
197
+        margin-top: 10px;
198
+
199
+        &.btn {
200
+          margin-left: 8px;
201
+        }
202
+      }
203
+    }
204
+
205
+    // 新增
206
+    &.add {
207
+      .modalBody {
208
+        width: 480px;
209
+        height: auto;
210
+
211
+        .content {
212
+          width: 100%;
213
+          height: auto;
214
+          padding: 18px 14px 0 14px;
215
+
216
+          .addForm {
217
+            .ant-form-item {
218
+              margin-bottom: 15px;
219
+
220
+              .ant-form-item-label {
221
+                line-height: 0;
222
+                text-align: left;
223
+              }
224
+            }
225
+          }
226
+
227
+          .editForm {
228
+            .ant-form-item {
229
+              margin-bottom: 15px;
230
+
231
+              .ant-form-item-label {
232
+                line-height: 0;
233
+                text-align: left;
234
+              }
235
+            }
236
+          }
237
+        }
238
+
239
+        button {
240
+          &:nth-child(1) {
241
+            margin-right: 20px;
242
+          }
243
+        }
244
+      }
245
+    }
246
+  }
116
 }
247
 }

+ 105 - 15
src/app/views/washing-batch-view/washing-batch-view.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, AfterViewInit, HostListener } from "@angular/core";
2
 import { ToolService } from 'src/app/services/tool.service';
2
 import { ToolService } from 'src/app/services/tool.service';
3
 import { MainService } from 'src/app/services/main.service';
3
 import { MainService } from 'src/app/services/main.service';
4
 import { ActivatedRoute } from '@angular/router';
4
 import { ActivatedRoute } from '@angular/router';
5
+import { FormGroup, Validators, FormBuilder } from '@angular/forms';
5
 
6
 
6
 @Component({
7
 @Component({
7
   selector: "app-washing-batch-view",
8
   selector: "app-washing-batch-view",
@@ -12,13 +13,15 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
12
   constructor(
13
   constructor(
13
     public tool: ToolService,
14
     public tool: ToolService,
14
     private mainService: MainService,
15
     private mainService: MainService,
15
-    private route: ActivatedRoute,
16
+    public route: ActivatedRoute,
17
+    private fb: FormBuilder,
16
   ){}
18
   ){}
17
 
19
 
18
   ngOnInit() {
20
   ngOnInit() {
19
     this.hosId = this.tool.getCurrentHospital().id;
21
     this.hosId = this.tool.getCurrentHospital().id;
20
     this.getParentList();
22
     this.getParentList();
21
     this.getChildList();
23
     this.getChildList();
24
+    this.getDictionaryList();
22
     this.getList();
25
     this.getList();
23
   }
26
   }
24
 
27
 
@@ -43,24 +46,40 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
43
   hosId:any;
46
   hosId:any;
44
   searchDto:any = {
47
   searchDto:any = {
45
     parent: null,
48
     parent: null,
49
+    child: null,
46
   }
50
   }
47
   parentList: Array<any> = []; //父级分类数据字典信息
51
   parentList: Array<any> = []; //父级分类数据字典信息
48
   childList: Array<any> = []; //分类数据字典信息
52
   childList: Array<any> = []; //分类数据字典信息
49
   rows:any[] = [];
53
   rows:any[] = [];
50
   totalData:any = {};
54
   totalData:any = {};
51
 
55
 
56
+  // 查看业务数据
57
+  washingExceptionModalShow = false; //业务数据弹窗开关
58
+  viewDetail() {
59
+    this.washingExceptionModalShow = true;
60
+  }
61
+  // 关闭业务数据弹窗
62
+  closeModelWashingException(e) {
63
+    this.washingExceptionModalShow = JSON.parse(e).show;
64
+  }
65
+
52
   // 全选
66
   // 全选
53
   checkAll(value: boolean): void {
67
   checkAll(value: boolean): void {
54
     this.listOfData.forEach((item) => {
68
     this.listOfData.forEach((item) => {
55
-      this.mapOfCheckedId[item[0]] = value;
69
+      if (item[0][1] != 5) {
70
+        this.mapOfCheckedId[item[0][0]] = value;
71
+      }
56
     });
72
     });
57
     this.refreshStatus();
73
     this.refreshStatus();
58
   }
74
   }
59
 
75
 
60
   // 单选
76
   // 单选
61
   refreshStatus(): void {
77
   refreshStatus(): void {
62
-    this.isAllDisplayDataChecked = this.listOfData.every(
63
-      (item) => this.mapOfCheckedId[item[0]]
78
+    let listOfData = this.listOfData.filter(
79
+      (item) => item[0][1] != 5
80
+    );
81
+    this.isAllDisplayDataChecked = listOfData.every(
82
+      (item) => this.mapOfCheckedId[item[0][0]]
64
     );
83
     );
65
     let arr = [];
84
     let arr = [];
66
     for (var k in this.mapOfCheckedId) {
85
     for (var k in this.mapOfCheckedId) {
@@ -73,7 +92,10 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
73
 
92
 
74
   // 整行操作
93
   // 整行操作
75
   selectedListData(data) {
94
   selectedListData(data) {
76
-    this.mapOfCheckedId[data[0]] = !this.mapOfCheckedId[data[0]];
95
+    if (data[0][1] == 5) {
96
+      return;
97
+    }
98
+    this.mapOfCheckedId[data[0][0]] = !this.mapOfCheckedId[data[0][0]];
77
     this.refreshStatus();
99
     this.refreshStatus();
78
   }
100
   }
79
 
101
 
@@ -98,6 +120,14 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
98
       });
120
       });
99
   }
121
   }
100
 
122
 
123
+  reset(){
124
+    this.searchDto = {
125
+      parent: null,
126
+      child: null,
127
+    }
128
+    this.getList();
129
+  }
130
+
101
   // 获取分类
131
   // 获取分类
102
   getChildList() {
132
   getChildList() {
103
     let postData = {
133
     let postData = {
@@ -136,10 +166,49 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
136
       hosId: this.hosId,
166
       hosId: this.hosId,
137
       batchId: this.route.snapshot.paramMap.get("id"),
167
       batchId: this.route.snapshot.paramMap.get("id"),
138
       deptIds: this.checkedDepIds.toString(),
168
       deptIds: this.checkedDepIds.toString(),
169
+      type: 'clothingSend',
170
+      orderId: 0,
139
     };
171
     };
140
-    this.mainService.clothesWashing(postData, 'batchBack').subscribe((data) => {
172
+    this.mainService.transflow(postData, 'createRemandOrder').subscribe((data) => {
141
       this.loading3 = false;
173
       this.loading3 = false;
142
       this.delModal = false;
174
       this.delModal = false;
175
+      if (data.data && data.data.state == 200) {
176
+        this.showPromptModal("操作", true, "");
177
+      } else {
178
+        this.showPromptModal("操作", false, data.data && data.data.msg);
179
+      }
180
+    });
181
+  }
182
+
183
+  //修改数量
184
+  btnLoading = false;
185
+  washingModal: boolean = false; //模态框
186
+  washingCoopData:any = {};
187
+  showWashingModal(row) {
188
+    this.washingCoopData = row;
189
+    this.washingModal = true;
190
+    this.initForm();
191
+  }
192
+  hideWashingModal() {
193
+    this.washingModal = false;
194
+  }
195
+  confirmWashing() {
196
+    for (const i in this.validateForm.controls) {
197
+      this.validateForm.controls[i].markAsDirty();
198
+      this.validateForm.controls[i].updateValueAndValidity();
199
+    }
200
+    if (this.validateForm.invalid) return;
201
+    this.btnLoading = true;
202
+    let postData: any = {
203
+      hosId: this.hosId,
204
+      id: this.washingCoopData.id,
205
+      sendBackNum: this.validateForm.value.sendBackNum,
206
+      clothesExceptionResId: this.validateForm.value.clothesExceptionResId,
207
+      remarks: this.validateForm.value.remarks,
208
+    };
209
+    this.mainService.simplePost("addData", "clothesWashing", postData).subscribe((data) => {
210
+      this.btnLoading = false;
211
+      this.washingModal = false;
143
       if (data.status == 200) {
212
       if (data.status == 200) {
144
         this.showPromptModal("操作", true, "");
213
         this.showPromptModal("操作", true, "");
145
       } else {
214
       } else {
@@ -148,6 +217,16 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
148
     });
217
     });
149
   }
218
   }
150
 
219
 
220
+  // 初始化form表单
221
+  validateForm: FormGroup;
222
+  initForm() {
223
+    this.validateForm = this.fb.group({
224
+      sendBackNum: [0, [Validators.required]],
225
+      clothesExceptionResId: [null, [Validators.required]],
226
+      remarks: [null, [Validators.required]],
227
+    });
228
+  }
229
+
151
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
230
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
152
   promptContent: string; //操作提示框提示信息
231
   promptContent: string; //操作提示框提示信息
153
   ifSuccess: boolean; //操作成功/失败
232
   ifSuccess: boolean; //操作成功/失败
@@ -164,13 +243,27 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
164
     this.getList();
243
     this.getList();
165
   }
244
   }
166
 
245
 
246
+  // 点击数字
247
+  clickNum(e, row){
248
+    e.stopPropagation();
249
+    this.showWashingModal(row)
250
+  }
251
+
252
+  dictionaryList: Array<any> = []; //数据字典信息
253
+  // 数据字典列表
254
+  getDictionaryList() {
255
+    this.mainService.getDictionary("list", "clothes_exception").subscribe((data:any) => {
256
+      this.dictionaryList = data || [];
257
+    })
258
+  }
259
+
167
   // 表格数据
260
   // 表格数据
168
   getList() {
261
   getList() {
169
     let postData: any = {
262
     let postData: any = {
170
       hosId: this.hosId,
263
       hosId: this.hosId,
171
       batchId: this.route.snapshot.paramMap.get("id"),
264
       batchId: this.route.snapshot.paramMap.get("id"),
172
-      clothesTypeParent: undefined,
173
-      clothesType: undefined,
265
+      clothesTypeParent: this.searchDto.parent,
266
+      clothesType: this.searchDto.child,
174
     };
267
     };
175
     this.loading = true;
268
     this.loading = true;
176
     this.mainService
269
     this.mainService
@@ -179,15 +272,12 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
179
         this.loading = false;
272
         this.loading = false;
180
         if(result.status == 200){
273
         if(result.status == 200){
181
           let rows = result.head || [];
274
           let rows = result.head || [];
182
-          this.rows = ['', ...rows.map(v => v.name), '','件数', '费用/元'];
275
+          this.rows = [['id', 'clothesState', ''], rows.map(v => v.name), ['','件数', '费用/元']];
183
           let listOfData_res = result.data || [];
276
           let listOfData_res = result.data || [];
184
           this.listOfData = listOfData_res.map(v => ([
277
           this.listOfData = listOfData_res.map(v => ([
185
-            v.id,
186
-            v.dept,
187
-            ...v.clothesWashingDTOS.map(vv => vv.sendBackNum),
188
-            '',
189
-            v.nums,
190
-            v.price,
278
+            [v.id, v.clothesState.value, v.dept],
279
+            v.clothesWashingDTOS,
280
+            ['', v.nums, v.price]
191
           ]))
281
           ]))
192
           this.totalData = result.totalData || {};
282
           this.totalData = result.totalData || {};
193
         }
283
         }

+ 4 - 15
src/app/views/washing-batch/washing-batch.component.ts

@@ -100,32 +100,21 @@ export class WashingBatchComponent implements OnInit {
100
     this.tipsMsg1 = tipsMsg1;
100
     this.tipsMsg1 = tipsMsg1;
101
     this.tipsMsg2 = tipsMsg2;
101
     this.tipsMsg2 = tipsMsg2;
102
   }
102
   }
103
-  // 隐藏删除框
103
+  // 隐藏弹窗
104
   hideDelModal() {
104
   hideDelModal() {
105
     this.delModal = false;
105
     this.delModal = false;
106
   }
106
   }
107
-  // 确认删除
107
+  // 确认弹窗
108
   confirmDel() {
108
   confirmDel() {
109
     this.btnLoading = true;
109
     this.btnLoading = true;
110
     if (this.confirmDelType === "recount") {
110
     if (this.confirmDelType === "recount") {
111
-      //删除
111
+      //重新统计
112
       this.washingBatchService
112
       this.washingBatchService
113
-        .simplePost("rmvData", "clothesBatch", [this.coopId.id])
113
+        .simplePost("addData", "clothesBatch", {id: this.coopId.id, hosId: this.currentHospital.id})
114
         .subscribe((data) => {
114
         .subscribe((data) => {
115
           this.btnLoading = false;
115
           this.btnLoading = false;
116
           this.delModal = false;
116
           this.delModal = false;
117
           if (data.status == 200) {
117
           if (data.status == 200) {
118
-            if (
119
-              this.listOfData.length == 1 &&
120
-              this.pageIndex == Math.ceil(this.listLength / this.pageSize)
121
-            ) {
122
-              this.listLength--;
123
-              if (this.listLength === 0) {
124
-                this.pageIndex = 1;
125
-              } else {
126
-                this.pageIndex = Math.ceil(this.listLength / this.pageSize);
127
-              }
128
-            }
129
             this.showPromptModal(this.tipsMsg2, true, "");
118
             this.showPromptModal(this.tipsMsg2, true, "");
130
           } else {
119
           } else {
131
             this.showPromptModal(this.tipsMsg2, false, data.msg);
120
             this.showPromptModal(this.tipsMsg2, false, data.msg);