Browse Source

大输液管理开发

maotao 9 months ago
parent
commit
9101845e32

+ 29 - 26
src/app/views/admin-office-prescription/admin-office-prescription.component.html

@@ -19,7 +19,7 @@
19
         </div>
19
         </div>
20
         <div class="list-template__searchItem">
20
         <div class="list-template__searchItem">
21
           <span class="label">创建时间:</span>
21
           <span class="label">创建时间:</span>
22
-          <nz-range-picker [(ngModel)]="dateRange" [nzShowTime]="{ nzFormat: 'HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
22
+          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
23
 					(ngModelChange)="changeDate($event)"></nz-range-picker>
23
 					(ngModelChange)="changeDate($event)"></nz-range-picker>
24
         </div>
24
         </div>
25
       </div>
25
       </div>
@@ -46,18 +46,18 @@
46
             <th nzWidth="18%">操作</th>
46
             <th nzWidth="18%">操作</th>
47
           </tr>
47
           </tr>
48
         </thead>
48
         </thead>
49
-        <tbody>
49
+        <tbody v-if="listOfData && listOfData.length>0">
50
           <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
50
           <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
51
             <td>
51
             <td>
52
 							<div>{{ data.packingNo}}</div>
52
 							<div>{{ data.packingNo}}</div>
53
 							<div>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
53
 							<div>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
54
 						</td>
54
 						</td>
55
             <td>{{ data.batch?data.batch.batchNo:'-' }}</td>
55
             <td>{{ data.batch?data.batch.batchNo:'-' }}</td>
56
-            <td>{{ data.applyDept||'无' }}</td>
57
-            <td>{{ data.totalCount||'' }}</td>
58
-            <td>{{data.kindCount||''}}</td>
59
-            <td>{{ data.expendPrice }}</td>
60
-            <td>{{ data.actualPrice }}</td>
56
+            <td>{{ data.applyDeptDTO?data.applyDeptDTO.dept :'-' }}</td>
57
+            <td>{{ data.totalCount||'0' }}</td>
58
+            <td>{{data.kindCount||'0'}}</td>
59
+            <td>{{ data.expendPrice ||'0' }}</td>
60
+            <td>{{ data.actualPrice || '0'}}</td>
61
             <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-'}}</td>
61
             <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-'}}</td>
62
 						<td>{{ data.createOrder==1?'是':'否'}}</td>
62
 						<td>{{ data.createOrder==1?'是':'否'}}</td>
63
 						<td>{{ data.orderState.name}}</td>
63
 						<td>{{ data.orderState.name}}</td>
@@ -65,7 +65,7 @@
65
               <div class="coop">
65
               <div class="coop">
66
                 <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
66
                 <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
67
                 <span *ngIf="coopBtns.print" (click)="print($event, data, data.id)">打印</span>
67
                 <span *ngIf="coopBtns.print" (click)="print($event, data, data.id)">打印</span>
68
-                <span *ngIf="coopBtns.establish && data.createOrder=='0'" (click)="addDateModal(data)">配送建单</span>
68
+                <span *ngIf="coopBtns.establish && ( data.createOrder=='0' || data.createOrder==null)" (click)="addDateModal(data)">配送建单</span>
69
               </div>
69
               </div>
70
             </td>
70
             </td>
71
           </tr>
71
           </tr>
@@ -90,8 +90,9 @@
90
             [nzLoading]="loading1">
90
             [nzLoading]="loading1">
91
             <thead>
91
             <thead>
92
               <tr class="thead">
92
               <tr class="thead">
93
-                <th nzWidth="15%">药品名称</th>
94
-                <th nzWidth="15%">规格</th>
93
+								<th nzWidth="10%">药品标识</th>
94
+                <th nzWidth="10%">药品名称</th>
95
+                <th nzWidth="10%">规格</th>
95
                 <th nzWidth="10%">消耗数量</th>
96
                 <th nzWidth="10%">消耗数量</th>
96
                 <th nzWidth="10%">实发数量</th>
97
                 <th nzWidth="10%">实发数量</th>
97
                 <th nzWidth="10%">包装规格</th>
98
                 <th nzWidth="10%">包装规格</th>
@@ -103,15 +104,16 @@
103
             </thead>
104
             </thead>
104
             <tbody>
105
             <tbody>
105
               <tr *ngFor="let data of viewData">
106
               <tr *ngFor="let data of viewData">
107
+								<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'无' }}</td>
106
                 <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
108
                 <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
107
                 <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
109
                 <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
108
-                <td>{{ data.expendCount||'' }}</td>
109
-                <td>{{ data.actualCount||'' }}</td>
110
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'' }}</td>
111
-                <td>{{ data.cartonNum || '' }}</td>
112
-                <td>{{ data.formerInventory || '' }}</td>
113
-                <td>{{ data.afterInventory || '-'}}</td>
114
-        				<td>{{ data.addSub || '' }}</td>
110
+                <td>{{ data.expendCount||'0' }}</td>
111
+                <td>{{ data.actualCount||'0' }}</td>
112
+                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
113
+                <td>{{ data.cartonNum || '0' }}</td>
114
+                <td>{{ data.formerInventory || '0' }}</td>
115
+                <td>{{ data.afterInventory || '0'}}</td>
116
+        				<td>{{ data.addSub || '0' }}</td>
115
               </tr>
117
               </tr>
116
             </tbody>
118
             </tbody>
117
           </nz-table>
119
           </nz-table>
@@ -138,6 +140,7 @@
138
   <!-- 打印 -->
140
   <!-- 打印 -->
139
   <div id="report" style="display: none;">
141
   <div id="report" style="display: none;">
140
 		<div class="monad" 
142
 		<div class="monad" 
143
+				*ngIf="rowData"
141
 				style="padding: 10px;
144
 				style="padding: 10px;
142
 				border: 1px solid #e7e7e7;
145
 				border: 1px solid #e7e7e7;
143
 				border-radius: 5px;">
146
 				border-radius: 5px;">
@@ -147,7 +150,7 @@
147
 				font-size: 16px;
150
 				font-size: 16px;
148
 				border-bottom: 1px solid #e7e7e7;
151
 				border-bottom: 1px solid #e7e7e7;
149
 				padding-bottom: 10px;">
152
 				padding-bottom: 10px;">
150
-				大输液发药单-{{rowData.pharmacyDTO?rowData.pharmacyDTO.dept:''}}
153
+				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
151
 			</div>
154
 			</div>
152
 			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
155
 			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
153
 				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
156
 				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
@@ -156,7 +159,7 @@
156
 			</div>
159
 			</div>
157
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
160
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
158
 				<div class="thead" style="display: flex;">
