Browse Source

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

XMLWAN 3 years ago
parent
commit
79fb99d273

+ 2 - 2
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue View File

@@ -85,9 +85,9 @@
85 85
         if(this.$store.getters.xt_user.org_id == 10138){
86 86
           setTimeout(() => {
87 87
             const style =
88
-            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 49%;}}}';
88
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 48%;}}}';
89 89
             const style2 =
90
-            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 52%;}}}';
90
+            '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 51%;}}}';
91 91
             const style3 =
92 92
             '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 55%;}}}';
93 93
             const style4 =

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

@@ -100,9 +100,9 @@
100 100
                   <tr>
101 101
                       <td width="70">类别</td>
102 102
                       <td>项目</td>
103
-                      <td width="180">规格</td>
104
-                      <td width="50">单位</td>
105
-                      <td width="50">数量</td>
103
+                      <td min-width="180" style="min-width:60px;">规格</td>
104
+                      <td width="40">单位</td>
105
+                      <td width="40">数量</td>
106 106
                       <td width="60">单价</td>
107 107
                       <td width="70">总额</td>
108 108
                       <td width="130">小计</td>

+ 129 - 114
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -638,10 +638,12 @@
638 638
                 title="提示"
639 639
                 :visible.sync="dialogVisible"
640 640
                 width="30%"
641
-                >
641
+        >
642 642
             <span>是否修改医疗类型</span>
643 643
 
644
-            <el-select style="width:50%;" v-model="temp_med_type" placeholder="医疗类型"  v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >
644
+            <el-select style="width:50%;" v-model="temp_med_type" placeholder="医疗类型"
645
+                       v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)"
646
+                       @change="changevalue">
645 647
                 <el-option
646 648
                         v-for="(item,index) in medical_care"
647 649
                         :key="index"
@@ -649,7 +651,7 @@
649 651
                         :value="item.value">
650 652
                 </el-option>
651 653
             </el-select>
652
-            <el-select style="width:50%;" v-model="temp_med_type" placeholder="医疗类型"  v-else @change="changevalue" >
654
+            <el-select style="width:50%;" v-model="temp_med_type" placeholder="医疗类型" v-else @change="changevalue">
653 655
                 <el-option
654 656
                         v-for="(item,index) in register"
655 657
                         :key="index"
@@ -713,6 +715,7 @@
713 715
   import additionalCharges from './components/additionalCharges'
714 716
   import { getPatientInformation, getPatientList } from '@/api/project/project'
715 717
   import {
718
+    changeMedType,
716 719
     getChargeHisPatientInfo,
717 720
     getChargeHisPatientList,
718 721
     getDayOrMonthHisPrescription,
@@ -720,11 +723,10 @@
720 723
     getSchedulePatientList,
721 724
     preSettle,
722 725
     Refund,
726
+    refunddetail,
723 727
     refundNumber,
724 728
     register,
725
-    upload,
726
-    changeMedType,
727
-    refunddetail
729
+    upload
728 730
   } from '@/api/his/his'
729 731
   import RegisterDialog from './components/registerDialog'
730 732
   import treatPrint from './treatPrint'
@@ -756,8 +758,8 @@
756 758
     },
757 759
     data() {
758 760
       return {
759
-        temp_med_type:"",
760
-        dialogVisible:false,
761
+        temp_med_type: '',
762
+        dialogVisible: false,
761 763
         form: {
762 764
           p_type: '',
763 765
           sick_type: '',
@@ -780,8 +782,8 @@
780 782
           { value: 18, label: '预防接种' },
781 783
           { value: 19, label: '门诊输血' },
782 784
           { value: 91, label: '新冠肺炎门诊' },
783
-          {value: 1111, label: "精一"},
784
-          {value: 1112, label: "精二"},
785
+          { value: 1111, label: '精一' },
786
+          { value: 1112, label: '精二' }
785 787
         ],
786 788
 
787 789
         medical_care_two: [
@@ -795,8 +797,8 @@
795 797
           { value: '18', label: '预防接种' },
796 798
           { value: '19', label: '门诊输血' },
797 799
           { value: '91', label: '新冠肺炎门诊' },
798
-          {value: '1111', label: "精一"},
799
-          {value: '1112', label: "精二"},
800
+          { value: '1111', label: '精一' },
801
+          { value: '1112', label: '精二' }
800 802
         ],
801 803
 
802 804
         register: [
@@ -897,9 +899,9 @@
897 899
         department: [],
898 900
         all_patient: [],
899 901
 
900
-        temp_prescriptions:null,
902
+        temp_prescriptions: null,
901 903
 
902
-        temp_ids:"",
904
+        temp_ids: ''
903 905
 
904 906
       }
905 907
     },
@@ -922,11 +924,11 @@
922 924
       this.getPatientList()
923 925
     },
