浏览代码

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 9 个月前
父节点
当前提交
a2d164e3e2

+ 4 - 2
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

1150
         }
1150
         }
1151
 
1151
 
1152
         console.log("第一条监测数据23333333333333333",this.first_monitor)
1152
         console.log("第一条监测数据23333333333333333",this.first_monitor)
1153
-
1154
-        this.assessmentBeforeDislysis.last_weight = (this.last_record.weight_after - this.last_record.additional_weight).toFixed(1)
1153
+        if(this.last_record!=null){
1154
+          this.assessmentBeforeDislysis.last_weight = (this.last_record.weight_after - this.last_record.additional_weight).toFixed(1)
1155
+        }
1156
+       
1155
 
1157
 
1156
         if(this.lastPredialysisEvaluation != null) {
1158
         if(this.lastPredialysisEvaluation != null) {
1157
         // if(this.lastPredialysisEvaluation.remark == "" && this.$store.getters.xt_user.org.id == 10307){
1159
         // if(this.lastPredialysisEvaluation.remark == "" && this.$store.getters.xt_user.org.id == 10307){

+ 332 - 287
src/xt_pages/dialysis/template/DialysisPrintOrderSeventyeight.vue 查看文件

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <el-button type="primary" @click="checkData">一键核对</el-button>
3
     <el-button type="primary" @click="checkData">一键核对</el-button>
4
+    <el-button type="primary" @click="toUpload">一键上传</el-button>
4
 
5
 
5
     <div id="dialysis-print-box-1"  ref="pdfContent">
6
     <div id="dialysis-print-box-1"  ref="pdfContent">
6
       <div
7
       <div
208
                     </div>
209
                     </div>
209
                   </div>
210
                   </div>
210
 
211
 
211
-                  <div class="row" style="padding: 2px 0; line-height: 23px; display: flex"> 
212
+                  <div class="row"
213
+                    style="padding: 2px 0; line-height: 23px; display: flex"
214
+                  >
212
                     <!-- <div class="inline_block" style=" flex: 1">
215
                     <!-- <div class="inline_block" style=" flex: 1">
213
                       透析期间:
216
                       透析期间:
214
                       <div
217
                       <div
273
                         {{ predialysis.complication ? predialysis.complication : "/" }}
276
                         {{ predialysis.complication ? predialysis.complication : "/" }}
274
                       </div>
277
                       </div>
275
                     </div>
278
                     </div>
279
+                    <!-- <div class="inline_block" style=" flex: 1">
280
+                      跌倒评估:
281
+                      <div
282
+                        style="width: 50%; text-align: center;display: inline-block;border-bottom: 1px solid #999;"
283
+                      >
284
+                        {{ receiverTreatmentAccess.score ? receiverTreatmentAccess.score : '/' }}
285
+                      </div>
286
+                    </div> -->
276
                   </div>
287
                   </div>
277
 
288
 
278
                   <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
289
                   <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
289
                       <div
300
                       <div
290
                         style="width: 50%; text-align: center;display: inline-block;border-bottom: 1px solid #999;"
301
                         style="width: 50%; text-align: center;display: inline-block;border-bottom: 1px solid #999;"
291
                       >
302
                       >
292
-                        {{ predialysis.weight_before ? 
303
+                        {{ predialysis.weight_before ?
293
                           parseFloat( predialysis.weight_before - predialysis.additional_weight ).toFixed(1) : "/"
304
                           parseFloat( predialysis.weight_before - predialysis.additional_weight ).toFixed(1) : "/"
294
                         }}
305
                         }}
295
                       </div>kg
306
                       </div>kg
302
                         class="under_line"
313
                         class="under_line"
303
                         style=" width: 50%;text-align: center;white-space: normal;"
314
                         style=" width: 50%;text-align: center;white-space: normal;"
304
                       >
315
                       >
305
-                      {{ predialysis.weight_before > 0 && predialysis.dry_weight > 0 ? 
316
+                      {{ predialysis.weight_before > 0 && predialysis.dry_weight > 0 ?
306
                       parseFloat(predialysis.weight_before - predialysis.dry_weight - predialysis.additional_weight).toFixed(2): "/" }}
317
                       parseFloat(predialysis.weight_before - predialysis.dry_weight - predialysis.additional_weight).toFixed(2): "/" }}
307
                       </div>kg
318
                       </div>kg
308
                     </div>
319
                     </div>
309
                     <div class="inline_block" style=" flex: 1">
320
                     <div class="inline_block" style=" flex: 1">
310
-                      <!-- 合并症
311
-                      <div class="under_line"
312
-                        style=" width: 50%;text-align: center; white-space: normal;"
321
+                      <!-- 预增脱水量
322
+                      <div
323
+                        style="width: 50%; text-align: center;display: inline-block;border-bottom: 1px solid #999;"
313
                       >
324
                       >
314
-                        {{ predialysis.complication ? predialysis.complication : "/" }}
315
-                      </div> -->
325
+                         {{predialysis.dehydration?predialysis.dehydration:"" }}
326
+                      </div>L -->
316
                     </div>
327
                     </div>
317
                   </div>
328
                   </div>
318
                 </td>
329
                 </td>
398
                         {{ afterdialysis.symptom_after_dialysis ? afterdialysis.symptom_after_dialysis : "/" }}
409
                         {{ afterdialysis.symptom_after_dialysis ? afterdialysis.symptom_after_dialysis : "/" }}
399
                       </div>
410
                       </div>
400
                     </div>
411
                     </div>
401
-                    
412
+
402
                   </div>
413
                   </div>
403
 
414
 
404
                   <div class="row" style="padding: 2px 0; line-height: 23px; display: flex"
415
                   <div class="row" style="padding: 2px 0; line-height: 23px; display: flex"
434
                         }}
445
                         }}
435
                       </div>
446
                       </div>
436
                     </div>
447
                     </div>
437
-                    <div class="inline_block" style="flex:1;" v-if="prescription.mode_id ==2 || prescription.mode_id == 12">
448
+                    <div class="inline_block" style="flex:1;">
438
                       实际置换量:
449
                       实际置换量:
439
                       <div style="width: 50%;text-align: center;display: inline-block;border-bottom: 1px solid #999; ">
450
                       <div style="width: 50%;text-align: center;display: inline-block;border-bottom: 1px solid #999; ">
440
                         {{ afterdialysis.actual_displacement ? afterdialysis.actual_displacement : "/" }}
451
                         {{ afterdialysis.actual_displacement ? afterdialysis.actual_displacement : "/" }}
493
                       </div>kg
504
                       </div>kg
494
                     </div>
505
                     </div>
495
                     <div class="inline_block" style="flex:1;">
506
                     <div class="inline_block" style="flex:1;">
496
-                      <!-- 透析中入量:
507
+                      透析中入量:
497
                       <div style="width: 50%;text-align: center;display: inline-block;border-bottom: 1px solid #999; ">
508
                       <div style="width: 50%;text-align: center;display: inline-block;border-bottom: 1px solid #999; ">
498
                         {{ afterdialysis.dialysis_intakes
509
                         {{ afterdialysis.dialysis_intakes
499
                             ? afterdialysis.dialysis_intakes
510
                             ? afterdialysis.dialysis_intakes
500
                             : "/"}}
511
                             : "/"}}
501
                       </div>
512
                       </div>
502
-                      {{ getUnit(afterdialysis.dialysis_intakes_unit) }} -->
513
+                      {{ getUnit(afterdialysis.dialysis_intakes_unit) }}
503
                     </div>
514
                     </div>
504
                   </div>
515
                   </div>
505
                 </td>
516
                 </td>
539
                       <div class="under_line"
550
                       <div class="under_line"
540
                         style="width: 80px; text-align: center; font-weight: 600;
551
                         style="width: 80px; text-align: center; font-weight: 600;
541
                         "
552
                         "
542
-                      > 
543
-                        {{ prescription.mode ? prescription.mode :'' }}
553
+                      >
554
+                        <span v-if="!prescription.mode_id">/</span>
555
+                        <span v-if="prescription.mode_id == 1">HD</span>
556
+                        <span v-if="prescription.mode_id == 2">HDF</span>
557
+                        <span v-if="prescription.mode_id == 3">HD+HP</span>
558
+                        <span v-if="prescription.mode_id == 4">HP</span>
559
+                        <span v-if="prescription.mode_id == 5">HF</span>
560
+                        <span v-if="prescription.mode_id == 6">SCUF</span>
561
+                        <span v-if="prescription.mode_id == 7">IUF</span>
562
+                        <span v-if="prescription.mode_id == 8">HFHD</span>
563
+                        <span v-if="prescription.mode_id == 9">HFHD+HP</span>
564
+                        <span v-if="prescription.mode_id == 10">PHF</span>
565
+                        <span v-if="prescription.mode_id == 11">HFR</span>
566
+                        <span v-if="prescription.mode_id == 12">HDF+HP</span>
567
+                        <span v-if="prescription.mode_id == 13">CRRT</span>
568
+                        <span v-if="prescription.mode_id == 14">腹水回输</span>
569
+                        <span v-if="prescription.mode_id == 15">HD前置换</span>
570
+                        <span v-if="prescription.mode_id == 16">HD后置换</span>
571
+                        <span v-if="prescription.mode_id == 17">HDF前置换</span>
572
+                        <span v-if="prescription.mode_id == 18">HDF后置换</span>
573
+                        <span v-if="prescription.mode_id == 19">IUF+HD</span>
574
+                        <span v-if="prescription.mode_id == 22">血浆胆红素吸附+HDF</span>
575
+                        <span v-if="prescription.mode_id == 23">血浆胆红素吸附</span>
576
+                        <span v-if="prescription.mode_id == 24">I-HDF</span>
577
+                        <span v-if="prescription.mode_id == 25">HD高通</span>
578
+                        <span v-if="prescription.mode_id == 29">PE</span>
579
+                        <span v-if="prescription.mode_id == 30">血浆胆红素吸附+HP</span>
544
                       </div>
580
                       </div>
545
                     </div>
581
                     </div>
546
-                    <div class="inline_block" style="flex: 1" v-if="prescription.mode_id ==2 || prescription.mode_id == 12">
582
+                    <div class="inline_block" style="flex: 1">
547
                       置换方式:
583
                       置换方式:
548
                       <div class="under_line" style="width: 80px; text-align: center">
584
                       <div class="under_line" style="width: 80px; text-align: center">
549
                         {{
585
                         {{
551
                         }}
587
                         }}
552
                       </div>
588
                       </div>
553
                     </div>
589
                     </div>
554
-                    <div class="inline_block" style="flex: 1" v-if="prescription.mode_id ==2 || prescription.mode_id == 12">
590
+                    <div class="inline_block" style="flex: 1">
555
                       置换总量:
591
                       置换总量:
556
                       <div class="under_line" style="width: 70px; text-align: center">
592
                       <div class="under_line" style="width: 70px; text-align: center">
557
                         <span > {{
593
                         <span > {{
573
                         {{ predialysis.blood_access_part_opera_name }}
609
                         {{ predialysis.blood_access_part_opera_name }}
574
                       </div>
610
                       </div>
575
                     </div>
611
                     </div>
612
+                    <div class="inline_block" style="flex: 1">
613
+                      血流量:
614
+                      <div class="under_line" style="width: 50px; text-align: center">
615
+                        {{ prescription.blood_flow_volume ? prescription.blood_flow_volume : "/" }}
616
+                      </div>ml/min
617
+                    </div>
618
+
619
+                  </div>
620
+
621
+                  <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
576
                     <div class="inline_block" style="flex: 2">
622
                     <div class="inline_block" style="flex: 2">
577
                       人工肾装置:
623
                       人工肾装置:
578
                       <div class="under_line" style="width: 50%; text-align: center">
624
                       <div class="under_line" style="width: 50%; text-align: center">
582
                         }}
628
                         }}
583
                       </div>
629
                       </div>
584
                     </div>
630
                     </div>
585
-                    <div class="inline_block" style="flex: 1">
586
-                      血流量
631
+                     <div class="inline_block" style="flex: 1">
632
+                      膜面积
587
                       <div class="under_line" style="width: 50px; text-align: center">
633
                       <div class="under_line" style="width: 50px; text-align: center">
588
-                        {{ prescription.blood_flow_volume ? prescription.blood_flow_volume : "/" }}
589
-                      </div>ml/min
634
+
635
+                      </div>㎡
636
+                    </div>
637
+                    <div class="inline_block" style="flex: 1">
638
+                      膜材质:
639
+                      <div class="under_line" style="width: 80px; text-align: center">
640
+
641
+                      </div>
642
+                    </div>
643
+                    <div class="inline_block" style="flex: 1">
644
+                      透析机型:
645
+                      <div class="under_line" style="width: 80px; text-align: center">
646
+                        {{ predialysis.machine_type ? predialysis.machine_type : '' }}
647
+                      </div>
590
                     </div>
648
                     </div>
591
                     <div class="inline_block" style="flex: 1">
649
                     <div class="inline_block" style="flex: 1">
592
                       机号:
650
                       机号:
594
                         {{ dialysisOrder && dialysisOrder.DeviceNumber && dialysisOrder.DeviceNumber.number.length > 0
652
                         {{ dialysisOrder && dialysisOrder.DeviceNumber && dialysisOrder.DeviceNumber.number.length > 0
595
                         ? dialysisOrder.DeviceNumber.number : patientInfo.DialysisSchedule.device_number.number }}
653
                         ? dialysisOrder.DeviceNumber.number : patientInfo.DialysisSchedule.device_number.number }}
596
                       </div>
654
                       </div>
655
+
597
                     </div>
656
                     </div>
598
                   </div>
657
                   </div>
599
 
658
 
610
                             : "/"
669
                             : "/"
611
                         }}
670
                         }}
612
                         </span>
671
                         </span>
613
-                        
672
+
614
                       </div>
673
                       </div>
615
                     </div>
674
                     </div>
616
                     <div
675
                     <div
617
                       class="inline_block"
676
                       class="inline_block"
618
                       style="margin-left: 20px"
677
                       style="margin-left: 20px"
619
-                      v-if="prescription.anticoagulant != 5 && 
620
-                      prescription.anticoagulant !=1 && prescription.anticoagulant !=''"
678
+                      v-if="prescription.anticoagulant != 5"
621
                     >
679
                     >
622
                       首剂:
680
                       首剂:
623
                       <div
681
                       <div
643
                      <span v-if="prescription.anticoagulant == 11">iu</span>
701
                      <span v-if="prescription.anticoagulant == 11">iu</span>
644
                      <span v-if="prescription.anticoagulant == 13">iu</span>
702
                      <span v-if="prescription.anticoagulant == 13">iu</span>