161
 				<div class="thead" style="display: flex;">
159
-					<div style="text-align: center;width: 20%;height: 40px;
162
+					<div style="text-align: center;width: 40%;height: 40px;
160
 					line-height: 40px;
163
 					line-height: 40px;
161
 					border-right: 1px solid #e7e7e7;
164
 					border-right: 1px solid #e7e7e7;
162
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
165
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
@@ -166,21 +169,21 @@
166
 					border-right: 1px solid #e7e7e7;
169
 					border-right: 1px solid #e7e7e7;
167
 					border-bottom: 1px solid #e7e7e7;">规格</div>
170
 					border-bottom: 1px solid #e7e7e7;">规格</div>
168
 					
171
 					
169
-					<div style="text-align: center;width: 20%;height: 40px;
172
+					<div style="text-align: center;width: 10%;height: 40px;
170
 					line-height: 40px;
173
 					line-height: 40px;
171
 					border-right: 1px solid #e7e7e7;
174
 					border-right: 1px solid #e7e7e7;
172
-					border-bottom: 1px solid #e7e7e7;">总量(实发数量)</div>
175
+					border-bottom: 1px solid #e7e7e7;">总量</div>
173
 					
176
 					
174
-					<div style="text-align: center;width: 20%;height: 40px;
177
+					<div style="text-align: center;width: 10%;height: 40px;
175
 					line-height: 40px;
178
 					line-height: 40px;
176
 					border-right: 1px solid #e7e7e7;
179
 					border-right: 1px solid #e7e7e7;
177
-					border-bottom: 1px solid #e7e7e7;">箱数(发药箱数)</div>
180
+					border-bottom: 1px solid #e7e7e7;">箱数</div>
178
 					
181
 					
179
 					<div style="text-align: center;width: 20%;height: 40px;
182
 					<div style="text-align: center;width: 20%;height: 40px;
180
 					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
183
 					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
181
 				</div>
184
 				</div>
182
 				<div *ngFor="let data of codes" style="display: flex;">
185
 				<div *ngFor="let data of codes" style="display: flex;">
183
-					<div style="text-align: center;width: 20%;height: 40px;
186
+					<div style="text-align: center;width: 40%;height: 40px;
184
 					line-height: 40px;
187
 					line-height: 40px;
185
 					border-right: 1px solid #e7e7e7;
188
 					border-right: 1px solid #e7e7e7;
186
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
189
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
@@ -190,12 +193,12 @@
190
 					border-right: 1px solid #e7e7e7;
193
 					border-right: 1px solid #e7e7e7;
191
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
194
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
192
 					
195
 					
193
-					<div style="text-align: center;width: 20%;height: 40px;
196
+					<div style="text-align: center;width: 10%;height: 40px;
194
 					line-height: 40px;
197
 					line-height: 40px;
195
 					border-right: 1px solid #e7e7e7;
198
 					border-right: 1px solid #e7e7e7;
196
 					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
199
 					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
197
 					
200
 					
198
-					<div style="text-align: center;width: 20%;height: 40px;
201
+					<div style="text-align: center;width: 10%;height: 40px;
199
 					line-height: 40px;
202
 					line-height: 40px;
200
 					border-right: 1px solid #e7e7e7;
203
 					border-right: 1px solid #e7e7e7;
201
 					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>
204
 					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>

+ 4 - 18
src/app/views/admin-office-prescription/admin-office-prescription.component.ts

@@ -10,7 +10,7 @@ import {
10
 import { MainService } from "../../services/main.service";
10
 import { MainService } from "../../services/main.service";
11
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
11
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
12
 import { ToolService } from "../../services/tool.service";
12
 import { ToolService } from "../../services/tool.service";
13
-import { format } from "date-fns";
13
+import { format, startOfDay, endOfDay } from "date-fns";
14
 import { NzMessageService } from "ng-zorro-antd";
14
 import { NzMessageService } from "ng-zorro-antd";
15
 import { Subject } from "rxjs";
15
 import { Subject } from "rxjs";
16
 import { debounceTime, filter } from "rxjs/operators";
16
 import { debounceTime, filter } from "rxjs/operators";
@@ -315,22 +315,8 @@ export class AdminOfficePrescriptionComponent implements OnInit{
315
 	    this.startDate = this.endDate = "";
315
 	    this.startDate = this.endDate = "";
316
 	    return;
316
 	    return;
317
 	  }
317
 	  }
318
-	  this.startDate =
319
-	    result[0].getFullYear() +
320
-	    "-" +
321
-	    (result[0].getMonth() + 1) +
322
-	    "-" +
323
-	    result[0].getDate() +
324
-	    " " +
325
-	    "00:00:00";
326
-	  this.endDate =
327
-	    result[1].getFullYear() +
328
-	    "-" +
329
-	    (result[1].getMonth() + 1) +
330
-	    "-" +
331
-	    result[1].getDate() +
332
-	    " " +
333
-	    "23:59:59";
318
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
319
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
334
 	}
320
 	}
335
 	
321
 	
336
 	// 获取所有科室
322
 	// 获取所有科室
@@ -870,7 +856,7 @@ export class AdminOfficePrescriptionComponent implements OnInit{
870
         that.printLoading = false;
856
         that.printLoading = false;
871
         setTimeout(() => {
857
         setTimeout(() => {
872
           const printContent = document.getElementById("report");
858
           const printContent = document.getElementById("report");
873
-          const WindowPrt = window.open("", "", "width=800,height=900");
859
+          const WindowPrt = window.open("", "", "width=1000,height=900");
874
           WindowPrt.document.write(printContent.innerHTML);
860
           WindowPrt.document.write(printContent.innerHTML);
875
           WindowPrt.document.close();
861
           WindowPrt.document.close();
876
           WindowPrt.focus();
862
           WindowPrt.focus();

+ 10 - 38
src/app/views/big-transfusion-set/big-transfusion-set.component.ts

@@ -19,7 +19,7 @@ export class BigTransfusionSetComponent implements OnInit {
19
   // 接手术关联任务类型
19
   // 接手术关联任务类型
20
   infusionSolutionsTypeId:Number;
20
   infusionSolutionsTypeId:Number;
21
   taskTypes1:any[] = [];
21
   taskTypes1:any[] = [];
22
-  taskTypeData:any[] = [];
22
+  taskTypeData:{id:''};
23
   // 苏醒室科室
23
   // 苏醒室科室
24
   recoveryDeptId:any;
24
   recoveryDeptId:any;
25
   recoveryDepts:any[] = [];
25
   recoveryDepts:any[] = [];
@@ -75,7 +75,6 @@ export class BigTransfusionSetComponent implements OnInit {
75
       fun.call(this, v[1], v[2], v[3]);
75
       fun.call(this, v[1], v[2], v[3]);
76
     });
76
     });
77
     this.getTaskTypes('', true);
77
     this.getTaskTypes('', true);
78
-		this.getTaskTypesId(true);
79
   }
78
   }
80
 
79
 
81
   // 切换tab
80
   // 切换tab
@@ -91,7 +90,7 @@ export class BigTransfusionSetComponent implements OnInit {
91
     }
90
     }
