|
@@ -17,13 +17,13 @@
|
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
|
28
|
<div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
|
29
|
29
|
<div style="flex: 1;">
|
|
@@ -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;">
|
|
@@ -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;">
|
|
@@ -200,16 +200,33 @@
|
200
|
200
|
</span>
|
201
|
201
|
<div>
|
202
|
202
|
<template>
|
203
|
|
- <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>
|
|
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
|
+ <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
|
|
207
|
+ <span >
|
|
208
|
+ {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }} * {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
|
|
209
|
+ {{it.arr[0].drug.max_unit}}
|
|
210
|
+ </span>
|
|
211
|
+ </div>
|
|
212
|
+ <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
|
|
213
|
+ 共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
|
|
214
|
+ </div>
|
210
|
215
|
</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-else>
|
|
217
|
+ <div v-for="(ites,ins) in it.arr" :key="ins">
|
|
218
|
+ <div>
|
|
219
|
+ <span style="margin-left: 38px;">{{ites[0].advice_name ? ites[0].advice_name : ""}}</span>
|
|
220
|
+ <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
|
|
221
|
+ <span >
|
|
222
|
+ {{ ites[0].drug.dose }}{{ ites[0].drug.dose_unit }} * {{ ites[0].drug.min_number }}{{ ites[0].drug.min_unit }}/
|
|
223
|
+ {{ites[0].drug.max_unit}}
|
|
224
|
+ </span>
|
|
225
|
+ </div>
|
|
226
|
+ <div :style="{display: 'inline-block',position: 'absolute',left:'85%',top:((ins+1)*20)+'px','margin-left': '5px'}" >
|
|
227
|
+ 共{{ ites[0].single_dose }}{{ ites[0].single_dose_unit }}
|
|
228
|
+ </div>
|
|
229
|
+ </div>
|
213
|
230
|
</div>
|
214
|
231
|
</template>
|
215
|
232
|
</div>
|
|
@@ -229,14 +246,26 @@
|
229
|
246
|
</div>
|
230
|
247
|
</div>
|
231
|
248
|
|
232
|
|
- <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
|
|
249
|
+ <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" v-if="it.arr.length<2">
|
|
250
|
+ × {{ it.prescribing_number}}
|
|
251
|
+ </div>
|
|
252
|
+ <div style="display: inline-block;position: absolute;left:80%;top:0px;margin-left: 5px;" v-if="it.arr.length>1">
|
233
|
253
|
× {{ it.prescribing_number}}
|
234
|
254
|
</div>
|
235
|
|
- <!-- <div> -->
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+ <div v-if="it.arr.length<2">
|
236
|
258
|
<div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
|
237
|
259
|
× {{ it.arr[0].prescribing_number}}
|
238
|
260
|
</div>
|
239
|
|
- <!-- </div> -->
|
|
261
|
+ </div>
|
|
262
|
+ <div v-else>
|
|
263
|
+ <div v-for="(ites,ins) in it.arr" :key="ins">
|
|
264
|
+ <div :style="{display: 'inline-block',position: 'absolute',left:'80%',top:((ins+1)*15)+'px','margin-left': '5px'}" >
|
|
265
|
+ × {{ ites[0].prescribing_number}}
|
|
266
|
+ </div>
|
|
267
|
+ </div>
|
|
268
|
+ </div>
|
240
|
269
|
<template>
|
241
|
270
|
<div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" >
|
242
|
271
|
共{{ it.single_dose }}{{ it.single_dose_unit }}
|
|
@@ -295,7 +324,7 @@
|
295
|
324
|
</div>
|
296
|
325
|
</div>
|
297
|
326
|
<template v-if="index==yi&&item.advices.length>5">
|
298
|
|
- <div style="margin: 20px 0px;"
|
|
327
|
+ <div style="margin: 20px 0px;"
|
299
|
328
|
v-if="prescriptions[index].med_type != '1111' && prescriptions[index].med_type != '1112'">
|
300
|
329
|
<div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
|
301
|
330
|
<div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
|
|
@@ -323,13 +352,13 @@
|
323
|
352
|
<div style="flex: 1;">调配药师:</div>
|
324
|
353
|
<div style="flex: 1;">核/发药师:</div>
|
325
|
354
|
</div>
|
326
|
|
- <div style="display: flex;margin: 10px 0;">
|
|
355
|
+ <div style="display: flex;margin: 10px 0;">
|
327
|
356
|
<div style="flex: 1;">取药人:</div>
|
328
|
357
|
<div style="flex: 1;">执行人:</div>
|
329
|
358
|
<div style="flex: 1;">弃去量:</div>
|
330
|
359
|
<div style="flex: 1;">证明人:</div>
|
331
|
360
|
</div>
|
332
|
|
- <div style="display: flex;">
|
|
361
|
+ <div style="display: flex;">
|
333
|
362
|
<div style="flex: 1;">收回空安瓿或废贴批号:</div>
|
334
|
363
|
<div style="flex: 1;">发出药品批号:</div>
|
335
|
364
|
</div>
|
|
@@ -418,13 +447,13 @@
|
418
|
447
|
<div style="flex: 1;">调配药师:</div>
|
419
|
448
|
<div style="flex: 1;">核/发药师:</div>
|
420
|
449
|
</div>
|
421
|
|
- <div style="display: flex;margin: 10px 0;">
|
|
450
|
+ <div style="display: flex;margin: 10px 0;">
|
422
|
451
|
<div style="flex: 1;">取药人:</div>
|
423
|
452
|
<div style="flex: 1;">执行人:</div>
|
424
|
453
|
<div style="flex: 1;">弃去量:</div>
|
425
|
454
|
<div style="flex: 1;">证明人:</div>
|
426
|
455
|
</div>
|
427
|
|
- <div style="display: flex;">
|
|
456
|
+ <div style="display: flex;">
|
428
|
457
|
<div style="flex: 1;">收回空安瓿或废贴批号:</div>
|
429
|
458
|
<div style="flex: 1;">发出药品批号:</div>
|
430
|
459
|
</div>
|
|
@@ -576,29 +605,78 @@ export default{
|
576
|
605
|
this.prescriptions = advicePrint;
|
577
|
606
|
this.adminUser = response.data.data.roles
|
578
|
607
|
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))
|
|
608
|
+
|
|
609
|
+ // const advicess = []
|
|
610
|
+ // const totalarr =[]
|
|
611
|
+ for(let i=0;i< advicePrint.length;i++){
|
|
612
|
+ const arr = []
|
|
613
|
+ const advicess = advicePrint[i].advices
|
|
614
|
+ for(let j=0;j<advicess.length;j++){
|
|
615
|
+ // console.log('dddddd',j);
|
|
616
|
+ for(let x=j+1; x<advicess.length;x++){
|
|
617
|
+ // console.log('dddddd22222',x);
|
|
618
|
+ if(advicess[j].groupno == advicess[x].groupno){
|
|
619
|
+ arr.push(advicess.splice(x,1))
|
|
620
|
+ x--
|
|
621
|
+ }
|
588
|
622
|
}
|
|
623
|
+
|
589
|
624
|
}
|
590
|
|
- }
|
591
|
|
-
|
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]
|
|
625
|
+ // totalarr.push(arr)
|
|
626
|
+ console.log('123123123',arr);
|
|
627
|
+ // console.log('7777777',totalarr);
|
|
628
|
+ // const arr = new Array()
|
|
629
|
+ // var advicess = new Array()
|
|
630
|
+ // var advicess=advicePrint[i].advices
|
|
631
|
+
|
|
632
|
+ // for(let j=0;j<advicess.length;j++){
|
|
633
|
+ // for(let x=j+1;x<advicess.length;x++){
|
|
634
|
+ // if(advicess[j].groupno == advicess[x].groupno){
|
|
635
|
+ // arr.push(advicess.splice(x,1))
|
|
636
|
+ // }
|
|
637
|
+ // }
|
|
638
|
+ // }
|
|
639
|
+ // console.log('123123123',arr);
|
|
640
|
+ // for(let x in arr){
|
|
641
|
+ // console.log('ggggggg',x)
|
|
642
|
+ // for(let j in this.advicePrint[i].advices){
|
|
643
|
+ // if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
|
|
644
|
+ // this.advicePrint[i]['advices'][j]['arr'] = arr[x]
|
|
645
|
+ // // this.advicePrint[i]['advices'][j]['arr'].push(arr[x])
|
|
646
|
+ // }
|
|
647
|
+ // }
|
|
648
|
+ // }
|
|
649
|
+ const child = []
|
|
650
|
+ for(let x in arr){
|
|
651
|
+ if(arr.length>1){
|
|
652
|
+ for(let j in this.advicePrint[i].advices){
|
|
653
|
+
|
|
654
|
+ if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
|
|
655
|
+ child.push(arr[x])
|
|
656
|
+ // this.advicePrint[i]['advices'][j]['arr'] = arr[x]
|
|
657
|
+ // this.advicePrint[i]['advices'][j].push(arr[x])
|
|
658
|
+ }
|
|
659
|
+ console.log('pppppp',child);
|
|
660
|
+ this.advicePrint[i]['advices'][j]['arr'] = child
|
|
661
|
+ // this.advicePrint[i]['advices'][j].push(arr[x])
|
|
662
|
+ }
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+ // this.advicePrint[i]['advices'][j].push(arr[x])
|
|
666
|
+ }else{
|
|
667
|
+ console.log('ggggggg',arr[x])
|
|
668
|
+ for(let j in this.advicePrint[i].advices){
|
|
669
|
+ if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
|
|
670
|
+ this.advicePrint[i]['advices'][j]['arr'] = arr[x]
|
|
671
|
+ // this.advicePrint[i]['advices'][j]['arr'].push(arr[x])
|
|
672
|
+ }
|
|
673
|
+ }
|
596
|
674
|
}
|
|
675
|
+
|
597
|
676
|
}
|
598
|
677
|
}
|
599
|
|
- }
|
600
|
|
-
|
601
|
|
- // console.log('4444444',this.advicePrint);
|
|
678
|
+
|
|
679
|
+ console.log('4444444',this.advicePrint);
|
602
|
680
|
// console.log('55555555',this.arr);
|
603
|
681
|
|
604
|
682
|
// console.log(this.doctorList_1, "医生列表");
|
|
@@ -654,10 +732,11 @@ export default{
|
654
|
732
|
return name;
|
655
|
733
|
},
|
656
|
734
|
getTotalOne(id) {
|
657
|
|
- // console.log('999999999',this.prescriptions);
|
|
735
|
+ console.log('999999999',this.prescriptions);
|
658
|
736
|
var total = 0;
|
659
|
737
|
var addtotal = 0;
|
660
|
738
|
var zimuyao = 0;
|
|
739
|
+
|
661
|
740
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
662
|
741
|
if (id == this.prescriptions[i].id) {
|
663
|
742
|
if (this.prescriptions[i].project != null) {
|
|
@@ -688,6 +767,7 @@ export default{
|
688
|
767
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
689
|
768
|
if (id == this.prescriptions[i].id) {
|
690
|
769
|
if (this.prescriptions[i].advices != null) {
|
|
770
|
+
|
691
|
771
|
for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
692
|
772
|
total =
|
693
|
773
|
total +
|
|
@@ -695,9 +775,18 @@ export default{
|
695
|
775
|
this.prescriptions[i].advices[a].prescribing_number) ;
|
696
|
776
|
|
697
|
777
|
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
|
|
778
|
+ if(this.prescriptions[i].advices[a].arr.length<2){
|
|
779
|
+ zimuyao = zimuyao +
|
|
780
|
+ this.prescriptions[i].advices[a].arr[0].price *
|
|
781
|
+ this.prescriptions[i].advices[a].arr[0].prescribing_number
|
|
782
|
+ }else{
|
|
783
|
+ const child = this.prescriptions[i].advices[a].arr
|
|
784
|
+ for(let i in child){
|
|
785
|
+ zimuyao = zimuyao +
|
|
786
|
+ child[i][0].price *
|
|
787
|
+ child[i][0].prescribing_number
|
|
788
|
+ }
|
|
789
|
+ }
|
701
|
790
|
}
|
702
|
791
|
}
|
703
|
792
|
}
|