Browse Source

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 1 year ago
parent
commit
ea25baf125

+ 59 - 59
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyfour.vue View File

6
       <div
6
       <div
7
         id="dialysis-print-box-64-1  "
7
         id="dialysis-print-box-64-1  "
8
         class="dialysis-print-order print-template-two print_page_main_content"
8
         class="dialysis-print-order print-template-two print_page_main_content"
9
-        
9
+
10
       >
10
       >
11
         <div id="dialysis-print-box-64" style="padding:10px 0 0 40px;">
11
         <div id="dialysis-print-box-64" style="padding:10px 0 0 40px;">
12
           <!-- <div 10px 0 0 40px
12
           <!-- <div 10px 0 0 40px
89
                     <span v-else-if="prescription.mode_id == 11">HFR</span>
89
                     <span v-else-if="prescription.mode_id == 11">HFR</span>
90
                     <span v-else-if="prescription.mode_id == 12">HDF+HP</span>
90
                     <span v-else-if="prescription.mode_id == 12">HDF+HP</span>
91
                     <span v-else-if="prescription.mode_id == 13">CRRT</span>
91
                     <span v-else-if="prescription.mode_id == 13">CRRT</span>
92
-                  
92
+
93
                     <span v-else-if="prescription.mode_id == 19">IUF+HD</span>
93
                     <span v-else-if="prescription.mode_id == 19">IUF+HD</span>
94
                     <span v-else-if="prescription.mode_id == 20">UF</span>
94
                     <span v-else-if="prescription.mode_id == 20">UF</span>
95
                     <span v-else-if="prescription.mode_id == 21">HD+</span>
95
                     <span v-else-if="prescription.mode_id == 21">HD+</span>
138
                   <span v-else-if="prescription.anticoagulant == 13">那屈肝素钙</span>
138
                   <span v-else-if="prescription.anticoagulant == 13">那屈肝素钙</span>
139
                   <span v-else-if="prescription.anticoagulant == 14">肝素钙注射液</span>
139
                   <span v-else-if="prescription.anticoagulant == 14">肝素钙注射液</span>
140
                   <span v-else-if="prescription.anticoagulant == 15">甲磺酸萘莫司他</span>
140
                   <span v-else-if="prescription.anticoagulant == 15">甲磺酸萘莫司他</span>
141
-                  &nbsp; 
142
-                  <span style="width:150px;display: inline-block;" 
141
+                  &nbsp;
142
+                  <span style="width:150px;display: inline-block;"
143
                   v-if=" prescription.anticoagulant != 1 && prescription.anticoagulant != 12 && prescription.anticoagulant != 5">
143
                   v-if=" prescription.anticoagulant != 1 && prescription.anticoagulant != 12 && prescription.anticoagulant != 5">
144
-                    首剂: {{ prescription.anticoagulant_shouji }} 
144
+                    首剂: {{ prescription.anticoagulant_shouji }}
145
                     <span v-if="prescription.anticoagulant == 4">mg</span>
145
                     <span v-if="prescription.anticoagulant == 4">mg</span>
146
                     <span v-if="prescription.anticoagulant == 3">iu</span>
146
                     <span v-if="prescription.anticoagulant == 3">iu</span>
147
                     <span v-if="prescription.anticoagulant == 2">iu</span>
147
                     <span v-if="prescription.anticoagulant == 2">iu</span>
152
                     <span v-if="prescription.anticoagulant == 9">iu</span>
152
                     <span v-if="prescription.anticoagulant == 9">iu</span>
153
                     <span v-if="prescription.anticoagulant == 11">mg</span>
153
                     <span v-if="prescription.anticoagulant == 11">mg</span>
154
                     <span v-if="prescription.anticoagulant == 13">mg</span>
154
                     <span v-if="prescription.anticoagulant == 13">mg</span>
155
-                    <span v-if="prescription.anticoagulant == 14 || 
155
+                    <span v-if="prescription.anticoagulant == 14 ||
156
                           prescription.anticoagulant == 15">mg
156
                           prescription.anticoagulant == 15">mg
157
                     </span>
157
                     </span>
158
-                    
158
+
159
                   </span>
159
                   </span>
160
-                  &nbsp; 
161
-                  <span style="width:135px;display: inline-block;" 
160
+                  &nbsp;
161
+                  <span style="width:150px;display: inline-block;"
162
                   v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 ">
162
                   v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 ">
163
-                    追加: {{ prescription.anticoagulant_weichi  }} 
163
+                    追加: {{ prescription.anticoagulant_weichi  }}
164
                     <span v-if="prescription.anticoagulant == 5">ml/h</span>
164
                     <span v-if="prescription.anticoagulant == 5">ml/h</span>
165
                     <span v-if="prescription.anticoagulant == 4">mg/h</span>
