Browse Source

25 3月18 打印单

yq1 3 weeks ago
parent
commit
e7ec60fcb8

+ 108 - 168
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

@@ -1,27 +1,20 @@
1 1
 <template>
2 2
   <div id="prescriptionPrint">
3
-    <div v-for="(item, index) in advicePrint" :key="index"  style="page-break-after: always">
4
-      <div
5
-        id="prescription-print"
6
-        class="prescription-print"
7
-       
8
-      >
3
+    <div v-for="(item, index) in advicePrint" :key="index" style="page-break-after: always">
4
+      <div id="prescription-print" class="prescription-print">
9 5
         <div class="printTitle" v-if="prescriptions[index].med_type == '1111'">
10 6
           {{ orgname }}第一类精神处方笺
11 7
         </div>
12 8
         <div class="printTitle" v-if="prescriptions[index].med_type == '1112'">
13 9
           {{ orgname }}第二类精神处方笺
14 10
         </div>
15
-        <div
16
-          class="printTitle"
17
-          v-if="
18
-            prescriptions[index].med_type != '1111' &&
19
-            prescriptions[index].med_type != '1112'
20
-          "
21
-        >
11
+        <div class="printTitle" v-if="
12
+          prescriptions[index].med_type != '1111' &&
13
+          prescriptions[index].med_type != '1112'
14
+        ">
22 15
           {{ orgname }}处方笺
23 16
         </div>
24
-        <div >
17
+        <div>
25 18
           <div class="infoTitle">
26 19
             <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
27 20
             <p>
@@ -39,7 +32,7 @@
39 32
               科室:{{ item.info ? getDepart(item.info.departments) : "" }}
40 33
             </div>
41 34
             <div style="margin-bottom: 10px" v-if="org_id == 10537">
42
-              身份证号:{{newHisPatient.id_card_no | testfile}}
35
+              身份证号:{{ newHisPatient.id_card_no | testfile }}
43 36
             </div>
44 37
             <div style="margin-bottom: 10px" v-else>
45 38
               医保卡号:
@@ -56,14 +49,11 @@
56 49
             </div>
57 50
           </div>
58 51
         </div>
59
-        <div class="prescriptionBox" :style="{'min-height':org_id != 10724? '350px':'450px'}">
52
+        <div class="prescriptionBox" :style="{ 'min-height': org_id != 10724 ? '350px' : '450px' }">
60 53
           <div class="Rp">Rp:</div>
61
-          <div class="drugsBox" 
62
-            v-for="(it, index1) in item.advices"
63
-            :key="index1"
64
-            :style="{'page-break-after':index1==yi&&item.advices.length>7? 'always':'auto','position': 'relative'}"
65
-          >
66
-            <template v-if="index1==yi+1&&item.advices.length>7">
54
+          <div class="drugsBox" v-for="(it, index1) in item.advices" :key="index1"
55
+            :style="{ 'page-break-after': index1 == yi && item.advices.length > 7 ? 'always' : 'auto', 'position': 'relative' }">
56
+            <template v-if="index1 == yi + 1 && item.advices.length > 7">
67 57
 
68 58
               <div class="printTitle" v-if="prescriptions[index].med_type == '1111'">
69 59
                 {{ orgname }}第一类精神处方笺
@@ -71,13 +61,10 @@
71 61
               <div class="printTitle" v-if="prescriptions[index].med_type == '1112'">
72 62
                 {{ orgname }}第二类精神处方笺
73 63
               </div>
74
-              <div
75
-                class="printTitle"
76
-                v-if="
77
-                  prescriptions[index].med_type != '1111' &&
78
-                  prescriptions[index].med_type != '1112'
79
-                "
80
-              >
64
+              <div class="printTitle" v-if="
65
+                prescriptions[index].med_type != '1111' &&
66
+                prescriptions[index].med_type != '1112'
67
+              ">
81 68
                 {{ orgname }}处方笺
82 69
               </div>
83 70
               <div style="margin-bottom: 10px;">
@@ -98,7 +85,7 @@
98 85
                     科室:{{ item.info ? getDepart(item.info.departments) : "" }}
99 86
                   </div>
100 87
                   <div style="margin-bottom: 10px" v-if="org_id == 10537">
101
-                    身份证号:{{newHisPatient.id_card_no | testfile}}
88
+                    身份证号:{{ newHisPatient.id_card_no | testfile }}
102 89
                   </div>