92
     let editData = {
91
     let editData = {
93
 			id:'',
92
 			id:'',
94
-			taskType:this.taskTypeData[0].id,
93
+			taskType:this.taskTypeData.id,
95
 			hosId: this.hosId,
94
 			hosId: this.hosId,
96
 			infusionSolutionsTypeId:this.infusionSolutionsTypeId, //任务类型参数
95
 			infusionSolutionsTypeId:this.infusionSolutionsTypeId, //任务类型参数
97
 			autoCreate:0
96
 			autoCreate:0
@@ -156,37 +155,17 @@ export class BigTransfusionSetComponent implements OnInit {
156
         this.isLoading = false;
155
         this.isLoading = false;
157
         if (result.status == 200) {
156
         if (result.status == 200) {
158
           this.taskTypes1 = result.list || [];
157
           this.taskTypes1 = result.list || [];
159
-          isFirst && this.getConfig();
158
+					this.getTaskTypesId();
160
         }
159
         }
161
       });
160
       });
162
   }
161
   }
163
 	
162
 	
164
 	// 获取任务id
163
 	// 获取任务id
165
-	getTaskTypesId( isFirst:boolean = false) {
166
-	  isFirst && (this.loading = true);
167
-	  let postData:any = {
168
-	    idx: 0,
169
-	    sum: 9999,
170
-	    taskType: {
171
-	      simpleQuery: true,
172
-				ordinaryField: {
173
-					key: 'ordinary_field',
174
-					value: 'infusionSolutions'
175
-				},
176
-	      hosId: {
177
-	        id: this.hosId
178
-	      }
179
-	    }
180
-	  };
181
-	  this.isLoading = true;
182
-	  this.mainService
183
-	    .getFetchDataList("simple/data", "taskType", postData)
184
-	    .subscribe((result) => {
185
-	      this.isLoading = false;
186
-	      if (result.status == 200) {
187
-	        this.taskTypeData = result.list || [];
188
-	      }
189
-	    });
164
+	getTaskTypesId() {
165
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
166
+			this.taskTypeData = data.find(i=>i.value=='infusionSolutions')
167
+			this.getConfig();
168
+		});
190
 	}
169
 	}
191
 	
170
 	
192
   // 获取配置
171
   // 获取配置
@@ -196,15 +175,8 @@ export class BigTransfusionSetComponent implements OnInit {
196
       idx: 0,
175
       idx: 0,
197
       sum: 10,
176
       sum: 10,
198
       taskTypeConfig: {
177
       taskTypeConfig: {
199
-				taskTypeDTO: {
200
-				  hosId: {
201
-				    id: this.hosId
202
-				  },
203
-				  ordinaryField: {
204
-				    key: 'ordinary_field',
205
-				    value: 'infusionSolutions'
206
-				  }
207
-				}
178
+				hosId:this.hosId,
179
+				taskType:this.taskTypeData.id
208
       }
180
       }
209
     };
181
     };
210
     this.mainService
182
     this.mainService

+ 19 - 15
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -8,7 +8,7 @@
8
         </div>
8
         </div>
9
         <div class="list-template__searchItem">
9
         <div class="list-template__searchItem">
10
           <span class="label">创建时间:</span>
10
           <span class="label">创建时间:</span>
11
-          <nz-range-picker [(ngModel)]="dateRange" [nzShowTime]="{ nzFormat: 'HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
11
+          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
12
 					(ngModelChange)="changeDate($event)"></nz-range-picker>
12
 					(ngModelChange)="changeDate($event)"></nz-range-picker>
13
         </div>
13
         </div>
14
       </div>
14
       </div>
@@ -44,17 +44,17 @@
44
 							<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
44
 							<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
45
 						</td>
45
 						</td>
46
             <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
46
             <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
47
-            <td>{{ data.deptNum || '-' }}</td>
48
-            <td>{{ data.drugNum || '-'}}</td>
49
-						<td>{{ data.cartonNum || '-' }}</td>
50
-						<td>{{ data.totalPrice || '-' }}</td>
47
+            <td>{{ data.deptNum || '0' }}</td>
48
+            <td>{{ data.drugNum || '0'}}</td>
49
+						<td>{{ data.cartonNum || '0' }}</td>
50
+						<td>{{ data.totalPrice || '0' }}</td>
51
 						<td>{{ data.batchState?data.batchState.name : '-' }}</td>
51
 						<td>{{ data.batchState?data.batchState.name : '-' }}</td>
52
             <td>
52
             <td>
53
               <div class="coop">
53
               <div class="coop">
54
 								<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
54
 								<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
55
 								<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
55
 								<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
56
                 <span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
56
                 <span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
57
-                <span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="dispensingPrint($event,data, data.id)">打印</span>
57
+                <span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
58
                 <span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
58
                 <span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
59
               </div>
59
               </div>
60
             </td>
60
             </td>
@@ -129,7 +129,7 @@
129
 				font-size: 16px;
129
 				font-size: 16px;
130
 				border-bottom: 1px solid #e7e7e7;
130
 				border-bottom: 1px solid #e7e7e7;
131
 				padding-bottom: 10px;">
131
 				padding-bottom: 10px;">
132
-				大输液发药单-{{item.pharmacyDTO.dept}}
132
+				大输液发药单-{{item.applyDeptDTO.dept}}
133
 			</div>
133
 			</div>
134
 			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
134
 			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