924 926
     methods: {
925
-      openDialog(item){
927
+      openDialog(item) {
926 928
         this.dialogVisible = true
927 929
         this.temp_prescriptions = item
928 930
       },
929
-      comfirmChangeMedType(){
931
+      comfirmChangeMedType() {
930 932
         let params = {
931 933
           id: this.temp_prescriptions.id,
932 934
           med_type: this.temp_med_type.toString()
@@ -936,13 +938,11 @@
936 938
             this.changeRadioAndPatient(1)
937 939
             this.dialogVisible = false
938 940
 
939
-
940 941
           } else {
941 942
             this.$message.error(response.data.msg)
942 943
           }
943 944
         })
944 945
 
945
-
946 946
       },
947 947
       changevalue(val) {
948 948
         this.$forceUpdate()
@@ -1032,7 +1032,7 @@
1032 1032
         form['org_id'] = this.$store.getters.xt_user.org_id
1033 1033
 
1034 1034
         form['p_type'] = this.current_med_type
1035
-        form['diagnosis'] = this.form.diagnosis.join(",")
1035
+        form['diagnosis'] = this.form.diagnosis.join(',')
1036 1036
         form['sick_type'] = this.form.sick_type
1037 1037
         form['ids'] = this.temp_ids
1038 1038
         if (this.activeName == 'first') {
@@ -1898,7 +1898,7 @@
1898 1898
             for (let i = 0; i < this.all_table_data.length; i++) {
1899 1899
               let isHasUnCharge = false
1900 1900
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
1901
-                if (this.all_table_data[i].order_status != 2) {
1901
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
1902 1902
                   isHasUnCharge = true
1903 1903
                 } else {
1904 1904
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -1909,7 +1909,7 @@
1909 1909
 
1910 1910
                 }
1911 1911
               }
1912
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
1912
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
1913 1913
                 isHasUnCharge = true
1914 1914
 
1915 1915
               }
@@ -1945,7 +1945,7 @@
1945 1945
                 for (let i = 0; i < this.all_table_data.length; i++) {
1946 1946
                   let isHasUnCharge = false
1947 1947
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
1948
-                    if (this.all_table_data[i].order_status != 2) {
1948
+                    if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
1949 1949
                       isHasUnCharge = true
1950 1950
                     } else {
1951 1951
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -1957,7 +1957,7 @@
1957 1957
                     }
1958 1958
 
1959 1959
                   }
1960
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
1960
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
1961 1961
                     isHasUnCharge = true
1962 1962
 
1963 1963
                   }
@@ -2118,7 +2118,7 @@
2118 2118
             for (let i = 0; i < this.all_table_data.length; i++) {
2119 2119
               let isHasUnCharge = false
2120 2120
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
2121
-                if (this.all_table_data[i].order_status != 2) {
2121
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
2122 2122
                   isHasUnCharge = true
2123 2123
                 } else {
2124 2124
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -2129,7 +2129,7 @@
2129 2129
 
2130 2130
                 }
2131 2131
               }
2132
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
2132
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
2133 2133
                 isHasUnCharge = true
2134 2134
 
2135 2135
               }
@@ -2719,7 +2719,7 @@
2719 2719
 
