|
@@ -236,7 +236,8 @@
|
236
|
236
|
:operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
|
237
|
237
|
<!-- 弹窗 -->
|
238
|
238
|
<showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
|
239
|
|
- :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @cancel="cancel4" @radioChange="radioChange4" :operate="models4.operate">
|
|
239
|
+ :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @cancel="cancel4"
|
|
240
|
+ @radioChange="radioChange4" :operate="models4.operate">
|
240
|
241
|
</showModel>
|
241
|
242
|
</view>
|
242
|
243
|
</template>
|
|
@@ -251,13 +252,14 @@
|
251
|
252
|
export default {
|
252
|
253
|
data() {
|
253
|
254
|
return {
|
|
255
|
+ isInspectAndPatientTransform: false, //是否是一键操作
|
254
|
256
|
selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
|
255
|
257
|
// 单选框弹窗model1
|
256
|
258
|
models4: {
|
257
|
259
|
disjunctor: false,
|
258
|
260
|
},
|
259
|
261
|
currentCode: '', //当前小扫描的科室二维码
|
260
|
|
- SMFlag:true,
|
|
262
|
+ SMFlag: true,
|
261
|
263
|
options: {},
|
262
|
264
|
// wechatFocusSwitch: 0,
|
263
|
265
|
hosId: "",
|
|
@@ -296,18 +298,94 @@
|
296
|
298
|
},
|
297
|
299
|
methods: {
|
298
|
300
|
// 获取是否需要选择陪检方式
|
299
|
|
- getInspectAndPatientTransform(){
|
|
301
|
+ getInspectAndPatientTransformSend() {
|
|
302
|
+ let infoDATA = JSON.parse(this.options.infoDATA);
|
|
303
|
+ const postData = {
|
|
304
|
+ "idx": 0,
|
|
305
|
+ "sum": 1,
|
|
306
|
+ "taskTypeConfig": {
|
|
307
|
+ "taskTypeDTO": {
|
|
308
|
+ "hosId": {
|
|
309
|
+ "id": this.hosId
|
|
310
|
+ },
|
|
311
|
+ "associationType": {
|
|
312
|
+ "key": "association_types",
|
|
313
|
+ "value": "inspect",
|
|
314
|
+ },
|
|
315
|
+ },
|
|
316
|
+ },
|
|
317
|
+ };
|
|
318
|
+ uni.showLoading({
|
|
319
|
+ mask: true,
|
|
320
|
+ title: '加载中'
|
|
321
|
+ })
|
|
322
|
+ post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
|
|
323
|
+ console.log(res)
|
|
324
|
+ if (res.status == 200) {
|
|
325
|
+ res.list = res.list || [];
|
|
326
|
+ if (res.list[0].signTypeIds) {
|
|
327
|
+ // 如果开启
|
|
328
|
+ const postData = {
|
|
329
|
+ "idx": 0,
|
|
330
|
+ "sum": 9999,
|
|
331
|
+ "workOrderInspectScore": {
|
|
332
|
+ "hosId": this.hosId,
|
|
333
|
+ },
|
|
334
|
+ };
|
|
335
|
+ post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
|
|
336
|
+ console.log(res)
|
|
337
|
+ uni.hideLoading();
|
|
338
|
+ if (res.status == 200) {
|
|
339
|
+ res.list = res.list || [];
|
|
340
|
+ let radioInspectionDistanceItem = res.list.map(v => ({
|
|
341
|
+ id: v.id + "__" + v.inspectMode,
|
|
342
|
+ inspectMode: v.inspectMode
|
|
343
|
+ }));
|
|
344
|
+ this.models4 = {
|
|
345
|
+ disjunctor: true,
|
|
346
|
+ title: "请选择陪检方式",
|
|
347
|
+ radioInspectionDistanceItem,
|
|
348
|
+ icon: "",
|
|
349
|
+ operate: {
|
|
350
|
+ ok: "确定",
|
|
351
|
+ cancel: "取消",
|
|
352
|
+ },
|
|
353
|
+ };
|
|
354
|
+ } else {
|
|
355
|
+ uni.showToast({
|
|
356
|
+ icon: "none",
|
|
357
|
+ title: "请求失败!",
|
|
358
|
+ });
|
|
359
|
+ }
|
|
360
|
+ })
|
|
361
|
+ } else {
|
|
362
|
+ this.ok3Result();
|
|
363
|
+ }
|
|
364
|
+ } else {
|
|
365
|
+ uni.hideLoading();
|
|
366
|
+ uni.showToast({
|
|
367
|
+ icon: "none",
|
|
368
|
+ title: "请求失败!",
|
|
369
|
+ });
|
|
370
|
+ }
|
|
371
|
+ })
|
|
372
|
+ },
|
|
373
|
+ // 获取是否需要选择陪检方式
|
|
374
|
+ getInspectAndPatientTransform() {
|
|
375
|
+ this.isInspectAndPatientTransform = true;
|
300
|
376
|
console.log(this.typeData);
|
301
|
|
- if(this.typeData){
|
|
377
|
+ if (this.typeData) {
|
302
|
378
|
const postData = {
|
303
|
|
- "idx":0,
|
304
|
|
- "sum":1,
|
305
|
|
- "taskTypeConfig":{
|
306
|
|
- "taskTypeDTO":{
|
307
|
|
- "hosId": {"id": this.hosId},
|
|
379
|
+ "idx": 0,
|
|
380
|
+ "sum": 1,
|
|
381
|
+ "taskTypeConfig": {
|
|
382
|
+ "taskTypeDTO": {
|
|
383
|
+ "hosId": {
|
|
384
|
+ "id": this.hosId
|
|
385
|
+ },
|
308
|
386
|
"associationType": {
|
309
|
387
|
"key": "association_types",
|
310
|
|
- "value":"inspect",
|
|
388
|
+ "value": "inspect",
|
311
|
389
|
},
|
312
|
390
|
},
|
313
|
391
|
},
|
|
@@ -320,12 +398,12 @@
|
320
|
398
|
console.log(res)
|
321
|
399
|
if (res.status == 200) {
|
322
|
400
|
res.list = res.list || [];
|
323
|
|
- if(res.list[0].signTypeIds && this.typeData.gdState.value == 4){
|
|
401
|
+ if (res.list[0].signTypeIds && this.typeData.gdState.value == 4) {
|
324
|
402
|
// 如果开启并且工单状态是待到达
|
325
|
403
|
const postData = {
|
326
|
|
- "idx":0,
|
327
|
|
- "sum":9999,
|
328
|
|
- "workOrderInspectScore":{
|
|
404
|
+ "idx": 0,
|
|
405
|
+ "sum": 9999,
|
|
406
|
+ "workOrderInspectScore": {
|
329
|
407
|
"hosId": this.hosId,
|
330
|
408
|
},
|
331
|
409
|
};
|
|
@@ -334,7 +412,10 @@
|
334
|
412
|
uni.hideLoading();
|
335
|
413
|
if (res.status == 200) {
|
336
|
414
|
res.list = res.list || [];
|
337
|
|
- let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
|
|
415
|
+ let radioInspectionDistanceItem = res.list.map(v => ({
|
|
416
|
+ id: v.id + "__" + v.inspectMode,
|
|
417
|
+ inspectMode: v.inspectMode
|
|
418
|
+ }));
|
338
|
419
|
this.models4 = {
|
339
|
420
|
disjunctor: true,
|
340
|
421
|
title: "请选择陪检方式",
|
|
@@ -352,7 +433,7 @@
|
352
|
433
|
});
|
353
|
434
|
}
|
354
|
435
|
})
|
355
|
|
- }else{
|
|
436
|
+ } else {
|
356
|
437
|
this.allStart(this.typeData);
|
357
|
438
|
}
|
358
|
439
|
} else {
|
|
@@ -363,7 +444,7 @@
|
363
|
444
|
});
|
364
|
445
|
}
|
365
|
446
|
})
|
366
|
|
- }else{
|
|
447
|
+ } else {
|
367
|
448
|
this.models = {
|
368
|
449
|
disjunctor: true,
|
369
|
450
|
content: "请选择工单",
|
|
@@ -386,55 +467,24 @@
|
386
|
467
|
return;
|
387
|
468
|
}
|
388
|
469
|
this.models4.disjunctor = false;
|
389
|
|
- this.allStart(this.typeData);
|
|
470
|
+ // 判断是一键操作还是送回病房
|
|
471
|
+ if(this.isInspectAndPatientTransform){
|
|
472
|
+ this.allStart(this.typeData);
|
|
473
|
+ }else{
|
|
474
|
+ this.ok3Result();
|
|
475
|
+ }
|
390
|
476
|
},
|
391
|
477
|
cancel4() {
|
392
|
478
|
this.models4.disjunctor = false;
|
393
|
479
|
},
|
394
|
480
|
ok2() {
|
395
|
481
|
this.models2.disjunctor = false;
|
396
|
|
- uni.showLoading({
|
397
|
|
- mask: true,
|
398
|
|
- title: '加载中'
|
399
|
|
- })
|
400
|
|
- let userId = uni.getStorageSync("userData").user.id;
|
401
|
|
- let postData = {
|
402
|
|
- "workOrder": {
|
403
|
|
- sourceId: 4,
|
404
|
|
- "hosId": this.hosId,
|
405
|
|
- "startDept": {
|
406
|
|
- "id": this.options.id
|
407
|
|
- },
|
408
|
|
- "createDept": this.options.id,
|
409
|
|
- "patient": {
|
410
|
|
- "patientCode": this.infoDATA.patientCode
|
411
|
|
- },
|
412
|
|
- "worker": {
|
413
|
|
- "id": userId
|
414
|
|
- }
|
415
|
|
- }
|
416
|
|
- };
|
417
|
|
- post("/workerOrder/returnSickRoom", postData).then((res) => {
|
418
|
|
- console.log(res)
|
419
|
|
- uni.hideLoading();
|
420
|
|
- if (res.status == 200) {
|
421
|
|
- uni.showToast({
|
422
|
|
- icon: 'success',
|
423
|
|
- title: '建单成功',
|
424
|
|
- });
|
425
|
|
- } else {
|
426
|
|
- uni.showToast({
|
427
|
|
- icon: "none",
|
428
|
|
- title: "请求失败!",
|
429
|
|
- });
|
430
|
|
- }
|
431
|
|
- })
|
|
482
|
+ this.getInspectAndPatientTransformSend();
|
432
|
483
|
},
|
433
|
484
|
cancel2() {
|
434
|
485
|
this.models2.disjunctor = false;
|
435
|
486
|
},
|
436
|
|
- ok3() {
|
437
|
|
- this.models3.disjunctor = false;
|
|
487
|
+ ok3Result() {
|
438
|
488
|
uni.showLoading({
|
439
|
489
|
mask: true,
|
440
|
490
|
title: '加载中'
|
|
@@ -445,16 +495,17 @@
|
445
|
495
|
sourceId: 4,
|
446
|
496
|
"hosId": this.hosId,
|
447
|
497
|
"startDept": {
|
448
|
|
- "id": this.currentStartDept.id
|
|
498
|
+ "id": this.options.id || this.currentStartDept.id
|
449
|
499
|
},
|
450
|
|
- "createDept": this.currentStartDept.id,
|
|
500
|
+ "createDept": this.options.id || this.currentStartDept.id,
|
451
|
501
|
"patient": {
|
452
|
502
|
"patientCode": this.infoDATA.patientCode
|
453
|
503
|
},
|
454
|
504
|
"worker": {
|
455
|
505
|
"id": userId
|
456
|
|
- }
|
457
|
|
- }
|
|
506
|
+ },
|
|
507
|
+ },
|
|
508
|
+ "inspectMode": this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
|
458
|
509
|
};
|
459
|
510
|
post("/workerOrder/returnSickRoom", postData).then((res) => {
|
460
|
511
|
console.log(res)
|
|
@@ -472,6 +523,10 @@
|
472
|
523
|
}
|
473
|
524
|
})
|
474
|
525
|
},
|
|
526
|
+ ok3() {
|
|
527
|
+ this.models3.disjunctor = false;
|
|
528
|
+ this.getInspectAndPatientTransformSend();
|
|
529
|
+ },
|
475
|
530
|
cancel3() {
|
476
|
531
|
this.models3.disjunctor = false;
|
477
|
532
|
},
|
|
@@ -491,6 +546,7 @@
|
491
|
546
|
},
|
492
|
547
|
// 送回病房-扫描科室
|
493
|
548
|
scanDept() {
|
|
549
|
+ this.isInspectAndPatientTransform = false;
|
494
|
550
|
if (!this.SMFlag) {
|
495
|
551
|
return;
|
496
|
552
|
}
|
|
@@ -525,8 +581,8 @@
|
525
|
581
|
post("/data/fetchDataList/department", postData).then((res) => {
|
526
|
582
|
uni.hideLoading();
|
527
|
583
|
if (res.status == 200) {
|
528
|
|
- if(res.totalNum > 0){
|
529
|
|
- this.currentStartDept = res.list[0]; //baba
|
|
584
|
+ if (res.totalNum > 0) {
|
|
585
|
+ this.currentStartDept = res.list[0];
|
530
|
586
|
this.models3 = {
|
531
|
587
|
disjunctor: true,
|
532
|
588
|
title: "提示",
|
|
@@ -536,8 +592,8 @@
|
536
|
592
|
ok: "确认建单",
|
537
|
593
|
cancel: "取消",
|
538
|
594
|
},
|
539
|
|
- };
|
540
|
|
- }else{
|
|
595
|
+ };
|
|
596
|
+ } else {
|
541
|
597
|
uni.hideLoading();
|
542
|
598
|
uni.showToast({
|
543
|
599
|
icon: "none",
|
|
@@ -561,7 +617,7 @@
|
561
|
617
|
});
|
562
|
618
|
}
|
563
|
619
|
});
|
564
|
|
- }).catch(err=>{
|
|
620
|
+ }).catch(err => {
|
565
|
621
|
this.SMFlag = true;
|
566
|
622
|
});
|
567
|
623
|
},
|
|
@@ -696,7 +752,9 @@
|
696
|
752
|
var ids = [];
|
697
|
753
|
ids.push(data.id);
|
698
|
754
|
type = "orderSign/" + ress;
|
699
|
|
- list = {ids};
|
|
755
|
+ list = {
|
|
756
|
+ ids
|
|
757
|
+ };
|
700
|
758
|
// 科室签到
|
701
|
759
|
post("/workerOrder/" + type, list).then((res) => {
|
702
|
760
|
uni.hideLoading();
|
|
@@ -730,7 +788,7 @@
|
730
|
788
|
}
|
731
|
789
|
});
|
732
|
790
|
// ------------------------------
|
733
|
|
- }).catch(err=>{
|
|
791
|
+ }).catch(err => {
|
734
|
792
|
this.SMFlag = true;
|
735
|
793
|
});
|
736
|
794
|
} else {
|
|
@@ -860,7 +918,7 @@
|
860
|
918
|
this.patientOrders = JSON.parse(options.patientOrders);
|
861
|
919
|
}
|
862
|
920
|
this.code = options.code;
|
863
|
|
-
|
|
921
|
+
|
864
|
922
|
// #ifdef APP-PLUS
|
865
|
923
|
webHandle("no", "app");
|
866
|
924
|
// #endif
|