|
@@ -18,11 +18,11 @@
|
18
|
18
|
<el-form-item label="证件号: " prop="name">
|
19
|
19
|
<el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
|
20
|
20
|
</el-form-item>
|
|
21
|
+ <!--<el-form-item label="挂号类型: " prop="name">-->
|
|
22
|
+ <!--<el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>-->
|
|
23
|
+ <!--</el-form-item>-->
|
21
|
24
|
<el-form-item label="挂号类型: " prop="name">
|
22
|
|
- <el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>
|
23
|
|
- </el-form-item>
|
24
|
|
- <el-form-item label="挂号类型: " prop="name">
|
25
|
|
- <el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
|
|
25
|
+ <el-select style="margin-right:5px;" v-model="register_type" placeholder="">
|
26
|
26
|
<el-option
|
27
|
27
|
v-for="(item,index) in doctors"
|
28
|
28
|
:key="index"
|
|
@@ -223,7 +223,8 @@
|
223
|
223
|
delHisPrescription,
|
224
|
224
|
getInitData,
|
225
|
225
|
getPatientInfo,
|
226
|
|
- getSchedulePatientList
|
|
226
|
+ getSchedulePatientList,
|
|
227
|
+
|
227
|
228
|
} from '@/api/his/his'
|
228
|
229
|
import { getDictionaryDataConfig } from '@/utils/data'
|
229
|
230
|
import prescriptionTable from './prescriptionTable'
|
|
@@ -238,6 +239,7 @@
|
238
|
239
|
hisPatientInfo: Object,
|
239
|
240
|
prescriptions: Array,
|
240
|
241
|
record_date: String,
|
|
242
|
+
|
241
|
243
|
other_sick: {
|
242
|
244
|
type: Array,
|
243
|
245
|
default: []
|
|
@@ -255,6 +257,7 @@
|
255
|
257
|
},
|
256
|
258
|
data() {
|
257
|
259
|
return {
|
|
260
|
+ register_type:"",
|
258
|
261
|
value: '',
|
259
|
262
|
form: {
|
260
|
263
|
name: ''
|
|
@@ -378,35 +381,57 @@
|
378
|
381
|
console.log(this.prescriptions[i].name)
|
379
|
382
|
if (this.prescriptions[i].name == val.name) {
|
380
|
383
|
this.curPrescriptions = this.prescriptions[i]
|
|
384
|
+ this.teamList = []
|
|
385
|
+ this.curDrugs = []
|
|
386
|
+ this.$refs.multipleTable.clearSelection()
|
|
387
|
+ this.$refs.tables.clearSelection()
|
381
|
388
|
|
382
|
389
|
//用来区分处方属于项目还是药品
|
383
|
390
|
if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
384
|
391
|
this.customTabIndex = 1
|
385
|
392
|
this.curStatus = 1
|
|
393
|
+ this.rightTab = 1
|
|
394
|
+ this.showOne = true
|
|
395
|
+ this.showTwo = false
|
386
|
396
|
}
|
387
|
397
|
if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
|
388
|
398
|
|
389
|
399
|
this.customTabIndex = 2
|
390
|
400
|
this.curStatus = 2
|
|
401
|
+ this.rightTab = 2
|
|
402
|
+
|
|
403
|
+ this.showTwo = true
|
|
404
|
+ this.showOne = false
|
391
|
405
|
}
|
392
|
406
|
|
393
|
407
|
if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
394
|
408
|
this.customTabIndex = this.rightTab
|
|
409
|
+ this.curStatus = 0
|
|
410
|
+
|
395
|
411
|
}
|
396
|
412
|
|
397
|
413
|
}
|
398
|
414
|
|
399
|
415
|
}
|
400
|
416
|
}, clearData() {
|
401
|
|
-
|
|
417
|
+ console.log("111111")
|
402
|
418
|
this.curPrescriptions = []
|
|
419
|
+ this.curStatus = 0
|
|
420
|
+ this.curDrugs = []
|
|
421
|
+ this.preDrugs = []
|
|
422
|
+ this.teamList = []
|
|
423
|
+
|
|
424
|
+
|
403
|
425
|
},
|
404
|
426
|
setData(data) {
|
|
427
|
+ this.curStatus = 0
|
|
428
|
+
|
405
|
429
|
this.prescriptions = data
|
|
430
|
+ this.curPrescriptions = this.prescriptions[0]
|
406
|
431
|
console.log(this.$refs)
|
407
|
|
- this.$nextTick(() => {
|
408
|
|
- this.$refs.prescription_tables.setNewData(this.prescriptions[0])
|
409
|
|
- })
|
|
432
|
+ // this.$nextTick(() => {
|
|
433
|
+ // this.$refs.prescription_tables.setNewData(this.prescriptions[0])
|
|
434
|
+ // })
|
410
|
435
|
},
|
411
|
436
|
moreState(tab, event) {
|
412
|
437
|
if (tab == 'more') {
|
|
@@ -420,7 +445,7 @@
|
420
|
445
|
diagnose: this.state1,
|
421
|
446
|
sick_history: this.state2,
|
422
|
447
|
doctor: this.doctorValue,
|
423
|
|
- department: this.departmentValue,
|
|
448
|
+ department: this.departmentValue,
|
424
|
449
|
record_date: this.record_date,
|
425
|
450
|
his_patient_id: this.hisPatientInfo.id
|
426
|
451
|
}
|
|
@@ -444,7 +469,7 @@
|
444
|
469
|
}
|
445
|
470
|
createHisPrescription(data, params).then(response => {
|
446
|
471
|
if (response.data.state == 1) {
|
447
|
|
- this.prescriptions = []
|
|
472
|
+ // this.prescriptions = []
|
448
|
473
|
this.$message.success('保存成功')
|
449
|
474
|
}
|
450
|
475
|
})
|
|
@@ -518,6 +543,37 @@
|
518
|
543
|
delHisPrescription(params).then(response => {
|
519
|
544
|
if (response.data.state == 1) {
|
520
|
545
|
this.$message.success('删除成功')
|
|
546
|
+ let tabs = this.prescriptions
|
|
547
|
+ let activeName = this.editableTabsValue
|
|
548
|
+ if (activeName === targetName) {
|
|
549
|
+ tabs.forEach((tab, index) => {
|
|
550
|
+ if (tab.name === targetName) {
|
|
551
|
+ let nextTab = tabs[index + 1] || tabs[index - 1]
|
|
552
|
+ if (nextTab) {
|
|
553
|
+ activeName = nextTab.name
|
|
554
|
+
|
|
555
|
+ }
|
|
556
|
+ }
|
|
557
|
+ })
|
|
558
|
+ }
|
|
559
|
+ this.editableTabsValue = activeName
|
|
560
|
+ this.prescriptions = tabs.filter(tab => tab.name !== targetName)
|
|
561
|
+
|
|
562
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
563
|
+ if (activeName == this.prescriptions[i].name) {
|
|
564
|
+ this.curPrescriptions = this.prescriptions[i]
|
|
565
|
+ if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
|
|
566
|
+ this.curStatus = 1
|
|
567
|
+ }
|
|
568
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
|
|
569
|
+ this.curStatus = 2
|
|
570
|
+ }
|
|
571
|
+ }
|
|
572
|
+ }
|
|
573
|
+ if (this.prescriptions.length == 0) {
|
|
574
|
+ this.curPrescriptions = []
|
|
575
|
+ this.curStatus = 0
|
|
576
|
+ }
|
521
|
577
|
} else {
|
522
|
578
|
this.$message.success(response.data.msg)
|
523
|
579
|
}
|
|
@@ -525,7 +581,25 @@
|
525
|
581
|
}
|
526
|
582
|
},
|
527
|
583
|
clickTab(index) {
|
|
584
|
+ if (index == 1){
|
|
585
|
+ if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
|
|
586
|
+ this.$message.error("当前处方为项目,无法切换为药品,需要新开处方")
|
|
587
|
+ return
|
|
588
|
+ }
|
|
589
|
+ }else{
|
|
590
|
+ if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
|
591
|
+ this.$message.error("当前处方为药品,无法切换为项目,需要新开处方")
|
|
592
|
+ return
|
|
593
|
+ }
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+ }
|
|
597
|
+
|
528
|
598
|
if (index == 1) {
|
|
599
|
+
|
|
600
|
+ this.teamList = []
|
|
601
|
+ this.$refs.tables.clearSelection()
|
|
602
|
+
|
529
|
603
|
this.showOne = true
|
530
|
604
|
this.showTwo = false
|
531
|
605
|
this.$nextTick(() => {
|
|
@@ -534,6 +608,9 @@
|
534
|
608
|
this.customTabIndex = 1
|
535
|
609
|
}
|
536
|
610
|
if (index == 2) {
|
|
611
|
+ this.curDrugs = []
|
|
612
|
+ this.$refs.multipleTable.clearSelection()
|
|
613
|
+
|
537
|
614
|
this.showTwo = true
|
538
|
615
|
this.showOne = false
|
539
|
616
|
this.$nextTick(() => {
|
|
@@ -545,17 +622,22 @@
|
545
|
622
|
|
546
|
623
|
//用来区分处方属于项目还是药品
|
547
|
624
|
if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
548
|
|
-
|
549
|
625
|
this.customTabIndex = 1
|
|
626
|
+ this.curStatus =1
|
|
627
|
+
|
550
|
628
|
}
|
551
|
629
|
if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
|
552
|
|
-
|
553
|
630
|
this.customTabIndex = 2
|
|
631
|
+ this.curStatus =2
|
554
|
632
|
}
|
555
|
633
|
if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
556
|
634
|
// this.customTabIndex = this.rightTab
|
557
|
635
|
this.customTabIndex = index
|
|
636
|
+ this.curStatus =0
|
|
637
|
+
|
558
|
638
|
}
|
|
639
|
+
|
|
640
|
+
|
559
|
641
|
}, changeAllGoodInfoTableData: function(selection) {
|
560
|
642
|
this.curDrugs = selection
|
561
|
643
|
}, addCharges() {
|
|
@@ -565,9 +647,7 @@
|
565
|
647
|
this.curDrugs = selection
|
566
|
648
|
},
|
567
|
649
|
comfirm() {
|
568
|
|
- console.log(this.curStatus)
|
569
|
|
- console.log(this.rightTab)
|
570
|
|
- console.log(this.curPrescriptions)
|
|
650
|
+
|
571
|
651
|
|
572
|
652
|
|
573
|
653
|
if (this.curStatus == 1 && this.rightTab == 2) {
|
|
@@ -589,6 +669,7 @@
|
589
|
669
|
var temp = this.deepClone(this.curDrugs)
|
590
|
670
|
var temp2 = this.deepClone(this.teamList)
|
591
|
671
|
|
|
672
|
+ console.log(temp2)
|
592
|
673
|
if (temp.length > 0) {
|
593
|
674
|
for (let b = 0; b < temp.length; b++) {
|
594
|
675
|
let obj = {
|
|
@@ -602,7 +683,8 @@
|
602
|
683
|
prescribing_number: temp[b].prescribing_number,
|
603
|
684
|
single_dose_unit: temp[b].min_unit,
|
604
|
685
|
prescribing_number_unit: temp[b].min_unit,
|
605
|
|
- min_unit: temp[b].min_unit
|
|
686
|
+ min_unit: temp[b].min_unit,
|
|
687
|
+ medical_insurance_number:temp[b].medical_insurance_number,
|
606
|
688
|
|
607
|
689
|
}
|
608
|
690
|
this.prescriptions[i].advices.push(obj)
|
|
@@ -612,10 +694,26 @@
|
612
|
694
|
|
613
|
695
|
if (temp2.length > 0) {
|
614
|
696
|
for (let b = 0; b < temp2.length; b++) {
|
615
|
|
- this.prescriptions[i].project.push(temp2[b])
|
|
697
|
+ let obj = {
|
|
698
|
+ id: 0,
|
|
699
|
+ project_id: temp2[b].id,
|
|
700
|
+ project_name: temp2[b].project_name,
|
|
701
|
+ statistical_classification: temp2[b].statistical_classification,
|
|
702
|
+ single_dose: temp2[b].single_dose,
|
|
703
|
+ delivery_way: temp2[b].delivery_way,
|
|
704
|
+ execution_frequency: temp2[b].execution_frequency,
|
|
705
|
+ number_days: temp2[b].number_days,
|
|
706
|
+ total:temp2[b].total,
|
|
707
|
+ price:temp2[b].price,
|
|
708
|
+ remark:"",
|
|
709
|
+ medical_code:temp2[b].medical_code,
|
|
710
|
+ }
|
|
711
|
+ console.log(obj)
|
|
712
|
+ this.prescriptions[i].project.push(obj)
|
616
|
713
|
}
|
617
|
714
|
this.curStatus = 2
|
618
|
715
|
}
|
|
716
|
+
|
619
|
717
|
this.curPrescriptions = this.prescriptions[i]
|
620
|
718
|
this.$refs.multipleTable.clearSelection()
|
621
|
719
|
this.$refs.tables.clearSelection()
|