|
@@ -0,0 +1,610 @@
|
|
1
|
+<template>
|
|
2
|
+ <div>
|
|
3
|
+ <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
|
|
4
|
+ <div>
|
|
5
|
+
|
|
6
|
+ <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
|
|
7
|
+ @keyup.enter.native='searchAction'
|
|
8
|
+ placeholder="请输入患者姓名"
|
|
9
|
+
|
|
10
|
+ class="filter-item"/>
|
|
11
|
+ <el-select size="small" v-model="item_type" placeholder="请选择"
|
|
12
|
+ style="width:150px;margin-left:10px;" @change="changeItem">
|
|
13
|
+ <el-option
|
|
14
|
+ label="全部"
|
|
15
|
+ value="0">
|
|
16
|
+ </el-option>
|
|
17
|
+ <el-option
|
|
18
|
+ v-for="item,index in items"
|
|
19
|
+ :key="index"
|
|
20
|
+ :label="item.name"
|
|
21
|
+ :value="item.id">
|
|
22
|
+ </el-option>
|
|
23
|
+ </el-select>
|
|
24
|
+ <el-date-picker
|
|
25
|
+ v-model="chargeDate"
|
|
26
|
+ type="daterange"
|
|
27
|
+ value-format="yyyy-MM-dd"
|
|
28
|
+ range-separator="至"
|
|
29
|
+ start-placeholder="开始日期"
|
|
30
|
+ @change="changeDate"
|
|
31
|
+ end-placeholder="结束日期">
|
|
32
|
+ </el-date-picker>
|
|
33
|
+ <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
|
|
34
|
+ <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
|
|
35
|
+ </div>
|
|
36
|
+ <div>
|
|
37
|
+ <!-- <el-popover
|
|
38
|
+ placement="bottom"
|
|
39
|
+ width="210"
|
|
40
|
+ trigger="click">
|
|
41
|
+ <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
|
|
42
|
+ <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
|
|
43
|
+ <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
|
|
44
|
+
|
|
45
|
+ </el-popover> -->
|
|
46
|
+ <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
|
|
47
|
+ </div>
|
|
48
|
+ </div>
|
|
49
|
+ <el-table :data="tableData" border :row-style="{ color: '#303133' }"
|
|
50
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
51
|
+
|
|
52
|
+ v-loading="settle_loading"
|
|
53
|
+ max-height="600"
|
|
54
|
+ :summary-method="getTotal"
|
|
55
|
+ highlight-current-row>
|
|
56
|
+
|
|
57
|
+ <el-table-column align="center" label="患者名字" fixed>
|
|
58
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
59
|
+ </el-table-column>
|
|
60
|
+ <el-table-column align="center" prop="item_name" label="身份证">
|
|
61
|
+ <template slot-scope="scope">
|
|
62
|
+ {{scope.row.id_card_no}}
|
|
63
|
+ </template>
|
|
64
|
+ </el-table-column>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+ <el-table-column align="center" label="透析次数">
|
|
68
|
+ <template slot-scope="scope">
|
|
69
|
+ {{scope.row.dis.length}}
|
|
70
|
+
|
|
71
|
+ </template>
|
|
72
|
+ </el-table-column>
|
|
73
|
+
|
|
74
|
+ <el-table-column align="center" label="结算次数">
|
|
75
|
+ <template slot-scope="scope">
|
|
76
|
+ {{scope.row.orders.length}}
|
|
77
|
+ </template>
|
|
78
|
+ </el-table-column>
|
|
79
|
+
|
|
80
|
+ <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
|
|
81
|
+ <template slot-scope="scope">{{GetMedfeeSumam(scope.row)}}</template>
|
|
82
|
+ </el-table-column>
|
|
83
|
+ <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
|
|
84
|
+ <template slot-scope="scope">{{GetFundPaySumamt(scope.row)}}</template>
|
|
85
|
+ </el-table-column>
|
|
86
|
+ <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
|
|
87
|
+ <template slot-scope="scope">{{GetAcctPay(scope.row)}}</template>
|
|
88
|
+ </el-table-column>
|
|
89
|
+ <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
|
|
90
|
+ <template slot-scope="scope">{{GetPsnCashPay(scope.row)}}</template>
|
|
91
|
+ </el-table-column>
|
|
92
|
+ <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
|
|
93
|
+ <template slot-scope="scope">{{GetHifpPay(scope.row)}}</template>
|
|
94
|
+ </el-table-column>
|
|
95
|
+
|
|
96
|
+ <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
|
|
97
|
+ <template slot-scope="scope">{{GetHiFobPay(scope.row)}}</template>
|
|
98
|
+ </el-table-column>
|
|
99
|
+ <el-table-column align="center" prop="preselfpay_amt" label="先行自付金额">
|
|
100
|
+ <template slot-scope="scope">{{GetPreselfpaAmt(scope.row)}}</template>
|
|
101
|
+ </el-table-column>
|
|
102
|
+ <el-table-column align="center" prop="overlmt_self_pay" label="超限价金额">
|
|
103
|
+ <template slot-scope="scope">{{GetOverlmtSelfPay(scope.row)}}</template>
|
|
104
|
+ </el-table-column>
|
|
105
|
+ <el-table-column align="center" prop="fulamt_ownpay_amt" label="全自费金额">
|
|
106
|
+ <template slot-scope="scope">{{GetFulamtOwnpayAmt(scope.row)}}</template>
|
|
107
|
+ </el-table-column>
|
|
108
|
+ <el-table-column align="center" prop="inscp_scp_amt" label="符合政策范围金额">
|
|
109
|
+ <template slot-scope="scope">{{GetInscpScpAmt(scope.row)}}</template>
|
|
110
|
+ </el-table-column>
|
|
111
|
+
|
|
112
|
+ <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
|
|
113
|
+ <template slot-scope="scope">{{GetMafPay(scope.row)}}</template>
|
|
114
|
+ </el-table-column>
|
|
115
|
+ <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
|
|
116
|
+ <template slot-scope="scope">{{GetHifesPay(scope.row)}}</template>
|
|
117
|
+ </el-table-column>
|
|
118
|
+ <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
|
|
119
|
+ <template slot-scope="scope">{{GetHifmiPay(scope.row)}}</template>
|
|
120
|
+ </el-table-column>
|
|
121
|
+ <el-table-column align="center" prop="oth_pay" label="其他支付">
|
|
122
|
+ <template slot-scope="scope">{{GetOthPay(scope.row)}}</template>
|
|
123
|
+ </el-table-column>
|
|
124
|
+ <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
|
|
125
|
+ <template slot-scope="scope">{{GetCvlservPay(scope.row)}}</template>
|
|
126
|
+ </el-table-column>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+ </el-table>
|
|
130
|
+
|
|
131
|
+ </div>
|
|
132
|
+</template>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+<script>
|
|
136
|
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
137
|
+import { GetSummarySettle,changeOrderDesc } from '@/api/his/his'
|
|
138
|
+import { uParseTime } from '@/utils/tools'
|
|
139
|
+// import NewStatementPrint from './newStatementPrint'
|
|
140
|
+const moment = require('moment')
|
|
141
|
+export default {
|
|
142
|
+ components: {
|
|
143
|
+ BreadCrumb
|
|
144
|
+
|
|
145
|
+ },
|
|
146
|
+ data() {
|
|
147
|
+ return {
|
|
148
|
+ settle_loading:false,
|
|
149
|
+ crumbs: [],
|
|
150
|
+ tempArr: [],
|
|
151
|
+ sameRowArr: [],
|
|
152
|
+ modeOptions:this.$store.getters.treatment_mode,
|
|
153
|
+ tableData: [],
|
|
154
|
+ config:{},
|
|
155
|
+ sick:{},
|
|
156
|
+ chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
|
|
157
|
+ item_type: '0',
|
|
158
|
+ items: [
|
|
159
|
+ { id: 2, name: '自费' },
|
|
160
|
+ { id: 5, name: '城乡居民基本医疗保险' },
|
|
161
|
+ { id: 6, name: '职工基本医疗保险' }
|
|
162
|
+ ]
|
|
163
|
+
|
|
164
|
+ }
|
|
165
|
+ },
|
|
166
|
+ methods: {
|
|
167
|
+ GetMedfeeSumam(row){
|
|
168
|
+ let medfee = 0
|
|
169
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
170
|
+ medfee = medfee + row.orders[i].medfee_sumamt
|
|
171
|
+ }
|
|
172
|
+ return medfee.toFixed(2)
|
|
173
|
+
|
|
174
|
+ }, GetFundPaySumamt(row){
|
|
175
|
+ let medfee = 0
|
|
176
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
177
|
+ medfee = medfee + row.orders[i].fund_pay_sumamt
|
|
178
|
+ }
|
|
179
|
+ return medfee.toFixed(2)
|
|
180
|
+
|
|
181
|
+ },GetAcctPay(row){
|
|
182
|
+ let medfee = 0
|
|
183
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
184
|
+ medfee = medfee + row.orders[i].acct_pay
|
|
185
|
+ }
|
|
186
|
+ return medfee.toFixed(2)
|
|
187
|
+
|
|
188
|
+ },GetPsnCashPay(row){
|
|
189
|
+ let medfee = 0
|
|
190
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
191
|
+ medfee = medfee + row.orders[i].psn_cash_pay
|
|
192
|
+ }
|
|
193
|
+ return medfee.toFixed(2)
|
|
194
|
+
|
|
195
|
+ },GetHifpPay(row){
|
|
196
|
+ let medfee = 0
|
|
197
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
198
|
+ medfee = medfee + row.orders[i].hifp_pay
|
|
199
|
+ }
|
|
200
|
+ return medfee.toFixed(2)
|
|
201
|
+
|
|
202
|
+ },GetHiFobPay(row){
|
|
203
|
+ let medfee = 0
|
|
204
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
205
|
+ medfee = medfee + row.orders[i].hifob_pay
|
|
206
|
+ }
|
|
207
|
+ return medfee.toFixed(2)
|
|
208
|
+
|
|
209
|
+ },GetPreselfpaAmt(row){
|
|
210
|
+ let medfee = 0
|
|
211
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
212
|
+ medfee = medfee + row.orders[i].preselfpay_amt
|
|
213
|
+ }
|
|
214
|
+ return medfee.toFixed(2)
|
|
215
|
+
|
|
216
|
+ },GetOverlmtSelfPay(row){
|
|
217
|
+ let medfee = 0
|
|
218
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
219
|
+ medfee = medfee + row.orders[i].overlmt_self_pay
|
|
220
|
+ }
|
|
221
|
+ return medfee.toFixed(2)
|
|
222
|
+ },GetFulamtOwnpayAmt(row){
|
|
223
|
+ let medfee = 0
|
|
224
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
225
|
+ medfee = medfee + row.orders[i].fulamt_ownpay_amt
|
|
226
|
+ }
|
|
227
|
+ return medfee.toFixed(2)
|
|
228
|
+
|
|
229
|
+ },GetMafPay(row){
|
|
230
|
+ let medfee = 0
|
|
231
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
232
|
+ medfee = medfee + row.orders[i].maf_pay
|
|
233
|
+ }
|
|
234
|
+ return medfee.toFixed(2)
|
|
235
|
+
|
|
236
|
+ },GetHifesPay(row){
|
|
237
|
+ let medfee = 0
|
|
238
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
239
|
+ medfee = medfee + row.orders[i].hifes_pay
|
|
240
|
+ }
|
|
241
|
+ return medfee.toFixed(2)
|
|
242
|
+
|
|
243
|
+ },GetHifmiPay(row){
|
|
244
|
+
|
|
245
|
+ let medfee = 0
|
|
246
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
247
|
+ medfee = medfee + row.orders[i].hifmi_pay
|
|
248
|
+ }
|
|
249
|
+ return medfee.toFixed(2)
|
|
250
|
+ },GetInscpScpAmt(row){
|
|
251
|
+
|
|
252
|
+ let medfee = 0
|
|
253
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
254
|
+ medfee = medfee + row.orders[i].inscp_scp_amt
|
|
255
|
+ }
|
|
256
|
+ return medfee.toFixed(2)
|
|
257
|
+
|
|
258
|
+ },GetOthPay(row){
|
|
259
|
+ let medfee = 0
|
|
260
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
261
|
+ medfee = medfee + row.orders[i].oth_pay
|
|
262
|
+ }
|
|
263
|
+ return medfee.toFixed(2)
|
|
264
|
+
|
|
265
|
+ },GetCvlservPay(row){
|
|
266
|
+ let medfee = 0
|
|
267
|
+ for(let i = 0; i < row.orders.length; i++){
|
|
268
|
+ medfee = medfee + row.orders[i].cvlserv_pay
|
|
269
|
+ }
|
|
270
|
+ return medfee.toFixed(2)
|
|
271
|
+ },
|
|
272
|
+ change(id,desc,type){
|
|
273
|
+ let params = {
|
|
274
|
+ id: id,
|
|
275
|
+ desc: desc,
|
|
276
|
+ change_type: type
|
|
277
|
+ }
|
|
278
|
+ changeOrderDesc(params).then(response => {
|
|
279
|
+ if (response.data.state == 0) {
|
|
280
|
+ this.$message.error(response.data.msg)
|
|
281
|
+ } else {
|
|
282
|
+ this.$message.success(response.data.data.msg)
|
|
283
|
+ }
|
|
284
|
+ })
|
|
285
|
+ },
|
|
286
|
+ getTimes(time) {
|
|
287
|
+ return uParseTime(time, '{y}-{m}-{d}')
|
|
288
|
+ },
|
|
289
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
290
|
+ if (columnIndex === 0) {
|
|
291
|
+ if (rowIndex % 2 === 0) {
|
|
292
|
+ return {
|
|
293
|
+ rowspan: 2,
|
|
294
|
+ colspan: 1
|
|
295
|
+ }
|
|
296
|
+ } else {
|
|
297
|
+ return {
|
|
298
|
+ rowspan: 0,
|
|
299
|
+ colspan: 0
|
|
300
|
+ }
|
|
301
|
+ }
|
|
302
|
+ }
|
|
303
|
+ },
|
|
304
|
+ unique(arr) {
|
|
305
|
+ const res = new Map()
|
|
306
|
+ return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
|
|
307
|
+ },getSickName(sick_id){
|
|
308
|
+ let name = ""
|
|
309
|
+ for(let i = 0;i < this.sick.length;i++){
|
|
310
|
+ if(sick_id == this.sick[i].id){
|
|
311
|
+ name = this.sick[i].class_name + "(" + this.sick[i].content_code +")"
|
|
312
|
+ }
|
|
313
|
+ }
|
|
314
|
+ return name
|
|
315
|
+ },getTypeName(row){
|
|
316
|
+ let name = ""
|
|
317
|
+ if(row.insutype == '390'){
|
|
318
|
+ // let a = config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
|
|
319
|
+ let a = this.config.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+ // let aa= row.his.insuplc_admdvs.slice(0, 4); //参保地前4位编码
|
|
323
|
+ let b= row.his.insuplc_admdvs.slice(0, 3); //参保地前3位编码
|
|
324
|
+ if(a == b){
|
|
325
|
+ name = "本地城乡"
|
|
326
|
+ }else{
|
|
327
|
+ name = "异地城乡"
|
|
328
|
+ }
|
|
329
|
+
|
|
330
|
+ }else if(row.insutype == '310'){
|
|
331
|
+ // let c = config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
|
|
332
|
+ let a = this.config.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+ // let d= row.his.insuplc_admdvs.slice(0, 4); //参保地前4位编码
|
|
336
|
+ let b= row.his.insuplc_admdvs.slice(0, 3); //参保地前3位编码
|
|
337
|
+ if(a == b){
|
|
338
|
+
|
|
339
|
+ name = "本地职工"
|
|
340
|
+ }else{
|
|
341
|
+ name = "异地职工"
|
|
342
|
+ }
|
|
343
|
+
|
|
344
|
+ }else{
|
|
345
|
+ name = "其他"
|
|
346
|
+
|
|
347
|
+ }
|
|
348
|
+ return name
|
|
349
|
+ },getName(id){
|
|
350
|
+ var name = ""
|
|
351
|
+ var options = this.$store.getters.insuplc_admdvs
|
|
352
|
+ for(let i = 0; i < options.length; i++){
|
|
353
|
+ if(id == options[i].value){
|
|
354
|
+ name = options[i].label
|
|
355
|
+ }
|
|
356
|
+ }
|
|
357
|
+ return name
|
|
358
|
+ },
|
|
359
|
+ changeDate() {
|
|
360
|
+ this.getSummarySettleList()
|
|
361
|
+ },
|
|
362
|
+ changeItem() {
|
|
363
|
+ this.getSummarySettleList()
|
|
364
|
+
|
|
365
|
+ },
|
|
366
|
+ searchAction() {
|
|
367
|
+ this.item_type = '0'
|
|
368
|
+ this.getSummarySettleList()
|
|
369
|
+
|
|
370
|
+ },
|
|
371
|
+ getSummarySettleList() {
|
|
372
|
+ let start_time = this.chargeDate[0]
|
|
373
|
+ let end_time = this.chargeDate[1]
|
|
374
|
+ let params = {
|
|
375
|
+ start_time: start_time,
|
|
376
|
+ end_time: end_time,
|
|
377
|
+ type: this.item_type,
|
|
378
|
+ keyword: this.keywords,
|
|
379
|
+ s_type:2,
|
|
380
|
+ }
|
|
381
|
+ this.settle_loading = true
|
|
382
|
+ GetSummarySettle(params).then(response => {
|
|
383
|
+ if (response.data.state == 0) {
|
|
384
|
+ this.settle_loading = false
|
|
385
|
+
|
|
386
|
+ this.$message.error(response.data.msg)
|
|
387
|
+ return false
|
|
388
|
+ } else {
|
|
389
|
+ this.settle_loading = false
|
|
390
|
+ this.tableData = []
|
|
391
|
+ this.config = response.data.data.config
|
|
392
|
+ this.sick = response.data.data.sick
|
|
393
|
+ let data = response.data.data.patients
|
|
394
|
+ this.tableData = data
|
|
395
|
+ console.log( this.tableData)
|
|
396
|
+
|
|
397
|
+ }
|
|
398
|
+ })
|
|
399
|
+ }, uniqueProjectAndAdvice(array) {
|
|
400
|
+ // res用来存储结果
|
|
401
|
+ var res = []
|
|
402
|
+ for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
|
|
403
|
+ for (var j = 0, resLen = res.length; j < resLen; j++) {
|
|
404
|
+ if (array[i].item_id === res[j].item_id && array[i].price === res[j].price) {
|
|
405
|
+ break
|
|
406
|
+ }
|
|
407
|
+ }
|
|
408
|
+ // 如果array[i]是唯一的,那么执行完循环,j等于resLen
|
|
409
|
+ if (j === resLen) {
|
|
410
|
+ res.push(array[i])
|
|
411
|
+ }
|
|
412
|
+ }
|
|
413
|
+ return res
|
|
414
|
+ }, sort(arr) {
|
|
415
|
+ for (var i = 0; i < arr.length - 1; i++) {
|
|
416
|
+ for (var j = 0; j < arr.length - i - 1; j++) {
|
|
417
|
+ if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
|
|
418
|
+ var hand = arr[j]
|
|
419
|
+ arr[j] = arr[j + 1]
|
|
420
|
+ arr[j + 1] = hand
|
|
421
|
+
|
|
422
|
+ }
|
|
423
|
+ }
|
|
424
|
+ }
|
|
425
|
+ return arr
|
|
426
|
+ }, handleSpanTempArr() {
|
|
427
|
+ this.tempArr = []
|
|
428
|
+
|
|
429
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
430
|
+ if (i === 0) {
|
|
431
|
+ this.tempArr.push(1)
|
|
432
|
+ this.pos = 0
|
|
433
|
+ } else {
|
|
434
|
+ // 判断当前元素与上一个元素是否相同
|
|
435
|
+ if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
|
|
436
|
+ this.tempArr[this.pos] += 1
|
|
437
|
+ this.tempArr.push(0)
|
|
438
|
+ } else {
|
|
439
|
+ this.tempArr.push(1)
|
|
440
|
+ this.pos = i
|
|
441
|
+ }
|
|
442
|
+ }
|
|
443
|
+ }
|
|
444
|
+
|
|
445
|
+ let sameRowArr = [], sIdx = 0
|
|
446
|
+ this.tableData.forEach((item, index) => {
|
|
447
|
+ item.index = index
|
|
448
|
+ if (index === 0) {
|
|
449
|
+ sameRowArr.push([index])
|
|
450
|
+ } else {
|
|
451
|
+ if (item.patient_id === this.tableData[index - 1].patient_id) {
|
|
452
|
+ sameRowArr[sIdx].push(index)
|
|
453
|
+ } else {
|
|
454
|
+ sIdx = sIdx + 1
|
|
455
|
+ sameRowArr.push([index])
|
|
456
|
+ }
|
|
457
|
+ }
|
|
458
|
+ })
|
|
459
|
+ this.sameRowArr = sameRowArr
|
|
460
|
+ }, merge({ row, column, rowIndex, columnIndex }) {
|
|
461
|
+ if (columnIndex === 0 || columnIndex === 1) {
|
|
462
|
+ const _row = this.tempArr[rowIndex]
|
|
463
|
+ const _col = _row > 0 ? 1 : 0
|
|
464
|
+ return {
|
|
465
|
+ rowspan: _row,
|
|
466
|
+ colspan: _col
|
|
467
|
+ }
|
|
468
|
+ }
|
|
469
|
+ },
|
|
470
|
+ getTotal(param) {
|
|
471
|
+ const { columns, data } = param
|
|
472
|
+ const sums = []
|
|
473
|
+ columns.forEach((column, index) => {
|
|
474
|
+ if (index === 0) {
|
|
475
|
+ sums[index] = '合计'
|
|
476
|
+ return
|
|
477
|
+ }
|
|
478
|
+ const values = data.map(item => Number(item[column.property]))
|
|
479
|
+ if (column.property === 'total' || column.property === 'medfee_sumamt' || column.property === 'fund_pay_sumamt' ||
|
|
480
|
+ column.property === 'acct_pay' || column.property === 'maf_pay' || column.property === 'psn_cash_pay' ||
|
|
481
|
+ column.property === 'hifp_pay' || column.property === 'hifob_pay' || column.property === 'hifes_pay' ||
|
|
482
|
+ column.property === 'hifmi_pay' || column.property === 'oth_pay' || column.property === 'cvlserv_pay' ||
|
|
483
|
+ column.property === 'wechat_pay' || column.property === 'ali_pay' || column.property === 'band_card_pay' ||
|
|
484
|
+ column.property === 'jifen_pay' || column.property === 'cash_pay' || column.property ==='card_desc'
|
|
485
|
+ ) {
|
|
486
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
487
|
+ const value = Number(curr)
|
|
488
|
+ if (!isNaN(value)) {
|
|
489
|
+ return prev + curr
|
|
490
|
+ } else {
|
|
491
|
+ return prev
|
|
492
|
+ }
|
|
493
|
+ }, 0)
|
|
494
|
+ sums[index] = sums[index].toFixed(2)
|
|
495
|
+ } else {
|
|
496
|
+ sums[index] = ''
|
|
497
|
+ }
|
|
498
|
+ })
|
|
499
|
+
|
|
500
|
+ return sums
|
|
501
|
+ },
|
|
502
|
+ export_detail() {
|
|
503
|
+
|
|
504
|
+ let list = []
|
|
505
|
+ // for (let i = 0; i < this.tableData.length; i++) {
|
|
506
|
+ // let order = this.tableData[i]
|
|
507
|
+ // let name = order.other_name
|
|
508
|
+ // let id_card_no = order.id_card_no
|
|
509
|
+ //
|
|
510
|
+ // let time = ''
|
|
511
|
+ // let balance_accounts = ""
|
|
512
|
+ // let med_type = ""
|
|
513
|
+ // let medfee_sumamt = ""
|
|
514
|
+ // let fund_pay_sumamt = ""
|
|
515
|
+ // let acct_pay = ""
|
|
516
|
+ // let psn_cash_pay = ""
|
|
517
|
+ // let hifes_pay = ""
|
|
518
|
+ // let hifmi_pay = ""
|
|
519
|
+ // let hifp_pay = ""
|
|
520
|
+ // let hifob_pay = ""
|
|
521
|
+ // let maf_pay = ""
|
|
522
|
+ // let time2 = ""
|
|
523
|
+ // time2 = this.getTimes(order.settle_accounts_date)
|
|
524
|
+ //
|
|
525
|
+ // let total = ""
|
|
526
|
+ //
|
|
527
|
+ // if(order.setl_time.length == 0){
|
|
528
|
+ //
|
|
529
|
+ // time = this.getTimes(order.settle_accounts_date)
|
|
530
|
+ //
|
|
531
|
+ // }else {
|
|
532
|
+ //
|
|
533
|
+ // time = order.setl_time.split(" ")[0]
|
|
534
|
+ //
|
|
535
|
+ // }
|
|
536
|
+ //
|
|
537
|
+ // if (order.is_medicine_insurance == 0) {
|
|
538
|
+ // balance_accounts = '自费'
|
|
539
|
+ // }
|
|
540
|
+ //
|
|
541
|
+ // if (order.is_medicine_insurance == 1) {
|
|
542
|
+ // balance_accounts = '医保'
|
|
543
|
+ // }
|
|
544
|
+ //
|
|
545
|
+ // if (order.med_type == '14') {
|
|
546
|
+ // med_type = '门诊特殊病'
|
|
547
|
+ // }
|
|
548
|
+ //
|
|
549
|
+ // if (order.med_type == '11') {
|
|
550
|
+ // med_type = '普通门诊'
|
|
551
|
+ // }
|
|
552
|
+ //
|
|
553
|
+ // medfee_sumamt = order.medfee_sumamt
|
|
554
|
+ // fund_pay_sumamt = order.fund_pay_sumamt
|
|
555
|
+ //
|
|
556
|
+ // acct_pay = order.acct_pay
|
|
557
|
+ //
|
|
558
|
+ // psn_cash_pay = order.psn_cash_pay
|
|
559
|
+ // hifes_pay = order.hifes_pay
|
|
560
|
+ // hifmi_pay = order.hifmi_pay
|
|
561
|
+ // hifp_pay = order.hifp_pay
|
|
562
|
+ // hifob_pay = order.hifob_pay
|
|
563
|
+ // maf_pay = order.maf_pay
|
|
564
|
+ // total = order.total
|
|
565
|
+ //
|
|
566
|
+ //
|
|
567
|
+ // let obj = {
|
|
568
|
+ // '患者姓名': name,
|
|
569
|
+ // '身份证': id_card_no,
|
|
570
|
+ // '治疗日期': time2,
|
|
571
|
+ // '结算日期': time,
|
|
572
|
+ // '结算类型': balance_accounts,
|
|
573
|
+ // '处方类型': med_type,
|
|
574
|
+ // '医疗费总额': medfee_sumamt,
|
|
575
|
+ // '基金支付金额': fund_pay_sumamt,
|
|
576
|
+ // '基金统筹金额': hifp_pay,
|
|
577
|
+ // '大额基金支付':hifob_pay,
|
|
578
|
+ // '医疗救助基金':maf_pay,
|
|
579
|
+ // '个人账户支付金额': acct_pay,
|
|
580
|
+ // '个人支付基金': psn_cash_pay,
|
|
581
|
+ // '企业补充医疗保险基金支出': hifes_pay,
|
|
582
|
+ // '居民大病保险资金支出': hifmi_pay,
|
|
583
|
+ // '费用总额':total,
|
|
584
|
+ //
|
|
585
|
+ // }
|
|
586
|
+ // list.push(obj)
|
|
587
|
+ // }
|
|
588
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
589
|
+ const tHeader = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出', '费用总额']
|
|
590
|
+ const filterVal = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出', '费用总额']
|
|
591
|
+ const data = this.formatJson(filterVal, list)
|
|
592
|
+ excel.export_json_to_excel1({
|
|
593
|
+ header: tHeader,
|
|
594
|
+ data,
|
|
595
|
+ filename: '结算明细',
|
|
596
|
+ ref:this.$refs['report-table'].$el
|
|
597
|
+ })
|
|
598
|
+ })
|
|
599
|
+
|
|
600
|
+ }, formatJson(filterVal, jsonData) {
|
|
601
|
+ return jsonData.map(v => filterVal.map(j => v[j]))
|
|
602
|
+ }
|
|
603
|
+ },
|
|
604
|
+ created() {
|
|
605
|
+ this.getSummarySettleList()
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+ }
|
|
609
|
+}
|
|
610
|
+</script>
|