165
                     <span v-if="prescription.anticoagulant == 4">mg/h</span>
166
                     <span v-if="prescription.anticoagulant == 3">iu/h</span>
166
                     <span v-if="prescription.anticoagulant == 3">iu/h</span>
169
                     <span v-if="prescription.anticoagulant == 7">iu/h</span>
169
                     <span v-if="prescription.anticoagulant == 7">iu/h</span>
170
                     <span v-if="prescription.anticoagulant == 10">mg/h</span>
170
                     <span v-if="prescription.anticoagulant == 10">mg/h</span>
171
                     <span v-if="prescription.anticoagulant == 8">iu/h</span>
171
                     <span v-if="prescription.anticoagulant == 8">iu/h</span>
172
-                    <span v-if="prescription.anticoagulant == 9">iu/h</span>  
172
+                    <span v-if="prescription.anticoagulant == 9">iu/h</span>
173
                     <span v-if="prescription.anticoagulant == 11">mg/h</span>
173
                     <span v-if="prescription.anticoagulant == 11">mg/h</span>
174
                     <span v-if="prescription.anticoagulant == 13">mg/h</span>
174
                     <span v-if="prescription.anticoagulant == 13">mg/h</span>
175
-                    <span v-if="prescription.anticoagulant == 14 || 
175
+                    <span v-if="prescription.anticoagulant == 14 ||
176
                           prescription.anticoagulant == 15">mg/h
176
                           prescription.anticoagulant == 15">mg/h
177
                     </span>
177
                     </span>
178
                   </span>
178
                   </span>
179
-                  
180
-                  &nbsp; 
181
-                  <span style="width:150px;display: inline-block;" 
179
+
180
+                  &nbsp;
181
+                  <span style="width:150px;display: inline-block;"
182
                   v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 && prescription.anticoagulant != 5 ">
182
                   v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 && prescription.anticoagulant != 5 ">
183
-                    总量: {{ prescription.anticoagulant_zongliang  }} 
183
+                    总量: {{ prescription.anticoagulant_zongliang  }}
184
                     <span v-if="prescription.anticoagulant == 4">mg</span>
184
                     <span v-if="prescription.anticoagulant == 4">mg</span>
185
                     <span v-if="prescription.anticoagulant == 3">iu</span>
185
                     <span v-if="prescription.anticoagulant == 3">iu</span>
186
                     <span v-if="prescription.anticoagulant == 2">iu</span>
186
                     <span v-if="prescription.anticoagulant == 2">iu</span>
188
                     <span v-if="prescription.anticoagulant == 7">iu</span>
188
                     <span v-if="prescription.anticoagulant == 7">iu</span>
189
                     <span v-if="prescription.anticoagulant == 10">mg</span>
189
                     <span v-if="prescription.anticoagulant == 10">mg</span>
190
                     <span v-if="prescription.anticoagulant == 8">iu</span>
190
                     <span v-if="prescription.anticoagulant == 8">iu</span>
191
-                    <span v-if="prescription.anticoagulant == 9">iu</span>  
191
+                    <span v-if="prescription.anticoagulant == 9">iu</span>
192
                     <span v-if="prescription.anticoagulant == 11">mg</span>
192
                     <span v-if="prescription.anticoagulant == 11">mg</span>
193
                     <span v-if="prescription.anticoagulant == 13">mg</span>
193
                     <span v-if="prescription.anticoagulant == 13">mg</span>
194
-                    <span v-if="prescription.anticoagulant == 14 || 
194
+                    <span v-if="prescription.anticoagulant == 14 ||
195
                           prescription.anticoagulant == 15">mg
195
                           prescription.anticoagulant == 15">mg
196
                     </span>
196
                     </span>
197
                   </span>
197
                   </span>
198
-                 
198
+
199
                 </td>
199
                 </td>
200
               </tr>
200
               </tr>
201
               <tr>
201
               <tr>
218
                   </div>
218
                   </div>
219
                   <!-- <div style="margin-left:70px ;display: inline-block;">
219
                   <!-- <div style="margin-left:70px ;display: inline-block;">
220
                     实际预冲量:
220
                     实际预冲量:
221
-                    {{ prescription.pre_impulse ? prescription.pre_impulse : "/" }} 
221
+                    {{ prescription.pre_impulse ? prescription.pre_impulse : "/" }}
222
                      &nbsp;L
222
                      &nbsp;L
223
                   </div> -->
223
                   </div> -->
224
                   <div style="margin-left:70px ; display: inline-block;">
224
                   <div style="margin-left:70px ; display: inline-block;">
372
                         <td style=" ">记录</td>
372
                         <td style=" ">记录</td>
373
                         <!-- <td >护士签名</td> -->