2720 2720
         } else if (index == 8) {
2721 2721
           if (this.$store.getters.xt_user.org_id != 10028 || this.$store.getters.xt_user.org_id != 9504 || this.$store.getters.xt_user.org_id != 10138) {
2722
-            if (this.form.diagnosis.length  == 0) {
2722
+            if (this.form.diagnosis.length == 0) {
2723 2723
               that.$message.error('诊断不能为空,请选择诊断内容')
2724 2724
               return
2725 2725
             }
@@ -2738,7 +2738,7 @@
2738 2738
           form['record_time'] = this.record_date
2739 2739
 
2740 2740
           form['p_type'] = med_type
2741
-          form['diagnosis'] = this.form.diagnosis.join(",")
2741
+          form['diagnosis'] = this.form.diagnosis.join(',')
2742 2742
           form['sick_type'] = this.form.sick_type
2743 2743
 
2744 2744
           form['admin_user_id'] = this.$store.getters.xt_user.user.id
@@ -3292,7 +3292,7 @@
3292 3292
             for (let i = 0; i < this.all_table_data.length; i++) {
3293 3293
               let isHasUnCharge = false
3294 3294
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3295
-                if (this.all_table_data[i].order_status != 2) {
3295
+                if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3296 3296
                   isHasUnCharge = true
3297 3297
                 } else {
3298 3298
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3303,7 +3303,7 @@
3303 3303
 
3304 3304
                 }
3305 3305
               }
3306
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3306
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3307 3307
                 isHasUnCharge = true
3308 3308
 
3309 3309
               }
@@ -3339,7 +3339,7 @@
3339 3339
                 for (let i = 0; i < this.all_table_data.length; i++) {
3340 3340
                   let isHasUnCharge = false
3341 3341
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3342
-                    if (this.all_table_data[i].order_status != 2) {
3342
+                    if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3343 3343
                       isHasUnCharge = true
3344 3344
                     } else {
3345 3345
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3351,7 +3351,7 @@
3351 3351
                     }
3352 3352
 
3353 3353
                   }
3354
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3354
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3355 3355
                     isHasUnCharge = true
3356 3356
 
3357 3357
                   }
@@ -3389,23 +3389,41 @@
3389 3389
             this.current_index = 0
3390 3390
             let ids = []
3391 3391
             let temp_order_id = 0
3392
-            for (let i = 0; i < this.patientTableData.length; i++) {
3393
-              // console.log(this.patientTableData[i])
3392
+            if (this.radio == 2) {
3393
+
3394
+              for (let i = 0; i < this.patientTableData.length; i++) {
3395
+                // console.log(this.patientTableData[i])
3396
+
3397
+                if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3398
+                  ids.push(this.patientTableData[i].order_id)
3399
+                  // this.$refs.tab.setCurrentRow(this.patientTableData[i])
3400
+                  // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3401
+                }
3394 3402
 
3395
-              if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3396
-                ids.push(this.patientTableData[i].order_id)
3397
-                // this.$refs.tab.setCurrentRow(this.patientTableData[i])
3398
-                // this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3399 3403
               }
3400 3404
 
3401
-            }
3405
+              temp_order_id = ids[ids.length - 1]
3406
+              for (let i = 0; i < this.patientTableData.length; i++) {
3407
+                if (temp_order_id == this.patientTableData[i].order_id) {
3408
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i])
3409
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3410
+                }
3411
+              }
3412
+            }else{
3413
+
3414
+              for (let i = 0; i < this.patientTableData.length; i++) {
3415
+                // console.log(this.patientTableData[i])
3416
+
3417
+                if (this.hisPatientInfo.id == this.patientTableData[i].his_patient_id) {
3418
+                  // ids.push(this.patientTableData[i].order_id)
3419
+                  this.$refs.tab.setCurrentRow(this.patientTableData[i])
3420
+                  this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3421
+                }
3402 3422
 
3403
-            temp_order_id = ids[ids.length - 1]
3404
-            for (let i = 0; i < this.patientTableData.length; i++) {
3405
-              if (temp_order_id == this.patientTableData[i].order_id) {
3406
-                this.$refs.tab.setCurrentRow(this.patientTableData[i])
3407
-                this.getPatientInformation(this.patientTableData[i].id, this.patientTableData[i].order.number, this.patientTableData[i].his_patient.id, this.patientTableData[i].order.id)
3408 3423
               }
3424
+
3425
+
3426
+
3409 3427
             }
3410 3428
           }
3411 3429
         })