645
 
703
 
646
-                  
704
+
647
                     </div>
705
                     </div>
648
                     <div class="inline_block" style="margin-left: 20px">
706
                     <div class="inline_block" style="margin-left: 20px">
649
                       维持:
707
                       维持:
650
                       <div
708
                       <div
651
-                        v-if="prescription.anticoagulant != 1 && prescription.anticoagulant !=''"
709
+                        v-if="prescription.anticoagulant == 1"
652
                         class="under_line"
710
                         class="under_line"
653
                         style="width: 50px; text-align: center"
711
                         style="width: 50px; text-align: center"
654
                       >
712
                       >
658
                             : "/"
716
                             : "/"
659
                         }}
717
                         }}
660
                       </div>
718
                       </div>
661
-                      <!-- <div
662
-                        v-if="prescription.anticoagulant != 1 && prescription.anticoagulant !=''"
719
+                      <div
720
+                        v-if="prescription.anticoagulant != 1"
663
                         class="under_line"
721
                         class="under_line"
664
                         style="width: 50px; text-align: center"
722
                         style="width: 50px; text-align: center"
665
                       >
723
                       >
668
                             ? prescription.anticoagulant_weichi
726
                             ? prescription.anticoagulant_weichi
669
                             : "0"
727
                             : "0"
670
                         }}
728
                         }}
671
-                      </div> -->
729
+                      </div>
672
 
730
 
673
                         <span v-if="prescription.anticoagulant == 5">ml/h</span>
731
                         <span v-if="prescription.anticoagulant == 5">ml/h</span>
674
                           <span v-if="prescription.anticoagulant == 4">mg/h</span>
732
                           <span v-if="prescription.anticoagulant == 4">mg/h</span>
684
                           <span v-if="prescription.anticoagulant == 13">iu/h</span>
742
                           <span v-if="prescription.anticoagulant == 13">iu/h</span>
685
 
743
 
686
                     </div>
744
                     </div>
687
-                    <div class="inline_block" style="margin-left: 20px"
688
-                      v-if="prescription.anticoagulant == 5 "
745
+                    <div
746
+                      class="inline_block"
747
+                      style="margin-left: 20px"
748
+                      v-if="prescription.anticoagulant == 5"
689
                     >
749
                     >
690
                       钙名称:
750
                       钙名称:
691
                       <div
751
                       <div
699
                         }}
759
                         }}
700
                       </div>
760
                       </div>
701
                     </div>
761
                     </div>
702
-                    <div class="inline_block" style="margin-left: 20px"
762
+                    <div
763
+                      class="inline_block"
764
+                      style="margin-left: 20px"
703
                       v-if="prescription.anticoagulant == 5"
765
                       v-if="prescription.anticoagulant == 5"
704
                     >
766
                     >
705
                       钙剂量:
767
                       钙剂量:
715
                       </div>
777
                       </div>
716
                       ml
778
                       ml
717
                     </div>
779
                     </div>
718
-                    <div class="inline_block" style="margin-left: 20px"
719
-                      v-if="prescription.anticoagulant != 5 && 
720
-                      prescription.anticoagulant != 1 && prescription.anticoagulant !=''"
780
+                    <div
781
+                      class="inline_block"
782
+                      style="margin-left: 20px"
783
+                      v-if="prescription.anticoagulant != 5"
721
                     >
784
                     >
722
                       总量:
785
                       总量:
723
                       <div
786
                       <div
742
                        <span v-if="prescription.anticoagulant == 10">iu</span>
805
                        <span v-if="prescription.anticoagulant == 10">iu</span>
743
                       <span v-if="prescription.anticoagulant == 11">iu</span>
806
                       <span v-if="prescription.anticoagulant == 11">iu</span>
744
                       <span v-if="prescription.anticoagulant == 13">iu</span>
807
                       <span v-if="prescription.anticoagulant == 13">iu</span>
745
-                   
746
-                    </div>
747
-                    <div class="inline_block" style="flex: 1">
748
-                      透析机型:
749
-                      <div class="under_line" style="width: 80px; text-align: center">
750
-                        {{ predialysis.machine_type ? predialysis.machine_type : '' }}
751
-                      </div>
808
+
752
                     </div>
809
                     </div>
810
+
753
                   </div>
811
                   </div>
754
 
812
 
755
                   <div class="row" style="padding: 2px 0; line-height: 23px">
813
                   <div class="row" style="padding: 2px 0; line-height: 23px">
879
                             >({{ advice.remark }})</span
937
                             >({{ advice.remark }})</span
880
                           >
938
                           >
881
                         </td>
939
                         </td>
882
-                       
940
+
883
                         <td height="32px">
941
                         <td height="32px">
884
                           <span v-if="advice!=null && advice.advice_doctor>0">
942
                           <span v-if="advice!=null && advice.advice_doctor>0">
885
                               <span
943
                               <span
921
                           <img style="height:30px;" :src="setAdminUserES(advice.checker)" alt="" srcset="" v-else>
979
                           <img style="height:30px;" :src="setAdminUserES(advice.checker)" alt="" srcset="" v-else>
922
                         </td>
980
                         </td>
923
                       </tr>
981
                       </tr>
924
-                  
982
+
925
                     </tbody>
983
                     </tbody>
926
                   </table>
984
                   </table>
927
                 </td>
985
                 </td>
988
                           {{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : '0'  }}
1046
                           {{ monitor.ultrafiltration_volume ? monitor.ultrafiltration_volume : '0'  }}
989
                         </td>
1047
                         </td>
990
                         <td>
1048
                         <td>
991
-                          {{ monitor.replacement_rate ? monitor.replacement_rate : '0' }} / 
1049
+                          {{ monitor.replacement_rate ? monitor.replacement_rate : '0' }} /
992
                           {{ monitor.displacement_quantity ? monitor.displacement_quantity : '0'  }}
1050
                           {{ monitor.displacement_quantity ? monitor.displacement_quantity : '0'  }}
993
                         </td>
1051
                         </td>
994
                         <!-- 钠浓度(mmol/L)/温度°C -->
1052
                         <!-- 钠浓度(mmol/L)/温度°C -->
995
                         <td>
1053
                         <td>
996
-                          {{ monitor.sodium_concentration ? monitor.sodium_concentration : "0" }} / 
1054
+                          {{ monitor.sodium_concentration ? monitor.sodium_concentration : "0" }} /
997
                           {{ monitor.temperature ? monitor.temperature : '0' }}
1055
                           {{ monitor.temperature ? monitor.temperature : '0' }}
998
                         </td>
1056
                         </td>
999
 
1057
 
1018
                                 "
1076
                                 "
1019
                                 >【开始透析】引血{{ dialysisOrder.blood_drawing }} ml/min
1077
                                 >【开始透析】引血{{ dialysisOrder.blood_drawing }} ml/min
1020
                                 </template>
1078
                                 </template>
1021
-                              
1079
+
1022
                                 {{ monitor.dispose }} {{ monitor.end }}  &nbsp;
1080
                                 {{ monitor.dispose }} {{ monitor.end }}  &nbsp;
1023
                               &nbsp;
1081
                               &nbsp;
1024
                             </span>
1082
                             </span>
1244
 
1302
 
1245
                     <div class="inline_block" style="flex: 2">
1303
                     <div class="inline_block" style="flex: 2">
1246
                       透后宣教:
1304
                       透后宣教:
1247
-                      <div class="under_line" style="width: 80%; text-align: center;white-space: normal;">
1305
+                      <div class="under_line" style="width: 70%; text-align: center">
1248
                         {{ summary.mission ? summary.mission : '/' }}
1306
                         {{ summary.mission ? summary.mission : '/' }}
1249
-                      </div>                     
1307
+                      </div>
1250
                     </div>
1308
                     </div>
1251
                   </div>
1309
                   </div>
1252
 
1310
 
1576
         </div>
1634
         </div>
1577
       </div>
1635
       </div>
1578
     </div>
1636
     </div>
1579
-     
1637
+
1580
   </div>
1638
   </div>
1581
 </template>
1639
 </template>
1582
 
1640
 
1728
       },
1786
       },
1729
       org_id: 0,
1787
       org_id: 0,
1730
       projectsOne: [],
1788
       projectsOne: [],
1731
-      checkDate:[{value:'this.predialysis.temperature',label:'透前体温未填'},
1732
-                  {value:'this.predialysis.pulse_frequency',label:'透前脉搏未填'}],
1733
     };
1789
     };
1734
   },
1790
   },
