Преглед изворни кода

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

XMLWAN пре 2 година
родитељ
комит
9f6dd215bd
1 измењених фајлова са 20 додато и 2 уклоњено
  1. 20 2
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue

+ 20 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Прегледај датотеку

2698
     getoldAge(){
2698
     getoldAge(){
2699
       let date = new Date()
2699
       let date = new Date()
2700
       let year = date.getFullYear()
2700
       let year = date.getFullYear()
2701
+      // let year = 2034
2701
       let year_d = year-this.xtdate.split('-')[0]
2702
       let year_d = year-this.xtdate.split('-')[0]
2702
-      return year_d
2703
+      let year_m = this.xtdate.split('-')[1]
2704
+      let birth_m = this.patientInfo.birth.split('-')[1]
2705
+      let year_date = this.xtdate.split('-')[2]
2706
+      let birth_date = this.patientInfo.birth.split('-')[2]
2707
+      // console.log(year,'今年年月')
2708
+      // console.log(this.xtdate.split('-'),'病人就诊年月')
2709
+      // console.log(this.patientInfo.birth,'病人生日')
2710
+      if(year_m < birth_m){
2711
+        return year_d - 1
2712
+      }else if(year_m = birth_m){
2713
+        if(year_date < birth_date){
2714
+          return year_d - 1
2715
+        }else{
2716
+          return year_d
2717
+        }
2718
+      }else{
2719
+        return year_d
2720
+      }
2703
     },
2721
     },
2704
 
2722
 
2705
 
2723
 
3451
           return val.age;
3469
           return val.age;
3452
         }
3470
         }
3453
       } else {
3471
       } else {
3454
-        return jsGetAge(val.birth, "-");
3472
+        return this.getoldAge()
3455
       }
3473
       }
3456
     },
3474
     },
3457
     newAdviceGroupObject: function () {
3475
     newAdviceGroupObject: function () {