@@ -3526,7 +3544,7 @@
3526 3544
             for (let i = 0; i < this.all_table_data.length; i++) {
3527 3545
               let isHasUnCharge = false
3528 3546
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3529
-                if (this.all_table_data[i].order_status != 2) {
3547
+                if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
3530 3548
                   isHasUnCharge = true
3531 3549
                 } else {
3532 3550
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3537,7 +3555,7 @@
3537 3555
 
3538 3556
                 }
3539 3557
               }
3540
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3558
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3541 3559
                 isHasUnCharge = true
3542 3560
 
3543 3561
               }
@@ -3573,7 +3591,7 @@
3573 3591
                 for (let i = 0; i < this.all_table_data.length; i++) {
3574 3592
                   let isHasUnCharge = false
3575 3593
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3576
-                    if (this.all_table_data[i].order_status != 2) {
3594
+                    if (this.all_table_data[i].order_status != 2 ||  this.all_table_data[i].order_status != 3) {
3577 3595
                       isHasUnCharge = true
3578 3596
                     } else {
3579 3597
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3585,7 +3603,7 @@
3585 3603
                     }
3586 3604
 
3587 3605
                   }
3588
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3606
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3589 3607
                     isHasUnCharge = true
3590 3608
 
3591 3609
                   }
@@ -3750,7 +3768,7 @@
3750 3768
             for (let i = 0; i < this.all_table_data.length; i++) {
3751 3769
               let isHasUnCharge = false
3752 3770
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3753
-                if (this.all_table_data[i].order_status != 2) {
3771
+                if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3754 3772
                   isHasUnCharge = true
3755 3773
                 } else {
3756 3774
                   if (this.all_table_data[i].his_patient_id > 0) {
@@ -3761,7 +3779,7 @@
3761 3779
 
3762 3780
                 }
3763 3781
               }
3764
-              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3782
+              if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
3765 3783
                 isHasUnCharge = true
3766 3784
 
3767 3785
               }