373
                         <!-- <td >护士签名</td> -->
374
                       </tr>
374
                       </tr>
375
-                    
375
+
376
                       <tr style="" v-for="(monitor, monindex) in monitors" :key="monindex" >
376
                       <tr style="" v-for="(monitor, monindex) in monitors" :key="monindex" >
377
                         <td style=" "> {{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
377
                         <td style=" "> {{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
378
                         <td style=" ">
378
                         <td style=" ">
491
                   </table>
491
                   </table>
492
                 </td>
492
                 </td>
493
               </tr>
493
               </tr>
494
-             
494
+
495
               <tr>
495
               <tr>
496
                 <td colspan="3">
496
                 <td colspan="3">
497
                     <table  class="inside_table" border="1" cellspacing="0" cellpadding="0"
497
                     <table  class="inside_table" border="1" cellspacing="0" cellpadding="0"
526
               </tr>
526
               </tr>
527
               <tr v-for="(advice, advice_index) in advices" :key="advice_index" >
527
               <tr v-for="(advice, advice_index) in advices" :key="advice_index" >
528
                 <td colspan="3">
528
                 <td colspan="3">
529
-                  <table class="inside_table"  border="1" cellspacing="0" cellpadding="0" 
529
+                  <table class="inside_table"  border="1" cellspacing="0" cellpadding="0"
530
                         style="text-align: center; border-top: none;border-bottom: none;
530
                         style="text-align: center; border-top: none;border-bottom: none;
531
                         border-right: none;border-left: none; box-sizing: border-box;">
531
                         border-right: none;border-left: none; box-sizing: border-box;">
532
                     <tr style="border-bottom:none;">
532
                     <tr style="border-bottom:none;">
629
                       <td v-if="advice_index > 5" width="150" style=""></td>
629
                       <td v-if="advice_index > 5" width="150" style=""></td>
630
                       <td v-if="advice_index > 5" width="110"></td>
630
                       <td v-if="advice_index > 5" width="110"></td>
631
                     </tr>
631
                     </tr>
632
-                  
632
+
633
                   </table>
633
                   </table>
634
                 </td>
634
                 </td>
635
               </tr>
635
               </tr>
636
-     
636
+
637
               <tr>
637
               <tr>
638
                 <td colspan="3">
638
                 <td colspan="3">
639
                   <!-- <div style="display: inline-block;">
639
                   <!-- <div style="display: inline-block;">
710
                 </td>
710
                 </td>
711
               </tr>
711
               </tr>
712
 
712
 
713
-           
713
+
714
             </table>
714
             </table>
715
           </div>
715
           </div>
716
         </div>
716
         </div>
1004
         let projects = [];
1004
         let projects = [];
1005
         response.data.data.projects.map((item) => {
1005
         response.data.data.projects.map((item) => {
1006
           if (item.type == 2 && item.project.is_print == 1) {
1006
           if (item.type == 2 && item.project.is_print == 1) {
1007
-          
1007
+
1008
             projects.push(item);
1008
             projects.push(item);
1009
           }
1009
           }
1010
         });
1010
         });
1029
         console.log("this.projects", this.projects);
1029
         console.log("this.projects", this.projects);
1030
 
1030
 
1031
         // var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
1031
         // var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
1032
-        
1033
-        
1032
+
1033
+
1034
         if(this.projects!=null && this.projects.length >0){
1034
         if(this.projects!=null && this.projects.length >0){
1035
            for(let i=0;i<this.projects.length;i++){
1035
            for(let i=0;i<this.projects.length;i++){
1036
              this.projects.sort(this.compare('id'))
1036
              this.projects.sort(this.compare('id'))
1037
              if(this.projects[i].type== 2){
1037
              if(this.projects[i].type== 2){
1038
-            
1038
+
1039
               this.projects[i].project_team_name = ""
1039
               this.projects[i].project_team_name = ""
1040
               this.projects[i].project_team_id = 0
1040
               this.projects[i].project_team_id = 0
1041
               console.log("this.projects[i].project.team",this.projects[i].project.team)
1041
               console.log("this.projects[i].project.team",this.projects[i].project.team)
1043
                 this.projects[i].project_team = this.projects[i].team.project_team
1043
                 this.projects[i].project_team = this.projects[i].team.project_team
1044
                 this.projects[i].project_team_id = this.projects[i].team.id
1044
                 this.projects[i].project_team_id = this.projects[i].team.id
1045
                 this.projects[i].start_time = this.projects[i].start_time
1045
                 this.projects[i].start_time = this.projects[i].start_time
1046
-                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id) 
1046
+                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id)
1047
                 this.projects[i].single_dose_unit = this.projects[i].unit
1047
                 this.projects[i].single_dose_unit = this.projects[i].unit
1048
                 this.projects[i].execution_time = this.projects[i].execution_time
1048
                 this.projects[i].execution_time = this.projects[i].execution_time
1049
-                this.projects[i].execution_staff= this.projects[i].execution_staff 
1049
+                this.projects[i].execution_staff= this.projects[i].execution_staff
1050
                 this.projects[i].advice_name =  this.projects[i].team.project_team
1050
                 this.projects[i].advice_name =  this.projects[i].team.project_team
1051
-              
1052
-               
1051
+
1052
+
1053
                 this.advices.push(this.projects[i])
1053
                 this.advices.push(this.projects[i])
1054
               }else{
1054
               }else{
1055
                 this.projects[i].project_team = this.projects[i].project.project_name
1055
                 this.projects[i].project_team = this.projects[i].project.project_name
1056
                 this.projects[i].advice_name = this.projects[i].project.project_name
1056
                 this.projects[i].advice_name = this.projects[i].project.project_name
1057
                 this.projects[i].start_time = this.projects[i].start_time
1057
                 this.projects[i].start_time = this.projects[i].start_time
1058
-                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id) 
1058
+                this.projects[i].single_dose =  this.getCount(this.projects[i].project_id)
1059
                 this.projects[i].single_dose_unit = this.projects[i].unit
1059
                 this.projects[i].single_dose_unit = this.projects[i].unit
1060
                 this.projects[i].execution_time = this.projects[i].execution_time
1060
                 this.projects[i].execution_time = this.projects[i].execution_time
1061
-                this.projects[i].execution_staff= this.projects[i].execution_staff 
1061
+                this.projects[i].execution_staff= this.projects[i].execution_staff
1062
                 this.advices.push(this.projects[i])
1062
                 this.advices.push(this.projects[i])
1063
               }
1063
               }
1064
-             
1064
+
1065
              }
1065
              }
1066
-             
1066
+
1067
            }
1067
            }
1068
         }
