Browse Source

hah阿凡达

28169 4 months ago
parent
commit
aa9b4b9ab7

+ 2 - 0
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue View File

@@ -1090,6 +1090,8 @@ export default {
1090 1090
 
1091 1091
    },
1092 1092
    drugAddInfoOnePirce(arr,min_number,min_unit,max_unit,arr2){
1093
+    console.log("arr----------------",arr)
1094
+    console.log("newArr----------------",arr2)
1093 1095
     var total = 0
1094 1096
     var totalone_price = 0
1095 1097
     var total_two_price = 0

+ 65 - 9
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue View File

@@ -217,6 +217,10 @@ export default {
217 217
   },
218 218
   methods:{
219 219
     GetInitStartFlowPice(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
220
+      console.log("val1==---------------",val1)
221
+      console.log("val2-----",val2)
222
+      console.log("val3++++++",val3)
223
+      console.log("val4++++++",val4)
220 224
       var total_one_price =0
221 225
       var total_two_price = 0
222 226
       var total_three_price =0
@@ -226,13 +230,16 @@ export default {
226 230
    
227 231
       if(val1!=null && val1.length>0){
228 232
          for(let i=0;i<val1.length;i++){
229
-          total_one_price +=val1[i].count*val1[i].price
233
+          console.log("min_number",val1[i].count/min_number)
234
+          console.log("price22222",val1[i].price)
235
+          total_one_price +=val1[i].count/min_number*val1[i].price
230 236
          }
231 237
       }  
232 238
 
233 239
       if(val2!=null && val2.length>0){
234 240
          for(let i=0;i<val2.length;i++){
235
-          total_two_price +=val2[i].count*val2[i].price
241
+         
242
+          total_two_price +=val2[i].count/min_number*val2[i].price
236 243
          }
237 244
       }  
238 245
     
@@ -253,30 +260,56 @@ export default {
253 260
           total_five_price +=val5[i].count*val5[i].price
254 261
          }
255 262
       }  
263
+      if(total_one_price == ""){
264
+        total_one_price = 0
265
+      }
266
+      if(total_two_price == ""){
267
+        total_two_price = 0
268
+      }
269
+      if(total_three_price == ""){
270
+        total_three_price = 0
271
+      }
272
+      if(total_four_price == ""){
273
+        total_four_price = 0
274
+      }
275
+      if(total_five_price == ""){
276
+        total_five_price = 0
277
+      }
278
+      console.log("total_one_price----",total_one_price)
279
+      console.log("total_two_price----",total_two_price)
280
+      console.log("total_three_price----",total_three_price)
281
+      console.log("total_four_price----",total_four_price)
282
+      console.log("total_five_price----",total_five_price)
256 283
      
257
-      var total = (total_one_price + total_two_price -total_three_price-total_four_price + total_five_price).toFixed(2)
284
+      var total = total_one_price + total_two_price -total_three_price-total_four_price + total_five_price
258 285
       if(total >0){
259
-        return ""
286
+        return total.toFixed(2)
260 287
       }else{
261 288
         return total
262 289
       }
263 290
        
264 291
     },
265 292
     drugAddInfoOnePirce(arr,min_number,min_unit,max_unit,arr2){
266
-      
293
+        
267 294
         var total = 0
268 295
         var totalone_price = 0
269 296
         var total_two_price = 0
270 297
         if(arr!=null && arr.length > 0){
271 298
           for(let i=0;i<arr.length;i++){
272
-            totalone_price += arr[i].count * arr[i].price
299
+            totalone_price += arr[i].count/min_number * arr[i].price
273 300
           }
274 301
         }
275 302
         if(arr2!=null && arr2.length >0){
276 303
           for(let i=0;i<arr2.length;i++){ 
277
-            total_two_price += arr2[i].count * arr2[i].price
304
+            total_two_price += arr2[i].count/min_number * arr2[i].price
278 305
           }
279 306
         }
307
+        if(totalone_price== ""){
308
+           totalone_price = 0
309
+        }
310
+        if(total_two_price== ""){
311
+           total_two_price = 0
312
+        }
280 313
         total = totalone_price + total_two_price
281 314
 
282 315
         if(total>0){
@@ -307,6 +340,15 @@ export default {
307 340
         total_three_price +=arr3[i].count * arr3[i].price
308 341
       }
309 342
     }
343
+    if(totalone_price==""){
344
+      totalone_price=0
345
+    }
346
+    if(total_two_price == ""){
347
+      total_two_price =0
348
+    }
349
+    if(total_three_price == ""){
350
+      total_three_price =0
351
+    }
310 352
  
311 353
     total = (totalone_price + total_two_price - total_three_price).toFixed(2)
312 354
     if(total >0){
@@ -317,8 +359,22 @@ export default {
317 359
     
318 360
    },
319 361
    GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
320
-
321
-   
362
+    
363
+     if(totalone == ""){
364
+        totalone =0
365
+     }
366
+     if(totaltwo == ""){
367
+       totaltwo =0
368
+     }
369
+     if(totalone == ""){
370
+        totalone =0
371
+     }
372
+     if(totalthree == ""){
373
+      totalthree =0
374
+     }
375
+     console.log("totalone=========",totalone)
376
+     console.log("totalone=========",totaltwo)
377
+     console.log("totalone=========",totalthree)
322 378
      var total = 0
323 379
       total = (parseFloat(totalone)  + parseFloat(totaltwo)  - parseFloat(totalthree))
324 380
       console.log("total-=---------------",total)

+ 50 - 8
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue View File

@@ -1498,13 +1498,13 @@ export default {
1498 1498
    
1499 1499
       if(val1!=null && val1.length>0){
1500 1500
          for(let i=0;i<val1.length;i++){
1501
-          total_one_price +=val1[i].count*val1[i].price
1501
+          total_one_price +=val1[i].count/min_number*val1[i].price
1502 1502
          }
1503 1503
       }  
1504 1504
 
1505 1505
       if(val2!=null && val2.length>0){
1506 1506
          for(let i=0;i<val2.length;i++){
1507
-          total_two_price +=val2[i].count*val2[i].price
1507
+          total_two_price +=val2[i].count/min_number*val2[i].price
1508 1508
          }
1509 1509
       }  
1510 1510
     
@@ -1526,6 +1526,22 @@ export default {
1526 1526
          }
1527 1527
       }  
1528 1528
      
1529
+      if(total_one_price == ""){
1530
+        total_one_price = 0
1531
+      }
1532
+      if(total_two_price == ""){
1533
+        total_two_price = 0
1534
+      }
1535
+      if(total_three_price == ""){
1536
+        total_three_price = 0
1537
+      }
1538
+      if(total_four_price == ""){
1539
+        total_four_price = 0
1540
+      }
1541
+      if(total_five_price == ""){
1542
+        total_five_price = 0
1543
+      }
1544
+
1529 1545
       var total = (total_one_price + total_two_price -total_three_price-total_four_price + total_five_price)
1530 1546
        
1531 1547
       if(total >0){
@@ -1542,13 +1558,19 @@ export default {
1542 1558
       var total_two_price = 0
1543 1559
       if(arr!=null && arr.length > 0){
1544 1560
         for(let i=0;i<arr.length;i++){
1545
-          totalone_price += arr[i].count * arr[i].price
1561
+          totalone_price += arr[i].count/min_number * arr[i].price
1546 1562
         }
1547 1563
       }
1548 1564
       if(arr2!=null && arr2.length >0){
1549 1565
         for(let i=0;i<arr2.length;i++){ 
1550
-          total_two_price += arr2[i].count * arr2[i].price
1566
+          total_two_price += arr2[i].count/min_number * arr2[i].price
1567
+        }
1568
+      }
1569
+      if(totalone_price== ""){
1570
+           totalone_price = 0
1551 1571
         }
1572
+      if(total_two_price== ""){
1573
+          total_two_price = 0
1552 1574
       }
1553 1575
       total = totalone_price + total_two_price
1554 1576
 
@@ -1580,6 +1602,16 @@ export default {
1580 1602
           total_three_price +=arr3[i].count * arr3[i].price
1581 1603
         }
1582 1604
       }
1605
+      if(totalone_price==""){
1606
+        totalone_price=0
1607
+      }
1608
+      if(total_two_price == ""){
1609
+        total_two_price =0
1610
+      }
1611
+      if(total_three_price == ""){
1612
+        total_three_price =0
1613
+      }
1614
+ 
1583 1615
   
1584 1616
       total = (totalone_price + total_two_price - total_three_price)
1585 1617
       if(total >0){
@@ -1590,13 +1622,23 @@ export default {
1590 1622
     
1591 1623
    },
1592 1624
    GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1593
-      console.log("totalone----------------",totalone)
1594
-      console.log("totaltwo----------------",totalone)
1595
-      console.log("totalthree----------------",totalthree)
1625
+      if(totalone == ""){
1626
+          totalone =0
1627
+      }
1628
+      if(totaltwo == ""){
1629
+        totaltwo =0
1630
+      }
1631
+      if(totalone == ""){
1632
+          totalone =0
1633
+      }
1634
+      if(totalthree == ""){
1635
+        totalthree =0
1636
+      }
1637
+     
1596 1638
       var total = 0
1597 1639
       total = totalone  + totaltwo  - totalthree
1598 1640
       if(total >0 || total!="NaN"){
1599
-        console.log("haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
1641
+       
1600 1642
         return total.toFixed(2)
1601 1643
       }else{
1602 1644
         return ""

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

@@ -179,10 +179,10 @@ export default {
179 179
             //   name: '3-3',
180 180
             //   label: '体格检查新'
181 181
             // },
182
-            // {
183
-            //   name: '3-5',
184
-            //   label: '病程记录新'
185
-            // },
182
+            {
183
+              name: '3-5',
184
+              label: '病程记录新'
185
+            },
186 186
             {
187 187
               name: '1-11',
188 188
               label: '首次病程记录'

+ 6 - 3
src/xt_pages/user/courseOfDisease_new.vue View File

@@ -248,7 +248,7 @@
248 248
           <div v-show="AuToShow">
249 249
             <text_content @new_content="newcontent" :patient="patient" :prescription="prescription" :berforList="berforList" 
250 250
             :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList" 
251
-            :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice" :groupPrescriptionList="groupPrescriptionList"></text_content>
251
+            :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice" :groupPrescriptionList="groupPrescriptionList" :afterList="afterList"></text_content>
252 252
           </div>
253 253
         </div>
254 254
 
@@ -350,7 +350,8 @@
350 350
         AuToShow:false,
351 351
         num:"",
352 352
         longAdvice:[],
353
-        groupPrescriptionList:[]
353
+        groupPrescriptionList:[],
354
+        afterList:[]
354 355
       }
355 356
     },
356 357
     created() {
@@ -826,8 +827,10 @@
826 827
            this.longAdvice = []
827 828
            this.longAdvice = longAdvice
828 829
 
830
+           this.groupPrescriptionList = []
829 831
            this.groupPrescriptionList = response.data.data.groupPrescriptionList
830
-
832
+        
833
+           this.afterList = response.data.data.after
831 834
            this.auto_dialog  =  true
832 835
 
833 836
             

+ 169 - 17
src/xt_pages/user/text_content.vue View File

@@ -46,6 +46,9 @@ export default{
46 46
     },
47 47
     groupPrescriptionList:{
48 48
       type:Array
49
+    },
50
+    afterList:{
51
+      type:Array
49 52
     }
50 53
    },
51 54
   data(){
@@ -77,6 +80,8 @@ export default{
77 80
      console.log("patinet==========================",this.patient)
78 81
      console.log("longAdvice-----------------------",this.longAdvice)
79 82
      console.log("除非==========================",this.prescription)
83
+     console.log("berforList---------------------",this.berforList)
84
+     console.log("afterList---------------------",this.afterList)
80 85
       var hd_total =0
81 86
       var hdArr =[]
82 87
       var hdf_total =0
@@ -643,25 +648,50 @@ export default{
643 648
           dialysisIrrigationStr =  JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
644 649
   
645 650
 
646
-    //  医嘱
647
-    if(this.longAdvice!=null && this.longAdvice.length>0){
648
-        for(let i=0;i<this.longAdvice.length;i++){
649
-            this.longAdvice[i].advice_type_name = ""
650
-            if(this.longAdvice[i].advice_type == 1){
651
-              this.longAdvice[i].advice_type_name = "长期医嘱"
651
+        //  医嘱
652
+        if(this.longAdvice!=null && this.longAdvice.length>0){
653
+            for(let i=0;i<this.longAdvice.length;i++){
654
+                this.longAdvice[i].advice_type_name = ""
655
+                if(this.longAdvice[i].advice_type == 1){
656
+                  this.longAdvice[i].advice_type_name = "长期医嘱"
657
+                }
658
+                if(this.longAdvice[i].stop_state == 1){
659
+                  this.longAdvice[i].stop_state_name = "停用"
660
+                }
661
+                if(this.longAdvice[i].stop_state == 2){
662
+                  this.longAdvice[i].stop_state_name = "未停用"
663
+                }
652 664
             }
653
-            if(this.longAdvice[i].stop_state == 1){
654
-              this.longAdvice[i].stop_state_name = "停用"
655
-            }
656
-            if(this.longAdvice[i].stop_state == 2){
657
-              this.longAdvice[i].stop_state_name = "未停用"
665
+        }
666
+
667
+        //抗凝剂
668
+
669
+        var anticoagulant_str =""
670
+        if(this.groupPrescriptionList!=null && this.groupPrescriptionList.length>0){
671
+           
672
+            for(let i=0;i<this.groupPrescriptionList.length;i++){
673
+               anticoagulant_str += this.getAnticoagulantName(this.groupPrescriptionList[i].anticoagulant) +"," + "剂量:" +this.groupPrescriptionList[i].MinZongLiang +this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)+ "~" +this.groupPrescriptionList[i].MaxZongLiang + this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)
658 674
             }
659 675
         }
660
-    }
676
+
677
+        //透前
678
+        var befor_total =0
679
+        var cha_weight = 0
680
+        var pingjun_weight = 0
681
+        if(this.berforList!=null){
682
+          befor_total = this.berforList.length
683
+          for(let i=0;i<this.berforList.length;i++){
684
+             cha_weight += this.berforList[i].weight_before - this.berforList[i].WeightAfter
685
+          }
686
+        }
687
+        
688
+        pingjun_weight = (cha_weight/befor_total).toFixed(2)
689
+
690
+
661 691
 
662 692
 
663 693
      
664
-     const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
694
+       const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
665 695
               <tr>
666 696
                 <th colspan="2" style="padding: 5px;">透析阶段小结(${this.start_date}~${this.end_date})</th>
667 697
               </tr>
@@ -689,13 +719,13 @@ export default{
689 719
                   </p>
690 720
                   
691 721
                   <p style='font-weight: bold;'>抗凝方式:</p>
692
-                  <p >低分子肝素,剂量:3500.00~3500.00IU;</p>
722
+                  <p >${anticoagulant_str}</p>
693 723
                 </td>
694 724
               </tr>
695 725
               <tr>
696 726
                 <td style="align-items: center;padding: 5px;">透析情况</td>
697 727
                 <td style='padding:5px'>
698
-                  <p>透析间期平均体重增加:2.90kg;</p>
728
+                  <p>透析间期平均体重增加:${pingjun_weight}kg;</p>
699 729
                   <p>凝血:透析器-0度(1次);</p>
700 730
                   <p>平均血流量:250.00mL/min;最大血流量:250mL/min;</p>
701 731
                   <p>平均超滤量:2900.00ml/次;平均超滤率:9.84mL/kg/h;</p>
@@ -771,8 +801,8 @@ export default{
771 801
                 </td>
772 802
               </tr>
773 803
             </table>`
774
-            // this.text = contents
775
-            this.content = contents
804
+
805
+        this.content = contents
776 806
   },
777 807
   mounted(){
778 808
     this.$nextTick(() =>{
@@ -910,6 +940,128 @@ export default{
910 940
     getTime (time) {
911 941
       return uParseTime(time, '{y}-{m}-{d}')
912 942
      },
943
+     getAnticoagulantName(val){
944
+       var anticoagulant_name = ""
945
+       if(val == 1){
946
+          anticoagulant_name = "无肝素"
947
+       }
948
+       if(val == 2){
949
+          anticoagulant_name = "普通肝素"
950
+       }
951
+       if(val == 3){
952
+          anticoagulant_name = "低分子肝素"
953
+       }
954
+       if(val == 4){
955
+          anticoagulant_name = "阿加曲班"
956
+       }
957
+       if(val == 5){
958
+          anticoagulant_name = "枸橼酸钠"
959
+       }
960
+       if(val == 6){
961
+          anticoagulant_name = "低分子肝素钙"
962
+       }
963
+       if(val == 7){
964
+          anticoagulant_name = "低分子肝素钠"
965
+       }
966
+       if(val == 8){
967
+          anticoagulant_name = "依诺肝素"
968
+       }
969
+       if(val == 9){
970
+          anticoagulant_name = "达肝素"
971
+       }
972
+       if(val == 10){
973
+          anticoagulant_name = "体外抗凝"
974
+       }
975
+       if(val == 11){
976
+          anticoagulant_name = "那屈肝素"
977
+       }
978
+       if(val == 12){
979
+          anticoagulant_name = "无抗凝剂"
980
+       }
981
+       if(val == 13){
982
+          anticoagulant_name = "那屈肝素钙"
983
+       }
984
+       if(val == 14){
985
+          anticoagulant_name = "肝素钙注射液"
986
+       }
987
+       if(val == 15){
988
+          anticoagulant_name = "甲磺酸萘莫司他"
989
+       }
990
+       if(val == 16){
991
+          anticoagulant_name = "低分子量肝素钙"
992
+       }
993
+       if(val == 17){
994
+          anticoagulant_name = "肝素钠"
995
+       }
996
+       if(val == 18){
997
+          anticoagulant_name = "贝米肝素钠注射液"
998
+       }
999
+       if(val == 19){
1000
+          anticoagulant_name = "低分子量肝素钠"
1001
+       }
1002
+       return anticoagulant_name
1003
+     },
1004
+     getAnticoagulantUnit(val){
1005
+      var anticoagulant_name = ""
1006
+       if(val == 1){
1007
+          anticoagulant_name = "mg"
1008
+       }
1009
+       if(val == 2){
1010
+          anticoagulant_name = "IU"
1011
+       }
1012
+       if(val == 3){
1013
+          anticoagulant_name = "IU"
1014
+       }
1015
+       if(val == 4){
1016
+          anticoagulant_name = "mg"
1017
+       }
1018
+       if(val == 5){
1019
+          anticoagulant_name = "ml/h"
1020
+       }
1021
+       if(val == 6){
1022
+          anticoagulant_name = "IU"
1023
+       }
1024
+       if(val == 7){
1025
+          anticoagulant_name = "IU"
1026
+       }
1027
+       if(val == 8){
1028
+          anticoagulant_name = "IU/h"
1029
+       }
1030
+       if(val == 9){
1031
+          anticoagulant_name = "IU/h"
1032
+       }
1033
+       if(val == 10){
1034
+          anticoagulant_name = "mg/h"
1035
+       }
1036
+       if(val == 11){
1037
+          anticoagulant_name = "mg/h"
1038
+       }
1039
+       if(val == 12){
1040
+          anticoagulant_name = "mg/h"
1041
+       }
1042
+       if(val == 13){
1043
+          anticoagulant_name = "mg/h"
1044
+       }
1045
+       if(val == 14){
1046
+          anticoagulant_name = "iu/h"
1047
+       }
1048
+       if(val == 15){
1049
+          anticoagulant_name = "mg/h"
1050
+       }
1051
+       if(val == 16){
1052
+          anticoagulant_name = "iu/h"
1053
+       }
1054
+       if(val == 17){
1055
+          anticoagulant_name = "mg/h"
1056
+       }
1057
+       if(val == 18){
1058
+          anticoagulant_name = "iu/h"
1059
+       }
1060
+       if(val == 19){
1061
+          anticoagulant_name = "iu/h"
1062
+       }
1063
+       return anticoagulant_name
1064
+     }
913 1065
   }
914 1066
   
915 1067
 }