135
 				<div style="margin-right: 15px;">日期:{{item.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
135
 				<div style="margin-right: 15px;">日期:{{item.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
@@ -138,7 +138,7 @@
138
 			</div>
138
 			</div>
139
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
139
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
140
 				<div class="thead" style="display: flex;">
140
 				<div class="thead" style="display: flex;">
141
-					<div style="text-align: center;width: 20%;height: 40px;
141
+					<div style="text-align: center;width: 40%;height: 40px;
142
 					line-height: 40px;
142
 					line-height: 40px;
143
 					border-right: 1px solid #e7e7e7;
143
 					border-right: 1px solid #e7e7e7;
144
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
144
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
@@ -148,21 +148,21 @@
148
 					border-right: 1px solid #e7e7e7;
148
 					border-right: 1px solid #e7e7e7;
149
 					border-bottom: 1px solid #e7e7e7;">规格</div>
149
 					border-bottom: 1px solid #e7e7e7;">规格</div>
150
 					
150
 					
151
-					<div style="text-align: center;width: 20%;height: 40px;
151
+					<div style="text-align: center;width: 10%;height: 40px;
152
 					line-height: 40px;
152
 					line-height: 40px;
153
 					border-right: 1px solid #e7e7e7;
153
 					border-right: 1px solid #e7e7e7;
154
-					border-bottom: 1px solid #e7e7e7;">总量(实发数量)</div>
154
+					border-bottom: 1px solid #e7e7e7;">总量</div>
155
 					
155
 					
156
-					<div style="text-align: center;width: 20%;height: 40px;
156
+					<div style="text-align: center;width: 10%;height: 40px;
157
 					line-height: 40px;
157
 					line-height: 40px;
158
 					border-right: 1px solid #e7e7e7;
158
 					border-right: 1px solid #e7e7e7;
159
-					border-bottom: 1px solid #e7e7e7;">箱数(发药箱数)</div>
159
+					border-bottom: 1px solid #e7e7e7;">箱数</div>
160
 					
160
 					
161
 					<div style="text-align: center;width: 20%;height: 40px;
161
 					<div style="text-align: center;width: 20%;height: 40px;
162
 					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
162
 					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
163
 				</div>
163
 				</div>
164
 				<div *ngFor="let data of item.drugsConfigureDTOS" style="display: flex;">
164
 				<div *ngFor="let data of item.drugsConfigureDTOS" style="display: flex;">
165
-					<div style="text-align: center;width: 20%;height: 40px;
165
+					<div style="text-align: center;width: 40%;height: 40px;
166
 					line-height: 40px;
166
 					line-height: 40px;
167
 					border-right: 1px solid #e7e7e7;
167
 					border-right: 1px solid #e7e7e7;
168
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
168
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
@@ -172,12 +172,12 @@
172
 					border-right: 1px solid #e7e7e7;
172
 					border-right: 1px solid #e7e7e7;
173
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
173
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
174
 					
174
 					
175
-					<div style="text-align: center;width: 20%;height: 40px;
175
+					<div style="text-align: center;width: 10%;height: 40px;
176
 					line-height: 40px;
176
 					line-height: 40px;
177
 					border-right: 1px solid #e7e7e7;
177
 					border-right: 1px solid #e7e7e7;
178
 					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
178
 					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
179
 					
179
 					
180
-					<div style="text-align: center;width: 20%;height: 40px;
180
+					<div style="text-align: center;width: 10%;height: 40px;
181
 					line-height: 40px;
181
 					line-height: 40px;
182
 					border-right: 1px solid #e7e7e7;
182
 					border-right: 1px solid #e7e7e7;
183
 					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>
183
 					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>
@@ -194,6 +194,10 @@
194
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
194
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
195
   [info]="promptInfo"></app-prompt-modal>
195
   [info]="promptInfo"></app-prompt-modal>
196
 
196
 
197
+ <!-- 模态框 -->
198
+<app-dialog-delete [delModal]="printModal" (hideDelModalEvent)="hidePrintModal()" [btnLoading]="btnLoading"
199
+  (confirmDelEvent)="confirmPrintDel()" [content]="'您确认发药并打印吗?打印同时会更新云库存并建立配送工单?'"></app-dialog-delete>
200
+		
197
 <!-- 遮罩 -->
201
 <!-- 遮罩 -->
198
 <app-mask *ngIf="maskFlag"></app-mask>
202
 <app-mask *ngIf="maskFlag"></app-mask>
199
 <app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>
203
 <app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>

+ 59 - 17
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -10,7 +10,7 @@ import {
10
 import { MainService } from "../../services/main.service";
10
 import { MainService } from "../../services/main.service";
11
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
11
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
12
 import { ToolService } from "../../services/tool.service";
12
 import { ToolService } from "../../services/tool.service";
13
-import { format, startOfDay, endOfDay } from "date-fns";
13
+import { format, startOfDay, endOfDay, subDays} from "date-fns";
14
 import { NzMessageService } from "ng-zorro-antd";
14
 import { NzMessageService } from "ng-zorro-antd";
15
 import { Subject } from "rxjs";
15
 import { Subject } from "rxjs";
16
 import { debounceTime, filter } from "rxjs/operators";
16
 import { debounceTime, filter } from "rxjs/operators";
@@ -200,8 +200,8 @@ export class DispensingBatchComponent implements OnInit {
200
 		}
200
 		}
201
 		if (that.validateForm.invalid) return;
201
 		if (that.validateForm.invalid) return;
202
     let data: any = {
202
     let data: any = {
203
-			startTime:this.formStartDate,//发起时间开始
204
-			endTime:this.formEndDate,//发起时间结束
203
+			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
204
+			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
205
 			hosId:this.hosId,
205
 			hosId:this.hosId,
206
 			pharmacy:this.validateForm.value.department,
206
 			pharmacy:this.validateForm.value.department,
207
 			id:that.coopId
207
 			id:that.coopId
@@ -327,8 +327,8 @@ export class DispensingBatchComponent implements OnInit {
327
 		  this.formStartDate = this.formEndDate = "";
327
 		  this.formStartDate = this.formEndDate = "";
328
 		  return;
328
 		  return;
329
 		}
329
 		}
330
-		this.formStartDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
331
-		this.formEndDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
330
+		this.formStartDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
331
+		this.formEndDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
332
 	}
332
 	}
333
 	
333
 	
334
 	// 获取所有科室
334
 	// 获取所有科室
@@ -340,18 +340,27 @@ export class DispensingBatchComponent implements OnInit {
340
         hospital: {
340
         hospital: {
341
           id: this.hosId
341
           id: this.hosId
342
         },
342
         },
343
+				type:{
344
+					id:''
345
+				}
343
       },
346
       },
344
       idx: 0,
347
       idx: 0,
345
       sum: 20,
348
       sum: 20,
346
     };
349
     };
347
-    that.mainService
348
-      .getFetchDataList("data", "department", data)
349
-      .subscribe((data) => {
350
-				setTimeout(_=>{
351
-					this.hospitals1 = data.list
352
-					that.isDeptLoading = false;
353
-				},500)
354
-      });
350
+		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
351
+		  let typeData = res.find(i=>i.value=='pharmacyRoom');
352
+			if(typeData){
353
+				data.department.type.id = typeData.id
354
+			}
355
+			that.mainService
356
+			  .getFetchDataList("data", "department", data)
357
+			  .subscribe((data) => {
358
+					setTimeout(_=>{
359
+						this.hospitals1 = data.list
360
+						that.isDeptLoading = false;
361
+					},500)
362
+			  });
363
+		});
355
   }