1735
   methods: {
1791
   methods: {
1792
+    toUpload() {
1793
+
1794
+         let dom = document.getElementById("dialysis-print-box-1")
1795
+         //调用方法下载
1796
+         html2canvas(dom, {
1797
+           useCORS: true, //允许跨域
1798
+           allowTaint: false,
1799
+           logging: false,
1800
+           letterRendering: true,
1801
+           ddpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
1802
+           scale: 4, //按比例增加分辨率
1803
+           background: '#fff',//pdf背景色为白色,默认是黑色的
1804
+         }).then((canvas) => {
1805
+           //返回图片dataURL,参数:图片格式和清晰度(0-1)
1806
+           var pageData = canvas.toDataURL('image/jpeg', 1.0);
1807
+
1808
+           //方向默认竖直,尺寸ponits,格式a4[595.28,841.89]
1809
+           var pdf = new jsPDF('', 'pt', 'a4');
1810
+
1811
+           //addImage后两个参数控制添加图片的尺寸,此处将页面高度按照a4纸宽高比列进行压缩
1812
+           //  pdf.addImage(pageData, 'JPEG', 0, 0, 595.28, 592.28 / canvas.width * canvas.height);
1813
+           pdf.addImage(pageData, 'JPEG', 0, 0, 555.28, 592.28 / canvas.width * canvas.height);
1814
+
1815
+           console.log("pdf222222222222222222",pdf)
1816
+
1817
+           var newBase64Data =  pdf.output("dataurlstring").split("base64,")[1]
1818
+           // console.log("base63",newBase64Data)
1819
+           const blob = this.base64ToBlob(newBase64Data, 'application/pdf');
1820
+           console.log("blobwoowowowwo",blob)
1821
+           this.openPdf(blob);
1822
+
1823
+           // var data = {
1824
+           //   name:newBase64Data,
1825
+           // }
1826
+           // UploadPrintOrder(data).then(response=>{
1827
+           //   if(response.data.state == 1){
1828
+           //     var sign =  response.data.data.sign
1829
+           //     console.log("SIGNWWOOWWO")
1830
+           //     var pdfBase64 = response.data.data.pdfBase64
1831
+           //     console.log("pdfBase64",pdfBase64)
1832
+           //     this.$message.success("保存成功!")
1833
+           //     const blob = this.base64ToBlob(pdfBase64, 'application/pdf');
1834
+           //     this.openPdf(blob);
1835
+           //   }
1836
+           // })
1837
+
1838
+           // this.viewPdf(newBase64Data)
1839
+           //保存到pdf,名字是stone
1840
+           // pdf.save('stone.pdf');
1841
+
1842
+         });
1843
+       },
1736
 
1844
 
1737
      viewPdf(content) {
1845
      viewPdf(content) {
1738
        console.log("content",content);
1846
        console.log("content",content);
1819
     },
1927
     },
1820
 
1928
 
1821
     checkData() {
1929
     checkData() {
1822
-      var checkDate =[]
1823
       if (this.predialysis.temperature == '') {
1930
       if (this.predialysis.temperature == '') {
1824
-        const obj = "透前体温"
1825
-        checkDate.push(obj)
1826
-      } if (this.predialysis.pulse_frequency == "") {
1827
-        const obj1 = "透前脉搏"
1828
-        checkDate.push(obj1)
1829
-      } if (this.predialysis.breathing_rate == "") {
1830
-         const obj2 = "透前呼吸频率"
1831
-         checkDate.push(obj2)
1832
-      } if (
1931
+        this.$message.error("透前体温未填");
1932
+      } else if (this.predialysis.pulse_frequency == "") {
1933
+        this.$message.error("透前脉搏未填");
1934
+      } else if (this.predialysis.breathing_rate == "") {
1935
+        this.$message.error("透前呼吸频率未填");
1936
+      } else if (
1833
         this.predialysis.systolic_blood_pressure == 0 ||
1937
         this.predialysis.systolic_blood_pressure == 0 ||
1834
         this.predialysis.diastolic_blood_pressure == 0
1938
         this.predialysis.diastolic_blood_pressure == 0
1835
       ) {
1939
       ) {
1836
-        const obj3 = "透前血压"
1837
-        checkDate.push(obj3)
1838
-      } if (this.predialysis.symptom_before_dialysis == "") {
1839
-        const obj5 = "透前症状"
1840
-        checkDate.push(obj5)
1841
-      } if (this.predialysis.internal_fistula == "" || this.predialysis.catheter == "") {
1842
-        const obj6 = "透前内瘘,导管"
1843
-        checkDate.push(obj6)
1844
-      } if (this.predialysis.complication == "" ) {
1845
-        const obj7 = "合并症"
1846
-        checkDate.push(obj7)
1847
-      } if (this.predialysis.dry_weight == '' ) {
1848
-        const obj8 = "干体重"
1849
-        checkDate.push(obj8)
1850
-      } if ( this. predialysis.weight_before == '') {
1851
-        const obj9 = "透前体重"
1852
-        checkDate.push(obj9)
1853
-      } if (this.afterdialysis.temperature == '') {
1854
-        const obj10 = "透后体温"
1855
-        checkDate.push(obj10)
1856
-      } if (this.afterdialysis.pulse_frequency == "") {
1857
-        const obj11 = "透后脉搏"
1858
-        checkDate.push(obj11)
1859
-      } if (this.afterdialysis.breathing_rate == "") {
1860
-        const obj12 = "透后呼吸频率"
1861
-        checkDate.push(obj12)
1862
-      } if (
1940
+        this.$message.error("透前血压未填完整");
1941
+      }
1942
+      // else if (this.predialysis.dialysis_interphase == "") {
1943
+      //   this.$message.error("透析期间未填");
1944
+      // }
1945
+      else if (this.predialysis.symptom_before_dialysis == "") {
1946
+        this.$message.error("透前症状未填");
1947
+      } else if (this.predialysis.internal_fistula == "") {
1948
+        this.$message.error("透前内瘘未填");
1949
+      } else if (this.predialysis.catheter == "") {
1950
+        this.$message.error("透前导管未填");
1951
+      } else if (this.predialysis.complication == "" ) {
1952
+        this.$message.error("合并症未填");
1953
+      } else if (this.receiverTreatmentAccess.score == "") {
1954
+        this.$message.error("跌倒评估未填");
1955
+      } else if (this.predialysis.dry_weight == '' ) {
1956
+        this.$message.error("干体重未填");
1957
+      } else if ( this. predialysis.weight_before == '') {
1958
+        this.$message.error("透前体重未填");
1959
+      } else if (this.predialysis.dehydration == '') {
1960
+        this.$message.error("预增脱水量未填");
1961
+      } else if (this.afterdialysis.temperature == '') {
1962
+        this.$message.error("透后体温未填");
1963
+      } else if (this.afterdialysis.pulse_frequency == "") {
1964
+        this.$message.error("透后脉搏未填");
1965
+      } else if (this.afterdialysis.breathing_rate == "") {
1966
+        this.$message.error("透后呼吸频率未填");
1967
+      } else if (
1863
         this.afterdialysis.systolic_blood_pressure == 0 ||
1968
         this.afterdialysis.systolic_blood_pressure == 0 ||
1864
         this.afterdialysis.diastolic_blood_pressure == 0
1969
         this.afterdialysis.diastolic_blood_pressure == 0
1865
       ) {
1970
       ) {
1866
-        const obj13 = "透后血压"
1867
-        checkDate.push(obj13)
1868
-      } if (this.afterdialysis.cruor == "") {
1869
-        const obj14 = "凝血"
1870
-        checkDate.push(obj14)
1871
-      } if (this.afterdialysis.symptom_after_dialysis == "") {
1872
-        const obj15 = "透后症状"
1873
-        checkDate.push(obj15)
1874
-      } if (this.afterdialysis.internal_fistula == "" || this.afterdialysis.catheter == "") {
1875
-        const obj16 = "透后内瘘,导管"
1876
-        checkDate.push(obj16)
1877
-      }  if (this.afterdialysis.complication == 0) {
1878
-        const obj17 = "并发症"
1879
-        checkDate.push(obj17)
1880
-      } if (this.afterdialysis.actual_displacement == 0 && 
1881
-        (this.prescription.mode_id ==2 || this.prescription.mode_id ==12)) {
1882
-        const obj18 = "实际置换量"
1883
-        checkDate.push(obj18)
1884
-      } if (this.afterdialysis.actual_ultrafiltration == 0) {
1885
-        const obj19 = "实际超滤量"
1886
-        checkDate.push(obj19)
1887
-      } if (this.afterdialysis.weight_after == 0) {
1888
-        const obj20 = "透后体重"
1889
-        checkDate.push(obj20)
1890
-      } if (this.afterdialysis.weight_loss == 0) {
1891
-        const obj21 = "体重减少"
1892
-        checkDate.push(obj21)
1893
-      } if (this.prescription.target_ultrafiltration == 0) {
1894
-        const obj22 = "处方脱水量"
1895
-        checkDate.push(obj22)
1896
-      } if (this.afterdialysis.actual_ultrafiltration == 0) {
1897
-        const obj23 = "超滤总量"
1898
-        checkDate.push(obj23)
1899
-      } if (this.prescription.dialysis_duration_hour == 0) {
1900
-        const obj24 = "透析时长"
1901
-        checkDate.push(obj24)
1902
-      } if (this.prescription.mode == '') {
1903
-        const obj25 = "透析方式"
1904
-        checkDate.push(obj25)
1905
-      } if (this.prescription.displace_liqui_part == '' && 
1906
-      (this.prescription.mode_id ==2 ||this.prescription.mode_id ==12)) {
1907
-        const obj26 = "置换方式"
1908
-        checkDate.push(obj26)
1909
-      } if (this.prescription.displace_liqui_value == 0 && 
1910
-      (this.prescription.mode_id ==2 ||this.prescription.mode_id ==12)) {
1911
-        const obj27 = "置换总量"
1912
-        checkDate.push(obj27)
1913
-      } if (this.predialysis.blood_access_part_opera_name == ''){
1914
-        const obj28 = "血管通路"
1915
-        checkDate.push(obj28)
1916
-      } if (this.prescription.blood_flow_volume == 0) {
1917
-        const obj29 = "血流量"
1918
-        checkDate.push(obj29)
1919
-      } if (
1971
+        this.$message.error("透后血压未填完整");
1972
+      } else if (this.afterdialysis.cruor == "") {
1973
+        this.$message.error("凝血未填");
1974
+      } else if (this.afterdialysis.symptom_after_dialysis == "") {
1975
+        this.$message.error("透后症状未填");
1976
+      } else if (this.afterdialysis.internal_fistula == "") {
1977
+        this.$message.error("透后内瘘未填");
1978
+      } else if (this.afterdialysis.catheter == "") {
1979
+        this.$message.error("透后导管未填");
1980
+      } else if (this.afterdialysis.complication == 0) {
1981
+        this.$message.error("并发症未填");
1982
+      } else if (this.afterdialysis.actual_displacement == 0) {
1983
+        this.$message.error("实际置换量未填");
1984
+      } else if (this.afterdialysis.actual_ultrafiltration == 0) {
1985
+        this.$message.error("实际超滤量未填");
1986
+      } else if (this.afterdialysis.weight_after == 0) {
1987
+        this.$message.error("透后体重未填");
1988
+      } else if (this.afterdialysis.weight_loss == 0) {
1989
+        this.$message.error("体重减少未填");
1990
+      } else if (this.afterdialysis.dialysis_intakes == 0) {
1991
+        this.$message.error("透析中入量未填");
1992
+      } else if (this.prescription.target_ultrafiltration == 0) {
1993
+        this.$message.error("处方脱水量未填");
1994
+      } else if (this.afterdialysis.actual_ultrafiltration == 0) {
1995
+        this.$message.error("超滤总量未填");
1996
+      } else if (this.prescription.dialysis_duration_hour == 0) {
1997
+        this.$message.error("透析时长未填");
1998
+      } else if (this.prescription.mode_id == 0) {
1999
+        this.$message.error("透析方式未填");
2000
+      } else if (this.prescription.displace_liqui_part == '') {
2001
+        this.$message.error("置换方式未填");
2002
+      } else if (this.prescription.displace_liqui_value == 0) {
2003
+        this.$message.error("置换总量未填");
2004
+      } else if (this.predialysis.blood_access_part_opera_name == ''){
2005
+        this.$message.error('血管通路未填');
2006
+      } else if (this.prescription.blood_flow_volume == 0) {
2007
+        this.$message.error("血流量未填");
2008
+      } else if (
1920
         this.prescription.dialysis_irrigation == '' &&
2009
         this.prescription.dialysis_irrigation == '' &&
1921
         this.prescription.dialysis_dialyszers == ''
2010
         this.prescription.dialysis_dialyszers == ''
1922
       ){
2011
       ){
1923
-        const obj30 = "人工肾装置"
1924
-        checkDate.push(obj30)
1925
-      } if (this.predialysis.machine_type == 0) {
1926
-        const obj31 = "透析机型"
1927
-        checkDate.push(obj31)
1928
-      } if (this.dialysisOrder.DeviceNumber.number == 0) {
1929
-        const obj32 = "机号"
1930
-        checkDate.push(obj32)
1931
-      } if (this.prescription.anticoagulant_name == 0) {
1932
-        const obj33 = "抗凝剂"
1933
-        checkDate.push(obj33)
1934
-      } if (this.prescription.anticoagulant_shouji == 0 && 
1935
-        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !=''
1936
-      ) {
1937
-        const obj34 = "首剂"
1938
-        checkDate.push(obj34)
1939
-      } if (this.prescription.anticoagulant_weichi == 0 &&
1940
-        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !=''
1941
-      ) {
1942
-        const obj35 = "维持"
1943
-        checkDate.push(obj35)
1944
-      } if (this.prescription.anticoagulant_zongliang == 0 && 
1945
-        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !='' && prescription.anticoagulant != 5
1946
-      ) {
1947
-        const obj36 = "总量"
1948
-        checkDate.push(obj36)
1949
-      } if (this.prescription.calcium == 0) {
1950
-        const obj37 = "钙"
1951
-        checkDate.push(obj37)
1952
-      } if (this.prescription.sodium == 0) {
1953
-        const obj38 = "钠"
1954
-        checkDate.push(obj38)
1955
-      } if (this.prescription.kalium == 0) {
1956
-        const obj39 = "钾"
1957
-        checkDate.push(obj39)
1958
-      } if (this.prescription.bicarbonate == 0) {
1959
-        const obj40 = "碳酸氢根"
1960
-        checkDate.push(obj40)
1961
-      } if (this.prescription.dialysate_flow == 0) {
1962
-        const obj41 = "透析液流量"
1963
-        checkDate.push(obj41)
1964
-      } if (
2012
+        this.$message.error('人工肾装置未填');
2013
+      } else if (this.predialysis.machine_type == 0) {
2014
+        this.$message.error("透析机型未填");
2015
+      } else if (this.dialysisOrder.DeviceNumber.number == 0) {
2016
+        this.$message.error("机号未填");
2017
+      } else if (this.prescription.anticoagulant_name == 0) {
2018
+        this.$message.error("抗凝剂未填");
2019
+      } else if (this.prescription.anticoagulant_shouji == 0) {
2020
+        this.$message.error("首剂未填");
2021
+      } else if (this.prescription.anticoagulant_weichi == 0) {
2022
+        this.$message.error("维持未填");
2023
+      } else if (this.prescription.anticoagulant_zongliang == 0) {
2024
+        this.$message.error("总量未填");
2025
+      } else if (this.prescription.calcium == 0) {
2026
+        this.$message.error("钙未填");
2027
+      } else if (this.prescription.sodium == 0) {
2028
+        this.$message.error("钠未填");
2029
+      } else if (this.prescription.kalium == 0) {
2030
+        this.$message.error("钾未填");
2031
+      } else if (this.prescription.bicarbonate == 0) {
2032
+        this.$message.error("碳酸氢根未填");
2033
+      } else if (this.prescription.dialysate_flow == 0) {
2034
+        this.$message.error("透析液流量未填");
2035
+      } else if (
1965
         this.prescription.anticoagulant_gaimingcheng == "" &&
2036
         this.prescription.anticoagulant_gaimingcheng == "" &&
1966
         this.prescription.anticoagulant == 5
2037
         this.prescription.anticoagulant == 5
1967
       ) {
2038
       ) {
1968
-        const obj42 = "钙名称"
1969
-        checkDate.push(obj42)
1970
-      } if (
2039
+        this.$message.error("钙名称未填");
2040
+      } else if (
1971
         this.prescription.anticoagulant_gaijiliang == "" &&
2041
         this.prescription.anticoagulant_gaijiliang == "" &&
1972
         this.prescription.anticoagulant == 5
2042
         this.prescription.anticoagulant == 5
1973
       ) {
2043
       ) {
1974
-        const obj43 = "钙剂量"
1975
-        checkDate.push(obj43)
1976
-      } if (
2044
+        this.$message.error("钙剂量未填");
2045
+      } else if (
1977
         this.afterdialysis.actual_treatment_hour == 0 &&
2046
         this.afterdialysis.actual_treatment_hour == 0 &&
1978
         this.afterdialysis.actual_treatment_minute == 0
2047
         this.afterdialysis.actual_treatment_minute == 0
1979
       ) {
2048
       ) {
1980
-        const obj44 = "实际治疗时间"
1981
-        checkDate.push(obj44)
1982
-      } if (this.summary.mission == 0) {
1983
-        const obj45 = "透后宣教"
1984
-        checkDate.push(obj45)
1985
-      } if (this.summary.dialysis_summary == "") {
1986
-        const obj46 = "透析小结"
1987
-        checkDate.push(obj46)
1988
-      } if (
2049
+        this.$message.error("实际治疗时间未填");
2050
+      } else if (this.summary.mission == 0) {
2051
+        this.$message.error("透后宣教未填");
2052
+      } else if (this.summary.dialysis_summary == "") {
2053
+        this.$message.error("透析小结未填");
2054
+      } else if (
1989
         this.dialysisOrder == null ||
2055
         this.dialysisOrder == null ||
1990
         this.dialysisOrder.puncture_nurse == 0
2056
         this.dialysisOrder.puncture_nurse == 0
1991
       ) {
2057
       ) {
1992
-        const obj47 = "穿刺护士"
1993
-        checkDate.push(obj47)
1994
-      } if (
2058
+        this.$message.error("穿刺护士未填");
2059
+      } else if (
1995
         this.dialysisOrder == null ||
2060
         this.dialysisOrder == null ||
1996
         this.dialysisOrder.start_nurse == 0
2061
         this.dialysisOrder.start_nurse == 0
1997
       ) {
2062
       ) {
1998
-        const obj48 = "治疗护士"
1999
-        checkDate.push(obj48)
2000
-      } if (this.dialysisOrder == null && this.check.creater == 0) {
2001
-        const obj49 = "核对人员"
2002
-        checkDate.push(obj49)
2063
+        this.$message.error("治疗护士未填");
2064
+      } else if (this.dialysisOrder == null && this.check.creater == 0) {
2065
+        this.$message.error("核对人员未填");
2003
       } else if (
2066
       } else if (
2004
         this.dialysisOrder != null &&
2067
         this.dialysisOrder != null &&
2005
         this.dialysisOrder.start_nurse == this.check.modifier &&
2068
         this.dialysisOrder.start_nurse == this.check.modifier &&
2006
         this.check.creater == 0
2069
         this.check.creater == 0
2007
       ) {
2070
       ) {
2008
-        const obj49 = "核对人员"
2009
-        checkDate.push(obj49)
2071
+        this.$message.error("核对人员未填");
2010
       } else if (
2072
       } else if (
2011
         this.dialysisOrder != null &&
2073
         this.dialysisOrder != null &&
2012
         this.dialysisOrder.start_nurse == this.check.creater &&
2074
         this.dialysisOrder.start_nurse == this.check.creater &&
2013
         this.check.modifier == 0
2075
         this.check.modifier == 0
2014
       ) {
2076
       ) {
2015
-        const obj49 = "核对人员"
2016
-        checkDate.push(obj49)
2077
+        this.$message.error("核对人员未填");
2017
       } else if (
2078
       } else if (
2018
         this.dialysisOrder != null &&
2079
         this.dialysisOrder != null &&
2019
         this.dialysisOrder.start_nurse != this.check.creater &&
2080
         this.dialysisOrder.start_nurse != this.check.creater &&
2020
         this.dialysisOrder.start_nurse != this.check.modifier &&
2081
         this.dialysisOrder.start_nurse != this.check.modifier &&
2021
         this.check.creater == 0
2082
         this.check.creater == 0
2022
       ) {
2083
       ) {
2023
-        const obj49 = "核对人员"
2024
-        checkDate.push(obj49)
2025
-      } if (
2084
+        this.$message.error("核对人员未填");
2085
+      } else if (
2026
         this.dialysisOrder == null ||
2086
         this.dialysisOrder == null ||
2027
         this.dialysisOrder.finish_nurse == 0
2087
         this.dialysisOrder.finish_nurse == 0
2028
       ) {
2088
       ) {
2029
-        const obj50 = "下机护士"
2030
-        checkDate.push(obj50)
2031
-      } if (this.prescription.creater == 0) {
2032
-        const obj51 = "治疗医生"
2033
-        checkDate.push(obj51)
2034
-      } 
2035
-      if(this.tableAdvice.length > 0){
2036
-        this.tableAdvice.map((item) =>{
2037
-          if(item.id > 0 && (item.created_time || item.start_time)){
2038
-            if(item.execution_staff ==0 || item.checker ==0){
2039
-              const obj52 = '执行人员,核对人员'
2040
-              checkDate.push(obj52)
2041
-            }
2089
+        this.$message.error("下机护士未填");
2090
+      } else if (this.prescription.creater == 0) {
2091
+        this.$message.error("治疗医生未填");
2092
+      } else if (this.tableAdvice.length > 0) {
2093
+        let num = 0;
2094
+        this.tableAdvice.map((item) => {
2095
+          if (item.id > 0 && (item.created_time || item.start_time)) {
2096
+            this.users.map((it) => {
2097
+              if (it.id == item.advice_doctor) {
2098
+                if (it.user_type == 3) {
2099
+                  num++;
2100
+                  this.$message.closeAll();
2101
+                  this.$message.error("存在不是医生保存的医嘱");
2102
+                } else if (
2103
+                  it.id == item.execution_staff &&
2104
+                  item.execution_staff > 0
2105
+                ) {
2106
+                  if (it.user_type == 2) {
2107
+                    num++;
2108
+                    this.$message.closeAll();
2109
+                    this.$message.error("存在不是护士执行的医嘱");
2110
+                  }
2111
+                } else if (it.id == item.checker && item.checker > 0) {
2112
+                  if (it.user_type == 2) {
2113
+                    num++;
2114
+                    this.$message.closeAll();
2115
+                    this.$message.error("存在不是护士核对的医嘱");
2116
+                  }
2117
+                }
2118
+              } else if (
2119
+                it.id == item.execution_staff &&
2120
+                item.execution_staff > 0
2121
+              ) {
2122
+                if (it.user_type == 2) {
2123
+                  num++;
2124
+                  this.$message.closeAll();
2125
+                  this.$message.error("存在不是护士执行的医嘱");
2126
+                }
2127
+              } else if (it.id == item.checker && item.checker > 0) {
2128
+                if (it.user_type == 2) {
2129
+                  num++;
2130
+                  this.$message.closeAll();
2131
+                  this.$message.error("存在不是护士核对的医嘱");
2132
+                }
2133
+              }
2134
+            });
2042
           }
2135
           }
2043
-        })
2136
+        });
2137
+        if (num == 0) {
2138
+          this.$message.success("核对完成");
2139
+        }
2140
+      } else {
2141
+        this.$message.success("核对完成");
2044
       }
2142
       }
2045
-      // if (this.tableAdvice.length > 0) {
2046
-      //   let num = 0;
2047
-      //   this.tableAdvice.map((item) => {
2048
-      //     if (item.id > 0 && (item.created_time || item.start_time)) {
2049
-      //       this.users.map((it) => {
2050
-      //         if (it.id == item.advice_doctor) {
2051
-      //           if (it.user_type == 3) {
2052
-      //             num++;
2053
-      //             this.$message.closeAll();
2054
-      //             this.$message.error("存在不是医生保存的医嘱");
2055
-      //           } else if (
2056
-      //             it.id == item.execution_staff &&
2057
-      //             item.execution_staff > 0
2058
-      //           ) {
2059
-      //             if (it.user_type == 2) {
2060
-      //               num++;
2061
-      //               this.$message.closeAll();
2062
-      //               this.$message.error("存在不是护士执行的医嘱");
2063
-      //             }
2064
-      //           } else if (it.id == item.checker && item.checker > 0) {
2065
-      //             if (it.user_type == 2) {
2066
-      //               num++;
2067
-      //               this.$message.closeAll();
2068
-      //               this.$message.error("存在不是护士核对的医嘱");
2069
-      //             }
2070
-      //           }
2071
-      //         } else if (
2072
-      //           it.id == item.execution_staff &&
2073
-      //           item.execution_staff > 0
2074
-      //         ) {
2075
-      //           if (it.user_type == 2) {
2076
-      //             num++;
2077
-      //             this.$message.closeAll();
2078
-      //             this.$message.error("存在不是护士执行的医嘱");
2079
-      //           }
2080
-      //         } else if (it.id == item.checker && item.checker > 0) {
2081
-      //           if (it.user_type == 2) {
2082
-      //             num++;
2083
-      //             this.$message.closeAll();
2084
-      //             this.$message.error("存在不是护士核对的医嘱");
2085
-      //           }
2086
-      //         }
2087
-      //       });
2088
-      //     }
2089
-      //   });
2090
-      //   if (num == 0) {
2091
-      //     this.$message.success("核对完成");
2092
-      //   }
2093
-      // }
2094
-      this.getcheckData(checkDate)
2095
     },
2143
     },
2096
     getDisplaceLiquiPart: function (val) {
2144
     getDisplaceLiquiPart: function (val) {
2097
       let displace_liqui_part_name = "/";
2145
       let displace_liqui_part_name = "/";
2337
           this.afterdialysis.complications_other.join(",");
2385
           this.afterdialysis.complications_other.join(",");
2338
 
2386
 
2339
         this.prescription = response.data.data.dialysisPrescription;
2387
         this.prescription = response.data.data.dialysisPrescription;
2340
-        console.log("透析处方", this.prescription);
2388
+        // console.log("透析处方", this.prescription);
2341
         this.receiverTreatmentAccess =
2389
         this.receiverTreatmentAccess =
2342
           response.data.data.receiverTreatmentAccess;
2390
           response.data.data.receiverTreatmentAccess;
2343
         this.prescription.mode = this.modeName(this.prescription.mode_id);
2391
         this.prescription.mode = this.modeName(this.prescription.mode_id);
2805
         return "0.0";
2853
         return "0.0";
2806
       }
2854
       }
2807
     },
2855
     },
