seimin 1 年之前
父节点
当前提交
6ccced9f37

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "/service": {
2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.223",
4
     "logLevel": "debug",
4
     "logLevel": "debug",
5
     "changeOrigin": true,
5
     "changeOrigin": true,
6
     "pathRewrite": {
6
     "pathRewrite": {

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

@@ -62,11 +62,6 @@ const routes: Routes = [
62
     loadChildren: () => import('./views/specimen-view2/specimen-view2.module').then(m => m.SpecimenView2Module),
62
     loadChildren: () => import('./views/specimen-view2/specimen-view2.module').then(m => m.SpecimenView2Module),
63
     canActivate: [SpecimenView2Guard]
63
     canActivate: [SpecimenView2Guard]
64
   },
64
   },
65
-  // 洗涤批次视图
66
-  {
67
-    path: 'washingBatchView',
68
-    loadChildren: () => import('./views/washing-batch-view/washing-batch-view.module').then(m => m.WashingBatchViewModule),
69
-  },
70
   // 全局业务查看
65
   // 全局业务查看
71
   {
66
   {
72
     path: 'disinfectionSupply',
67
     path: 'disinfectionSupply',
@@ -78,6 +73,11 @@ const routes: Routes = [
78
     path: "preview",
73
     path: "preview",
79
     loadChildren: () => import("./views/preview/preview.module").then((m) => m.PreviewModule),
74
     loadChildren: () => import("./views/preview/preview.module").then((m) => m.PreviewModule),
80
   },
75
   },
76
+  // 洗涤批次视图
77
+  {
78
+    path: 'washingBatchView',
79
+    loadChildren: () => import('./views/washing-batch-view/washing-batch-view.module').then(m => m.WashingBatchViewModule),
80
+  },
81
   // 管理端首页
81
   // 管理端首页
82
   {
82
   {
83
     path: '**',
83
     path: '**',

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

@@ -754,4 +754,11 @@ export class MainService {
754
       headers: this.headers,
754
       headers: this.headers,
755
     });
755
     });
756
   }
756
   }
757
+
758
+  // 被服洗涤-视图
759
+  clothesWashing(data, type): any {
760
+    return this.http.post(host.host + "/clothesWashing/" + type, data, {
761
+      headers: this.headers,
762
+    });
763
+  }
757
 }
764
 }

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

@@ -47,15 +47,15 @@
47
         <tbody>
47
         <tbody>
48
           <tr *ngFor="let data of listOfData;let i = index">
48
           <tr *ngFor="let data of listOfData;let i = index">
49
             <td>{{i+1}}</td>
49
             <td>{{i+1}}</td>
50
-            <td>{{ data.relatedDept?.dept }}</td>
50
+            <td>{{ data.relatedDeptDTO?.dept }}</td>
51
             <td>{{ data.batchCode }}</td>
51
             <td>{{ data.batchCode }}</td>
52
             <td>{{ data.clothesType?.name }}</td>
52
             <td>{{ data.clothesType?.name }}</td>
53
             <td>{{ data.recyclingNum }}</td>
53
             <td>{{ data.recyclingNum }}</td>
54
             <td>{{ data.sendBackNum }}</td>
54
             <td>{{ data.sendBackNum }}</td>
55
             <td>{{ data.exception == 1 ? '是' : '否' }}</td>
55
             <td>{{ data.exception == 1 ? '是' : '否' }}</td>
56
-            <td>{{ data.recyclersId?.name }}</td>
56
+            <td>{{ data.recyclersIdDTO?.name }}</td>
57
             <td>{{ data.recyclingTime | date:'yyyy-MM-dd HH:mm' }}</td>
57
             <td>{{ data.recyclingTime | date:'yyyy-MM-dd HH:mm' }}</td>
58
-            <td>{{ data.sendBackId?.name }}</td>
58
+            <td>{{ data.sendBackIdDTO?.name }}</td>
59
             <td>{{ data.sendBackTime | date:'yyyy-MM-dd HH:mm' }}</td>
59
             <td>{{ data.sendBackTime | date:'yyyy-MM-dd HH:mm' }}</td>
60
             <td>{{ data.clothesState?.name }}</td>
60
             <td>{{ data.clothesState?.name }}</td>
61
           </tr>
61
           </tr>

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

@@ -25,7 +25,7 @@
25
           </nz-select>
25
           </nz-select>
