|
@@ -17,15 +17,15 @@
|
17
|
17
|
</div>
|
18
|
18
|
<!-- v-if="prescriptions[index].med_type == '1112'" -->
|
19
|
19
|
<div class="printTitle" v-else>
|
20
|
|
- <div style="font-size: 14px;font-weight: normal;text-align: right;"
|
|
20
|
+ <div style="font-size: 14px;font-weight: normal;text-align: right;"
|
21
|
21
|
v-if="prescriptions[index].med_type == '1112'">(精二)
|
22
|
22
|
</div>
|
23
|
23
|
<span>{{ orgname }}处方笺</span>
|
24
|
24
|
</div>
|
25
|
25
|
<!-- 非精神处方 -->
|
26
|
|
- <div style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
|
|
26
|
+ <div style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
|
27
|
27
|
v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
|
28
|
|
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
|
|
28
|
+ <div style="display: flex;line-height: 24px;padding: 0 10px;">
|
29
|
29
|
<div style="flex: 1;">
|
30
|
30
|
NO:
|
31
|
31
|
</div>
|
|
@@ -48,7 +48,7 @@
|
48
|
48
|
</span> -->
|
49
|
49
|
</div>
|
50
|
50
|
</div>
|
51
|
|
- <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
|
|
51
|
+ <div style="display: flex;line-height: 24px;padding: 0 10px;">
|
52
|
52
|
<p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
|
53
|
53
|
<p style="width: 200px;">
|
54
|
54
|
性别:
|
|
@@ -65,7 +65,7 @@
|
65
|
65
|
过敏史:{{ item.patient.allergic_history }}
|
66
|
66
|
</div>
|
67
|
67
|
</div>
|
68
|
|
- <div style="flex: 2;margin: 10px 0;">住址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
|
|
68
|
+ <div style="line-height: 24px;padding: 0 10px;">住址/电话:{{ item.patient.home_address }} <span>{{ item.patient.phone }}</span></div>
|
69
|
69
|
</div>
|
70
|
70
|
<!-- 精二 -->
|
71
|
71
|
<div style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;"
|
|
@@ -77,7 +77,7 @@
|
77
|
77
|
) }}</div>
|
78
|
78
|
<div style="flex: 1;">日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</div>
|
79
|
79
|
</div>
|
80
|
|
-
|
|
80
|
+
|
81
|
81
|
<div style="display: flex;padding: 0 10px;">
|
82
|
82
|
<p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
|
83
|
83
|
<p style="width: 200px;">
|
|
@@ -110,7 +110,7 @@
|
110
|
110
|
</div>
|
111
|
111
|
</div>
|
112
|
112
|
|
113
|
|
- <div class="prescriptionBox" style="height: 300px;">
|
|
113
|
+ <div class="prescriptionBox" style="min-height: 300px;">
|
114
|
114
|
<div class="Rp">Rp:</div>
|
115
|
115
|
<div
|
116
|
116
|
class="drugsBox"
|
|
@@ -119,7 +119,7 @@
|
119
|
119
|
>
|
120
|
120
|
<template v-if="index==yi+1&&item.advices.length>5">
|
121
|
121
|
<!-- 非精神处方 -->
|
122
|
|
- <div style="margin: 20px 0px; border-bottom: 1px solid black;border-top: 1px solid black;"
|
|
122
|
+ <div style="margin: 20px 0px; border-bottom: 1px solid black;border-top: 1px solid black;"
|
123
|
123
|
v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
|
124
|
124
|
<div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
|
125
|
125
|
<div style="flex: 1;">
|
|
@@ -162,7 +162,7 @@
|
162
|
162
|
<div style="display: flex;">
|
163
|
163
|
<div style="flex: 1;">处方编号:</div>
|
164
|
164
|
<div style="flex: 1;">日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</div>
|
165
|
|
- </div>
|
|
165
|
+ </div>
|
166
|
166
|
<div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
|
167
|
167
|
<p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
|
168
|
168
|
<p style="width: 200px;">
|
|
@@ -188,7 +188,7 @@
|
188
|
188
|
</div>
|
189
|
189
|
</template>
|
190
|
190
|
<div style="position: relative;">
|
191
|
|
- <div v-if="it.arr !== undefined">
|
|
191
|
+ <div v-if="it.arr != ''">
|
192
|
192
|
<div class="drugsOne" :style="{'border-right':it.arr.length>0 ? '1px solid black': 'none','width':'80%'}">
|
193
|
193
|
<span style="font-weight: bold" >
|
194
|
194
|
{{ index + 1 + "."}}
|
|
@@ -200,16 +200,32 @@
|
200
|
200
|
</span>
|
201
|
201
|
<div>
|
202
|
202
|
<template>
|
|
203
|
+ <!-- <div v-if="it.arr.length<2">
|
|
204
|
+ <div>
|
|
205
|
+ <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>
|
|
206
|
+ <span >
|
|
207
|
+ {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }} * {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
|
|
208
|
+ {{it.arr[0].drug.max_unit}}
|
|
209
|
+ </span>
|
|
210
|
+ </div>
|
|
211
|
+ <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
|
|
212
|
+ 共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
|
|
213
|
+ </div>
|
|
214
|
+ </div> -->
|
203
|
215
|
<div>
|
204
|
|
- <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>
|
205
|
|
- <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
|
206
|
|
- <span >
|
207
|
|
- {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }} * {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
|
208
|
|
- {{it.arr[0].drug.max_unit}}
|
209
|
|
- </span>
|
210
|
|
- </div>
|
211
|
|
- <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
|
212
|
|
- 共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
|
|
216
|
+ <div v-for="(ites,ins) in it.arr" :key="ins">
|
|
217
|
+ <div>
|
|
218
|
+ <span style="margin-left: 38px;">{{ites[0].advice_name ? ites[0].advice_name : ""}}</span>
|
|
219
|
+ <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
|
|
220
|
+ <span >
|
|
221
|
+ {{ ites[0].drug.dose }}{{ ites[0].drug.dose_unit }} * {{ ites[0].drug.min_number }}{{ ites[0].drug.min_unit }}/
|
|
222
|
+ {{ites[0].drug.max_unit}}
|
|
223
|
+ </span>
|
|
224
|
+ </div>
|
|
225
|
+ <div :style="{display: 'inline-block',position: 'absolute',left:'85%',top:((ins+1)*20)+'px','margin-left': '5px'}" >
|
|
226
|
+ 共{{ ites[0].single_dose }}{{ ites[0].single_dose_unit }}
|
|
227
|
+ </div>
|
|
228
|
+ </div>
|
213
|
229
|
</div>
|
214
|
230
|
</template>
|
215
|
231
|
</div>
|
|
@@ -229,21 +245,33 @@
|
229
|
245
|
</div>
|
230
|
246
|
</div>
|
231
|
247
|
|
232
|
|
- <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
|
|
248
|
+ <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" v-if="it.arr.length<2">
|
|
249
|
+ × {{ it.prescribing_number}}
|
|
250
|
+ </div>
|
|
251
|
+ <div style="display: inline-block;position: absolute;left:80%;top:0px;margin-left: 5px;" v-if="it.arr.length>1">
|
233
|
252
|
× {{ it.prescribing_number}}
|
234
|
253
|
</div>
|
235
|
|
- <!-- <div> -->
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+ <div v-if="it.arr.length<2">
|
236
|
257
|
<div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
|
237
|
258
|
× {{ it.arr[0].prescribing_number}}
|
238
|
259
|
</div>
|
239
|
|
- <!-- </div> -->
|
|
260
|
+ </div>
|
|
261
|
+ <div v-else>
|
|
262
|
+ <div v-for="(ites,ins) in it.arr" :key="ins">
|
|
263
|
+ <div :style="{display: 'inline-block',position: 'absolute',left:'80%',top:((ins+1)*15)+'px','margin-left': '5px'}" >
|
|
264
|
+ × {{ ites[0].prescribing_number}}
|
|
265
|
+ </div>
|
|
266
|
+ </div>
|
|
267
|
+ </div>
|
240
|
268
|
<template>
|
241
|
269
|
<div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" >
|
242
|
270
|
共{{ it.single_dose }}{{ it.single_dose_unit }}
|
243
|
271
|
</div>
|
244
|
272
|
</template>
|
245
|
273
|
</div>
|
246
|
|
- <div v-if="it.arr === undefined">
|
|
274
|
+ <div v-if="it.arr =='' ">
|
247
|
275
|
<div class="drugsOne" >
|
248
|
276
|
<span style="font-weight: bold" >
|
249
|
277
|
{{ index + 1 + "."}}
|
|
@@ -295,7 +323,7 @@
|
295
|
323
|
</div>
|
296
|
324
|
</div>
|
297
|
325
|
<template v-if="index==yi&&item.advices.length>5">
|
298
|
|
- <div style="margin: 20px 0px;"
|
|
326
|
+ <div style="margin: 20px 0px;"
|
299
|
327
|
v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
|
300
|
328
|
<div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
|
301
|
329
|
<div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
|
|
@@ -323,13 +351,13 @@
|
323
|
351
|
<div style="flex: 1;">调配药师:</div>
|
324
|
352
|
<div style="flex: 1;">核/发药师:</div>
|
325
|
353
|
</div>
|
326
|
|
- <div style="display: flex;margin: 10px 0;">
|
|
354
|
+ <div style="display: flex;margin: 10px 0;">
|
327
|
355
|
<div style="flex: 1;">取药人:</div>
|
328
|
356
|
<div style="flex: 1;">执行人:</div>
|
329
|
357
|
<div style="flex: 1;">弃去量:</div>
|
330
|
358
|
<div style="flex: 1;">证明人:</div>
|
331
|
359
|
</div>
|
332
|
|
- <div style="display: flex;">
|
|
360
|
+ <div style="display: flex;">
|
333
|
361
|
<div style="flex: 1;">收回空安瓿或废贴批号:</div>
|
334
|
362
|
<div style="flex: 1;">发出药品批号:</div>
|
335
|
363
|
</div>
|
|
@@ -418,13 +446,13 @@
|
418
|
446
|
<div style="flex: 1;">调配药师:</div>
|
419
|
447
|
<div style="flex: 1;">核/发药师:</div>
|
420
|
448
|
</div>
|
421
|
|
- <div style="display: flex;margin: 10px 0;">
|
|
449
|
+ <div style="display: flex;margin: 10px 0;">
|
422
|
450
|
<div style="flex: 1;">取药人:</div>
|
423
|
451
|
<div style="flex: 1;">执行人:</div>
|
424
|
452
|
<div style="flex: 1;">弃去量:</div>
|
425
|
453
|
<div style="flex: 1;">证明人:</div>
|
426
|
454
|
</div>
|
427
|
|
- <div style="display: flex;">
|
|
455
|
+ <div style="display: flex;">
|
428
|
456
|
<div style="flex: 1;">收回空安瓿或废贴批号:</div>
|
429
|
457
|
<div style="flex: 1;">发出药品批号:</div>
|
430
|
458
|
</div>
|
|
@@ -452,7 +480,7 @@ export default{
|
452
|
480
|
return {
|
453
|
481
|
doc_name:"",
|
454
|
482
|
doctorList: [],
|
455
|
|
- advicePrint: {},
|
|
483
|
+ advicePrint: [],
|
456
|
484
|
yi:4,
|
457
|
485
|
radio:'',
|
458
|
486
|
arr:[],
|
|
@@ -569,39 +597,30 @@ export default{
|
569
|
597
|
};
|
570
|
598
|
getPrescriptionPrint(params).then((response) => {
|
571
|
599
|
if (response.data.state == 1) {
|
572
|
|
- var advicePrint = response.data.data.advicePrint;
|
|
600
|
+ const advicePrint = response.data.data.advicePrint;
|
573
|
601
|
console.log("adviceprint9999", advicePrint);
|
574
|
602
|
console.log("response.data.data", response.data.data);
|
575
|
603
|
this.advicePrint = advicePrint;
|
576
|
604
|
this.prescriptions = advicePrint;
|
577
|
605
|
this.adminUser = response.data.data.roles
|
578
|
606
|
this.doctorList_1 = response.data.data.eles;
|
579
|
|
- for(let i=0;i<this.advicePrint.length;i++){
|
580
|
|
- const arr = new Array()
|
581
|
|
- var advicess = new Array()
|
582
|
|
- var advicess=advicePrint[i].advices
|
583
|
|
-
|
584
|
|
- for(let j=0;j<advicess.length;j++){
|
585
|
|
- for(let x=j+1;x<advicess.length;x++){
|
586
|
|
- if(advicess[j].groupno == advicess[x].groupno){
|
587
|
|
- arr.push(advicess.splice(x,1))
|
588
|
|
- }
|
589
|
|
- }
|
590
|
|
- }
|
591
|
607
|
|
592
|
|
- for(let x in arr){
|
593
|
|
- for(let j in this.advicePrint[i].advices){
|
594
|
|
- if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
|
595
|
|
- this.advicePrint[i]['advices'][j]['arr'] = arr[x]
|
|
608
|
+ for(let i=0;i< advicePrint.length;i++){
|
|
609
|
+ const advicess = advicePrint[i].advices
|
|
610
|
+ for(let j=0;j<advicess.length;j++){
|
|
611
|
+ this.advicePrint[i].advices[j]['arr'] = []
|
|
612
|
+ for(let x=j+1; x<advicess.length;x++){
|
|
613
|
+ if(advicess[j].groupno == advicess[x].groupno){
|
|
614
|
+ this.advicePrint[i].advices[j]['arr'].push(advicess.splice(x,1))
|
|
615
|
+ // advicess.splice(x,1)
|
|
616
|
+ x--
|
|
617
|
+ }
|
596
|
618
|
}
|
597
|
619
|
}
|
|
620
|
+ console.log('123123123',advicess);
|
598
|
621
|
}
|
599
|
|
- }
|
600
|
|
-
|
601
|
|
- // console.log('4444444',this.advicePrint);
|
602
|
|
- // console.log('55555555',this.arr);
|
|
622
|
+ console.log('dddddd22222',this.advicePrint)
|
603
|
623
|
|
604
|
|
- // console.log(this.doctorList_1, "医生列表");
|
605
|
624
|
if (this.doctorList_1.length > 0) {
|
606
|
625
|
var operatorsLen = this.doctorList_1.length;
|
607
|
626
|
for (var index = 0; index < operatorsLen; index++) {
|
|
@@ -654,10 +673,11 @@ export default{
|
654
|
673
|
return name;
|
655
|
674
|
},
|
656
|
675
|
getTotalOne(id) {
|
657
|
|
- // console.log('999999999',this.prescriptions);
|
|
676
|
+ console.log('999999999',this.prescriptions);
|
658
|
677
|
var total = 0;
|
659
|
678
|
var addtotal = 0;
|
660
|
679
|
var zimuyao = 0;
|
|
680
|
+
|
661
|
681
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
662
|
682
|
if (id == this.prescriptions[i].id) {
|
663
|
683
|
if (this.prescriptions[i].project != null) {
|
|
@@ -688,26 +708,35 @@ export default{
|
688
|
708
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
689
|
709
|
if (id == this.prescriptions[i].id) {
|
690
|
710
|
if (this.prescriptions[i].advices != null) {
|
|
711
|
+ console.log('123456789',this.prescriptions[i].advices);
|
|
712
|
+
|
691
|
713
|
for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
692
|
714
|
total =
|
693
|
715
|
total +
|
694
|
716
|
(this.prescriptions[i].advices[a].price *
|
695
|
717
|
this.prescriptions[i].advices[a].prescribing_number) ;
|
696
|
718
|
|
697
|
|
- if(this.prescriptions[i].advices[a].arr !=undefined){
|
698
|
|
- zimuyao = zimuyao +
|
699
|
|
- this.prescriptions[i].advices[a].arr[0].price *
|
700
|
|
- this.prescriptions[i].advices[a].arr[0].prescribing_number
|
|
719
|
+ if(this.prescriptions[i].advices[a].arr !=''){
|
|
720
|
+ for(let b in this.prescriptions[i].advices[a].arr){
|
|
721
|
+ zimuyao = zimuyao +
|
|
722
|
+ this.prescriptions[i].advices[a].arr[b][0].price *
|
|
723
|
+ this.prescriptions[i].advices[a].arr[b][0].prescribing_number
|
|
724
|
+ }
|
|
725
|
+ // if(this.prescriptions[i].advices[a].arr.length<2){
|
|
726
|
+ // zimuyao = zimuyao +
|
|
727
|
+ // this.prescriptions[i].advices[a].arr[0].price *
|
|
728
|
+ // this.prescriptions[i].advices[a].arr[0].prescribing_number
|
|
729
|
+ // }else{
|
|
730
|
+ // const child = this.prescriptions[i].advices[a].arr
|
|
731
|
+ // for(let i in child){
|
|
732
|
+ // zimuyao = zimuyao +
|
|
733
|
+ // child[i][0].price *
|
|
734
|
+ // child[i][0].prescribing_number
|
|
735
|
+ // }
|
|
736
|
+ // }
|
701
|
737
|
}
|
702
|
738
|
}
|
703
|
739
|
}
|
704
|
|
- // if(this.prescriptions[i].arr[0] != null){
|
705
|
|
- // for(let b=0;b<this.prescriptions[i].arr[0].length;b++){
|
706
|
|
- // zimuyao = zimuyao +
|
707
|
|
- // this.prescriptions[i].arr[b][0].price *
|
708
|
|
- // this.prescriptions[i].arr[b][0].prescribing_number
|
709
|
|
- // }
|
710
|
|
- // }
|
711
|
740
|
if (this.prescriptions[i].additionalcharge != null) {
|
712
|
741
|
for (
|
713
|
742
|
let a = 0;
|