2808
-    getcheckData(val){
2809
-      if(val.length >0){
2810
-        const a = val.join(',')
2811
-        console.log('a',a);
2812
-        this.$message.error(a +" 未填");
2813
-        return a
2814
-      }
2815
-    }
2856
+
2816
   },
2857
   },
2817
   watch: {
2858
   watch: {
2818
     "patientInfo.gender": function () {
2859
     "patientInfo.gender": function () {
2839
         this.patientInfo_source_1 = false;
2880
         this.patientInfo_source_1 = false;
2840
       }
2881
       }
2841
     },
2882
     },
2883
+    // "props.childResponse": function () {
2884
+    //   console.log('sdfasdfada',this.props.childResponse);
2885
+    // }
2886
+
2842
   },
2887
   },
2843
   created() {
2888
   created() {
2844
     console.log('dddddd',this.$parent.childResponse);
2889
     console.log('dddddd',this.$parent.childResponse);

+ 10 - 8
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue 查看文件

918
                         </span>
918
                         </span>
919
 
919
 
920
                         <span v-if="org_id ==10510 || org_id == 0">
920
                         <span v-if="org_id ==10510 || org_id == 0">
921
-                          <span v-if="prescription.mode_id ==2 || prescription.mode_id ==5 || presciption.mode_id==12">{{
921
+                          <span v-if="prescription!=null &&( prescription.mode_id ==2 || prescription.mode_id ==5 || presciption.mode_id==12)">{{
922
                             afterdialysis.displace_liqui_value
922
                             afterdialysis.displace_liqui_value
923
                             ? afterdialysis.displace_liqui_value
923
                             ? afterdialysis.displace_liqui_value
924
                             : "/"
924
                             : "/"
954
                        </span>
954
                        </span>
955
 
955
 
956
                         <span v-if="org_id ==10510 || org_id == 0">
956
                         <span v-if="org_id ==10510 || org_id == 0">
957
-                          <span v-if="prescription.mode_id ==2 || prescription.mode_id ==5 || presciption.mode_id==12">{{
957
+                          <span v-if="prescription!=null && (prescription.mode_id ==2 || prescription.mode_id ==5 || prescription.mode_id==12)">{{
958
                             afterdialysis.displace_liqui_value
958
                             afterdialysis.displace_liqui_value
959
                             ? afterdialysis.displace_liqui_value
959
                             ? afterdialysis.displace_liqui_value
960
                             : "/"
960
                             : "/"
961
                            }}
961
                            }}
962
                           </span>
962
                           </span>
963
-                          <span v-else>/</span>
963
+                          <span v-else>
964
+                            
965
+                          </span>
964
                         </span>
966
                         </span>
965
 
967
 
966
                        
968
                        
967
-                        <span v-if="org_id!=10206 && org_id!=10510"> {{
969
+                        <span v-if="org_id!=10206 && org_id!=10510&&org_id!=0"> {{
968
                           prescription.displace_liqui_value
970
                           prescription.displace_liqui_value
969
                             ? prescription.displace_liqui_value
971
                             ? prescription.displace_liqui_value
970
                             : "/"
972
                             : "/"
2201
 
2203
 
2202
 
2204
 
2203
                       <tr
2205
                       <tr
2204
-                      v-if="org_id == 0 || org_id ==10206"
2206
+                      v-if="org_id == 0 || org_id ==10206 || org_id == 10644"
2205
                       v-for="(advice, advice_index) in projectsOne"
2207
                       v-for="(advice, advice_index) in projectsOne"
2206
                       :key="advice_index"
2208
                       :key="advice_index"
2207
                     >
2209
                     >
2263
                           }}</span>
2265
                           }}</span>
2264
                         </td>
2266
                         </td>
2265
 
2267
 
2266
-                        <td height="32px">
2268
+                        <td height="32px" v-if="org_id!=0 && org_id!=10644">
2267
                           <span v-if="setAdminUserES(advice.checker) == ''">{{
2269
                           <span v-if="setAdminUserES(advice.checker) == ''">{{
2268
                             getAdminUser(advice.checker)
2270
                             getAdminUser(advice.checker)
2269
                           }}</span>
2271
                           }}</span>
5681
         }
5683
         }
5682
 
5684
 
5683
         //HIS客户显示临时医嘱的地方
5685
         //HIS客户显示临时医嘱的地方
5684
-        if(this.org_id == 10510 || this.org_id ==10567 || this.org_id == 10489|| this.org_id == 10644){
5686
+        if(this.org_id == 10510 || this.org_id ==10567 || this.org_id == 10489){
5685
           if(response.data.data.doctorAdevieInfo!=null && response.data.data.doctorAdevieInfo.length>0){
5687
           if(response.data.data.doctorAdevieInfo!=null && response.data.data.doctorAdevieInfo.length>0){
5686
 
5688
 
5687
             for(let i=0;i<response.data.data.doctorAdevieInfo.length;i++){
5689
             for(let i=0;i<response.data.data.doctorAdevieInfo.length;i++){
5706
 
5708
 
5707
 
5709
 
5708
 
5710
 
5709
-        if(this.org_id!=10510 && this.org_id!=0&&this.org_id!=10206 && this.org_id!=10478 && this.org_id!=0 && this.org_id!=10489){
5711
+        if(this.org_id!=10510 && this.org_id!=0&&this.org_id!=10206 && this.org_id!=10478 && this.org_id!=0 && this.org_id!=10489 && this.org_id!=10644){
5710
             if(this.projects!=null && this.projects.length >0){
5712
             if(this.projects!=null && this.projects.length >0){
5711
              for(let i=0;i<this.projects.length;i++){
5713
              for(let i=0;i<this.projects.length;i++){
5712
               if(this.projects[i].type== 2){
5714
               if(this.projects[i].type== 2){

+ 17 - 10
src/xt_pages/org/orginfo.vue 查看文件

441
                     console.log("机构",this.orgtypesMap)
441
                     console.log("机构",this.orgtypesMap)
442
                     this.illnessOptions = res.data.illness?res.data.illness:[];
442
                     this.illnessOptions = res.data.illness?res.data.illness:[];
443
                     console.log("疾病类型",this.illnessOptions)
443
                     console.log("疾病类型",this.illnessOptions)
444
-                    this.fileList = [];
445
-                    var gallery =  res.data.orginfo.org_gallery
446
-                    console.log("haaaaaaaaaaaaaaaaaa",gallery)
447
-                    for (const index in gallery) {
448
-                        var image = {id:gallery[index].id, name:gallery[index].id, url:gallery[index].type==1?gallery[index].url:gallery[index].url+'?vframe/jpg/offset/0/w/100/h/100'};
449
-                        this.fileList.push(image);
450
-                    }
451
-                    console.log("fileList-------------",fileList)
452
-
453
-                    var illness = res.data.orginfo.illness.split(',');
444
+                    var illnessList = "21,22,23,24,25,26,27,28,29,30,31,32"
445
+                    // var illness = res.data.orginfo.illness.split(',');
446
+                    var illness = illnessList.split(',')
447
+                    console.log("illness--------------------",illness)
454
                     for (const index in illness) {
448
                     for (const index in illness) {
455
                         var iid = parseInt(illness[index]);
449
                         var iid = parseInt(illness[index]);
456
                         if (isNaN(iid) || iid<=0) {
450
                         if (isNaN(iid) || iid<=0) {
458
                         }
452
                         }
459
                         this.form.illness_list.push(iid);
453
                         this.form.illness_list.push(iid);
460
                     }
454
                     }
455
+                    console.log("this.form.illness_list---------------------",this.form.illness_list)
461
                     var business_week = this.form.business_week;
456
                     var business_week = this.form.business_week;
462
                     var business_week_tem = business_week.split(" — ");
457
                     var business_week_tem = business_week.split(" — ");
458
+
459
+                    console.log("business_week",business_week)
460
+                    console.log("business_week_tem",business_week_tem)
463
                     if(business_week_tem.length==2) {
461
                     if(business_week_tem.length==2) {
464
                         var fromIndex = this.weekOptions.indexOf(business_week_tem[0]);
462
                         var fromIndex = this.weekOptions.indexOf(business_week_tem[0]);
465
                         var toIndex = this.weekOptions.indexOf(business_week_tem[1]);
463
                         var toIndex = this.weekOptions.indexOf(business_week_tem[1]);
495
                     this.provinces = res.data.provinces;
493
                     this.provinces = res.data.provinces;
496
                     this.citys = res.data.citys?res.data.citys:[];
494
                     this.citys = res.data.citys?res.data.citys:[];
497
                     this.districts = res.data.districts?res.data.districts:[];
495
                     this.districts = res.data.districts?res.data.districts:[];
496
+                    this.fileList = [];
497
+                    var gallery =  res.data.orginfo.org_gallery
498
+                    console.log("haaaaaaaaaaaaaaaaaa",gallery)
499
+                    for (const index in gallery) {
500
+                        var image = {id:gallery[index].id, name:gallery[index].id, url:gallery[index].type==1?gallery[index].url:gallery[index].url+'?vframe/jpg/offset/0/w/100/h/100'};
501
+                        this.fileList.push(image);
502
+                    }
503
+                    console.log("fileList-------------",fileList)
504
+                   
498
 
505
 
499
                    
506
                    
500
                 } else {
507
                 } else {

+ 12 - 10
src/xt_pages/outpatientCharges/chargeDetailManagement.vue 查看文件

119
 
119
 
120
                       </el-tab-pane>
120
                       </el-tab-pane>
121
 
121
 
122
-                      <charge-month-prescription-table v-if="this.radio == 1"
122
+                      <charge-month-prescription-table v-loading="loading_two" v-if="this.radio == 1"
123
                                                        :prescription="curPrescriptions"></charge-month-prescription-table>
123
                                                        :prescription="curPrescriptions"></charge-month-prescription-table>
124
 
124
 
125
                     </el-tabs>
125
                     </el-tabs>
232
                       <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
232
                       <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
233
                       <!--<month-prescription-table ref="prescription_tables"-->
233
                       <!--<month-prescription-table ref="prescription_tables"-->
234
                       <!--:activeType="activeType"  :prescription="curMonthPrescriptions"></month-prescription-table>-->
234
                       <!--:activeType="activeType"  :prescription="curMonthPrescriptions"></month-prescription-table>-->
235
-                      <charge-month-prescription-table v-if="this.radio == 1"
235
+                      <charge-month-prescription-table v-loading="loading_two" v-if="this.radio == 1"
236
                                                        :prescription="curMonthPrescriptions"></charge-month-prescription-table>
236
                                                        :prescription="curMonthPrescriptions"></charge-month-prescription-table>
237
 
237
 
238
-                      <settle-prescription-table v-if="this.radio == 2"
238
+                      <settle-prescription-table v-loading="loading_two"  v-if="this.radio == 2"
239
                                                  :prescription="curMonthPrescriptions"></settle-prescription-table>
239
                                                  :prescription="curMonthPrescriptions"></settle-prescription-table>
240
-
241
                     </el-tabs>
240
                     </el-tabs>
242
-
243
                   </div>
241
                   </div>
244
                   <div class="costBox">
242
                   <div class="costBox">
245
                     <span>当前处方总费用:<span style="color:red;">{{ month_total }}元</span></span>
243
                     <span>当前处方总费用:<span style="color:red;">{{ month_total }}元</span></span>
246
                     <span>处方总价:<span style="color:red;">{{ all_month_total }}元</span></span>
244
                     <span>处方总价:<span style="color:red;">{{ all_month_total }}元</span></span>
247
-
248
-
249
                   </div>
245
                   </div>
250
                 </div>
246
                 </div>
251
-
252
               </div>
247
               </div>
253
             </el-tab-pane>
248
             </el-tab-pane>
254
           </el-tabs>
249
           </el-tabs>
306
       dialogVisible:false,
301
       dialogVisible:false,
307
       charge_type:1,
302
       charge_type:1,
308
       isloading: false,
303
       isloading: false,
304
+      loading_two:false,
309
       isdisabled: false,
305
       isdisabled: false,
310
       register: [
306
       register: [
311
         { value: 1, label: '门诊' },
307
         { value: 1, label: '门诊' },
822
           .catch(function(error) {
818
           .catch(function(error) {
823
           })
819
           })
824
       }
820
       }
825
-    }, 
821
+    },
826
 
822
 
827
     changePatientInfo() {
823
     changePatientInfo() {
828
       let params = {
824
       let params = {
894
       }
890
       }
895
       getZuoBiaoPatientList(params).then(response => {
891
       getZuoBiaoPatientList(params).then(response => {
896
         if (response.data.state == 0) {
892
         if (response.data.state == 0) {
893
+
897
           this.$message.error(response.data.msg)
894
           this.$message.error(response.data.msg)
898
           return false
895
           return false
899
         } else {
896
         } else {
1281
         'is_upload': this.radio
1278
         'is_upload': this.radio
1282
       }
1279
       }
1283
       this.loading = true
1280
       this.loading = true
1281
+      this.loading_two = true
1284
       getZuoBiaoPatientInfo(params).then(response => {
1282
       getZuoBiaoPatientInfo(params).then(response => {
1285
         if (response.data.state == 0) {
1283
         if (response.data.state == 0) {
1286
           this.loading = false
1284
           this.loading = false
1285
+          this.loading_two = false
1286
+
1287
           this.$message.error(response.data.msg)
1287
           this.$message.error(response.data.msg)
1288
           return false
1288
           return false
1289
         } else {
1289
         } else {
1290
+          this.loading_two = false
1291
+
1292
+          this.loading = false
1290
 
1293
 
1291
           this.prescriptions = []
1294
           this.prescriptions = []
1292
           this.month_prescriptions = []
1295
           this.month_prescriptions = []
1293
           this.curPrescriptions = {}
1296
           this.curPrescriptions = {}
1294
           this.curMonthPrescriptions = {}
1297
           this.curMonthPrescriptions = {}
1295
-          this.loading = false
1296
           this.hisPatientInfo = response.data.data.patient
1298
           this.hisPatientInfo = response.data.data.patient
1297
           this.prescription_info = response.data.data.prescription_info
1299
           this.prescription_info = response.data.data.prescription_info
1298
           this.sick_type = this.prescription_info.sick_type
1300
           this.sick_type = this.prescription_info.sick_type

+ 3 - 1
src/xt_pages/outpatientCharges/components/chargeDialog.vue 查看文件

334
       },getfapiaonumber(){
334
       },getfapiaonumber(){
335
         getfapiaonumber().then((res) => {
335
         getfapiaonumber().then((res) => {
336
           if (res.data.state == 1) {
336
           if (res.data.state == 1) {
337
-            this.form.fapiao_number = res.data.data.fapiao_number;
337
+            if(this.$store.getters.xt_user.org.id != 10644) {
338
+              this.form.fapiao_number = res.data.data.fapiao_number;
339
+            }
338
           }
340
           }
339
         })
341
         })
340
       },
342
       },

+ 2 - 118
src/xt_pages/outpatientCharges/components/registerDialog.vue 查看文件

689
           'certificates':this.form.certificates,
689
           'certificates':this.form.certificates,
690
         }
690
         }
691
 
691
 
692
-        if ((this.$store.getters.xt_user.org_id == 10387 && this.form.id_card_type ==  4) || (this.$store.getters.xt_user.org_id == 4 && this.form.id_card_type ==  4)) {
693
-          try {
694
-            //检测当前浏览器是否支持websocket模式
695
-            window.WebSocket = window.WebSocket || window.MozWebSocket;
696
-            if (!window.WebSocket){
697
-              alert("WebSocket not supported by this browser");
698
-              return;
699
-            }
700
-            this.ws = new WebSocket("ws://127.0.0.1:8899");//连接服务器
701
-            var that = this
702
-            this.ws.onopen = function(event){
703
-              if (that.$store.getters.xt_user.org_id == 10387){
704
-                that.ws.send("{\"url\":\"http://10.93.33.243:20001/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01101\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"罗佳菊\",\"orgId\":\"H43082200408\"},\"orgId\":\"H43082200408\",\"transType\":\"ec.query\"}}");
705
-              }else if(that.$store.getters.xt_user.org_id == 10318){
706
-                that.ws.send("{\"url\":\"http://igb.hsa.gdgov.cn/prd_nation_eccode/prd_eccode/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01101\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"邹刘阳\",\"orgId\":\"H44011701749\"},\"orgId\":\"H44011701749\",\"transType\":\"ec.query\"}}");
707
-              }else if(that.$store.getters.xt_user.org_id == 4){
708
-                that.ws.send("{\"url\":\"http://igb.hsa.gdgov.cn/prd_nation_eccode/prd_eccode/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01101\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"邹刘阳\",\"orgId\":\"H44011701749\"},\"orgId\":\"H44011701749\",\"transType\":\"ec.query\"}}");
709
-              }
710
-            };
711
-
712
-            this.ws.onmessage = function(event){
713
-              // alert("接收到服务器发送的数据:\r\n"+event.data);
714
-              var newParams =  JSON.parse(event.data)
715
-              console.log(newParams)
716
-              console.log(newParams.data)
717
-              console.log(newParams.data)
718
-              console.log(newParams.data.ecToken)
719
-              console.log(newParams.data.idNo)
720
-              console.log(newParams.data.userName)
721
-              console.log(newParams.data.insuOrg)
722
-
723
-              newParams['ecToken'] = newParams.data.ecToken
724
-              newParams['idNo'] = newParams.data.idNo
725
-              newParams['userName'] = newParams.data.userName
726
-              newParams['insuOrg'] = newParams.data.insuOrg
727
-
728
-              newParams['id_card_type'] =  that.form.id_card_type
729
-              newParams['admin_user_id'] = that.$store.getters.xt_user.user.id
730
-              newParams['certificates'] = that.form.certificates
731
-              axios.get('http://127.0.0.1:9532/api/readcard', {
732
-                params: newParams
733
-              })
734
-                .then(function(response) {
735
-                  if (response.data.state == 0) {
736
-                    that.$message.error(response.data.msg)
737
-                    return false
738
-                  } else {
739
-
740
-                    if (response.data.data.failed_code == -10) {
741
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
742
-                        confirmButtonText: '确 定',
743
-                        type: 'warning'
744
-                      }).then(() => {
745
-
746
-                      }).catch(() => {
747
-                      })
748
-                    } else {
749
-
750
-                      var patient = response.data.data.patient
751
-
752
-                      if (that.form.id_card_type == 1) {
753
-                        that.form.id = patient.id
754
-                        that.form.name = patient.name
755
-                        that.form.gender = patient.gender
756
-                        that.form.age = patient.age
757
-                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
758
-                        that.form.phone = patient.phone
759
-                        that.form.id_card = patient.id_card_no
760
-                        that.form.medical_insurance_card = response.data.data.number
761
-                        that.form.social_type = parseInt(response.data.data.insutype)
762
-
763
-
764
-
765
-                      } else if (that.form.id_card_type == 2) {
766
-                        that.form.id = patient.id
767
-                        that.form.name = patient.name
768
-                        that.form.gender = patient.gender
769
-                        that.form.age = patient.age
770
-                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
771
-                        that.form.phone = patient.phone
772
-                        that.form.id_card = patient.id_card_no
773
-                        that.form.social_type = parseInt(response.data.data.insutype)
774
-
775
-                      } else {
776
-                        that.form.id = patient.id
777
-                        that.form.name = patient.name
778
-                        that.form.gender = patient.gender
779
-                        that.form.age = patient.age
780
-                        that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
781
-                        that.form.phone = patient.phone
782
-                        that.form.id_card = patient.id_card_no
783
-                        that.form.social_type = parseInt(response.data.data.insutype)
784
-
785
-                      }
786
-                      that.$message({ message: '读卡成功', type: 'success' })
787
-                    }
788
-                  }
789
-                })
790
-                .catch(function(error) {
791
-
792
-                })
793
-
794
-
795
-            };
796
-            this.ws.onclose = function(event){
797
-              // alert("已经与服务器断开连接\r\n当前连接状态:"+this.readyState);
798
-            };
799
-            this.ws.onerror = function(event){
800
-              // if (this.flag!=1)
801
-              // alert("WebSocket接收异常!");
802
-            };
803
-          } catch (ex) {
804
-            alert(ex.message);
805
-          }
806
-
807
-        }else{
808
           axios.get('http://127.0.0.1:9532/api/readcard', {
692
           axios.get('http://127.0.0.1:9532/api/readcard', {
809
             params: params
693
             params: params
810
           })
694
           })
869
             .catch(function(error) {
753
             .catch(function(error) {
870
 
754
 
871
             })
755
             })
872
-        }
873
-      },
756
+        },
874
       // reading() {
757
       // reading() {
875
       //   var that = this
758
       //   var that = this
876
       //   if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
759
       //   if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
1045
       }
928
       }
1046
     }
929
     }
1047
 
930
 
931
+
1048
   }
932
   }
1049
 </script>
933
 </script>
1050
 
934
 

+ 1 - 75
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

3850
           "admin_user_id":this.$store.getters.xt_user.user.id,
3850
           "admin_user_id":this.$store.getters.xt_user.user.id,
3851
           'his_patient_id': this.hisPatientInfo.id,
3851
           'his_patient_id': this.hisPatientInfo.id,
3852
         }
3852
         }
3853
-        if ((this.$store.getters.xt_user.org_id == 10387)){
3854
-          try {
3855
-            //检测当前浏览器是否支持websocket模式
3856
-            window.WebSocket = window.WebSocket || window.MozWebSocket;
3857
-            if (!window.WebSocket){
3858
-              alert("WebSocket not supported by this browser");
3859
-              return;
3860
-            }
3861
-            this.ws = new WebSocket("ws://127.0.0.1:8899");//连接服务器
3862
-            var that = this
3863
-            this.ws.onopen = function(event){
3864
-              if (that.$store.getters.xt_user.org_id == 10387){
3865
-                that.ws.send("{\"url\":\"https://dvs.hun.hsip.gov.cn/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01301\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"罗佳菊\",\"orgId\":\"H43082200408\"},\"orgId\":\"H43082200408\",\"transType\":\"ec.query\"}}");
3866
-              }
3867
-                // else if(that.$store.getters.xt_user.org_id == 10318){
3868
-                //   that.ws.send("{\"url\":\"http://igb.hsa.gdgov.cn/prd_nation_eccode/prd_eccode/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01301\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"邹刘阳\",\"orgId\":\"H44011701749\"},\"orgId\":\"H44011701749\",\"transType\":\"ec.query\"}}");
3869
-              // }
3870
-              else if(that.$store.getters.xt_user.org_id == 4){
3871
-                that.ws.send("{\"url\":\"http://igb.hsa.gdgov.cn/prd_nation_eccode/prd_eccode/localcfc/api/hsecfc/localQrCodeQuery\",\"indata\":{\"data\":{\"businessType\":\"01301\",\"deviceType\":\"\",\"officeId\":\"32760\",\"officeName\":\"肾内科\",\"operatorId\":\"admin\",\"operatorName\":\"邹刘阳\",\"orgId\":\"H44011701749\"},\"orgId\":\"H44011701749\",\"transType\":\"ec.query\"}}");
3872
-              }
3873
-            };
3874
-
3875
-            this.ws.onmessage = function(event){
3876
-              // alert("接收到服务器发送的数据:\r\n"+event.data);
3877
-              var newParams =  JSON.parse(event.data)
3878
-              newParams['ecToken'] = newParams.data.ecToken
3879
-              newParams['idNo'] = newParams.data.idNo
3880
-              newParams['userName'] = newParams.data.userName
3881
-              newParams['insuOrg'] = newParams.data.insuOrg
3882
-              newParams['id_card_type'] =  that.form.id_card_type
3883
-              newParams['admin_user_id'] = that.$store.getters.xt_user.user.id
3884
-              newParams['certificates'] = that.form.certificates
3885
-              axios.get('http://127.0.0.1:9532/api/readele', {
3886
-                params: newParams
3887
-              })
3888
-                .then(function(response) {
3889
-                  if (response.data.state == 0) {
3890
-                    that.$message.error(response.data.msg)
3891
-                    return false
3892
-                  } else {
3893
-                    if (response.data.data.failed_code == -10) {
3894
-                      // that.$message.error(response.data.data.msg)
3895
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
3896
-                        confirmButtonText: '确 定',
3897
-                        type: 'warning'
3898
-                      }).then(() => {
3899
-
3900
-                      }).catch(() => {
3901
-                      })
3902
-                    }else{
3903
-                      that.$message({ message: response.data.data.msg, type: 'success', duration: 5000 })
3904
-                    }
3905
-                  }
3906
-                })
3907
-                .catch(function(error) {
3908
-
3909
-                })
3910
-
3911
-
3912
-            };
3913
-            this.ws.onclose = function(event){
3914
-              alert("已经与服务器断开连接\r\n当前连接状态:"+this.readyState);
3915
-            };
3916
-            this.ws.onerror = function(event){
3917
-              if (this.flag!=1)
3918
-                alert("WebSocket接收异常!");
3919
-            };
3920
-          } catch (ex) {
3921
-            alert(ex.message);
3922
-          }
3923
-
3924
-        }else{
3925
-
3926
-          axios.get('http://127.0.0.1:9532/api/readele', {
3853
+        axios.get('http://127.0.0.1:9532/api/readele', {
3927
             params: params
3854
             params: params
3928
           })
3855
           })
3929
             .then(function(response) {
3856
             .then(function(response) {
3947
             })
3874
             })
3948
             .catch(function(error) {
3875
             .catch(function(error) {
3949
             })
3876
             })
3950
-        }
3951
       }else if(index == 55){
3877
       }else if(index == 55){
3952
         var that = this
3878
         var that = this
3953
         let params = {
3879
         let params = {

+ 16 - 19
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue 查看文件

582
             caseHistory.confirm_failure_date
582
             caseHistory.confirm_failure_date
583
           );
583
           );
584
           this.drug_allergy_history = caseHistory.drug_allergy_history;
584
           this.drug_allergy_history = caseHistory.drug_allergy_history;
585
-          this.physical_examination = caseHistory.physical_examination;
585
+          this.physical_examination = caseHistory.physical_examination
586
           this.special_inspection = caseHistory.special_inspection;
586
           this.special_inspection = caseHistory.special_inspection;
587
           this.lab_apparatus = caseHistory.lab_apparatus;
587
           this.lab_apparatus = caseHistory.lab_apparatus;
588
           this.form.id = historyInfo.id;
588
           this.form.id = historyInfo.id;
827
         this.primary_disease = this.LastCaseHistory.primary_disease
827
         this.primary_disease = this.LastCaseHistory.primary_disease
828
         this.confirm_failure_date = this.LastCaseHistory.confirm_failure_date
828
         this.confirm_failure_date = this.LastCaseHistory.confirm_failure_date
829
         this.drug_allergy_history = this.LastCaseHistory.drug_allergy_history
829
         this.drug_allergy_history = this.LastCaseHistory.drug_allergy_history
830
-        this.physical_examination = this.LastCaseHistory.physical_examination
830
+        this.physical_examination = this.LastCaseHistory.physical_examination?this.patientInfo.remark:""
831
         this.special_inspection = this.LastCaseHistory.special_inspection
831
         this.special_inspection = this.LastCaseHistory.special_inspection
832
         this.lab_apparatus = this.LastCaseHistory.lab_apparatus
832
         this.lab_apparatus = this.LastCaseHistory.lab_apparatus
833
         this.case_history.sick = this.LastCaseHistory.sick
833
         this.case_history.sick = this.LastCaseHistory.sick
848
         this.primary_disease = this.case_history.primary_disease
848
         this.primary_disease = this.case_history.primary_disease
849
         this.confirm_failure_date = this.case_history.confirm_failure_date
849
         this.confirm_failure_date = this.case_history.confirm_failure_date
850
         this.drug_allergy_history = this.case_history.drug_allergy_history
850
         this.drug_allergy_history = this.case_history.drug_allergy_history
851
-        this.physical_examination = this.case_history.physical_examination
851
+        this.physical_examination = this.case_history.physical_examination?this.patientInfo.remark:""
852
         this.special_inspection = this.case_history.special_inspection
852
         this.special_inspection = this.case_history.special_inspection
853
         this.lab_apparatus = this.case_history.lab_apparatus
853
         this.lab_apparatus = this.case_history.lab_apparatus
854
       }
854
       }
882
     patientInfo: {
882
     patientInfo: {
883
       handler(newval, oldval) {
883
       handler(newval, oldval) {
884
 
884
 
885
-        this.primary_disease = this.patientInfo.primary_disease;
886
-        this.confirm_failure_date = this.patientInfo.confirm_failure_date;
887
-        this.drug_allergy_history = this.patientInfo.drug_allergy_history;
888
-        this.physical_examination = this.patientInfo.physical_examination;
889
-        this.special_inspection = this.patientInfo.special_inspection;
890
-        this.lab_apparatus = this.patientInfo.lab_apparatus;
891
-        console.log("WOWOWOWOOWOWOWWO",this.patientInfo)
892
-        console.log("透气那数据阿道夫阿道夫阿道夫低分安抚",this.LastCaseHistory)
893
-        console.log("befor------------------------",this.befor)
894
-        console.log("patient------------------------",this.patientInfo)
895
-        console.log("prescriptionInfo--------------------",this.prescriptionInfo)
896
-        console.log("this.diagnoses",this.diagnoses)
897
-        console.log("this.case_history",this.case_history)
898
         if(this.case_history!=null && this.case_history.id == 0){
885
         if(this.case_history!=null && this.case_history.id == 0){
899
           console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
886
           console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
900
           if(this.befor!=undefined){
887
           if(this.befor!=undefined){
919
           }   
906
           }   
920
         }
907
         }
921
         if(this.patientInfo!=null){
908
         if(this.patientInfo!=null){
909
+           console.log("owowowowowoo222222222222222",this.patientInfo)
922
            this.case_history.chief_conplaint = this.patientInfo.patient_complains
910
            this.case_history.chief_conplaint = this.patientInfo.patient_complains
923
            this.case_history.history_of_present_illness = this.patientInfo.present_history
911
            this.case_history.history_of_present_illness = this.patientInfo.present_history
924
            this.case_history.past_history = this.patientInfo.past_history
912
            this.case_history.past_history = this.patientInfo.past_history
925
            this.allergic_history = this.patientInfo.allergic_history
913
            this.allergic_history = this.patientInfo.allergic_history
926
            this.case_history.diagnostic = this.patientInfo.diagnose
914
            this.case_history.diagnostic = this.patientInfo.diagnose
927
-         
915
+           this.physical_examination = this.patientInfo.remark
916
+           this.primary_disease = this.patientInfo.primary_disease;
917
+            this.confirm_failure_date = this.patientInfo.confirm_failure_date;
918
+            this.drug_allergy_history = this.patientInfo.drug_allergy_history;
919
+            this.special_inspection = this.patientInfo.special_inspection;
920
+            this.lab_apparatus = this.patientInfo.lab_apparatus;
928
            if(this.prescriptionInfo!=null){
921
            if(this.prescriptionInfo!=null){
929
                console.log("诊断---------------------",this.diagnoses)
922
                console.log("诊断---------------------",this.diagnoses)
930
               this.case_history.diagnose = this.getDiagnosis(this.prescriptionInfo.diagnosis) 
923
               this.case_history.diagnose = this.getDiagnosis(this.prescriptionInfo.diagnosis) 
931
            }
924
            }
932
          }
925
          }
933
         }
926
         }
934
-      
927
+        console.log("体格检查444444444444444444444",this.physical_examination)
935
       },
928
       },
936
       deep: true,
929
       deep: true,
937
     },
930
     },
953
         this.primary_disease = this.case_history.primary_disease
946
         this.primary_disease = this.case_history.primary_disease
954
         this.confirm_failure_date = this.case_history.confirm_failure_date
947
         this.confirm_failure_date = this.case_history.confirm_failure_date
955
         this.drug_allergy_history = this.case_history.drug_allergy_history
948
         this.drug_allergy_history = this.case_history.drug_allergy_history
956
-        this.physical_examination = this.case_history.physical_examination
949
+        if(this.case_history.physical_examination!=''){
950
+          this.physical_examination = this.case_history.physical_examination
951
+        }
952
+      
953
+        console.log("体格检查555555555555555555",this.physical_examination)
957
         this.special_inspection = this.case_history.special_inspection
954
         this.special_inspection = this.case_history.special_inspection
958
         this.lab_apparatus = this.case_history.lab_apparatus
955
         this.lab_apparatus = this.case_history.lab_apparatus
959
         this.watchSign++;
956
         this.watchSign++;

+ 1 - 1
src/xt_pages/outpatientDoctorStation/recordPrint.vue 查看文件

62
       <!-- || org_id == 0-->
62
       <!-- || org_id == 0-->
63
       </printThree>
63
       </printThree>
64
       <printFour
64
       <printFour
65
-        v-if="org_id == 10138 || org_id == 10278 || org_id == 10341 || org_id == 10342"
65
+        v-if="org_id == 10138 || org_id == 10278 || org_id == 10341 || org_id == 10342 || org_id == 0"
66
         ref="printFour"
66
         ref="printFour"
67
         v-bind:childResponse="childResponse"
67
         v-bind:childResponse="childResponse"
68
         :patient="patient"
68
         :patient="patient"

+ 400 - 0
src/xt_pages/outpatientTool/components/allgather.vue 查看文件

1
+<template>
2
+  <div>
3
+    <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
4
+      <div>
5
+
6
+
7
+        <el-select size="small" v-model="item_time_type" placeholder="请选择"
8
+                   style="width:150px;margin-left:10px;" @change="changeTimeItem">
9
+
10
+          <el-option
11
+            label="处方时间"
12
+            value="0">
13
+          </el-option>
14
+
15
+          <el-option
16
+            label="结算时间"
17
+            value="1">
18
+          </el-option>
19
+
20
+        </el-select>
21
+        <el-date-picker
22
+          v-model="chargeDate"
23
+          type="daterange"
24
+          value-format="yyyy-MM-dd"
25
+          range-separator="至"
26
+          start-placeholder="开始日期"
27
+          @change="changeDate"
28
+          end-placeholder="结束日期">
29
+        </el-date-picker>
30
+      </div>
31
+      <div>
32
+
33
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
34
+      </div>
35
+    </div>
36
+    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="tables"
37
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
38
+              v-loading="gather_loading"
39
+              max-height="600"
40
+              :span-method="merge"
41
+              highlight-current-row>
42
+
43
+      <el-table-column align="center" prop="item_name" label="项目类别">
44
+        <template slot-scope="scope">{{ scope.row.item_name }}</template>
45
+      </el-table-column>
46
+      <el-table-column align="center" prop="price" label="费用">
47
+        <template slot-scope="scope">{{ scope.row.price.toFixed(2) }}</template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="sum" label="费用总额">
50
+        <template slot-scope="scope">
51
+          <div>{{ scope.row.sum.toFixed(2) }}</div>
52
+        </template>
53
+      </el-table-column>
54
+
55
+    </el-table>
56
+  </div>
57
+</template>
58
+
59
+
60
+<script>
61
+import { getDictionaryDataConfig } from '@/utils/data'
62
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
63
+import { GetSummaryDetail } from '@/api/his/his'
64
+// import NewStatementPrint from './newStatementPrint'
65
+const moment = require('moment')
66
+export default {
67
+  components: {
68
+    BreadCrumb
69
+
70
+  },
71
+  data() {
72
+    return {
73
+      gather_loading: false,
74
+      crumbs: [],
75
+      tempArr: [],
76
+      sameRowArr: [],
77
+      keywords: '',
78
+      pos: 0,
79
+      all_table_data: [],
80
+      costClassify: getDictionaryDataConfig('system', 'cost_classify'),
81
+      tableData: [],
82
+      chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
83
+      item_type: '0',
84
+      new_item_type: 0,
85
+      item_time_type: '1',
86
+      items: [
87
+        { id: 1, name: '药品' },
88
+        { id: 4, name: '检验费' },
89
+        { id: 5, name: '治疗费' },
90
+        { id: 6, name: '护理费' },
91
+        { id: 7, name: '其他' },
92
+        { id: 3, name: '耗材' }
93
+
94
+      ]
95
+
96
+    }
97
+  },
98
+  methods: {
99
+
100
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
101
+      if (columnIndex === 0) {
102
+        if (rowIndex % 2 === 0) {
103
+          return {
104
+            rowspan: 2,
105
+            colspan: 1
106
+          }
107
+        } else {
108
+          return {
109
+            rowspan: 0,
110
+            colspan: 0
111
+          }
112
+        }
113
+      }
114
+    },
115
+    unique(arr) {
116
+      const res = new Map()
117
+      return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
118
+    },
119
+    changeDate() {
120
+      // console.log(this.chargeDate)
121
+      this.getSummaryDetailList()
122
+    }, changeTimeItem() {
123
+      this.getSummaryDetailList()
124
+    },
125
+    changeItem() {
126
+      this.new_item_type = this.item_type
127
+      if (this.item_type == 1) {
128
+        this.new_item_type = -100
129
+      } else if (this.item_type == 5) {
130
+        this.new_item_type = -200
131
+      }
132
+      this.getSummaryDetailList()
133
+    }, uniquepid(arr) {
134
+      const res = new Map()
135
+      return arr.filter((arr) => !res.has(arr.p_id) && res.set(arr.p_id, 1))
136
+    },
137
+    searchAction() {
138
+      this.item_type = '0'
139
+      this.getSummaryDetailList()
140
+    },
141
+    getSummaryDetailList() {
142
+      this.gather_loading = true
143
+      let start_time = this.chargeDate[0]
144
+      let end_time = this.chargeDate[1]
145
+      let params = {
146
+        start_time: start_time,
147
+        end_time: end_time,
148
+        type: 0,
149
+        keyword: this.keywords,
150
+        time_type: this.item_time_type
151
+      }
152
+      GetSummaryDetail(params).then(response => {
153
+        if (response.data.state == 0) {
154
+          this.gather_loading = false
155
+
156
+          this.$message.error(response.data.msg)
157
+          return false
158
+        } else {
159
+          this.gather_loading = false
160
+
161
+          let tempPatients = []
162
+          let tempPatientsTwo = []
163
+          this.tableData = []
164
+          this.all_table_data = []
165
+
166
+          let tempData = response.data
167
+          tempPatientsTwo = tempData
168
+
169
+          let infos = this.unique2(tempPatientsTwo)
170
+          let sum = 0
171
+          for (let e = 0; e < infos.length; e++) {
172
+            let obj = {
173
+              'sum': 0,
174
+              'price': 0,
175
+              'cost_classify': infos[e].cost_classify,
176
+              'item_name': this.getName(infos[e].cost_classify)
177
+            }
178
+            let price = 0
179
+            for (let d = 0; d < tempPatientsTwo.length; d++) {
180
+              if (tempPatientsTwo[d].cost_classify == infos[e].cost_classify) {
181
+                price = parseFloat(price.toString()) + parseFloat((parseFloat(tempPatientsTwo[d].cnt.toString()) * parseFloat(tempPatientsTwo[d].pric.toString()).toFixed(2)).toString())
182
+              }
183
+              obj.price = price
184
+            }
185
+            sum = sum + price
186
+
187
+            this.tableData.push(obj)
188
+          }
189
+          for(let i = 0; i < this.tableData.length;i++){
190
+            this.tableData[i].sum = sum
191
+          }
192
+
193
+          // for (let i = 0; i < tempPatientsThree.length; i++) {
194
+          //   let sum = 0
195
+          //   for (let b = 0; b < tempPatientsThree[i].length; b++) {
196
+          //     let obj = {
197
+          //       cost_classify: tempPatientsThree[i].items[b].cost_classify,
198
+          //       price: tempPatientsThree[i].items[b].price,
199
+          //       item_name: tempPatientsThree[i].items[b].item_name,
200
+          //       sum: 0
201
+          //     }
202
+          //     sum = sum + tempPatientsThree[i].items[b].price
203
+          //     this.tableData.push(obj)
204
+          //     this.all_table_data.push(obj)
205
+          //   }
206
+          //   for (let c = 0; c < this.tableData.length; c++) {
207
+          //     this.tableData[c].sum = sum
208
+          //   }
209
+          // }
210
+
211
+          console.log(this.tableData)
212
+
213
+          this.handleSpanTempArr()
214
+        }
215
+      })
216
+    }, getName(cost_classify) {
217
+      if (cost_classify == -1000) {
218
+        return '药品费'
219
+      } else if (cost_classify == -100) {
220
+        return '耗材费'
221
+      } else {
222
+        var costClassify = getDictionaryDataConfig('system', 'cost_classify')
223
+        var name = ''
224
+        for (let i = 0; i < costClassify.length; i++) {
225
+          if (cost_classify == costClassify[i].id) {
226
+            name = costClassify[i].name
227
+          }
228
+        }
229
+        return name
230
+      }
231
+    }, uniqueProjectAndAdvice(array) {
232
+      // res用来存储结果
233
+      var res = []
234
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
235
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
236
+          if (array[i].item_id === res[j].item_id && array[i].price === res[j].price) {
237
+            break
238
+          }
239
+        }
240
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
241
+        if (j === resLen) {
242
+          res.push(array[i])
243
+        }
244
+      }
245
+      return res
246
+    }, unique2(array) {
247
+
248
+      // res用来存储结果
249
+      var res = []
250
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
251
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
252
+          if (array[i].cost_classify === res[j].cost_classify) {
253
+            break
254
+          }
255
+        }
256
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
257
+        if (j === resLen) {
258
+          res.push(array[i])
259
+        }
260
+      }
261
+      return res
262
+    }, unique3(array) {
263
+      console.log('-----11122222')
264
+
265
+      console.log(array)
266
+      // res用来存储结果
267
+      var res = []
268
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
269
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
270
+          if (array[i].patient_id === res[j].patient_id) {
271
+            break
272
+          }
273
+        }
274
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
275
+        if (j === resLen) {
276
+          res.push(array[i])
277
+        }
278
+      }
279
+      return res
280
+    }, sort(arr) {
281
+      for (var i = 0; i < arr.length - 1; i++) {
282
+        for (var j = 0; j < arr.length - i - 1; j++) {
283
+          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
284
+            var hand = arr[j]
285
+            arr[j] = arr[j + 1]
286
+            arr[j + 1] = hand
287
+
288
+          }
289
+        }
290
+      }
291
+      return arr
292
+    }, handleSpanTempArr() {
293
+      this.tempArr = []
294
+
295
+      for (let i = 0; i < this.tableData.length; i++) {
296
+        if (i === 0) {
297
+          this.tempArr.push(1)
298
+          this.pos = 0
299
+        } else {
300
+          // 判断当前元素与上一个元素是否相同
301
+          if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
302
+            this.tempArr[this.pos] += 1
303
+            this.tempArr.push(0)
304
+          } else {
305
+            this.tempArr.push(1)
306
+            this.pos = i
307
+          }
308
+        }
309
+      }
310
+
311
+      let sameRowArr = [], sIdx = 0
312
+      this.tableData.forEach((item, index) => {
313
+        item.index = index
314
+        if (index === 0) {
315
+          sameRowArr.push([index])
316
+        } else {
317
+          if (item.patient_id === this.tableData[index - 1].patient_id) {
318
+            sameRowArr[sIdx].push(index)
319
+          } else {
320
+            sIdx = sIdx + 1
321
+            sameRowArr.push([index])
322
+          }
323
+        }
324
+      })
325
+      this.sameRowArr = sameRowArr
326
+    }, merge({ row, column, rowIndex, columnIndex }) {
327
+      if ( columnIndex === 2) {
328
+        const _row = this.tempArr[rowIndex]
329
+        const _col = _row > 0 ? 1 : 0
330
+        return {
331
+          rowspan: _row,
332
+          colspan: _col
333
+        }
334
+      }
335
+    }, getTotal(param) {
336
+      const { columns, data } = param
337
+      const sums = []
338
+      columns.forEach((column, index) => {
339
+        if (index === 0) {
340
+          sums[index] = '合计'
341
+          return
342
+        }
343
+        console.log(data)
344
+        const values = data.map(item => Number(item[column.property]))
345
+        if (column.property === 'sum') {
346
+          sums[index] = values.reduce((prev, curr) => {
347
+            const value = Number(curr)
348
+            if (!isNaN(value)) {
349
+              return prev + curr
350
+            } else {
351
+              return prev
352
+            }
353
+          }, 0)
354
+          sums[index] = sums[index].toFixed(2)
355
+        } else {
356
+          sums[index] = ''
357
+        }
358
+      })
359
+
360
+      return sums
361
+    }, export_detail() {
362
+
363
+      let list = []
364
+      for (let i = 0; i < this.tableData.length; i++) {
365
+        let order = this.tableData[i]
366
+        let name = order.name
367
+        let item_name = order.item_name
368
+        let pay_sumamt = order.price.toFixed(2)
369
+        let total = order.sum.toFixed(2)
370
+
371
+        let obj = {
372
+          '患者姓名': name,
373
+          '项目类别': item_name,
374
+          '费用': pay_sumamt,
375
+          '费用总额': total
376
+        }
377
+        list.push(obj)
378
+      }
379
+      import('@/vendor/Export2Excel').then(excel => {
380
+        const tHeader = ['患者姓名', '项目名称', '费用', '费用总额']
381
+        const filterVal = ['患者姓名', '项目名称', '费用', '费用总额']
382
+        const data = this.formatJson(filterVal, list)
383
+        excel.export_json_to_excel1({
384
+          header: tHeader,
385
+          data,
386
+          filename: '汇总',
387
+          ref: this.$refs['tables'].$el
388
+        })
389
+      })
390
+
391
+    }, formatJson(filterVal, jsonData) {
392
+      return jsonData.map(v => filterVal.map(j => v[j]))
393
+    }
394
+  },
395
+  created() {
396
+    this.getSummaryDetailList()
397
+
398
+  }
399
+}
400
+</script>

