Browse Source

hah阿凡达

28169 3 weeks ago
parent
commit
e715d9e80d

+ 44 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyeight.vue View File

2033
                 年龄:
2033
                 年龄:
2034
                 <div class="under_line" style="width: 30px; text-align: center">
2034
                 <div class="under_line" style="width: 30px; text-align: center">
2035
                   <!-- {{ record.patient.age }} -->
2035
                   <!-- {{ record.patient.age }} -->
2036
-                  {{ getAge(record.patient) }}
2036
+                  <!-- {{ getAge(record.patient) }} -->
2037
+                  {{ calculateAge(record.patient.id_card_no,record.schedule_date) }}
2037
                 </div>
2038
                 </div>
2038
2039
2039
               </div>
2040
               </div>
3454
       });
3455
       });
3455
   },
3456
   },
3456
   methods: {
3457
   methods: {
3458
+  
3459
+    getTimeOne(val) {
3460
+      return uParseTime(val, "{y}");
3461
+    },
3462
+    getTimeTwo(val) {
3463
+      return uParseTime(val, "{m}");
3464
+    },
3465
+    getTimeThree(val) {
3466
+      return uParseTime(val, "{h}");
3467
+    },
3468
+    calculateAge(idNumber,created_time) {
3469
+    var year = this.getTimeOne(created_time)
3470
+
3471
+    var month = this.getTimeTwo(created_time)
3472
+
3473
+    var day = this.getTimeThree(created_time)
3474
+    console.log("start_time=====",year)
3475
+    // 假设身份证号码是18位,且生日在第7位到第14位
3476
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
3477
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3478
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
3479
+
3480
+    const today = new Date();
3481
+    // console.log("today============",today)
3482
+    var ageYear = year - birthYear;
3483
+    let ageMonth = month - birthMonth; // 月份是从0开始的
3484
+    let ageDay = day - birthDay;
3485
+
3486
+    // 调整月份和日期,以便于正确计算
3487
+      if (ageDay < 0) {
3488
+          ageMonth -= 1;
3489
+          // 获取上个月的天数
3490
+          const pastMonthDay = new Date(year,month, 0).getDate();
3491
+          ageDay += pastMonthDay;
3492
+      }
3493
+      if (ageMonth < 0) {
3494
+          ageYear -= 1;
3495
+          ageMonth += 12;
3496
+      }
3497
+
3498
+     return ageYear
3499
+    },
3457
     getDisplaceLiquiPart: function (val) {
3500
     getDisplaceLiquiPart: function (val) {
3458
       let displace_liqui_part_name = "/";
3501
       let displace_liqui_part_name = "/";
3459
       const displace_liqui_part = this.displaceLiquiPartOptions;
3502
       const displace_liqui_part = this.displaceLiquiPartOptions;

+ 21 - 18
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

358
                         </el-form-item>
358
                         </el-form-item>
359
                     </el-col>
359
                     </el-col>
360
 
360
 
361
-                    <el-col :span="8" v-if="isShows('追加肝素量')" >
362
-                       <el-form-item v-if="dialysisPrescription.anticoagulant == 2"
363
-                       :label="'追加肝素量(mg) : '" prop="add_amount" :rules="isCheckmust('追加肝素量')">
364
-                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
365
-                                          v-model="dialysisPrescription.add_amount"></el-input>
366
-                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
367
-                                          v-model="dialysisPrescription.add_amount"></el-input>
368
-                            </el-form-item>
369
-
370
-                            <el-form-item v-if="dialysisPrescription.anticoagulant != 2 && dialysisPrescription.anticoagulant != 1"
371
-                            :label="'追加肝素量(' + anticoagulant.shouji_unit + ') : '" prop="add_amount" :rules="isCheckmust('追加肝素量')">
372
-                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
373
-                                          v-model="dialysisPrescription.add_amount"></el-input>
374
-                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
375
-                                          v-model="dialysisPrescription.add_amount"></el-input>
376
-                            </el-form-item>
377
-                    </el-col>
378
-
361
+                 
379
                   <el-col :span="8" v-if="isShows('减肝素量')">
362
                   <el-col :span="8" v-if="isShows('减肝素量')">
380
                        <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'减肝素量(mg) : '" prop="calculateAnticoagulantZL" :rules="isCheckmust('减肝素量')">
363
                        <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'减肝素量(mg) : '" prop="calculateAnticoagulantZL" :rules="isCheckmust('减肝素量')">
381
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
364
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
500
                     </el-col>
483
                     </el-col>
501
 
484
 
502
 
485
 
486
+                    <el-col :span="8" v-if="isShows('追加肝素量')" >
487
+                       <el-form-item v-if="dialysisPrescription.anticoagulant == 2"
488
+                       :label="'追加肝素量(mg) : '" prop="add_amount" :rules="isCheckmust('追加肝素量')">
489
+                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
490
+                                          v-model="dialysisPrescription.add_amount"></el-input>
491
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
492
+                                          v-model="dialysisPrescription.add_amount"></el-input>
493
+                            </el-form-item>
494
+
495
+                            <el-form-item v-if="dialysisPrescription.anticoagulant != 2 && dialysisPrescription.anticoagulant != 1"
496
+                            :label="'追加肝素量(' + anticoagulant.shouji_unit + ') : '" prop="add_amount" :rules="isCheckmust('追加肝素量')">
497
+                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
498
+                                          v-model="dialysisPrescription.add_amount"></el-input>
499
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
500
+                                          v-model="dialysisPrescription.add_amount"></el-input>
501
+                            </el-form-item>
502
+                    </el-col>
503
+
504
+
505
+
503
                     <el-col :span="8" v-if="anticoagulant!=undefined &&anticoagulant.weichi != -1 && isShows('维持')  && dialysisPrescription.anticoagulant!=1&& dialysisPrescription.anticoagulant!=12">
506
                     <el-col :span="8" v-if="anticoagulant!=undefined &&anticoagulant.weichi != -1 && isShows('维持')  && dialysisPrescription.anticoagulant!=1&& dialysisPrescription.anticoagulant!=12">
504
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157  && this.$store.getters.xt_user.template_info.org_id != 9990 && this.$store.getters.xt_user.template_info.org_id != 9671  && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432 && this.$store.getters.xt_user.template_info.org_id != 9829 && this.$store.getters.xt_user.template_info.org_id != 10440 && this.$store.getters.xt_user.template_info.org_id != 10469 && this.$store.getters.xt_user.template_info.org_id != 10471 && this.$store.getters.xt_user.template_info.org_id != 10495 && this.$store.getters.xt_user.template_info.org_id != 10375 && this.$store.getters.xt_user.template_info.org_id != 10600 && this.$store.getters.xt_user.template_info.org_id != 10702 && this.$store.getters.xt_user.template_info.org_id != 10510 && this.$store.getters.xt_user.template_info.org_id != 10480">
507
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157  && this.$store.getters.xt_user.template_info.org_id != 9990 && this.$store.getters.xt_user.template_info.org_id != 9671  && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432 && this.$store.getters.xt_user.template_info.org_id != 9829 && this.$store.getters.xt_user.template_info.org_id != 10440 && this.$store.getters.xt_user.template_info.org_id != 10469 && this.$store.getters.xt_user.template_info.org_id != 10471 && this.$store.getters.xt_user.template_info.org_id != 10495 && this.$store.getters.xt_user.template_info.org_id != 10375 && this.$store.getters.xt_user.template_info.org_id != 10600 && this.$store.getters.xt_user.template_info.org_id != 10702 && this.$store.getters.xt_user.template_info.org_id != 10510 && this.$store.getters.xt_user.template_info.org_id != 10480">
505
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387 && this.$store.getters.xt_user.template_info.org_id != 10495 && this.$store.getters.xt_user.template_info.org_id != 10375 ">
508
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387 && this.$store.getters.xt_user.template_info.org_id != 10495 && this.$store.getters.xt_user.template_info.org_id != 10375 ">

+ 44 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue View File

48
             年龄:
48
             年龄:
49
             <div class="under_line" style="width: 30px; text-align: center">
49
             <div class="under_line" style="width: 30px; text-align: center">
50
               {{ getAge(patientInfo) }}
50
               {{ getAge(patientInfo) }}
51
+              <!-- {{ calculateAge(patientInfo.id_card_no,xtdate) }} -->
51
             </div>
52
             </div>
52
53
53
           </div>
54
           </div>
1711
             <div class="inline_block" style="margin-left: 10px">
1712
             <div class="inline_block" style="margin-left: 10px">
1712
               年龄:
1713
               年龄:
1713
               <div class="under_line" style="width: 30px; text-align: center">
1714
               <div class="under_line" style="width: 30px; text-align: center">
1715
+                <!-- {{ calculateAge(patientInfo.id_card_no,xtdate) }} -->
1714
                 {{ getAge(patientInfo) }}
1716
                 {{ getAge(patientInfo) }}
1715
               </div>
1717
               </div>
1716
1718
3927
         return age
3929
         return age
3928
       }
3930
       }
3929
     },
3931
     },