26
         </div>
26
         </div>
27
         <!-- 被服洗涤科室 -->
27
         <!-- 被服洗涤科室 -->
28
-        <!-- <div class="display_flex align-items_center mb8">
28
+        <div class="display_flex align-items_center mb8">
29
           <nz-form-label class="label" nzRequired>被服洗涤科室</nz-form-label>
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">
30
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择" (nzOnSearch)="changeDept($event)" [(ngModel)]="clothingDept">
31
             <ng-container *ngFor="let data of clothingDepts">
31
             <ng-container *ngFor="let data of clothingDepts">
@@ -35,7 +35,7 @@
35
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
35
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
36
             </nz-option>
36
             </nz-option>
37
           </nz-select>
37
           </nz-select>
38
-        </div> -->
38
+        </div>
39
         <!-- 批次号生成规则 -->
39
         <!-- 批次号生成规则 -->
40
         <!-- <div class="display_flex align-items_center mb8">
40
         <!-- <div class="display_flex align-items_center mb8">
41
           <nz-form-label class="label" nzRequired>批次号生成规则</nz-form-label>
41
           <nz-form-label class="label" nzRequired>批次号生成规则</nz-form-label>

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

@@ -17,7 +17,7 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
17
   hosId = this.tool.getCurrentHospital().id; //当前院区
17
   hosId = this.tool.getCurrentHospital().id; //当前院区
18
 
18
 
19
   // 积分计算方式
19
   // 积分计算方式
20
-  // clothingDept:any = null;
20
+  clothingDept:any = null;
21
   // 批次号生成规则
21
   // 批次号生成规则
22
   // batchNoRule:any = null;
22
   // batchNoRule:any = null;
23
   // 配置
23
   // 配置
@@ -32,7 +32,7 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
32
       fun.call(this, v[1]);
32
       fun.call(this, v[1]);
33
     });
33
     });
34
     this.getTaskTypes();
34
     this.getTaskTypes();
35
-    // this.getDepts();
35
+    this.getDepts();
36
     // this.getClothingBatchnoRule();
36
     // this.getClothingBatchnoRule();
37
     this.getConfig();
37
     this.getConfig();
38
   }
38
   }
@@ -51,9 +51,9 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
51
     this.searchTimer(this.getTaskTypes, e);
51
     this.searchTimer(this.getTaskTypes, e);
52
   }
52
   }
53
 
53
 
54
-  // changeDept(e) {
55
-  //   this.searchTimer(this.getDepts, e);
56
-  // }
54
+  changeDept(e) {
55
+    this.searchTimer(this.getDepts, e);
56
+  }
57
 
57
 
58
   //获取任务类型
58
   //获取任务类型
59
   getTaskTypes(e:string = '') {
59
   getTaskTypes(e:string = '') {
@@ -84,27 +84,27 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
84
   }
84
   }
85
 
85
 
86
   //获取科室
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
-  // }
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
   //获取批次号生成规则
108
   //获取批次号生成规则
109
   // clothing_batchno_rule:any = [];
109
   // clothing_batchno_rule:any = [];
110
   // getClothingBatchnoRule() {
110
   // getClothingBatchnoRule() {
@@ -128,10 +128,10 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
128
       return;
128
       return;
129
     }
129
     }
130
 
130
 
131
-    // if(!this.clothingDept){
132
-    //   this.msg.create("warning", "请先配置被服洗涤科室!");
133
-    //   return;
134
-    // }
131
+    if(!this.clothingDept){
132
+      this.msg.create("warning", "请先配置被服洗涤科室!");
133
+      return;
134
+    }
135
 
135
 
136
     // if(!this.batchNoRule){
136
     // if(!this.batchNoRule){
137
     //   this.msg.create("warning", "请先配置批次号生成规则!");
137
     //   this.msg.create("warning", "请先配置批次号生成规则!");
@@ -143,7 +143,7 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
143
       taskType: this.clothingSendTypeId,
143
       taskType: this.clothingSendTypeId,
144
       clothingSendTypeId: this.clothingSendTypeId,
144
       clothingSendTypeId: this.clothingSendTypeId,
145
       hosId: this.hosId,
145
       hosId: this.hosId,
146
-      // clothingDept: this.clothingDept,
146
+      clothingDept: this.clothingDept,
147
       // batchNoRule: { id: this.batchNoRule },