+ 128 - 184
src/xt_pages/outpatientTool/components/gather.vue 查看文件

18
             value="0">
18
             value="0">
19
           </el-option>
19
           </el-option>
20
           <el-option
20
           <el-option
21
-            v-for="item,index in items"
21
+            v-for="item,index in costClassify"
22
             :key="index"
22
             :key="index"
23
             :label="item.name"
23
             :label="item.name"
24
             :value="item.id">
24
             :value="item.id">
97
 
97
 
98
 
98
 
99
 <script>
99
 <script>
100
+import { getDictionaryDataConfig } from "@/utils/data";
100
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
101
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
101
 import { GetSummaryDetail } from '@/api/his/his'
102
 import { GetSummaryDetail } from '@/api/his/his'
102
 import { uParseTime } from '@/utils/tools'
103
 import { uParseTime } from '@/utils/tools'
115
       sameRowArr: [],
116
       sameRowArr: [],
116
       keywords: '',
117
       keywords: '',
117
       pos:0,
118
       pos:0,
118
-
119
+      all_table_data:[],
120
+       costClassify:getDictionaryDataConfig('system','cost_classify'),
119
       tableData: [],
121
       tableData: [],
120
       chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
122
       chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
121
       item_type: '0',
123
       item_type: '0',
124
+      new_item_type:0,
122
       item_time_type:'1',
