see999 3 years ago
parent
commit
43e53a0484

+ 10 - 0
src/api/his/his.js View File

508
 }
508
 }
509
 
509
 
510
 
510
 
511
+export function refunddetail(params) {
512
+  return request({
513
+    url: "/api/refunddetail/post",
514
+    method: "post",
515
+    params:params,
516
+  });
517
+}
518
+
519
+
520
+
511
 
521
 
512
 
522
 
513
 
523
 

+ 46 - 6
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

214
                                                     <div style="margin-bottom:10px;float: right">
214
                                                     <div style="margin-bottom:10px;float: right">
215
 
215
 
216
 
216
 
217
-                                                        <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
217
+                                                        <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138 || org_id == 0">
218
 
218
 
219
 
219
 
220
                                                             <el-button
220
                                                             <el-button
221
                                                                     v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0) || (hisPatientInfo.id > 0 &&  items.prescriptions[0].order.order_status == 3)"
221
                                                                     v-if="(hisPatientInfo.id > 0 &&  items.prescriptions[0].order.id == 0) || (hisPatientInfo.id > 0 &&  items.prescriptions[0].order.order_status == 3)"
222
 
222
 
223
                                                                     size="small"
223
                                                                     size="small"
224
-                                                                    @click="sz_open(8,items.med_type,items.prescriptions[0].order)"
224
+                                                                    @click="sz_open(8,items.med_type,items.prescriptions[0].order,items.prescriptions)"
225
                                                                     type="primary"
225
                                                                     type="primary"
226
                                                             >预结算
226
                                                             >预结算
227
                                                             </el-button>
227
                                                             </el-button>
458
 
458
 
459
                                                     </el-tab-pane>
459
                                                     </el-tab-pane>
460
                                                     <div style="margin-bottom:10px;float: right">
460
                                                     <div style="margin-bottom:10px;float: right">
461
-                                                        <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138">
461
+                                                        <div v-if="org_id == 9504 || org_id == 10028 || org_id == 10138 || org_id == 0">
462
 
462
 
463
                                                             <el-button
463
                                                             <el-button
464
                                                                     v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || (hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.order_status == 3)"
464
                                                                     v-if="(hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.id == 0) || (hisPatientInfo.id > 0 && items.curMonthPrescriptions.order.order_status == 3)"
723
     refundNumber,
723
     refundNumber,
724
     register,
724
     register,
725
     upload,
725
     upload,
726
-    changeMedType
726
+    changeMedType,
727
+    refunddetail
727
   } from '@/api/his/his'
728
   } from '@/api/his/his'
728
   import RegisterDialog from './components/registerDialog'
729
   import RegisterDialog from './components/registerDialog'
729
   import treatPrint from './treatPrint'
730
   import treatPrint from './treatPrint'
898
 
899
 
899
         temp_prescriptions:null,
900
         temp_prescriptions:null,
900
 
901
 
902
+        temp_ids:"",
903
+
901
       }
904
       }
902
     },
905
     },
