|
@@ -6,15 +6,19 @@
|
6
|
6
|
<div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
|
7
|
7
|
<div class="mainLeft">
|
8
|
8
|
<div class="mainCell" style="justify-content: space-between;">
|
9
|
|
- <p>未就诊:<span>1</span>人</p>
|
10
|
|
- <p>已就诊:<span>0</span>人</p>
|
|
9
|
+ <p style="color: red">未收费:<span>{{cal_one}}</span>人</p>
|
|
10
|
+ <p style="color: red">已收费:<span>{{cal_two}}</span>人</p>
|
|
11
|
+ <p style="color: red">已退费:<span>{{cal_three}}</span>人</p>
|
|
12
|
+
|
11
|
13
|
</div>
|
12
|
14
|
<div class="mainCell">
|
13
|
|
- <el-radio-group v-model="radio" @change="changeRadio">
|
14
|
|
- <el-radio :label=1>未就诊</el-radio>
|
15
|
|
- <el-radio :label=2>已就诊</el-radio>
|
16
|
|
- <el-radio :label=3>全部</el-radio>
|
17
|
|
- </el-radio-group>
|
|
15
|
+ <el-radio-group v-model="radio" @change="changeRadio">
|
|
16
|
+ <el-radio :label=1>未收费</el-radio>
|
|
17
|
+ <el-radio :label=2>已收费</el-radio>
|
|
18
|
+ <el-radio :label=3>已退费</el-radio>
|
|
19
|
+ <el-radio :label=4>全部</el-radio>
|
|
20
|
+
|
|
21
|
+ </el-radio-group>
|
18
|
22
|
</div>
|
19
|
23
|
<div class="mainCell" style="margin-bottom:10px;">
|
20
|
24
|
<el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
|
|
@@ -23,7 +27,8 @@
|
23
|
27
|
</el-button>
|
24
|
28
|
</div>
|
25
|
29
|
<div>
|
26
|
|
- <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
|
30
|
+ <el-table :data="patientTableData" :height="tableHeight" border style="width: 100%;"
|
|
31
|
+ :row-style="{ color: '#303133' }"
|
27
|
32
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
28
|
33
|
highlight-current-row ref="tab"
|
29
|
34
|
@current-change="handleCurrentChange">
|
|
@@ -42,15 +47,18 @@
|
42
|
47
|
<el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
|
43
|
48
|
<el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
|
44
|
49
|
<el-button size="small" @click="open(3)" type="primary">打印</el-button>
|
45
|
|
- <el-button v-loading="loadingone" size="small"
|
|
50
|
+ <el-button v-loading="loadingone" size="small"
|
46
|
51
|
@click="open(6)"
|
|
52
|
+ v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
|
47
|
53
|
type="primary">挂号
|
48
|
54
|
</el-button>
|
49
|
55
|
<el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
|
50
|
56
|
@click="open(4)"
|
51
|
57
|
type="primary">收费
|
52
|
58
|
</el-button>
|
53
|
|
- <el-button size="small" @click="open(5)" type="primary" v-if="this.info && this.info.prescription_status == 3">退费</el-button>
|
|
59
|
+ <el-button size="small" @click="open(5)" type="primary"
|
|
60
|
+ v-if="this.info && this.info.prescription_status == 3">退费
|
|
61
|
+ </el-button>
|
54
|
62
|
</div>
|
55
|
63
|
|
56
|
64
|
<div class="mainCenter">
|
|
@@ -211,7 +219,7 @@
|
211
|
219
|
import prescriptionTable from './components/prescriptionTable'
|
212
|
220
|
import additionalCharges from './components/additionalCharges'
|
213
|
221
|
import { getPatientInformation, getPatientList } from '@/api/project/project'
|
214
|
|
- import { getPatientInfo, getSchedulePatientList, register, upload } from '@/api/his/his'
|
|
222
|
+ import { getPatientInfo, getSchedulePatientList, register, upload,Refund } from '@/api/his/his'
|
215
|
223
|
|
216
|
224
|
const moment = require('moment')
|
217
|
225
|
export default {
|
|
@@ -229,7 +237,10 @@
|
229
|
237
|
{ path: false, name: '门诊收费' },
|
230
|
238
|
{ path: false, name: '门诊收费管理' }
|
231
|
239
|
],
|
232
|
|
- tableHeight:'',
|
|
240
|
+ cal_one:'',
|
|
241
|
+ cal_two:'',
|
|
242
|
+ cal_three:'',
|
|
243
|
+ tableHeight: '',
|
233
|
244
|
fullHeight: document.documentElement.clientHeight,
|
234
|
245
|
activeName: 'first',
|
235
|
246
|
info: {},
|
|
@@ -258,8 +269,10 @@
|
258
|
269
|
radioStatus: 1,
|
259
|
270
|
search_input: '',
|
260
|
271
|
start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
|
261
|
|
- patient_id:0,
|
262
|
|
- prescription_id:0
|
|
272
|
+ patient_id: 0,
|
|
273
|
+ prescription_id: 0,
|
|
274
|
+ all_table_data:[],
|
|
275
|
+ order:{},
|
263
|
276
|
}
|
264
|
277
|
},
|
265
|
278
|
created() {
|
|
@@ -365,7 +378,7 @@
|
365
|
378
|
|
366
|
379
|
},
|
367
|
380
|
tabclickEvent(val) {
|
368
|
|
- console.log("val",val.name)
|
|
381
|
+ console.log('val', val.name)
|
369
|
382
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
370
|
383
|
if (this.prescriptions[i].name == val.name) {
|
371
|
384
|
this.curPrescriptions = {}
|
|
@@ -373,13 +386,10 @@
|
373
|
386
|
this.curPrescriptions = temp
|
374
|
387
|
}
|
375
|
388
|
}
|
376
|
|
- console.log("9999",this.curPrescriptions)
|
|
389
|
+ console.log('9999', this.curPrescriptions)
|
377
|
390
|
this.prescription_id = this.curPrescriptions.id
|
378
|
391
|
this.total = 0
|
379
|
392
|
this.total = this.getTotalOne()
|
380
|
|
-
|
381
|
|
-
|
382
|
|
-
|
383
|
393
|
|
384
|
394
|
}, deepClone(source) {
|
385
|
395
|
if (!source && typeof source !== 'object') {
|
|
@@ -394,33 +404,31 @@
|
394
|
404
|
}
|
395
|
405
|
})
|
396
|
406
|
return targetObj
|
397
|
|
- },getTotalOne(){
|
|
407
|
+ }, getTotalOne() {
|
398
|
408
|
var total = 0
|
399
|
|
- if(this.curPrescriptions.type == 1) {
|
400
|
|
- if (this.curPrescriptions.advices != null) {
|
401
|
|
- for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
|
402
|
|
- console.log(this.curPrescriptions.advices[a].retail_price)
|
403
|
|
- console.log(this.curPrescriptions.advices[a].prescribing_number)
|
|
409
|
+ if (this.curPrescriptions.type == 1) {
|
|
410
|
+ if (this.curPrescriptions.advices != null) {
|
|
411
|
+ for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
|
|
412
|
+ console.log(this.curPrescriptions.advices[a].retail_price)
|
|
413
|
+ console.log(this.curPrescriptions.advices[a].prescribing_number)
|
404
|
414
|
|
405
|
|
- total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
|
406
|
|
- }
|
|
415
|
+ total = total + this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number
|
407
|
416
|
}
|
408
|
|
- return total
|
409
|
|
-
|
410
|
|
- }else{
|
411
|
|
- var total = 0
|
412
|
|
- if (this.curPrescriptions.project != null) {
|
413
|
|
- for (let b = 0; b < this.curPrescriptions.project.length; b++) {
|
414
|
|
- console.log(this.curPrescriptions.project[b].price )
|
415
|
|
- console.log(this.curPrescriptions.project[b].total )
|
416
|
|
- total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
|
417
|
|
- }
|
|
417
|
+ }
|
|
418
|
+ return total
|
|
419
|
+
|
|
420
|
+ } else {
|
|
421
|
+ var total = 0
|
|
422
|
+ if (this.curPrescriptions.project != null) {
|
|
423
|
+ for (let b = 0; b < this.curPrescriptions.project.length; b++) {
|
|
424
|
+ console.log(this.curPrescriptions.project[b].price)
|
|
425
|
+ console.log(this.curPrescriptions.project[b].total)
|
|
426
|
+ total = total + this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total
|
418
|
427
|
}
|
419
|
|
- return total
|
420
|
|
-
|
421
|
428
|
}
|
|
429
|
+ return total
|
422
|
430
|
|
423
|
|
-
|
|
431
|
+ }
|
424
|
432
|
|
425
|
433
|
},
|
426
|
434
|
getTotal() {
|
|
@@ -445,15 +453,15 @@
|
445
|
453
|
}
|
446
|
454
|
},
|
447
|
455
|
open(index) {
|
448
|
|
- console.log("index",index)
|
|
456
|
+ console.log('index', index)
|
449
|
457
|
if (index == 1) {
|
450
|
458
|
|
451
|
459
|
} else if (index == 2) {
|
452
|
|
-
|
453
|
|
- this.$router.push("/outpatientDoctorStation/printtwo?record="+this.record_date)
|
454
|
|
-
|
455
|
|
- } else if(index == 3){
|
456
|
|
- this.$router.push("/outpatientCharges/treatPrint?record_date="+this.record_date+"&patient_id="+this.patient_id+"&prescription_id="+this.prescription_id)
|
|
460
|
+
|
|
461
|
+ this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
|
|
462
|
+
|
|
463
|
+ } else if (index == 3) {
|
|
464
|
+ this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
|
457
|
465
|
} else if (index == 4) {
|
458
|
466
|
|
459
|
467
|
let params = {
|
|
@@ -478,8 +486,8 @@
|
478
|
486
|
this.$message({ message: '收费成功', type: 'success' })
|
479
|
487
|
} else if (index == 5) {
|
480
|
488
|
let params = {
|
481
|
|
- 'id': this.patientInfo.id,
|
482
|
|
- 'record_time': this.record_date
|
|
489
|
+ 'order_id': this.order.id,
|
|
490
|
+ 'number': this.order.number,
|
483
|
491
|
}
|
484
|
492
|
Refund(params).then(response => {
|
485
|
493
|
if (response.data.state == 0) {
|
|
@@ -494,9 +502,6 @@
|
494
|
502
|
}
|
495
|
503
|
})
|
496
|
504
|
|
497
|
|
-
|
498
|
|
-
|
499
|
|
-
|
500
|
505
|
this.$message({ message: '退费成功', type: 'success' })
|
501
|
506
|
} else if (index == 6) {
|
502
|
507
|
|
|
@@ -531,9 +536,52 @@
|
531
|
536
|
this.getPatientList()
|
532
|
537
|
},
|
533
|
538
|
changeRadio(id) {
|
534
|
|
- console.log(id)
|
535
|
|
- this.radioStatus = id
|
536
|
|
- this.getPatientList()
|
|
539
|
+ // console.log(id)
|
|
540
|
+ // this.radioStatus = id
|
|
541
|
+ // this.getPatientList()
|
|
542
|
+
|
|
543
|
+ switch (id) {
|
|
544
|
+ case 1:
|
|
545
|
+ this.patientTableData = []
|
|
546
|
+
|
|
547
|
+ for (let i = 0; i < this.all_table_data.length; i++){
|
|
548
|
+ if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
|
|
549
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
550
|
+ }
|
|
551
|
+
|
|
552
|
+ }
|
|
553
|
+ break
|
|
554
|
+ case 2:
|
|
555
|
+ this.patientTableData = []
|
|
556
|
+ for (let i = 0; i < this.all_table_data.length; i++){
|
|
557
|
+ if(this.all_table_data[i].info.prescription_status == 3){
|
|
558
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
559
|
+ }
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+ }
|
|
563
|
+ break
|
|
564
|
+ case 3:
|
|
565
|
+ this.patientTableData = []
|
|
566
|
+
|
|
567
|
+ for (let i = 0; i < this.all_table_data.length; i++){
|
|
568
|
+
|
|
569
|
+ if(this.all_table_data[i].info.prescription_status == 4){
|
|
570
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
571
|
+ }
|
|
572
|
+
|
|
573
|
+ }
|
|
574
|
+ break
|
|
575
|
+ case 4:
|
|
576
|
+ this.patientTableData = []
|
|
577
|
+ this.patientTableData = this.all_table_data
|
|
578
|
+ break
|
|
579
|
+
|
|
580
|
+ }
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
537
|
585
|
},
|
538
|
586
|
|
539
|
587
|
//患者列表
|
|
@@ -547,12 +595,45 @@
|
547
|
595
|
return false
|
548
|
596
|
} else {
|
549
|
597
|
this.patientTableData = []
|
|
598
|
+ this.all_table_data = []
|
|
599
|
+ let one_count = 0
|
|
600
|
+ let two_count = 0
|
|
601
|
+ let three_count = 0
|
550
|
602
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
551
|
|
- console.log("99999999",response.data.data.list)
|
|
603
|
+ // console.log('99999999', response.data.data.list)
|
|
604
|
+
|
|
605
|
+ if(response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 ||response.data.data.list[i].info.prescription_status == 2 ){
|
|
606
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
607
|
+ one_count = one_count + 1
|
|
608
|
+ this.patientTableData.push(response.data.data.list[i])
|
|
609
|
+ }
|
|
610
|
+ }
|
|
611
|
+
|
|
612
|
+ if(response.data.data.list[i].info.prescription_status == 3){
|
|
613
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
614
|
+
|
|
615
|
+ two_count = two_count + 1
|
|
616
|
+ }
|
|
617
|
+ }
|
|
618
|
+
|
|
619
|
+ if(response.data.data.list[i].info.prescription_status == 4){
|
|
620
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
621
|
+ three_count = three_count + 1
|
|
622
|
+ }
|
|
623
|
+ }
|
|
624
|
+
|
552
|
625
|
if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
553
|
|
- this.patientTableData.push(response.data.data.list[i])
|
|
626
|
+ this.all_table_data.push(response.data.data.list[i])
|
554
|
627
|
}
|
555
|
628
|
}
|
|
629
|
+
|
|
630
|
+ this.cal_one = one_count
|
|
631
|
+ this.cal_two = two_count
|
|
632
|
+ this.cal_three = three_count
|
|
633
|
+
|
|
634
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
635
|
+ this.getPatientInformation(this.patientTableData[0].patients.id,"")
|
|
636
|
+
|
556
|
637
|
}
|
557
|
638
|
})
|
558
|
639
|
},
|
|
@@ -563,15 +644,16 @@
|
563
|
644
|
},
|
564
|
645
|
handleCurrentChange(val) {
|
565
|
646
|
console.log('val', val)
|
566
|
|
- this.getPatientInformation(val.patients.id)
|
|
647
|
+ this.getPatientInformation(val.patients.id, val.info.batch_number)
|
567
|
648
|
this.patient_id = val.patients.id
|
568
|
649
|
},
|
569
|
650
|
|
570
|
651
|
//获取患者的基本信息
|
571
|
|
- getPatientInformation(id) {
|
|
652
|
+ getPatientInformation(id,batch_number) {
|
572
|
653
|
let params = {
|
573
|
654
|
'record_date': this.record_date,
|
574
|
|
- 'patient_id': id
|
|
655
|
+ 'patient_id': id,
|
|
656
|
+ 'number':batch_number,
|
575
|
657
|
}
|
576
|
658
|
getPatientInfo(params).then(response => {
|
577
|
659
|
if (response.data.state == 0) {
|
|
@@ -581,6 +663,8 @@
|
581
|
663
|
this.patientInfo = response.data.data.xt_info
|
582
|
664
|
this.hisPatientInfo = response.data.data.his_info
|
583
|
665
|
this.info = response.data.data.info
|
|
666
|
+ this.order = response.data.data.order
|
|
667
|
+
|
584
|
668
|
this.prescriptions = []
|
585
|
669
|
for (let i = 0; i < response.data.data.prescription.length; i++) {
|
586
|
670
|
var prescription = response.data.data.prescription[i]
|
|
@@ -631,7 +715,7 @@
|
631
|
715
|
name: '处方' + index,
|
632
|
716
|
advices: tempAdvice,
|
633
|
717
|
project: tempProject,
|
634
|
|
- order_status:response.data.data.prescription[i].order_status,
|
|
718
|
+ order_status: response.data.data.prescription[i].order_status,
|
635
|
719
|
type: response.data.data.prescription[i].type
|
636
|
720
|
}
|
637
|
721
|
this.prescriptions.push(obj)
|
|
@@ -640,13 +724,12 @@
|
640
|
724
|
this.total = this.getTotalOne()
|
641
|
725
|
console.log(this.total)
|
642
|
726
|
|
643
|
|
-
|
644
|
727
|
}
|
645
|
728
|
}
|
646
|
729
|
})
|
647
|
730
|
}
|
648
|
731
|
},
|
649
|
|
- mounted(){
|
|
732
|
+ mounted() {
|
650
|
733
|
const that = this
|
651
|
734
|
window.onresize = () => {
|
652
|
735
|
return (() => {
|
|
@@ -656,16 +739,16 @@
|
656
|
739
|
}
|
657
|
740
|
},
|
658
|
741
|
watch: {
|
659
|
|
- fullHeight (val) {
|
660
|
|
- if(!this.timer) {
|
|
742
|
+ fullHeight(val) {
|
|
743
|
+ if (!this.timer) {
|
661
|
744
|
this.fullHeight = val
|
662
|
745
|
let tableHeight = val - 263
|
663
|
746
|
this.tableHeight = tableHeight
|
664
|
747
|
this.timer = true
|
665
|
748
|
let that = this
|
666
|
|
- setTimeout(function (){
|
|
749
|
+ setTimeout(function() {
|
667
|
750
|
that.timer = false
|
668
|
|
- },400)
|
|
751
|
+ }, 400)
|
669
|
752
|
}
|
670
|
753
|
}
|
671
|
754
|
}
|