|
@@ -14,24 +14,24 @@
|
14
|
14
|
<el-select size="small" v-model="item_type" placeholder="请选择"
|
15
|
15
|
style="width:150px;margin-left:10px;" @change="changeItem">
|
16
|
16
|
<el-option
|
17
|
|
- label="全部"
|
18
|
|
- value="0">
|
|
17
|
+ label="全部"
|
|
18
|
+ value="0">
|
19
|
19
|
</el-option>
|
20
|
20
|
<el-option
|
21
|
|
- v-for="item,index in items"
|
22
|
|
- :key="index"
|
23
|
|
- :label="item.name"
|
24
|
|
- :value="item.id">
|
|
21
|
+ v-for="item,index in items"
|
|
22
|
+ :key="index"
|
|
23
|
+ :label="item.name"
|
|
24
|
+ :value="item.id">
|
25
|
25
|
</el-option>
|
26
|
26
|
</el-select>
|
27
|
27
|
<el-date-picker
|
28
|
|
- v-model="chargeDate"
|
29
|
|
- type="daterange"
|
30
|
|
- value-format="yyyy-MM-dd"
|
31
|
|
- range-separator="至"
|
32
|
|
- start-placeholder="开始日期"
|
33
|
|
- @change="changeDatetwo"
|
34
|
|
- end-placeholder="结束日期">
|
|
28
|
+ v-model="chargeDate"
|
|
29
|
+ type="daterange"
|
|
30
|
+ value-format="yyyy-MM-dd"
|
|
31
|
+ range-separator="至"
|
|
32
|
+ start-placeholder="开始日期"
|
|
33
|
+ @change="changeDate"
|
|
34
|
+ end-placeholder="结束日期">
|
35
|
35
|
</el-date-picker>
|
36
|
36
|
<!--<el-radio v-model="radio" label="1">明细</el-radio>-->
|
37
|
37
|
<!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
|
|
@@ -47,9 +47,6 @@
|
47
|
47
|
|
48
|
48
|
</el-popover> -->
|
49
|
49
|
<el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
|
50
|
|
-
|
51
|
|
- <el-button size="small" type="primary" @click="export_detail_Two">报表下载2</el-button>
|
52
|
|
-
|
53
|
50
|
</div>
|
54
|
51
|
</div>
|
55
|
52
|
<el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="tables"
|
|
@@ -69,14 +66,14 @@
|
69
|
66
|
<!--</el-table-column>-->
|
70
|
67
|
|
71
|
68
|
<el-table-column align="center" prop="item_name" label="项目类别">
|
72
|
|
- <template slot-scope="scope">{{ scope.row.item_name }}</template>
|
|
69
|
+ <template slot-scope="scope">{{scope.row.item_name}}</template>
|
73
|
70
|
</el-table-column>
|
74
|
71
|
<el-table-column align="center" prop="price" label="费用">
|
75
|
|
- <template slot-scope="scope">{{ scope.row.price.toFixed(2) }}</template>
|
|
72
|
+ <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
|
76
|
73
|
</el-table-column>
|
77
|
74
|
<el-table-column align="center" prop="sum" label="费用总额">
|
78
|
75
|
<template slot-scope="scope">
|
79
|
|
- <div>{{ scope.row.sum.toFixed(2) }}</div>
|
|
76
|
+ <div>{{scope.row.sum.toFixed(2)}}</div>
|
80
|
77
|
</template>
|
81
|
78
|
</el-table-column>
|
82
|
79
|
|
|
@@ -87,9 +84,8 @@
|
87
|
84
|
|
88
|
85
|
<script>
|
89
|
86
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
90
|
|
-import {getExportChargeData, GetSummaryDetail} from '@/api/his/his'
|
91
|
|
-import {uParseTime} from "@/utils/tools";
|
92
|
|
-
|
|
87
|
+import { GetSummaryDetail } from '@/api/his/his'
|
|
88
|
+import { uParseTime } from '@/utils/tools'
|
93
|
89
|
// import NewStatementPrint from './newStatementPrint'
|
94
|
90
|
const moment = require('moment')
|
95
|
91
|
export default {
|
|
@@ -99,20 +95,20 @@ export default {
|
99
|
95
|
},
|
100
|
96
|
data() {
|
101
|
97
|
return {
|
102
|
|
- gather_loading: false,
|
|
98
|
+ gather_loading:false,
|
103
|
99
|
crumbs: [],
|
104
|
100
|
tempArr: [],
|
105
|
101
|
sameRowArr: [],
|
106
|
102
|
keywords: '',
|
107
|
|
- pos: 0,
|
|
103
|
+ pos:0,
|
108
|
104
|
|
109
|
105
|
tableData: [],
|
110
|
106
|
chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
|
111
|
107
|
item_type: '0',
|
112
|
108
|
items: [
|
113
|
|
- {id: 1, name: '药品'},
|
114
|
|
- {id: 2, name: '项目'},
|
115
|
|
- {id: 3, name: '耗材'},
|
|
109
|
+ { id: 1, name: '药品' },
|
|
110
|
+ { id: 2, name: '项目' },
|
|
111
|
+ { id: 3, name: '耗材' },
|
116
|
112
|
|
117
|
113
|
]
|
118
|
114
|
|
|
@@ -120,7 +116,7 @@ export default {
|
120
|
116
|
},
|
121
|
117
|
methods: {
|
122
|
118
|
|
123
|
|
- objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
|
119
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
124
|
120
|
if (columnIndex === 0) {
|
125
|
121
|
if (rowIndex % 2 === 0) {
|
126
|
122
|
return {
|
|
@@ -139,125 +135,19 @@ export default {
|
139
|
135
|
const res = new Map()
|
140
|
136
|
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
|
141
|
137
|
},
|
142
|
|
- uniqueTwo(arr) {
|
143
|
|
- const res = new Map()
|
144
|
|
- return arr.filter((arr) => !res.has(arr) && res.set(arr, 1))
|
145
|
|
- }, changeDatetwo() {
|
146
|
|
- // console.log(this.chargeDate)
|
147
|
|
- this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
|
148
|
|
- confirmButtonText: '确 定',
|
149
|
|
- cancelButtonText: '取 消',
|
150
|
|
- type: 'warning'
|
151
|
|
- }).then(() => {
|
152
|
|
-
|
153
|
|
-
|
154
|
|
- }).catch(() => {
|
155
|
|
- })
|
156
|
|
- },
|
157
|
138
|
changeDate() {
|
158
|
139
|
// console.log(this.chargeDate)
|
159
|
|
- this.getSummaryDetailListtwo()
|
|
140
|
+ this.getSummaryDetailList()
|
160
|
141
|
},
|
161
|
142
|
changeItem() {
|
162
|
|
- this.getSummaryDetailListtwo()
|
|
143
|
+ this.getSummaryDetailList()
|
|
144
|
+ }, uniquepid(arr) {
|
|
145
|
+ const res = new Map()
|
|
146
|
+ return arr.filter((arr) => !res.has(arr.p_id) && res.set(arr.p_id, 1))
|
163
|
147
|
},
|
164
|
148
|
searchAction() {
|
165
|
149
|
this.item_type = '0'
|
166
|
|
- this.getSummaryDetailListtwo()
|
167
|
|
- },getSummaryDetailListtwo() {
|
168
|
|
- this.gather_loading = true
|
169
|
|
- let start_time = this.chargeDate[0]
|
170
|
|
- let end_time = this.chargeDate[1]
|
171
|
|
- let params = {
|
172
|
|
- start_time: start_time,
|
173
|
|
- end_time: end_time,
|
174
|
|
- type: this.item_type,
|
175
|
|
- keyword: this.keywords
|
176
|
|
- }
|
177
|
|
- GetSummaryDetail(params).then(response => {
|
178
|
|
- if (response.data.state == 0) {
|
179
|
|
- this.gather_loading = false
|
180
|
|
-
|
181
|
|
- this.$message.error(response.data.msg)
|
182
|
|
- return false
|
183
|
|
- } else {
|
184
|
|
- this.gather_loading = false
|
185
|
|
-
|
186
|
|
- this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
|
187
|
|
- confirmButtonText: '确 定',
|
188
|
|
- cancelButtonText: '取 消',
|
189
|
|
- type: 'warning'
|
190
|
|
- }).then(() => {
|
191
|
|
-
|
192
|
|
-
|
193
|
|
- }).catch(() => {
|
194
|
|
- })
|
195
|
|
-
|
196
|
|
-
|
197
|
|
-
|
198
|
|
-
|
199
|
|
- // this.tableData = tempPatientsTwo
|
200
|
|
-
|
201
|
|
- // console.log(tempPatientsTwo.length)
|
202
|
|
- //
|
203
|
|
-
|
204
|
|
- }
|
205
|
|
- //
|
206
|
|
- // console.log('去重前')
|
207
|
|
- // console.log(advice)
|
208
|
|
- // console.log(project)
|
209
|
|
- // //
|
210
|
|
- // //
|
211
|
|
-
|
212
|
|
- // //
|
213
|
|
- // console.log('去重后')
|
214
|
|
- //
|
215
|
|
- // console.log(advice.length)
|
216
|
|
- // console.log(project.length)
|
217
|
|
- //
|
218
|
|
- // for (let i = 0; i < project.length; i++) {
|
219
|
|
- // let obj = {}
|
220
|
|
- // let count = 0
|
221
|
|
- // for (let a = 0; a < tempPatientsTwo.length; a++) {
|
222
|
|
- // if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
|
223
|
|
- // count = count + tempPatientsTwo[a].count
|
224
|
|
- // obj['count'] = count
|
225
|
|
- //
|
226
|
|
- // }
|
227
|
|
- // obj['price'] = project[i].price
|
228
|
|
- // obj['type'] = project[i].type
|
229
|
|
- // obj['item_name'] = project[i].item_name
|
230
|
|
- // obj['item_id'] = project[i].item_id
|
231
|
|
- // obj['name'] = project[i].name
|
232
|
|
- // obj['patient_id'] = project[i].patient_id
|
233
|
|
- // obj['count'] = count
|
234
|
|
- // this.tableData.push(obj)
|
235
|
|
- // }
|
236
|
|
- // }
|
237
|
|
- //
|
238
|
|
- //
|
239
|
|
- // for (let i = 0; i < advice.length; i++) {
|
240
|
|
- // let obj = {}
|
241
|
|
- // let count = 0
|
242
|
|
- // for (let a = 0; a < tempPatientsTwo.length; a++) {
|
243
|
|
- // if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
|
244
|
|
- // count = count + tempPatientsTwo[a].count
|
245
|
|
- // obj['count'] = count
|
246
|
|
- //
|
247
|
|
- // }
|
248
|
|
- // obj['price'] = advice[i].price
|
249
|
|
- // obj['type'] = advice[i].type
|
250
|
|
- // obj['item_name'] = advice[i].item_name
|
251
|
|
- // obj['item_id'] = advice[i].item_id
|
252
|
|
- // obj['name'] = advice[i].name
|
253
|
|
- // obj['patient_id'] = advice[i].patient_id
|
254
|
|
- // this.tableData.push(obj)
|
255
|
|
- // }
|
256
|
|
- // }
|
257
|
|
- // console.log(this.tableData.length)
|
258
|
|
- // this.tableData = this.sort(this.tableData)
|
259
|
|
-
|
260
|
|
- })
|
|
150
|
+ this.getSummaryDetailList()
|
261
|
151
|
},
|
262
|
152
|
getSummaryDetailList() {
|
263
|
153
|
this.gather_loading = true
|
|
@@ -276,39 +166,30 @@ export default {
|
276
|
166
|
this.$message.error(response.data.msg)
|
277
|
167
|
return false
|
278
|
168
|
} else {
|
279
|
|
-
|
280
|
|
- this.$confirm('提示', '接口优化升级,如有数据需要,请联系客服!', {
|
281
|
|
- confirmButtonText: '确 定',
|
282
|
|
- cancelButtonText: '取 消',
|
283
|
|
- type: 'warning'
|
284
|
|
- }).then(() => {
|
285
|
|
-
|
286
|
|
-
|
287
|
|
- }).catch(() => {
|
288
|
|
- })
|
289
|
|
-
|
290
|
|
-
|
291
|
169
|
this.gather_loading = false
|
292
|
170
|
|
293
|
171
|
let tempPatients = []
|
294
|
172
|
let tempPatientsTwo = []
|
295
|
173
|
this.tableData = []
|
296
|
|
- let tempData = response.data.data.patients
|
297
|
|
- let data = response.data.data.patients
|
298
|
|
- let orders = this.unique(tempData)
|
|
174
|
+ let tempData = response.data
|
|
175
|
+ let data = response.data
|
|
176
|
+ let orders = this.uniquepid(tempData)
|
|
177
|
+ console.log(orders)
|
|
178
|
+
|
299
|
179
|
for (let i = 0; i < orders.length; i++) {
|
300
|
180
|
let obj = {
|
301
|
|
- patient_id: orders[i].id,
|
302
|
|
- name: orders[i].name,
|
|
181
|
+ patient_id: orders[i].p_id,
|
|
182
|
+ name: orders[i].p_name,
|
303
|
183
|
orders: []
|
304
|
184
|
}
|
305
|
185
|
for (let b = 0; b < data.length; b++) {
|
306
|
|
- if (orders[i].id == data[b].id) {
|
307
|
|
- obj.orders = obj.orders.concat(data[b].orders)
|
|
186
|
+ if (orders[i].p_id == data[b].p_id) {
|
|
187
|
+ obj.orders = obj.orders.concat(data[b])
|
308
|
188
|
}
|
309
|
189
|
}
|
310
|
190
|
tempPatients.push(obj)
|
311
|
191
|
}
|
|
192
|
+ console.log(tempPatients)
|
312
|
193
|
|
313
|
194
|
for (let i = 0; i < tempPatients.length; i++) {
|
314
|
195
|
let obj = {
|
|
@@ -317,31 +198,29 @@ export default {
|
317
|
198
|
order_info: []
|
318
|
199
|
}
|
319
|
200
|
let orders = tempPatients[i].orders
|
320
|
|
- for (let b = 0; b < orders.length; b++) {
|
321
|
|
- for (let c = 0; c < orders[b].order_info.length; c++) {
|
|
201
|
+ for (let c = 0; c < orders.length; c++) {
|
322
|
202
|
let newObj = {}
|
323
|
203
|
|
324
|
|
- newObj['count'] = orders[b].order_info[c].cnt
|
325
|
|
- newObj['price'] = orders[b].order_info[c].pric
|
326
|
|
- if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
|
|
204
|
+ newObj['count'] = orders[c].cnt
|
|
205
|
+ newObj['price'] = orders[c].pric
|
|
206
|
+ if (orders[c].advice_id > 0 && orders[c].project_id == 0) {
|
327
|
207
|
newObj['type'] = 1
|
328
|
|
- newObj['item_name'] = orders[b].order_info[c].advice.advice_name
|
329
|
|
- newObj['item_id'] = orders[b].order_info[c].advice.drug_id
|
|
208
|
+ newObj['item_name'] = orders[c].item_name
|
|
209
|
+ newObj['item_id'] = orders[c].item_id
|
330
|
210
|
|
331
|
211
|
}
|
332
|
|
- if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
|
333
|
|
- newObj['item_id'] = orders[b].order_info[c].project.project_id
|
334
|
|
- if (orders[b].order_info[c].project.type == 2) {
|
|
212
|
+ if (orders[c].advice_id == 0 && orders[c].project_id > 0) {
|
|
213
|
+ newObj['item_id'] = orders[c].item_id
|
|
214
|
+ if (orders[c].p_type == 2) {
|
335
|
215
|
newObj['type'] = 2
|
336
|
|
- newObj['item_name'] = orders[b].order_info[c].project.project.project_name
|
337
|
|
- } else if (orders[b].order_info[c].project.type == 3) {
|
|
216
|
+ newObj['item_name'] = orders[c].item_name
|
|
217
|
+ } else if (orders[c].p_type == 3) {
|
338
|
218
|
newObj['type'] = 3
|
339
|
|
- newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name
|
|
219
|
+ newObj['item_name'] = orders[c].item_name
|
340
|
220
|
}
|
341
|
221
|
}
|
342
|
222
|
obj.order_info.push(newObj)
|
343
|
223
|
}
|
344
|
|
- }
|
345
|
224
|
tempPatientsTwo.push(obj)
|
346
|
225
|
}
|
347
|
226
|
console.log(tempPatientsTwo)
|
|
@@ -377,10 +256,12 @@ export default {
|
377
|
256
|
}
|
378
|
257
|
}
|
379
|
258
|
|
|
259
|
+
|
380
|
260
|
for (let i = 0; i < advice.length; i++) {
|
381
|
261
|
price2 = parseFloat(price2.toString()) + parseFloat((parseFloat(advice[i].count.toString()) * parseFloat(advice[i].price.toString()).toFixed(2)).toString())
|
382
|
262
|
}
|
383
|
263
|
|
|
264
|
+
|
384
|
265
|
switch (parseInt(this.item_type)) {
|
385
|
266
|
case 0:
|
386
|
267
|
|
|
@@ -433,6 +314,8 @@ export default {
|
433
|
314
|
|
434
|
315
|
}
|
435
|
316
|
|
|
317
|
+
|
|
318
|
+
|
436
|
319
|
}
|
437
|
320
|
|
438
|
321
|
this.handleSpanTempArr()
|
|
@@ -559,7 +442,7 @@ export default {
|
559
|
442
|
}
|
560
|
443
|
})
|
561
|
444
|
this.sameRowArr = sameRowArr
|
562
|
|
- }, merge({row, column, rowIndex, columnIndex}) {
|
|
445
|
+ }, merge({ row, column, rowIndex, columnIndex }) {
|
563
|
446
|
if (columnIndex === 0 || columnIndex === 3) {
|
564
|
447
|
const _row = this.tempArr[rowIndex]
|
565
|
448
|
const _col = _row > 0 ? 1 : 0
|
|
@@ -569,7 +452,7 @@ export default {
|
569
|
452
|
}
|
570
|
453
|
}
|
571
|
454
|
}, getTotal(param) {
|
572
|
|
- const {columns, data} = param
|
|
455
|
+ const { columns, data } = param
|
573
|
456
|
const sums = []
|
574
|
457
|
columns.forEach((column, index) => {
|
575
|
458
|
if (index === 0) {
|
|
@@ -594,106 +477,7 @@ export default {
|
594
|
477
|
})
|
595
|
478
|
|
596
|
479
|
return sums
|
597
|
|
- }, export_detail_Two() {
|
598
|
|
- let start_time = this.chargeDate[0]
|
599
|
|
- let end_time = this.chargeDate[1]
|
600
|
|
- let params = {
|
601
|
|
- start_time: start_time,
|
602
|
|
- end_time: end_time,
|
603
|
|
- }
|
604
|
|
- getExportChargeData(params).then(response => {
|
605
|
|
- if (response.data.state == 0) {
|
606
|
|
- this.$message.error(response.data.msg)
|
607
|
|
- return false
|
608
|
|
- } else {
|
609
|
|
- let list = []
|
610
|
|
- let tempData = response.data.data.patients
|
611
|
|
- for (let i = 0; i < tempData.length; i++) {
|
612
|
|
- let data = this.handleData(tempData[i].order_info)
|
613
|
|
- for (let b = 0; b < data.length; b++) {
|
614
|
|
- let obj = {
|
615
|
|
- remark: "",
|
616
|
|
- name:tempData[i].patient.name,
|
617
|
|
- id_card_no:tempData[i].patient.id_card_no,
|
618
|
|
- item_name: data[b].name,
|
619
|
|
- price: data[b].price,
|
620
|
|
- }
|
621
|
|
- if (b == 0) {
|
622
|
|
- obj.remark = "就诊日期:"+this.getTimes(tempData[i].settle_accounts_date) +" 医保报销:"+tempData[i].fund_pay_sumamt + " 现金:"+tempData[i].psn_cash_pay
|
623
|
|
- } else {
|
624
|
|
- obj.remark = ""
|
625
|
|
- }
|
626
|
|
- list.push(obj)
|
627
|
|
- }
|
628
|
|
- }
|
629
|
|
- console.log(list)
|
630
|
|
-
|
631
|
|
- var tarList = []
|
632
|
|
- for (let i = 0; i < list.length; i++) {
|
633
|
|
- if(list[i].price > 0) {
|
634
|
|
- let obj = {
|
635
|
|
- "姓名": list[i].name,
|
636
|
|
- "身份证号": list[i].id_card_no,
|
637
|
|
- "收费项目": list[i].item_name,
|
638
|
|
- "金额": list[i].price,
|
639
|
|
- "备注": list[i].remark,
|
640
|
|
- }
|
641
|
|
- tarList.push(obj)
|
642
|
|
- }
|
643
|
|
- }
|
644
|
|
-
|
645
|
|
- import("@/vendor/Export2Excel").then((excel) => {
|
646
|
|
- const tHeader = [
|
647
|
|
- "姓名",
|
648
|
|
- "身份证号",
|
649
|
|
- "收费项目",
|
650
|
|
- "金额",
|
651
|
|
- "备注",
|
652
|
|
-
|
653
|
|
- ];
|
654
|
|
- const filterVal = [
|
655
|
|
- "姓名",
|
656
|
|
- "身份证号",
|
657
|
|
- "收费项目",
|
658
|
|
- "金额",
|
659
|
|
- "备注",
|
660
|
|
- ];
|
661
|
|
- const data = this.formatJson(filterVal, tarList);
|
662
|
|
- excel.export_json_to_excel({
|
663
|
|
- header: tHeader,
|
664
|
|
- data,
|
665
|
|
- filename: "消费明细",
|
666
|
|
- });
|
667
|
|
- });
|
668
|
|
-
|
669
|
|
- }
|
670
|
|
- })
|
671
|
|
- }, getTimes(time) {
|
672
|
|
- return uParseTime(time, "{y}-{m}-{d}");
|
673
|
|
- }, handleData(order_info) {
|
674
|
|
- let data = []
|
675
|
|
- let med_chrgitm_types = []
|
676
|
|
- for (let i = 0; i < order_info.length; i++) {
|
677
|
|
- med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
678
|
|
- }
|
679
|
|
- med_chrgitm_types = this.uniqueTwo(med_chrgitm_types)
|
680
|
|
-
|
681
|
|
- for (let i = 0; i < med_chrgitm_types.length; i++) {
|
682
|
|
- let obj = {}
|
683
|
|
- let price = 0
|
684
|
|
- for (let a = 0; a < order_info.length; a++) {
|
685
|
|
- if (med_chrgitm_types[i] == order_info[a].med_chrgitm_type) {
|
686
|
|
- price = price + order_info[a].det_item_fee_sumamt
|
687
|
|
- }
|
688
|
|
- }
|
689
|
|
- obj['price'] = price
|
690
|
|
- obj['name'] = this.getType(med_chrgitm_types[i])
|
691
|
|
- data.push(obj)
|
692
|
|
- }
|
693
|
|
- return data
|
694
|
|
- },
|
695
|
|
-
|
696
|
|
- export_detail() {
|
|
480
|
+ }, export_detail() {
|
697
|
481
|
|
698
|
482
|
let list = []
|
699
|
483
|
for (let i = 0; i < this.tableData.length; i++) {
|
|
@@ -703,93 +487,33 @@ export default {
|
703
|
487
|
let pay_sumamt = order.price.toFixed(2)
|
704
|
488
|
let total = order.sum.toFixed(2)
|
705
|
489
|
|
|
490
|
+
|
706
|
491
|
let obj = {
|
707
|
492
|
'患者姓名': name,
|
708
|
493
|
'项目类别': item_name,
|
709
|
494
|
'费用': pay_sumamt,
|
710
|
|
- '费用总额': total,
|
|
495
|
+ '费用总额':total,
|
711
|
496
|
}
|
712
|
497
|
list.push(obj)
|
713
|
498
|
}
|
714
|
499
|
import('@/vendor/Export2Excel').then(excel => {
|
715
|
|
- const tHeader = ['患者姓名', '项目名称', '费用', '费用总额']
|
716
|
|
- const filterVal = ['患者姓名', '项目名称', '费用', '费用总额']
|
|
500
|
+ const tHeader = [ '患者姓名', '项目名称', '费用', '费用总额']
|
|
501
|
+ const filterVal = [ '患者姓名', '项目名称', '费用', '费用总额']
|
717
|
502
|
const data = this.formatJson(filterVal, list)
|
718
|
503
|
excel.export_json_to_excel1({
|
719
|
504
|
header: tHeader,
|
720
|
505
|
data,
|
721
|
506
|
filename: '汇总',
|
722
|
|
- ref: this.$refs['tables'].$el
|
|
507
|
+ ref:this.$refs['tables'].$el
|
723
|
508
|
})
|
724
|
509
|
})
|
725
|
510
|
|
726
|
511
|
}, formatJson(filterVal, jsonData) {
|
727
|
512
|
return jsonData.map(v => filterVal.map(j => v[j]))
|
728
|
|
- }, getType(med_chrgitm_type) {
|
729
|
|
- switch (med_chrgitm_type) {
|
730
|
|
- case '01':
|
731
|
|
- return '床位费'
|
732
|
|
- break
|
733
|
|
- case '02':
|
734
|
|
- return '诊察费'
|
735
|
|
-
|
736
|
|
- break
|
737
|
|
- case '03':
|
738
|
|
- return '检查费'
|
739
|
|
-
|
740
|
|
- break
|
741
|
|
- case '04':
|
742
|
|
- return '化验费'
|
743
|
|
- break
|
744
|
|
- case '05':
|
745
|
|
- return '治疗费'
|
746
|
|
-
|
747
|
|
- break
|
748
|
|
- case '06':
|
749
|
|
- return '手术费'
|
750
|
|
-
|
751
|
|
- break
|
752
|
|
- case '07':
|
753
|
|
- return '护理费'
|
754
|
|
-
|
755
|
|
- break
|
756
|
|
- case '08':
|
757
|
|
- return '材料费'
|
758
|
|
-
|
759
|
|
- break
|
760
|
|
- case '09':
|
761
|
|
- return '西药费'
|
762
|
|
-
|
763
|
|
- break
|
764
|
|
- case '10':
|
765
|
|
- return '中药饮片费'
|
766
|
|
-
|
767
|
|
- break
|
768
|
|
- case '11':
|
769
|
|
- return '中成药费'
|
770
|
|
-
|
771
|
|
- break
|
772
|
|
- case '12':
|
773
|
|
- return '一般诊疗费'
|
774
|
|
-
|
775
|
|
- break
|
776
|
|
- case '13':
|
777
|
|
- return '挂号费'
|
778
|
|
- break
|
779
|
|
- case '14':
|
780
|
|
- return '其他费'
|
781
|
|
- break
|
782
|
|
- case '0':
|
783
|
|
- return '其他费'
|
784
|
|
- break
|
785
|
|
-
|
786
|
|
- }
|
787
|
|
-
|
788
|
|
- },
|
789
|
|
-
|
|
513
|
+ }
|
790
|
514
|
},
|
791
|
515
|
created() {
|
792
|
|
- this.getSummaryDetailListtwo()
|
|
516
|
+ this.getSummaryDetailList()
|
793
|
517
|
|
794
|
518
|
}
|
795
|
519
|
}
|