Ver código fonte

大输液优化

maotao 7 meses atrás
pai
commit
6f04f04bd4

+ 1 - 0
src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts

@@ -196,6 +196,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
196 196
     this.validatePriorityForm.controls.department.setValue(deptArr);
197 197
     this.validatePriorityForm.controls.handleGroup.setValue(data.handleGroupDTO.id);
198 198
 		this.validatePriorityForm.controls.binding.setValue(data.handleUserDTO?'1':'0')
199
+		this.getUser(data.handleGroupDTO.id)
199 200
 		if(data.handleUserDTO){
200 201
 			this.validatePriorityForm.controls.handleUser.setValue(data.handleUserDTO.id);
201 202
 		}

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

@@ -993,4 +993,11 @@ export class MainService {
993 993
 	    headers: this.headers,
994 994
 	  });
995 995
 	}
996
+	
997
+	// 大输液-科室汇总统计
998
+	summaryData(data) {
999
+	  return this.http.post(host.host + `/infusion/solutions/dept/summary`,data, {
1000
+	    headers: this.headers,
1001
+	  });
1002
+	}
996 1003
 }

+ 7 - 1
src/app/views/big-transfusion-set/big-transfusion-set.component.ts

@@ -113,6 +113,10 @@ export class BigTransfusionSetComponent implements OnInit {
113 113
       this.msg.create("warning", "请选择任务类型!");
114 114
       return;
115 115
     }
