Bläddra i källkod

518合并代码

XMLWAN 2 år sedan
förälder
incheckning
24ef0b240e

+ 14 - 9
src/xt_pages/outpatientTool/components/detailStatistics.vue Visa fil

@@ -177,6 +177,8 @@ export default {
177 177
       list:[],
178 178
       his_patient:{},
179 179
       id:0,
180
+      start_time:"",
181
+      end_time:"",
180 182
     }
181 183
   },
182 184
   methods: {
@@ -194,6 +196,8 @@ export default {
194 196
      this.getHisSummaryDetailList()
195 197
     },
196 198
     changeDate() {
199
+      this.start_time = this.chargeDate[0]
200
+      this.end_time = this.chargeDate[1]
197 201
       this.getHisSummaryDetailList()
198 202
     },
199 203
     changeItem(id) {
@@ -204,6 +208,7 @@ export default {
204 208
     getHisSummaryDetailList() {
205 209
       let start_time = this.chargeDate[0]
206 210
       let end_time = this.chargeDate[1]
211
+      
207 212
       let params = {
208 213
         patient_id:this.patient_id,
209 214
         start_time: start_time,
@@ -234,10 +239,10 @@ export default {
234 239
             obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
235 240
           }
236 241
           obj.total_price = (obj.total_price).toFixed(2)
237
-          // this.tableData.push(obj)cccc
238
-          // console.log("tabledata23233232233232",this.tableData)
242
+          
239 243
           var new_arr = []
240
-       
244
+           
245
+        
241 246
           if(this.keywords!=""){
242 247
             for(let i=0;i<this.tableData.length;i++){
243 248
               if(this.tableData[i].index!="合计"){
@@ -262,8 +267,6 @@ export default {
262 267
             }
263 268
             var objs = {index:"合计",total_price:0,record_date:"0"}
264 269
             objs.total_price = this.getPrice(new_arr)
265
-            // new_arr.push(objs)
266
-            
267 270
             this.tableData = new_arr
268 271
           }
269 272
 
@@ -316,10 +319,10 @@ export default {
316 319
             }
317 320
             this.tableData = []
318 321
             obj.total_price = this.getPrice(new_arr)
319
-            // new_arr.push(obj)
320
-            // console.log("new_arr2332323232",new_arr)
321 322
             this.tableData = new_arr
322
-          }          
323
+          }      
324
+          
325
+          console.log("hh233223233232323232322332",this.tableData)
323 326
        }
324 327
      })
325 328
     },
@@ -367,7 +370,7 @@ export default {
367 370
       return maf_pay
368 371
     },
369 372
     toPrint(){
370
-      this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id+"&balance_accounts_type="+this.his_patient.balance_accounts_type})
373
+      this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id+"&balance_accounts_type="+this.his_patient.balance_accounts_type})
371 374
     },