147
       // batchNoRule: { id: this.batchNoRule },
148
     };
148
     };
149
     this.btnLoading = true;
149
     this.btnLoading = true;
@@ -181,7 +181,7 @@ export class QuiltWashingSendPageControlComponent implements OnInit {
181
         this.loading = false;
181
         this.loading = false;
182
         if (result.status == 200) {
182
         if (result.status == 200) {
183
           this.configs = result.list[0] || {};
183
           this.configs = result.list[0] || {};
184
-          // this.clothingDept = this.configs.clothingDept;
184
+          this.clothingDept = this.configs.clothingDept;
185
           // this.batchNoRule = this.configs.batchNoRule ? this.configs.batchNoRule.id : null;
185
           // this.batchNoRule = this.configs.batchNoRule ? this.configs.batchNoRule.id : null;
186
           this.clothingSendTypeId = this.configs.clothingSendTypeId || null;
186
           this.clothingSendTypeId = this.configs.clothingSendTypeId || null;
187
         }
187
         }

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

@@ -4,7 +4,7 @@ import { WashingBatchViewComponent } from "./washing-batch-view.component";
4
 
4
 
5
 const routes: Routes = [
5
 const routes: Routes = [
6
   {
6
   {
7
-    path: "",
7
+    path: ":id",
8
     component: WashingBatchViewComponent,
8
     component: WashingBatchViewComponent,
9
   },
9
   },
10
 ];
10
 ];

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

@@ -28,10 +28,10 @@
28
         </div>
28
         </div>
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>搜索</button>
31
+        <button nzType="primary" nz-button (click)="getList()">搜索</button>
32
         <button nzType="primary" nz-button>打印功能</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>批量送回</button>
34
+        <button nzType="primary" nz-button (click)="showDelModal()">批量送回</button>
35
       </div>
35
       </div>
36
     </div>
36
     </div>
37
     <div class="list">
37
     <div class="list">
@@ -41,20 +41,27 @@
41
           <tr class="thead">
41
           <tr class="thead">
42
             <th nzLeft="0px" nzAlign="center" nzWidth="40px" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
42
             <th nzLeft="0px" nzAlign="center" nzWidth="40px" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
43
               (nzCheckedChange)="checkAll($event)"></th>
43
               (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' : '65px')" *ngFor="let row of rows;let first = first;let last = last;let index = index;">{{ row }}</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>
45
           </tr>
45
           </tr>
46
         </thead>
46
         </thead>
47
         <tbody>
47
         <tbody>
48
           <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
48
           <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
49
-            <td nzLeft="0px" nzAlign="center" nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
50
-            <td [nzLeft]="first ? '40px' : null" [nzRight]="last ? '0px' : (index == rows.length - 2 ? '100px' : null)" nzAlign="center" *ngFor="let row of data;let first = first;let last = last;let index = index;">{{ row }}</td>
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>
51
           </tr>
51
           </tr>
52
         </tbody>
52
         </tbody>
53
       </nz-table>
53
       </nz-table>
54
     </div>
54
     </div>
55
     <div class="bottom">
55
     <div class="bottom">
56
-      <strong>总件数:1365件</strong>
57
-      <strong>总费用:4089.4元</strong>
56
+      <strong>总件数:{{totalData.totalNum}}件</strong>
57
+      <strong>总费用:{{totalData.totalPrice}}元</strong>
58
     </div>
58
     </div>
59
   </div>
59
   </div>
60
 </div>
60
 </div>
61
+<!-- 模态框 -->
62
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="loading3"
63
+(confirmDelEvent)="confirmDel()" [content]="content"></app-dialog-delete>
64
+
65
+<!-- 操作成功/失败提示框 -->
66
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
67
+  [info]="promptInfo"></app-prompt-modal>

+ 84 - 28
src/app/views/washing-batch-view/washing-batch-view.component.ts

@@ -1,6 +1,7 @@
1
 import { Component, OnInit, AfterViewInit, HostListener } from "@angular/core";
1
 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
 
5
 
5
 @Component({
6
 @Component({
6
   selector: "app-washing-batch-view",
7
   selector: "app-washing-batch-view",
@@ -11,12 +12,14 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
11
   constructor(
12
   constructor(
12
     public tool: ToolService,
13
     public tool: ToolService,
13
     private mainService: MainService,
14
     private mainService: MainService,
15
+    private route: ActivatedRoute,
14
   ){}
16
   ){}
15
 
17
 
16
   ngOnInit() {
18
   ngOnInit() {
17
     this.hosId = this.tool.getCurrentHospital().id;
19
     this.hosId = this.tool.getCurrentHospital().id;
18
     this.getParentList();
20
     this.getParentList();
19
     this.getChildList();
21
     this.getChildList();
22
+    this.getList();
20
   }
23
   }
21
 
24
 
22
   ngAfterViewInit(){
25
   ngAfterViewInit(){
@@ -31,30 +34,7 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
31
     }, 500)
34
     }, 500)
32
   }
35
   }
33
 
36
 
34
-  listOfData: any[] = [
35
-    ['眼科康复科睡', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
36
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
37
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
38
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
39
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
40
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
41
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
42
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
43
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
44
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
45
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
46
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
47
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
48
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
49
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
50
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
51
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
52
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
53
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
54
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
55
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
56
-    ['大势科室', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18.05],
57
-  ]; //表格数据
37
+  listOfData: any[] = []; //表格数据
58
   loading:boolean = false;
38
   loading:boolean = false;
59
   isAllDisplayDataChecked = false; //当前页是否全选
39
   isAllDisplayDataChecked = false; //当前页是否全选
60
   mapOfCheckedId: { [key: string]: boolean } = {};
40
   mapOfCheckedId: { [key: string]: boolean } = {};
@@ -66,12 +46,13 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
66
   }
46
   }
67
   parentList: Array<any> = []; //父级分类数据字典信息
47
   parentList: Array<any> = []; //父级分类数据字典信息
68
   childList: Array<any> = []; //分类数据字典信息
48
   childList: Array<any> = []; //分类数据字典信息
69
-  rows:any[] = ['', '双单', '洗手衣上', '大包布', '中包布', '隔离衣', '无菌巾', '小洞巾', '大洞巾', '小毛巾', '病员服', '仪器套', '裤腿', '床套', '沙发套', '窗帘', '隔帘', '浴巾', '件数', '费用/元'];
49
+  rows:any[] = [];
50
+  totalData:any = {};
70
 
51
 
71
   // 全选
52
   // 全选
72
   checkAll(value: boolean): void {
53
   checkAll(value: boolean): void {
73
     this.listOfData.forEach((item) => {
54
     this.listOfData.forEach((item) => {
74
-      this.mapOfCheckedId[item.id] = value;
55
+      this.mapOfCheckedId[item[0]] = value;
75
     });
56
     });
76
     this.refreshStatus();
57
     this.refreshStatus();
77
   }
58
   }
@@ -79,7 +60,7 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
79
   // 单选
60
   // 单选
80
   refreshStatus(): void {
61
   refreshStatus(): void {
81
     this.isAllDisplayDataChecked = this.listOfData.every(
62
     this.isAllDisplayDataChecked = this.listOfData.every(
82
-      (item) => this.mapOfCheckedId[item.id]
63
+      (item) => this.mapOfCheckedId[item[0]]
83
     );
64
     );
84
     let arr = [];
65
     let arr = [];
85
     for (var k in this.mapOfCheckedId) {
66
     for (var k in this.mapOfCheckedId) {
@@ -92,7 +73,7 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
92
 
73
 
93
   // 整行操作
74
   // 整行操作
94
   selectedListData(data) {
75
   selectedListData(data) {
95
-    this.mapOfCheckedId[data.id] = !this.mapOfCheckedId[data.id];
76
+    this.mapOfCheckedId[data[0]] = !this.mapOfCheckedId[data[0]];
96
     this.refreshStatus();
77
     this.refreshStatus();
97
   }
78
   }
98
 
79
 
@@ -137,5 +118,80 @@ export class WashingBatchViewComponent implements OnInit, AfterViewInit {
137
         }
118
         }
138
       });
119
       });
