Browse Source

518合并代码

XMLWAN 2 years ago
parent
commit
3bef4602e8

+ 11 - 0
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

107
           </div>
107
           </div>
108
         </template>
108
         </template>
109
       </el-table-column>
109
       </el-table-column>
110
+      <el-table-column align="center" prop="name" label="备注">
111
+        <template slot-scope="scope">
112
+          <div>
113
+            <span v-if="scope.row.advice_id > 0">{{scope.row.advice.remark}}</span>
114
+            <span v-if="scope.row.project_id > 0">
115
+              <span v-if="scope.row.project.type == 2">{{scope.row.project.remark}}</span>
116
+              <span v-if="scope.row.project.type == 3">{{scope.row.project.remark}}</span>
117
+            </span>
118
+          </div>
119
+        </template>
120
+      </el-table-column>
110
      
121
      
111
     </el-table>
122
     </el-table>
112
     <div style="display:flex;justify-content: space-around;">
123
     <div style="display:flex;justify-content: space-around;">

+ 57 - 56
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

202
       order_info_list:[],
202
       order_info_list:[],
203
       balanceAccountsType:0,
203
       balanceAccountsType:0,
204
       medicalInsuranceLevelList:[],
204
       medicalInsuranceLevelList:[],
205
+      id:0,
205
     }
206
     }
206
   },
207
   },
207
   methods: {
208
   methods: {
236
       this.getGatherDetailList()
237
       this.getGatherDetailList()
237
     },
238
     },
238
     changeItem(id) {
239
     changeItem(id) {
239
-      if(id == 0){
240
-        this.tableList = []
241
-        this.getGatherDetailList()
242
-      }
243
-      
244
-      if(id == 1){
245
-       var new_arr = []
246
-       for(let i=0;i<this.tableList.length;i++){
247
-        if(this.tableList[i].is_total != 1){
248
-          if(this.tableList[i].type == 1){
249
-            new_arr.push(this.tableList[i])
250
-          }  
251
-        }
252
-       }
253
-       this.tableList = []
254
-       this.tableList = new_arr
255
-      }
256
-      if(id == 2){
257
-       var new_arr = []
258
-     
259
-       for(let i=0;i<this.tableList.length;i++){
260
-        if(this.tableList[i].is_total != 1){
261
-          if(this.tableList[i].type == 2){
262
-            new_arr.push(this.tableList[i])
263
-          }  
264
-        }
265
-       }
266
-       this.tableList = []
267
-       this.tableList = new_arr
268
-      }
269
-      if(id == 3){
270
-       console.log("tabl4233223232323323223",this.tableList)
271
-       var new_arr = []
272
-       for(let i=0;i<this.tableList.length;i++){
273
-        if(this.tableList[i].is_total != 1){
274
-          if(this.tableList[i].project_type == 3){
275
-            new_arr.push(this.tableList[i])
276
-          }  
277
-        }
278
-       }
279
-       console.log("new_ar3232332323232233223",new_arr)
280
-       this.tableList = []
281
-       this.tableList = new_arr
282
-      }
240
+      this.id = id
241
+      this.tableList = []
242
+      this.getGatherDetailList()
283
     },
243
     },