125
       item_time_type:'1',
123
       items: [
126
       items: [
124
         { id: 1, name: '药品' },
127
         { id: 1, name: '药品' },
125
-        { id: 2, name: '所有项目' },
126
         { id: 4, name: '检验费' },
128
         { id: 4, name: '检验费' },
127
         { id: 5, name: '治疗费' },
129
         { id: 5, name: '治疗费' },
128
         { id: 6, name: '护理费' },
130
         { id: 6, name: '护理费' },
129
         { id: 7, name: '其他' },
131
         { id: 7, name: '其他' },
130
-
131
         { id: 3, name: '耗材' },
132
         { id: 3, name: '耗材' },
132
 
133
 
133
       ]
134
       ]
162
       this.getSummaryDetailList()
163
       this.getSummaryDetailList()
163
     },
164
     },
164
     changeItem() {
165
     changeItem() {
166
+      this.new_item_type = this.item_type
167
+      if(this.item_type == 1){
168
+        this.new_item_type = -100
169
+      }else if(this.item_type == 5){
170
+        this.new_item_type = -200
171
+      }
165
       this.getSummaryDetailList()
172
       this.getSummaryDetailList()
166
     }, uniquepid(arr) {
173
     }, uniquepid(arr) {
167
       const res = new Map()
174
       const res = new Map()
178
       let params = {
185
       let params = {
179
         start_time: start_time,
186
         start_time: start_time,
180
         end_time: end_time,
187
         end_time: end_time,
181
-        type: this.item_type,
188
+        type: 0,
182
         keyword: this.keywords,
189
         keyword: this.keywords,
183
         time_type:this.item_time_type,
190
         time_type:this.item_time_type,
184
       }
191
       }
194
           let tempPatients = []
201
           let tempPatients = []
195
           let tempPatientsTwo = []
202
           let tempPatientsTwo = []
196
           this.tableData = []
203
           this.tableData = []
204
+          this.all_table_data = []
205
+
197
           let tempData = response.data
206
           let tempData = response.data
198
           let data = response.data
207
           let data = response.data
199
           let orders = this.uniquepid(tempData)
208
           let orders = this.uniquepid(tempData)
212
             }
221
             }
