Browse Source

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

csx 3 years ago
parent
commit
38af74dfc8

+ 160 - 49
src/xt_pages/outpatientCharges/costComparison.vue View File

@@ -574,59 +574,170 @@
574 574
             return false
575 575
           } else {
576 576
             this.fromData = response.data.data.list
577
-            var list = []
578
-
579
-            for (let i = 0; i < this.fromData.length; i++) {
580
-              let obj = {
581
-                '序号': i+1,
582
-                '姓名': this.fromData[i].psn_name,
583
-                '单位名称': this.fromData[i].psn_name,
584
-                '个人编号': this.fromData[i].psn_no,
585
-                '门诊号': this.fromData[i].mdtrt_id,
586
-                '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
587
-                '挂号科室': "",
588
-                '门诊费用': this.fromData[i].medfee_sumamt,
589
-                '自费': this.fromData[i].psn_cash_pay,
590
-                '起付线I': this.fromData[i].act_pay_dedc,
591
-                '按比例自付II': this.fromData[i].psn_cash_pay,
592
-                '小计I+II': this.fromData[i].act_pay_dedc + this.fromData[i].psn_cash_pay,
593
-                '统筹基金': this.fromData[i].fund_pay_sumamt,
594
-                '公务员补助': this.fromData[i].cvlserv_pay,
595
-                '单位补充保险': this.fromData[i].hifes_pay,
596
-                '煤矿补充保险': "0.00",
597
-                "超封顶线费用": "0.00",
598
-                '大额医疗保险应付': this.fromData[i].hifob_pay,
599
-                '透析补助': "0.00",
600
-                '大额合计':  "0.00",
601
-                '实账支付额': "0.00",
602
-                '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
603
-                "血透次数":this.fromData[i].DialysisCount,
604
-                "置留管数量":0,
605
-                "备注":"",
606 577
 
578
+            if(this.selection[0].insutype == "310"){
579
+
580
+              var list = []
581
+              for (let i = 0; i < this.fromData.length; i++) {
582
+                // var hifmi_pay = 0.00;
583
+                //
584
+                // if(this.fromData[i].setl_detail.length > 0){
585
+                //   var jsonObj = JSON.parse(this.fromData[i].setl_detail);
586
+                //   for (let i = 0; i < jsonObj.length; i++) {
587
+                //     if (order.fund_pay_type == '310300') {
588
+                //       hifmi_pay = jsonObj[i].fund_payamt
589
+                //     }
590
+                //   }
591
+                // }
592
+
593
+                var hifes_pays = [];
594
+
595
+                if(this.fromData[i].setl_detail.length > 0){
596
+                  var jsonObj = JSON.parse(this.fromData[i].setl_detail);
597
+                  console.log(jsonObj)
598
+                  for (let i = 0; i < jsonObj.length; i++) {
599
+                    if (jsonObj[i].fund_pay_type == '310100') {
600
+                      hifes_pays.push(jsonObj[i].fund_payamt)
601
+                    }
602
+                  }
603
+                }
604
+
605
+                let hifes_pay = 0.00
606
+                if(hifes_pays.length == 2){
607
+                  hifes_pay = hifes_pays[1]
608
+                }
609
+
610
+                let obj = {
611
+                  '序号': i+1,
612
+                  '姓名': this.fromData[i].psn_name,
613
+                  '单位名称': this.fromData[i].psn_name,
614
+                  '个人编号': this.fromData[i].psn_no,
615
+                  '门诊号': this.fromData[i].mdtrt_id,
616
+                  '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
617
+                  '挂号科室':  "血透室",
618
+                  '门诊费用': this.fromData[i].medfee_sumamt,
619
+                  '自费': this.fromData[i].psn_cash_pay,
620
+                  '起付线I': this.fromData[i].act_pay_dedc,
621
+                  '按比例自付II': this.fromData[i].psn_cash_pay,
622
+                  '小计I+II': this.fromData[i].act_pay_dedc + this.fromData[i].psn_cash_pay,
623
+                  '统筹基金': this.fromData[i].fund_pay_sumamt,
624
+                  '公务员补助': this.fromData[i].cvlserv_pay,
625
+                  '单位补充保险': hifes_pay,
626
+                  '煤矿补充保险': "0.00",
627
+                  "超封顶线费用": "0.00",
628
+                  '大额医疗保险应付': this.fromData[i].hifob_pay,
629
+                  '透析补助': "0.00",
630
+                  '大额合计':  "0.00",
631
+                  '实账支付额': "0.00",
632
+                  '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
633
+                  "血透次数":this.fromData[i].DialysisCount,
634
+                  "置留管数量":0,
635
+                  "备注":"",
636
+
637
+                }
638
+                list.push(obj)
639
+              }
640
+              var insutype_name = ''
641
+              if (this.query_insutype == '310') {
642
+                insutype_name = '职工基本医疗保险'
643
+              } else if (this.query_insutype == '390') {
644
+                insutype_name = '城乡居民基本医疗保险'
607 645
               }
608
-              list.push(obj)
609
-            }
610
-            var insutype_name = ''
611
-            if (this.query_insutype == '310') {
612
-              insutype_name = '职工基本医疗保险'
613
-            } else if (this.query_insutype == '390') {
614
-              insutype_name = '城乡居民基本医疗保险'
615
-            }
616 646
 
617
-            import('@/vendor/Export2Excel').then(excel => {
618
-              const tHeader = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
619
-              const filterVal = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
620
-              // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
621
-              const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
622
-
623
-              const data = this.formatJson(filterVal, list)
624
-              excel.export_json_to_excel({
625
-                header: tHeader,
626
-                data,
627
-                filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
647
+              import('@/vendor/Export2Excel').then(excel => {
648
+                const tHeader = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
649
+                const filterVal = ['序号', '姓名', '单位名称','个人编号', '门诊号', '挂号日期','挂号科室','门诊费用','自费', '起付线I','按比例自付II','小计I+II','统筹基金','公务员补助','单位补充保险','煤矿补充保险','超封顶线费用','大额医疗保险应付', '透析补助', '大额合计', '实账支付额', '诊断', '血透次数', '置留管数量','备注']
650
+                // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
651
+                const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
652
+
653
+                const data = this.formatJson(filterVal, list)
654
+                excel.export_json_to_excel({
655
+                  header: tHeader,
656
+                  data,
657
+                  filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
658
+                })
628 659
               })
629
-            })
660
+
661
+
662
+            }else{
663
+
664
+              var list = []
665
+              for (let i = 0; i < this.fromData.length; i++) {
666
+
667
+                var hifmi_pay = 0.00;
668
+
669
+                if(this.fromData[i].setl_detail.length > 0){
670
+                  var jsonObj = JSON.parse(this.fromData[i].setl_detail);
671
+                  console.log(jsonObj)
672
+                  for (let i = 0; i < jsonObj.length; i++) {
673
+                      if (jsonObj[i].fund_pay_type == '390200') {
674
+                        hifmi_pay = jsonObj[i].fund_payamt
675
+                      }
676
+                  }
677
+                }
678
+
679
+
680
+
681
+
682
+                let obj = {
683
+                  '序号': i+1,
684
+                  '姓名': this.fromData[i].psn_name,
685
+                  '个人编号': this.fromData[i].psn_no,
686
+                  '门诊号': this.fromData[i].mdtrt_id,
687
+                  '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
688
+                  '诊断': this.GetDiagnosisName(this.fromData[i].diagnosis_id),
689
+                  '挂号科室': "血透室",
690
+                  '门诊费用': this.fromData[i].medfee_sumamt,
691
+                  '自费': this.fromData[i].psn_cash_pay,
692
+                  '起付线': this.fromData[i].act_pay_dedc,
693
+                  '按比例自付': this.fromData[i].psn_cash_pay,
694
+                  "超封顶线费用": "0.00",
695
+                  "合计": parseFloat(this.fromData[i].act_pay_dedc) + parseFloat(this.fromData[i].psn_cash_pay),
696
+                  '统筹基金': this.fromData[i].fund_pay_sumamt,
697
+                  '大病保险': hifmi_pay,
698
+                  '医疗救助': this.fromData[i].maf_pay,
699
+                  '实账支付额': "0.00",
700
+                  "血透次数":this.fromData[i].DialysisCount,
701
+                  "置留管数量":0,
702
+                  "备注":"",
703
+
704
+                }
705
+
706
+
707
+
708
+
709
+
710
+                list.push(obj)
711
+              }
712
+              var insutype_name = ''
713
+              if (this.query_insutype == '310') {
714
+                insutype_name = '职工基本医疗保险'
715
+              } else if (this.query_insutype == '390') {
716
+                insutype_name = '城乡居民基本医疗保险'
717
+              }
718
+
719
+              import('@/vendor/Export2Excel').then(excel => {
720
+                const tHeader = ['序号', '姓名','个人编号', '门诊号', '挂号日期', '诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
721
+                const filterVal = ['序号', '姓名','个人编号', '门诊号', '挂号日期','诊断','挂号科室','门诊费用','自费', '起付线','按比例自付','超封顶线费用','合计','统筹基金','大病保险','医疗救助', '实账支付额', '血透次数', '置留管数量','备注']
722
+                // const filterVal = [ '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志']
723
+                const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
724
+
725
+                const data = this.formatJson(filterVal, list)
726
+                excel.export_json_to_excel({
727
+                  header: tHeader,
728
+                  data,
729
+                  filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
730
+                })
731
+              })
732
+
733
+
734
+
735
+
736
+
737
+
738
+            }
739
+
740
+
630 741
           }
631 742
         })
632 743
 

+ 135 - 86
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -2426,92 +2426,114 @@
2426 2426
           }
2427 2427
 
2428 2428
         } else if (index == 5) {
2429
-          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 == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
2430
-
2431
-            var that = this
2432
-            this.$confirm('是否退费', '退费', {
2433
-              confirmButtonText: '确 定',
2434
-              cancelButtonText: '取 消',
2435
-              type: 'warning'
2436
-            }).then(() => {
2437
-              let params = {
2438
-                'order_id': this.order.id,
2439
-                'number': this.order.number,
2440
-                'patient_id': this.patientInfo.id,
2441
-                'record_time': this.record_date,
2442
-                'admin_user_id': this.$store.getters.xt_user.user.id,
2443
-                'org_id': this.$store.getters.xt_user.org_id
2429
+          if(that.hisPatientInfo.balance_accounts_type == 2){
2430
+            let params = {
2431
+              'order_id': that.order.id,
2432
+              'number': that.order.number,
2433
+              'patient_id': that.patientInfo.id,
2434
+              'record_time': that.record_date
2444 2435
 
2436
+            }
2437
+            Refund(params).then(response => {
2438
+              if (response.data.state == 0) {
2439
+                this.$message.error(response.data.msg)
2440
+                this.loadingtwo = false
2441
+                return false
2442
+              } else {
2443
+                this.radio = 1
2444
+                this.changeRadioAndPatient(1)
2445
+                this.$message({ message: '退费成功', type: 'success' })
2446
+                this.loadingtwo = false
2445 2447
               }
2446
-              axios.get('http://127.0.0.1:9532/api/refund/post', {
2447
-                params: params
2448
-              })
2449
-                .then(function(response) {
2450
-                  if (response.data.state == 0) {
2451
-                    that.$message.error(response.data.msg)
2452
-                    that.loadingtwo = false
2453
-                    return false
2454
-                  } else {
2455
-                    if (response.data.data.failed_code == -10) {
2456
-                      // that.$message.error(response.data.data.msg)
2457
-                      that.$confirm(response.data.data.msg, '医保错误信息', {
2458
-                        confirmButtonText: '确 定',
2459
-                        type: 'warning'
2460
-                      }).then(() => {
2448
+            })
2461 2449
 
2462
-                      }).catch(() => {
2463
-                      })
2450
+          }else {
2451
+            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 == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
2464 2452
 
2465
-                    } else {
2466
-                      that.changeRadioAndPatient(1)
2467
-                      that.$message({ message: '退费成功', type: 'success', duration: 5000 })
2468
-                      that.loadingtwo = false
2469
-                    }
2453
+              var that = this
2454
+              this.$confirm('是否退费', '退费', {
2455
+                confirmButtonText: '确 定',
2456
+                cancelButtonText: '取 消',
2457
+                type: 'warning'
2458
+              }).then(() => {
2459
+                let params = {
2460
+                  'order_id': this.order.id,
2461
+                  'number': this.order.number,
2462
+                  'patient_id': this.patientInfo.id,
2463
+                  'record_time': this.record_date,
2464
+                  'admin_user_id': this.$store.getters.xt_user.user.id,
2465
+                  'org_id': this.$store.getters.xt_user.org_id
2470 2466
 
2471
-                  }
2467
+                }
2468
+                axios.get('http://127.0.0.1:9532/api/refund/post', {
2469
+                  params: params
2472 2470
                 })
2473
-                .catch(function(error) {
2471
+                  .then(function(response) {
2472
+                    if (response.data.state == 0) {
2473
+                      that.$message.error(response.data.msg)
2474
+                      that.loadingtwo = false
2475
+                      return false
2476
+                    } else {
2477
+                      if (response.data.data.failed_code == -10) {
2478
+                        // that.$message.error(response.data.data.msg)
2479
+                        that.$confirm(response.data.data.msg, '医保错误信息', {
2480
+                          confirmButtonText: '确 定',
2481
+                          type: 'warning'
2482
+                        }).then(() => {
2474 2483
 
2475
-                })
2484
+                        }).catch(() => {
2485
+                        })
2476 2486
 
2477
-            }).catch(() => {
2487
+                      } else {
2488
+                        that.changeRadioAndPatient(1)
2489
+                        that.$message({ message: '退费成功', type: 'success', duration: 5000 })
2490
+                        that.loadingtwo = false
2491
+                      }
2478 2492
 
2479
-            })
2493
+                    }
2494
+                  })
2495
+                  .catch(function(error) {
2480 2496
 
2481
-          } else {
2497
+                  })
2482 2498
 
2483
-            this.$confirm('是否退费', '退费', {
2484
-              confirmButtonText: '确 定',
2485
-              cancelButtonText: '取 消',
2486
-              type: 'warning'
2487
-            }).then(() => {
2488
-              let params = {
2489
-                'order_id': this.order.id,
2490
-                'number': this.order.number,
2491
-                'patient_id': this.patientInfo.id,
2492
-                'record_time': this.record_date
2499
+              }).catch(() => {
2493 2500
 
2494
-              }
2495
-              Refund(params).then(response => {
2496
-                if (response.data.state == 0) {
2497
-                  this.$message.error(response.data.msg)
2498
-                  this.loadingtwo = false
2499
-                  return false
2500
-                } else {
2501
-                  this.radio = 1
2502
-                  this.changeRadioAndPatient(1)
2503
-                  this.$message({ message: '退费成功', type: 'success' })
2504
-                  this.loadingtwo = false
2501
+              })
2502
+
2503
+            } else {
2504
+
2505
+              this.$confirm('是否退费', '退费', {
2506
+                confirmButtonText: '确 定',
2507
+                cancelButtonText: '取 消',
2508
+                type: 'warning'
2509
+              }).then(() => {
2510
+                let params = {
2511
+                  'order_id': this.order.id,
2512
+                  'number': this.order.number,
2513
+                  'patient_id': this.patientInfo.id,
2514
+                  'record_time': this.record_date
2505 2515
 
2506 2516
                 }
2507
-              })
2517
+                Refund(params).then(response => {
2518
+                  if (response.data.state == 0) {
2519
+                    this.$message.error(response.data.msg)
2520
+                    this.loadingtwo = false
2521
+                    return false
2522
+                  } else {
2523
+                    this.radio = 1
2524
+                    this.changeRadioAndPatient(1)
2525
+                    this.$message({ message: '退费成功', type: 'success' })
2526
+                    this.loadingtwo = false
2508 2527
 
2509
-            }).catch(() => {
2528
+                  }
2529
+                })
2510 2530
 
2511
-            })
2531
+              }).catch(() => {
2512 2532
 
2513
-          }
2533
+              })
2514 2534
 
2535
+            }
2536
+          }
2515 2537
         } else if (index == 6) {
2516 2538
 
2517 2539
           // if (this.patientInfo.id == 0) {
@@ -4284,31 +4306,58 @@
4284 4306
               cancelButtonText: '取 消',
4285 4307
               type: 'warning'
4286 4308
             }).then(() => {
4287
-              axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
4288
-                params: {
4289
-                  order_id: this.order.id,
4290
-                  record_time: this.record_date,
4291
-                  his_patient_id: this.hisPatientInfo.id,
4292
-                  admin_user_id: this.$store.getters.xt_user.user.id,
4293
-                  patient_id: this.patientInfo.id
4309
+              if(that.hisPatientInfo.balance_accounts_type == 2){
4310
+                let params = {
4311
+                  'order_id': that.order.id,
4312
+                  'number': that.order.number,
4313
+                  'patient_id': that.patientInfo.id,
4314
+                  'record_time': that.record_date
4315
+
4294 4316
                 }
4295
-              })
4296
-                .then(function(response) {
4317
+                Refund(params).then(response => {
4297 4318
                   if (response.data.state == 0) {
4298
-                    that.$message.error(response.data.msg)
4319
+                    this.$message.error(response.data.msg)
4320
+                    this.loadingtwo = false
4299 4321
                     return false
4300 4322
                   } else {
4301
-                    if (response.data.data.failed_code == -10) {
4302
-                      that.$message.error(response.data.data.msg)
4303
-
4304
-                    } else {
4305
-                      that.changeRadioAndPatient(1)
4306
-                      that.$message({ message: '退费成功', type: 'success' })
4307
-                    }
4323
+                    this.radio = 1
4324
+                    this.changeRadioAndPatient(1)
4325
+                    this.$message({ message: '退费成功', type: 'success' })
4326
+                    this.loadingtwo = false
4308 4327
                   }
4309 4328
                 })
4310
-                .catch(function(error) {
4329
+
4330
+              }else{
4331
+
4332
+                axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
4333
+                  params: {
4334
+                    order_id: this.order.id,
4335
+                    record_time: this.record_date,
4336
+                    his_patient_id: this.hisPatientInfo.id,
4337
+                    admin_user_id: this.$store.getters.xt_user.user.id,
4338
+                    patient_id: this.patientInfo.id
4339
+                  }
4311 4340
                 })
4341
+                  .then(function(response) {
4342
+                    if (response.data.state == 0) {
4343
+                      that.$message.error(response.data.msg)
4344
+                      return false
4345
+                    } else {
4346
+                      if (response.data.data.failed_code == -10) {
4347
+                        that.$message.error(response.data.data.msg)
4348
+
4349
+                      } else {
4350
+                        that.changeRadioAndPatient(1)
4351
+                        that.$message({ message: '退费成功', type: 'success' })
4352
+                      }
4353
+                    }
4354
+                  })
4355
+                  .catch(function(error) {
4356
+                  })
4357
+
4358
+
4359
+              }
4360
+
4312 4361
             }).catch(() => {
4313 4362
             })
4314 4363
             break