364
   }
356
 	
365
 	
357
   // 获取所有院区
366
   // 获取所有院区
@@ -485,11 +494,17 @@ export class DispensingBatchComponent implements OnInit {
485
     this.initForm();
494
     this.initForm();
486
   }
495
   }
487
   // 初始化新增form表单
496
   // 初始化新增form表单
497
+	loadStartTime = '';
498
+	loadEndTime = '';
488
   initForm() {
499
   initForm() {
489
     this.validateForm = this.fb.group({
500
     this.validateForm = this.fb.group({
490
       dispensingTime: [null, [Validators.required]],
501
       dispensingTime: [null, [Validators.required]],
491
       department: [null, [Validators.required]]
502
       department: [null, [Validators.required]]
492
     });
503
     });
504
+		let date = new Date();
505
+		this.loadStartTime = format(subDays(date, 1), "yyyy-MM-dd") +' '+'08:00:00'
506
+		this.loadEndTime = format(date, "yyyy-MM-dd") +' '+'08:00:00'
507
+		this.validateForm.controls.dispensingTime.setValue([this.loadStartTime, this.loadEndTime]);
493
   }
508
   }
494
   // 科室位置必填
509
   // 科室位置必填
495
   buildValidator = (control: FormControl): { [s: string]: boolean } => {
510
   buildValidator = (control: FormControl): { [s: string]: boolean } => {
@@ -567,8 +582,8 @@ export class DispensingBatchComponent implements OnInit {
567
 		}
582
 		}
568
 		if (that.validateForm.invalid) return;
583
 		if (that.validateForm.invalid) return;
569
     let data: any = {
584
     let data: any = {
570
-			startTime:this.formStartDate,//发起时间开始
571
-			endTime:this.formEndDate,//发起时间结束
585
+			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
586
+			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
572
 			hosId:this.hosId,
587
 			hosId:this.hosId,
573
 			pharmacy:this.validateForm.value.department
588
 			pharmacy:this.validateForm.value.department
574
     };
589
     };
@@ -601,6 +616,8 @@ export class DispensingBatchComponent implements OnInit {
601
     this.coopItem = data;
616
     this.coopItem = data;
602
     this.validateForm.controls.department.setValue(data.pharmacy);
617
     this.validateForm.controls.department.setValue(data.pharmacy);
603
     this.validateForm.controls.dispensingTime.setValue([data.startTime,data.endTime]);
618
     this.validateForm.controls.dispensingTime.setValue([data.startTime,data.endTime]);
619
+		this.loadStartTime = data.startTime
620
+		this.loadEndTime = data.endTime
604
 		this.modal = true
621
 		this.modal = true
605
   }
622
   }
606
 
623
 
@@ -689,7 +706,7 @@ export class DispensingBatchComponent implements OnInit {
689
 
706
 
690
 	// 发药并打印
707
 	// 发药并打印
691
 	printData = []; 
708
 	printData = []; 
692
-	dispensingPrint(e, data, id?){
709
+	print(e, data, id){
693
 		this.rowData = data
710
 		this.rowData = data
694
 		e.stopPropagation();
711
 		e.stopPropagation();
695
 		let that = this;
712
 		let that = this;
@@ -714,15 +731,40 @@ export class DispensingBatchComponent implements OnInit {
714
 				}
731
 				}
715
 		    that.printData = arr;
732
 		    that.printData = arr;
716
 		    that.printLoading = false;
733
 		    that.printLoading = false;
734
+				that.btnLoading = false;
735
+				that.printModal = false;
717
 		    setTimeout(() => {
736
 		    setTimeout(() => {
718
 		      const printContent = document.getElementById("report");
737
 		      const printContent = document.getElementById("report");
719
-		      const WindowPrt = window.open("", "", "width=800,height=900");
738
+		      const WindowPrt = window.open("", "", "width=1000,height=900");
720
 		      WindowPrt.document.write(printContent.innerHTML);
739
 		      WindowPrt.document.write(printContent.innerHTML);
721
 		      WindowPrt.document.close();
740
 		      WindowPrt.document.close();
722
 		      WindowPrt.focus();
741
 		      WindowPrt.focus();
723
 		      WindowPrt.print();
742
 		      WindowPrt.print();
724
 		      WindowPrt.close();
743
 		      WindowPrt.close();
744
+					setTimeout(()=>{
745
+						this.getList();
746
+					},200)
725
 		    }, 500);
747
 		    }, 500);
726
 		  });
748
 		  });
727
 	}
749
 	}
750
+	
751
+	printModal = false;
752
+	printE = '';
753
+	printItemData = '';
754
+	printItemId = '';
755
+	dispensingPrint(e, data, id){
756
+		this.printModal = true
757
+		this.printE = e
758
+		this.printItemData = data
759
+		this.printItemId = id
760
+	}
761
+	
762
+	confirmPrintDel(){
763
+		this.btnLoading = true;
764
+		this.print(this.printE, this.printItemData, this.printItemId)
765
+	}
766
+	
767
+	hidePrintModal(){
768
+		this.printModal = false
769
+	}
728
 }
770
 }

+ 17 - 14
src/app/views/dispensing-detail/dispensing-detail.component.html

@@ -9,29 +9,31 @@
9
         [nzLoading]="loading1">
9
         [nzLoading]="loading1">
10
         <thead>
10
         <thead>
11
           <tr class="thead">
11
           <tr class="thead">
12
-            <th nzWidth="10%">药品名称</th>
13
-            <th nzWidth="10%">规格</th>
12
+						<th nzWidth="9%">药品标识</th>
13
+            <th nzWidth="9%">药品名称</th>
14
+            <th nzWidth="9%">规格</th>
14
 						<th nzWidth="9%">消耗数量</th>
15
 						<th nzWidth="9%">消耗数量</th>
15
 						<th nzWidth="9%">原库存数</th>
16
 						<th nzWidth="9%">原库存数</th>
16
-						<th nzWidth="10%">包装规格</th>
17
+						<th nzWidth="9%">包装规格</th>
17
 						<th nzWidth="9%">发药箱数</th>
18
 						<th nzWidth="9%">发药箱数</th>
18
 						<th nzWidth="9%">实发数量</th>
19
 						<th nzWidth="9%">实发数量</th>
