Browse Source

中能建

huangyw 2 years ago
parent
commit
e55aff0c82
1 changed files with 34 additions and 36 deletions
  1. 34 36
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue

+ 34 - 36
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) }}
50
             </div>
50
             </div>
51
51
52
           </div>
52
           </div>
1673
             <div class="inline_block" style="margin-left: 5px">
1673
             <div class="inline_block" style="margin-left: 5px">
1674
               住院号/门诊号:
1674
               住院号/门诊号:
1675
               <div
1675
               <div
1676
-              class="under_line"
1677
-              style="width: 70px; text-align: left"
1678
-              v-if="receiverTreatmentAccess.admission_number"
1679
-            >
1680
-              {{ receiverTreatmentAccess.admission_number }}
1681
-            </div>
1682
-            <div
1683
-              class="under_line"
1684
-              style="width: 70px; text-align: left"
1685
-              v-else
1686
-            >
1687
-              {{ "/" }}
1688
-            </div>
1676
+                class="under_line"
1677
+                style="width: 70px; text-align: left"
1678
+                v-if="receiverTreatmentAccess.admission_number"
1679
+              >
1680
+                {{ receiverTreatmentAccess.admission_number }}
1681
+              </div>
1682
+              <div
1683
+                class="under_line"
1684
+                style="width: 70px; text-align: left"
1685
+                v-else
1686
+              >
1687
+                {{ "/" }}
1688
+              </div>
1689
             </div>
1689
             </div>
1690
           </div>
1690
           </div>
1691
           <div class="row" style="margin-bottom: 10px">
1691
           <div class="row" style="margin-bottom: 10px">
2695
   },
2695
   },
2696
   methods: {
2696
   methods: {
2697
     // 获取当前年份,用于年龄计算
2697
     // 获取当前年份,用于年龄计算
2698
-    getoldAge(){
2699
-      let date = new Date()
2700
-      let year = date.getFullYear()
2701
-      let year_d = this.xtdate.split('-')[0]-this.patientInfo.birth.split('-')[0]
2702
-      let year_m = this.xtdate.split('-')[1]
2703
-      let birth_m = this.patientInfo.birth.split('-')[1]
2704
-      let year_date = this.xtdate.split('-')[2]
2705
-      let birth_date = this.patientInfo.birth.split('-')[2]
2698
+    getoldAge() {
2699
+      let date = new Date();
2700
+      let year = date.getFullYear();
2701
+      let year_d =
2702
+        this.xtdate.split("-")[0] - this.patientInfo.birth.split("-")[0];
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];
2706
       // console.log(year,'今年年月')
2707
       // console.log(year,'今年年月')
2707
       // console.log(this.xtdate.split('-'),'病人就诊年月')
2708
       // console.log(this.xtdate.split('-'),'病人就诊年月')
2708
-      console.log(this.patientInfo.birth,'病人生日')
2709
+      console.log(this.patientInfo.birth, "病人生日");
2709
       // console.log(year_d,'year_d')
2710
       // console.log(year_d,'year_d')
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
2711
+      if (year_m < birth_m) {
2712
+        return year_d - 1;
2713
+      } else if (year_m == birth_m) {
2714
+        if (year_date < birth_date) {
2715
+          return year_d - 1;
2716
+        } else {
2717
+          return year_d;
2717
         }
2718
         }
2718
-      }else{
2719
-        return year_d
2719
+      } else {
2720
+        return year_d;
2720
       }
2721
       }
2721
     },
2722
     },
2722
 
2723
 
2723
-
2724
-
2725
-
2726
     checkData() {
2724
     checkData() {
2727
       if (this.receiverTreatmentAccess.way == 0) {
2725
       if (this.receiverTreatmentAccess.way == 0) {
2728
         this.$message.error("入科方式未填");
2726
         this.$message.error("入科方式未填");
3470
           return val.age;
3468
           return val.age;
3471
         }
3469
         }
3472
       } else {
3470
       } else {
3473
-        return this.getoldAge()
3471
+        return this.getoldAge();
3474
       }
3472
       }
3475
     },
3473
     },
3476
     newAdviceGroupObject: function () {
3474
     newAdviceGroupObject: function () {