372 375
     getPrice(val){
373 376
       var total_price = 0
@@ -379,6 +382,8 @@ export default {
379 382
 
380 383
   },
381 384
   created() {
385
+    this.start_time = this.chargeDate[0]
386
+    this.end_time = this.chargeDate[1]
382 387
     this.getHisSummaryDetailList()
383 388
   },
384 389
   watch:{

+ 103 - 15
src/xt_pages/outpatientTool/components/gatherStatistics.vue Visa fil

@@ -53,7 +53,9 @@
53 53
               v-loading="detail_loading"
54 54
               highlight-current-row>
55 55
       <el-table-column type="index" label="序号" width="60px" align="center">
56
-           <template slot-scope="scope">{{scope.row.index}}</template>
56
+           <template slot-scope="scope">
57
+           {{scope.row.index}}
58
+           </template>
57 59
       </el-table-column>
58 60
       <el-table-column align="center" label="处方日期">
59 61
         <template slot-scope="scope">
@@ -121,7 +123,6 @@
121 123
     </el-table>
122 124
      <div>
123 125
       <div class="listInfo">
124
-            <!-- <div>西药:{{westernMedicineCostTotal}}</div> -->
125 126
             <div>西药:{{getWesternMedicineCostTotal()}}</div>
126 127
             <div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
127 128
             <div>中草药:{{getChineseTotal()}}</div>
@@ -204,6 +205,8 @@ export default {
204 205
       balanceAccountsType:0,
205 206
       medicalInsuranceLevelList:[],
206 207
       id:0,
208
+      start_time:"",
209
+      end_time:"",
207 210
     }
208 211
   },
209 212
   methods: {
@@ -219,7 +222,6 @@ export default {
219 222
         }
220 223
         var obj ={index:"合计",is_total:1,total:0}
221 224
         obj.total = this.getPrice(new_arr)
222
-        // new_arr.push(obj)
223 225
         this.tableList = []
224 226
         this.tableList = new_arr
225 227
       }else{
@@ -235,6 +237,8 @@ export default {
235 237
       return total_price.toFixed(2)
236 238
     },
237 239
     changeDate() {
240
+      this.start_time = this.chargeDate[0]
241
+      this.end_time = this.chargeDate[1]
238 242
       this.getGatherDetailList()
239 243
     },
240 244
     changeItem(id) {
@@ -263,16 +267,19 @@ export default {
263 267
             this.his_hospital = response.data.data.his_hospital
264 268
 
265 269
             var order_info = response.data.data.order_info
270
+
266 271
             if(order_info!=null){
267 272
               for(let i=0;i<order_info.length;i++){
268 273
                 order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
269 274
                 order_info[i].chrgitm_lv  = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
270 275
              }
271
-              var prescription = response.data.data.prescription
276
+             var prescription = response.data.data.prescription
277
+            //  console.log("prescription2332232323233223",prescription)
272 278
               this.setMonthPrescription(prescription)
273 279
             }
280
+            // console.log("order_info233232323232323232",order_info)
274 281
             this.order_info_list = order_info
275
-          
282
+             
276 283
             this.balanceAccountsType = response.data.data.balanceAccountsType
277 284
 
278 285
             this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
@@ -435,7 +442,7 @@ export default {
435 442
              
436 443
     
437 444
           }
438
-
445
+ 
439 446
            if(this.id == 1){
440 447
              var new_arr = []
441 448
              for(let i=0;i<this.tableList.length;i++){
@@ -474,6 +481,61 @@ export default {
474 481
              this.tableList = []
475 482
              this.tableList = new_arr
476 483
             }
484
+          
485
+            var new_arr_two = []
486
+            for(let i=0;i<this.tableList.length;i++){
487
+                if(this.tableList[i].advice_id > 0){
488
+                  this.tableList[i].const_type = this.getAdviceMedChrgintmType(this.tableList[i].name)
489
+                }
490
+                if(this.tableList[i].project_id > 0){
491
+                  this.tableList[i].const_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
492
+                }
493
+               
494
+               if(this.tableList[i].const_type!=''){
495
+                  new_arr_two.push(this.tableList[i])
496
+               }
497
+
498
+             }
499
+           
500
+            this.tableList = []
501
+            this.tableList = new_arr_two
502
+          
503
+            console.log("分解死23232332332323223322332323232",this.tableList)
504
+            let dataInfo = {}
505
+            this.tableList.forEach((item, index) => {
506
+              let { item_id } = item
507
+              if (!dataInfo[item_id]) {
508
+                dataInfo[item_id] = {
509
+                  item_id,
510
+                  child: [],
511
+                  count_number:0,
512
+                  name:item.name,
513
+                  price:item.price,
514
+                  record_date:item.record_date,
515
+                }
516
+              }
517
+              dataInfo[item_id].child.push(item)
518
+            })
519
+            
520
+            let list = Object.values(dataInfo)
521
+            
522
+
523
+            list.forEach((it,index)=>{
524
+              for(let i=0;i<this.tableList.length;i++){
525
+                if(it.item_id == this.tableList[i].item_id){
526
+                    it.child.push(this.tableList[i])
527
+                }
528
+              }
529
+            })
530
+           console.log("list23232332323223322323",list)
531
+           for(let i=0;i<list.length;i++){
532
+            for(let j=0;j<list[i].child.length;j++){
533
+                list[i].count_number += list[i].child[j].count
534
+            }
535
+           }
536
+
537
+            console.log("我的list23223233223322323",list)
538
+             
477 539
         }
478 540
      })
479 541
     },
@@ -496,12 +558,12 @@ export default {
496 558
      return project_name
497 559
     },
498 560
     setNewData(details) {
499
-     
500 561
         let drug_ids = []
501 562
         let project_ids = []
502 563
 
503 564
         for (let i = 0; i < details.length; i++) {
504 565
           if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
566
+            
505 567
             let obj = {
506 568
               id: details[i].advice.drug_id,
507 569
               price: details[i].advice.price,
@@ -519,10 +581,12 @@ export default {
519 581
           }
520 582
 
521 583
         }
584
+        
522 585
         let new_drug_ids = this.unique(drug_ids)
523 586
         let new_project_ids = this.unique(project_ids)
524 587
         let list = []
525
-       
588
+         
589
+         console.log("new_drug_ids232323323232332332233223",new_drug_ids)
526 590
         if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
527 591
           for (let i = 0; i < new_drug_ids.length; i++) {
528 592
             let obj = {}
@@ -545,6 +609,28 @@ export default {
545 609
             list.push(obj)
546 610
 
547 611
           }
612
+          console.log("list23323232233232",list)
613
+
614
+          // let dataInfo = {}
615
+          // list.forEach((item, index) => {
616
+          //   let { name } = item
617
+          //   if (!dataInfo[name]) {
618
+          //     dataInfo[name] = {
619
+          //       name,
620
+          //       child: []
621
+          //     }
622
+          //   }
623
+          // })
624
+          // let listOne = Object.values(dataInfo)
625
+          // listOne.forEach((item,index)=>{
626
+          //   for(let i=0;i<list.length;i++){
627
+          //      if(listOne[i].name == list[i].name){
628
+          //          listOne[i].child.push(list[i])
629
+          //      }
630
+          //   }
631
+          // })
632
+          // console.log("listONE2322323322323",listOne)
633
+         
548 634
         }
549 635
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
550 636
           for (let i = 0; i < new_project_ids.length; i++) {
@@ -746,10 +832,10 @@ export default {
746 832
        }
747 833
      },
748 834
      toPrint(){
749
-        this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id})
835
+        this.$router.push({path:"/hisTool/gatherPrint?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id})
750 836
      },
751 837
      toPrintInvoice(){
752
-       this.$router.push({path:"/hisTool/gatherPrintInvoice?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
838
+       this.$router.push({path:"/hisTool/gatherPrintInvoice?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords})
753 839
      },
754 840
      setMonthPrescription(month_prescriptions) {
755 841
       let drug_month_prescriptions = {
@@ -811,6 +897,7 @@ export default {
811 897
             obj['is_total'] = 2
812 898
             obj['chrgitm_lv'] =  drug_month_prescriptions.advices[a].drug.medical_insurance_level 
813 899
             obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
900
+            obj['item_id'] = drug_ids[i].id + "/" + drug_ids[i].price
814 901
             count = count + drug_month_prescriptions.advices[a].prescribing_number
815 902
 
816 903
           }
@@ -818,7 +905,6 @@ export default {
818 905
         obj['count'] = count
819 906
         this.tableList.push(obj)
820 907
       }
821
-
822 908
       for (let i = 0; i < project_ids.length; i++) {
823 909
         let obj = {}
824 910
         let count = 0
@@ -833,6 +919,7 @@ export default {
833 919
               obj['spec'] =  project_month_prescriptions.project[a].project.project_name
834 920
               obj['unit'] = project_month_prescriptions.project[a].unit
835 921
               obj['chrgitm_lv'] =  project_month_prescriptions.project[a].project.medical_coverage
922
+              obj['item_id'] = project_ids[i].id +"/"+ project_ids[i].price
836 923
             }else if (project_month_prescriptions.project[a].type == 3){
837 924
               obj['project_id'] = project_month_prescriptions.project[a].id
838 925
               obj['name'] = project_month_prescriptions.project[a].good_info.good_name
@@ -841,6 +928,7 @@ export default {
841 928
               obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
842 929
               obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
843 930
               obj['chrgitm_lv'] =  project_month_prescriptions.project[a].good_info.medical_insurance_level
931
+              obj['item_id'] = project_ids[i].id + "/" + project_ids[i].price
844 932
             }
845 933
             obj['single_dose'] = project_month_prescriptions.project[a].single_dose
846 934
             obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
@@ -859,16 +947,15 @@ export default {
859 947
         }
860 948
         obj['count'] = count
861 949
         this.tableList.push(obj)
862
-
863 950
       }
951
+     console.log("表格 2323323232323323323232323232323",this.tableList)
952
+           
864 953
       var objOne = {index:"合计",is_total:1,total:0}
865 954
       objOne.total = this.getTotalPrice(this.tableList)
866 955
       for(let i=0;i<this.tableList.length;i++){
867 956
         this.tableList[i].index = i + 1
868 957
         this.tableList[i].total_all = (this.tableList[i].count * this.tableList[i].price).toFixed(2)
869
-        // console.log(this.tableList[i].count,'opop')
870 958
       }
871
-      // this.tableList.push(objOne)
872 959
     },
873 960
 
874 961
     getTotalPrice(val){
@@ -1028,7 +1115,6 @@ export default {
1028 1115
         if(this.tableList[i].project_id > 0){
1029 1116
            this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
1030 1117
          }
1031
-         console.log("化验23233223322323",this.tableList[i].drug_type)
1032 1118
          if(this.tableList[i].drug_type == "化验费"){
1033 1119
             total_price += this.tableList[i].count * this.tableList[i].price
1034 1120
          }
@@ -1168,6 +1254,8 @@ export default {
1168 1254
 
1169 1255
   },
1170 1256
   created() {
1257
+    this.start_time = this.chargeDate[0]
1258
+    this.end_time = this.chargeDate[1]
1171 1259
     this.tableList = []
1172 1260
     this.getGatherDetailList()
1173 1261
 

+ 24 - 7
src/xt_pages/outpatientTool/detailPrint.vue Visa fil

@@ -10,19 +10,34 @@
10 10
       <div class="listInfo">
11 11
         <div>患者姓名:{{ patient.name }}</div>
12 12
         <div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
13
-        <div>结算类别:{{ getType(his_patient.balance_accounts_type) }}</div>
13
+        <div>结算类别:
14
+          {{ getType(his_patient.balance_accounts_type) }}
15
+          {{getType(his_record_patient.balance_accounts_type)}}
16
+        </div>
14 17
         <div style="min-width:300px;">发票号码:{{order.fa_piao_number}}</div>
15 18
       </div>
16 19
       <div class="listInfo">
17
-        <div>住院/门诊号:{{his_patient.number}}</div>
18
-        <div>科室:{{ getDepartment(his_patient.departments) }}</div>
19
-        <div style="min-width:350px;">就诊流水号:{{ his_patient.number }}</div>
20
+        <div>住院/门诊号:
21
+          {{his_patient.number}}
22
+          {{his_record_patient.ipt_otp_no}}
23
+        </div>
24
+        <div>科室:
25
+          {{ getDepartment(his_patient.departments) }}
26
+          {{ getDepartment(his_record_patient.departments) }}
27
+        </div>
28
+        <div style="min-width:350px;">就诊流水号:
29
+          {{ his_patient.number }}
30
+          {{his_record_patient.number}}
31
+        </div>
20 32
       </div>
21 33
       <div class="listInfo">
22 34
         <div>总费用:{{ getAllPice() }}</div>
23 35
         <div>个人支付:
24
-          <span v-if="this.$route.query.balance_accounts_type == 2">{{ getAllPice() }}</span>
25
-          <span v-if="this.$route.query.balance_accounts_type != 2">{{ getActPay() }}</span>
36
+          <span v-if="this.$route.query.balance_accounts_type == 2 && his_patient.id >0">{{ getAllPice() }}</span>
37
+          <span v-if="this.$route.query.balance_accounts_type != 2 && his_patient.id >0">{{ getActPay() }}</span>
38
+          
39
+          <span v-if="his_record_patient.balance_accounts_type == 2">{{ getAllPice() }}</span>
40
+          <span v-if="his_record_patient.balance_accounts_type != 2">{{ getActPay() }}</span>
26 41
 
27 42
         </div>
28 43
         <div>基金支付记账:{{ getFundPaySumamt() }}</div>
@@ -126,6 +141,7 @@ export default {
126 141
         { value: 8, label: "医保自费" },
127 142
       ],
128 143
       order:{},
144
+      his_record_patient:{},
129 145
     };
130 146
   },
131 147
   methods: {
@@ -178,7 +194,8 @@ export default {
178 194
           this.patient = response.data.data.patient;
179 195
 
180 196
           this.his_patient = response.data.data.his_patient;
181
-
197
+         
198
+         this.his_record_patient = response.data.data.his_record_patient
182 199
 
183 200
           this.hisDepatment = response.data.data.hisDepatment;
184 201
 

+ 18 - 0
src/xt_pages/outpatientTool/gatherPrint.vue Visa fil

@@ -375,6 +375,24 @@
375 375
           this.tableList = []
376 376
           this.tableList = new_arr
377 377
         }
378
+
379
+      
380
+        var new_arr_two = []
381
+        for(let i=0;i<this.tableList.length;i++){
382
+            if(this.tableList[i].advice_id > 0){
383
+              this.tableList[i].const_type = this.getAdviceMedChrgintmType(this.tableList[i].name)
384
+            }
385
+            if(this.tableList[i].project_id > 0){
386
+              this.tableList[i].const_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
387
+            }
388
+            
389
+            if(this.tableList[i].const_type!=''){
390
+              new_arr_two.push(this.tableList[i])
391
+            }
392
+
393
+          }
394
+          this.tableList = []
395
+          this.tableList = new_arr_two
378 396
      })
379 397
     },
380 398
      getAdviceName(id){

+ 0 - 1
src/xt_pages/outpatientTool/gatherPrintInvoice.vue Visa fil

@@ -901,7 +901,6 @@
901 901
         if(this.tableList[i].project_id > 0){
902 902
            this.tableList[i].drug_type = this.getProjectMedChrgintmType(this.tableList[i].project_id)
903 903
          }
904
-         console.log("化验23233223322323",this.tableList[i].drug_type)
905 904
          if(this.tableList[i].drug_type == "化验费"){
906 905
             total_price += this.tableList[i].count * this.tableList[i].price
907 906
          }