|
@@ -119,7 +119,7 @@ export class HushijiandanComponent implements OnInit {
|
119
|
119
|
});
|
120
|
120
|
this.mainService
|
121
|
121
|
.coopConfig("setOrders", postData)
|
122
|
|
- .subscribe((result) => {});
|
|
122
|
+ .subscribe((result) => { });
|
123
|
123
|
}, 500);
|
124
|
124
|
},
|
125
|
125
|
};
|
|
@@ -230,6 +230,27 @@ export class HushijiandanComponent implements OnInit {
|
230
|
230
|
specimenWorkOrderMsg: any = {}; //急标普标数量&信息
|
231
|
231
|
jpDrugsWKOMsg: any = {}; //药品静配提示信息
|
232
|
232
|
|
|
233
|
+ // 获取报修区域(所属院区)
|
|
234
|
+ areas: any = [];//区域(所属院区)列表
|
|
235
|
+ getArea() {
|
|
236
|
+ this.areas = [];
|
|
237
|
+ this.mainService.fetchListBx('area', { idx: 0, sum: 1000 }).subscribe((result: any) => {
|
|
238
|
+ if (result.status == 200) {
|
|
239
|
+ this.areas = result.list;
|
|
240
|
+ }
|
|
241
|
+ });
|
|
242
|
+ }
|
|
243
|
+ //根据区域(所属院区)获取地点(楼栋)
|
|
244
|
+ places: any = [];//地点(楼栋)列表
|
|
245
|
+ getPlace(buildingId) {
|
|
246
|
+ this.places = [];
|
|
247
|
+ this.mainService.fetchListBx('place', { idx: 0, sum: 1000, place: { area: { id: buildingId } } }).subscribe((result: any) => {
|
|
248
|
+ if (result.status == 200) {
|
|
249
|
+ this.places = result.list;
|
|
250
|
+ }
|
|
251
|
+ });
|
|
252
|
+ }
|
|
253
|
+
|
233
|
254
|
btnLoading: boolean = false; //确认按钮loading状态
|
234
|
255
|
workOrderRemark = ""; //备注
|
235
|
256
|
workOrderRemark1 = ""; //备注
|
|
@@ -379,6 +400,17 @@ export class HushijiandanComponent implements OnInit {
|
379
|
400
|
closeModelHistory(e) {
|
380
|
401
|
this.historyPromptModalShow = JSON.parse(e).show;
|
381
|
402
|
}
|
|
403
|
+ // 查看报修信息弹窗
|
|
404
|
+ bxPromptModalShow = false; //弹窗开关
|
|
405
|
+ bData = ""; //查看详情携带所有数据
|
|
406
|
+ viewBx(data) {
|
|
407
|
+ this.bData = data;
|
|
408
|
+ this.bxPromptModalShow = true;
|
|
409
|
+ }
|
|
410
|
+ // 关闭报修信息弹窗
|
|
411
|
+ closeModelBx(e) {
|
|
412
|
+ this.bxPromptModalShow = JSON.parse(e).show;
|
|
413
|
+ }
|
382
|
414
|
// 护士端患者信息列表,鼠标移入姓名展示最近一条检查信息
|
383
|
415
|
recentInfo = "";
|
384
|
416
|
recentInfoTimer = null;
|
|
@@ -647,11 +679,11 @@ export class HushijiandanComponent implements OnInit {
|
647
|
679
|
data,
|
648
|
680
|
data.focusPatient === 0
|
649
|
681
|
? "您将设置患者【" +
|
650
|
|
- data.patientName +
|
651
|
|
- "】为重点关注,后期此患者的相关检查将会自动建单通知支助中心"
|
|
682
|
+ data.patientName +
|
|
683
|
+ "】为重点关注,后期此患者的相关检查将会自动建单通知支助中心"
|
652
|
684
|
: "您将取消设置患者【" +
|
653
|
|
- data.patientName +
|
654
|
|
- "】为重点关注,后期此患者的相关检查将不会自动建单通知支助中心"
|
|
685
|
+ data.patientName +
|
|
686
|
+ "】为重点关注,后期此患者的相关检查将不会自动建单通知支助中心"
|
655
|
687
|
);
|
656
|
688
|
}
|
657
|
689
|
// 通用提示模态框
|
|
@@ -1066,6 +1098,15 @@ export class HushijiandanComponent implements OnInit {
|
1066
|
1098
|
targetOffice: [null, [this.targetOfficeShortCutValidator1]],
|
1067
|
1099
|
originOffice: [null, [this.originOfficeShortCutValidator1]],
|
1068
|
1100
|
});
|
|
1101
|
+ //新增报修
|
|
1102
|
+ this.bxForm = this.fb.group({
|
|
1103
|
+ name: [null, [Validators.required]],
|
|
1104
|
+ phone: [null, [Validators.required]],
|
|
1105
|
+ hospital: [null, [Validators.required]],
|
|
1106
|
+ building: [null, [Validators.required]],
|
|
1107
|
+ address: [null, [Validators.required]],
|
|
1108
|
+ content: [null, [Validators.required]],
|
|
1109
|
+ });
|
1069
|
1110
|
}
|
1070
|
1111
|
//创建自定义校验规则dateValidator,用于复选框组校验时调用。
|
1071
|
1112
|
// 起点科室校验
|
|
@@ -1871,6 +1912,7 @@ export class HushijiandanComponent implements OnInit {
|
1871
|
1912
|
});
|
1872
|
1913
|
}
|
1873
|
1914
|
shortcutForm: FormGroup; //一键发起建单表单
|
|
1915
|
+ bxForm: FormGroup; //报修表单
|
1874
|
1916
|
// 一键建单校验
|
1875
|
1917
|
// 起点科室校验
|
1876
|
1918
|
originOfficeShortCutValidator = (
|
|
@@ -2232,7 +2274,63 @@ export class HushijiandanComponent implements OnInit {
|
2232
|
2274
|
this.checkedTableType = type;
|
2233
|
2275
|
if (type === "historySpecimen") {
|
2234
|
2276
|
this.getHistorySpecimen();
|
2235
|
|
- }
|
|
2277
|
+ } else if (type === "bxlb") {
|
|
2278
|
+ this.getBxlb();
|
|
2279
|
+ } else if (type === "kjbx") {
|
|
2280
|
+ // 获取报修的区域(所属院区)
|
|
2281
|
+ this.getArea();
|
|
2282
|
+ this.bxForm.controls.name.setValue(this.loginUser.name);
|
|
2283
|
+ this.bxForm.controls.phone.setValue(this.loginUser.phone);
|
|
2284
|
+ this.bxForm.controls.hospital.setValue(null);
|
|
2285
|
+ this.bxForm.controls.building.setValue(null);
|
|
2286
|
+ this.bxForm.controls.address.setValue(null);
|
|
2287
|
+ this.bxForm.controls.content.setValue(null);
|
|
2288
|
+ }
|
|
2289
|
+ }
|
|
2290
|
+ //提交报修
|
|
2291
|
+ bxLoading = false;
|
|
2292
|
+ submitBxForm() {
|
|
2293
|
+ for (const i in this.bxForm.controls) {
|
|
2294
|
+ this.bxForm.controls[i].markAsDirty();
|
|
2295
|
+ this.bxForm.controls[i].updateValueAndValidity();
|
|
2296
|
+ }
|
|
2297
|
+ this.bxLoading = true;
|
|
2298
|
+ this.mainService.wxbx({}).subscribe(result => {
|
|
2299
|
+ if ((result as any).status = 200) {
|
|
2300
|
+ let bxcode = (result as any).data;//生成微信报修号
|
|
2301
|
+ let postData = {
|
|
2302
|
+ verification: "true",
|
|
2303
|
+ incident: {
|
|
2304
|
+ address: this.bxForm.controls.address.value,
|
|
2305
|
+ areaId: this.bxForm.controls.hospital.value,
|
|
2306
|
+ contacts: this.bxForm.controls.name.value,
|
|
2307
|
+ contactsInformation: this.bxForm.controls.phone.value,
|
|
2308
|
+ description: this.bxForm.controls.content.value,
|
|
2309
|
+ placeId: this.bxForm.controls.building.value,
|
|
2310
|
+ requester: { account: this.loginUser.account },
|
|
2311
|
+ sourceType: "wechatUserIncident",
|
|
2312
|
+ fileUrl: "url",
|
|
2313
|
+ bxcode
|
|
2314
|
+ },
|
|
2315
|
+ loginUser: {
|
|
2316
|
+ account: this.loginUser.account,
|
|
2317
|
+ id: this.loginUser.id
|
|
2318
|
+ }
|
|
2319
|
+ };
|
|
2320
|
+ this.mainService.addWxIncident(postData).subscribe(res => {
|
|
2321
|
+ this.bxLoading = false;
|
|
2322
|
+ if ((res as any).state = 200) {
|
|
2323
|
+ this.showPromptModal("提交", true, "");
|
|
2324
|
+ this.checkTable('bxlb');
|
|
2325
|
+ }else{
|
|
2326
|
+ this.showPromptModal("提交", false, "");
|
|
2327
|
+ }
|
|
2328
|
+ })
|
|
2329
|
+ }else{
|
|
2330
|
+ this.bxLoading = false;
|
|
2331
|
+ this.showPromptModal("提交", false, "");
|
|
2332
|
+ }
|
|
2333
|
+ })
|
2236
|
2334
|
}
|
2237
|
2335
|
|
2238
|
2336
|
// 意见箱表格数据
|
|
@@ -2306,6 +2404,33 @@ export class HushijiandanComponent implements OnInit {
|
2306
|
2404
|
this.historySpecimenListLength = data.totalNum || 0;
|
2307
|
2405
|
});
|
2308
|
2406
|
}
|
|
2407
|
+ // 报修列表查询表格数据
|
|
2408
|
+ bxlbList: any = [];
|
|
2409
|
+ bxlbPageIndex: number = 1; //表格当前页码
|
|
2410
|
+ bxlbPageSize: number = 10; //表格每页展示条数
|
|
2411
|
+ bxlbListLength: number = 10; //表格总数据量
|
|
2412
|
+ bxlbCodeSearchInp: string = ""; //标本编码搜索
|
|
2413
|
+ bxlbParentSearchInp: string = ""; //患者信息搜索
|
|
2414
|
+ bxlbLoading = false;
|
|
2415
|
+ getBxlb(idx?) {
|
|
2416
|
+ if (idx) {
|
|
2417
|
+ this.bxlbPageIndex = 1;
|
|
2418
|
+ }
|
|
2419
|
+ let current = JSON.parse(localStorage.getItem("user"));
|
|
2420
|
+ this.bxlbLoading = true;
|
|
2421
|
+ this.mainService
|
|
2422
|
+ .listWxIncident({
|
|
2423
|
+ "assignee": current.user.account,
|
|
2424
|
+ "state": 0,
|
|
2425
|
+ "idx": this.bxlbPageIndex - 1,
|
|
2426
|
+ "sum": this.bxlbPageSize
|
|
2427
|
+ })
|
|
2428
|
+ .subscribe((data: any) => {
|
|
2429
|
+ this.bxlbLoading = false;
|
|
2430
|
+ this.bxlbList = data.data || [];
|
|
2431
|
+ this.bxlbListLength = data.resultCount || 0;
|
|
2432
|
+ });
|
|
2433
|
+ }
|
2309
|
2434
|
|
2310
|
2435
|
// 意见箱-查看模态框
|
2311
|
2436
|
adviceModal: boolean = false;
|
|
@@ -2433,7 +2558,7 @@ export class HushijiandanComponent implements OnInit {
|
2433
|
2558
|
if (
|
2434
|
2559
|
that.adviceList.length == 1 &&
|
2435
|
2560
|
that.advicePageIndex ==
|
2436
|
|
- Math.ceil(that.adviceListLength / that.advicePageSize)
|
|
2561
|
+ Math.ceil(that.adviceListLength / that.advicePageSize)
|
2437
|
2562
|
) {
|
2438
|
2563
|
that.adviceListLength--;
|
2439
|
2564
|
that.advicePageIndex = Math.ceil(
|