|
@@ -91,17 +91,17 @@
|
91
|
91
|
|
92
|
92
|
<div>
|
93
|
93
|
|
94
|
|
- <el-button v-loading="loadingtwo"
|
95
|
|
- v-if="(this.activeName == 'first' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 && this.order.id == 0)"
|
96
|
|
- size="small"
|
97
|
|
- @click="open(30)"
|
98
|
|
- type="primary">上传费用明细
|
99
|
|
- </el-button>
|
|
94
|
+<!-- <el-button v-loading="loadingtwo"-->
|
|
95
|
+<!-- v-if="(this.activeName != 'third' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 && this.order.id == 0)"-->
|
|
96
|
+<!-- size="small"-->
|
|
97
|
+<!-- @click="open(30)"-->
|
|
98
|
+<!-- type="primary">上传费用明细-->
|
|
99
|
+<!-- </el-button>-->
|
100
|
100
|
|
101
|
101
|
|
102
|
102
|
|
103
|
103
|
<el-button v-loading="loadingtwo"
|
104
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 && this.order.id == 0)"
|
|
104
|
+ v-if="(( isShowUpload == 2 && this.activeName != 'third' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 && this.order.id == 0))"
|
105
|
105
|
size="small"
|
106
|
106
|
@click="open(8)"
|
107
|
107
|
type="primary">上传费用明细
|
|
@@ -109,14 +109,14 @@
|
109
|
109
|
|
110
|
110
|
<!--<el-button size="small" @click="open(1)" type="primary">打印</el-button>-->
|
111
|
111
|
<el-button v-loading="loadingone" size="small"
|
112
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
|
112
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
113
|
113
|
|
114
|
114
|
@click="open(2)"
|
115
|
115
|
type="primary">出院
|
116
|
116
|
</el-button>
|
117
|
117
|
|
118
|
118
|
<el-button v-loading="loadingone" size="small"
|
119
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
|
119
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
120
|
120
|
|
121
|
121
|
@click="open(2)"
|
122
|
122
|
type="primary">出院
|
|
@@ -124,56 +124,56 @@
|
124
|
124
|
|
125
|
125
|
|
126
|
126
|
<el-button v-loading="loadingtwo"
|
127
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1) || (this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 1) || (this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 3)"
|
|
127
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1) || (this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 1) || (this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status == 3)"
|
128
|
128
|
size="small"
|
129
|
129
|
@click="open(3)"
|
130
|
130
|
type="primary">收费
|
131
|
131
|
</el-button>
|
132
|
132
|
|
133
|
133
|
<el-button v-loading="loadingtwo"
|
134
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status != 2)"
|
|
134
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1 && this.order.order_status != 2)"
|
135
|
135
|
size="small"
|
136
|
136
|
@click="open(3)"
|
137
|
137
|
type="primary">收费
|
138
|
138
|
</el-button>
|
139
|
139
|
|
140
|
140
|
<el-button size="small" @click="open(4)" type="primary"
|
141
|
|
- v-if="this.activeName != 'first' &&this.hisPatientInfo.id > 0 && this.order.id > 0 && this.order.order_status == 2">
|
|
141
|
+ v-if="this.activeName == 'third' &&this.hisPatientInfo.id > 0 && this.order.id > 0 && this.order.order_status == 2">
|
142
|
142
|
退费
|
143
|
143
|
</el-button>
|
144
|
|
- <el-button v-if="this.activeName != 'first' &&this.order.order_status == 2" size="small" @click="open(5)" type="primary"
|
|
144
|
+ <el-button v-if="this.activeName == 'third' &&this.order.order_status == 2" size="small" @click="open(5)" type="primary"
|
145
|
145
|
>结算单
|
146
|
146
|
</el-button>
|
147
|
147
|
|
148
|
148
|
<el-button
|
149
|
|
- v-if="(this.activeName == 'first' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
|
149
|
+ v-if="( isShowUpload == 1 && this.activeName != 'third' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
150
|
150
|
|
151
|
151
|
size="small" @click="open(9)" type="primary"
|
152
|
152
|
>撤销明细
|
153
|
153
|
</el-button>
|
154
|
154
|
|
155
|
|
- <el-button
|
156
|
|
- v-if="(this.activeName != 'first' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
|
155
|
+<!-- <el-button-->
|
|
156
|
+<!-- v-if="(this.activeName != 'third' && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"-->
|
157
|
157
|
|
158
|
|
- size="small" @click="open(9)" type="primary"
|
159
|
|
- >撤销明细
|
160
|
|
- </el-button>
|
|
158
|
+<!-- size="small" @click="open(9)" type="primary"-->
|
|
159
|
+<!-- >撤销明细-->
|
|
160
|
+<!-- </el-button>-->
|
161
|
161
|
|
162
|
162
|
<el-button
|
163
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1)"
|
|
163
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 1)"
|
164
|
164
|
size="small" @click="open(6)" type="primary"
|
165
|
165
|
>撤销出院
|
166
|
166
|
</el-button>
|
167
|
167
|
|
168
|
168
|
<el-button
|
169
|
|
- v-if="(this.activeName != 'first' &&this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
|
169
|
+ v-if="(this.activeName == 'third' &&this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
|
170
|
170
|
size="small" @click="open(7)" type="primary"
|
171
|
171
|
>撤销入院
|
172
|
172
|
</el-button>
|
173
|
|
- <el-button
|
174
|
|
- size="small" @click="invoicePrint" type="primary"
|
175
|
|
- >发票打印
|
176
|
|
- </el-button>
|
|
173
|
+<!-- <el-button-->
|
|
174
|
+<!-- size="small" @click="invoicePrint" type="primary"-->
|
|
175
|
+<!-- >发票打印-->
|
|
176
|
+<!-- </el-button>-->
|
177
|
177
|
</div>
|
178
|
178
|
|
179
|
179
|
|
|
@@ -251,7 +251,7 @@
|
251
|
251
|
</ul>
|
252
|
252
|
<p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>
|
253
|
253
|
<div style="display:flex;justify-content: space-between;line-height:30px;">
|
254
|
|
- <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number}}</span>
|
|
254
|
+ <span style="font-size:14px;">住院编号:{{ hisPatientInfo.number}}</span>
|
255
|
255
|
</div>
|
256
|
256
|
<ul class="basicUl">
|
257
|
257
|
<li style="width:50%;">医生:{{ info.doctor }}</li>
|
|
@@ -356,6 +356,69 @@
|
356
|
356
|
</div>
|
357
|
357
|
</div>
|
358
|
358
|
</el-tab-pane>
|
|
359
|
+ <el-tab-pane label="结算" name="third">
|
|
360
|
+ <div style="display:flex;height:100%;">
|
|
361
|
+ <div class="centerLeft">
|
|
362
|
+ <div class="tabsBox">
|
|
363
|
+ <!-- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button> -->
|
|
364
|
+ <el-tabs class="preTabs" v-model="editSettletableTabsValue" type="border-card"
|
|
365
|
+ @tab-click="tabclickEventThree">
|
|
366
|
+
|
|
367
|
+ <el-tab-pane
|
|
368
|
+ v-for="(item, index) in settle_prescriptions"
|
|
369
|
+ :key="index"
|
|
370
|
+ :label="item.name"
|
|
371
|
+ :name="item.name">
|
|
372
|
+ </el-tab-pane>
|
|
373
|
+ <settle-prescription-table
|
|
374
|
+ :prescription="curSettlePrescriptions"
|
|
375
|
+ ></settle-prescription-table>
|
|
376
|
+
|
|
377
|
+<!-- <charge-month-prescription-table-->
|
|
378
|
+<!-- :prescription="curMonthPrescriptions"></charge-month-prescription-table>-->
|
|
379
|
+
|
|
380
|
+ </el-tabs>
|
|
381
|
+
|
|
382
|
+ </div>
|
|
383
|
+ <div class="costBox">
|
|
384
|
+ <span>当前处方总费用:<span style="color:red;">{{ settle_total }}元</span></span>
|
|
385
|
+ <!--<span>{{ state }}</span>-->
|
|
386
|
+ </div>
|
|
387
|
+ </div>
|
|
388
|
+<!-- <div class="centerRight">-->
|
|
389
|
+<!-- <p class="centerRightTitle">人员信息</p>-->
|
|
390
|
+<!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
|
|
391
|
+<!-- <span style="font-size:14px;">人员编码:{{patientInfo.dialysis_no}}</span>-->
|
|
392
|
+<!-- <span style="font-size:14px;">日期:{{record_date}}</span>-->
|
|
393
|
+<!-- </div>-->
|
|
394
|
+
|
|
395
|
+<!-- <ul class="basicUl">-->
|
|
396
|
+<!-- <li style="width:50%;">姓名:{{patientInfo.name}}</li>-->
|
|
397
|
+<!-- <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>-->
|
|
398
|
+<!-- <li style="width:50%;">年龄:{{patientInfo.age }}</li>-->
|
|
399
|
+<!-- <li style="width:50%;">电话:{{patientInfo.phone}}</li>-->
|
|
400
|
+<!-- <li style="width:100%;">过敏史及其他病史:{{info.sick_history}}</li>-->
|
|
401
|
+
|
|
402
|
+<!-- </ul>-->
|
|
403
|
+<!-- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>-->
|
|
404
|
+<!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
|
|
405
|
+<!-- <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number}}</span>-->
|
|
406
|
+<!-- </div>-->
|
|
407
|
+<!-- <ul class="basicUl">-->
|
|
408
|
+<!-- <li style="width:50%;">医生:{{ info.doctor }}</li>-->
|
|
409
|
+<!-- <li style="width:50%;">科室:{{ getDepartment(info.departments) }}</li>-->
|
|
410
|
+<!-- <li style="width:100%;" v-if="activeName == 'first'">总费用:{{ getTotal() }}</li>-->
|
|
411
|
+<!-- <li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}-->
|
|
412
|
+<!-- </li>-->
|
|
413
|
+
|
|
414
|
+<!-- <li style="width:100%;">判断结果:{{info.diagnosis}}</li>-->
|
|
415
|
+<!-- <!–<li style="width:100%;">是否有传染病:</li>–>-->
|
|
416
|
+<!-- <!–<li style="width:100%;">血压:</li>–>-->
|
|
417
|
+<!-- </ul>-->
|
|
418
|
+<!-- </div>-->
|
|
419
|
+ </div>
|
|
420
|
+ </el-tab-pane>
|
|
421
|
+
|
359
|
422
|
</el-tabs>
|
360
|
423
|
|
361
|
424
|
|
|
@@ -444,10 +507,12 @@
|
444
|
507
|
import RegisterDialog9504 from './components/registerDialog9504'
|
445
|
508
|
import ChargePrescriptionTable from './components/ChargePrescriptionTable'
|
446
|
509
|
import invoicePrint from './invoicePrint'
|
|
510
|
+ import SettlePrescriptionTable from './components/settlePrescriptionTable'
|
447
|
511
|
|
448
|
512
|
const moment = require('moment')
|
449
|
513
|
export default {
|
450
|
514
|
components: {
|
|
515
|
+ SettlePrescriptionTable,
|
451
|
516
|
ChargePrescriptionTable,
|
452
|
517
|
RegisterDialog9504,
|
453
|
518
|
NewStatementPrintTwo,
|
|
@@ -484,6 +549,10 @@
|
484
|
549
|
p_type: '',
|
485
|
550
|
sick_type: '',
|
486
|
551
|
diagnosis: '',
|
|
552
|
+ isShowUpload:1,
|
|
553
|
+ isShowWithdrawUpload:1,
|
|
554
|
+
|
|
555
|
+
|
487
|
556
|
|
488
|
557
|
month_p_type: '',
|
489
|
558
|
month_sick_type: '',
|
|
@@ -492,6 +561,8 @@
|
492
|
561
|
other_start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
493
|
562
|
other_end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
|
494
|
563
|
curMonthPrescriptions: null,
|
|
564
|
+ curSettlePrescriptions: null,
|
|
565
|
+
|
495
|
566
|
month_total: 0,
|
496
|
567
|
crumbs: [
|
497
|
568
|
{ path: false, name: '住院工作站' },
|
|
@@ -508,10 +579,17 @@
|
508
|
579
|
curPrescriptions: {},
|
509
|
580
|
prescriptions: [],
|
510
|
581
|
month_prescriptions: [],
|
|
582
|
+ settle_prescriptions: [],
|
|
583
|
+
|
|
584
|
+ settle_total:0,
|
|
585
|
+
|
511
|
586
|
|
512
|
587
|
record_date: '',
|
513
|
588
|
tableData: [],
|
514
|
589
|
editableTabsValue: '处方1',
|
|
590
|
+
|
|
591
|
+ editSettletableTabsValue: '处方1',
|
|
592
|
+
|
515
|
593
|
loadingone: false,
|
516
|
594
|
editableTabs: [{
|
517
|
595
|
title: '处方1',
|
|
@@ -1127,6 +1205,9 @@
|
1127
|
1205
|
// this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
|
1128
|
1206
|
// }
|
1129
|
1207
|
|
|
1208
|
+ } else{
|
|
1209
|
+
|
|
1210
|
+ console.log(this.settle_prescriptions)
|
1130
|
1211
|
}
|
1131
|
1212
|
|
1132
|
1213
|
},
|
|
@@ -1186,6 +1267,19 @@
|
1186
|
1267
|
this.month_total = 0
|
1187
|
1268
|
this.month_total = this.getMonthTotalOne()
|
1188
|
1269
|
|
|
1270
|
+ },tabclickEventThree(val) {
|
|
1271
|
+ for (let i = 0; i < this.settle_prescriptions.length; i++) {
|
|
1272
|
+ if (this.settle_prescriptions[i].name == val.name) {
|
|
1273
|
+
|
|
1274
|
+ this.curSettlePrescriptions = {}
|
|
1275
|
+ var temp = this.deepClone(this.settle_prescriptions[i])
|
|
1276
|
+ this.curSettlePrescriptions = temp
|
|
1277
|
+ }
|
|
1278
|
+ }
|
|
1279
|
+ this.prescription_id = this.settle_prescriptions.id
|
|
1280
|
+ this.settle_total = 0
|
|
1281
|
+ this.settle_total = this.getSettleTotalOne()
|
|
1282
|
+
|
1189
|
1283
|
},
|
1190
|
1284
|
tabclickEvent(val) {
|
1191
|
1285
|
console.log('val', val.name)
|
|
@@ -1256,6 +1350,26 @@
|
1256
|
1350
|
|
1257
|
1351
|
return total.toFixed(2)
|
1258
|
1352
|
|
|
1353
|
+ },getSettleTotalOne() {
|
|
1354
|
+ var total = 0
|
|
1355
|
+ if (this.curSettlePrescriptions.type == 1) {
|
|
1356
|
+ if (this.curSettlePrescriptions.advices != null) {
|
|
1357
|
+ for (let a = 0; a < this.curSettlePrescriptions.advices.length; a++) {
|
|
1358
|
+ total = parseFloat(total) + parseFloat(this.curSettlePrescriptions.advices[a].retail_price * this.curSettlePrescriptions.advices[a].prescribing_number)
|
|
1359
|
+
|
|
1360
|
+ }
|
|
1361
|
+ }
|
|
1362
|
+ } else {
|
|
1363
|
+ if (this.curSettlePrescriptions.project != null) {
|
|
1364
|
+ for (let b = 0; b < this.curSettlePrescriptions.project.length; b++) {
|
|
1365
|
+ total = parseFloat(total) + parseFloat(this.curSettlePrescriptions.project[b].price * this.curSettlePrescriptions.project[b].total)
|
|
1366
|
+
|
|
1367
|
+ }
|
|
1368
|
+ }
|
|
1369
|
+ }
|
|
1370
|
+
|
|
1371
|
+ return total.toFixed(2)
|
|
1372
|
+
|
1259
|
1373
|
},
|
1260
|
1374
|
getTotal() {
|
1261
|
1375
|
var total = 0
|
|
@@ -2634,7 +2748,151 @@
|
2634
|
2748
|
|
2635
|
2749
|
this.curMonthPrescriptions = this.month_prescriptions[0]
|
2636
|
2750
|
|
2637
|
|
- }, unique_two(array) {
|
|
2751
|
+ },
|
|
2752
|
+ setSettlePrescription(month_prescriptions) {
|
|
2753
|
+ this.settle_prescriptions = []
|
|
2754
|
+
|
|
2755
|
+ let drug_month_prescriptions = {
|
|
2756
|
+ advices: []
|
|
2757
|
+ }
|
|
2758
|
+ let drug_ids = []
|
|
2759
|
+ let project_month_prescriptions = {
|
|
2760
|
+ project: []
|
|
2761
|
+
|
|
2762
|
+ }
|
|
2763
|
+ let project_ids = []
|
|
2764
|
+
|
|
2765
|
+ let addition_month_prescriptions = {
|
|
2766
|
+ addition: []
|
|
2767
|
+
|
|
2768
|
+ }
|
|
2769
|
+ let additions_ids = []
|
|
2770
|
+
|
|
2771
|
+ for (let i = 0; i < month_prescriptions.length; i++) {
|
|
2772
|
+ if (month_prescriptions[i].type == 1) { //药品
|
|
2773
|
+ for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
|
|
2774
|
+ let obj = {
|
|
2775
|
+ id: month_prescriptions[i].advices[a].drug_id,
|
|
2776
|
+ price: month_prescriptions[i].advices[a].price
|
|
2777
|
+
|
|
2778
|
+ }
|
|
2779
|
+ drug_ids.push(obj)
|
|
2780
|
+ // drug_ids.push(month_prescriptions[i].advices[a].drug_id)
|
|
2781
|
+
|
|
2782
|
+ drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
|
|
2783
|
+ }
|
|
2784
|
+
|
|
2785
|
+ } else if (month_prescriptions[i].type == 2) { //项目
|
|
2786
|
+ for (let a = 0; a < month_prescriptions[i].project.length; a++) {
|
|
2787
|
+ let obj = {
|
|
2788
|
+ id: month_prescriptions[i].project[a].project_id,
|
|
2789
|
+ price: month_prescriptions[i].project[a].price
|
|
2790
|
+
|
|
2791
|
+ }
|
|
2792
|
+ project_ids.push(obj)
|
|
2793
|
+ project_month_prescriptions.project.push(month_prescriptions[i].project[a])
|
|
2794
|
+ }
|
|
2795
|
+ }
|
|
2796
|
+
|
|
2797
|
+
|
|
2798
|
+ }
|
|
2799
|
+
|
|
2800
|
+ drug_ids = this.unique_two(drug_ids)
|
|
2801
|
+ project_ids = this.unique_two(project_ids)
|
|
2802
|
+ additions_ids = this.unique_two(additions_ids)
|
|
2803
|
+
|
|
2804
|
+ let drugs = []
|
|
2805
|
+ let projects = []
|
|
2806
|
+ let additions = []
|
|
2807
|
+
|
|
2808
|
+ for (let i = 0; i < drug_ids.length; i++) {
|
|
2809
|
+ let obj = {}
|
|
2810
|
+ let count = 0
|
|
2811
|
+ for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
|
|
2812
|
+ if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
|
|
2813
|
+
|
|
2814
|
+ obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
|
|
2815
|
+ obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
|
|
2816
|
+ obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
|
|
2817
|
+ obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
|
|
2818
|
+ obj['day'] = drug_month_prescriptions.advices[a].day
|
|
2819
|
+ // obj['prescribing_number'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
|
|
2820
|
+ obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
|
|
2821
|
+ obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
|
|
2822
|
+ obj['id'] = drug_month_prescriptions.advices[a].drug_id
|
|
2823
|
+ // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
|
|
2824
|
+ obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
|
|
2825
|
+ count = count + drug_month_prescriptions.advices[a].prescribing_number
|
|
2826
|
+
|
|
2827
|
+ }
|
|
2828
|
+ }
|
|
2829
|
+ obj['prescribing_number'] = count
|
|
2830
|
+ drugs.push(obj)
|
|
2831
|
+ }
|
|
2832
|
+
|
|
2833
|
+ for (let i = 0; i < project_ids.length; i++) {
|
|
2834
|
+ let obj = {}
|
|
2835
|
+ let count = 0
|
|
2836
|
+ for (let a = 0; a < project_month_prescriptions.project.length; a++) {
|
|
2837
|
+ if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
|
|
2838
|
+
|
|
2839
|
+ if (project_month_prescriptions.project[a].type == 2) {
|
|
2840
|
+ obj['statistical_classification'] = ''
|
|
2841
|
+ obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
|
|
2842
|
+ obj['project_name'] = project_month_prescriptions.project[a].project.project_name
|
|
2843
|
+ obj['type'] = 2
|
|
2844
|
+
|
|
2845
|
+ } else if (project_month_prescriptions.project[a].type == 3) {
|
|
2846
|
+ obj['statistical_classification'] = ''
|
|
2847
|
+ obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
|
|
2848
|
+ obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
|
|
2849
|
+ obj['type'] = 3
|
|
2850
|
+
|
|
2851
|
+ }
|
|
2852
|
+
|
|
2853
|
+ // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
|
|
2854
|
+ // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
|
|
2855
|
+ obj['single_dose'] = project_month_prescriptions.project[a].single_dose
|
|
2856
|
+ obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
|
|
2857
|
+ obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
|
|
2858
|
+ obj['number_days'] = project_month_prescriptions.project[a].day
|
|
2859
|
+ // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
|
|
2860
|
+ obj['unit'] = project_month_prescriptions.project[a].unit
|
|
2861
|
+ obj['project_id'] = project_month_prescriptions.project[a].project_id
|
|
2862
|
+ count = count + parseFloat(project_month_prescriptions.project[a].count)
|
|
2863
|
+ // price = price + project_month_prescriptions.project[a].price
|
|
2864
|
+ obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
|
|
2865
|
+
|
|
2866
|
+ }
|
|
2867
|
+ }
|
|
2868
|
+ obj['total'] = count
|
|
2869
|
+ projects.push(obj)
|
|
2870
|
+ }
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+ let p1 = {
|
|
2874
|
+ name: '处方' + 1,
|
|
2875
|
+ advices: drugs,
|
|
2876
|
+ project: [],
|
|
2877
|
+ type: 1,
|
|
2878
|
+ addition: additions
|
|
2879
|
+ }
|
|
2880
|
+ let p2 = {
|
|
2881
|
+ name: '处方' + 2,
|
|
2882
|
+ type: 2,
|
|
2883
|
+ project: projects,
|
|
2884
|
+ advices: [],
|
|
2885
|
+ addition: []
|
|
2886
|
+ }
|
|
2887
|
+
|
|
2888
|
+ this.settle_prescriptions.push(p1)
|
|
2889
|
+ this.settle_prescriptions.push(p2)
|
|
2890
|
+
|
|
2891
|
+ this.curSettlePrescriptions = this.settle_prescriptions[0]
|
|
2892
|
+
|
|
2893
|
+ },
|
|
2894
|
+
|
|
2895
|
+ unique_two(array) {
|
2638
|
2896
|
// res用来存储结果
|
2639
|
2897
|
var res = []
|
2640
|
2898
|
for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
|
|
@@ -2706,6 +2964,8 @@
|
2706
|
2964
|
this.month_prescriptions = []
|
2707
|
2965
|
this.curPrescriptions = {}
|
2708
|
2966
|
this.curMonthPrescriptions = {}
|
|
2967
|
+ this.settle_prescriptions = []
|
|
2968
|
+ this.curSettlePrescriptions = {}
|
2709
|
2969
|
|
2710
|
2970
|
this.loading = false
|
2711
|
2971
|
this.patientInfo = response.data.data.xt_info
|
|
@@ -2745,6 +3005,8 @@
|
2745
|
3005
|
}
|
2746
|
3006
|
this.addtions_charge = response.data.data.addtions_charge
|
2747
|
3007
|
this.setMonthPrescription(response.data.data.month_prescriptions)
|
|
3008
|
+ this.setSettlePrescription(response.data.data.settle_prescriptions)
|
|
3009
|
+
|
2748
|
3010
|
if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
|
2749
|
3011
|
this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
|
2750
|
3012
|
} else {
|
|
@@ -2845,6 +3107,13 @@
|
2845
|
3107
|
}
|
2846
|
3108
|
this.prescriptions.push(obj)
|
2847
|
3109
|
|
|
3110
|
+ for(let i = 0; i < this.prescriptions.length; i++){
|
|
3111
|
+ if(this.prescriptions[i].order_status != 4){
|
|
3112
|
+ this.isShowUpload = 2
|
|
3113
|
+ }
|
|
3114
|
+
|
|
3115
|
+ }
|
|
3116
|
+
|
2848
|
3117
|
}
|
2849
|
3118
|
|
2850
|
3119
|
if (this.prescriptions.length > 0) {
|
|
@@ -2860,6 +3129,8 @@
|
2860
|
3129
|
this.total = 0
|
2861
|
3130
|
this.total = this.getTotalOne()
|
2862
|
3131
|
this.month_total = this.getMonthTotalOne()
|
|
3132
|
+ this.settle_total = this.getSettleTotalOne()
|
|
3133
|
+
|
2863
|
3134
|
|
2864
|
3135
|
}
|
2865
|
3136
|
})
|