19
-            <th nzWidth="10%">计算后库存</th>
20
-						<th nzWidth="10%">增减</th>
21
-            <th nzWidth="14%">操作</th>
20
+            <th nzWidth="9%">计算后库存</th>
21
+						<th nzWidth="7%">增减</th>
22
+            <th nzWidth="11%">操作</th>
22
           </tr>
23
           </tr>
23
         </thead>
24
         </thead>
24
         <tbody>
25
         <tbody>
25
           <tr *ngFor="let data of listOfData">
26
           <tr *ngFor="let data of listOfData">
27
+						<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'-' }}</td>
26
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'-' }}</td>
28
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'-' }}</td>
27
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
29
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
28
-            <td>{{ data.expendCount||'-' }}</td>
29
-            <td>{{ data.formerInventory || '-' }}</td>
30
-            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'-' }}</td>
31
-						<td>{{ data.cartonNum||'-' }}</td>
32
-						<td>{{ data.actualCount||'-' }}</td>
33
-						<td>{{ data.afterInventory||'-' }}</td>
34
-						<td>{{ data.addSub||'-' }}</td>
30
+            <td>{{ data.expendCount||'0' }}</td>
31
+            <td>{{ data.formerInventory || '0' }}</td>
32
+            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
33
+						<td>{{ data.cartonNum||'0' }}</td>
34
+						<td>{{ data.actualCount||'0' }}</td>
35
+						<td>{{ data.afterInventory||'0' }}</td>
36
+						<td>{{ data.addSub||'0' }}</td>
35
             <td>
37
             <td>
36
               <div class="coop">
38
               <div class="coop">
37
                 <span (click)="itemClick($event,data.id, 'add')">增加</span>
39
                 <span (click)="itemClick($event,data.id, 'add')">增加</span>
@@ -45,7 +47,7 @@
45
   </div>
47
   </div>
46
 	<div class="right-content">
48
 	<div class="right-content">
47
 		<div class="right-top">
49
 		<div class="right-top">
48
-			<h3 class="title">快速搜索发药科室</h3>
50
+			<h3 class="title">快速添加发药科室</h3>
49
 			<div class="right-template">
51
 			<div class="right-template">
50
 			  <span class="label">科室:</span>
52
 			  <span class="label">科室:</span>
51
 			  <nz-select class="formItem" (ngModelChange)="deptChange($event)" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event, 'dept')" nzServerSearch nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="department">
53
 			  <nz-select class="formItem" (ngModelChange)="deptChange($event)" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event, 'dept')" nzServerSearch nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="department">
@@ -56,6 +58,7 @@
56
 			      <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
58
 			      <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
57
 			    </nz-option>
59
 			    </nz-option>
58
 			  </nz-select>
60
 			  </nz-select>
61
+				<span (click)='addDept()' class="icon_transport transport-tag27fuben add-class"></span>
59
 			</div>
62
 			</div>
60
 		</div>
63
 		</div>
61
 		<div class="right-bottom">
64
 		<div class="right-bottom">

+ 6 - 1
src/app/views/dispensing-detail/dispensing-detail.component.less

@@ -83,11 +83,16 @@ h3{
83
 				align-items: center;
83
 				align-items: center;
84
 				margin-top: 10px;
84
 				margin-top: 10px;
85
 				.label{
85
 				.label{
86
-					width:50px;
86
+					width:55px;
87
 				}
87
 				}
88
 				.ant-select{
88
 				.ant-select{
89
 					width: 100%;
89
 					width: 100%;
90
 				}
90
 				}
91
+				.add-class{
92
+					margin-left: 10px;
93
+					cursor: pointer;
94
+					color: #34b349;
95
+				}
91
 			}
96
 			}
92
 			
97
 			
93
 		}
98
 		}

+ 28 - 10
src/app/views/dispensing-detail/dispensing-detail.component.ts

@@ -104,7 +104,7 @@ export class DispensingDetailComponent implements OnInit {
104
     	sum: 9999,
104
     	sum: 9999,
105
     	drugsConfigure: {
105
     	drugsConfigure: {
106
     	  hosId: this.hosId,
106
     	  hosId: this.hosId,
107
-				deptId :this.deptId,
107
+				deptId :this.deptId?this.deptId:null,
108
     	  batchId: this.detailId
108
     	  batchId: this.detailId
109
     	}
109
     	}
110
     };
110
     };
@@ -134,10 +134,14 @@ export class DispensingDetailComponent implements OnInit {
134
 		}else{
134
 		}else{
135
 			delete data.drugsConfigure.batchId
135
 			delete data.drugsConfigure.batchId
136
 		}
136
 		}
137
+		let deptData = this.hospitals1.find(i=>i.id==e)
137
 		that.mainService
138
 		that.mainService
138
 		  .getFetchDataList("data", "drugsConfigure", data)
139
 		  .getFetchDataList("data", "drugsConfigure", data)
139
 		  .subscribe((res) => {
140
 		  .subscribe((res) => {
140
-				this.getDeptData(e,'all','')
141
+				if(res.list.length==0){
142
+					this.message.error(`您选择的科室“	${deptData.dept}”时间段内没有消耗药品无法添加发药单。`)
143
+				}
144
+				this.getDeptData(e,'all','load')
141
 		  });
145
 		  });
142
 	}
146
 	}
143
 	
147
 	