284
     getGatherDetailList() {
244
     getGatherDetailList() {
285
       let start_time = this.chargeDate[0]
245
       let start_time = this.chargeDate[0]
302
             this.his_hospital = response.data.data.his_hospital
262
             this.his_hospital = response.data.data.his_hospital
303
 
263
 
304
             var order_info = response.data.data.order_info
264
             var order_info = response.data.data.order_info
305
-           
306
-            for(let i=0;i<order_info.length;i++){
307
-              order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
308
-              order_info[i].chrgitm_lv  = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
265
+            if(order_info!=null){
266
+              for(let i=0;i<order_info.length;i++){
267
+                order_info[i].med_chrgitm_type = this.getType(order_info[i].med_chrgitm_type)
268
+                order_info[i].chrgitm_lv  = this.getMedicineInsuranceType(order_info[i].chrgitm_lv)
269
+             }
270
+              var prescription = response.data.data.prescription
271
+              this.setMonthPrescription(prescription)
309
             }
272
             }
310
-            console.log("order_info32323232323232233232323232",order_info)
311
             this.order_info_list = order_info
273
             this.order_info_list = order_info
312
-            var prescription = response.data.data.prescription
313
           
274
           
314
-            this.setMonthPrescription(prescription)
315
             this.balanceAccountsType = response.data.data.balanceAccountsType
275
             this.balanceAccountsType = response.data.data.balanceAccountsType
316
 
276
 
317
             this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
277
             this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
436
                 return cur
396
                 return cur
437
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
397
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
438
               let tempOrderInfo = []
398
               let tempOrderInfo = []
439
-              console.log("med_chrgitm_type323223322323233223",med_chrgitm_types)
440
-              console.log("order_info232322332323232322323",order_info)
399
+            
441
               for (let i = 0; i < med_chrgitm_types.length; i++) {
400
               for (let i = 0; i < med_chrgitm_types.length; i++) {
442
                 let obj = {
401
                 let obj = {
443
                   total: 0,
402
                   total: 0,
449
                     tempDetails.push(order_info[b])
408
                     tempDetails.push(order_info[b])
450
                   }
409
                   }
451
                 }
410
                 }
452
-                console.log("tempDetails2332323232322323",tempDetails)
411
+                
453
               
412
               
454
                 obj.details = this.setNewData(tempDetails)
413
                 obj.details = this.setNewData(tempDetails)
455
                
414
                
471
                 }
430
                 }
472
                
431
                
473
              }
432
              }
433
+
434
+             
435
+    
474
           }
436
           }
437
+
438
+           if(this.id == 1){
439
+             var new_arr = []
440
+             for(let i=0;i<this.tableList.length;i++){
441
+              if(this.tableList[i].is_total != 1){
442
+                if(this.tableList[i].type == 1){
443
+                  new_arr.push(this.tableList[i])
444
+                }  
445
+              }
446
+             }
447
+             this.tableList = []
448
+             this.tableList = new_arr
449
+            }
450
+            if(this.id == 2){
451
+             var new_arr = []
452
+          
453
+             for(let i=0;i<this.tableList.length;i++){
454
+              if(this.tableList[i].is_total != 1){
455
+                if(this.tableList[i].project_type == 2){
456
+                  new_arr.push(this.tableList[i])
457
+                }  
458
+              }
459
+             }
460
+             this.tableList = []
461
+             this.tableList = new_arr
462
+            }
463
+            if(this.id == 3){
464
+             var new_arr = []
465
+             for(let i=0;i<this.tableList.length;i++){
466
+              if(this.tableList[i].is_total != 1){
467
+                if(this.tableList[i].project_type == 3){
468
+                  new_arr.push(this.tableList[i])
469
+                }  
470
+              }
471
+             }
472
+             console.log("this.tableist2332323223323223",this.tableList)
473
+             this.tableList = []
474
+             this.tableList = new_arr
475
+            }
475
         }
476
         }
476
      })
477
      })
477
     },
478
     },
744
        }
745
        }
745
      },
746
      },
746
      toPrint(){
747
      toPrint(){
747
-        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})
748
+        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})
748
      },
749
      },
749
      toPrintInvoice(){
750
      toPrintInvoice(){
750
        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})
751
        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})
850
             count = count + parseFloat(project_month_prescriptions.project[a].count)
851
             count = count + parseFloat(project_month_prescriptions.project[a].count)
851
             obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
852
             obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
852
             obj['remark'] = project_month_prescriptions.project[a].remark
853
             obj['remark'] = project_month_prescriptions.project[a].remark
853
-            obj['type'] = 2
854
+            obj['type'] = 3
854
             obj['record_date'] = project_month_prescriptions.project[a].record_date
855
             obj['record_date'] = project_month_prescriptions.project[a].record_date
855
             obj['is_total'] = 2
856
             obj['is_total'] = 2
856
           }
857
           }

+ 73 - 2
src/xt_pages/outpatientTool/gatherPrint.vue View File

311
              }
311
              }
312
           }
312
           }
313
         }
313
         }
