浏览代码

518合并代码

XMLWAN 2 年前
父节点
当前提交
3bef4602e8

+ 11 - 0
src/xt_pages/outpatientTool/components/detailStatistics.vue 查看文件

@@ -107,6 +107,17 @@
107 107
           </div>
108 108
         </template>
109 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 122
     </el-table>
112 123
     <div style="display:flex;justify-content: space-around;">

+ 57 - 56
src/xt_pages/outpatientTool/components/gatherStatistics.vue 查看文件

@@ -202,6 +202,7 @@ export default {
202 202
       order_info_list:[],
203 203
       balanceAccountsType:0,
204 204
       medicalInsuranceLevelList:[],
205
+      id:0,
205 206
     }
206 207
   },
207 208
   methods: {
@@ -236,50 +237,9 @@ export default {
236 237
       this.getGatherDetailList()
237 238
     },
238 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 244
     getGatherDetailList() {
285 245
       let start_time = this.chargeDate[0]
@@ -302,16 +262,16 @@ export default {
302 262
             this.his_hospital = response.data.data.his_hospital
303 263
 
304 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 273
             this.order_info_list = order_info
312
-            var prescription = response.data.data.prescription
313 274
           
314
-            this.setMonthPrescription(prescription)
315 275
             this.balanceAccountsType = response.data.data.balanceAccountsType
316 276
 
317 277
             this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
@@ -436,8 +396,7 @@ export default {
436 396
                 return cur
437 397
               }, []) // 设置cur默认类型为数组,并且初始值为空的数组
438 398
               let tempOrderInfo = []
439
-              console.log("med_chrgitm_type323223322323233223",med_chrgitm_types)
440
-              console.log("order_info232322332323232322323",order_info)
399
+            
441 400
               for (let i = 0; i < med_chrgitm_types.length; i++) {
442 401
                 let obj = {
443 402
                   total: 0,
@@ -449,7 +408,7 @@ export default {
449 408
                     tempDetails.push(order_info[b])
450 409
                   }
451 410
                 }
452
-                console.log("tempDetails2332323232322323",tempDetails)
411
+                
453 412
               
454 413
                 obj.details = this.setNewData(tempDetails)
455 414
                
@@ -471,7 +430,49 @@ export default {
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,7 +745,7 @@ export default {
744 745
        }
745 746
      },
746 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 750
      toPrintInvoice(){
750 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,7 +851,7 @@ export default {
850 851
             count = count + parseFloat(project_month_prescriptions.project[a].count)
851 852
             obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
852 853
             obj['remark'] = project_month_prescriptions.project[a].remark
853
-            obj['type'] = 2
854
+            obj['type'] = 3
854 855
             obj['record_date'] = project_month_prescriptions.project[a].record_date
855 856
             obj['is_total'] = 2
856 857
           }

+ 73 - 2
src/xt_pages/outpatientTool/gatherPrint.vue 查看文件

@@ -311,6 +311,70 @@
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 380
      getAdviceName(id){
@@ -727,6 +791,15 @@
727 791
       }
728 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 803
     getAdviceMedChrgintmType(name){
731 804
       var med_chrgitm_type = ""
732 805
       for(let i=0;i<this.order_info_list.length;i++){
@@ -1014,8 +1087,6 @@
1014 1087
       return total_price.toFixed(2)  
1015 1088
     },
1016 1089
     getBedName(id){
1017
-      console.log("2332233223232323",id)
1018
-      console.log("bed_number23223232232323232",this.bedNumber)
1019 1090
       var bed_number = ""
1020 1091
       for(let i=0;i<this.bedNumber.length;i++){
1021 1092
         if(id == this.bedNumber[i].id){