|
@@ -3,95 +3,95 @@
|
3
|
3
|
<div class="position">
|
4
|
4
|
<bread-crumb :crumbs='crumbs'></bread-crumb>
|
5
|
5
|
</div> -->
|
6
|
|
- <div>
|
7
|
|
- <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
|
8
|
|
- <div>
|
9
|
|
- <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
|
10
|
|
- <!--@click="Action">-->
|
11
|
|
- <!--导出-->
|
12
|
|
- <!--</el-button>-->
|
13
|
|
- <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
|
14
|
|
- @keyup.enter.native='searchAction'
|
15
|
|
- placeholder="请输入患者姓名"
|
16
|
|
- class="filter-item"/>
|
17
|
|
- <el-select size="small" v-model="item_type" placeholder="请选择"
|
18
|
|
- style="width:150px;margin-left:10px;" @change="changeItem">
|
19
|
|
- <el-option
|
20
|
|
- label="全部"
|
21
|
|
- value="0">
|
22
|
|
- </el-option>
|
23
|
|
- <el-option
|
24
|
|
- v-for="item,index in items"
|
25
|
|
- :key="index"
|
26
|
|
- :label="item.name"
|
27
|
|
- :value="item.id">
|
28
|
|
- </el-option>
|
29
|
|
- </el-select>
|
30
|
|
- <el-date-picker
|
31
|
|
- v-model="chargeDate"
|
32
|
|
- type="daterange"
|
33
|
|
- value-format="yyyy-MM-dd"
|
34
|
|
- range-separator="至"
|
35
|
|
- start-placeholder="开始日期"
|
36
|
|
- @change="changeDate"
|
37
|
|
- end-placeholder="结束日期">
|
38
|
|
- </el-date-picker>
|
39
|
|
- <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
|
40
|
|
- <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
|
41
|
|
- </div>
|
42
|
|
- <div>
|
43
|
|
- <!-- <el-popover
|
44
|
|
- placement="bottom"
|
45
|
|
- width="210"
|
46
|
|
- trigger="click">
|
47
|
|
- <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
|
48
|
|
- <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
|
49
|
|
- <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
|
50
|
|
-
|
51
|
|
- </el-popover> -->
|
52
|
|
- <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
|
53
|
|
- </div>
|
|
6
|
+ <div>
|
|
7
|
+ <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
|
|
8
|
+ <div>
|
|
9
|
+ <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
|
|
10
|
+ <!--@click="Action">-->
|
|
11
|
+ <!--导出-->
|
|
12
|
+ <!--</el-button>-->
|
|
13
|
+ <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
|
|
14
|
+ @keyup.enter.native='searchAction'
|
|
15
|
+ placeholder="请输入患者姓名"
|
|
16
|
+ class="filter-item"/>
|
|
17
|
+ <el-select size="small" v-model="item_type" placeholder="请选择"
|
|
18
|
+ style="width:150px;margin-left:10px;" @change="changeItem">
|
|
19
|
+ <el-option
|
|
20
|
+ label="全部"
|
|
21
|
+ value="0">
|
|
22
|
+ </el-option>
|
|
23
|
+ <el-option
|
|
24
|
+ v-for="item,index in items"
|
|
25
|
+ :key="index"
|
|
26
|
+ :label="item.name"
|
|
27
|
+ :value="item.id">
|
|
28
|
+ </el-option>
|
|
29
|
+ </el-select>
|
|
30
|
+ <el-date-picker
|
|
31
|
+ v-model="chargeDate"
|
|
32
|
+ type="daterange"
|
|
33
|
+ value-format="yyyy-MM-dd"
|
|
34
|
+ range-separator="至"
|
|
35
|
+ start-placeholder="开始日期"
|
|
36
|
+ @change="changeDate"
|
|
37
|
+ end-placeholder="结束日期">
|
|
38
|
+ </el-date-picker>
|
|
39
|
+ <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
|
|
40
|
+ <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
|
|
41
|
+ </div>
|
|
42
|
+ <div>
|
|
43
|
+ <!-- <el-popover
|
|
44
|
+ placement="bottom"
|
|
45
|
+ width="210"
|
|
46
|
+ trigger="click">
|
|
47
|
+ <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
|
|
48
|
+ <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
|
|
49
|
+ <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
|
|
50
|
+
|
|
51
|
+ </el-popover> -->
|
|
52
|
+ <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
|
54
|
53
|
</div>
|
55
|
|
- <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
|
56
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
57
|
|
- :span-method="merge"
|
58
|
|
- show-summary
|
59
|
|
- :summary-method="getTotal"
|
60
|
|
- max-height="600"
|
61
|
|
-
|
62
|
|
- v-loading="detail_loading"
|
63
|
|
- highlight-current-row>
|
64
|
|
-
|
65
|
|
- <el-table-column align="center" prop="name" label="患者名字">
|
66
|
|
- <template slot-scope="scope">{{ scope.row.name }}</template>
|
67
|
|
- </el-table-column>
|
68
|
|
- <!--<el-table-column align="center" prop="name" label="患者类型">-->
|
69
|
|
- <!--<template slot-scope="scope"></template>-->
|
70
|
|
- <!--</el-table-column>-->
|
71
|
|
-
|
72
|
|
- <el-table-column align="center" prop="name" label="项目名称">
|
73
|
|
- <template slot-scope="scope">{{scope.row.item_name}}</template>
|
74
|
|
- </el-table-column>
|
75
|
|
- <el-table-column align="center" prop="name" label="数量">
|
76
|
|
- <template slot-scope="scope">{{scope.row.count}}</template>
|
77
|
|
- </el-table-column>
|
78
|
|
- <el-table-column align="center" prop="name" label="单价">
|
79
|
|
- <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
|
80
|
|
- </el-table-column>
|
81
|
|
- <el-table-column align="center" prop="name" label="费用">
|
82
|
|
- <template slot-scope="scope">
|
83
|
|
- <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
|
84
|
|
- </template>
|
85
|
|
- </el-table-column>
|
86
|
|
-
|
87
|
|
- <el-table-column align="center" prop="total" label="费用总额">
|
88
|
|
- <template slot-scope="scope">
|
89
|
|
- <div>{{scope.row.total.toFixed(2)}}</div>
|
90
|
|
- </template>
|
91
|
|
- </el-table-column>
|
92
|
|
-
|
93
|
|
- </el-table>
|
94
|
54
|
</div>
|
|
55
|
+ <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
|
|
56
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
57
|
+ :span-method="merge"
|
|
58
|
+ show-summary
|
|
59
|
+ :summary-method="getTotal"
|
|
60
|
+ max-height="600"
|
|
61
|
+
|
|
62
|
+ v-loading="detail_loading"
|
|
63
|
+ highlight-current-row>
|
|
64
|
+
|
|
65
|
+ <el-table-column align="center" prop="name" label="患者名字">
|
|
66
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
67
|
+ </el-table-column>
|
|
68
|
+ <!--<el-table-column align="center" prop="name" label="患者类型">-->
|
|
69
|
+ <!--<template slot-scope="scope"></template>-->
|
|
70
|
+ <!--</el-table-column>-->
|
|
71
|
+
|
|
72
|
+ <el-table-column align="center" prop="name" label="项目名称">
|
|
73
|
+ <template slot-scope="scope">{{scope.row.item_name}}</template>
|
|
74
|
+ </el-table-column>
|
|
75
|
+ <el-table-column align="center" prop="name" label="数量">
|
|
76
|
+ <template slot-scope="scope">{{scope.row.count}}</template>
|
|
77
|
+ </el-table-column>
|
|
78
|
+ <el-table-column align="center" prop="name" label="单价">
|
|
79
|
+ <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
|
|
80
|
+ </el-table-column>
|
|
81
|
+ <el-table-column align="center" prop="name" label="费用">
|
|
82
|
+ <template slot-scope="scope">
|
|
83
|
+ <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
|
|
84
|
+ </template>
|
|
85
|
+ </el-table-column>
|
|
86
|
+
|
|
87
|
+ <el-table-column align="center" prop="total" label="费用总额">
|
|
88
|
+ <template slot-scope="scope">
|
|
89
|
+ <div>{{scope.row.total.toFixed(2)}}</div>
|
|
90
|
+ </template>
|
|
91
|
+ </el-table-column>
|
|
92
|
+
|
|
93
|
+ </el-table>
|
|
94
|
+ </div>
|
95
|
95
|
|
96
|
96
|
<!-- </div> -->
|
97
|
97
|
</template>
|
|
@@ -110,9 +110,9 @@
|
110
|
110
|
},
|
111
|
111
|
data() {
|
112
|
112
|
return {
|
113
|
|
- detail_loading:false,
|
|
113
|
+ detail_loading: false,
|
114
|
114
|
tempArr: [],
|
115
|
|
- pos:0,
|
|
115
|
+ pos: 0,
|
116
|
116
|
|
117
|
117
|
sameRowArr: [],
|
118
|
118
|
keywords: '',
|
|
@@ -122,7 +122,7 @@
|
122
|
122
|
items: [
|
123
|
123
|
{ id: 1, name: '药品' },
|
124
|
124
|
{ id: 2, name: '项目' },
|
125
|
|
- { id: 3, name: '耗材' },
|
|
125
|
+ { id: 3, name: '耗材' }
|
126
|
126
|
|
127
|
127
|
]
|
128
|
128
|
|
|
@@ -217,14 +217,13 @@
|
217
|
217
|
// newObj['item_name'] = orders[b].order_info[c].advice.advice_name
|
218
|
218
|
newObj['item_id'] = orders[b].order_info[c].advice.drug_id
|
219
|
219
|
|
220
|
|
- if(orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
|
221
|
|
- newObj['item_name'] = orders[b].order_info[c].advice.advice_name + "( " + orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + "*" + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + "/" + orders[b].order_info[c].advice.drug.max_unit + " )"
|
222
|
|
- }else{
|
|
220
|
+ if (orders[b].order_info[c].advice.drug.min_unit != orders[b].order_info[c].advice.drug.dose_unit) {
|
|
221
|
+ newObj['item_name'] = orders[b].order_info[c].advice.advice_name + '( ' + orders[b].order_info[c].advice.drug.dose + orders[b].order_info[c].advice.drug.dose_unit + '*' + orders[b].order_info[c].advice.drug.min_number + orders[b].order_info[c].advice.drug.min_unit + '/' + orders[b].order_info[c].advice.drug.max_unit + ' )'
|
|
222
|
+ } else {
|
223
|
223
|
|
224
|
|
- newObj['item_name'] = ""
|
|
224
|
+ newObj['item_name'] = ''
|
225
|
225
|
}
|
226
|
226
|
|
227
|
|
-
|
228
|
227
|
}
|
229
|
228
|
if (orders[b].order_info[c].advice_id == 0 && orders[b].order_info[c].project_id > 0) {
|
230
|
229
|
newObj['type'] = 2
|
|
@@ -233,10 +232,8 @@
|
233
|
232
|
if (orders[b].order_info[c].project.type == 2) {
|
234
|
233
|
newObj['item_name'] = orders[b].order_info[c].project.project.project_name
|
235
|
234
|
|
236
|
|
-
|
237
|
235
|
} else if (orders[b].order_info[c].project.type == 3) {
|
238
|
|
- newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + "( "+ orders[b].order_info[c].project.good_info.specification_name+" )"
|
239
|
|
-
|
|
236
|
+ newObj['item_name'] = orders[b].order_info[c].project.good_info.good_name + '( ' + orders[b].order_info[c].project.good_info.specification_name + ' )'
|
240
|
237
|
|
241
|
238
|
}
|
242
|
239
|
}
|
|
@@ -246,7 +243,6 @@
|
246
|
243
|
tempPatientsTwo.push(obj)
|
247
|
244
|
}
|
248
|
245
|
|
249
|
|
-
|
250
|
246
|
for (let d = 0; d < tempPatientsTwo.length; d++) {
|
251
|
247
|
tempPatientsTwo[d]['new_order_info'] = []
|
252
|
248
|
let project = []
|
|
@@ -269,6 +265,9 @@
|
269
|
265
|
count = count + tempPatientsTwo[d].order_info[a].count
|
270
|
266
|
}
|
271
|
267
|
}
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
272
|
271
|
obj['price'] = project[i].price
|
273
|
272
|
obj['type'] = project[i].type
|
274
|
273
|
obj['item_name'] = project[i].item_name
|
|
@@ -287,6 +286,7 @@
|
287
|
286
|
count = count + tempPatientsTwo[d].order_info[a].count
|
288
|
287
|
}
|
289
|
288
|
}
|
|
289
|
+
|
290
|
290
|
obj['price'] = advice[i].price
|
291
|
291
|
obj['type'] = advice[i].type
|
292
|
292
|
obj['item_name'] = advice[i].item_name
|
|
@@ -303,46 +303,47 @@
|
303
|
303
|
let total = 0
|
304
|
304
|
for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
|
305
|
305
|
let new_name = tempPatientsTwo[i].new_order_info[b].item_name
|
306
|
|
- new_name=new_name.replace("( ","");
|
307
|
|
- new_name=new_name.replace(" )","");
|
|
306
|
+ new_name = new_name.replace('( ', '')
|
|
307
|
+ new_name = new_name.replace(' )', '')
|
308
|
308
|
if (new_name.length != 0) {
|
309
|
309
|
total = parseFloat(total) + parseFloat((parseFloat(tempPatientsTwo[i].new_order_info[b].count.toString()) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toString().toString())).toFixed(2))
|
310
|
310
|
}
|
311
|
311
|
}
|
312
|
312
|
tempPatientsTwo[i]['total'] = total
|
313
|
313
|
}
|
314
|
|
- console.log('tempPatientsTwo',tempPatientsTwo)
|
|
314
|
+ console.log('tempPatientsTwo', tempPatientsTwo)
|
315
|
315
|
for (let i = 0; i < tempPatientsTwo.length; i++) {
|
316
|
316
|
// console.log(111,tempPatientsTwo[i].total)
|
317
|
|
- if(tempPatientsTwo[i].new_order_info.length > 0){
|
|
317
|
+ if (tempPatientsTwo[i].new_order_info.length > 0) {
|
318
|
318
|
|
|
319
|
+ for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
|
|
320
|
+ let new_name = tempPatientsTwo[i].new_order_info[b].item_name
|
|
321
|
+ console.log('2 ' + new_name)
|
319
|
322
|
|
320
|
|
- for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
|
321
|
|
- let new_name = tempPatientsTwo[i].new_order_info[b].item_name
|
322
|
|
- new_name=new_name.replace("( ","");
|
323
|
|
- new_name=new_name.replace(" )","");
|
|
323
|
+ new_name = new_name.replace('( ', '')
|
|
324
|
+ new_name = new_name.replace(' )', '')
|
324
|
325
|
|
325
|
|
- if (new_name.length != 0) {
|
326
|
|
- let obj = {
|
327
|
|
- name: tempPatientsTwo[i].name,
|
328
|
|
- patient_id: tempPatientsTwo[i].patient_id,
|
329
|
|
- price: tempPatientsTwo[i].new_order_info[b].price,
|
330
|
|
- type: tempPatientsTwo[i].new_order_info[b].type,
|
331
|
|
- item_name: tempPatientsTwo[i].new_order_info[b].item_name,
|
332
|
|
- item_id: tempPatientsTwo[i].new_order_info[b].item_id,
|
333
|
|
- count: tempPatientsTwo[i].new_order_info[b].count,
|
|
326
|
+ if (new_name.length != 0) {
|
|
327
|
+ let obj = {
|
|
328
|
+ name: tempPatientsTwo[i].name,
|
|
329
|
+ patient_id: tempPatientsTwo[i].patient_id,
|
|
330
|
+ price: tempPatientsTwo[i].new_order_info[b].price,
|
|
331
|
+ type: tempPatientsTwo[i].new_order_info[b].type,
|
|
332
|
+ item_name: tempPatientsTwo[i].new_order_info[b].item_name,
|
|
333
|
+ item_id: tempPatientsTwo[i].new_order_info[b].item_id,
|
|
334
|
+ count: tempPatientsTwo[i].new_order_info[b].count
|
334
|
335
|
|
|
336
|
+ }
|
|
337
|
+
|
|
338
|
+ // if(b == 0){
|
|
339
|
+ obj['total'] = tempPatientsTwo[i].total
|
|
340
|
+ // }else{
|
|
341
|
+ // obj['total'] = 0
|
|
342
|
+ // }
|
|
343
|
+ this.tableData.push(obj)
|
335
|
344
|
}
|
336
|
345
|
|
337
|
|
- // if(b == 0){
|
338
|
|
- obj['total'] = tempPatientsTwo[i].total
|
339
|
|
- // }else{
|
340
|
|
- // obj['total'] = 0
|
341
|
|
- // }
|
342
|
|
- this.tableData.push(obj)
|
343
|
346
|
}
|
344
|
|
-
|
345
|
|
- }
|
346
|
347
|
}
|
347
|
348
|
}
|
348
|
349
|
this.handleSpanTempArr()
|
|
@@ -487,29 +488,28 @@
|
487
|
488
|
let item_name = order.item_name
|
488
|
489
|
let count = order.count
|
489
|
490
|
let price = order.price.toFixed(2)
|
490
|
|
- let pay_sumamt = (order.price.toFixed(2)*order.count).toFixed(2)
|
|
491
|
+ let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
|
491
|
492
|
let total = order.total.toFixed(2)
|
492
|
493
|
|
493
|
|
-
|
494
|
494
|
let obj = {
|
495
|
495
|
'患者姓名': name,
|
496
|
496
|
'项目名称': item_name,
|
497
|
497
|
'数量': count,
|
498
|
498
|
'单价': price,
|
499
|
499
|
'费用': pay_sumamt,
|
500
|
|
- '费用总额':total,
|
|
500
|
+ '费用总额': total
|
501
|
501
|
}
|
502
|
502
|
list.push(obj)
|
503
|
503
|
}
|
504
|
504
|
import('@/vendor/Export2Excel').then(excel => {
|
505
|
|
- const tHeader = [ '患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
|
506
|
|
- const filterVal = [ '患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
|
|
505
|
+ const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
|
|
506
|
+ const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
|
507
|
507
|
const data = this.formatJson(filterVal, list)
|
508
|
508
|
excel.export_json_to_excel1({
|
509
|
509
|
header: tHeader,
|
510
|
510
|
data,
|
511
|
511
|
filename: '明细',
|
512
|
|
- ref:this.$refs['table'].$el
|
|
512
|
+ ref: this.$refs['table'].$el
|
513
|
513
|
})
|
514
|
514
|
})
|
515
|
515
|
|
|
@@ -537,7 +537,7 @@
|
537
|
537
|
// sums[index] = sums[index].toFixed(2)
|
538
|
538
|
let num = 0
|
539
|
539
|
data.map(item => {
|
540
|
|
- num += item.price.toFixed(2)*item.count
|
|
540
|
+ num += item.price.toFixed(2) * item.count
|
541
|
541
|
})
|
542
|
542
|
sums[index] = num.toFixed(2)
|
543
|
543
|
} else {
|
|
@@ -546,7 +546,7 @@
|
546
|
546
|
})
|
547
|
547
|
|
548
|
548
|
return sums
|
549
|
|
- },
|
|
549
|
+ }
|
550
|
550
|
},
|
551
|
551
|
created() {
|
552
|
552
|
this.getSummaryDetailList()
|