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
         if(this.$store.getters.xt_user.org_id == 10138){
85
         if(this.$store.getters.xt_user.org_id == 10138){
86
           setTimeout(() => {
86
           setTimeout(() => {
87
             const style =
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
             const style2 =
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
             const style3 =
91
             const style3 =
92
             '@media print {#prescription-print{font-size:14px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 55%;}}}';
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
             const style4 =
93
             const style4 =

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

100
                   <tr>
100
                   <tr>
101
                       <td width="70">类别</td>
101
                       <td width="70">类别</td>
102
                       <td>项目</td>
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
                       <td width="60">单价</td>
106
                       <td width="60">单价</td>
107
                       <td width="70">总额</td>
107
                       <td width="70">总额</td>
108
                       <td width="130">小计</td>
108
                       <td width="130">小计</td>

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

638
                 title="提示"
638
                 title="提示"
639
                 :visible.sync="dialogVisible"
639
                 :visible.sync="dialogVisible"
640
                 width="30%"
640
                 width="30%"
641
-                >
641
+        >
642
             <span>是否修改医疗类型</span>
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
                 <el-option
647
                 <el-option
646
                         v-for="(item,index) in medical_care"
648
                         v-for="(item,index) in medical_care"
647
                         :key="index"
649
                         :key="index"
649
                         :value="item.value">
651
                         :value="item.value">
650
                 </el-option>
652
                 </el-option>
651
             </el-select>
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
                 <el-option
655
                 <el-option
654
                         v-for="(item,index) in register"
656
                         v-for="(item,index) in register"
655
                         :key="index"
657
                         :key="index"
713
   import additionalCharges from './components/additionalCharges'
715
   import additionalCharges from './components/additionalCharges'
714
   import { getPatientInformation, getPatientList } from '@/api/project/project'
716
   import { getPatientInformation, getPatientList } from '@/api/project/project'
715
   import {
717
   import {
718
+    changeMedType,
716
     getChargeHisPatientInfo,
719
     getChargeHisPatientInfo,
717
     getChargeHisPatientList,
720
     getChargeHisPatientList,
718
     getDayOrMonthHisPrescription,
721
     getDayOrMonthHisPrescription,
720
     getSchedulePatientList,
723
     getSchedulePatientList,
721
     preSettle,
724
     preSettle,
722
     Refund,
725
     Refund,
726
+    refunddetail,
723
     refundNumber,
727
     refundNumber,
724
     register,
728
     register,
725
-    upload,
726
-    changeMedType,
727
-    refunddetail
729
+    upload
728
   } from '@/api/his/his'
730
   } from '@/api/his/his'
729
   import RegisterDialog from './components/registerDialog'
731
   import RegisterDialog from './components/registerDialog'
730
   import treatPrint from './treatPrint'
732
   import treatPrint from './treatPrint'
756
     },
758
     },
757
     data() {
759
     data() {
758
       return {
760
       return {
759
-        temp_med_type:"",
760
-        dialogVisible:false,
761
+        temp_med_type: '',
762
+        dialogVisible: false,
761
         form: {
763
         form: {
762
           p_type: '',
764
           p_type: '',
763
           sick_type: '',
765
           sick_type: '',
780
           { value: 18, label: '预防接种' },
782
           { value: 18, label: '预防接种' },
781
           { value: 19, label: '门诊输血' },
783
           { value: 19, label: '门诊输血' },
782
           { value: 91, label: '新冠肺炎门诊' },
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
         medical_care_two: [
789
         medical_care_two: [
795
           { value: '18', label: '预防接种' },
797
           { value: '18', label: '预防接种' },
796
           { value: '19', label: '门诊输血' },
798
           { value: '19', label: '门诊输血' },
797
           { value: '91', label: '新冠肺炎门诊' },
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
         register: [
804
         register: [
897
         department: [],
899
         department: [],
898
         all_patient: [],
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
       this.getPatientList()
924
       this.getPatientList()
923
     },
925
     },
924
     methods: {
926
     methods: {
925
-      openDialog(item){
927
+      openDialog(item) {
926
         this.dialogVisible = true
928
         this.dialogVisible = true
927
         this.temp_prescriptions = item
929
         this.temp_prescriptions = item
928
       },
930
       },
929
-      comfirmChangeMedType(){
931
+      comfirmChangeMedType() {
930
         let params = {
932
         let params = {
931
           id: this.temp_prescriptions.id,
933
           id: this.temp_prescriptions.id,
932
           med_type: this.temp_med_type.toString()
934
           med_type: this.temp_med_type.toString()
936
             this.changeRadioAndPatient(1)
938
             this.changeRadioAndPatient(1)
937
             this.dialogVisible = false
939
             this.dialogVisible = false
938
 
940
 
939
-
940
           } else {
941
           } else {
941
             this.$message.error(response.data.msg)
942
             this.$message.error(response.data.msg)
942
           }
943
           }
943
         })
944
         })
944
 
945
 
945
-
946
       },
946
       },
947
       changevalue(val) {
947
       changevalue(val) {
948
         this.$forceUpdate()
948
         this.$forceUpdate()
1032
         form['org_id'] = this.$store.getters.xt_user.org_id
1032
         form['org_id'] = this.$store.getters.xt_user.org_id
1033
 
1033
 
1034
         form['p_type'] = this.current_med_type
1034
         form['p_type'] = this.current_med_type
1035
-        form['diagnosis'] = this.form.diagnosis.join(",")
1035
+        form['diagnosis'] = this.form.diagnosis.join(',')
1036
         form['sick_type'] = this.form.sick_type
1036
         form['sick_type'] = this.form.sick_type
1037
         form['ids'] = this.temp_ids
1037
         form['ids'] = this.temp_ids
1038
         if (this.activeName == 'first') {
1038
         if (this.activeName == 'first') {
1898
             for (let i = 0; i < this.all_table_data.length; i++) {
1898
             for (let i = 0; i < this.all_table_data.length; i++) {
1899
               let isHasUnCharge = false
1899
               let isHasUnCharge = false
1900
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                   isHasUnCharge = true
1902
                   isHasUnCharge = true
1903
                 } else {
1903
                 } else {
1904
                   if (this.all_table_data[i].his_patient_id > 0) {
1904
                   if (this.all_table_data[i].his_patient_id > 0) {
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
                 isHasUnCharge = true
1913
                 isHasUnCharge = true
1914
 
1914
 
1915
               }
1915
               }
1945
                 for (let i = 0; i < this.all_table_data.length; i++) {
1945
                 for (let i = 0; i < this.all_table_data.length; i++) {
1946
                   let isHasUnCharge = false
1946
                   let isHasUnCharge = false
1947
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                       isHasUnCharge = true
1949
                       isHasUnCharge = true
1950
                     } else {
1950
                     } else {
1951
                       if (this.all_table_data[i].his_patient_id > 0) {
1951
                       if (this.all_table_data[i].his_patient_id > 0) {
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
                     isHasUnCharge = true
1961
                     isHasUnCharge = true
1962
 
1962
 
1963
                   }
1963
                   }
2118
             for (let i = 0; i < this.all_table_data.length; i++) {
2118
             for (let i = 0; i < this.all_table_data.length; i++) {
2119
               let isHasUnCharge = false
2119
               let isHasUnCharge = false
2120
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                   isHasUnCharge = true
2122
                   isHasUnCharge = true
2123
                 } else {
2123
                 } else {
2124
                   if (this.all_table_data[i].his_patient_id > 0) {
2124
                   if (this.all_table_data[i].his_patient_id > 0) {
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
                 isHasUnCharge = true
2133
                 isHasUnCharge = true
2134
 
2134
 
2135
               }
2135
               }
2719
 
2719
 
2720
         } else if (index == 8) {
2720
         } else if (index == 8) {
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) {
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
               that.$message.error('诊断不能为空,请选择诊断内容')
2723
               that.$message.error('诊断不能为空,请选择诊断内容')
2724
               return
2724
               return
2725
             }
2725
             }
2738
           form['record_time'] = this.record_date
2738
           form['record_time'] = this.record_date
2739
 
2739
 
2740
           form['p_type'] = med_type
2740
           form['p_type'] = med_type
2741
-          form['diagnosis'] = this.form.diagnosis.join(",")
2741
+          form['diagnosis'] = this.form.diagnosis.join(',')
2742
           form['sick_type'] = this.form.sick_type
2742
           form['sick_type'] = this.form.sick_type
2743
 
2743
 
2744
           form['admin_user_id'] = this.$store.getters.xt_user.user.id
2744
           form['admin_user_id'] = this.$store.getters.xt_user.user.id
3292
             for (let i = 0; i < this.all_table_data.length; i++) {
3292
             for (let i = 0; i < this.all_table_data.length; i++) {
3293
               let isHasUnCharge = false
3293
               let isHasUnCharge = false
3294
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                   isHasUnCharge = true
3296
                   isHasUnCharge = true
3297
                 } else {
3297
                 } else {
3298
                   if (this.all_table_data[i].his_patient_id > 0) {
3298
                   if (this.all_table_data[i].his_patient_id > 0) {
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
                 isHasUnCharge = true
3307
                 isHasUnCharge = true
3308
 
3308
 
3309
               }
3309
               }
3339
                 for (let i = 0; i < this.all_table_data.length; i++) {
3339
                 for (let i = 0; i < this.all_table_data.length; i++) {
3340
                   let isHasUnCharge = false
3340
                   let isHasUnCharge = false
3341
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                       isHasUnCharge = true
3343
                       isHasUnCharge = true
3344
                     } else {
3344
                     } else {
3345
                       if (this.all_table_data[i].his_patient_id > 0) {
3345
                       if (this.all_table_data[i].his_patient_id > 0) {
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
                     isHasUnCharge = true
3355
                     isHasUnCharge = true
3356
 
3356
 
3357
                   }
3357
                   }
3389
             this.current_index = 0
3389
             this.current_index = 0
3390
             let ids = []
3390
             let ids = []
3391
             let temp_order_id = 0
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
             for (let i = 0; i < this.all_table_data.length; i++) {
3544
             for (let i = 0; i < this.all_table_data.length; i++) {
3527
               let isHasUnCharge = false
3545
               let isHasUnCharge = false
3528
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                   isHasUnCharge = true
3548
                   isHasUnCharge = true
3531
                 } else {
3549
                 } else {
3532
                   if (this.all_table_data[i].his_patient_id > 0) {
3550
                   if (this.all_table_data[i].his_patient_id > 0) {
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
                 isHasUnCharge = true
3559
                 isHasUnCharge = true
3542
 
3560
 
3543
               }
3561
               }
3573
                 for (let i = 0; i < this.all_table_data.length; i++) {
3591
                 for (let i = 0; i < this.all_table_data.length; i++) {
3574
                   let isHasUnCharge = false
3592
                   let isHasUnCharge = false
3575
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                       isHasUnCharge = true
3595
                       isHasUnCharge = true
3578
                     } else {
3596
                     } else {
3579
                       if (this.all_table_data[i].his_patient_id > 0) {
3597
                       if (this.all_table_data[i].his_patient_id > 0) {
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
                     isHasUnCharge = true
3607
                     isHasUnCharge = true
3590
 
3608
 
3591
                   }
3609
                   }
3750
             for (let i = 0; i < this.all_table_data.length; i++) {
3768
             for (let i = 0; i < this.all_table_data.length; i++) {
3751
               let isHasUnCharge = false
3769
               let isHasUnCharge = false
3752
               for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                   isHasUnCharge = true
3772
                   isHasUnCharge = true
3755
                 } else {
3773
                 } else {
3756
                   if (this.all_table_data[i].his_patient_id > 0) {
3774
                   if (this.all_table_data[i].his_patient_id > 0) {
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
                 isHasUnCharge = true
3783
                 isHasUnCharge = true
3766
 
3784
 
3767
               }
3785
               }
3797
                 for (let i = 0; i < this.all_table_data.length; i++) {
3815
                 for (let i = 0; i < this.all_table_data.length; i++) {
3798
                   let isHasUnCharge = false
3816
                   let isHasUnCharge = false
3799
                   for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
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
                       isHasUnCharge = true
3819
                       isHasUnCharge = true
3802
                     } else {
3820
                     } else {
3803
                       if (this.all_table_data[i].his_patient_id > 0) {
3821
                       if (this.all_table_data[i].his_patient_id > 0) {
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
                     isHasUnCharge = true
3831
                     isHasUnCharge = true
3814
 
3832
 
3815
                   }
3833
                   }
4265
             if (this.info.id > 0) {
4283
             if (this.info.id > 0) {
4266
               this.form.p_type = response.data.data.info.register_type
4284
               this.form.p_type = response.data.data.info.register_type
4267
               this.form.sick_type = response.data.data.info.sick_type
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
                 this.form.diagnosis = []
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
               this.sick_history = this.info.sick_history
4298
               this.sick_history = this.info.sick_history
4283
               if (this.info.register_type == 0) {
4299
               if (this.info.register_type == 0) {
4290
             } else {
4306
             } else {
4291
               this.form.p_type = 14
4307
               this.form.p_type = 14
4292
               this.form.sick_type = this.sick[0].id
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
             }
4522
             }
4507
 
4523
 
4508
             params['p_type'] = med_type
4524
             params['p_type'] = med_type
4509
-            params['diagnosis'] = this.form.diagnosis.join(",")
4525
+            params['diagnosis'] = this.form.diagnosis.join(',')
4510
 
4526
 
4511
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
4527
             axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
4512
               params: params,
4528
               params: params,
4537
             this.currentOrder = order
4553
             this.currentOrder = order
4538
             this.current_med_type = med_type
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
             this.temp_ids = ids_str
4561
             this.temp_ids = ids_str
4546
 
4562
 
4547
             if (this.activeName == 'first') {
4563
             if (this.activeName == 'first') {
4650
               })
4666
               })
4651
             break
4667
             break
4652
           case 7:
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
                 order_id: this.order.id,
4705
                 order_id: this.order.id,
4690
                 record_time: this.record_date,
4706
                 record_time: this.record_date,
4691
                 admin_user_id: this.$store.getters.xt_user.user.id,
4707
                 admin_user_id: this.$store.getters.xt_user.user.id,
4693
               }
4709
               }
4694
 
4710
 
4695
               refunddetail(params).then(response => {
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
             break
4724
             break
4709
           case 8:
4725
           case 8:
4710
             var ids = []
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
             if (this.hisPatientInfo.balance_accounts_type == 2) {
4732
             if (this.hisPatientInfo.balance_accounts_type == 2) {
4717
 
4733
 
4728
                 form['org_id'] = this.$store.getters.xt_user.org_id
4744
                 form['org_id'] = this.$store.getters.xt_user.org_id
4729
                 form['ids'] = ids_str
4745
                 form['ids'] = ids_str
4730
                 form['p_type'] = med_type
4746
                 form['p_type'] = med_type
4731
-                form['diagnosis'] = this.form.diagnosis.join(",")
4747
+                form['diagnosis'] = this.form.diagnosis.join(',')
4732
                 form['sick_type'] = this.form.sick_type
4748
                 form['sick_type'] = this.form.sick_type
4733
 
4749
 
4734
                 if (this.activeName == 'first') {
4750
                 if (this.activeName == 'first') {
4754
 
4770
 
4755
             } else {
4771
             } else {
4756
 
4772
 
4757
-
4758
               var that = this
4773
               var that = this
4759
               let form = {}
4774
               let form = {}
4760
               form['id'] = this.patientInfo.id
4775
               form['id'] = this.patientInfo.id
4764
               form['org_id'] = this.$store.getters.xt_user.org_id
4779
               form['org_id'] = this.$store.getters.xt_user.org_id
4765
 
4780
 
4766
               form['p_type'] = med_type
4781
               form['p_type'] = med_type
4767
-              form['diagnosis'] = this.form.diagnosis.join(",")
4782
+              form['diagnosis'] = this.form.diagnosis.join(',')
4768
               form['sick_type'] = this.form.sick_type
4783
               form['sick_type'] = this.form.sick_type
4769
 
4784
 
4770
               if (this.activeName == 'first') {
4785
               if (this.activeName == 'first') {

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

85
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
85
                     <template slot-scope="scope">{{scope.row.department_name}}</template>
86
                 </el-table-column>
86
                 </el-table-column>
87
                 <el-table-column align="center" width="90" prop="name" label="医疗类型">
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
                 </el-table-column>
91
                 </el-table-column>
90
                 <el-table-column align="center" width="100" prop="name" label="收费日期">
92
                 <el-table-column align="center" width="100" prop="name" label="收费日期">
91
                     <template slot-scope="scope">
93
                     <template slot-scope="scope">
382
         }
384
         }
383
 
385
 
384
       }, toRefund(row) {
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
           this.$confirm('是否退费', '退费', {
388
           this.$confirm('是否退费', '退费', {
395
             confirmButtonText: '确 定',
389
             confirmButtonText: '确 定',
396
             cancelButtonText: '取 消',
390
             cancelButtonText: '取 消',
398
           }).then(() => {
392
           }).then(() => {
399
             let params = {
393
             let params = {
400
               'order_id': row.id,
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
           }).catch(() => {
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
             var that = this
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
                   } else {
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
         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) {
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
             let obj = {
525
             let obj = {
506
               order_id: row.id,
526
               order_id: row.id,
507
               patient_id: row.patient_id,
527
               patient_id: row.patient_id,
509
               admin_user_id: this.$store.getters.xt_user.user.id
529
               admin_user_id: this.$store.getters.xt_user.user.id
510
             }
530
             }
511
             this.orderObj9504 = obj
531
             this.orderObj9504 = obj
512
-         }else{
513
-           
514
-           this.statementVisible9504 = true
532
+          } else {
533
+
534
+            this.statementVisible9504 = true
515
             let obj = {
535
             let obj = {
516
               order_id: row.id,
536
               order_id: row.id,
517
               patient_id: row.patient_id,
537
               patient_id: row.patient_id,
518
               record_time: this.getTimes(row.settle_accounts_date),
538
               record_time: this.getTimes(row.settle_accounts_date),
519
               admin_user_id: this.$store.getters.xt_user.user.id,
539
               admin_user_id: this.$store.getters.xt_user.user.id,
520
-              balance_accounts_type:2
540
+              balance_accounts_type: 2
521
             }
541
             }
522
             this.orderObj9504 = obj
542
             this.orderObj9504 = obj
523
-         }
543
+          }
524
 
544
 
525
-         
526
         } else {
545
         } else {
527
           this.statementVisible = true
546
           this.statementVisible = true
528
           let obj = {
547
           let obj = {