Browse Source

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

28169 2 weeks ago
parent
commit
728072d3fd

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

@@ -904,6 +904,16 @@ export function list_batch(id) {
904 904
 }
905 905
 
906 906
 
907
+export function newsummary(params) {
908
+  return request({
909
+    url: '/api/export/summary',
910
+    method: 'get',
911
+    params: params
912
+  })
913
+}
914
+
915
+
916
+
907 917
 
908 918
 
909 919
 

+ 1 - 1
src/xt_pages/Pharmacy/print/patientPrint.vue View File

@@ -123,7 +123,7 @@ export default {
123 123
       this.visibility = true;
124 124
       console.log("val",val)
125 125
       this.tableData = val
126
-      this.name = data.Name
126
+      this.name = data.name
127 127
       if (state == 1){
128 128
         this.state = "待发药"
129 129
       }

+ 6 - 2
src/xt_pages/Pharmacy/print/patientPrintTwo.vue View File

@@ -146,7 +146,11 @@ export default {
146 146
     show: function (val,data,state,times,base,patients,doctors,arr,diagnosis) {
147 147
       this.times = times
148 148
       this.visibility = true;
149
-      console.log("val",val)
149
+      console.log("val111",val)
150
+      console.log("val222",data)
151
+      console.log("val333",base)
152
+      console.log("val4444",patients)
153
+
150 154
       this.tableData = []
151 155
       for(let i =0; i < val.length;i++){
152 156
         if(val[i].Type == 1){
@@ -154,7 +158,7 @@ export default {
154 158
         }
155 159
       }
156 160
       this.Doctor = val[0].Doctor
157
-      this.name = data.Name
161
+      this.name = data.name
158 162
       this.DialysisNo = data.DialysisNo
159 163
       this.patients = patients
160 164
       this.doctors = doctors

+ 131 - 0
src/xt_pages/outpatientTool/components/personSettle.vue View File

@@ -44,6 +44,9 @@
44 44
 
45 45
         </el-popover> -->
46 46
         <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
47
+
48
+        <el-button size="small" type="primary" @click="export_detail_two" v-if="this.$store.getters.xt_user.org_id == 9478">收入统计</el-button>
49
+
47 50
       </div>
48 51
     </div>
49 52
     <el-table ref="tables" :data="tableData" border :row-style="{ color: '#303133' }"
@@ -134,6 +137,7 @@
134 137
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
135 138
 import { GetSummarySettle,changeOrderDesc } from '@/api/his/his'
136 139
 import { uParseTime } from '@/utils/tools'
140
+import {newsummary} from "../../../api/his/his";
137 141
 // import NewStatementPrint from './newStatementPrint'
138 142
 const moment = require('moment')
139 143
 export default {
@@ -464,6 +468,133 @@ export default {
464 468
           colspan: _col
465 469
         }
466 470
       }
471
+    },export_detail_two(){
472
+      let start_time = this.chargeDate[0]
473
+      let end_time = this.chargeDate[1]
474
+      let params = {
475
+        start_time: start_time,
476
+        end_time: end_time,
477
+      }
478
+      // this.settle_loading = true
479
+      newsummary(params).then(response => {
480
+        if (response.data.state == 0) {
481
+          this.settle_loading = false
482
+
483
+          this.$message.error(response.data.msg)
484
+          return false
485
+        } else {
486
+
487
+          let org_info = response.data.data.org_info
488
+          let result = response.data.data.result
489
+
490
+
491
+          let list = []
492
+          for (let i = 0; i < result.length; i++) {
493
+            let order = result[i]
494
+            let name = order.PsnName
495
+
496
+
497
+            let type_name = ""
498
+            if(order.TypeName == '城乡'){
499
+              // let c =  this.config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
500
+              let a =  org_info.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
501
+
502
+              let e =  org_info.mdtrtarea_admvs.slice(0, 2); //就医地前3位编码
503
+
504
+              let f=  order.CanBaoDi.slice(0, 2); //参保地前4位编码
505
+              let b=  order.CanBaoDi.slice(0, 3); //参保地前3位编码
506
+              if(a == b){
507
+                type_name = "本地城乡"
508
+              }else{
509
+                if(e == f){
510
+                  type_name = "省内异地城乡"
511
+                }else{
512
+                  type_name = "省外异地城乡"
513
+                }
514
+              }
515
+
516
+            }else if(order.TypeName == '职工'){
517
+              // let c =  this.config.mdtrtarea_admvs.slice(0, 4); //就医地前4位编码
518
+              let a = this.config.mdtrtarea_admvs.slice(0, 3); //就医地前3位编码
519
+              let e =  this.config.mdtrtarea_admvs.slice(0, 2); //就医地前3位编码
520
+              let f= order.CanBaoDi.slice(0, 2); //参保地前4位编码
521
+              // let d=  row.his.insuplc_admdvs.slice(0, 4); //参保地前4位编码
522
+              let b=  order.CanBaoDi.slice(0, 3); //参保地前3位编码
523
+              if(a == b){
524
+                type_name = "本地职工"
525
+              }else{
526
+                if (e == f){
527
+                  type_name = "省内异地职工"
528
+                }else{
529
+                  type_name = "省外异地职工"
530
+                }
531
+              }
532
+            }else{
533
+              type_name = "自费"
534
+            }
535
+
536
+
537
+
538
+            let total = order.Total
539
+
540
+            let xt = order.XtCount
541
+            let xl = order.XlCount
542
+            let gl = order.GlCount
543
+
544
+
545
+            let obj = {
546
+              '患者姓名': name,
547
+              '类型': type_name,
548
+              "合计次数": total,
549
+              '血透': xt,
550
+              "血滤": xl,
551
+              '灌流': gl,
552
+              "西药费":order.WesternMedicineFee,
553
+              "中成药费":order.ChinesePatentMedicineFee,
554
+              '耗材费': order.HealthMaterialsFee,
555
+              '挂号费': order.RegistrationFee,
556
+              '治疗费': order.TreatmentFee,
557
+              '检查费': order.ExaminationFee,
558
+              '化验费': order.LaboratoryFee,
559
+              '护理费': order.NursingFee,
560
+              '其他费': order.OtherFee,
561
+              '床位费': order.BedsFee,
562
+              '诊察费': order.ConsultationFee,
563
+              '中药饮片费': order.ChineseMedicineFee,
564
+              '一般诊疗费': order.GeneralTreatmentFee,
565
+              '合计': order.TotalMedicalFee,
566
+              '自费金额': order.SelfPay,
567
+              '个人账户支付': order.AcctPay,
568
+              '退费': order.Return,
569
+              '优惠': order.YouHui,
570
+              '应收': order.YingShou,
571
+              '挂账': order.GuaZhang,
572
+              '冲账': order.ChongZhang,
573
+              '实收': order.ShiShou,
574
+              '已收': order.YiShou,
575
+            }
576
+            list.push(obj)
577
+          }
578
+
579
+          if(list.length > 0){
580
+            import('@/vendor/Export2Excel').then(excel => {
581
+              const tHeader = ['患者姓名', '类型', "合计次数", '血透', '血滤', "灌流", "西药费", "中成药费", '耗材费', '挂号费', '治疗费', '检查费', '化验费', '护理费', "其他费", "床位费", "诊察费", "中药饮片费", "一般诊疗费", "合计", "自费金额", '个人账户支付', '退费', "优惠", "应收", "挂账", "冲账", "实收", "已收"]
582
+              const filterVal = ['患者姓名', '类型', "合计次数", '血透', '血滤', "灌流", "西药费", "中成药费", '耗材费', '挂号费', '治疗费', '检查费', '化验费', '护理费', "其他费", "床位费", "诊察费", "中药饮片费", "一般诊疗费", "合计", "自费金额", '个人账户支付', '退费', "优惠", "应收", "挂账", "冲账", "实收", "已收"]
583
+
584
+              const data = this.formatJson(filterVal, list)
585
+              excel.export_json_to_excel({
586
+                header: tHeader,
587
+                data,
588
+                filename: '收入统计'
589
+              })
590
+            })
591
+          }
592
+
593
+
594
+        }
595
+      })
596
+
597
+
467 598
     },
468 599
   export_detail() {
469 600