see999 3 years ago
parent
commit
d1e740fbfe

+ 113 - 3
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue View File

@@ -64,7 +64,8 @@
64 64
         ids:'',
65 65
         info:null,
66 66
         org_id:'',
67
-        balanceAccounts:{}
67
+        balanceAccounts:{},
68
+        num:0
68 69
       };
69 70
     },
70 71
     methods:{
@@ -85,12 +86,115 @@
85 86
           setTimeout(() => {
86 87
             const style =
87 88
             '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 49%;}}}';
88
-            printJS({
89
+            const style2 =
90
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 52%;}}}';
91
+            const style3 =
92
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 55%;}}}';
93
+            const style4 =
94
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 58%;}}}';
95
+            const style5 =
96
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 61%;}}}';
97
+            const style6 =
98
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 66%;}}}';
99
+            const style7 =
100
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 71%;}}}';
101
+            const style8 =
102
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 75%;}}}';
103
+            const style9 =
104
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 80%;}}}';
105
+            const style10 =
106
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 90%;}}}';
107
+            const style11 =
108
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
109
+            const style12 =
110
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;}@media print {html {zoom: 91%;}}}';
111
+            if(this.num >= 13){
112
+              printJS({
89 113
                 printable: "prescription-print",
90 114
                 type: "html",
91 115
                 style: style,
92 116
                 scanStyles: false
93
-            });
117
+              });
118
+            }else if(this.num == 12){
119
+              printJS({
120
+                printable: "prescription-print",
121
+                type: "html",
122
+                style: style2,
123
+                scanStyles: false
124
+              });
125
+            }else if(this.num == 11){
126
+              printJS({
127
+                printable: "prescription-print",
128
+                type: "html",
129
+                style: style3,
130
+                scanStyles: false
131
+              });
132
+            }else if(this.num == 10){
133
+              printJS({
134
+                printable: "prescription-print",
135
+                type: "html",
136
+                style: style4,
137
+                scanStyles: false
138
+              });
139
+            }else if(this.num == 9){
140
+              printJS({
141
+                printable: "prescription-print",
142
+                type: "html",
143
+                style: style5,
144
+                scanStyles: false
145
+              });
146
+            }else if(this.num == 8){
147
+              printJS({
148
+                printable: "prescription-print",
149
+                type: "html",
150
+                style: style6,
151
+                scanStyles: false
152
+              });
153
+            }else if(this.num == 7){
154
+              printJS({
155
+                printable: "prescription-print",
156
+                type: "html",
157
+                style: style7,
158
+                scanStyles: false
159
+              });
160
+            }else if(this.num == 6){
161
+              printJS({
162
+                printable: "prescription-print",
163
+                type: "html",
164
+                style: style8,
165
+                scanStyles: false
166
+              });
167
+            }else if(this.num == 5){
168
+              printJS({
169
+                printable: "prescription-print",
170
+                type: "html",
171
+                style: style9,
172
+                scanStyles: false
173
+              });
174
+            }else if(this.num == 4){
175
+              printJS({
176
+                printable: "prescription-print",
177
+                type: "html",
178
+                style: style10,
179
+                scanStyles: false
180
+              });
181
+            }else if(this.num == 3){
182
+              printJS({
183
+                printable: "prescription-print",
184
+                type: "html",
185
+                style: style11,
186
+                scanStyles: false
187
+              });
188
+            }else if(this.num <= 2){
189
+              printJS({
190
+                printable: "prescription-print",
191
+                type: "html",
192
+                style: style12,
193
+                scanStyles: false
194
+              });
195
+            }
196
+            
197
+            
94 198
           },500)
95 199
         }else{
96 200
           const style =
@@ -146,18 +250,22 @@
146 250
                 details: [],
147 251
                 total: 0
148 252
               }
253
+              let num = 0
149 254
               this.balanceAccounts.order_info.map(item => {
150 255
                 
151 256
                 if(item.advice_id > 0){
152 257
                   obj.details.push(item)
153 258
                   obj.total += (item.pric * item.advice.prescribing_number)
259
+                  num++
154 260
                 }else{
155 261
                   if(item.project.type == 2){
156 262
                     obj2.details.push(item)
157 263
                     obj2.total += (item.pric * item.project.count)
264
+                    num++
158 265
                   }else{
159 266
                     obj3.details.push(item)
160 267
                     obj3.total += (item.pric * item.project.count)
268
+                    num++
161 269
                   }
162 270
                 }
163 271
               })
@@ -166,6 +274,8 @@
166 274
               this.balanceAccounts.new_detail_list.push(obj2)
167 275
               this.balanceAccounts.new_detail_list.push(obj3)
168 276
               console.log(111,this.balanceAccounts)
277
+              this.num = num
278
+              console.log('this.num',this.num)
169 279
             }
170 280
           })
171 281
 

+ 2 - 2
src/xt_pages/outpatientCharges/newTreatTemplate/printTwo.vue View File

@@ -15,7 +15,7 @@
15 15
                   <div>费别:<span style="display:inline-block;width:80px;">{{info.patient_info.transBody.outputlist1 ? getName(info.patient_info.transBody.outputlist1) : ''}}</span>
16 16
                   </div>
17 17
                   <div>电脑号:<span style="display:inline-block;width:80px;">{{info.patient_info.transBody.aac999 ? info.patient_info.transBody.aac999 : ''}}</span></div>
18
-                  <div>收费日期:<span style="display:inline-block;width:80px;">{{info.record_date ? info.record_date : ''}}</span></div>
18
+                  <div>收费日期:<span style="display:inline-block;width:100px;">{{info.record_date ? info.record_date : ''}}</span></div>
19 19
                 </div>
20 20
                 <div style="float:right">金额单位:元</div>
21 21
             </div>
@@ -91,7 +91,7 @@
91 91
                   <div>费别:<span style="display:inline-block;width:80px;">自费</span>
92 92
                   </div>
93 93
                   <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
94
-                  <div>收费日期:<span style="display:inline-block;width:80px;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
94
+                  <div>收费日期:<span style="display:inline-block;width:100px;">{{getTime(new Date(),"{y}-{m}-{d}")?getTime(new Date(),"{y}-{m}-{d}"):""}}</span></div>
95 95
                 </div>
96 96
                 <div style="float:right">金额单位:元</div>
97 97
             </div>