@@ -175,7 +179,10 @@ export class DispensingDetailComponent implements OnInit {
175
 		  .subscribe((res) => {
179
 		  .subscribe((res) => {
176
 				that.btnLoading = false;
180
 				that.btnLoading = false;
177
 				that.delModal = false;
181
 				that.delModal = false;
178
-				this.getDispensingDept('','')
182
+				this.deptId = null
183
+				this.deptName = null
184
+				this.deptIndex = null
185
+				this.getDeptData('','all','load')
179
 				if (res.status==200) {
186
 				if (res.status==200) {
180
 				  that.showPromptModal("删除", true, "");
187
 				  that.showPromptModal("删除", true, "");
181
 				} else {
188
 				} else {
@@ -185,6 +192,10 @@ export class DispensingDetailComponent implements OnInit {
185
 	}
192
 	}
186
 	// 选择楼栋
193
 	// 选择楼栋
187
 	buildingChange(e){
194
 	buildingChange(e){
195
+		this.deptId = null
196
+		this.deptName = null
197
+		this.deptIndex = null
198
+		this.listOfData=[]
188
 		this.getDeptData(e,'','')
199
 		this.getDeptData(e,'','')
189
 	}
200
 	}
190
 	
201
 	
@@ -210,24 +221,31 @@ export class DispensingDetailComponent implements OnInit {
210
 		that.mainService
221
 		that.mainService
211
 		  .getFetchDataList("data", "drugsList", data)
222
 		  .getFetchDataList("data", "drugsList", data)
212
 		  .subscribe((res) => {
223
 		  .subscribe((res) => {
213
-				// this.deptId = null
214
-				// this.deptName = null
215
-				// this.deptIndex = null
216
 		    that.deptList = res.list;
224
 		    that.deptList = res.list;
217
 				if(initial=='load'){
225
 				if(initial=='load'){
218
 					if(res.list.length>0){
226
 					if(res.list.length>0){
219
-						this.deptId = res.list[0].id
227
+						this.deptId = res.list[0].applyDeptDTO.id
220
 						this.deptName = res.list[0].applyDeptDTO.dept
228
 						this.deptName = res.list[0].applyDeptDTO.dept
221
 						this.deptIndex = 0
229
 						this.deptIndex = 0
222
-						this.getList()
223
 					}
230
 					}
231
+					this.getList()
224
 				}
232
 				}
225
 		  });
233
 		  });
226
 	}
234
 	}
227
 	
235
 	
228
 	// 选择科室
236
 	// 选择科室
237
+	addDeptId=''
229
 	deptChange(e){
238
 	deptChange(e){
230
-		this.getDispensingDept(e,'dept')
239
+		this.addDeptId = e
240
+		
241
+	}
242
+	// 添加科室
243
+	addDept(){
244
+		if(this.addDeptId){
245
+			this.getDispensingDept(this.addDeptId,'dept')
246
+		}else{
247
+			this.message.error('请先选择发药科室')
248
+		}
231
 	}
249
 	}
232
 	
250
 	
233
 	// 获取楼栋
251
 	// 获取楼栋
@@ -313,6 +331,7 @@ export class DispensingDetailComponent implements OnInit {
313
 	    .subscribe((data) => {
331
 	    .subscribe((data) => {
314
 	      that.btnLoading = false;
332
 	      that.btnLoading = false;
315
 	      that.hideModal();
333
 	      that.hideModal();
334
+				this.getList()
316
 	      if (data.status == 200) {
335
 	      if (data.status == 200) {
317
 	        that.showPromptModal(that.add ? "增加" : "减少", true, "");
336
 	        that.showPromptModal(that.add ? "增加" : "减少", true, "");
318
 	      } else {
337
 	      } else {
@@ -358,7 +377,6 @@ export class DispensingDetailComponent implements OnInit {
358
     setTimeout(() => {
377
     setTimeout(() => {
359
       this.promptModalShow = true;
378
       this.promptModalShow = true;
360
     }, 100);
379
     }, 100);
361
-    this.getList();
362
   }
380
   }
363
 
381
 
364
   delModal: boolean = false; //删除模态框
382
   delModal: boolean = false; //删除模态框

+ 17 - 16
src/app/views/drug-cloud/drug-cloud.component.html

@@ -35,7 +35,8 @@
35
         [nzLoading]="loading1">
35
         [nzLoading]="loading1">
36
         <thead>
36
         <thead>
37
           <tr class="thead">
37
           <tr class="thead">
38
-						<th nzWidth="20%">科室名称</th>
38
+						<th nzWidth="10%">科室名称</th>
39
+						<th nzWidth="10%">药品标识</th>
39
             <th nzWidth="20%">药品名称</th>
40
             <th nzWidth="20%">药品名称</th>
40
             <th nzWidth="10%">规格</th>
41
             <th nzWidth="10%">规格</th>
41
             <th nzWidth="20%">库存数量(正负值)</th>
42
             <th nzWidth="20%">库存数量(正负值)</th>
@@ -45,14 +46,15 @@
45
         </thead>
46
         </thead>
46
         <tbody>
47
         <tbody>
47
           <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
48
           <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
48
-            <td>{{ data.departmentDTO?data.departmentDTO.dept:'无' }}</td>
49
-            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
50
-            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
51
-            <td>{{ data.inventoryNum || '无' }}</td>
52
-            <td>{{ data.inventoryPrice || '无' }}</td>
49
+            <td>{{ data.departmentDTO?data.departmentDTO.dept:'-' }}</td>
50
+						<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'-' }}</td>
51
+            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'-' }}</td>
52
+            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'0' }}</td>
53
+            <td>{{ data.inventoryNum || '0' }}</td>
54
+            <td>{{ data.inventoryPrice || '0' }}</td>
53
             <td>
55
             <td>
54
               <div class="coop">
56
               <div class="coop">
55
-                <span *ngIf="coopBtns.historyRecord" (click)="detail($event,data.id)">历史记录</span>
57
+                <span *ngIf="coopBtns.historyRecord" (click)="detail($event,data)">历史记录</span>
56
               </div>
58
               </div>
57
             </td>
59
             </td>
58
           </tr>
60
           </tr>
@@ -94,13 +96,13 @@
94
                 <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</td>
96
                 <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</td>
95
                 <td>{{ data.drugsList?data.drugsList.batch.batchNo : '无' }}</td>
97
                 <td>{{ data.drugsList?data.drugsList.batch.batchNo : '无' }}</td>
96
                 <td>{{ data.drugsList?data.drugsList.packingNo : '无' }}</td>
98
                 <td>{{ data.drugsList?data.drugsList.packingNo : '无' }}</td>
97
-								<td>{{ data.drugsConfig?data.drugsConfig.expendCount:'' }}</td>
98
-								<td>{{ data.drugsConfig?data.drugsConfig.formerInventory:'无' }}</td>
99
-								<td>{{ data.drugsConfig?data.drugsConfig.addSub:'无' }}</td>
100
-                <td>{{ data.drugsInfo?data.drugsInfo.packingSpecs:'' }}</td>
101
-                <td>{{ data.drugsConfig?data.drugsConfig.cartonNum : '' }}</td>
102
-                <td>{{ data.drugsConfig?data.drugsConfig.actualCount : ''}}</td>
103
-        				<td>{{ data.drugsConfig?data.drugsConfig.afterInventory : '' }}</td>
99
+								<td>{{ data.drugsConfig?data.drugsConfig.expendCount:'0' }}</td>
100
+								<td>{{ data.drugsConfig&&data.drugsConfig.formerInventory?data.drugsConfig.formerInventory:'0' }}</td>
101
+								<td>{{ data.drugsConfig&&data.drugsConfig.addSub?data.drugsConfig.addSub:'0' }}</td>
102
+                <td>{{ data.drugsInfo?data.drugsInfo.packingSpecs:'0' }}</td>
103
+                <td>{{ data.drugsConfig?data.drugsConfig.cartonNum : '0' }}</td>
104
+                <td>{{ data.drugsConfig?data.drugsConfig.actualCount : '0'}}</td>
105
+        				<td>{{ data.drugsConfig?data.drugsConfig.afterInventory : '0' }}</td>
104
               </tr>
106
               </tr>
105
             </tbody>
107
             </tbody>
106
           </nz-table>
108
           </nz-table>
@@ -121,6 +123,5 @@
121
 <!-- 操作成功/失败提示框 -->
123
 <!-- 操作成功/失败提示框 -->
122
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
124
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
123
   [info]="promptInfo"></app-prompt-modal>
125
   [info]="promptInfo"></app-prompt-modal>
124
-<!-- 遮罩 -->
125
-<app-mask *ngIf="maskFlag"></app-mask>
126
+
126
 <app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>
127
 <app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>

+ 3 - 2
src/app/views/drug-cloud/drug-cloud.component.ts

@@ -298,7 +298,7 @@ export class DrugCloudComponent implements OnInit {
298
   }
298
   }
299
 
299
 
300
   // 查看
300
   // 查看
301
-  detail(e, id) {
301
+  detail(e, item) {
302
     e.stopPropagation();
302
     e.stopPropagation();
303
 		var that = this;
303
 		var that = this;
304
 		let data = {
304
 		let data = {
@@ -306,7 +306,8 @@ export class DrugCloudComponent implements OnInit {
306
 			sum: 9999,
306
 			sum: 9999,
307
 			drugsLog: {
307
 			drugsLog: {
308
 			  hosId: this.hosId,
308
 			  hosId: this.hosId,
309
-			  drugListId: id
309
+			  drugId: item.drugId,
310
+				deptId: item.deptId
310
 			}
311
 			}
311
 		};
312
 		};
312
 		this.loading1 = true;
313
 		this.loading1 = true;

+ 11 - 11
src/app/views/drug-info/drug-info.component.html

@@ -24,14 +24,14 @@
24
           <tr class="thead">
24
           <tr class="thead">
25
             <th nzWidth="5%">序号</th>
25
             <th nzWidth="5%">序号</th>
26
             <th nzWidth="10%">药品标识</th>
26
             <th nzWidth="10%">药品标识</th>
27
-            <th nzWidth="10%">药品名称</th>
28
-            <th nzWidth="5%">规格</th>
29
-            <th nzWidth="10%">单位</th>
30
-            <th nzWidth="15%">单价</th>
31
-            <th nzWidth="15%">包装规格</th>
32
-            <th nzWidth="10%">低舍</th>
33
-						<th nzWidth="10%">高入</th>
34
-            <th nzWidth="20%">操作</th>
27
+            <th nzWidth="20%">药品名称</th>
28
+            <th nzWidth="10%">规格</th>
29
+            <th nzWidth="9%">单位</th>
30
+            <th nzWidth="9%">单价</th>
31
+            <th nzWidth="9%">包装规格</th>
32
+            <th nzWidth="9%">低舍</th>
33
+						<th nzWidth="9%">高入</th>
34
+            <th nzWidth="10%">操作</th>
35
           </tr>
35
           </tr>
36
         </thead>
36
         </thead>
37
         <tbody>
37
         <tbody>
@@ -135,6 +135,7 @@
135
 				  <nz-form-control nzErrorTip="请填写低舍!">
135
 				  <nz-form-control nzErrorTip="请填写低舍!">
136
 				    <nz-input-group>
136
 				    <nz-input-group>
137
 							<nz-input-number
137
 							<nz-input-number
138
+								(ngModelChange)="lowerChange($event)"
138
 								formControlName="lowerRound"
139
 								formControlName="lowerRound"
139
 								[nzMin]="0"
140
 								[nzMin]="0"
140
 								[nzPrecision]="0"
141
 								[nzPrecision]="0"
@@ -151,6 +152,7 @@
151
 				    <nz-input-group>
152
 				    <nz-input-group>
152
 							<nz-input-number
153
 							<nz-input-number
153
 								formControlName="upperRound"
154
 								formControlName="upperRound"
155
+								[nzDisabled]="true"
154
 								[nzMin]="0"
156
 								[nzMin]="0"
155
 								[nzPrecision]="0"
157
 								[nzPrecision]="0"
156
 								[nzMax]="999999"
158
 								[nzMax]="999999"
@@ -169,7 +171,7 @@
169
   </div>
171
   </div>
170
 </div>
172
 </div>
171
 <!-- 删除模态框 -->
173
 <!-- 删除模态框 -->
172
-<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
174
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" 
173
   (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="是否删除药品信息?" confirmTxt="是" cancelTxt="否">
175
   (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="是否删除药品信息?" confirmTxt="是" cancelTxt="否">
174
 </app-dialog-delete>
176
 </app-dialog-delete>
175
 
177
 
@@ -180,5 +182,3 @@
180
 <!-- 查看详情 -->
182
 <!-- 查看详情 -->
181
 <router-outlet (deactivate)="getList()"></router-outlet>
183
 <router-outlet (deactivate)="getList()"></router-outlet>
182
 
184
 
183
-<!-- 遮罩 -->
184
-<app-mask *ngIf="maskFlag"></app-mask>

+ 5 - 1
src/app/views/drug-info/drug-info.component.ts

@@ -63,7 +63,6 @@ export class DrugInfoComponent implements OnInit {
63
   wxRequired = false; //新增或编辑用户的时候,微信号是否必填
63
   wxRequired = false; //新增或编辑用户的时候,微信号是否必填
64
   changeInpSubject = new Subject(); //防抖
64
   changeInpSubject = new Subject(); //防抖
65
   changeInpHospitalSubject = new Subject(); //防抖
65
   changeInpHospitalSubject = new Subject(); //防抖
66
-	
67
   ngOnInit() {
66
   ngOnInit() {
68
     this.coopBtns = this.tool.initCoopBtns(this.route);
67
     this.coopBtns = this.tool.initCoopBtns(this.route);
69
 		this.hosId = this.tool.getCurrentHospital().id;
68
 		this.hosId = this.tool.getCurrentHospital().id;
@@ -117,6 +116,11 @@ export class DrugInfoComponent implements OnInit {
117
 			this.getList();
116
 			this.getList();
118
 		});
117
 		});
119
 	}
118
 	}
119
+	
120
+	lowerChange(e){
121
+		this.validateForm.controls.upperRound.setValue(e+1);
122
+	}
123
+	
120
 	// 监听标识输入
124
 	// 监听标识输入
121
 	handleInput(event: KeyboardEvent){
125
 	handleInput(event: KeyboardEvent){
122
 		const input = event.target as HTMLInputElement;
126
 		const input = event.target as HTMLInputElement;