|
@@ -105,14 +105,7 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
|
105
|
105
|
this.total = result.totalCount;
|
106
|
106
|
this.typeSpecimentList = result.tube || [];
|
107
|
107
|
this.patientSpecimentList = result.patient || [];
|
108
|
|
- let packageDTO:any = result.package || {};
|
109
|
|
- if(packageDTO.endDeptList){
|
110
|
|
- packageDTO.endDeptNames = packageDTO.endDeptList.map(v => v.dept).toString();
|
111
|
|
- }else{
|
112
|
|
- packageDTO.endDeptNames = "";
|
113
|
|
- }
|
114
|
|
- this.package = packageDTO;
|
115
|
|
-
|
|
108
|
+ this.package = result.package || {};
|
116
|
109
|
this.getList();
|
117
|
110
|
}
|
118
|
111
|
})
|
|
@@ -143,9 +136,11 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
|
143
|
136
|
// 隐藏删除框
|
144
|
137
|
hideDelModal() {
|
145
|
138
|
this.delModal = false;
|
|
139
|
+ this.isShowEndDeptId = false;
|
146
|
140
|
}
|
147
|
141
|
// 确认删除
|
148
|
|
- confirmDel() {
|
|
142
|
+ confirmDel(e) {
|
|
143
|
+ console.log(e)
|
149
|
144
|
this.btnLoading = true;
|
150
|
145
|
if (this.confirmDelType === "del") {
|
151
|
146
|
//删除-移除标本
|
|
@@ -184,29 +179,24 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
|
184
|
179
|
});
|
185
|
180
|
}else if (this.confirmDelType === "package") {
|
186
|
181
|
//打包
|
187
|
|
- if(this.configs.spePackageCreateOrder == 1){
|
188
|
|
- // 生成配送工单
|
189
|
|
- let postData = {
|
190
|
|
- type: 'specimenPackage',
|
191
|
|
- id: this.package.id,
|
192
|
|
- }
|
193
|
|
-
|
194
|
|
- this.mainService
|
195
|
|
- .createOrTakeOrderSpecimen(postData)
|
196
|
|
- .subscribe((data:any) => {
|
197
|
|
- this.btnLoading = false;
|
198
|
|
- this.delModal = false;
|
199
|
|
- if (data.state == 200) {
|
200
|
|
- this.printPackage();
|
201
|
|
- } else {
|
202
|
|
- this.message.error(data.msg || "操作失败");
|
203
|
|
- }
|
204
|
|
- });
|
205
|
|
- }else{
|
206
|
|
- this.btnLoading = false;
|
207
|
|
- this.delModal = false;
|
208
|
|
- this.printPackage();
|
|
182
|
+ let postData = {
|
|
183
|
+ type: 'specimenPackage',
|
|
184
|
+ id: this.package.id,
|
|
185
|
+ endDeptId: e.endDeptId,
|
209
|
186
|
}
|
|
187
|
+
|
|
188
|
+ this.mainService
|
|
189
|
+ .createOrTakeOrderSpecimen(postData)
|
|
190
|
+ .subscribe((data:any) => {
|
|
191
|
+ this.btnLoading = false;
|
|
192
|
+ this.delModal = false;
|
|
193
|
+ this.isShowEndDeptId = false;
|
|
194
|
+ if (data.state == 200) {
|
|
195
|
+ this.printPackage();
|
|
196
|
+ } else {
|
|
197
|
+ this.message.error(data.msg || "操作失败");
|
|
198
|
+ }
|
|
199
|
+ });
|
210
|
200
|
}
|
211
|
201
|
}
|
212
|
202
|
|
|
@@ -221,6 +211,7 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
|
221
|
211
|
this.typeSpecimentList = data.tube || [];
|
222
|
212
|
this.patientSpecimentList = data.patient || [];
|
223
|
213
|
this.package = data.package || {};
|
|
214
|
+
|
224
|
215
|
this.base64 = data.base64 || '';
|
225
|
216
|
|
226
|
217
|
this.message.success("操作成功");
|
|
@@ -235,8 +226,26 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
|
235
|
226
|
}
|
236
|
227
|
|
237
|
228
|
// 打包
|
|
229
|
+ isShowEndDeptId:boolean = false;
|
238
|
230
|
packageHandler(){
|
239
|
|
- this.showDelModal({}, `你确认要打包${this.total}只标本吗?`,'打包','package')
|
|
231
|
+ this.isShowEndDeptId = true;
|
|
232
|
+ this.getSpePackageEndDeptList();
|
|
233
|
+ }
|
|
234
|
+
|
|
235
|
+ // 查询标本包里的所有终点克是
|
|
236
|
+ isShowEndDeptIdArr:any[] = [];
|
|
237
|
+ getSpePackageEndDeptList(){
|
|
238
|
+ this.mainService
|
|
239
|
+ .getSpePackageEndDeptList({packageId: this.package.id})
|
|
240
|
+ .subscribe((data:any) => {
|
|
241
|
+ if (data.state == 200) {
|
|
242
|
+ this.isShowEndDeptIdArr = data.data;
|
|
243
|
+
|
|
244
|
+ this.showDelModal({}, `你确认要打包${this.total}只标本吗?`,'打包','package')
|
|
245
|
+ } else {
|
|
246
|
+ this.message.error(data.msg || "操作失败");
|
|
247
|
+ }
|
|
248
|
+ });
|
240
|
249
|
}
|
241
|
250
|
|
242
|
251
|
// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
|