213
             tempPatients.push(obj)
222
             tempPatients.push(obj)
214
           }
223
           }
215
-          console.log(tempPatients)
216
 
224
 
217
           for (let i = 0; i < tempPatients.length; i++) {
225
           for (let i = 0; i < tempPatients.length; i++) {
218
             let obj = {
226
             let obj = {
230
                   newObj['type'] = 1
238
                   newObj['type'] = 1
231
                   newObj['item_name'] = orders[c].item_name
239
                   newObj['item_name'] = orders[c].item_name
232
                   newObj['item_id'] = orders[c].item_id
240
                   newObj['item_id'] = orders[c].item_id
233
-
241
+                  newObj['cost_classify'] = -100 //药品
234
                 }
242
                 }
235
                 if (orders[c].advice_id == 0 && orders[c].project_id > 0) {
243
                 if (orders[c].advice_id == 0 && orders[c].project_id > 0) {
236
                   newObj['item_id'] = orders[c].item_id
244
                   newObj['item_id'] = orders[c].item_id
237
                   if (orders[c].p_type == 2) {
245
                   if (orders[c].p_type == 2) {
238
                     newObj['type'] = 2
246
                     newObj['type'] = 2
239
                     newObj['item_name'] = orders[c].item_name
247
                     newObj['item_name'] = orders[c].item_name
248
+                    newObj['cost_classify'] = orders[c].cost_classify //项目
249
+
240
                   } else if (orders[c].p_type == 3) {
250
                   } else if (orders[c].p_type == 3) {
241
                     newObj['type'] = 3
251
                     newObj['type'] = 3
242
                     newObj['item_name'] = orders[c].item_name
252
                     newObj['item_name'] = orders[c].item_name
253
+                    newObj['cost_classify'] = -200 //耗材
254
+
243
                   }
255
                   }
244
                 }
256
                 }
245
                 obj.order_info.push(newObj)
257
                 obj.order_info.push(newObj)
246
               }
258
               }
247
             tempPatientsTwo.push(obj)
259
             tempPatientsTwo.push(obj)
248
           }
260
           }
249
-          console.log(tempPatientsTwo)
250
 
261
 