@@ -3797,7 +3815,7 @@
3797 3815
                 for (let i = 0; i < this.all_table_data.length; i++) {
3798 3816
                   let isHasUnCharge = false
3799 3817
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
3800
-                    if (this.all_table_data[i].order_status != 2) {
3818
+                    if (this.all_table_data[i].order_status != 2 || this.all_table_data[i].order_status != 3) {
3801 3819
                       isHasUnCharge = true
3802 3820
                     } else {
3803 3821
                       if (this.all_table_data[i].his_patient_id > 0) {
@@ -3809,7 +3827,7 @@
3809 3827
                     }
3810 3828
 
3811 3829
                   }
3812
-                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2) {
3830
+                  if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 &&  this.all_table_data[i].order_status != 3) {
3813 3831
                     isHasUnCharge = true
3814 3832
 
3815 3833
                   }
@@ -4265,19 +4283,17 @@
4265 4283
             if (this.info.id > 0) {
4266 4284
               this.form.p_type = response.data.data.info.register_type
4267 4285
               this.form.sick_type = response.data.data.info.sick_type
4268
-              if(response.data.data.info.diagnosis.length == 0){
4286
+              if (response.data.data.info.diagnosis.length == 0) {
4269 4287
 
4270 4288
                 this.form.diagnosis = []
4271 4289
 
4272
-              }else{
4290
+              } else {
4273 4291
 
4274
-                for(let i = 0; i < response.data.data.info.diagnosis.split(",").length; i++){
4275
-                  this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(",")[i]))
4292
+                for (let i = 0; i < response.data.data.info.diagnosis.split(",").length; i++) {
4293
+                  this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
4276 4294
 
4277 4295
                 }
4278 4296
 
4279
-
4280
-
4281 4297
               }
4282 4298
               this.sick_history = this.info.sick_history
4283 4299
               if (this.info.register_type == 0) {
@@ -4290,12 +4306,12 @@
4290 4306
             } else {
4291 4307
               this.form.p_type = 14
4292 4308
               this.form.sick_type = this.sick[0].id
4293
-              if(response.data.data.last_info.diagnoses.length == 0){
4294
-                this.form.diagnosis=[]
4309
+              if (response.data.data.last_info.diagnoses.length == 0) {
4310
+                this.form.diagnosis = []
4295 4311
 
4296
-              }else{
4297
-                for(let i = 0; i < response.data.data.last_info.diagnosis.split(",").length; i++){
4298
-                  this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(",")[i]))
4312
+              } else {
4313
+                for (let i = 0; i < response.data.data.last_info.diagnosis.split(",").length; i++) {
4314
+                  this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
4299 4315
                 }
4300 4316
               }
4301 4317
 
@@ -4506,7 +4522,7 @@
4506 4522
             }
4507 4523
 
4508 4524
             params['p_type'] = med_type
4509
-            params['diagnosis'] = this.form.diagnosis.join(",")
4525
+            params['diagnosis'] = this.form.diagnosis.join(',')
4510 4526
 
4511 4527
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
4512 4528
               params: params,
@@ -4537,11 +4553,11 @@
4537 4553
             this.currentOrder = order
4538 4554
             this.current_med_type = med_type
4539 4555
 
4540
-              var ids = []
4541
-            for(let i = 0;i < prescriptions.length; i++){
4542
-                ids.push(prescriptions[i].id)
4556
+            var ids = []
4557
+            for (let i = 0; i < prescriptions.length; i++) {
4558
+              ids.push(prescriptions[i].id)
4543 4559
             }
4544
-            var ids_str = ids.join(",")
4560
+            var ids_str = ids.join(',')
4545 4561
             this.temp_ids = ids_str
4546 4562
 
4547 4563
             if (this.activeName == 'first') {
@@ -4650,42 +4666,42 @@
4650 4666
               })
4651 4667
             break
4652 4668
           case 7:
4653
-              if (this.hisPatientInfo.balance_accounts_type != 2) {
4654
-            var that = this
4655
-            axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
4656
-              params: {
4657
-                order_id: this.order.id,
4658
-                record_time: this.record_date,
4659
-                admin_user_id: this.$store.getters.xt_user.user.id,
4660
-                patient_id: this.patientInfo.id
4669
+            if (this.hisPatientInfo.balance_accounts_type != 2) {
4670
+              var that = this
4671
+              axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
4672
+                params: {
4673
+                  order_id: this.order.id,
4674
+                  record_time: this.record_date,
4675
+                  admin_user_id: this.$store.getters.xt_user.user.id,
4676
+                  patient_id: this.patientInfo.id
4661 4677
 
4662
-              }
4663
-            })
4664
-              .then(function(response) {
4665
-                if (response.data.state == 0) {
4666
-                  that.$message.error(response.data.msg)
4667
-                  return false
4668
-                } else {
4669
-                  if (response.data.data.failed_code == -10) {
4678
+                }
4679
+              })
4680
+                .then(function(response) {
4681
+                  if (response.data.state == 0) {
4682
+                    that.$message.error(response.data.msg)
4683
+                    return false
4684
+                  } else {
4685
+                    if (response.data.data.failed_code == -10) {
4670 4686
 
4671
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
4672
-                      confirmButtonText: '确 定',
4673
-                      type: 'warning'
4674
-                    }).then(() => {
4687
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
4688
+                        confirmButtonText: '确 定',
4689
+                        type: 'warning'
4690
+                      }).then(() => {
4675 4691
 
4676
-                    }).catch(() => {
4677
-                    })
4692
+                      }).catch(() => {
4693
+                      })
4678 4694
 
4679
-                  } else {
4680
-                    that.$message({ message: '明细撤销成功', type: 'success' })
4681
-                    that.changeRadioAndPatient(1)
4695
+                    } else {
4696
+                      that.$message({ message: '明细撤销成功', type: 'success' })
4697
+                      that.changeRadioAndPatient(1)
4698
+                    }
4682 4699
                   }
4683
-                }
4684
-              })
4685
-              .catch(function(error) {
4686
-              })
4687
-              }else{
4688
-              let  params = {
4700
+                })
4701
+                .catch(function(error) {
4702
+                })
4703
+            } else {
4704
+              let params = {
4689 4705
                 order_id: this.order.id,
4690 4706
                 record_time: this.record_date,
4691 4707
                 admin_user_id: this.$store.getters.xt_user.user.id,
@@ -4693,25 +4709,25 @@
4693 4709
               }
4694 4710
 
4695 4711
               refunddetail(params).then(response => {
4696
-                  if (response.data.state == 0) {
4697
-                    this.$message.error(response.data.msg)
4698
-                    this.loadingtwo = false
4699
-                    return false
4700
-                  } else {
4701
-                    this.changeRadioAndPatient(1)
4702
-                    this.$message({ message: '撤销明细成功', type: 'success' })
4703
-                  }
4704
-                })
4712
+                if (response.data.state == 0) {
4713
+                  this.$message.error(response.data.msg)
4714
+                  this.loadingtwo = false
4715
+                  return false
4716
+                } else {
4717
+                  this.changeRadioAndPatient(1)
4718
+                  this.$message({ message: '撤销明细成功', type: 'success' })
4719
+                }
4720
+              })
4705 4721
 