116
+		if(!this.pharmacyDept){
117
+		  this.msg.create("warning", "请选择默认发药科室!");
118
+		  return;
119
+		}
116 120
     let editData = {
117 121
 			id:'',
118 122
 			taskType:this.taskTypeData.id,
@@ -277,7 +281,9 @@ export class BigTransfusionSetComponent implements OnInit {
277 281
 	
278 282
 	parentChange(e){
279 283
 		this.getTaskTypes('', true, 'load');
280
-		this.getDeparts('','load')
284
+		this.getDeparts('','load');
285
+		this.infusionSolutionsTypeId = null;
286
+		this.pharmacyDept = null;
281 287
 	}
282 288
 	
283 289
   // 获取配置

+ 45 - 46
src/app/views/dept-all-statistics/dept-all-statistics.component.html

@@ -30,7 +30,7 @@
30 30
 					</nz-select>
31 31
 				</div>
32 32
 				
33
-				<div class="list-template__searchItem">
33
+	<!-- 			<div class="list-template__searchItem">
34 34
 				  <span class="label">批次号:</span>
35 35
 					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'batch')" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择批次号" [(ngModel)]="batch">
36 36
 					  <ng-container *ngFor="let option of batchData">
@@ -40,7 +40,7 @@
40 40
 					    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
41 41
 					  </nz-option>
42 42
 					</nz-select>
43
-				</div>
43
+				</div> -->
44 44
       </div>
45 45
       <div nz-col nzLg="6" class="list-template__btns">
46 46
         <button class="btn default" (click)='search()'>搜索</button>
@@ -53,36 +53,28 @@
53 53
         [nzLoading]="loading1">
54 54
         <thead>
55 55
           <tr class="thead">
56
-            <th>批次号|科室</th>
57
-						<th>商品名称|规格</th>
58
-            <th>消耗量+增发+原库存=实发量</th>
59
-            <th>包装规格</th>
60
-            <th>发药箱数</th>
61
-            <th>新库存</th>
62
-            <th>发药日期</th>
56
+            <th>科室名称</th>
57
+						<th>药品名称</th>
58
+            <th>开始库存</th>
59
+            <th>实消</th>
60
+            <th>发</th>
61
+            <th>实发</th>
62
+            <th>终止库存</th>
63 63
 						<th>操作</th>
64 64
           </tr>
65 65
         </thead>
66 66
         <tbody v-if="listOfData && listOfData.length>0">
67
-          <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
68
-            <td>
69
-							<div>{{ data['0'] }}</div>
70
-							<div>{{ data['1'] }}</div>
71
-						</td>
72
-						<td>
73
-							<div>{{ data['2']}}</div>
74
-							<div>{{ data['3']}}</div>
75
-						</td>
76
-            <td>{{ data['4']}} + {{data['5']}} +
77
-						 {{data['6'] }} = {{data.num}}</td>
78
-						 
67
+          <tr *ngFor="let data of listOfData">
68
+            <td>{{ data['2'] }}</td>
69
+						<td>{{ data['3'] }} {{data['4']}}</td>
70
+						<td>{{ data['5']}}</td>
71
+						<td>{{ data['6']}}</td>
79 72
             <td>{{ data['7']}}</td>
80
-            <td>{{ data['8']==0 ? '-' : data['8']}}</td>
81
-						<td>{{ data['9']}}</td>
82
-						<td>{{ data['10']}}</td>
73
+            <td>{{ data['8']}}</td>
74
+            <td>{{ data['9']}}</td>
83 75
 						<td>
84 76
 						  <div class="coop">
85
-						    <span *ngIf="coopBtns.look" (click)="detail(data.id)">发药详情</span>
77
+						    <span *ngIf="coopBtns.look" (click)="detail(data['0'],data['1'])">发药详情</span>
86 78
 						  </div>
87 79
 						</td>
88 80
           </tr>
@@ -99,7 +91,7 @@
99 91
   <!-- 新增/编辑模态框 -->
100 92
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
101 93
     <div class="modalBody">
102
-      <div class="title">科室发药单-查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
94
+      <div class="title">发药详情<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
103 95
       </div>
104 96
       <overlay-scrollbars #osComponentRef1 class="content">
105 97
         <div class="list-template__bottom">
@@ -107,33 +99,40 @@
107 99
             [nzLoading]="detailsLoading">
108 100
             <thead>
109 101
               <tr class="thead">
110
-								<th nzWidth="10%">药品标识</th>
111
-                <th nzWidth="10%">药品名称</th>
112
-                <th nzWidth="10%">规格</th>
113
-                <th nzWidth="10%">消耗数量</th>
114
-                <th nzWidth="10%">实发数量</th>
115
-                <th nzWidth="10%">包装规格</th>
116
-                <th nzWidth="10%">发药药箱</th>
117
-                <th nzWidth="10%">原库存数</th>
118
-                <th nzWidth="10%">计算后库存</th>
119
-        				<th nzWidth="10%">增减</th>
102
+                <th>批次号|科室</th>
103
+              	<th>商品名称|规格</th>
104
+                <th>消耗量+增发+原库存=实发量</th>
105
+                <th>包装规格</th>
106
+                <th>发药箱数</th>
107
+                <th>新库存</th>
108
+                <th>发药日期</th>
120 109
               </tr>
121 110
             </thead>
122 111
             <tbody>
123 112
               <tr *ngFor="let data of viewData">
124
-								<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'无' }}</td>
125
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
126
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
127
-                <td>{{ data.expendCount||'0' }}</td>
128
-                <td>{{ data.actualCount||'0' }}</td>
129
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
130
-                <td>{{ data.cartonNum || '0' }}</td>
131
-                <td>{{ data.formerInventory || '0' }}</td>
132
-                <td>{{ data.afterInventory || '0'}}</td>
133
-        				<td>{{ data.addSub || '0' }}</td>
113
+								<td>
114
+									<div>{{ data['0'] }}</div>
115
+									<div>{{ data['1'] }}</div>
116
+								</td>
117
+								<td>
118
+									<div>{{ data['2']}}</div>
119
+									<div>{{ data['3']}}</div>
120
+								</td>
121
+								<td>{{ data['4']}} + {{data['5']}} +
122
+								 {{data['6'] }} = {{data.num}}</td>
123
+								 
124
+								<td>{{ data['7']}}</td>
125
+								<td>{{ data['8']==0 ? '-' : data['8']}}</td>
126
+								<td>{{ data['9']}}</td>
127
+								<td>{{ data['10']}}</td>
134 128
               </tr>
135 129
             </tbody>
136 130
           </nz-table>