3932
+    
3933
+    getTimeOne(val) {
3934
+      return uParseTime(val, "{y}");
3935
+    },
3936
+    getTimeTwo(val) {
3937
+      return uParseTime(val, "{m}");
3938
+    },
3939
+    getTimeThree(val) {
3940
+      return uParseTime(val, "{h}");
3941
+    },
3942
+    calculateAge(idNumber,created_time) {
3943
+    var year = this.getTimeOne(created_time)
3944
+
3945
+    var month = this.getTimeTwo(created_time)
3946
+
3947
+    var day = this.getTimeThree(created_time)
3948
+    console.log("start_time=====",year)
3949
+    // 假设身份证号码是18位,且生日在第7位到第14位
3950
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
3951
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3952
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
3953
+
3954
+    const today = new Date();
3955
+    // console.log("today============",today)
3956
+    var ageYear = year - birthYear;
3957
+    let ageMonth = month - birthMonth; // 月份是从0开始的
3958
+    let ageDay = day - birthDay;
3959
+
3960
+    // 调整月份和日期,以便于正确计算
3961
+      if (ageDay < 0) {
3962
+          ageMonth -= 1;
3963
+          // 获取上个月的天数
3964
+          const pastMonthDay = new Date(year,month, 0).getDate();
3965
+          ageDay += pastMonthDay;
3966
+      }
3967
+      if (ageMonth < 0) {
3968
+          ageYear -= 1;
3969
+          ageMonth += 12;
3970
+      }
3971
+
3972
+     return ageYear
3973
+    },
3930
     newAdviceGroupObject: function () {
3974
     newAdviceGroupObject: function () {
3931
       return Object.assign(
3975
       return Object.assign(
3932
         {},
3976
         {},

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

916
             }
916
             }
917
           }
917
           }