262
+
263
+
264
+          var tempPatientsThree = []
251
           for (let d = 0; d < tempPatientsTwo.length; d++) {
265
           for (let d = 0; d < tempPatientsTwo.length; d++) {
252
-            tempPatientsTwo[d]['new_order_info'] = []
253
-            let project = []
254
-            let advice = []
255
-            for (let b = 0; b < tempPatientsTwo[d].order_info.length; b++) {
256
-              if (tempPatientsTwo[d].order_info[b].type == 1) {
257
-                advice.push(tempPatientsTwo[d].order_info[b])
258
-              } else {
259
-                project.push(tempPatientsTwo[d].order_info[b])
266
+            let new_obj={
267
+              patient_id:tempPatientsTwo[d].patient_id,
268
+              items:[],
269
+            }
270
+
271
+            let  infos = this.unique2(tempPatientsTwo[d].order_info)
272
+            for(let e = 0; e < infos.length; e++){
273
+              let price = 0
274
+              for(let f = 0; f < tempPatientsTwo[d].order_info.length; f++){
275
+                if (tempPatientsTwo[d].order_info[f].cost_classify == infos[e].cost_classify){
276
+                  price = parseFloat(price.toString()) + parseFloat((parseFloat(tempPatientsTwo[d].order_info[f].count.toString()) * parseFloat(tempPatientsTwo[d].order_info[f].price.toString()).toFixed(2)).toString())
277
+                }
260
               }
278
               }
279
+              let obj = {
280
+                "sum":0,
281
+                "price": price,
282
+                "cost_classify":infos[e].cost_classify,
283
+                "item_name":this.getName(infos[e].cost_classify),
284
+                "patient_id":tempPatientsTwo[d].patient_id,
285
+                "name":tempPatientsTwo[d].name,
286
+              }
287
+              new_obj.items.push(obj)
261
             }
288
             }
262
-            // project = this.uniqueProjectAndAdvice(project)
263
-            // advice = this.uniqueProjectAndAdvice(advice)
264
 
289
 
265
-            let obj = {}
266
-            let price = 0
290
+            tempPatientsThree.push(new_obj)
291
+          }
267
 
292
 
268
-            let obj2 = {}
269
-            let price2 = 0
293
+          console.log("tempPatientsThree")
270
 
294
 
271
-            let obj3 = {}
272
-            let price3 = 0
295
+          console.log(tempPatientsThree)
273
 
296
 
274
-            for (let i = 0; i < project.length; i++) {
275
-              if (project[i].type == 2) {
276
-                price = parseFloat(price.toString()) + parseFloat((parseFloat(project[i].count.toString()) * parseFloat(project[i].price.toString()).toFixed(2)).toString())
277
-              } else if (project[i].type == 3) {
278
-                price3 = parseFloat(price3.toString()) + parseFloat((parseFloat(project[i].count.toString()) * parseFloat(project[i].price.toString()).toFixed(2)).toString())
297
+          for(let i = 0; i < tempPatientsThree.length;i++){
298
+            let sum = 0
299
+            for(let b = 0; b < tempPatientsThree[i].items.length;b++){
300
+              let obj = {
301
+                name:tempPatientsThree[i].items[b].name,
302
+                cost_classify:tempPatientsThree[i].items[b].cost_classify,
303
+                price:tempPatientsThree[i].items[b].price,
304
+                patient_id:tempPatientsThree[i].items[b].patient_id,
305
+                item_name:tempPatientsThree[i].items[b].item_name,
306
+                sum:0,
279
               }
307
               }
308
+              sum = sum + tempPatientsThree[i].items[b].price
309
+              this.tableData.push(obj)
310
+              this.all_table_data.push(obj)
280
             }
311
             }
281
-
282
-
283
-            for (let i = 0; i < advice.length; i++) {
284
-              price2 = parseFloat(price2.toString()) + parseFloat((parseFloat(advice[i].count.toString()) * parseFloat(advice[i].price.toString()).toFixed(2)).toString())
312
+            for(let c = 0; c < this.tableData.length;c++){
313
+              if(tempPatientsThree[i].patient_id == this.tableData[c].patient_id){
314
+                this.tableData[c].sum = sum
315
+              }
285
             }
316
             }
286
-
287
-
288
-            switch (parseInt(this.item_type)) {
289
-              case 0:
290
-
291
-                obj['sum'] = price + price2 + price3
292
-                obj['price'] = price
293
-                obj['item_name'] = '项目'
294
-                obj['name'] = tempPatientsTwo[d].name
295
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
296
-                this.tableData.push(obj)
297
-
298
-                obj2['sum'] = 0
299
-                obj2['price'] = price2
300
-                obj2['item_name'] = '药品'
301
-                obj2['name'] = tempPatientsTwo[d].name
302
-                obj2['patient_id'] = tempPatientsTwo[d].patient_id
303
-                this.tableData.push(obj2)
304
-
305
-                obj3['sum'] = 0
306
-                obj3['price'] = price3
307
-                obj3['item_name'] = '耗材'
308
-                obj3['name'] = tempPatientsTwo[d].name
309
-                obj3['patient_id'] = tempPatientsTwo[d].patient_id
310
-                this.tableData.push(obj3)
311
-                break
312
-              case 1:
313
-                obj2['sum'] = price2
314
-                obj2['price'] = price2
315
-                obj2['item_name'] = '药品'
316
-                obj2['name'] = tempPatientsTwo[d].name
317
-                obj2['patient_id'] = tempPatientsTwo[d].patient_id
318
-                this.tableData.push(obj2)
319
-                break
320
-              case 2:
321
-
322
-                obj['sum'] = price
323
-                obj['price'] = price
324
-                obj['item_name'] = '项目'
325
-                obj['name'] = tempPatientsTwo[d].name
326
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
327
-                this.tableData.push(obj)
328
-                break
329
-              case 3:
330
-                obj3['sum'] = price3
331
-                obj3['price'] = price3
332
-                obj3['item_name'] = '耗材'
333
-                obj3['name'] = tempPatientsTwo[d].name
334
-                obj3['patient_id'] = tempPatientsTwo[d].patient_id
335
-                this.tableData.push(obj3)
336
-                break
337
-              case 4:
338
-
339
-                obj['sum'] = price
340
-                obj['price'] = price
341
-                obj['item_name'] = '检验'
342
-                obj['name'] = tempPatientsTwo[d].name
343
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
344
-                this.tableData.push(obj)
345
-                break
346
-              case 5:
347
-
348
-                obj['sum'] = price
349
-                obj['price'] = price
350
-                obj['item_name'] = '治疗'
351
-                obj['name'] = tempPatientsTwo[d].name
352
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
353
-                this.tableData.push(obj)
354
-                break
355
-              case 6:
356
-
357
-                obj['sum'] = price
358
-                obj['price'] = price
359
-                obj['item_name'] = '护理'
360
-                obj['name'] = tempPatientsTwo[d].name
361
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
362
-                this.tableData.push(obj)
363
-                break
364
-              case 7:
365
-
366
-                obj['sum'] = price
367
-                obj['price'] = price
368
-                obj['item_name'] = '其他'
369
-                obj['name'] = tempPatientsTwo[d].name
370
-                obj['patient_id'] = tempPatientsTwo[d].patient_id
371
-                this.tableData.push(obj)
372
-                break
373
-
317
+            for(let c = 0; c < this.all_table_data.length;c++){
318
+              if(tempPatientsThree[i].patient_id == this.all_table_data[c].patient_id){
319
+                this.all_table_data[c].sum = sum
320
+              }
374
             }
321
             }
375
-
376
-
377
-
378
           }
322
           }
379
 
323
 
324
+          if(this.new_item_type == 0){
325
+            this.tableData = this.all_table_data
326
+          }else{
327
+            let new_table_data = []
328
+            for(let aa = 0; aa < this.all_table_data.length; aa++){
329
+              if(this.new_item_type == this.all_table_data[aa].cost_classify){
330
+                new_table_data.push(this.all_table_data[aa])
331
+              }
332
+            }
333
+            this.tableData = new_table_data
334
+          }
380
           this.handleSpanTempArr()
335
           this.handleSpanTempArr()
381
-          // this.tableData = tempPatientsTwo
382
-
383
-          // console.log(tempPatientsTwo.length)
384
-          //
385
-
386
         }
336
         }
387
-        //
388
-        // console.log('去重前')
389
-        // console.log(advice)
390
-        // console.log(project)
391
-        // //
392
-        // //
393
-
394
-        // //
395
-        // console.log('去重后')
396
-        //
397
-        // console.log(advice.length)
398
-        // console.log(project.length)
399
-        //
400
-        // for (let i = 0; i < project.length; i++) {
401
-        //   let obj = {}
402
-        //   let count = 0
403
-        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
404
-        //     if (project[i].patient_id == tempPatientsTwo[a].patient_id && project[i].item_id == tempPatientsTwo[a].item_id && project[i].price == tempPatientsTwo[a].price) {
405
-        //       count = count + tempPatientsTwo[a].count
406
-        //       obj['count'] = count
407
-        //
408
-        //     }
409
-        //     obj['price'] = project[i].price
410
-        //     obj['type'] = project[i].type
411
-        //     obj['item_name'] = project[i].item_name
412
-        //     obj['item_id'] = project[i].item_id
413
-        //     obj['name'] = project[i].name
414
-        //     obj['patient_id'] = project[i].patient_id
415
-        //     obj['count'] = count
416
-        //     this.tableData.push(obj)
417
-        //   }
418
-        // }
419
-        //
420
-        //
421
-        // for (let i = 0; i < advice.length; i++) {
422
-        //   let obj = {}
423
-        //   let count = 0
424
-        //   for (let a = 0; a < tempPatientsTwo.length; a++) {
425
-        //     if (advice[i].patient_id == tempPatientsTwo[a].patient_id && advice[i].item_id == tempPatientsTwo[a].item_id && advice[i].price == tempPatientsTwo[a].price) {
426
-        //       count = count + tempPatientsTwo[a].count
427
-        //       obj['count'] = count
428
-        //
429
-        //     }
430
-        //     obj['price'] = advice[i].price
431
-        //     obj['type'] = advice[i].type
432
-        //     obj['item_name'] = advice[i].item_name
433
-        //     obj['item_id'] = advice[i].item_id
434
-        //     obj['name'] = advice[i].name
435
-        //     obj['patient_id'] = advice[i].patient_id
436
-        //     this.tableData.push(obj)
437
-        //   }
438
-        // }
439
-        // console.log(this.tableData.length)
440
-        // this.tableData = this.sort(this.tableData)
441
-
442
       })
337
       })
338
+    },getName(cost_classify){
339
+      if (cost_classify == -100){
340
+        return  "药品费"
341
+      }else if(cost_classify == -200){
342
+        return  "耗材费"
343
+      }else{
344
+        var costClassify = getDictionaryDataConfig('system','cost_classify');
345
+        var name = "";
346
+        for(let i=0;i<costClassify.length;i++){
347
+          if(cost_classify == costClassify[i].id){
348
+            name = costClassify[i].name
349
+          }
350
+        }
351
+        return name
352
+      }
443
     }, uniqueProjectAndAdvice(array) {
353
     }, uniqueProjectAndAdvice(array) {
444
       // res用来存储结果
354
       // res用来存储结果
445
       var res = []
355
       var res = []
455
         }
365
         }
456
       }
366
       }
457
       return res
367
       return res
368
+    },unique2(array) {
369
+
370
+      // res用来存储结果
371
+      var res = []
372
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
373
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
374
+          if (array[i].cost_classify === res[j].cost_classify) {
375
+            break
376
+          }
377
+        }
378
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
379
+        if (j === resLen) {
380
+          res.push(array[i])
381
+        }
382
+      }
383
+      return res
384
+    },unique3(array) {
385
+      console.log("-----11122222")
386
+
387
+      console.log(array)
388
+      // res用来存储结果
389
+      var res = []
390
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
391
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
392
+          if (array[i].patient_id === res[j].patient_id) {
393
+            break
394
+          }
395
+        }
396
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
397
+        if (j === resLen) {
398
+          res.push(array[i])
399
+        }
400
+      }
401
+      return res
458
     }, sort(arr) {
402
     }, sort(arr) {
459
       for (var i = 0; i < arr.length - 1; i++) {
403
       for (var i = 0; i < arr.length - 1; i++) {
460
         for (var j = 0; j < arr.length - i - 1; j++) {
404
         for (var j = 0; j < arr.length - i - 1; j++) {

+ 7 - 0
src/xt_pages/outpatientTool/summary.vue 查看文件

10
                     <el-tab-pane label="明细" name="明细"></el-tab-pane>
10
                     <el-tab-pane label="明细" name="明细"></el-tab-pane>
11
                     <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
11
                     <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
12
                     <el-tab-pane label="结算" name="结算"></el-tab-pane>
12
                     <el-tab-pane label="结算" name="结算"></el-tab-pane>
13
+                  <el-tab-pane label="全部汇总" name="全部汇总"></el-tab-pane>
14
+
13
                 </el-tabs>
15
                 </el-tabs>
14
                 <detail v-if="titleType == '明细'"></detail>
16
                 <detail v-if="titleType == '明细'"></detail>
15
                 <gather v-if="titleType == '汇总'"></gather>
17
                 <gather v-if="titleType == '汇总'"></gather>
16
                 <settle v-if="titleType == '结算'"></settle>
18
                 <settle v-if="titleType == '结算'"></settle>
19
+<!--              <allgather v-if="titleType == '全部汇总'"></allgather>-->
20
+              <allgather v-if="titleType == '全部汇总'"></allgather>
21
+
17
             </div>
22
             </div>
18
         </div>
23
         </div>
19
     </div>
24
     </div>
28
   import Settle from './components/settle'
33
   import Settle from './components/settle'
29
   import Gather from './components/gather'
34
   import Gather from './components/gather'
30
   import Detail from './components/detail'
35
   import Detail from './components/detail'
36
+  import Allgather from './components/allgather.vue'
31
 
37
 
32
 
38
 
33
   const moment = require('moment')
39
   const moment = require('moment')
34
 
40
 
35
   export default {
41
   export default {
36
     components: {
42
     components: {
43
+      Allgather,
37
       Gather,
44
       Gather,
38
       Settle,
45
       Settle,
39
       Detail,
46
       Detail,

+ 1 - 1
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue 查看文件

441
               list[i].drugAddOne= 0
441
               list[i].drugAddOne= 0
442
               list[i].drugOutOne =0
442
               list[i].drugOutOne =0
443
               
443
               
444
-              if(this.org_id ==10210  || this.org_id ==10402 || this.org_id ==10215){
444
+              if(this.org_id ==10210  || this.org_id ==10402 || this.org_id ==10215 || this.org_id == 0 || this.org_id ==10191){
445
                  list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
445
                  list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
446
               }else{
446
               }else{
447
                 list[i].drugIn = this.GetInitStartFlow(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
447
                 list[i].drugIn = this.GetInitStartFlow(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)