131
+					<div class="list-template__pagination">
132
+					  <nz-pagination [(nzPageIndex)]="pageDetailIndex" [(nzTotal)]="listDetailLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
133
+					    (nzPageIndexChange)="detailList()" (nzPageSizeChange)="detailList()">
134
+					  </nz-pagination>
135
+					</div>
137 136
         </div>
138 137
       </overlay-scrollbars>
139 138
       <div class="display_flex justify-content_flex-center">

+ 69 - 28
src/app/views/dept-all-statistics/dept-all-statistics.component.ts

@@ -45,7 +45,7 @@ export class DeptAllStatisticsComponent implements OnInit{
45 45
 		 }else if(e[1]=='commodity'){
46 46
 			 this.getCommodityData(e[0])
47 47
 		 }else{
48
-			 this.getBathData(e[0])
48
+			 // this.getBathData(e[0])
49 49
 		 }
50 50
 
51 51
     });
@@ -72,6 +72,7 @@ export class DeptAllStatisticsComponent implements OnInit{
72 72
   deptalias; //别名
73 73
   type; //类型
74 74
   deptHandoverType; //类型
75
+	pageDetailIndex: number = 1; //页码
75 76
   pageIndex: number = 1; //页码
76 77
   listLength: number = 10; //总条数
77 78
   pageSize: number = 10; //每页条数
@@ -94,12 +95,15 @@ export class DeptAllStatisticsComponent implements OnInit{
94 95
 	
95 96
   // 导出
96 97
   excelExport(){
98
+		if(!this.startDate && !this.endDate){
99
+			this.message.error('您必须填写发药日期,才能执行导出')
100
+			return
101
+		}
97 102
     this.maskFlag = this.message.loading("正在导出..", {
98 103
       nzDuration: 0,
99 104
     }).messageId;
100
-    this.mainService.exportReport("dispensingMedicine", {
105
+    this.mainService.exportReport("infusionSolutionsDeptSummary", {
101 106
 			deptId:this.department,
102
-			batchId:this.batch,
103 107
 			startTime: this.startDate,
104 108
 			endTime: this.endDate,
105 109
 			drugId:this.commodity,
@@ -116,7 +120,7 @@ export class DeptAllStatisticsComponent implements OnInit{
116 120
         var a = document.createElement("a");
117 121
         a.href = fileURL;
118 122
         a.target = "_blank";
119
-        a.download = "发药信息详情.xls";
123
+        a.download = "科室汇总统计.xls";
120 124
         document.body.appendChild(a);
121 125
         a.click();
122 126
       },
@@ -137,29 +141,68 @@ export class DeptAllStatisticsComponent implements OnInit{
137 141
 	
138 142
 	// 查看
139 143
 	detailsLoading:Boolean = false;
140
-	detail(id) {
141
-		var that = this;
144
+	listDetailLength:any;
145
+	detailDeptId:any;
146
+	detailDrugId:any;
147
+	detail(id1,id2) {
148
+		this.detailDeptId = id1
149
+		this.detailDrugId = id2
142 150
 		let data = {
143
-			idx: 0,
144
-			sum: 9999,
145
-			drugsConfigure: {
146
-			  hosId: this.hosId,
147
-			  drugListId: id
151
+			idx: this.pageDetailIndex - 1,
152
+			sum: this.pageSize,
153
+			deptId:id1,
154
+			startTime: this.startDate,
155
+			endTime: this.endDate,
156
+			drugId:id2,
157
+			hosId:this.hosId
158
+		};
159
+		this.detailsLoading = true;
160
+		this.mainService
161
+		.drugsInfo(data).subscribe((res:any) => {
162
+			this.detailsLoading = false;
163
+			for(let i of res.list){
164
+				i.num = i['4'] + i['5'] + i['6']
148 165
 			}
166
+			this.modal = true
167
+			this.viewData = res.list;
168
+			this.listDetailLength = res.totalNum;
169
+		});
170
+	}
171
+	
172
+	// 详情分页
173
+	detailList(){
174
+		let data = {
175
+			idx: this.pageDetailIndex - 1,
176
+			sum: this.pageSize,
177
+			deptId:this.detailDeptId,
178
+			startTime: this.startDate,
179
+			endTime: this.endDate,
180
+			drugId:this.detailDrugId,
181
+			hosId:this.hosId
149 182
 		};
150 183
 		this.detailsLoading = true;
151
-		that.mainService
152
-		  .getFetchDataList("data", "drugsConfigure", data)
153
-		  .subscribe((data) => {
154
-		    this.detailsLoading = false;
155
-				this.modal = true
156
-		    that.viewData = data.list;
157
-		    that.listLength = data.totalNum;
158
-		  });
184
+		this.mainService
185
+		.drugsInfo(data).subscribe((res:any) => {
186
+			this.detailsLoading = false;
187
+			for(let i of res.list){
188
+				i.num = i['4'] + i['5'] + i['6']
189
+			}
190
+			this.viewData = res.list;
191
+			this.listDetailLength = res.totalNum;
192
+		});
193
+	}
194
+	
195
+	hideModal(){
196
+		this.pageDetailIndex = 1
197
+		this.modal = false
159 198
 	}
160 199
 	
161 200
   // 搜索
162 201
   search() {
202
+		if(!this.startDate && !this.endDate){
203
+			this.message.error('您必须填写发药日期,才能执行搜索')
204
+			return
205
+		}
163 206
     this.pageIndex = 1;
164 207
     this.getList();
165 208
   }
@@ -167,13 +210,15 @@ export class DeptAllStatisticsComponent implements OnInit{
167 210
   reset() {
168 211
     this.pageIndex = 1;
169 212
     this.department = null;
170
-		this.batch = null;
213
+		// this.batch = null;
171 214
 		this.commodity = null;
172 215
     this.batchNumber = "";
173 216
 		this.dateRange = [];
174 217
 		this.startDate = "";
175 218
 		this.endDate = "";
176
-    this.getList();
219
+		this.listOfData = [];
220
+		this.listLength = 0;
221
+    // this.getList();
177 222
   }
178 223
   // 表格数据
179 224
   loading1 = false;
@@ -183,7 +228,6 @@ export class DeptAllStatisticsComponent implements OnInit{
183 228
       idx: that.pageIndex - 1,
184 229
       sum: that.pageSize,
185 230
 			deptId:this.department,
186
-			batchId:this.batch,
187 231
 			startTime: this.startDate,
188 232
 			endTime: this.endDate,
189 233
 			drugId:this.commodity,
@@ -191,11 +235,8 @@ export class DeptAllStatisticsComponent implements OnInit{
191 235
     };
192 236
 		this.loading1 = true;
193 237
 		this.mainService
194
-			.drugsInfo(data).subscribe((res:any) => {
238
+			.summaryData(data).subscribe((res:any) => {
195 239
 				this.loading1 = false;
196
-				for(let i of res.list){
197
-					i.num = i['4'] + i['5'] + i['6']
198
-				}
199 240
 				this.listOfData = res.list
200 241
 				that.listLength = res.totalNum;
201 242
 			});
@@ -306,7 +347,7 @@ export class DeptAllStatisticsComponent implements OnInit{
306 347
 			  });
307 348
 		});
308 349
 		this.getCommodityData('')
309
-		this.getBathData('')
310
-    this.getList();
350
+		// this.getBathData('')
351
+    // this.getList();
311 352
   }
312 353
 }

+ 78 - 77
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -1,84 +1,85 @@
1
-<div class="list-template">
2
-  <div class="list-template__content">
3
-    <div class="list-template__top" nz-row>
4
-      <div nz-col nzLg='16' class="list-template__searchBox">
5
-        <div class="list-template__searchItem">
6
-          <span class="label">批次号:</span>
7
-          <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
8
-        </div>
9
-        <div class="list-template__searchItem">
10
-          <span class="label">创建时间:</span>
11
-          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
12
-					(ngModelChange)="changeDate($event)"></nz-range-picker>
13
-        </div>
14
-      </div>
15
-			<div nz-col nzLg='2' class="autoUpdate">{{ logTime }}秒</div>
16
-      <div nz-col nzLg="6" class="list-template__btns">
17
-        <button class="btn default" (click)='search()'>搜索</button>
18
-        <button class="btn default ml8" (click)='reset()'>重置</button>
19
-				<button *ngIf="coopBtns.add" class="btn default ml8" (click)='showModal()'>新增</button>
20
-      </div>
21
-    </div>
22
-    <div class="list-template__bottom">
23
-      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
24
-        [nzLoading]="loading1">
25
-        <thead>
26
-          <tr class="thead">
27
-            <th nzWidth="13%">批次号</th>
28
-            <th nzWidth="13%">创建时间</th>
29
-            <th nzWidth="13%">发药时间区间</th>
30
-            <th nzWidth="7%">发药科室</th>
31
-            <th nzWidth="7%">科室数</th>
32
-            <th nzWidth="7%">发药量</th>
33
-            <th nzWidth="7%">箱数</th>
34
-            <th nzWidth="10%">药品总价</th>
35
-						<th nzWidth="7%">状态</th>
36
-            <th nzWidth="16%">操作</th>
37
-          </tr>
38
-        </thead>
39
-        <tbody>
40
-          <tr *ngFor="let data of listOfData">
41
-            <td>{{ data.batchNo || '-' }}</td>
42
-            <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm' }}</td>
43
-            <td>
44
-							<div>{{ data.startTime|date:'yyyy-MM-dd HH:mm' }}至</div>
45
-							<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
46
-						</td>
47
-            <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
48
-            <td>{{ data.deptNum || '0' }}</td>
49
-            <td>{{ data.drugNum || '0'}}</td>
50
-						<td>{{ data.cartonNum || '0' }}</td>
51
-						<td>{{ data.totalPrice || '0' }}</td>
52
-						<td>{{ data.batchState?data.batchState.name : '-' }}</td>
53
-            <td>
54
-              <div class="coop">
55
-								<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
56
-								<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
57
-                <span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
58
-								<span *ngIf="coopBtns.dispensingGross && data.batchState.name=='已发药'" (click)="dispensingGross($event, data)">发药总量</span>
59
-                <span *ngIf="coopBtns.dispensingInfo && data.batchState.name=='已发药'" (click)="dispensingInfo($event, data)">发药信息</span>
60
-								<span *ngIf="coopBtns.export && data.batchState.name=='已发药'" (click)="exportPc($event, data)">导出</span>
61
-								<span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
62
-                <span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
63
-              </div>
64
-            </td>
65
-          </tr>
66
-        </tbody>
67
-      </nz-table>
68
-      <div class="list-template__pagination">
69
-        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
70
-          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
71
-        </nz-pagination>
72
-      </div>
73
-    </div>
74
-  </div>
75
-
1
+<div>
2
+	<div class="list-template">
3
+		<div class="list-template__content">
4
+			<div class="list-template__top" nz-row>
5
+				<div nz-col nzLg='16' class="list-template__searchBox">
6
+					<div class="list-template__searchItem">
7
+						<span class="label">批次号:</span>
8
+						<input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
9
+					</div>
10
+					<div class="list-template__searchItem">
11
+						<span class="label">创建时间:</span>
12
+						<nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
13
+						(ngModelChange)="changeDate($event)"></nz-range-picker>
14
+					</div>
15
+				</div>
16
+				<div nz-col nzLg='2' class="autoUpdate">{{ logTime }}秒</div>
17
+				<div nz-col nzLg="6" class="list-template__btns">
18
+					<button class="btn default" (click)='search()'>搜索</button>
19
+					<button class="btn default ml8" (click)='reset()'>重置</button>
20
+					<button *ngIf="coopBtns.add" class="btn default ml8" (click)='showModal()'>新增</button>
21
+				</div>
22
+			</div>
23
+			<div class="list-template__bottom">
24
+				<nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
25
+					[nzLoading]="loading1">
26
+					<thead>
27
+						<tr class="thead">
28
+							<th nzWidth="13%">批次号</th>
29
+							<th nzWidth="13%">创建时间</th>
30
+							<th nzWidth="13%">发药时间区间</th>
31
+							<th nzWidth="7%">发药科室</th>
32
+							<th nzWidth="7%">科室数</th>
33
+							<th nzWidth="7%">发药量</th>
34
+							<th nzWidth="7%">箱数</th>
35
+							<th nzWidth="10%">药品总价</th>
36
+							<th nzWidth="7%">状态</th>
37
+							<th nzWidth="16%">操作</th>
38
+						</tr>
39
+					</thead>
40
+					<tbody>
41
+						<tr *ngFor="let data of listOfData">
42
+							<td>{{ data.batchNo || '-' }}</td>
43
+							<td>{{ data.createTime|date:'yyyy-MM-dd HH:mm' }}</td>
44
+							<td>
45
+								<div>{{ data.startTime|date:'yyyy-MM-dd HH:mm' }}至</div>
46
+								<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
47
+							</td>
48
+							<td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
49
+							<td>{{ data.deptNum || '0' }}</td>
50
+							<td>{{ data.drugNum || '0'}}</td>
51
+							<td>{{ data.cartonNum || '0' }}</td>
52
+							<td>{{ data.totalPrice || '0' }}</td>
53
+							<td>{{ data.batchState?data.batchState.name : '-' }}</td>
54
+							<td>
55
+								<div class="coop">
56
+									<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
57
+									<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
58
+									<span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
59
+									<span *ngIf="coopBtns.dispensingGross && data.batchState.name=='已发药'" (click)="dispensingGross($event, data)">发药总量</span>
60
+									<span *ngIf="coopBtns.dispensingInfo && data.batchState.name=='已发药'" (click)="dispensingInfo($event, data)">发药信息</span>
61
+									<span *ngIf="coopBtns.export && data.batchState.name=='已发药'" (click)="exportPc($event, data)">导出</span>
62
+									<span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
63
+									<span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
64
+								</div>
65
+							</td>
66
+						</tr>
67
+					</tbody>
68
+				</nz-table>
69
+				<div class="list-template__pagination">
70
+					<nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
71
+						(nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
72
+					</nz-pagination>
73
+				</div>
74
+			</div>
75
+		</div>
76
+	</div>
76 77
   <!-- 新增/编辑模态框 -->
77 78
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
78 79
     <div class="modalBody">
79 80
       <div class="title">发药批次-{{add ? '新增' : '编辑'}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
80 81
       </div>
81
-      <overlay-scrollbars #osComponentRef1 class="content">
82
+      <div class="content">
82 83
        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
83 84
        	<nz-form-item>
84 85
        	  <nz-form-label nzRequired nzFor="dispensingTime">发药时间区间</nz-form-label>
@@ -114,7 +115,7 @@
114 115
 					</nz-form-control>
115 116
 				</nz-form-item>
116 117
        </form>
117
-      </overlay-scrollbars>
118
+      </div>
118 119
       <div class="display_flex justify-content_flex-center">
119 120
         <button class="btn" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">{{add ? '保存并配置' : '保存'}}</button>
120 121
 				<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>

+ 3 - 0
src/app/views/dispensing-batch/dispensing-batch.component.less

@@ -27,6 +27,9 @@
27 27
 .autoUpdate{
28 28
 	text-align: right;
29 29
 }
30
+.list-template .ant-calendar-picker{
31
+	width: auto !important; 
32
+}
30 33
 .save {
31 34
   position: fixed;
32 35
   left: 0;

+ 22 - 12
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -50,7 +50,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
50 50
 		this.hosId = this.tool.getCurrentHospital().id;
51 51
     this.coopBtns = this.tool.initCoopBtns(this.route);
52 52
     this.initForm();
53
-		this.getAddDeparts('')
53
+		this.getTaskTypesId();
54 54
     this.getAllHospital();
55 55
     this.getDeptHandoverType();
56 56
 		this.autoUpdate(true)
@@ -247,12 +247,10 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
247 247
 	// 获取药房科室
248 248
 	getAddDeparts(dept) {
249 249
 		var that = this;
250
-		let data = {
250
+		let data:any = {
251 251
 			department: {
252 252
 				dept,
253
-				hospital: {
254
-					id: this.hosId
255
-				},
253
+				hosIds: this.hosId,
256 254
 				type:{
257 255
 					id:''
258 256
 				}
@@ -260,6 +258,14 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
260 258
 			idx: 0,
261 259
 			sum: 20,
262 260
 		};
261
+		if(this.isParentData==1){
262
+			if(this.tool.getCurrentUserInfo().currentHospital &&
263
+			this.tool.getCurrentUserInfo().currentHospital.parent){
264
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
265
+			}else{
266
+				data.department.hosIds = this.hosId
267
+			}
268
+		}
263 269
 		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
264 270
 			let typeData = res.find(i=>i.value=='pharmacyRoom');
265 271
 			if(typeData){
@@ -293,12 +299,12 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
293 299
 	getTaskTypesId() {
294 300
 		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
295 301
 			this.taskTypeData = data.find(i=>i.value=='infusionSolutions')
296
-			this.getConfig();
297 302
 		});
298 303
 	}
299 304
 	
300 305
 	// 获取配置
301
-	getConfig() {
306
+	isParentData:any;
307
+	getConfig(type) {
302 308
 	  let postData = {
303 309
 	    idx: 0,
304 310
 	    sum: 10,
@@ -312,10 +318,14 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
312 318
 		.subscribe((result) => {
313 319
 			if (result.status == 200) {
314 320
 				let data = result.list[0] || {};
315
-				this.validateForm.controls.addDepartment.setValue(data.pharmacyDept || '');
316
-				this.add = true;
321
+				this.isParentData = data.quoteParentData;
322
+				if(type=='add'){
323
+					this.add = true;
324
+					this.isAddDeptsPhone = true;
325
+					this.validateForm.controls.addDepartment.setValue(data.pharmacyDept || '');
326
+				}
327
+				this.getAddDeparts('')
317 328
 				this.modal = true;
318
-				this.isAddDeptsPhone = true;
319 329
 			}
320 330
 		});
321 331
 	}
@@ -323,7 +333,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
323 333
   // 新增弹框
324 334
   showModal() {
325 335
     this.initForm();
326
-		this.getTaskTypesId()
336
+		this.getConfig('add');
327 337
   }
328 338
   hideModal() {
329 339
     this.coopItem = null;
@@ -384,6 +394,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
384 394
   coopItem: any = null;
385 395
   edit(e, data) {
386 396
     e.stopPropagation();
397
+		this.getConfig('edit');
387 398
     this.add = false;
388 399
     this.coopId = data.id;
389 400
     this.coopItem = data;
@@ -396,7 +407,6 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
396 407
 		}
397 408
 		this.loadStartTime = data.startTime
398 409
 		this.loadEndTime = data.endTime
399
-		console.log(11,this.validateForm.value)
400 410
 		this.modal = true
401 411
   }
402 412
 

+ 1 - 1
src/app/views/dispensing-info-detail/dispensing-info-detail.component.ts

@@ -245,7 +245,7 @@ export class DispensingInfoDetailComponent implements OnInit{
245 245
 	    drugsBatch: {
246 246
 	    	batchNo:name,
247 247
 	    	hosId: this.hosId,
248
-				batchStatus:{
248
+				batchState:{
249 249
 					value:2
250 250
 				}
251 251
 	    },

+ 5 - 3
src/app/views/inspect-statistics/inspect-statistics.component.ts

@@ -60,9 +60,11 @@ export class InspectStatisticsComponent implements OnInit {
60 60
  // 重置
61 61
  reset() {
62 62
   this.pageIndex = 1;
63
-  this.startDate = null;
64
- 	this.endDate = null;
65
- 	this.dateRange = [];
63
+	const todayStart = startOfToday();
64
+	const formattedTodayStart = format(todayStart, 'yyyy-MM-dd');
65
+	this.startDate = formattedTodayStart+' '+'00:00:00';
66
+	this.endDate = formattedTodayStart+' '+'23:59:59';
67
+	this.dateRange = [this.startDate,this.endDate];
66 68
   this.getList();
67 69
  }
68 70
  // 表格数据