4706
-              }
4722
+            }
4707 4723
 
4708 4724
             break
4709 4725
           case 8:
4710 4726
             var ids = []
4711
-            for(let i = 0;i < prescriptions.length; i++){
4712
-                ids.push(prescriptions[i].id)
4727
+            for (let i = 0; i < prescriptions.length; i++) {
4728
+              ids.push(prescriptions[i].id)
4713 4729
             }
4714
-            var ids_str = ids.join(",")
4730
+            var ids_str = ids.join(',')
4715 4731
 
4716 4732
             if (this.hisPatientInfo.balance_accounts_type == 2) {
4717 4733
 
@@ -4728,7 +4744,7 @@
4728 4744
                 form['org_id'] = this.$store.getters.xt_user.org_id
4729 4745
                 form['ids'] = ids_str
4730 4746
                 form['p_type'] = med_type
4731
-                form['diagnosis'] = this.form.diagnosis.join(",")
4747
+                form['diagnosis'] = this.form.diagnosis.join(',')
4732 4748
                 form['sick_type'] = this.form.sick_type
4733 4749
 
4734 4750
                 if (this.activeName == 'first') {
@@ -4754,7 +4770,6 @@
4754 4770
 
4755 4771
             } else {
4756 4772
 
4757
-
4758 4773
               var that = this
4759 4774
               let form = {}
4760 4775
               form['id'] = this.patientInfo.id
@@ -4764,7 +4779,7 @@
4764 4779
               form['org_id'] = this.$store.getters.xt_user.org_id
4765 4780
 
4766 4781
               form['p_type'] = med_type
4767
-              form['diagnosis'] = this.form.diagnosis.join(",")
4782
+              form['diagnosis'] = this.form.diagnosis.join(',')
4768 4783
               form['sick_type'] = this.form.sick_type
4769 4784
 
4770 4785
               if (this.activeName == 'first') {

+ 122 - 103
src/xt_pages/outpatientCharges/summary.vue View File

@@ -85,7 +85,9 @@
85 85
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
86 86
                 </el-table-column>
87 87
                 <el-table-column align="center" width="90" prop="name" label="医疗类型">
88
-                    <template slot-scope="scope"><div>{{getMedType(scope.row.med_type)}}</div></template>
88
+                    <template slot-scope="scope">
89
+                        <div>{{getMedType(scope.row.med_type)}}</div>
90
+                    </template>
89 91
                 </el-table-column>
90 92
                 <el-table-column align="center" width="100" prop="name" label="收费日期">
91 93
                     <template slot-scope="scope">
@@ -382,15 +384,7 @@
382 384
         }
383 385
 
384 386
       }, toRefund(row) {
385
-
386
-        console.log("~~~~~")
387
-        console.log(row)
388
-        console.log(this.$store.getters.xt_user.org_id )
389
-
390
-
391
-
392
-        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
393
-          var that = this
387
+        if (row.his_patient.balance_accounts_type == 2) {
394 388
           this.$confirm('是否退费', '退费', {
395 389
             confirmButtonText: '确 定',
396 390
             cancelButtonText: '取 消',
@@ -398,110 +392,136 @@
398 392
           }).then(() => {
399 393
             let params = {
400 394
               'order_id': row.id,
401
-              'patient_id': row.patient_id,
402
-              'record_time': that.getTimes(row.settle_accounts_date),
403
-              'admin_user_id': that.$store.getters.xt_user.user.id
395
+              'patient_id':  row.patient_id,
396
+              'record_time':this.getTimes(row.settle_accounts_date),
404 397
             }
405
-            axios.get('http://127.0.0.1:9532/api/refund/post', {
406
-              params: params
398
+            Refund(params).then(response => {
399
+              if (response.data.state == 0) {
400
+                this.$message.error(response.data.msg)
401
+                return false
402
+              } else {
403
+                this.$message({ message: '退费成功', type: 'success' })
404
+                this.getHisOrderList()
405
+              }
407 406
             })
408
-              .then(function(response) {
409
-                if (response.data.state == 0) {
410
-                  that.$message.error(response.data.msg)
411
-                  return false
412
-                } else {
413
-                  if (response.data.data.failed_code == -10) {
414
-                    // that.$message.error(response.data.data.msg)
415
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
416
-                      confirmButtonText: '确 定',
417
-                      type: 'warning'
418
-                    }).then(() => {
419
-
420
-                    }).catch(() => {
421
-                    })
422
-                  } else {
423
-                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
424
-                    that.getHisOrderList()
425
-
426
-                  }
427
-                }
428
-              })
429
-              .catch(function(error) {
430
-              })
431 407
           }).catch(() => {
432 408
           })
433 409
 
434
-        } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
410
+        } else {
411
+
412
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
435 413
             var that = this
436
-          this.$confirm('是否退费', '退费', {
437
-            confirmButtonText: '确 定',
438
-            cancelButtonText: '取 消',
439
-            type: 'warning'
440
-          }).then(() => {
441
-            let params = {
442
-              'order_id': row.id,
443
-              'patient_id': row.patient_id,
444
-              'record_time': this.getTimes(row.settle_accounts_date),
445
-              'admin_user_id': this.$store.getters.xt_user.user.id
446
-            }
447
-            axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
448
-              params: params
449
-            })
450
-              .then(function(response) {
451
-                if (response.data.state == 0) {
452
-                  that.$message.error(response.data.msg)
453
-                  return false
454
-                } else {
455
-                  if (response.data.data.failed_code == -10) {
456
-                    that.$confirm(response.data.data.msg, '医保错误信息', {
457
-                      confirmButtonText: '确 定',
458
-                      type: 'warning'
459
-                    }).then(() => {
414
+            this.$confirm('是否退费', '退费', {
415
+              confirmButtonText: '确 定',
416
+              cancelButtonText: '取 消',
417
+              type: 'warning'
418
+            }).then(() => {
419
+              let params = {
420
+                'order_id': row.id,
421
+                'patient_id': row.patient_id,
422
+                'record_time': that.getTimes(row.settle_accounts_date),
423
+                'admin_user_id': that.$store.getters.xt_user.user.id
424
+              }
425
+              axios.get('http://127.0.0.1:9532/api/refund/post', {
426
+                params: params
427
+              })
428
+                .then(function(response) {
429
+                  if (response.data.state == 0) {
430
+                    that.$message.error(response.data.msg)
431
+                    return false
432
+                  } else {
433
+                    if (response.data.data.failed_code == -10) {
434
+                      // that.$message.error(response.data.data.msg)
435
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
436
+                        confirmButtonText: '确 定',
437
+                        type: 'warning'
438
+                      }).then(() => {
439
+
440
+                      }).catch(() => {
441
+                      })
442
+                    } else {
443
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
444
+                      that.getHisOrderList()
460 445
 
461
-                    }).catch(() => {
462
-                    })
446
+                    }
447
+                  }
448
+                })
449
+                .catch(function(error) {
450
+                })
451
+            }).catch(() => {
452
+            })
463 453
 
454
+          } else if (this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138) {
455
+            var that = this
456
+            this.$confirm('是否退费', '退费', {
457
+              confirmButtonText: '确 定',
458
+              cancelButtonText: '取 消',
459
+              type: 'warning'
460
+            }).then(() => {
461
+              let params = {
462
+                'order_id': row.id,
463
+                'patient_id': row.patient_id,
464
+                'record_time': this.getTimes(row.settle_accounts_date),
465
+                'admin_user_id': this.$store.getters.xt_user.user.id
466
+              }
467
+              axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
468
+                params: params
469
+              })
470
+                .then(function(response) {
471
+                  if (response.data.state == 0) {
472
+                    that.$message.error(response.data.msg)
473
+                    return false
464 474
                   } else {
465
-                    that.$message({ message: '退费成功', type: 'success', duration: 5000 })
466
-                    that.getHisOrderList()
475
+                    if (response.data.data.failed_code == -10) {
476
+                      that.$confirm(response.data.data.msg, '医保错误信息', {
477
+                        confirmButtonText: '确 定',
478
+                        type: 'warning'
479
+                      }).then(() => {
480
+
481
+                      }).catch(() => {
482
+                      })
483
+
484
+                    } else {
485
+                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
486
+                      that.getHisOrderList()
487
+                    }
467 488
                   }
468
-                }
469
-              })
470
-              .catch(function(error) {
471
-              })
489
+                })
490
+                .catch(function(error) {
491
+                })
472 492
 
473
-          }).catch(() => {
474
-          })
493
+            }).catch(() => {
494
+            })
475 495
 