103 90
                   <div style="margin-bottom: 10px" v-else>
104 91
                     医保卡号:
@@ -117,78 +104,51 @@
117 104
               </div>
118 105
             </template>
119 106
             <div class="drugsOne">
120
-              <span style="font-weight: bold">{{ index1 + 1 + "." }}</span
121
-              >{{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;<span
122
-              v-if="it.drug.min_unit != it.drug.dose_unit"
123
-              >{{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* &nbsp;</span
124
-              >{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
107
+              <span style="font-weight: bold">{{ index1 + 1 + "." }}</span>{{ it.advice_name ? it.advice_name : ""
108
+              }}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{ it.drug.dose }}{{ it.drug.dose_unit
109
+                }}&nbsp;*
110
+                &nbsp;</span>{{ it.drug.min_number }}{{ it.drug.min_unit }}/{{
125 111
                   it.drug.max_unit
126 112
                 }}&nbsp;×&nbsp; {{ it.prescribing_number
127
-                }}{{ it.prescribing_number_unit }}
113
+              }}{{ it.prescribing_number_unit }}
128 114
               <!-- <div style="display: inline-block;margin-left: 30px;" v-if="org_id ==10210 || org_id ==0">
129 115
                 <span>{{ it.price}}</span>
130 116
               </div> -->
131 117
             </div>
132 118
             <div style="margin-left: 100px">
133
-                <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
134
-                >&nbsp;&nbsp;<span
135
-              >{{ it.execution_frequency }}&nbsp;{{
119
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span>&nbsp;&nbsp;<span>{{ it.execution_frequency
120
+                }}&nbsp;{{
136 121
                   it.delivery_way
137
-                }}&nbsp;</span
138
-              >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
122
+                }}&nbsp;</span>&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
139 123
             </div>
140 124
             <!-- 单价 -->
141 125
             <div style="display: inline-block;position: relative; top:-38px;left: 80%;"
142
-              v-if="org_id ==10210 || org_id ==0">
143
-                <span>{{ it.price}}</span>
126
+              v-if="org_id == 10210">
127
+              <span>{{ it.price }}</span>
144 128
             </div>
145
-            <template v-if="index1==yi&&item.advices.length>7">
129
+            <template v-if="index1 == yi && item.advices.length > 7">
146 130
               <div class="doctorBox">
147 131
                 <p v-if="org_id == 10217">
148 132
                   医师:
149
-                  <span
150
-                    style="width: 100px; display: inline-block"
151
-                    v-if="item.creator == ''"
152
-                  >
153
-                      {{ item.doctor }}
154
-                    </span>
155
-                  <span
156
-                    style="width: 100px; display: inline-block"
157
-                    v-else-if="doc_name != ''"
158
-                  >
159
-                      {{ doc_name }}
160
-                    </span>
161
-                  <img
162
-                    style="height: 50px;"
163
-                    :src="setAdminUserES(item.creator,item.doctor)"
164
-                    alt=""
165
-                    srcset=""
166
-                    v-else
167
-                  />
133
+                  <span style="width: 100px; display: inline-block" v-if="item.creator == ''">
134
+                    {{ item.doctor }}
135
+                  </span>
136
+                  <span style="width: 100px; display: inline-block" v-else-if="doc_name != ''">
137
+                    {{ doc_name }}
138
+                  </span>
139
+                  <img style="height: 50px;" :src="setAdminUserES(item.creator, item.doctor)" alt="" srcset="" v-else />
168 140
                 </p>
169 141
                 <p v-if="org_id == 10510 || org_id == 10265">
170 142
                   医师:
171
-                  <span
172
-                    style="width: 100px; display: inline-block"
173
-                    v-if="item.creator == ''"
174
-                  >
175
-                      {{ item.doctor }}
176
-                    </span>
177
-                  <span
178
-                    style="width: 100px; display: inline-block"
179
-                    v-else-if="doc_name != ''"
180
-                  >
181
-                      {{ doc_name }}
182
-                    </span>
183
-                  <img
184
-                    style="height: 50px;"
185
-                    :src="setAdminUserES(item.creator,item.doctor)"
186
-                    alt=""
187
-                    srcset=""
188
-                    v-else
189
-                  />
143
+                  <span style="width: 100px; display: inline-block" v-if="item.creator == ''">
144
+                    {{ item.doctor }}
145
+                  </span>
146
+                  <span style="width: 100px; display: inline-block" v-else-if="doc_name != ''">
147
+                    {{ doc_name }}
148
+                  </span>
149
+                  <img style="height: 50px;" :src="setAdminUserES(item.creator, item.doctor)" alt="" srcset="" v-else />
190 150
                 </p>
191
-                <p v-if="org_id!=10217 && org_id!=10510 && org_id !=10265">
151
+                <p v-if="org_id != 10217 && org_id != 10510 && org_id != 10265">
192 152
                   医师: {{ item.doctor ? item.doctor : "" }}
193 153
                 </p>
194 154
                 <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
@@ -209,11 +169,7 @@
209 169
             </template>
210 170
           </div>
211 171
 
212
-          <div
213
-            class="drugsBox"
214
-            v-for="(it, i) in item.additionalcharge"
215
-            :key="i"
216
-          >
172
+          <div class="drugsBox" v-for="(it, i) in item.additionalcharge" :key="i">
217 173
             <div class="drugsOne">
218 174
               {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
219 175
                 it.count
@@ -221,14 +177,9 @@
221 177
             </div>
222 178
           </div>
223 179
 
224
-          <div
225
-            class="drugsBox"
226
-            v-for="(it, index) in item.project"
227
-            :key="index"
228
-          >
180
+          <div class="drugsBox" v-for="(it, index) in item.project" :key="index">
229 181
             <div class="drugsOne">
230
-              <span style="font-weight: bold">{{ index + 1 + "." }}</span
231
-              >{{
182
+              <span style="font-weight: bold">{{ index + 1 + "." }}</span>{{
232 183
                 it.type == 2
233 184
                   ? getProjectName(it.project_id)
234 185
                     ? getProjectName(it.project_id)
@@ -238,17 +189,12 @@
238 189
               }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
239 190
             </div>
240 191
             <div style="margin-left: 100px">
241
-              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
242
-              >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
243
-            >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
192
+              <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span>&nbsp;&nbsp;<span>{{ it.delivery_way
193
+                }}</span>&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
244 194
             </div>
245 195
           </div>
246 196
 
247
-          <div
248
-            class="drugsBox"
249
-            v-for="(it, i) in item.additionalcharge"
250
-            :key="i"
251
-          >
197
+          <div class="drugsBox" v-for="(it, i) in item.additionalcharge" :key="i">
252 198
             <div class="drugsOne">
253 199
               {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
254 200
                 it.price.toFixed(2)
@@ -261,56 +207,34 @@
261 207
         <div class="doctorBox">
262 208
           <p v-if="org_id == 10217">
263 209
             医师:
264
-            <span
265
-              style="width: 100px; display: inline-block"
266
-              v-if="item.creator == ''"
267
-            >
268
-                {{ item.doctor }}
269
-              </span>
270
-            <span
271
-              style="width: 100px; display: inline-block"
272
-              v-else-if="doc_name != ''"
273
-            >
274
-                {{ doc_name }}
275
-              </span>
276
-            <img
277
-              style="height: 50px;"
278
-              :src="setAdminUserES(item.creator,item.doctor)"
279
-              alt=""
280
-              srcset=""
281
-              v-else
282
-            />
210
+            <span style="width: 100px; display: inline-block" v-if="item.creator == ''">
211
+              {{ item.doctor }}
212
+            </span>
213
+            <span style="width: 100px; display: inline-block" v-else-if="doc_name != ''">
214
+              {{ doc_name }}
215
+            </span>
216
+            <img style="height: 50px;" :src="setAdminUserES(item.creator, item.doctor)" alt="" srcset="" v-else />
283 217
           </p>
284
-          <p v-if="org_id == 10510  || org_id == 10265 || org_id ==0">
218
+          <p v-if="org_id == 10510 || org_id == 10265">
285 219
             医师:
286
-            <span
287
-              style="width: 100px; display: inline-block"
288
-              v-if="item.creator == ''"
289
-            >
290
-                {{ item.doctor }}
291
-              </span>
292
-            <span
293
-              style="width: 100px; display: inline-block"
294
-              v-else-if="doc_name != ''"
295
-            >
296
-                {{ doc_name }}
297
-              </span>
298
-            <img
299
-              style="height: 50px;"
300
-              :src="setAdminUserES(item.creator,item.doctor)"
301
-              alt=""
302
-              srcset=""
303
-              v-else
304
-            /> &nbsp;&nbsp;
305
-            <span v-if="org_id == 10265 || org_id ==0">
220
+            <span style="width: 100px; display: inline-block" v-if="item.creator == ''">
221
+              {{ item.doctor }}
222
+            </span>
223
+            <span style="width: 100px; display: inline-block" v-else-if="doc_name != ''">
224
+              {{ doc_name }}
225
+            </span>
226
+            <img style="height: 50px;" :src="setAdminUserES(item.creator, item.doctor)" alt="" srcset="" v-else />
227
+            &nbsp;&nbsp;
228
+            <span v-if="org_id == 10265 || org_id == 0">
306 229
               {{ item.doctor ? item.doctor : "" }}
307 230
             </span>
308
-            
231
+
309 232
           </p>
310
-          <p v-if="org_id!=10217 && org_id!=10510 && org_id !=10265 && org_id !=0">
233
+          <p v-if="org_id != 10217 && org_id != 10510 && org_id != 10265 && org_id != 0">
311 234
             医师: {{ item.doctor ? item.doctor : "" }}
312 235
           </p>
313
-          <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
236
+          <p v-if="org_id !=10751">日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
237
+          <p v-if="org_id ==10751 || org_id == 0">日期:{{ getTime(item.pre_time) ? getTime(item.pre_time) : "" }}</p>
314 238
         </div>
315 239
         <div class="actionBar">
316 240
           <p>审核:</p>
@@ -338,7 +262,7 @@ import {
338 262
   getHisPatientDetail,
339 263
 } from "@/api/project/project";
340 264
 import { getInitData } from "@/api/his/his";
341
-export default{
265
+export default {
342 266
   props: {
343 267
     patient_id: Number,
344 268
     record_date: String,
@@ -347,14 +271,14 @@ export default{
347 271
   },
348 272
   data() {
349 273
     return {
350
-      doc_name:"",
274
+      doc_name: "",
351 275
       doctorList: [],
352 276
       advicePrint: {},
353
-      yi:4,
354
-      arr:[],
355
-      arrs:{},
356
-      advicess:[],
357
-      page:sessionStorage.getItem('dayin'),
277
+      yi: 4,
278
+      arr: [],
279
+      arrs: {},
280
+      advicess: [],
281
+      page: sessionStorage.getItem('dayin'),
358 282
       patient: {},
359 283
       tableData: [],
360 284
       prescriptionInfo: [],
@@ -369,8 +293,8 @@ export default{
369 293
       operators: [],
370 294
       doctorList_1: [],
371 295
     };
372
-  },filters: {
373
-    testfile (value) {
296
+  }, filters: {
297
+    testfile(value) {
374 298
       const start = value.slice(0, 6)
375 299
       const end = value.slice(-4)
376 300
       return `${start}******${end}`
@@ -378,7 +302,7 @@ export default{
378 302
   },
379 303
   methods: {
380 304
     // 电子签名
381
-    setAdminUserES(id,name) {
305
+    setAdminUserES(id, name) {
382 306
       console.log(id)
383 307
       console.log(name)
384 308
       console.log(this.operatorMaps)
@@ -395,9 +319,9 @@ export default{
395 319
       }
396 320
     },
397 321
     getAge(patient) {
398
-      if(patient.id_card_no == "TWN001836483"){
322
+      if (patient.id_card_no == "TWN001836483") {
399 323
         return patient.age
400
-      }else{
324
+      } else {
401 325
         var thisLen = patient.id_card_no.length;
402 326
         var birth = "";
403 327
         if (thisLen == 15) {
@@ -592,8 +516,8 @@ export default{
592 516
       }
593 517
       return name;
594 518
     },
595
-    merge(arrA){
596
-      var len=arrA.lenfth
519
+    merge(arrA) {
520
+      var len = arrA.lenfth
597 521
       // for(let j=0;j<this.advicess.length;j++){
598 522
       //   for(let x=j+1;x<this.advicess.length;x++){
599 523
       //     if(this.advicess[j].groupno == this.advicess[x].groupno){
@@ -602,14 +526,14 @@ export default{
602 526
       //     }
603 527
       //   }
604 528
       // }
605
-      for(let j=0;j<len;j++){
606
-        for(let x=j+1;x<len;x++){
607
-          if(arrA[j].groupno == arrA[x].groupno){
608
-            this.arr.push(arrA.splice(x,1))
529
+      for (let j = 0; j < len; j++) {
530
+        for (let x = j + 1; x < len; x++) {
531
+          if (arrA[j].groupno == arrA[x].groupno) {
532
+            this.arr.push(arrA.splice(x, 1))
609 533
           }
610 534
         }
611 535
       }
612
-      console.log('777777777',this.arr);
536
+      console.log('777777777', this.arr);
613 537
       return this.arr
614 538
     }
615 539
   },
@@ -648,18 +572,20 @@ export default{
648 572
 <style lang="scss" scoped>
649 573
 .prescription-print {
650 574
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
651
-  0 0 60px rgba(0, 0, 0, 0.06) inset;
575
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
652 576
   -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
653
-  0 0 40px rgba(0, 0, 0, 0.06) inset;
577
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
654 578
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
655 579
   margin-bottom: 20px;
656 580
   padding: 20px 10px;
657 581
 }
582
+
658 583
 .printTitle {
659 584
   font-size: 22px;
660 585
   text-align: center;
661 586
   font-weight: bold;
662 587
 }
588
+
663 589
 .infoTitle {
664 590
   display: flex;
665 591
   border-bottom: 2px solid #000;
@@ -667,42 +593,52 @@ export default{
667 593
   line-height: 24px;
668 594
   padding: 0 10px;
669 595
 }
596
+
670 597
 .infoTitle p {
671 598
   width: 200px;
672 599
 }
600
+
673 601
 .infoMain {
674 602
   display: flex;
675 603
   flex-wrap: wrap;
676 604
   border-bottom: 2px solid #000;
677 605
   padding: 0 10px;
678 606
 }
607
+
679 608
 .infoMain div {
680 609
   width: 50%;
681 610
   line-height: 24px;
682 611
 }
612
+
683 613
 .prescriptionBox {
684 614
   padding: 0 10px;
685 615
   min-height: 450px;
686 616
 }
617
+
687 618
 .Rp {
688 619
   font-size: 22px;
689 620
   font-weight: bold;
690 621
 }
622
+
691 623
 .drugsBox {
692 624
   padding-left: 40px;
693 625
   margin-bottom: 10px;
694 626
   position: relative;
695 627
 }
628
+
696 629
 .drugsBox div {
697 630
   line-height: 20px;
698 631
 }
632
+
699 633
 .drugsOne {
700 634
   line-height: 24px;
701 635
   display: inline-block;
702 636
 }
637
+
703 638
 .drugsOne span {
704 639
   margin-right: 20px;
705 640
 }
641
+
706 642
 .doctorBox {
707 643
   display: flex;
708 644
   justify-content: space-between;
@@ -710,7 +646,8 @@ export default{
710 646
   line-height: 24px;
711 647
   border-bottom: 2px solid #000;
712 648
 }
713
-.doctorBoxs{
649
+
650
+.doctorBoxs {
714 651
   width: 100%;
715 652
   margin-right: 30px;
716 653
   text-align: right;
@@ -718,6 +655,7 @@ export default{
718 655
   line-height: 24px;
719 656
 
720 657
 }
658
+
721 659
 .doctorBoxtwo {
722 660
   display: flex;
723 661
   justify-content: space-between;
@@ -725,12 +663,14 @@ export default{
725 663
   line-height: 24px;
726 664
 
727 665
 }
666
+
728 667
 .actionBar {
729 668
   display: flex;
730 669
   justify-content: space-between;
731 670
   line-height: 24px;
732 671
   padding: 0 10px;
733 672
 }
673
+
734 674
 .actionBar p {
735 675
   width: 150px;
736 676
 }

+ 2 - 1
src/xt_pages/outpatientTool/labelPrint.vue View File

@@ -557,7 +557,8 @@
557 557
                         textPosition:"top",//设置文本的垂直位置
558 558
                         textMargin:5,//设置条形码和文本之间的间距
559 559
                         fontSize:15,//设置文本的大小
560
-                        margin:15//设置条形码周围的空白边距
560
+                        margin:0,//设置条形码周围的空白边距
561
+                        marginTop:0
561 562
                       })
562 563
 
563 564
                     });