1068
         }
1069
-       
1070
-       
1071
-      
1069
+
1070
+
1071
+
1072
         var tableAdvice = this.advices;
1072
         var tableAdvice = this.advices;
1073
 
1073
 
1074
 
1074
 
1148
           this.advices = tableAdvice;
1148
           this.advices = tableAdvice;
1149
         }
1149
         }
1150
 
1150
 
1151
-        var arr = [] 
1151
+        var arr = []
1152
         arr = this.unique(this.advices)
1152
         arr = this.unique(this.advices)
1153
         // console.log("arriooowo",arr)
1153
         // console.log("arriooowo",arr)
1154
         // if(arr!=null && arr.length >0){
1154
         // if(arr!=null && arr.length >0){
1155
-  
1155
+
1156
         //    for(let i=0;i<arr.length;i++){
1156
         //    for(let i=0;i<arr.length;i++){
1157
         //       if(arr[i].advice_name!="" && arr[i].advice_name!=undefined){
1157
         //       if(arr[i].advice_name!="" && arr[i].advice_name!=undefined){
1158
         //         arr[i].prescription_id_no = 0
1158
         //         arr[i].prescription_id_no = 0
1160
         //       }else{
1160
         //       }else{
1161
         //         arr[i].prescription_id_no = 0
1161
         //         arr[i].prescription_id_no = 0
1162
         //       }
1162
         //       }
1163
-             
1163
+
1164
         //    }
1164
         //    }
1165
         //    let dataInfo = {}
1165
         //    let dataInfo = {}
1166
         //    arr.forEach((item, index) => {
1166
         //    arr.forEach((item, index) => {
1173
         //           single_dose:item.single_dose,
1173
         //           single_dose:item.single_dose,
1174
         //           single_dose_unit:item.unit,
1174
         //           single_dose_unit:item.unit,
1175
         //           execution_time:item.execution_time,
1175
         //           execution_time:item.execution_time,
1176
-        //           execution_staff:item.execution_staff, 
1176
+        //           execution_staff:item.execution_staff,
1177
         //           advice_doctor:item.advice_doctor,
1177
         //           advice_doctor:item.advice_doctor,
1178
         //           checker:item.checker,
1178
         //           checker:item.checker,
1179
         //           check_time:item.check_time,
1179
         //           check_time:item.check_time,
1184
         //           single_dose:item.single_dose,
1184
         //           single_dose:item.single_dose,
1185
         //           single_dose_unit:item.single_dose_unit,
1185
         //           single_dose_unit:item.single_dose_unit,
1186
         //           child:[]
1186
         //           child:[]
1187
-                 
1187
+
1188
         //         }
1188
         //         }
1189
         //       }
1189
         //       }
1190
         //     })
1190
         //     })
1206
 
1206
 
1207
         this.advices = []