139
   }
120
   }
121
+
122
+  //批量送回
123
+  loading3 = false;
124
+  delModal: boolean = false; //模态框
125
+  content:string = '';
126
+  showDelModal() {
127
+    this.delModal = true;
128
+    this.content = `您选择了${this.checkedDepIds.length}个科室批量送回被服,您确认吗?`;
129
+  }
130
+  hideDelModal() {
131
+    this.delModal = false;
132
+  }
133
+  confirmDel() {
134
+    this.loading3 = true;
135
+    let postData: any = {
136
+      hosId: this.hosId,
137
+      batchId: this.route.snapshot.paramMap.get("id"),
138
+      deptIds: this.checkedDepIds.toString(),
139
+    };
140
+    this.mainService.clothesWashing(postData, 'batchBack').subscribe((data) => {
141
+      this.loading3 = false;
142
+      this.delModal = false;
143
+      if (data.status == 200) {
144
+        this.showPromptModal("操作", true, "");
145
+      } else {
146
+        this.showPromptModal("操作", false, data.msg);
147
+      }
148
+    });
149
+  }
150
+
151
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
152
+  promptContent: string; //操作提示框提示信息
153
+  ifSuccess: boolean; //操作成功/失败
154
+  promptInfo: string; //操作结果提示信息
155
+  promptModalShow: boolean; //操作提示框是否展示
156
+  showPromptModal(con, success, promptInfo?) {
157
+    this.promptModalShow = false;
158
+    this.promptContent = con;
159
+    this.ifSuccess = success;
160
+    this.promptInfo = promptInfo;
161
+    setTimeout(() => {
162
+      this.promptModalShow = true;
163
+    }, 100);
164
+    this.getList();
165
+  }
166
+
167
+  // 表格数据
168
+  getList() {
169
+    let postData: any = {
170
+      hosId: this.hosId,
171
+      batchId: this.route.snapshot.paramMap.get("id"),
172
+      clothesTypeParent: undefined,
173
+      clothesType: undefined,
174
+    };
175
+    this.loading = true;
176
+    this.mainService
177
+      .clothesWashing(postData, 'view')
178
+      .subscribe((result) => {
179
+        this.loading = false;
180
+        if(result.status == 200){
181
+          let rows = result.head || [];
182
+          this.rows = ['', ...rows.map(v => v.name), '','件数', '费用/元'];
183
+          let listOfData_res = result.data || [];
184
+          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,
191
+          ]))
192
+          this.totalData = result.totalData || {};
193
+        }
194
+      });
195
+  }
140
 }