476
-        } else {
477
-          this.$confirm('是否退费', '退费', {
478
-            confirmButtonText: '确 定',
479
-            cancelButtonText: '取 消',
480
-            type: 'warning'
481
-          }).then(() => {
482
-            let params = {
483
-              'order_id': this.order.id,
484
-              'patient_id': this.patientInfo.id,
485
-              'record_time': this.record_date
496
+          } else {
497
+            this.$confirm('是否退费', '退费', {
498
+              confirmButtonText: '确 定',
499
+              cancelButtonText: '取 消',
500
+              type: 'warning'
501
+            }).then(() => {
502
+              let params = {
503
+                'order_id': row.id,
504
+                'patient_id':  row.patient_id,
505
+                'record_time':this.getTimes(row.settle_accounts_date),
486 506
 
487
-            }
488
-            Refund(params).then(response => {
489
-              if (response.data.state == 0) {
490
-                this.$message.error(response.data.msg)
491
-                return false
492
-              } else {
493
-                this.$message({ message: '退费成功', type: 'success' })
494
-                this.getHisOrderList()
495 507
               }
508
+              Refund(params).then(response => {
509
+                if (response.data.state == 0) {
510
+                  this.$message.error(response.data.msg)
511
+                  return false
512
+                } else {
513
+                  this.$message({ message: '退费成功', type: 'success' })
514
+                  this.getHisOrderList()
515
+                }
516
+              })
517
+            }).catch(() => {
496 518
             })
497
-          }).catch(() => {
498
-          })
519
+          }
499 520
         }
500
-      },
501
-      toPrint(row) {
521
+      }, toPrint(row) {
502 522
         if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
503
-         if(row.mdtrt_id.indexOf("H") > -1){
504
-          this.statementVisible9504 = true
523
+          if (row.mdtrt_id.indexOf('H') > -1) {
524
+            this.statementVisible9504 = true
505 525
             let obj = {
506 526
               order_id: row.id,
507 527
               patient_id: row.patient_id,
@@ -509,20 +529,19 @@
509 529
               admin_user_id: this.$store.getters.xt_user.user.id
510 530
             }
511 531
             this.orderObj9504 = obj
512
-         }else{
513
-           
514
-           this.statementVisible9504 = true
532
+          } else {
533
+
534
+            this.statementVisible9504 = true
515 535
             let obj = {
516 536
               order_id: row.id,
517 537
               patient_id: row.patient_id,
518 538
               record_time: this.getTimes(row.settle_accounts_date),
519 539
               admin_user_id: this.$store.getters.xt_user.user.id,
520
-              balance_accounts_type:2
540
+              balance_accounts_type: 2
521 541
             }
522 542
             this.orderObj9504 = obj
523
-         }
543
+          }
524 544
 
525
-         
526 545
         } else {
527 546
           this.statementVisible = true
528 547
           let obj = {