|
@@ -39,6 +39,7 @@
|
39
|
39
|
@change="changeDate"
|
40
|
40
|
end-placeholder="结束日期">
|
41
|
41
|
</el-date-picker>
|
|
42
|
+ <el-button type="primary" size="small" @click="toPrint">打印</el-button>
|
42
|
43
|
</div>
|
43
|
44
|
<div>
|
44
|
45
|
</div>
|
|
@@ -54,7 +55,7 @@
|
54
|
55
|
</el-table-column>
|
55
|
56
|
<el-table-column align="center" prop="name" label="处方日期">
|
56
|
57
|
<template slot-scope="scope">
|
57
|
|
- {{getTime(scope.row.record_date)}}
|
|
58
|
+ <span v-if="scope.row.record_date > 0">{{getTimes(scope.row.record_date)}} </span>
|
58
|
59
|
</template>
|
59
|
60
|
</el-table-column>
|
60
|
61
|
<el-table-column align="center" prop="name" label="费用分类">
|
|
@@ -84,11 +85,16 @@
|
84
|
85
|
</el-table-column>
|
85
|
86
|
<el-table-column align="center" prop="name" label="金额">
|
86
|
87
|
<template slot-scope="scope">
|
87
|
|
- {{ (scope.row.price * scope.row.count).toFixed(2) }}
|
|
88
|
+ <span v-if="scope.row.is_total == 1">{{ scope.row.total }}</span>
|
|
89
|
+ <span v-if="scope.row.is_total == 2">{{ (scope.row.price * scope.row.count).toFixed(2) }}</span>
|
88
|
90
|
</template>
|
89
|
91
|
</el-table-column>
|
90
|
92
|
<el-table-column align="center" prop="name" label="医保类别">
|
91
|
|
- <template slot-scope="scope"></template>
|
|
93
|
+ <template slot-scope="scope">
|
|
94
|
+ <span v-if="scope.row.chrgitm_lv== '01'">甲类</span>
|
|
95
|
+ <span v-if="scope.row.chrgitm_lv== '02'">乙类</span>
|
|
96
|
+ <span v-if="scope.row.chrgitm_lv== '03'">自费</span>
|
|
97
|
+ </template>
|
92
|
98
|
</el-table-column>
|
93
|
99
|
|
94
|
100
|
</el-table>
|
|
@@ -163,21 +169,25 @@ export default {
|
163
|
169
|
return false
|
164
|
170
|
} else {
|
165
|
171
|
this.order = response.data.data.order
|
166
|
|
- this.order['bedCostTotal'] = response.data.data.bedCostTotal
|
167
|
|
- this.order['operationCostTotal'] = response.data.data.operationCostTotal
|
168
|
|
- this.order['otherCostTotal'] = response.data.data.otherCostTotal
|
169
|
|
- this.order['materialCostTotal'] = response.data.data.materialCostTotal
|
170
|
|
- this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
|
171
|
|
- this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
|
172
|
|
- this.order['checkCostTotal'] = response.data.data.checkCostTotal
|
173
|
|
- this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
|
174
|
|
- this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
|
175
|
|
- this.order['treatCostTotal'] = response.data.data.treatCostTotal
|
|
172
|
+ // console.log("order23323232323232332322323",response.data.data.order)
|
|
173
|
+ // for(let i=0;i<this.order.length;i++){
|
|
174
|
+ // this.order['bedCostTotal'] = response.data.data.bedCostTotal
|
|
175
|
+ // this.order['operationCostTotal'] = response.data.data.operationCostTotal
|
|
176
|
+ // this.order['otherCostTotal'] = response.data.data.otherCostTotal
|
|
177
|
+ // this.order['materialCostTotal'] = response.data.data.materialCostTotal
|
|
178
|
+ // this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
|
|
179
|
+ // this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
|
|
180
|
+ // this.order['checkCostTotal'] = response.data.data.checkCostTotal
|
|
181
|
+ // this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
|
|
182
|
+ // this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
|
|
183
|
+ // this.order['treatCostTotal'] = response.data.data.treatCostTotal
|
|
184
|
+ // }
|
|
185
|
+
|
176
|
186
|
this.patient = response.data.data.patient
|
177
|
187
|
this.admin = response.data.data.admin_info
|
178
|
188
|
this.his_hospital = response.data.data.his_hospital
|
179
|
189
|
var order_info = response.data.data.order_info
|
180
|
|
-
|
|
190
|
+ // console.log("order_info2332323232323232323",order_info)
|
181
|
191
|
if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
|
182
|
192
|
//获取所有项目类型进行去重
|
183
|
193
|
let med_chrgitm_types = []
|
|
@@ -217,12 +227,12 @@ export default {
|
217
|
227
|
|
218
|
228
|
this.list.push(newobj)
|
219
|
229
|
}else{
|
220
|
|
- console.log("hh2332322323232332232332",order_info)
|
221
|
230
|
//获取所有项目类型进行去重
|
222
|
231
|
let med_chrgitm_types = []
|
223
|
232
|
for (let i = 0; i < order_info.length; i++) {
|
224
|
233
|
med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
225
|
234
|
}
|
|
235
|
+ // console.log("med_chrgitm_types23323332233232232323232332322332233",med_chrgitm_types)
|
226
|
236
|
const obj = {}
|
227
|
237
|
med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
228
|
238
|
obj[next] ? '' : obj[next] = true && cur.push(next)
|
|
@@ -240,7 +250,7 @@ export default {
|
240
|
250
|
tempDetails.push(order_info[b])
|
241
|
251
|
}
|
242
|
252
|
}
|
243
|
|
- console.log("tempdetail2323323232322332233223",tempDetails)
|
|
253
|
+ // console.log("tempdetail2323323232322332233223",tempDetails)
|
244
|
254
|
obj.details = this.setNewData(tempDetails)
|
245
|
255
|
|
246
|
256
|
obj.total = this.getTotal(obj.details)
|
|
@@ -248,12 +258,12 @@ export default {
|
248
|
258
|
total: obj.total,
|
249
|
259
|
is_total: 1,
|
250
|
260
|
})
|
251
|
|
- console.log("obj3232232332323223",obj.details)
|
|
261
|
+ // console.log("obj3232232332323223",obj.details)
|
252
|
262
|
this.list = this.list.concat(obj.details)
|
253
|
263
|
for(let i=0;i<this.list.length;i++){
|
254
|
264
|
this.list[i].index = i+1
|
255
|
265
|
}
|
256
|
|
- console.log("list32233223233332232323232323",this.list)
|
|
266
|
+ // console.log("list32233223233332232323232323",this.list)
|
257
|
267
|
}
|
258
|
268
|
}
|
259
|
269
|
}
|
|
@@ -278,7 +288,7 @@ export default {
|
278
|
288
|
return project_name
|
279
|
289
|
},
|
280
|
290
|
setNewData(details) {
|
281
|
|
- console.log("detail233223233223",details)
|
|
291
|
+ // console.log("detail233223233223",details)
|
282
|
292
|
let drug_ids = []
|
283
|
293
|
let project_ids = []
|
284
|
294
|
|
|
@@ -301,9 +311,12 @@ export default {
|
301
|
311
|
}
|
302
|
312
|
|
303
|
313
|
}
|
304
|
|
-
|
|
314
|
+ // console.log("drug_ids232332322323",drug_ids)
|
|
315
|
+ // console.log("project_ids2323232332",project_ids)
|
305
|
316
|
let new_drug_ids = this.unique(drug_ids)
|
306
|
317
|
let new_project_ids = this.unique(project_ids)
|
|
318
|
+ // console.log("new23233232332322323323232",new_drug_ids)
|
|
319
|
+ // console.log("new_project_ids2332332323",new_project_ids)
|
307
|
320
|
let list = []
|
308
|
321
|
if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
|
309
|
322
|
for (let i = 0; i < new_drug_ids.length; i++) {
|
|
@@ -319,14 +332,16 @@ export default {
|
319
|
332
|
obj['price'] = parseFloat(details[a].pric)
|
320
|
333
|
obj['is_total'] = 2
|
321
|
334
|
obj['record_date'] = details[a].advice.record_date
|
|
335
|
+ obj['chrgitm_lv'] = details[a].chrgitm_lv
|
322
|
336
|
count = count + details[a].cnt
|
323
|
337
|
}
|
324
|
338
|
}
|
325
|
339
|
obj['count'] = count
|
326
|
340
|
list.push(obj)
|
|
341
|
+
|
327
|
342
|
}
|
328
|
343
|
}
|
329
|
|
-
|
|
344
|
+ // console.log("list我的2323232323233223322332",list)
|
330
|
345
|
if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
|
331
|
346
|
for (let i = 0; i < new_project_ids.length; i++) {
|
332
|
347
|
let obj = {}
|
|
@@ -348,6 +363,7 @@ export default {
|
348
|
363
|
obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
|
349
|
364
|
obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
|
350
|
365
|
obj['price'] = parseFloat(details[a].pric)
|
|
366
|
+ obj['chrgitm_lv'] = details[a].chrgitm_lv
|
351
|
367
|
obj['is_total'] = 2
|
352
|
368
|
|
353
|
369
|
count = count + details[a].cnt
|
|
@@ -355,8 +371,65 @@ export default {
|
355
|
371
|
}
|
356
|
372
|
obj['count'] = count
|
357
|
373
|
list.push(obj)
|
|
374
|
+
|
358
|
375
|
}
|
359
|
376
|
}
|
|
377
|
+
|
|
378
|
+ if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
|
|
379
|
+ for (let i = 0; i < new_drug_ids.length; i++) {
|
|
380
|
+ let obj = {}
|
|
381
|
+ let count = 0
|
|
382
|
+ for (let a = 0; a < details.length; a++) {
|
|
383
|
+ if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
|
|
384
|
+ obj['name'] = details[a].advice.advice_name
|
|
385
|
+ obj['spec'] = details[a].advice.drug.dose + details[a].advice.drug.dose_unit+"*" + details[a].advice.drug.min_number + details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
|
|
386
|
+ obj['unit'] = details[a].advice.drug.min_unit
|
|
387
|
+ obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
|
|
388
|
+ obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
|
|
389
|
+ obj['price'] = parseFloat(details[a].pric)
|
|
390
|
+ obj['is_total'] = 2
|
|
391
|
+ obj['record_date'] = details[a].advice.record_date
|
|
392
|
+ obj['chrgitm_lv'] = details[a].chrgitm_lv
|
|
393
|
+ count = count + details[a].cnt
|
|
394
|
+ }
|
|
395
|
+ }
|
|
396
|
+ obj['count'] = count
|
|
397
|
+ list.push(obj)
|
|
398
|
+
|
|
399
|
+ }
|
|
400
|
+
|
|
401
|
+ for (let i = 0; i < new_project_ids.length; i++) {
|
|
402
|
+ let obj = {}
|
|
403
|
+ let count = 0
|
|
404
|
+ for (let a = 0; a < details.length; a++) {
|
|
405
|
+ if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
|
|
406
|
+ // console.log("hhha23322332233232332",details[a].project)
|
|
407
|
+ if( details[a].project.type == 2){
|
|
408
|
+ obj['name'] = details[a].project.project.project_name
|
|
409
|
+ obj['spec'] = ''
|
|
410
|
+ obj['unit'] = details[a].project.project.unit
|
|
411
|
+
|
|
412
|
+ }else if(details[a].project.type == 3){
|
|
413
|
+ obj['name'] = details[a].project.good_info.good_name
|
|
414
|
+ obj['spec'] = ''
|
|
415
|
+ obj['unit'] = details[a].project.good_info.packing_unit
|
|
416
|
+ }
|
|
417
|
+ obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
|
|
418
|
+ obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
|
|
419
|
+ obj['price'] = parseFloat(details[a].pric)
|
|
420
|
+ obj['is_total'] = 2
|
|
421
|
+ obj['record_date'] = details[a].project.record_date
|
|
422
|
+ obj['chrgitm_lv'] = details[a].chrgitm_lv
|
|
423
|
+ count = count + details[a].cnt
|
|
424
|
+ }
|
|
425
|
+ }
|
|
426
|
+ obj['count'] = count
|
|
427
|
+ list.push(obj)
|
|
428
|
+
|
|
429
|
+ }
|
|
430
|
+ }
|
|
431
|
+
|
|
432
|
+ // console.log("list我的2323232323233223322332",list)
|
360
|
433
|
return list
|
361
|
434
|
},
|
362
|
435
|
|
|
@@ -459,12 +532,25 @@ export default {
|
459
|
532
|
return total.toFixed(2)
|
460
|
533
|
},
|
461
|
534
|
getTimes(time) {
|
462
|
|
- return uParseTime(time, '{y}-{m}-{d}')
|
|
535
|
+ if(time < 0){
|
|
536
|
+ return ""
|
|
537
|
+ }else{
|
|
538
|
+ return uParseTime(time, '{y}-{m}-{d}')
|
|
539
|
+ }
|
463
|
540
|
},
|
|
541
|
+ toPrint(){
|
|
542
|
+ 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})
|
|
543
|
+ }
|
464
|
544
|
},
|
465
|
545
|
created() {
|
466
|
546
|
this.getGatherDetailList()
|
467
|
547
|
|
|
548
|
+ },
|
|
549
|
+ watch:{
|
|
550
|
+ "patient_id":function(){
|
|
551
|
+ this.patient_id = this.patient_id
|
|
552
|
+ this.getHisSummaryDetailList()
|
|
553
|
+ }
|
468
|
554
|
}
|
469
|
555
|
}
|
470
|
556
|
</script>
|