314
+
315
+        if(this.$route.query.id == 1){
316
+          var new_arr = []
317
+          var objOne = {index:"合计",is_total:1,total:0}
318
+          objOne.total = this.getTotalPriceTwo(this.tableList)
319
+          for(let i=0;i<this.tableList.length;i++){
320
+          if(this.tableList[i].is_total != 1){
321
+            if(this.tableList[i].type == 1){
322
+              new_arr.push(this.tableList[i])
323
+            }  
324
+           }
325
+          }
326
+          new_arr.push(objOne)
327
+          this.tableList = []
328
+          this.tableList = new_arr
329
+        }
330
+        if(this.$route.query.id == 2){
331
+          var new_arr = []
332
+          var objOne = {index:"合计",is_total:1,total:0}
333
+          objOne.total = this.getTotalPriceTwo(this.tableList)
334
+          for(let i=0;i<this.tableList.length;i++){
335
+          if(this.tableList[i].is_total != 1){
336
+            if(this.tableList[i].project_type == 2){
337
+              new_arr.push(this.tableList[i])
338
+            }  
339
+          }
340
+          }
341
+          this.tableList = []
342
+          new_arr.push(objOne)
343
+          this.tableList = new_arr
344
+        }
345
+        if(this.$route.query.id == 3){
346
+          console.log("2323232332233232322332",this.tableList)
347
+          var new_arr = []
348
+          var objOne = {index:"合计",is_total:1,total:0}
349
+          objOne.total = this.getTotalPriceTwo(this.tableList)
350
+          for(let i=0;i<this.tableList.length;i++){
351
+          if(this.tableList[i].is_total != 1){
352
+            if(this.tableList[i].project_type == 3){
353
+              new_arr.push(this.tableList[i])
354
+            }  
355
+           }
356
+          }
357
+          new_arr.push(objOne)
358
+          this.tableList = []
359
+          this.tableList = new_arr
360
+        }
361
+        console.log("keyworde23232322332323232233232",this.$route.query.keyword)
362
+        
363
+        if(this.$route.query.keyword!=""){
364
+          var new_arr = []
365
+          for(let i=0;i<this.tableList.length;i++){
366
+            if(this.tableList[i].is_total!=1){
367
+              if(this.tableList[i].name.indexOf(this.$route.query.keyword) >-1){
368
+                  new_arr.push(this.tableList[i])
369
+                }
370
+              }
371
+          }
372
+          var obj ={index:"合计",is_total:1,total:0}
373
+          obj.total = this.getTotalPriceTwo(new_arr)
374
+          new_arr.push(obj)
375
+          this.tableList = []
376
+          this.tableList = new_arr
377
+        }
314
      })
378
      })
315
     },
379
     },
316
      getAdviceName(id){
380
      getAdviceName(id){
727
       }
791
       }
728
       return total_price.toFixed(2)
792
       return total_price.toFixed(2)
729
     },
793
     },
794
+    getTotalPriceTwo(val){
795
+      var total_price = 0
796
+      for(let i=0;i<val.length;i++){
797
+        if(val[i].is_total!=1){
798
+          total_price +=val[i].count * val[i].price
799
+        }
800
+      }
801
+      return total_price.toFixed(2)
802
+    },
730
     getAdviceMedChrgintmType(name){
803
     getAdviceMedChrgintmType(name){
731
       var med_chrgitm_type = ""
804
       var med_chrgitm_type = ""
732
       for(let i=0;i<this.order_info_list.length;i++){
805
       for(let i=0;i<this.order_info_list.length;i++){
1014
       return total_price.toFixed(2)  
1087
       return total_price.toFixed(2)  
1015
     },
1088
     },
1016
     getBedName(id){
1089
     getBedName(id){
1017
-      console.log("2332233223232323",id)
1018
-      console.log("bed_number23223232232323232",this.bedNumber)
1019
       var bed_number = ""
1090
       var bed_number = ""
1020
       for(let i=0;i<this.bedNumber.length;i++){
1091
       for(let i=0;i<this.bedNumber.length;i++){
1021
         if(id == this.bedNumber[i].id){
1092
         if(id == this.bedNumber[i].id){