1207
         this.advices = []
1208
         this.advices= arr
1208
         this.advices= arr
1209
-     
1209
+
1210
         console.log("advices-----------------",this.advices)
1210
         console.log("advices-----------------",this.advices)
1211
 
1211
 
1212
-         
1213
-         
1212
+
1213
+
1214
 
1214
 
1215
         // this.loading = false;
1215
         // this.loading = false;
1216
         // console.log(this.advice_groups);
1216
         // console.log(this.advice_groups);
1227
       var arr = []
1227
       var arr = []
1228
       var count =0
1228
       var count =0
1229
       for(let i=0;i<this.projects.length;i++){
1229
       for(let i=0;i<this.projects.length;i++){
1230
-       
1230
+
1231
         if(id == this.projects[i].project_id){
1231
         if(id == this.projects[i].project_id){
1232
           arr.push(this.projects[i])
1232
           arr.push(this.projects[i])
1233
         }
1233
         }
1238
         //   if(parseInt(arr[i].single_dose)>0){
1238
         //   if(parseInt(arr[i].single_dose)>0){
1239
         //     count += parseInt(arr[i].single_dose)
1239
         //     count += parseInt(arr[i].single_dose)
1240
         //   }
1240
         //   }
1241
-        
1241
+
1242
         // }
1242
         // }
1243
         count = arr[arr.length -1].count
1243
         count = arr[arr.length -1].count
1244
       }
1244
       }
1331
         var age = jsGetAge(birthtwo, "-");
1331
         var age = jsGetAge(birthtwo, "-");
1332
         return age;
1332
         return age;
1333
       }
1333
       }
1334
-    
1334
+
1335
     },
1335
     },
1336
-   
1336
+
1337
     getDiagnosis(id) {
1337
     getDiagnosis(id) {
1338
       let arr = id.split(',')
1338
       let arr = id.split(',')
1339
       var name = ''
1339
       var name = ''
1346
     },
1346
     },
1347
 
1347
 
1348
     toUpload() {
1348
     toUpload() {
1349
-       
1349
+
1350
         let dom = document.getElementById("dialysis-print-box-64")
1350
         let dom = document.getElementById("dialysis-print-box-64")
1351
         //调用方法下载
1351
         //调用方法下载
1352
         html2canvas(dom, {
1352
         html2canvas(dom, {
1374
           const blob = this.base64ToBlob(newBase64Data, 'application/pdf');
1374
           const blob = this.base64ToBlob(newBase64Data, 'application/pdf');
1375
           this.openPdf(blob);
1375
           this.openPdf(blob);
1376
           // this.viewPdf(newBase64Data)
1376
           // this.viewPdf(newBase64Data)
1377
-          
1377
+
1378
           // var data = {
1378
           // var data = {
1379
           //   name:newBase64Data,
1379
           //   name:newBase64Data,
1380
           // }
1380
           // }
1385
           //     this.$message.success("保存成功!")
1385
           //     this.$message.success("保存成功!")
1386
           //   }
1386
           //   }
1387
           // })
1387
           // })
1388
-          
1388
+
1389
           // this.viewPdf(newBase64Data)
1389
           // this.viewPdf(newBase64Data)
1390
           //保存到pdf,名字是stone
1390
           //保存到pdf,名字是stone
1391
           // pdf.save('stone.pdf');
1391
           // pdf.save('stone.pdf');
1392
-         
1392
+
1393
         });
1393
         });
1394
       },
1394
       },
1395
-   
1395
+
1396
     viewPdf(content) {
1396
     viewPdf(content) {
1397
       console.log("content",content);
1397
       console.log("content",content);
1398
       const blob = this.base64ToBlob(content);
1398
       const blob = this.base64ToBlob(content);
1457
       });
1457
       });
1458
     },
1458
     },
1459
 
1459
 
1460
-  
1460
+
1461
   },
1461
   },
