|
@@ -53,7 +53,9 @@
|
53
|
53
|
v-loading="detail_loading"
|
54
|
54
|
highlight-current-row>
|
55
|
55
|
<el-table-column type="index" label="序号" width="60px" align="center">
|
56
|
|
- <template slot-scope="scope">{{scope.row.index}}</template>
|
|
56
|
+ <template slot-scope="scope">
|
|
57
|
+ {{scope.row.index}}
|
|
58
|
+ </template>
|
57
|
59
|
</el-table-column>
|
58
|
60
|
<el-table-column align="center" label="处方日期">
|
59
|
61
|
<template slot-scope="scope">
|
|
@@ -121,7 +123,6 @@
|
121
|
123
|
</el-table>
|
122
|
124
|
<div>
|
123
|
125
|
<div class="listInfo">
|
124
|
|
- <!-- <div>西药:{{westernMedicineCostTotal}}</div> -->
|
125
|
126
|
<div>西药:{{getWesternMedicineCostTotal()}}</div>
|
126
|
127
|
<div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
|
127
|
128
|
<div>中草药:{{getChineseTotal()}}</div>
|
|
@@ -204,6 +205,8 @@ export default {
|
204
|
205
|
balanceAccountsType:0,
|
205
|
206
|
medicalInsuranceLevelList:[],
|
206
|
207
|
id:0,
|
|
208
|
+ start_time:"",
|
|
209
|
+ end_time:"",
|
207
|
210
|
}
|
208
|
211
|
},
|
209
|
212
|
methods: {
|
|
@@ -219,7 +222,6 @@ export default {
|
219
|
222
|
}
|
220
|
223
|
var obj ={index:"合计",is_total:1,total:0}
|
221
|
224
|
obj.total = this.getPrice(new_arr)
|
222
|
|
- // new_arr.push(obj)
|
223
|
225
|
this.tableList = []
|
224
|
226
|
this.tableList = new_arr
|
225
|
227
|
}else{
|
|
@@ -235,6 +237,8 @@ export default {
|
235
|
237
|
return total_price.toFixed(2)
|
236
|
238
|
},
|
237
|
239
|
changeDate() {
|
|
240
|
+ this.start_time = this.chargeDate[0]
|
|
241
|
+ this.end_time = this.chargeDate[1]
|
238
|
242
|
this.getGatherDetailList()
|
239
|
243
|
},
|
240
|
244
|
changeItem(id) {
|
|
@@ -263,16 +267,19 @@ export default {
|
263
|
267
|
this.his_hospital = response.data.data.his_hospital
|
264
|
268
|
|
265
|
269
|
var order_info = response.data.data.order_info
|
|
270
|
+
|
266
|
271
|
if(order_info!=null){
|
267
|
272
|
for(let i=0;i<order_info.length;i++){
|
268
|
273
|
order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
|
269
|
274
|
order_info[i].chrgitm_lv = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
|
270
|
275
|
}
|
271
|
|
- var prescription = response.data.data.prescription
|
|
276
|
+ var prescription = response.data.data.prescription
|
|
277
|
+ // console.log("prescription2332232323233223",prescription)
|
272
|
278
|
this.setMonthPrescription(prescription)
|
273
|
279
|
}
|
|
280
|
+ // console.log("order_info233232323232323232",order_info)
|
274
|
281
|
this.order_info_list = order_info
|
275
|
|
-
|
|
282
|
+
|
276
|
283
|
this.balanceAccountsType = response.data.data.balanceAccountsType
|
277
|
284
|
|
278
|
285
|
this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
|
|
@@ -435,7 +442,7 @@ export default {
|
435
|
442
|
|
436
|
443
|
|
437
|
444
|
}
|
438
|
|
-
|
|
445
|
+
|
439
|
446
|
if(this.id == 1){
|
440
|
447
|
var new_arr = []
|
441
|
448
|
for(let i=0;i<this.tableList.length;i++){
|
|
@@ -474,6 +481,61 @@ export default {
|
474
|
481
|
this.tableList = []
|
475
|
482
|
this.tableList = new_arr
|
476
|
483
|
}
|
|
484
|
+
|
|
485
|
+ var new_arr_two = []
|
|
486
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
487
|
+ if(this.tableList[i].advice_id > 0){
|
|
488
|
+ this.tableList[i].const_type = this.getAdviceMedChrgintmType(this.tableList[i].name)
|
|
489
|
+ }
|
|
490
|
+ if(this.tableList[i].project_id > 0){
|
|
491
|
+ this.tableList[i].const_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
|
|
492
|
+ }
|
|
493
|
+
|
|
494
|
+ if(this.tableList[i].const_type!=''){
|
|
495
|
+ new_arr_two.push(this.tableList[i])
|
|
496
|
+ }
|
|
497
|
+
|
|
498
|
+ }
|
|
499
|
+
|
|
500
|
+ this.tableList = []
|
|
501
|
+ this.tableList = new_arr_two
|
|
502
|
+
|
|
503
|
+ console.log("分解死23232332332323223322332323232",this.tableList)
|
|
504
|
+ let dataInfo = {}
|
|
505
|
+ this.tableList.forEach((item, index) => {
|
|
506
|
+ let { item_id } = item
|
|
507
|
+ if (!dataInfo[item_id]) {
|
|
508
|
+ dataInfo[item_id] = {
|
|
509
|
+ item_id,
|
|
510
|
+ child: [],
|
|
511
|
+ count_number:0,
|
|
512
|
+ name:item.name,
|
|
513
|
+ price:item.price,
|
|
514
|
+ record_date:item.record_date,
|
|
515
|
+ }
|
|
516
|
+ }
|
|
517
|
+ dataInfo[item_id].child.push(item)
|
|
518
|
+ })
|
|
519
|
+
|
|
520
|
+ let list = Object.values(dataInfo)
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+ list.forEach((it,index)=>{
|
|
524
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
525
|
+ if(it.item_id == this.tableList[i].item_id){
|
|
526
|
+ it.child.push(this.tableList[i])
|
|
527
|
+ }
|
|
528
|
+ }
|
|
529
|
+ })
|
|
530
|
+ console.log("list23232332323223322323",list)
|
|
531
|
+ for(let i=0;i<list.length;i++){
|
|
532
|
+ for(let j=0;j<list[i].child.length;j++){
|
|
533
|
+ list[i].count_number += list[i].child[j].count
|
|
534
|
+ }
|
|
535
|
+ }
|
|
536
|
+
|
|
537
|
+ console.log("我的list23223233223322323",list)
|
|
538
|
+
|
477
|
539
|
}
|
478
|
540
|
})
|
479
|
541
|
},
|
|
@@ -496,12 +558,12 @@ export default {
|
496
|
558
|
return project_name
|
497
|
559
|
},
|
498
|
560
|
setNewData(details) {
|
499
|
|
-
|
500
|
561
|
let drug_ids = []
|
501
|
562
|
let project_ids = []
|
502
|
563
|
|
503
|
564
|
for (let i = 0; i < details.length; i++) {
|
504
|
565
|
if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
|
|
566
|
+
|
505
|
567
|
let obj = {
|
506
|
568
|
id: details[i].advice.drug_id,
|
507
|
569
|
price: details[i].advice.price,
|
|
@@ -519,10 +581,12 @@ export default {
|
519
|
581
|
}
|
520
|
582
|
|
521
|
583
|
}
|
|
584
|
+
|
522
|
585
|
let new_drug_ids = this.unique(drug_ids)
|
523
|
586
|
let new_project_ids = this.unique(project_ids)
|
524
|
587
|
let list = []
|
525
|
|
-
|
|
588
|
+
|
|
589
|
+ console.log("new_drug_ids232323323232332332233223",new_drug_ids)
|
526
|
590
|
if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
|
527
|
591
|
for (let i = 0; i < new_drug_ids.length; i++) {
|
528
|
592
|
let obj = {}
|
|
@@ -545,6 +609,28 @@ export default {
|
545
|
609
|
list.push(obj)
|
546
|
610
|
|
547
|
611
|
}
|
|
612
|
+ console.log("list23323232233232",list)
|
|
613
|
+
|
|
614
|
+ // let dataInfo = {}
|
|
615
|
+ // list.forEach((item, index) => {
|
|
616
|
+ // let { name } = item
|
|
617
|
+ // if (!dataInfo[name]) {
|
|
618
|
+ // dataInfo[name] = {
|
|
619
|
+ // name,
|
|
620
|
+ // child: []
|
|
621
|
+ // }
|
|
622
|
+ // }
|
|
623
|
+ // })
|
|
624
|
+ // let listOne = Object.values(dataInfo)
|
|
625
|
+ // listOne.forEach((item,index)=>{
|
|
626
|
+ // for(let i=0;i<list.length;i++){
|
|
627
|
+ // if(listOne[i].name == list[i].name){
|
|
628
|
+ // listOne[i].child.push(list[i])
|
|
629
|
+ // }
|
|
630
|
+ // }
|
|
631
|
+ // })
|
|
632
|
+ // console.log("listONE2322323322323",listOne)
|
|
633
|
+
|
548
|
634
|
}
|
549
|
635
|
if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
|
550
|
636
|
for (let i = 0; i < new_project_ids.length; i++) {
|
|
@@ -746,10 +832,10 @@ export default {
|
746
|
832
|
}
|
747
|
833
|
},
|
748
|
834
|
toPrint(){
|
749
|
|
- this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id})
|
|
835
|
+ this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id})
|
750
|
836
|
},
|
751
|
837
|
toPrintInvoice(){
|
752
|
|
- this.$router.push({path:"/hisTool/gatherPrintInvoice?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
|
|
838
|
+ this.$router.push({path:"/hisTool/gatherPrintInvoice?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords})
|
753
|
839
|
},
|
754
|
840
|
setMonthPrescription(month_prescriptions) {
|
755
|
841
|
let drug_month_prescriptions = {
|
|
@@ -811,6 +897,7 @@ export default {
|
811
|
897
|
obj['is_total'] = 2
|
812
|
898
|
obj['chrgitm_lv'] = drug_month_prescriptions.advices[a].drug.medical_insurance_level
|
813
|
899
|
obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
|
|
900
|
+ obj['item_id'] = drug_ids[i].id + "/" + drug_ids[i].price
|
814
|
901
|
count = count + drug_month_prescriptions.advices[a].prescribing_number
|
815
|
902
|
|
816
|
903
|
}
|
|
@@ -818,7 +905,6 @@ export default {
|
818
|
905
|
obj['count'] = count
|
819
|
906
|
this.tableList.push(obj)
|
820
|
907
|
}
|
821
|
|
-
|
822
|
908
|
for (let i = 0; i < project_ids.length; i++) {
|
823
|
909
|
let obj = {}
|
824
|
910
|
let count = 0
|
|
@@ -833,6 +919,7 @@ export default {
|
833
|
919
|
obj['spec'] = project_month_prescriptions.project[a].project.project_name
|
834
|
920
|
obj['unit'] = project_month_prescriptions.project[a].unit
|
835
|
921
|
obj['chrgitm_lv'] = project_month_prescriptions.project[a].project.medical_coverage
|
|
922
|
+ obj['item_id'] = project_ids[i].id +"/"+ project_ids[i].price
|
836
|
923
|
}else if (project_month_prescriptions.project[a].type == 3){
|
837
|
924
|
obj['project_id'] = project_month_prescriptions.project[a].id
|
838
|
925
|
obj['name'] = project_month_prescriptions.project[a].good_info.good_name
|
|
@@ -841,6 +928,7 @@ export default {
|
841
|
928
|
obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
|
842
|
929
|
obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
|
843
|
930
|
obj['chrgitm_lv'] = project_month_prescriptions.project[a].good_info.medical_insurance_level
|
|
931
|
+ obj['item_id'] = project_ids[i].id + "/" + project_ids[i].price
|
844
|
932
|
}
|
845
|
933
|
obj['single_dose'] = project_month_prescriptions.project[a].single_dose
|
846
|
934
|
obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
|
|
@@ -859,16 +947,15 @@ export default {
|
859
|
947
|
}
|
860
|
948
|
obj['count'] = count
|
861
|
949
|
this.tableList.push(obj)
|
862
|
|
-
|
863
|
950
|
}
|
|
951
|
+ console.log("表格 2323323232323323323232323232323",this.tableList)
|
|
952
|
+
|
864
|
953
|
var objOne = {index:"合计",is_total:1,total:0}
|
865
|
954
|
objOne.total = this.getTotalPrice(this.tableList)
|
866
|
955
|
for(let i=0;i<this.tableList.length;i++){
|
867
|
956
|
this.tableList[i].index = i + 1
|
868
|
957
|
this.tableList[i].total_all = (this.tableList[i].count * this.tableList[i].price).toFixed(2)
|
869
|
|
- // console.log(this.tableList[i].count,'opop')
|
870
|
958
|
}
|
871
|
|
- // this.tableList.push(objOne)
|
872
|
959
|
},
|
873
|
960
|
|
874
|
961
|
getTotalPrice(val){
|
|
@@ -1028,7 +1115,6 @@ export default {
|
1028
|
1115
|
if(this.tableList[i].project_id > 0){
|
1029
|
1116
|
this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
|
1030
|
1117
|
}
|
1031
|
|
- console.log("化验23233223322323",this.tableList[i].drug_type)
|
1032
|
1118
|
if(this.tableList[i].drug_type == "化验费"){
|
1033
|
1119
|
total_price += this.tableList[i].count * this.tableList[i].price
|
1034
|
1120
|
}
|
|
@@ -1168,6 +1254,8 @@ export default {
|
1168
|
1254
|
|
1169
|
1255
|
},
|
1170
|
1256
|
created() {
|
|
1257
|
+ this.start_time = this.chargeDate[0]
|
|
1258
|
+ this.end_time = this.chargeDate[1]
|
1171
|
1259
|
this.tableList = []
|
1172
|
1260
|
this.getGatherDetailList()
|
1173
|
1261
|
|