Browse Source

中能建

huangyw 3 years ago
parent
commit
cfe14a6790
1 changed files with 12 additions and 1 deletions
  1. 12 1
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue

+ 12 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

46
           <div class="inline_block" style="margin-left: 10px">
46
           <div class="inline_block" style="margin-left: 10px">
47
             年龄:
47
             年龄:
48
             <div class="under_line" style="width: 30px; text-align: center">
48
             <div class="under_line" style="width: 30px; text-align: center">
49
-              {{ getAge(patientInfo) }}
49
+              {{ getAge(patientInfo) -  getoldAge()}}
50
             </div>
50
             </div>
51
51
52
           </div>
52
           </div>
2694
     };
2694
     };
2695
   },
2695
   },
2696
   methods: {
2696
   methods: {
2697
+    // 获取当前年份,用于年龄计算
2698
+    getoldAge(){
2699
+      let date = new Date()
2700
+      let year = date.getFullYear()
2701
+      let year_d = year-this.xtdate.split('-')[0]
2702
+      return year_d
2703
+    },
2704
+
2705
+
2706
+
2707
+
2697
     checkData() {
2708
     checkData() {
2698
       if (this.receiverTreatmentAccess.way == 0) {
2709
       if (this.receiverTreatmentAccess.way == 0) {
2699
         this.$message.error("入科方式未填");
2710
         this.$message.error("入科方式未填");