1462
   created() {
1462
   created() {
1463
     var bloodAccessParOpera = getDataConfig(
1463
     var bloodAccessParOpera = getDataConfig(

+ 3 - 3
src/xt_pages/outpatientCharges/invoiceTemplate/printEleven.vue View File

2
   <div id='invoice-print' style="position: relative;">
2
   <div id='invoice-print' style="position: relative;">
3
     <div>
3
     <div>
4
       <div style="display: inline-block; position: absolute;top: 30px;left: 30px;">{{list.order.mdtrt_id}}</div>
4
       <div style="display: inline-block; position: absolute;top: 30px;left: 30px;">{{list.order.mdtrt_id}}</div>
5
-      <div style="display: inline-block; position: absolute;top: 30px;left: 260px;">{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</div>
6
-      <div style="display: inline-block; position: absolute;top: 30px;left: 330px;">{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</div>
7
-      <div style="display: inline-block; position: absolute;top: 30px;left: 400px;">{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</div>
5
+      <div style="display: inline-block; position: absolute;top: 30px;left: 260px;">{{  list.date ? getTime(list.date, '{y}-{m}-{d}').slice(0,4): getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</div>
6
+      <div style="display: inline-block; position: absolute;top: 30px;left: 330px;">{{ list.date ?  getTime(list.date, '{y}-{m}-{d}').slice(5,7) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</div>
7
+      <div style="display: inline-block; position: absolute;top: 30px;left: 400px;">{{ list.date? getTime(list.date, '{y}-{m}-{d}').slice(8,11) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</div>
8
     </div>
8
     </div>
9
     <div>
9
     <div>
10
       <div style="position: absolute;top: 50px;left: 60px;">{{ paramsObj.name }}</div>
10
       <div style="position: absolute;top: 50px;left: 60px;">{{ paramsObj.name }}</div>

+ 269 - 0
src/xt_pages/outpatientCharges/invoiceTemplate/printfourteen.vue View File

1
+<template>
2
+  <div id='invoice-print' style="position: relative;">
3
+    <div>
4
+      <div style="display: inline-block; position: absolute;top: 30px;left: 30px;">{{list.order.mdtrt_id}}</div>
5
+
6
+    </div>
7
+    <div>
8
+      <div style="display: inline-block; position: absolute;top: 60px;left: 30px;">血液透析中心</div>
9
+      <div style="display: inline-block; position: absolute;top: 60px;left: 260px;">{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</div>
10
+      <div style="display: inline-block; position: absolute;top: 60px;left: 330px;">{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</div>
11
+      <div style="display: inline-block; position: absolute;top: 60px;left: 400px;">{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</div>
12
+    </div>
13
+    <div>
14
+      <div style="position: absolute;top: 90px;left: 60px;">{{ paramsObj.name }}</div>
15
+      <div style="display:flex;justify-content: space-between;">
16
+          <div  style="position: absolute;top:90px;left:270px;">√</div>
17
+          <div  style="position: absolute;top:90px;left:220px;"></div>
18
+          <div  style="position: absolute;top:90px;left:250px;"></div>
19
+      </div>
20
+    </div>
21
+
22
+    <div style="display:flex;justify-content: space-between;">
23
+      <div  style="position: absolute;top:120px;left:60px;" v-if="list.gender == 1">√</div>
24
+      <div  style="position: absolute;top:120px;left:80px;" v-else-if="list.gender == 2">√</div>
25
+      <div  style="position: absolute;top:120px;left:200px;">0.00</div>
26
+      <div  style="position: absolute;top:120px;left:300px;">560.40</div>
27
+      <div  style="position: absolute;top:120px;left:400px;">全自费</div>
28
+    </div>
29
+    <div style="display:flex;justify-content: space-between;">
30
+      <div v-if="list.westernMedicineCostTotal != ''">
31
+        <div  style="position: absolute;top:150px;left:0px;">西药费</div>
32
+        <div  style="position: absolute;top:150px;left:60px;">{{ list.westernMedicineCostTotal ? list.westernMedicineCostTotal.toFixed(2) : '' }}</div>
33
+      </div>
34
+      <div v-if="list.laboratoryCostTotal != ''">
35
+        <div  style="position: absolute;top:150px;left:120px;">化验费</div>
36
+        <div  style="position: absolute;top:150px;left:180px;">{{ list.laboratoryCostTotal ? list.laboratoryCostTotal.toFixed(2) : '' }}</div>
37
+      </div>
38
+      <div v-if="list.treatCostTotal != ''">
39
+        <div  style="position: absolute;top:150px;left:240px;">治疗费</div>
40
+        <div  style="position: absolute;top:150px;left:300px;">{{ list.treatCostTotal ? list.treatCostTotal.toFixed(2) : '' }}</div>
41
+      </div>
42
+      <div v-if="list.materialCostTotal != ''">
43
+        <div  style="position: absolute;top:150px;left:360px;">材料费</div>
44
+        <div  style="position: absolute;top:150px;left:420px;">{{ list.materialCostTotal ? list.materialCostTotal.toFixed(2) : '' }}</div>
45
+      </div>
46
+    </div>
47
+    <div style="display:flex;justify-content: space-between;">
48
+      <div v-if="list.chineseTraditionalMedicineCostTotal !=' '">
49
+        <div  style="position: absolute;top:180px;left:0px;">中成药</div>
50
+        <div  style="position: absolute;top:180px;left:60px;">{{ list.chineseTraditionalMedicineCostTotal ? list.chineseTraditionalMedicineCostTotal.toFixed(2) : '' }}</div>
51
+      </div>
52
+      <div v-if="list.zhenChaCostTotal !=''">
53
+        <div  style="position: absolute;top:180px;left:120px;">诊疗费</div>
54
+        <div  style="position: absolute;top:180px;left:180px;">{{ list.zhenChaCostTotal ? list.zhenChaCostTotal.toFixed(2) : '' }}</div>
55
+      </div>
56
+      <div>
57
+        <div  style="position: absolute;top:180px;left:240px;"></div>
58
+        <div  style="position: absolute;top:180px;left:300px;"></div>
59
+      </div>
60
+      <div v-if="list.otherCostTotal !=''">
61
+        <div  style="position: absolute;top:180px;left:360px;"> 其他</div>
62
+        <div  style="position: absolute;top:180px;left:420px;">{{ list.otherCostTotal ? list.otherCostTotal.toFixed(2) : '' }}</div>
63
+      </div>
64
+    </div>
65
+    <div style="display:flex;justify-content: space-between;">
66
+      <div>
67
+        <div  style="position: absolute;top:210px;left:0px;"></div>
68
+        <div  style="position: absolute;top:210px;left:60px;"></div>
69
+      </div>
70
+      <div v-if="list.checkCostTotal !=''">
71
+        <div  style="position: absolute;top:210px;left:120px;">检查费</div>
72
+        <div  style="position: absolute;top:210px;left:180px;">{{ list.checkCostTotal ? list.checkCostTotal.toFixed(2) : '' }}</div>
73
+      </div>
74
+      <div >
75
+        <div  style="position: absolute;top:210px;left:240px;"></div>
76
+        <div  style="position: absolute;top:210px;left:300px;"></div>
77
+      </div>
78
+      <div v-if="list.hiliCostTotal !=''">
79
+        <div  style="position: absolute;top:210px;left:360px;">护理费</div>
80
+        <div  style="position: absolute;top:210px;left:420px;">{{list.hiliCostTotal ? list.hiliCostTotal.toFixed(2) : ''}}</div>
81
+      </div>
82
+    </div>
83
+    <div style="display:flex;justify-content: space-between;">
84
+      <div  style="position: absolute;top:202px;left:60px;"></div>
85
+      <div  style="position: absolute;top:202px;left:180px;"></div>
86
+      <div  style="position: absolute;top:202px;left:320px;"></div>
87
+      <div  style="position: absolute;top:202px;left:480px;"></div>
88
+    </div>
89
+    <div>
90
+      <span>
91
+        <span  style="position: absolute;top:290px;left:100px">
92
+          <span v-if="zhongwen.indexOf('万') > -1 && zhongwen.indexOf('拾') > -1 && zhongwen.indexOf('拾') == 1">
93
+                    {{ zhongwen.substring(0,1) }}
94
+                </span>
95
+                <span v-else>零</span>
96
+        </span>
97
+        <span  style="position: absolute;top:290px;left:140px">
98
+            <span v-if="zhongwen.indexOf('万') > -1">
99
+                    {{ zhongwen.substring(zhongwen.indexOf('万') - 1,zhongwen.indexOf('万')) }}
100
+                </span>
101
+                <span v-else>零</span>
102
+        </span>
103
+        <span  style="position: absolute;top:290px;left:190px">
104
+            <span v-if="zhongwen.indexOf('仟') > -1">
105
+                    {{ zhongwen.substring(zhongwen.indexOf('仟') - 1,zhongwen.indexOf('仟')) }}
106
+                </span>
107
+                <span v-else>零</span>
108
+        </span>
109
+        <span  style="position: absolute;top:290px;left:260px">
110
+            <span v-if="zhongwen.indexOf('佰') > -1">
111
+                    {{ zhongwen.substring(zhongwen.indexOf('佰') - 1,zhongwen.indexOf('佰')) }}
112
+                </span>
113
+                <span v-else>零</span>
114
+        </span>
115
+        <span style="position: absolute;top:290px;left:310px">
116
+            <span v-if="zhongwen.indexOf('拾') > -1">
117
+                    {{zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾')) == '佰' ||  !zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾'))? '壹' : zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾')) }}
118
+                </span>
119
+                <span v-else>零</span>
120
+        </span>
121
+        <span  style="position: absolute;top:290px;left:380px">
122
+           <span v-if="zhongwen.indexOf('元') > -1 && zhongwen.substring(this.zhongwen.indexOf('元') - 1).substring(0,1)!= '拾'">
123
+                    {{ zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) }}
124
+                </span>
125
+                <span v-else>零</span>
126
+        </span>
127
+        <span  style="position: absolute;top:290px;left:450px">
128
+             <span v-if="zhongwen.indexOf('角') > -1">
129
+                    {{ zhongwen.substring(zhongwen.indexOf('角') - 1,zhongwen.indexOf('角')) }}
130
+                </span>
131
+                <span v-else>零</span>
132
+        </span>
133
+        <span  style="position: absolute;top:290px;left:510px">
134
+             <span v-if="zhongwen.indexOf('分') > -1">
135
+                    {{ zhongwen.substring(zhongwen.indexOf('分') - 1,zhongwen.indexOf('分')) }}
136
+                </span>
137
+                <span v-else>零</span>
138
+        </span>
139
+      </span>
140
+      <span style="position: absolute;top:290px;left:600px">{{ totalPrice.toFixed(2) }}</span>
141
+    </div>
142
+
143
+    <div style="display:flex;justify-content: space-between;">
144
+      <div style="position: absolute;top:390px;left:100px;">{{ org_name}}</div>
145
+      <div style="position: absolute;top:390px;left:240px;"></div>
146
+      <div style="position: absolute;top:390px;left:460px;">{{list.admin_user_name}}</div>
147
+    </div>
148
+  </div>
149
+</template>
150
+<script>
151
+import { getInvoice } from '@/api/project/project'
152
+import { uParseTime } from '@/utils/tools'
153
+export default {
154
+  props:{
155
+    paramsObj:Object
156
+  },
157
+  data(){
158
+    return{
159
+      gender:'',
160
+      list:{},
161
+      printDate:'',
162
+      zhongwen:'',
163
+      totalPrice:0.0,
164
+      org_id:'',
165
+      org_name:''
166
+    }
167
+  },
168
+  created(){
169
+    // console.log('paramsObj',this.paramsObj)
170
+    let params = {
171
+      order_id: this.paramsObj.order_id,
172
+      patient_id: this.paramsObj.patient_id,
173
+      number: this.paramsObj.number,
174
+    }
175
+    this.getInvoice(params)
176
+    this.org_id = this.$store.getters.xt_user.org_id
177
+    this.org_name = this.$store.getters.xt_user.org.org_name
178
+  },
179
+  methods:{
180
+    getInvoice(params){
181
+      getInvoice(params).then((res) => {
182
+        // console.log('res',res)
183
+        this.list = res.data.data
184
+        this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
185
+          this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal + this.list.zhenChaCostTotal + this.list.hiliCostTotal
186
+        if(this.totalPrice == 0){
187
+
188
+          this.totalPrice = this.list.medfee_sumamt
189
+        }
190
+        // console.log( "this.totalPrice")
191
+
192
+        this.smalltoBIG(this.totalPrice.toFixed(2))
193
+        var data = new Date(res.data.data.date * 1000);
194
+        var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
195
+        var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
196
+        this.printDate = data.getFullYear() + "-" + month + "-" + date;
197
+        this.gender = this.list.gender
198
+      })
199
+    },
200
+    smalltoBIG(n) {
201
+      // let fraction = ['角', '分'];
202
+      // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
203
+      // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
204
+      // let head = price < 0 ? '欠' : '';
205
+      // price = Math.abs(price);
206
+      // let upper = '';
207
+      // for (let i = 0; i < fraction.length; i++) {
208
+      // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
209
+      // }
210
+      // upper = upper || '整';
211
+      // price = Math.floor(price);
212
+      // for (let i = 0; i < unit[0].length && price > 0; i++) {
213
+      // let p = '';
214
+      // for (let j = 0; j < unit[1].length && price > 0; j++) {
215
+      //     p = digit[price % 10] + unit[1][j] + p;
216
+      //     price = Math.floor(price / 10);
217
+      // }
218
+      // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
219
+      // }
220
+      // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
221
+      // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
222
+      if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
223
+        return "数据非法";  //判断数据是否大于0
224
+      }
225
+
226
+      var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
227
+      n += "00";
228
+
229
+      var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
230
+
231
+      if (indexpoint >= 0){
232
+
233
+        n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
234
+      }
235
+
236
+      unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
237
+      for (var i=0; i < n.length; i++){
238
+        str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
239
+      }
240
+
241
+      this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
242
+      // console.log(this.zhongwen)
243
+    },
244
+    getTime(value, temp) {
245
+      if (value == 0) {
246
+        return ''
247
+      }
248
+      if (value != undefined) {
249
+        return uParseTime(value, temp)
250
+      }
251
+      return ''
252
+    },
253
+  },
254
+  watch:{
255
+    paramsObj:{//深度监听,可监听到对象、数组的变化
256
+      handler(val, oldVal){
257
+        let params = {
258
+          order_id: val.order_id,
259
+          patient_id: val.patient_id,
260
+          number: val.number,
261
+        }
262
+        this.getInvoice(params)
263
+
264
+      },
265
+      deep:true
266
+    }
267
+  }
268
+}
269
+</script>