196
 }
141
 
197
 

+ 3 - 7
src/app/views/washing-batch/washing-batch.component.ts

@@ -1,12 +1,9 @@
1
 import { Component, OnInit } from "@angular/core";
1
 import { Component, OnInit } from "@angular/core";
2
-import { ActivatedRoute } from "@angular/router";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
 import { FormBuilder, Validators, FormGroup } from "@angular/forms";
3
 import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
 
4
 
5
 import { ToolService } from "../../services/tool.service";
5
 import { ToolService } from "../../services/tool.service";
6
 import { WashingBatchService } from './washing-batch.service';
6
 import { WashingBatchService } from './washing-batch.service';
7
-import { Subject } from 'rxjs';
8
-import { debounceTime } from 'rxjs/operators';
9
-import { NzMessageService } from 'ng-zorro-antd/message';
10
 @Component({
7
 @Component({
11
   selector: "app-washing-batch",
8
   selector: "app-washing-batch",
12
   templateUrl: "./washing-batch.component.html",
9
   templateUrl: "./washing-batch.component.html",
@@ -14,11 +11,10 @@ import { NzMessageService } from 'ng-zorro-antd/message';
14
 })
11
 })
15
 export class WashingBatchComponent implements OnInit {
12
 export class WashingBatchComponent implements OnInit {
16
   constructor(
13
   constructor(
17
-    private fb: FormBuilder,
18
     private washingBatchService: WashingBatchService,
14
     private washingBatchService: WashingBatchService,
19
     private route: ActivatedRoute,
15
     private route: ActivatedRoute,
20
     private tool: ToolService,
16
     private tool: ToolService,
21
-    private message: NzMessageService,
17
+    public router: Router,
22
   ) {}
18
   ) {}
23
 
19
 
24
   userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
20
   userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
@@ -166,7 +162,7 @@ export class WashingBatchComponent implements OnInit {
166
   }
162
   }
167
   // 立即查看
163
   // 立即查看
168
   recAndDel() {
164
   recAndDel() {
169
-    alert('立即查看');
165
+    this.router.navigateByUrl("/washingBatchView/" + this.coopData.id);
170
   }
166
   }
171
   // 取消
167
   // 取消
172
   closeRecallOrderModal() {
168
   closeRecallOrderModal() {