See999 4 年 前
コミット
5a6dc489d0
共有1 個のファイルを変更した16 個の追加5 個の削除を含む
  1. 16 5
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentySix.vue

+ 16 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySix.vue ファイルの表示

21
             </td>
21
             </td>
22
             <td width="120" style="border:none;text-align: left;">
22
             <td width="120" style="border:none;text-align: left;">
23
               年 龄:
23
               年 龄:
24
-              <span>{{ getAge(patientInfo) }}</span>
24
+              <span>{{ getNewAge(patientInfo.id_card_no) }}</span>
25
             </td>
25
             </td>
26
             
26
             
27
 
27
 
164
             </td>
164
             </td>
165
             <td colspan="4" style="padding-left:5px;border-left:1px solid #000;padding-left:5px">
165
             <td colspan="4" style="padding-left:5px;border-left:1px solid #000;padding-left:5px">
166
               医师签名:
166
               医师签名:
167
-              <span v-if="setAdminUserES(prescription.creater) == ''">
168
-                {{ getAdminUser(prescription.creater) }}
169
-              </span>
170
-              <img class="es-img" style="height:30px;" :src="setAdminUserES(prescription.creater)" alt srcset v-else />
167
+              <span v-if="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) == ''"> {{ getAdminUser(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:'')) }} </span>
168
+              <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:''))" alt="" srcset="" v-else />
171
             </td>
169
             </td>
172
           </tr>
170
           </tr>
173
           <tr style="text-align:left">
171
           <tr style="text-align:left">
1253
     };
1251
     };
1254
   },
1252
   },
1255
   methods: {
1253
   methods: {
1254
+    getNewAge(UUserCard) {
1255
+      if (UUserCard != null && UUserCard != '') {
1256
+        // 获取年龄
1257
+        var myDate = new Date()
1258
+        var month = myDate.getMonth() + 1
1259
+        var day = myDate.getDate()
1260
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
1261
+        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
1262
+          age++
1263
+        }
1264
+        return age
1265
+      }
1266
+    },
1256
     getDisplaceLiquiPart: function(val) {
1267
     getDisplaceLiquiPart: function(val) {
1257
       let displace_liqui_part_name = "/";
1268
       let displace_liqui_part_name = "/";
1258
       const displace_liqui_part = this.displaceLiquiPartOptions;
1269
       const displace_liqui_part = this.displaceLiquiPartOptions;