|
@@ -49,17 +49,18 @@
|
49
|
49
|
<el-table :data="tableList" border :row-style="{ color: '#303133' }" ref="table"
|
50
|
50
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
51
|
51
|
max-height="600"
|
|
52
|
+ show-summary
|
52
|
53
|
v-loading="detail_loading"
|
53
|
54
|
highlight-current-row>
|
54
|
55
|
<el-table-column type="index" label="序号" width="60px" align="center">
|
55
|
56
|
<template slot-scope="scope">{{scope.row.index}}</template>
|
56
|
57
|
</el-table-column>
|
57
|
|
- <el-table-column align="center" prop="name" label="处方日期">
|
|
58
|
+ <el-table-column align="center" label="处方日期">
|
58
|
59
|
<template slot-scope="scope">
|
59
|
60
|
<span v-if="scope.row.record_date > 0">{{getTimes(scope.row.record_date)}} </span>
|
60
|
61
|
</template>
|
61
|
62
|
</el-table-column>
|
62
|
|
- <el-table-column align="center" prop="name" label="费用分类">
|
|
63
|
+ <el-table-column align="center" label="费用分类">
|
63
|
64
|
<template slot-scope="scope">
|
64
|
65
|
<span v-if="scope.row.type == 1">
|
65
|
66
|
{{getAdviceMedChrgintmType(scope.row.name)}}
|
|
@@ -72,34 +73,34 @@
|
72
|
73
|
</span>
|
73
|
74
|
</template>
|
74
|
75
|
</el-table-column>
|
75
|
|
- <el-table-column align="center" prop="name" label="项目名称">
|
|
76
|
+ <el-table-column align="center" label="项目名称">
|
76
|
77
|
<template slot-scope="scope">
|
77
|
78
|
<span>{{scope.row.name}}</span>
|
78
|
79
|
</template>
|
79
|
80
|
</el-table-column>
|
80
|
|
- <el-table-column align="center" prop="name" label="规格型号">
|
|
81
|
+ <el-table-column align="center" label="规格型号">
|
81
|
82
|
<template slot-scope="scope">
|
82
|
83
|
{{ scope.row.spec }}
|
83
|
84
|
</template>
|
84
|
85
|
</el-table-column>
|
85
|
|
- <el-table-column align="center" prop="name" label="数量">
|
|
86
|
+ <el-table-column align="center" label="数量">
|
86
|
87
|
<template slot-scope="scope">
|
87
|
88
|
{{ scope.row.count }}
|
88
|
89
|
{{ scope.row.unit }}
|
89
|
90
|
</template>
|
90
|
91
|
</el-table-column>
|
91
|
|
- <el-table-column align="center" prop="name" label="单价">
|
|
92
|
+ <el-table-column align="center" label="单价">
|
92
|
93
|
<template slot-scope="scope">
|
93
|
94
|
{{scope.row.price}}
|
94
|
95
|
</template>
|
95
|
96
|
</el-table-column>
|
96
|
|
- <el-table-column align="center" prop="name" label="金额">
|
|
97
|
+ <el-table-column align="center" label="金额" prop="total_all">
|
97
|
98
|
<template slot-scope="scope">
|
98
|
99
|
<span v-if="scope.row.is_total == 1">{{ scope.row.total }}</span>
|
99
|
100
|
<span v-if="scope.row.is_total == 2">{{ (scope.row.price * scope.row.count).toFixed(2) }}</span>
|
100
|
101
|
</template>
|
101
|
102
|
</el-table-column>
|
102
|
|
- <el-table-column align="center" prop="name" label="医保类别">
|
|
103
|
+ <el-table-column align="center" label="医保类别">
|
103
|
104
|
<template slot-scope="scope">
|
104
|
105
|
<span v-if="balanceAccountsType == 2">{{getChrgitmLv(scope.row.chrgitm_lv)}}</span>
|
105
|
106
|
|
|
@@ -202,6 +203,7 @@ export default {
|
202
|
203
|
order_info_list:[],
|
203
|
204
|
balanceAccountsType:0,
|
204
|
205
|
medicalInsuranceLevelList:[],
|
|
206
|
+ id:0,
|
205
|
207
|
}
|
206
|
208
|
},
|
207
|
209
|
methods: {
|
|
@@ -217,7 +219,7 @@ export default {
|
217
|
219
|
}
|
218
|
220
|
var obj ={index:"合计",is_total:1,total:0}
|
219
|
221
|
obj.total = this.getPrice(new_arr)
|
220
|
|
- new_arr.push(obj)
|
|
222
|
+ // new_arr.push(obj)
|
221
|
223
|
this.tableList = []
|
222
|
224
|
this.tableList = new_arr
|
223
|
225
|
}else{
|
|
@@ -236,50 +238,9 @@ export default {
|
236
|
238
|
this.getGatherDetailList()
|
237
|
239
|
},
|
238
|
240
|
changeItem(id) {
|
239
|
|
- if(id == 0){
|
240
|
|
- this.tableList = []
|
241
|
|
- this.getGatherDetailList()
|
242
|
|
- }
|
243
|
|
-
|
244
|
|
- if(id == 1){
|
245
|
|
- var new_arr = []
|
246
|
|
- for(let i=0;i<this.tableList.length;i++){
|
247
|
|
- if(this.tableList[i].is_total != 1){
|
248
|
|
- if(this.tableList[i].type == 1){
|
249
|
|
- new_arr.push(this.tableList[i])
|
250
|
|
- }
|
251
|
|
- }
|
252
|
|
- }
|
253
|
|
- this.tableList = []
|
254
|
|
- this.tableList = new_arr
|
255
|
|
- }
|
256
|
|
- if(id == 2){
|
257
|
|
- var new_arr = []
|
258
|
|
-
|
259
|
|
- for(let i=0;i<this.tableList.length;i++){
|
260
|
|
- if(this.tableList[i].is_total != 1){
|
261
|
|
- if(this.tableList[i].type == 2){
|
262
|
|
- new_arr.push(this.tableList[i])
|
263
|
|
- }
|
264
|
|
- }
|
265
|
|
- }
|
266
|
|
- this.tableList = []
|
267
|
|
- this.tableList = new_arr
|
268
|
|
- }
|
269
|
|
- if(id == 3){
|
270
|
|
- console.log("tabl4233223232323323223",this.tableList)
|
271
|
|
- var new_arr = []
|
272
|
|
- for(let i=0;i<this.tableList.length;i++){
|
273
|
|
- if(this.tableList[i].is_total != 1){
|
274
|
|
- if(this.tableList[i].project_type == 3){
|
275
|
|
- new_arr.push(this.tableList[i])
|
276
|
|
- }
|
277
|
|
- }
|
278
|
|
- }
|
279
|
|
- console.log("new_ar3232332323232233223",new_arr)
|
280
|
|
- this.tableList = []
|
281
|
|
- this.tableList = new_arr
|
282
|
|
- }
|
|
241
|
+ this.id = id
|
|
242
|
+ this.tableList = []
|
|
243
|
+ this.getGatherDetailList()
|
283
|
244
|
},
|
284
|
245
|
getGatherDetailList() {
|
285
|
246
|
let start_time = this.chargeDate[0]
|
|
@@ -302,16 +263,16 @@ export default {
|
302
|
263
|
this.his_hospital = response.data.data.his_hospital
|
303
|
264
|
|
304
|
265
|
var order_info = response.data.data.order_info
|
305
|
|
-
|
306
|
|
- for(let i=0;i<order_info.length;i++){
|
307
|
|
- order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
|
308
|
|
- order_info[i].chrgitm_lv = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
|
|
266
|
+ if(order_info!=null){
|
|
267
|
+ for(let i=0;i<order_info.length;i++){
|
|
268
|
+ order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
|
|
269
|
+ order_info[i].chrgitm_lv = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
|
|
270
|
+ }
|
|
271
|
+ var prescription = response.data.data.prescription
|
|
272
|
+ this.setMonthPrescription(prescription)
|
309
|
273
|
}
|
310
|
|
- console.log("order_info32323232323232233232323232",order_info)
|
311
|
274
|
this.order_info_list = order_info
|
312
|
|
- var prescription = response.data.data.prescription
|
313
|
275
|
|
314
|
|
- this.setMonthPrescription(prescription)
|
315
|
276
|
this.balanceAccountsType = response.data.data.balanceAccountsType
|
316
|
277
|
|
317
|
278
|
this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
|
|
@@ -436,8 +397,7 @@ export default {
|
436
|
397
|
return cur
|
437
|
398
|
}, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
438
|
399
|
let tempOrderInfo = []
|
439
|
|
- console.log("med_chrgitm_type323223322323233223",med_chrgitm_types)
|
440
|
|
- console.log("order_info232322332323232322323",order_info)
|
|
400
|
+
|
441
|
401
|
for (let i = 0; i < med_chrgitm_types.length; i++) {
|
442
|
402
|
let obj = {
|
443
|
403
|
total: 0,
|
|
@@ -449,7 +409,7 @@ export default {
|
449
|
409
|
tempDetails.push(order_info[b])
|
450
|
410
|
}
|
451
|
411
|
}
|
452
|
|
- console.log("tempDetails2332323232322323",tempDetails)
|
|
412
|
+
|
453
|
413
|
|
454
|
414
|
obj.details = this.setNewData(tempDetails)
|
455
|
415
|
|
|
@@ -471,7 +431,49 @@ export default {
|
471
|
431
|
}
|
472
|
432
|
|
473
|
433
|
}
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
474
|
437
|
}
|
|
438
|
+
|
|
439
|
+ if(this.id == 1){
|
|
440
|
+ var new_arr = []
|
|
441
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
442
|
+ if(this.tableList[i].is_total != 1){
|
|
443
|
+ if(this.tableList[i].type == 1){
|
|
444
|
+ new_arr.push(this.tableList[i])
|
|
445
|
+ }
|
|
446
|
+ }
|
|
447
|
+ }
|
|
448
|
+ this.tableList = []
|
|
449
|
+ this.tableList = new_arr
|
|
450
|
+ }
|
|
451
|
+ if(this.id == 2){
|
|
452
|
+ var new_arr = []
|
|
453
|
+
|
|
454
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
455
|
+ if(this.tableList[i].is_total != 1){
|
|
456
|
+ if(this.tableList[i].project_type == 2){
|
|
457
|
+ new_arr.push(this.tableList[i])
|
|
458
|
+ }
|
|
459
|
+ }
|
|
460
|
+ }
|
|
461
|
+ this.tableList = []
|
|
462
|
+ this.tableList = new_arr
|
|
463
|
+ }
|
|
464
|
+ if(this.id == 3){
|
|
465
|
+ var new_arr = []
|
|
466
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
467
|
+ if(this.tableList[i].is_total != 1){
|
|
468
|
+ if(this.tableList[i].project_type == 3){
|
|
469
|
+ new_arr.push(this.tableList[i])
|
|
470
|
+ }
|
|
471
|
+ }
|
|
472
|
+ }
|
|
473
|
+ console.log("this.tableist2332323223323223",this.tableList)
|
|
474
|
+ this.tableList = []
|
|
475
|
+ this.tableList = new_arr
|
|
476
|
+ }
|
475
|
477
|
}
|
476
|
478
|
})
|
477
|
479
|
},
|
|
@@ -744,7 +746,7 @@ export default {
|
744
|
746
|
}
|
745
|
747
|
},
|
746
|
748
|
toPrint(){
|
747
|
|
- 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})
|
|
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})
|
748
|
750
|
},
|
749
|
751
|
toPrintInvoice(){
|
750
|
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})
|
|
@@ -850,7 +852,7 @@ export default {
|
850
|
852
|
count = count + parseFloat(project_month_prescriptions.project[a].count)
|
851
|
853
|
obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
|
852
|
854
|
obj['remark'] = project_month_prescriptions.project[a].remark
|
853
|
|
- obj['type'] = 2
|
|
855
|
+ obj['type'] = 3
|
854
|
856
|
obj['record_date'] = project_month_prescriptions.project[a].record_date
|
855
|
857
|
obj['is_total'] = 2
|
856
|
858
|
}
|
|
@@ -863,10 +865,10 @@ export default {
|
863
|
865
|
objOne.total = this.getTotalPrice(this.tableList)
|
864
|
866
|
for(let i=0;i<this.tableList.length;i++){
|
865
|
867
|
this.tableList[i].index = i + 1
|
|
868
|
+ this.tableList[i].total_all = (this.tableList[i].count * this.tableList[i].price).toFixed(2)
|
|
869
|
+ // console.log(this.tableList[i].count,'opop')
|
866
|
870
|
}
|
867
|
|
- this.tableList.push(objOne)
|
868
|
|
-
|
869
|
|
- console.log("hh2323323232322323233223",this.tableList)
|
|
871
|
+ // this.tableList.push(objOne)
|
870
|
872
|
},
|
871
|
873
|
|
872
|
874
|
getTotalPrice(val){
|