918
 
918
 
919
-          if(this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10278 || this.$store.getters.xt_user.org_id == 10610 ||  this.$store.getters.xt_user.org_id == 10537  ||  this.$store.getters.xt_user.org_id == 10480 ) {
919
+          if(this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10278 || this.$store.getters.xt_user.org_id == 10610 ||  this.$store.getters.xt_user.org_id == 10537  ||  this.$store.getters.xt_user.org_id == 10480 ) {
920
             for (let i = 0; i < array.length; i++) {
920
             for (let i = 0; i < array.length; i++) {
921
               if (array[i].drug_code.length == 0) {
921
               if (array[i].drug_code.length == 0) {
922
                 this.$message.error(array[i].drug_name + " 药品溯源码不能为空");
922
                 this.$message.error(array[i].drug_name + " 药品溯源码不能为空");

+ 3 - 6
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

294
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
294
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
295
                }else if(this.org_id == 0 || this.org_id == 10644){
295
                }else if(this.org_id == 0 || this.org_id == 10644){
296
                  list[i].stock_in_price = "/"
296
                  list[i].stock_in_price = "/"
297
-                list[i].stockMoney = (this.getAllStockInPrice(list[i].StWarehousingInfoTwo) + this.getAllStockInFlowPrice(list[i].WareStartInStockFlow) - this.getAllOutStockInPrice(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlowPrice(list[i].WareStartOutStockFlow)).toFixed(2)
297
+                list[i].stockMoney = this.getAllStockInPrice(list[i].StWarehousingInfoTwo) + this.getAllStockInFlowPrice(list[i].WareStartInStockFlow) - this.getAllOutStockInPrice(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlowPrice(list[i].WareStartOutStockFlow)
298
                 
298
                 
299
                }else{
299
                }else{
300
                 list[i].stock_in_price = "/"
300
                 list[i].stock_in_price = "/"
310
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
310
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
311
               }else if(this.org_id == 0 || this.org_id == 10644){
311
               }else if(this.org_id == 0 || this.org_id == 10644){
312
                 list[i].addStockMoney = "/"
312
                 list[i].addStockMoney = "/"
313
-                list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
313
+                list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
314
               } else{
314
               } else{
315
                list[i].addStockMoney = "/"
315
                list[i].addStockMoney = "/"
316
                list[i].saleStockMoney = "/"
316
                list[i].saleStockMoney = "/"
338
               if(this.org_id == 10265){
338
               if(this.org_id == 10265){
339
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
339
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
340
               }else{
340
               }else{
341
-                // console.log("期初",list[i].stockIn)
342
-                // console.log("增加",list[i].stockAdd)
343
-                // console.log("出库",list[i].outStock)
344
                 if((list[i].stockIn + list[i].stockAdd - list[i].outStock)>0 ){
341
                 if((list[i].stockIn + list[i].stockAdd - list[i].outStock)>0 ){
345
                   list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
342
                   list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
346
                 }else{
343
                 }else{
760
     all_count_price = count_price + count_one_price
757
     all_count_price = count_price + count_one_price
761
 
758
 
762
     if(all_count_price > 0 ){
759
     if(all_count_price > 0 ){
763
-      return all_count_price
760
+      return all_count_price.toFixed(2)
764
     }else{
761
     }else{
765
       return 0
762
       return 0
766
     }
763
     }

+ 14 - 8
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue View File

189
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
189
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
190
                     }else if(this.org_id == 0 || this.org_id == 10644){
190
                     }else if(this.org_id == 0 || this.org_id == 10644){
191
                       list[i].stock_in_price = "/"
191
                       list[i].stock_in_price = "/"
192
-                      list[i].stockMoney = (this.getAllStockInPrice(list[i].StWarehousingInfoTwo) + this.getAllStockInFlowPrice(list[i].WareStartInStockFlow) - this.getAllOutStockInPrice(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlowPrice(list[i].WareStartOutStockFlow)).toFixed(2)
192
+                      list[i].stockMoney = (this.getAllStockInPrice(list[i].StWarehousingInfoTwo) + this.getAllStockInFlowPrice(list[i].WareStartInStockFlow) - this.getAllOutStockInPrice(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlowPrice(list[i].WareStartOutStockFlow))
193
                     } else{
193
                     } else{
194
                       list[i].stock_in_price = "/"
194
                       list[i].stock_in_price = "/"
195
                       list[i].stockMoney = "/"
195
                       list[i].stockMoney = "/"
203
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
203
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
204
                     }else if(this.org_id == 0 || this.org_id == 10644){
204
                     }else if(this.org_id == 0 || this.org_id == 10644){
205
                       list[i].addStockMoney = "/"
205
                       list[i].addStockMoney = "/"
206
-                      list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
206
+                      list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
207
                      
207
                      
208
                     }else{
208
                     }else{
209
                         list[i].addStockMoney = "/"
209
                         list[i].addStockMoney = "/"
218
                       list[i].stockOutprice = list[i].packing_price
218
                       list[i].stockOutprice = list[i].packing_price
219
                       list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
219
                       list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
220
                     }else if(this.org_id == 0 || this.org_id == 10644){
220
                     }else if(this.org_id == 0 || this.org_id == 10644){
221
-                      list[i].addStockMoney = "/"
222
-                      list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
221
+                      list[i].stockOutprice = "/"
222
+                      list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
223
+                      if(list[i].saleOutMoney == "NaN"){
224
+                        list[i].saleOutMoney = ""
225
+                      }
223
                       
226
                       
224
                     }else{
227
                     }else{
225
                       list[i].stockOutprice = "/"
228
                       list[i].stockOutprice = "/"
236
                       list[i].overPrice = list[i].packing_price
239
                       list[i].overPrice = list[i].packing_price
237
                       list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
240
                       list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
238
                      }else if(this.org_id == 0 || this.org_id == 10644){
241
                      }else if(this.org_id == 0 || this.org_id == 10644){
239
-                      list[i].stockOutprice = "/"
240
-                      list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
241
-                      if(list[i].saleOutMoney == "NaN"){
242
-                        list[i].saleOutMoney = ""
242
+                      list[i].overPrice = "/"
243
+                      console.log("stockMoney-00000000000000",list[i].stockMoney)
244
+                      console.log("saleStockMoney-00000000000000",list[i].saleStockMoney)
245
+                      console.log("saleOutMoney-00000000000000",list[i].saleOutMoney)
246
+                      list[i].overMoney = (parseFloat(list[i].stockMoney)  + parseFloat(list[i].saleStockMoney) - parseFloat(list[i].saleOutMoney)).toFixed(2)
247
+                      if(list[i].overMoney == "NaN"){
248
+                        list[i].overMoney = ""
243
                       }
249
                       }
244
                      }else{
250
                      }else{
245
                         list[i].overPrice = "/"
251
                         list[i].overPrice = "/"

+ 1 - 1
src/xt_pages/user/components/PatientSidebar.vue View File

169
             // },
169
             // },
170
             {
170
             {
171
               name: '3-4',
171
               name: '3-4',
172
-              label: '病史'
172
+              label: '病史'
173
             },
173
             },
174
             {
174
             {
175
               name: '3-2',
175
               name: '3-2',

File diff suppressed because it is too large
+ 635 - 619
src/xt_pages/user/components/PatientSidebar_ord.vue


+ 6 - 1
src/xt_pages/user/sickHistory_new.vue View File

471
     },
471
     },
472
     template_dele(){
472
     template_dele(){
473
       console.log("hahhahahah",this.template_id)
473
       console.log("hahhahahah",this.template_id)
474
+      if(this.template_id == 0){
475
+          this.$message.error("默认模版不能删除!")
476
+          return false
477
+      }
474
      deleteSickHistoryTempalte(this.template_id).then(response=>{
478
      deleteSickHistoryTempalte(this.template_id).then(response=>{
475
         if(response.data.state == 1){
479
         if(response.data.state == 1){
476
           var msg =  response.data.data.msg
480
           var msg =  response.data.data.msg
988
 
992
 
989
     },
993
     },
990
     getCurrentChangeOne(val){
994
     getCurrentChangeOne(val){
991
-      console.log("val-------------------",val.id)
995
+     
996
+     
992
       this.$refs.editorOne.contents = val.content
997
       this.$refs.editorOne.contents = val.content
993
       this.template_content = ""
998
       this.template_content = ""
994
       this.template_content = val.content
999
       this.template_content = val.content