|
@@ -0,0 +1,214 @@
|
|
1
|
+<template>
|
|
2
|
+ <div id="allList-print" class="allList-print">
|
|
3
|
+ <div v-for='(i,index) in pageArr.length' :key="index" style="page-break-after: always;">
|
|
4
|
+ <div class="allListTitle">{{ $store.getters.xt_user.org.org_name }}费用汇总33</div>
|
|
5
|
+ <div class="allListInfo">
|
|
6
|
+ <div>患者姓名:{{ patient.name }}</div>
|
|
7
|
+ <div>透析号:{{ patient.dialysis_no }}</div>
|
|
8
|
+ <div>性别:{{ patient.gender == 1 ? '男' : '女' }}</div>
|
|
9
|
+ <div>年龄:{{ patient.age }} 岁</div>
|
|
10
|
+ <div v-if="$store.getters.xt_user.org_id == 0">日期:{{ hospital.in_hosptial_time }} 至
|
|
11
|
+ {{ hospital.out_hosptial_time }}
|
|
12
|
+ </div>
|
|
13
|
+ <div v-else>日期:{{ getTimes(order.settle_start_time) }} 至 {{ getTimes(order.settle_end_time) }}</div>
|
|
14
|
+
|
|
15
|
+ </div>
|
|
16
|
+ <table class="allListTable" border="1">
|
|
17
|
+ <tr>
|
|
18
|
+ <td style="width:10%">类别</td>
|
|
19
|
+ <td style="width:40%">项目名称</td>
|
|
20
|
+ <td style="width:10%">规格</td>
|
|
21
|
+ <td style="width:10%">单价(元)</td>
|
|
22
|
+ <td style="width:10%">数量</td>
|
|
23
|
+ <td style="width:10%">金额(元)</td>
|
|
24
|
+ <td style="width:10%" v-if="org_id==10489 ||org_id==0">报销等级</td>
|
|
25
|
+ </tr>
|
|
26
|
+ <template v-for='item in list.slice(index * 20,(index * 20) + pageArr[index])'>
|
|
27
|
+ <tr v-if="item.is_total == 2">
|
|
28
|
+ <td style="width:10%">{{ item.med_chrgitm_type }}</td>
|
|
29
|
+ <td style="width:40%">{{ item.name }}</td>
|
|
30
|
+ <td style="width:10%">{{ item.spec }}</td>
|
|
31
|
+ <td style="width:10%">{{ (item.price).toFixed(2) }}</td>
|
|
32
|
+ <td style="width:10%">{{ item.count }}{{ item.unit }}</td>
|
|
33
|
+ <td style="width:10%">{{ (item.price * item.count).toFixed(2) }}</td>
|
|
34
|
+ <td style="width:10%" v-if="org_id==10489 ||org_id==0">
|
|
35
|
+ {{item.chrgitm_lv!=''?getMedicineInsuranceType(item.chrgitm_lv): '丙类' }}
|
|
36
|
+ </td>
|
|
37
|
+ </tr>
|
|
38
|
+ <tr>
|
|
39
|
+ <td colspan="6" style="text-align:right;" v-if="item.is_total == 1">合计:{{ item.total }}元</td>
|
|
40
|
+ </tr>
|
|
41
|
+ </template>
|
|
42
|
+ </table>
|
|
43
|
+ <div class="tableBottom">
|
|
44
|
+ <div class="tableBottomOne">制表人:{{ admin.user_name }}</div>
|
|
45
|
+ <div class="tableBottomOne">制表日期:{{ getNowTime() }}</div>
|
|
46
|
+ <div class="tableBottomOne">总费用:{{ order.medfee_sumamt }}元</div>
|
|
47
|
+ </div>
|
|
48
|
+ </div>
|
|
49
|
+ </div>
|
|
50
|
+</template>
|
|
51
|
+
|
|
52
|
+<script>
|
|
53
|
+import { uParseTime } from '@/utils/tools'
|
|
54
|
+
|
|
55
|
+export default {
|
|
56
|
+ props: {
|
|
57
|
+ list: {
|
|
58
|
+ type: Array,
|
|
59
|
+ default: function() {
|
|
60
|
+ return []
|
|
61
|
+ }
|
|
62
|
+ }, patient: {
|
|
63
|
+ type: Object,
|
|
64
|
+ default: function() {
|
|
65
|
+ return {}
|
|
66
|
+ }
|
|
67
|
+ }, order: {
|
|
68
|
+ type: Object,
|
|
69
|
+ default: function() {
|
|
70
|
+ return {}
|
|
71
|
+ }
|
|
72
|
+ }, admin: {
|
|
73
|
+ type: Object,
|
|
74
|
+ default: function() {
|
|
75
|
+ return {}
|
|
76
|
+ }
|
|
77
|
+ }, hospital: {
|
|
78
|
+ type: Object,
|
|
79
|
+ default: function() {
|
|
80
|
+ return {}
|
|
81
|
+ }
|
|
82
|
+
|
|
83
|
+ }
|
|
84
|
+ },
|
|
85
|
+ data() {
|
|
86
|
+ return {
|
|
87
|
+ page: 1,
|
|
88
|
+ pageArr: [],
|
|
89
|
+ org_id:'',
|
|
90
|
+ }
|
|
91
|
+ },
|
|
92
|
+ methods: {
|
|
93
|
+ getNowTime: function() {
|
|
94
|
+ let dateTime
|
|
95
|
+ let yy = new Date().getFullYear()
|
|
96
|
+ let mm = new Date().getMonth() + 1
|
|
97
|
+ let dd = new Date().getDate()
|
|
98
|
+ let hh = new Date().getHours()
|
|
99
|
+ let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
|
|
100
|
+ :
|
|
101
|
+ new Date().getMinutes()
|
|
102
|
+ let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
|
|
103
|
+ :
|
|
104
|
+ new Date().getSeconds()
|
|
105
|
+ dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
|
|
106
|
+ return dateTime
|
|
107
|
+ },
|
|
108
|
+ getTimes(time) {
|
|
109
|
+ return uParseTime(time, '{y}-{m}-{d}')
|
|
110
|
+ }, getTotal: function(items) {
|
|
111
|
+ let total = 0
|
|
112
|
+ for (let i = 0; i < items.length; i++) {
|
|
113
|
+ total = total + (items[i].count * items[i].price).toFixed(2)
|
|
114
|
+ }
|
|
115
|
+ return total
|
|
116
|
+
|
|
117
|
+ },
|
|
118
|
+ getPage() {
|
|
119
|
+ console.log('kkkkkk',this.list);
|
|
120
|
+ if (this.list.length <= 20) {
|
|
121
|
+ this.page = 1
|
|
122
|
+ this.pageArr.push(this.list.length)
|
|
123
|
+ } else if (this.list.length > 20) {
|
|
124
|
+ this.page = parseInt(this.list.length / 20)
|
|
125
|
+ let num = this.list.length % 20
|
|
126
|
+ for (var i = 0; i < this.page; i++) {
|
|
127
|
+ this.pageArr.push(20)
|
|
128
|
+ }
|
|
129
|
+ if (num != 0) {
|
|
130
|
+ this.pageArr.push(num)
|
|
131
|
+ }
|
|
132
|
+ }
|
|
133
|
+ },
|
|
134
|
+ getMedicineInsuranceType(type) {
|
|
135
|
+ switch (type) {
|
|
136
|
+ case "01":
|
|
137
|
+ return '甲类'
|
|
138
|
+ break
|
|
139
|
+ case "02":
|
|
140
|
+ return '乙类'
|
|
141
|
+
|
|
142
|
+ break
|
|
143
|
+ case "03":
|
|
144
|
+ return '自费'
|
|
145
|
+ break
|
|
146
|
+
|
|
147
|
+ }
|
|
148
|
+
|
|
149
|
+ },
|
|
150
|
+
|
|
151
|
+ },
|
|
152
|
+ created(){
|
|
153
|
+ this.org_id = this.$store.getters.xt_user.org_id
|
|
154
|
+ },
|
|
155
|
+ watch: {
|
|
156
|
+ list: {
|
|
157
|
+ handler(newVal) {
|
|
158
|
+ this.getPage()
|
|
159
|
+ },
|
|
160
|
+ deep: true
|
|
161
|
+ }
|
|
162
|
+ }
|
|
163
|
+}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+</script>
|
|
167
|
+
|
|
168
|
+<style lang="scss" scoped>
|
|
169
|
+.allList-print {
|
|
170
|
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
171
|
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
172
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
173
|
+ margin-bottom: 20px;
|
|
174
|
+ padding: 20px 10px;
|
|
175
|
+}
|
|
176
|
+
|
|
177
|
+.allListTitle {
|
|
178
|
+ font-size: 22px;
|
|
179
|
+ text-align: center;
|
|
180
|
+ font-weight: bold;
|
|
181
|
+ margin-bottom: 10px;
|
|
182
|
+}
|
|
183
|
+
|
|
184
|
+.allListInfo {
|
|
185
|
+ display: flex;
|
|
186
|
+ font-size: 14px;
|
|
187
|
+ justify-content: space-between;
|
|
188
|
+ margin: 10px 0;
|
|
189
|
+}
|
|
190
|
+
|
|
191
|
+.allListTable {
|
|
192
|
+ width: 100%;
|
|
193
|
+ text-align: center;
|
|
194
|
+ border-collapse: collapse;
|
|
195
|
+ line-height: 20px;
|
|
196
|
+ font-size: 12px;
|
|
197
|
+ border-color: #000;
|
|
198
|
+ text-align: left;
|
|
199
|
+}
|
|
200
|
+
|
|
201
|
+.allListTable tr td {
|
|
202
|
+ padding: 0 5px;
|
|
203
|
+}
|
|
204
|
+
|
|
205
|
+.tableBottom {
|
|
206
|
+ font-size: 14px;
|
|
207
|
+ display: flex;
|
|
208
|
+ margin-top: 20px;
|
|
209
|
+}
|
|
210
|
+
|
|
211
|
+.tableBottomOne {
|
|
212
|
+ margin-right: 40px;
|
|
213
|
+}
|
|
214
|
+</style>
|