瀏覽代碼

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 3 週之前
父節點
當前提交
9d98f875b2

+ 44 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyeight.vue 查看文件

@@ -2033,7 +2033,8 @@
2033 2033
                 年龄:
2034 2034
                 <div class="under_line" style="width: 30px; text-align: center">
2035 2035
                   <!-- {{ record.patient.age }} -->
2036
-                  {{ getAge(record.patient) }}
2036
+                  <!-- {{ getAge(record.patient) }} -->
2037
+                  {{ calculateAge(record.patient.id_card_no,record.schedule_date) }}
2037 2038
                 </div>
2038 2039
2039 2040
               </div>
@@ -3454,6 +3455,48 @@ export default {
3454 3455
       });
3455 3456
   },
3456 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 3500
     getDisplaceLiquiPart: function (val) {
3458 3501
       let displace_liqui_part_name = "/";
3459 3502
       const displace_liqui_part = this.displaceLiquiPartOptions;

+ 21 - 18
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -358,24 +358,7 @@
358 358
                         </el-form-item>
359 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 362
                   <el-col :span="8" v-if="isShows('减肝素量')">
380 363
                        <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'减肝素量(mg) : '" prop="calculateAnticoagulantZL" :rules="isCheckmust('减肝素量')">
381 364
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
@@ -500,6 +483,26 @@
500 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 506
                     <el-col :span="8" v-if="anticoagulant!=undefined &&anticoagulant.weichi != -1 && isShows('维持')  && dialysisPrescription.anticoagulant!=1&& dialysisPrescription.anticoagulant!=12">
504 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 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 查看文件

@@ -48,6 +48,7 @@
48 48
             年龄:
49 49
             <div class="under_line" style="width: 30px; text-align: center">
50 50
               {{ getAge(patientInfo) }}
51
+              <!-- {{ calculateAge(patientInfo.id_card_no,xtdate) }} -->
51 52
             </div>
52 53
53 54
           </div>
@@ -1711,6 +1712,7 @@
1711 1712
             <div class="inline_block" style="margin-left: 10px">
1712 1713
               年龄:
1713 1714
               <div class="under_line" style="width: 30px; text-align: center">
1715
+                <!-- {{ calculateAge(patientInfo.id_card_no,xtdate) }} -->
1714 1716
                 {{ getAge(patientInfo) }}
1715 1717
               </div>
1716 1718
@@ -3927,6 +3929,48 @@ export default {
3927 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 3974
     newAdviceGroupObject: function () {
3931 3975
       return Object.assign(
3932 3976
         {},

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue 查看文件

@@ -916,7 +916,7 @@ export default {
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 920
             for (let i = 0; i < array.length; i++) {
921 921
               if (array[i].drug_code.length == 0) {
922 922
                 this.$message.error(array[i].drug_name + " 药品溯源码不能为空");

+ 3 - 6
src/xt_pages/stock/query/purchaseNewStockQuery.vue 查看文件

@@ -294,7 +294,7 @@ export default {
294 294
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
295 295
                }else if(this.org_id == 0 || this.org_id == 10644){
296 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 299
                }else{
300 300
                 list[i].stock_in_price = "/"
@@ -310,7 +310,7 @@ export default {
310 310
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
311 311
               }else if(this.org_id == 0 || this.org_id == 10644){
312 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 314
               } else{
315 315
                list[i].addStockMoney = "/"
316 316
                list[i].saleStockMoney = "/"
@@ -338,9 +338,6 @@ export default {
338 338
               if(this.org_id == 10265){
339 339
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
340 340
               }else{
341
-                // console.log("期初",list[i].stockIn)
342
-                // console.log("增加",list[i].stockAdd)
343
-                // console.log("出库",list[i].outStock)
344 341
                 if((list[i].stockIn + list[i].stockAdd - list[i].outStock)>0 ){
345 342
                   list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
346 343
                 }else{
@@ -760,7 +757,7 @@ export default {
760 757
     all_count_price = count_price + count_one_price
761 758
 
762 759
     if(all_count_price > 0 ){
763
-      return all_count_price
760
+      return all_count_price.toFixed(2)
764 761
     }else{
765 762
       return 0
766 763
     }

+ 14 - 8
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue 查看文件

@@ -189,7 +189,7 @@ export default {
189 189
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
190 190
                     }else if(this.org_id == 0 || this.org_id == 10644){
191 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 193
                     } else{
194 194
                       list[i].stock_in_price = "/"
195 195
                       list[i].stockMoney = "/"
@@ -203,7 +203,7 @@ export default {
203 203
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
204 204
                     }else if(this.org_id == 0 || this.org_id == 10644){
205 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 208
                     }else{
209 209
                         list[i].addStockMoney = "/"
@@ -218,8 +218,11 @@ export default {
218 218
                       list[i].stockOutprice = list[i].packing_price
219 219
                       list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
220 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 227
                     }else{
225 228
                       list[i].stockOutprice = "/"
@@ -236,10 +239,13 @@ export default {
236 239
                       list[i].overPrice = list[i].packing_price
237 240
                       list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
238 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 250
                      }else{
245 251
                         list[i].overPrice = "/"

+ 1 - 1
src/xt_pages/user/components/PatientSidebar.vue 查看文件

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

文件差異過大導致無法顯示
+ 635 - 619
src/xt_pages/user/components/PatientSidebar_ord.vue


+ 6 - 1
src/xt_pages/user/sickHistory_new.vue 查看文件

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