903
     created() {
906
     created() {
1031
         form['p_type'] = this.current_med_type
1034
         form['p_type'] = this.current_med_type
1032
         form['diagnosis'] = this.form.diagnosis.join(",")
1035
         form['diagnosis'] = this.form.diagnosis.join(",")
1033
         form['sick_type'] = this.form.sick_type
1036
         form['sick_type'] = this.form.sick_type
1034
-
1037
+        form['ids'] = this.temp_ids
1035
         if (this.activeName == 'first') {
1038
         if (this.activeName == 'first') {
1036
           form['settle_accounts_type'] = 1
1039
           form['settle_accounts_type'] = 1
1037
 
1040
 
1066
 
1069
 
1067
           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 || this.$store.getters.xt_user.org_id == 0) {
1070
           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 || this.$store.getters.xt_user.org_id == 0) {
1068
             var that = this
1071
             var that = this
1072
+            
1069
             axios.get('http://127.0.0.1:9532/sz/api/settle/get', {
1073
             axios.get('http://127.0.0.1:9532/sz/api/settle/get', {
1070
               params: form
1074
               params: form
1071
             })
1075
             })
4519
             this.currentOrder = order
4523
             this.currentOrder = order
4520
             this.current_med_type = med_type
4524
             this.current_med_type = med_type
4521
 
4525
 
4526
+              var ids = []
4527
+            for(let i = 0;i < prescriptions.length; i++){
4528
+                ids.push(prescriptions[i].id)
4529
+            }
4530
+            var ids_str = ids.join(",")
4531
+            this.temp_ids = ids_str
4532
+
4522
             if (this.activeName == 'first') {
4533
             if (this.activeName == 'first') {
4523
 
4534
 
4524
               this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder)
4535
               this.$refs.charge.show(this.getTotalFour(prescriptions), this.currentOrder)
4625
               })
4636
               })
4626
             break
4637
             break
4627
           case 7:
4638
           case 7:
4639
+              if (this.hisPatientInfo.balance_accounts_type != 2) {
4628
             var that = this
4640
             var that = this
4629
             axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
4641
             axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
4630
               params: {
4642
               params: {
4658
               })
4670
               })
4659
               .catch(function(error) {
4671
               .catch(function(error) {
4660
               })
4672
               })
4673
+              }else{
4674
+              let  params = {
4675
+                order_id: this.order.id,
4676
+                record_time: this.record_date,
4677
+                admin_user_id: this.$store.getters.xt_user.user.id,
4678
+                patient_id: this.patientInfo.id
4679
+              }
4680
+
4681
+              refunddetail(params).then(response => {
4682
+                  if (response.data.state == 0) {
4683
+                    this.$message.error(response.data.msg)
4684
+                    this.loadingtwo = false
4685
+                    return false
4686
+                  } else {
4687
+                    this.changeRadioAndPatient(1)
4688
+                    this.$message({ message: '撤销明细成功', type: 'success' })
4689
+                  }
4690
+                })
4691
+
4692
+              }
4661
 
4693
 
4662
             break
4694
             break
4663
           case 8:
4695
           case 8:
4696
+            var ids = []
4697
+            for(let i = 0;i < prescriptions.length; i++){
4698
+                ids.push(prescriptions[i].id)
4699
+            }
4700
+            var ids_str = ids.join(",")
4701
+
4664
             if (this.hisPatientInfo.balance_accounts_type == 2) {
4702
             if (this.hisPatientInfo.balance_accounts_type == 2) {
4665
 
4703
 
4666
               this.$confirm('是否进行预结算', '预结算', {
4704
               this.$confirm('是否进行预结算', '预结算', {
4674
                 form['record_time'] = this.record_date
4712
                 form['record_time'] = this.record_date
4675
                 form['admin_user_id'] = this.$store.getters.xt_user.user.id
4713
                 form['admin_user_id'] = this.$store.getters.xt_user.user.id
4676
                 form['org_id'] = this.$store.getters.xt_user.org_id
4714
                 form['org_id'] = this.$store.getters.xt_user.org_id
4677
-
4715
+                form['ids'] = ids_str
4678
                 form['p_type'] = med_type
4716
                 form['p_type'] = med_type
4679
                 form['diagnosis'] = this.form.diagnosis.join(",")
4717
                 form['diagnosis'] = this.form.diagnosis.join(",")
4680
                 form['sick_type'] = this.form.sick_type
4718
                 form['sick_type'] = this.form.sick_type
4701
               })
4739
               })
4702
 
4740
 
4703
             } else {
4741
             } else {
4742
+
4743
+
4704
               var that = this
4744
               var that = this
4705
               let form = {}
4745
               let form = {}
4706
               form['id'] = this.patientInfo.id
4746
               form['id'] = this.patientInfo.id