28169 4 месяцев назад
Родитель
Сommit
e4795b2a03

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Просмотреть файл

@@ -1763,7 +1763,7 @@
1763 1763
                             "
1764 1764
                             width="50"
1765 1765
                           >
1766
-                          <span v-if="org_id!=10683">置换量</span>
1766
+                          <span v-if="org_id!=10683">置换量(L)</span>
1767 1767
                           <span v-if="org_id==10683">置换液速度</span>
1768 1768
                             <br />
1769 1769
                             <span v-if="org_id!=10598 && org_id!=10567 && org_id!=10724 && org_id!=10644">

+ 5 - 2
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Просмотреть файл

@@ -1221,7 +1221,10 @@ export default {
1221 1221
               ParamsQuery['mode'] = '3'
1222 1222
             }
1223 1223
           }
1224
-
1224
+          
1225
+          if(this.form.machine_run == 0){
1226
+            this.form.machine_run = ""
1227
+          }
1225 1228
           const data = {}
1226 1229
           data['weight_after'] = this.form.weight_after ? parseFloat(this.form.weight_after) : 0
1227 1230
           data['weight_loss'] = this.form.weight_loss ? parseFloat(this.form.weight_loss) : 0
@@ -1291,7 +1294,7 @@ export default {
1291 1294
           data["lapse"] = this.form.lapse
1292 1295
           data["consciousness"] = this.form.consciousness
1293 1296
           data["fallrisk"] = this.form.fallrisk
1294
-          data["machine_run"] = this.form.machine_run
1297
+          data["machine_run"] = this.form.machine_run?this.form.machine_run:""
1295 1298
           data["after_urea"] = this.form.after_urea
1296 1299
           data["pip_coagulation"] = this.form.pip_coagulation
1297 1300
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume

+ 8 - 0
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Просмотреть файл

@@ -3023,6 +3023,14 @@ mu
3023 3023
             } else if (schedual.schedule_type == 3) {
3024 3024
               this.start_time = year + '-' + month + '-' + day + ' ' + '15:00'
3025 3025
             }
3026
+           }else if(this.$store.getters.xt_user.org.id == 10735){
3027
+              if (schedual.schedule_type == 1) {
3028
+              this.start_time = year + '-' + month + '-' + day + ' ' + '6:30'
3029
+            } else if (schedual.schedule_type == 2) {
3030
+              this.start_time = year + '-' + month + '-' + day + ' ' + '11:00'
3031
+            } else if (schedual.schedule_type == 3) {
3032
+              this.start_time = year + '-' + month + '-' + day + ' ' + '15:00'
3033
+            }
3026 3034
            }else if(this.$store.getters.xt_user.org.id == 10353){
3027 3035
               if (schedual.schedule_type == 1) {
3028 3036
               this.start_time = year + '-' + month + '-' + day + ' ' + '7:00'

+ 2 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Просмотреть файл

@@ -2889,7 +2889,7 @@ export default {
2889 2889
         this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
2890 2890
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume: "";
2891 2891
         // 静脉压
2892
-        if (this.org_id == 10060 || this.org_id == 10387) {
2892
+        if (this.org_id == 10060 || this.org_id == 10387 || this.org_id ==10735) {
2893 2893
           this.form.venous_pressure = resp.monitor.venous_pressure;
2894 2894
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10469 || this.org_id == 10471 ){
2895 2895
           this.form.venous_pressure = 80
@@ -2913,7 +2913,7 @@ export default {
2913 2913
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type
2914 2914
           ? resp.monitor.arterial_pressure_type
2915 2915
           : 1;
2916
-        if (this.org_id == 10060  || this.org_id == 10387) {
2916
+        if (this.org_id == 10060  || this.org_id == 10387 || this.org_id == 10735) {
2917 2917
           this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
2918 2918
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340){
2919 2919
           this.form.transmembrane_pressure = 60

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Просмотреть файл

@@ -1853,11 +1853,11 @@
1853 1853
                           <span v-if="org_id == 10683">置换液速度</span>
1854 1854
                           <span v-if="org_id!=10683">置换量</span>
1855 1855
                           <br />
1856
-                          <span v-if="org_id!=10598 && org_id!=10567 && org_id!=10724 && org_id!=10644">
1856
+                          <span v-if="org_id!=10598 && org_id!=10567 && org_id!=10724 && org_id!=10644 && org_id!=10353">
1857 1857
                             <span v-if="org_id!=0&&org_id!=10683">(ml)</span>
1858 1858
                             <span v-if="org_id==10683">(ml/h)</span>
1859 1859
                           </span>
1860
-                          <span v-if="org_id==10598 || org_id == 10567 || org_id == 10724 || org_id == 10644">(L)</span>
1860
+                          <span v-if="org_id==10598 || org_id == 10567 || org_id == 10724 || org_id == 10644 || org_id== 10353">(L)</span>
1861 1861
                         </td>
1862 1862
                         <td width="50" v-if="org_id == 3877 || org_id == 10449">滤前压(mmHg)</td>
1863 1863
                         <td width="50" v-if="org_id == 9538 || org_id ==10600 || org_id ==10629 || org_id ==10510 || org_id == 10580 || org_id == 10598 || org_id == 10567 || org_id == 0 || org_id == 10724">KT/V</td>

+ 33 - 6
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Просмотреть файл

@@ -404,15 +404,25 @@ export default {
404 404
               list[i].drugAddOne= 0
405 405
               list[i].drugOutOne =0
406 406
               list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
407
-          
407
+              
408
+            
408 409
               list[i].drugInMoney = list[i].last_price
409 410
               list[i].drugSaleMoney = (list[i].drugIn * list[i].drugInMoney).toFixed(2)
410 411
 
411 412
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
412 413
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
413
-           
414
-              list[i].drugAddPrice = list[i].last_price
415
-              list[i].drugAddSalePrice = (list[i].drugAdd * list[i].drugAddPrice).toFixed(2)
414
+            
415
+              if(this.org_id == 0 || this.org_id == 10644){
416
+                list[i].drugAddPrice = ""
417
+                list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
418
+              }else{
419
+                list[i].drugAddPrice = list[i].last_price
420
+                list[i].drugAddSalePrice = (list[i].drugAdd * list[i].drugAddPrice).toFixed(2)
421
+              }
422
+
423
+             
424
+
425
+
416 426
 
417 427
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
418 428
               list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
@@ -1063,8 +1073,6 @@ export default {
1063 1073
     var total = 0
1064 1074
     var totalone = 0
1065 1075
     var totaltwo = 0
1066
-    var max_str = "";
1067
-    var min_str = "";
1068 1076
     if(arr!=null && arr.length > 0){
1069 1077
       for(let i=0;i<arr.length;i++){
1070 1078
         totalone += arr[i].count
@@ -1081,6 +1089,25 @@ export default {
1081 1089
     return total
1082 1090
 
1083 1091
    },
1092
+   drugAddInfoOnePirce(arr,min_number,min_unit,max_unit,arr2){
1093
+    var total = 0
1094
+    var totalone_price = 0
1095
+    var total_two_price = 0
1096
+    if(arr!=null && arr.length > 0){
1097
+      for(let i=0;i<arr.length;i++){
1098
+        totalone_price += arr[i].count * arr[i].price
1099
+      }
1100
+    }
1101
+    if(arr2!=null && arr2.length >0){
1102
+      for(let i=0;i<arr2.length;i++){
1103
+        total_two_price += arr2[i].count * arr[i].price
1104
+      }
1105
+    }
1106
+    total = totalone_price + total_two_price
1107
+
1108
+    
1109
+    return total
1110
+   },
1084 1111
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1085 1112
     var total = 0
1086 1113
     var totalone =0

+ 124 - 12
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue Просмотреть файл

@@ -216,6 +216,101 @@ export default {
216 216
 
217 217
   },
218 218
   methods:{
219
+    GetInitStartFlowPice(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
220
+      var total_one_price =0
221
+      var total_two_price = 0
222
+      var total_three_price =0
223
+      var total_four_price =0
224
+      var total_five_price = 0
225
+      var total =0
226
+   
227
+      if(val1!=null && val1.length>0){
228
+         for(let i=0;i<val1.length;i++){
229
+          total_one_price +=val1[i].count*val1[i].price
230
+         }
231
+      }  
232
+
233
+      if(val2!=null && val2.length>0){
234
+         for(let i=0;i<val2.length;i++){
235
+          total_two_price +=val2[i].count*val2[i].price
236
+         }
237
+      }  
238
+    
239
+      console.log("val3",val3)
240
+      if(val3!=null && val3.length>0){
241
+         for(let i=0;i<val3.length;i++){
242
+          total_three_price +=val3[i].count*val3[i].price
243
+         }
244
+      }  
245
+      if(val4!=null && val4.length>0){
246
+         for(let i=0;i<val4.length;i++){
247
+          total_four_price +=val4[i].count*val4[i].price
248
+         }
249
+      }  
250
+
251
+      if(val5!=null && val5.length>0){
252
+         for(let i=0;i<val5.length;i++){
253
+          total_five_price +=val5[i].count*val5[i].price
254
+         }
255
+      }  
256
+     
257
+      var total = (total_one_price + total_two_price -total_three_price-total_four_price + total_five_price).toFixed(2)
258
+       
259
+       return total
260
+    },
261
+    drugAddInfoOnePirce(arr,min_number,min_unit,max_unit,arr2){
262
+        var total = 0
263
+        var totalone_price = 0
264
+        var total_two_price = 0
265
+        if(arr!=null && arr.length > 0){
266
+          for(let i=0;i<arr.length;i++){
267
+            totalone_price += arr[i].count * arr[i].price
268
+          }
269
+        }
270
+        if(arr2!=null && arr2.length >0){
271
+          for(let i=0;i<arr2.length;i++){
272
+            total_two_price += arr2[i].count * arr[i].price
273
+          }
274
+        }
275
+        total = totalone_price + total_two_price
276
+
277
+        
278
+        return total
279
+    },
280
+    getDrugOutPriceOne(arr,min_number,min_unit,max_unit,arr2,arr3){
281
+    var total = 0
282
+    var totalone_price = 0
283
+    var total_two_price = 0
284
+    var total_three_price = 0
285
+   
286
+    if(arr!=null&&arr.length > 0){
287
+      for(let i=0;i<arr.length;i++){
288
+        totalone_price +=arr[i].count * arr[i].price
289
+      }
290
+    }
291
+    if(arr2!=null && arr2.length>0){
292
+      for(let i=0;i<arr2.length;i++){
293
+        total_two_price +=arr2[i].count * arr[i].price
294
+      }
295
+    }
296
+    if(arr3!=null && arr3.length>0){
297
+      for(let i=0;i<arr3.length;i++){
298
+        total_three_price +=arr3[i].count * arr[i].price
299
+      }
300
+    }
301
+ 
302
+    total = (totalone_price + total_two_price - total_three_price).toFixed(2)
303
+
304
+    return total
305
+   },
306
+   GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
307
+      var total = 0
308
+      
309
+      total = (totalone + totaltwo - totalthree).toFixed(2)
310
+       
311
+      return total
312
+       
313
+    },
219 314
     changeStorehouseName(){
220 315
 
221 316
     },
@@ -393,7 +488,7 @@ export default {
393 488
                }
394 489
              }
395 490
 
396
-            if(this.org_id !=10210 && this.org_id!=0 && this.org_id !=10402 && this.org_id !=10215){
491
+            if(this.org_id !=10210 && this.org_id !=10402 && this.org_id !=10215){
397 492
 
398 493
                //  新版
399 494
              if(list[i].new_drug_in_flow_info!=null && list[i].new_drug_in_flow_info.length>0){
@@ -447,7 +542,7 @@ export default {
447 542
               list[i].drugAddOne= 0
448 543
               list[i].drugOutOne =0
449 544
               
450
-              if(this.org_id ==10210  || this.org_id ==10402 || this.org_id ==10215 || this.org_id == 0 || this.org_id ==10191){
545
+              if(this.org_id ==10210  || this.org_id ==10402 || this.org_id ==10215 || this.org_id ==10191){
451 546
                  list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
452 547
               }else{
453 548
                 list[i].drugIn = this.GetInitStartFlow(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
@@ -456,10 +551,18 @@ export default {
456 551
 
457 552
            
458 553
               list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
459
-              list[i].drugInMoney = list[i].last_price
460
-              if(this.org_id == 0 || this.org_id == 10697){
461
-                list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
554
+             
555
+              if(this.org_id == 0 || this.org_id == 10644){
556
+                list[i].drugInMoney = ""
462 557
               }else{
558
+                list[i].drugInMoney = list[i].last_price
559
+              }
560
+              if(this.org_id == 10697){
561
+                list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
562
+              }else if(this.org_id == 0 || this.org_id == 10644){
563
+              
564
+                list[i].drugSaleMoney =  this.GetInitStartFlowPice(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
565
+              } else{
463 566
                 list[i].drugSaleMoney = "/"
464 567
               }
465 568
              
@@ -467,10 +570,13 @@ export default {
467 570
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
468 571
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
469 572
               
470
-              if(this.org_id == 0 || this.org_id == 10697){
573
+              if( this.org_id == 10697){
471 574
                  list[i].drugAddPrice = list[i].last_price
472 575
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
473
-              }else{
576
+              }else if(this.org_id == 0 || this.org_id == 10644){
577
+                list[i].drugAddPrice = "/"
578
+                list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
579
+              } else{
474 580
                 list[i].drugAddPrice = "/"
475 581
                 list[i].drugAddSalePrice = "/"
476 582
               }
@@ -479,10 +585,13 @@ export default {
479 585
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
480 586
               list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
481 587
            
482
-              if(this.org_id == 0 || this.org_id == 10697){
588
+              if( this.org_id == 10697){
483 589
                 list[i].drugOutPrice = list[i].retail_price
484 590
                 list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
485
-              }else{
591
+              }else if(this.org_id == 0 || this.org_id == 10644){
592
+                list[i].drugOutPrice = "/"
593
+                list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
594
+              } else{
486 595
                 list[i].drugOutPrice = "/"
487 596
                 list[i].drugOutSalePrice = "/"
488 597
               }
@@ -496,17 +605,20 @@ export default {
496 605
             }
497 606
              
498 607
             list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
499
-            if(this.org_id == 0 || this.org_id == 10697){
608
+            if(this.org_id == 10697){
500 609
                 list[i].overDrugPrice = list[i].retail_price
501 610
                 list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
502
-            }else{
611
+            }else if(this.org_id == 0 || this.org_id ==10644){
612
+                list[i].overDrugPrice = ""
613
+                list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
614
+            } else{
503 615
              list[i].overDrugPrice = "/"
504 616
              list[i].oveDrugSaleMoney = "/"
505 617
             }
506 618
            
507 619
             }
508 620
             
509
-            if(this.org_id == 0 || this.org_id == 10697){
621
+            if(this.org_id == 10697){
510 622
               if(list!=null && list.length>0){
511 623
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
512 624
                 for(let i=0;i<list.length;i++){

+ 129 - 23
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue Просмотреть файл

@@ -349,7 +349,7 @@ export default {
349 349
                 list[i].drugAddOne= 0
350 350
                 list[i].drugOutOne =0
351 351
                
352
-                if(this.org_id ==10210 || this.org_id ==10402 || this.org_id ==10215){
352
+                if(this.org_id ==10210 || this.org_id ==10402 || this.org_id ==10215  || this.org_id ==10191){
353 353
                    list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
354 354
                 }else{
355 355
                   list[i].drugIn = this.GetInitStartFlow(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
@@ -357,12 +357,17 @@ export default {
357 357
               
358 358
                list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
359 359
                
360
-                // list[i].drugInMoney = "/"
361
-                // list[i].drugSaleMoney = "/"
362
-
360
+               if(this.org_id == 0 || this.org_id == 10644){
361
+                list[i].drugInMoney = ""
362
+              }else{
363 363
                 list[i].drugInMoney = list[i].last_price
364
-                if(this.org_id == 0 || this.org_id == 10697){
364
+              }
365
+
366
+                if( this.org_id == 10697){
365 367
                   list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
368
+                }else if(this.org_id == 0 || this.org_id == 10644){
369
+                  list[i].drugAddPrice = ""
370
+                  list[i].drugSaleMoney =  this.GetInitStartFlowPice(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
366 371
                 }else{
367 372
                   list[i].drugSaleMoney = "/"
368 373
                 }
@@ -370,27 +375,30 @@ export default {
370 375
                 list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
371 376
                 list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
372 377
                
373
-                // list[i].drugAddPrice = "/"
374
-                // list[i].drugAddSalePrice = "/"
375
-
376
-                if(this.org_id == 0 || this.org_id == 10697){
378
+               
379
+                if(this.org_id == 10697){
377 380
                  list[i].drugAddPrice = list[i].last_price
378 381
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
379
-              }else{
380
-                list[i].drugAddPrice = "/"
381
-                list[i].drugAddSalePrice = "/"
382
-              }
383
-
382
+                }else if(this.org_id == 0 || this.org_id ==10644){
383
+                  list[i].drugAddPrice = "/"
384
+                  list[i].drugAddSalePrice = this.drugAddInfoOnePirce(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
385
+                } else{
386
+                  list[i].drugAddPrice = "/"
387
+                  list[i].drugAddSalePrice = "/"
388
+                }
389
+ 
384 390
                 list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
385 391
                 list[i].drugOutOne = this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
386 392
                 
387
-                // list[i].drugOutPrice = "/"
388
-                // list[i].drugOutSalePrice = "/"
393
+              
389 394
 
390
-                if(this.org_id == 0 || this.org_id == 10697){
395
+                if( this.org_id == 10697){
391 396
                   list[i].drugOutPrice = list[i].retail_price
392 397
                   list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
393
-                }else{
398
+                }else if(this.org_id == 0 || this.org_id == 10644){
399
+                  list[i].drugOutPrice = "/"
400
+                  list[i].drugOutSalePrice= this.getDrugOutPriceOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
401
+                } else{
394 402
                   list[i].drugOutPrice = "/"
395 403
                   list[i].drugOutSalePrice = "/"
396 404
                 }
@@ -401,18 +409,20 @@ export default {
401 409
                 }else{
402 410
                   list[i].overDrug = this.GetDrugOver(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
403 411
                 }
404
-                // list[i].overDrugPrice = "/"
405
-                // list[i].oveDrugSaleMoney = "/"
412
+               
406 413
                 list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
407
-                if(this.org_id == 0 || this.org_id == 10697){
414
+                if(this.org_id == 10697){
408 415
                   list[i].overDrugPrice = list[i].retail_price
409 416
                   list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
410
-                }else{
417
+                }else if(this.org_id == 0 || this.org_id ==10644){
418
+                  list[i].overDrugPrice = ""
419
+                  list[i].oveDrugSaleMoney = this.GetDrugOverOnePrice(list[i].drugSaleMoney,list[i].drugAddSalePrice,list[i].drugOutSalePrice,list[i].min_number,list[i].min_unit,list[i].max_unit)
420
+                } else{
411 421
                   list[i].overDrugPrice = "/"
412 422
                   list[i].oveDrugSaleMoney = "/"
413 423
                 }
414 424
             }
415
-            if(this.org_id == 0 || this.org_id == 10697){
425
+            if(this.org_id == 10697){
416 426
               if(list!=null && list.length>0){
417 427
                 var obj = {drug_type:"",drug_name:"合计",dose:"",dose_unit:"",min_number:"",min_unit:"",max_unit:"",medical_insurance_number:"",manufacturer:"",dealer:"",drugIn:"",drugInMoney:"",drugSaleMoney:0,drugAdd:"",drugAddPrice:"",drugAddSalePrice:0,drugOut:"",drugOutPrice:"",drugOutSalePrice:0,overDrug:"",overDrugPrice:"",oveDrugSaleMoney:0}
418 428
                 for(let i=0;i<list.length;i++){
@@ -1475,7 +1485,103 @@ export default {
1475 1485
          return 0
1476 1486
        }
1477 1487
      
1488
+    },
1489
+    
1490
+    GetInitStartFlowPice(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
1491
+      var total_one_price =0
1492
+      var total_two_price = 0
1493
+      var total_three_price =0
1494
+      var total_four_price =0
1495
+      var total_five_price = 0
1496
+      var total =0
1497
+   
1498
+      if(val1!=null && val1.length>0){
1499
+         for(let i=0;i<val1.length;i++){
1500
+          total_one_price +=val1[i].count*val1[i].price
1501
+         }
1502
+      }  
1503
+
1504
+      if(val2!=null && val2.length>0){
1505
+         for(let i=0;i<val2.length;i++){
1506
+          total_two_price +=val2[i].count*val2[i].price
1507
+         }
1508
+      }  
1509
+    
1510
+      console.log("val3",val3)
1511
+      if(val3!=null && val3.length>0){
1512
+         for(let i=0;i<val3.length;i++){
1513
+          total_three_price +=val3[i].count*val3[i].price
1514
+         }
1515
+      }  
1516
+      if(val4!=null && val4.length>0){
1517
+         for(let i=0;i<val4.length;i++){
1518
+          total_four_price +=val4[i].count*val4[i].price
1519
+         }
1520
+      }  
1521
+
1522
+      if(val5!=null && val5.length>0){
1523
+         for(let i=0;i<val5.length;i++){
1524
+          total_five_price +=val5[i].count*val5[i].price
1525
+         }
1526
+      }  
1527
+     
1528
+      var total = (total_one_price + total_two_price -total_three_price-total_four_price + total_five_price).toFixed(2)
1529
+       
1530
+       return total
1531
+    },
1532
+    drugAddInfoOnePirce(arr,min_number,min_unit,max_unit,arr2){
1533
+        var total = 0
1534
+        var totalone_price = 0
1535
+        var total_two_price = 0
1536
+        if(arr!=null && arr.length > 0){
1537
+          for(let i=0;i<arr.length;i++){
1538
+            totalone_price += arr[i].count * arr[i].price
1539
+          }
1540
+        }
1541
+        if(arr2!=null && arr2.length >0){
1542
+          for(let i=0;i<arr2.length;i++){
1543
+            total_two_price += arr2[i].count * arr[i].price
1544
+          }
1545
+        }
1546
+        total = totalone_price + total_two_price
1547
+
1548
+        
1549
+        return total
1550
+    },
1551
+    getDrugOutPriceOne(arr,min_number,min_unit,max_unit,arr2,arr3){
1552
+    var total = 0
1553
+    var totalone_price = 0
1554
+    var total_two_price = 0
1555
+    var total_three_price = 0
1556
+   
1557
+    if(arr!=null&&arr.length > 0){
1558
+      for(let i=0;i<arr.length;i++){
1559
+        totalone_price +=arr[i].count * arr[i].price
1560
+      }
1561
+    }
1562
+    if(arr2!=null && arr2.length>0){
1563
+      for(let i=0;i<arr2.length;i++){
1564
+        total_two_price +=arr2[i].count * arr[i].price
1565
+      }
1566
+    }
1567
+    if(arr3!=null && arr3.length>0){
1568
+      for(let i=0;i<arr3.length;i++){
1569
+        total_three_price +=arr3[i].count * arr[i].price
1570
+      }
1478 1571
     }
1572
+ 
1573
+    total = (totalone_price + total_two_price - total_three_price).toFixed(2)
1574
+
1575
+    return total
1576
+   },
1577
+   GetDrugOverOnePrice(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1578
+      var total = 0
1579
+      
1580
+      total = (totalone + totaltwo - totalthree).toFixed(2)
1581
+       
1582
+      return total
1583
+       
1584
+    },
1479 1585
    },
1480 1586
     created(){
1481 1587
       this.org_id =  this.$store.getters.xt_user.org_id

+ 114 - 10
src/xt_pages/stock/query/purchaseNewStockQuery.vue Просмотреть файл

@@ -281,17 +281,21 @@ export default {
281 281
                   list[i].stockIn = list[i].GoodStartFlowInfo.over_count
282 282
                 }else{
283 283
                   list[i].stockIn = this.getAllStockIn(list[i].StWarehousingInfoTwo) + this.getAllStockInFlow(list[i].WareStartInStockFlow) - this.getAllOutStockIn(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlow(list[i].WareStartOutStockFlow)
284
-                  // console.log("剩余库存---------------",list[i].stockIn)
284
+                  
285 285
                   if(list[i].stockIn <0){
286 286
                     list[i].stockIn =0
287 287
                   }
288 288
                 }
289 289
                
290 290
               }
291
-              //  list[i].stockIn = list[i].GoodStartFlowInfo.over_count
292
-               if(this.org_id == 0 || this.org_id ==10697){
291
+             
292
+               if(this.org_id ==10697){
293 293
                   list[i].stock_in_price = list[i].buy_price
294 294
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
295
+               }else if(this.org_id == 0 || this.org_id == 10644){
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)
298
+                
295 299
                }else{
296 300
                 list[i].stock_in_price = "/"
297 301
                 list[i].stockMoney = "/"
@@ -301,23 +305,31 @@ export default {
301 305
               
302 306
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
303 307
 
304
-              if(this.org_id == 0 || this.org_id ==10697){
308
+              if(this.org_id ==10697){
305 309
                list[i].addStockMoney = list[i].buy_price 
306 310
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
307
-              }else{
311
+              }else if(this.org_id == 0 || this.org_id == 10164){
312
+                list[i].addStockMoney = "/"
313
+                list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
314
+              } else{
308 315
                list[i].addStockMoney = "/"
309 316
                list[i].saleStockMoney = "/"
310 317
               }
311 318
              
312 319
 
313 320
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
314
-              if(this.org_id == 0 || this.org_id == 10697){
321
+              if(this.org_id == 10697){
315 322
                 list[i].stockOutprice = list[i].packing_price
316 323
                 list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
324
+              }else if(this.org_id == 0 || this.org_id == 10164){
325
+                list[i].stockOutprice = "/"
326
+                list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
317 327
               }else{
318 328
                 list[i].stockOutprice = "/"
319 329
                 list[i].saleOutMoney = "/"
320 330
               }
331
+
332
+
321 333
              
322 334
               if(this.org_id == 10265){
323 335
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
@@ -333,9 +345,13 @@ export default {
333 345
                
334 346
               }
335 347
             
336
-              if(this.org_id == 0 || this.org_id ==10697){
348
+              if(this.org_id ==10697){
337 349
                 list[i].overPrice = list[i].packing_price
338 350
                 list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
351
+              }else if(this.org_id == 0 || this.org_id ==10644){
352
+                list[i].overPrice = "/"
353
+                list[i].overMoney = (parseFloat(list[i].stockMoney)  + parseFloat(list[i].saleStockMoney) - parseFloat(list[i].saleOutMoney)).toFixed(2)
354
+                // console.log("hahahha",list[i].overMoney)
339 355
               }else{
340 356
                 list[i].overPrice = "/"
341 357
                 list[i].overMoney = "/"
@@ -351,13 +367,12 @@ export default {
351 367
               if(list.length!=null){
352 368
                 for(let i=0;i<list.length;i++){
353 369
                  
354
-                  //  obj.stock_in_price += (this.tableList[i].stock_in_price).toFixed(2)
355 370
                   obj.stockMoney += parseFloat(list[i].stockMoney) 
356
-                  //  obj.stockOutprice += (this.tableList[i].stockOutprice).toFixed(2)
371
+                 
357 372
                   obj.saleStockMoney += parseFloat(list[i].saleStockMoney)
358 373
 
359 374
                   obj.saleOutMoney += parseFloat(list[i].saleOutMoney)
360
-                  //  obj.overPrice += (this.tableList[i].overPrice).toFixed(2)
375
+                 
361 376
                   obj.overMoney += parseFloat(list[i].overMoney)
362 377
 
363 378
                 }
@@ -721,6 +736,28 @@ export default {
721 736
       return 0
722 737
     }
723 738
   },
739
+  getWarehouseInfoOnePrice(val,val2){
740
+    var count_price =0 
741
+    var count_one_price = 0
742
+    var all_count_price = 0
743
+    if(val!=null && val.length >0){
744
+     for(let i=0;i<val.length;i++){
745
+      count_price +=val[i].count * val[i].price
746
+     }
747
+    }
748
+    if(val2!=null && val2.length > 0){
749
+     for(let i=0;i<val2.length;i++){
750
+      count_one_price +=val2[i].count * val[i].price
751
+     }
752
+    }
753
+    all_count_price = count_price + count_one_price
754
+
755
+    if(all_count_price > 0 ){
756
+      return all_count_price
757
+    }else{
758
+      return 0
759
+    }
760
+  },
724 761
   getAddStockMony(val,val2){
725 762
     var total_price =0 
726 763
     var total_price_one = 0
@@ -901,6 +938,35 @@ export default {
901 938
       return 0
902 939
      }
903 940
    },
941
+   getWarehosueOutInfoPrice(val,val2,val3){
942
+     var count_price = 0
943
+     var count_one_price = 0
944
+     var all_count_price = 0
945
+     var count_two_price = 0
946
+     if(val!=null && val.length >0){
947
+       for(let i=0;i<val.length;i++){
948
+        count_price += val[i].count * val[i].price
949
+       }
950
+     }
951
+     if(val2!=null && val2.length > 0){
952
+      for(let i=0;i<val2.length;i++){
953
+        count_one_price +=val2[i].count  * val[i].price
954
+      }
955
+     }
956
+     if(val3!=null && val3.length > 0){
957
+      for(let i=0;i<val3.length;i++){
958
+        count_two_price +=val3[i].count  * val[i].price
959
+      }
960
+     }
961
+     console.log("本期减少",count_price)
962
+     console.log("盘亏",count_one_price)
963
+     console.log("退库",all_count_price)
964
+     all_count_price = count_price +count_one_price - count_two_price
965
+     console.log("数据我哦我我",all_count_price)
966
+     if(all_count_price >0){
967
+       return all_count_price
968
+     }
969
+   },
904 970
    stockOutprice(val,val2,val3){
905 971
      var total_price = 0
906 972
      var total_price_one = 0
@@ -1207,6 +1273,17 @@ export default {
1207 1273
       }
1208 1274
       return count
1209 1275
     },
1276
+    getAllStockInPrice(val){
1277
+       var total_price =0
1278
+       if(val!=null && val.length>0){
1279
+         for(let i=0;i<val.length;i++){
1280
+            total_price += val[i].warehousing_count * val[i].price
1281
+         }
1282
+
1283
+       }
1284
+       return total_price
1285
+    },
1286
+
1210 1287
     getAllOutStockIn(val){
1211 1288
        var count = 0 
1212 1289
        if(val!=null && val.length>0){
@@ -1216,6 +1293,15 @@ export default {
1216 1293
        }
1217 1294
        return count
1218 1295
     },
1296
+    getAllOutStockInPrice(val){
1297
+      var total_price = 0 
1298
+       if(val!=null && val.length>0){
1299
+         for(let i=0;i<val.length;i++){
1300
+          total_price += val[i].count * val[i].price
1301
+         }
1302
+       }
1303
+       return total_price
1304
+    },
1219 1305
     getAllStockInFlow(val){
1220 1306
       var count = 0
1221 1307
       if(val!=null && val.length>0){
@@ -1225,6 +1311,15 @@ export default {
1225 1311
       }
1226 1312
       return count
1227 1313
     },
1314
+    getAllStockInFlowPrice(val){
1315
+      var total_price = 0
1316
+      if(val!=null && val.length>0){
1317
+        for(let i=0;i<val.length;i++){
1318
+          total_price+= val[i].count * val[i].total_price
1319
+        }
1320
+      }
1321
+      return total_price
1322
+    },
1228 1323
     getAllStockOutFlow(val){
1229 1324
       var count = 0
1230 1325
       if(val!=null && val.length>0){
@@ -1234,6 +1329,15 @@ export default {
1234 1329
       }
1235 1330
       return count
1236 1331
     },
1332
+    getAllStockOutFlowPrice(val){
1333
+      var total_price = 0
1334
+      if(val!=null && val.length>0){
1335
+        for(let i=0;i<val.length;i++){
1336
+          total_price+= val[i].count * val[i].price
1337
+        }
1338
+      }
1339
+      return total_price
1340
+    },
1237 1341
     getAllQuery(){
1238 1342
 
1239 1343
      this.getlist()

+ 106 - 4
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue Просмотреть файл

@@ -187,7 +187,10 @@ export default {
187 187
                     if(this.org_id == 0 || this.org_id ==10697){
188 188
                       list[i].stock_in_price = list[i].buy_price
189 189
                       list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
190
-                    }else{
190
+                    }else if(this.org_id == 0 || this.org_id == 10644){
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)
193
+                    } else{
191 194
                       list[i].stock_in_price = "/"
192 195
                       list[i].stockMoney = "/"
193 196
                     }
@@ -198,7 +201,10 @@ export default {
198 201
                     if(this.org_id == 0 || this.org_id ==10697){
199 202
                         list[i].addStockMoney = list[i].buy_price 
200 203
                         list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
201
-                      }else{
204
+                    }else if(this.org_id == 0 || this.org_id == 10164){
205
+                      list[i].addStockMoney = "/"
206
+                      list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
207
+                    }else{
202 208
                         list[i].addStockMoney = "/"
203 209
                         list[i].saleStockMoney = "/"
204 210
                       }
@@ -210,6 +216,9 @@ export default {
210 216
                     if(this.org_id == 0 || this.org_id == 10697){
211 217
                       list[i].stockOutprice = list[i].packing_price
212 218
                       list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
219
+                    }else if(this.org_id == 0 || this.org_id == 10164){
220
+                      list[i].addStockMoney = "/"
221
+                      list[i].saleStockMoney = this.getWarehouseInfoOnePrice(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit).toFixed(2)
213 222
                     }else{
214 223
                       list[i].stockOutprice = "/"
215 224
                       list[i].saleOutMoney = "/"
@@ -224,6 +233,9 @@ export default {
224 233
                     if(this.org_id == 0 || this.org_id ==10697){
225 234
                       list[i].overPrice = list[i].packing_price
226 235
                       list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
236
+                     }else if(this.org_id == 0 || this.org_id == 10164){
237
+                      list[i].stockOutprice = "/"
238
+                      list[i].saleOutMoney = this.getWarehosueOutInfoPrice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
227 239
                      }else{
228 240
                         list[i].overPrice = "/"
229 241
                         list[i].overMoney = "/"
@@ -359,7 +371,7 @@ export default {
359 371
       return "0.00"
360 372
      }
361 373
    },
362
-     saleOutprice(val,val2,val3){
374
+    saleOutprice(val,val2,val3){
363 375
      var total_price = 0
364 376
      var total_price_one = 0
365 377
      var all_price = 0
@@ -792,6 +804,16 @@ export default {
792 804
       }
793 805
       return count
794 806
     },
807
+    getAllStockInPrice(val){
808
+       var total_price =0
809
+       if(val!=null && val.length>0){
810
+         for(let i=0;i<val.length;i++){
811
+            total_price += val[i].warehousing_count * val[i].price
812
+         }
813
+
814
+       }
815
+       return total_price
816
+    },
795 817
     getAllOutStockIn(val){
796 818
        var count = 0 
797 819
        if(val!=null && val.length>0){
@@ -801,6 +823,15 @@ export default {
801 823
        }
802 824
        return count
803 825
     },
826
+    getAllStockInFlowPrice(val){
827
+      var total_price = 0
828
+      if(val!=null && val.length>0){
829
+        for(let i=0;i<val.length;i++){
830
+          total_price+= val[i].count * val[i].total_price
831
+        }
832
+      }
833
+      return total_price
834
+    },
804 835
     getAllStockInFlow(val){
805 836
       var count = 0
806 837
       if(val!=null && val.length>0){
@@ -818,7 +849,78 @@ export default {
818 849
         }
819 850
       }
820 851
       return count
821
-    } 
852
+    },
853
+    getAllOutStockInPrice(val){
854
+      var total_price = 0 
855
+       if(val!=null && val.length>0){
856
+         for(let i=0;i<val.length;i++){
857
+          total_price += val[i].count * val[i].price
858
+         }
859
+       }
860
+       return total_price
861
+    },
862
+    getAllStockOutFlowPrice(val){
863
+      var total_price = 0
864
+      if(val!=null && val.length>0){
865
+        for(let i=0;i<val.length;i++){
866
+          total_price+= val[i].count * val[i].price
867
+        }
868
+      }
869
+      return total_price
870
+    },
871
+    getWarehouseInfoOnePrice(val,val2){
872
+      var count_price =0 
873
+      var count_one_price = 0
874
+      var all_count_price = 0
875
+      if(val!=null && val.length >0){
876
+      for(let i=0;i<val.length;i++){
877
+        count_price +=val[i].count * val[i].price
878
+      }
879
+      }
880
+      if(val2!=null && val2.length > 0){
881
+      for(let i=0;i<val2.length;i++){
882
+        count_one_price +=val2[i].count * val[i].price
883
+      }
884
+      }
885
+      all_count_price = count_price + count_one_price
886
+
887
+      if(all_count_price > 0 ){
888
+        return all_count_price
889
+      }else{
890
+        return 0
891
+      }
892
+    },
893
+    getWarehosueOutInfoPrice(val,val2,val3){
894
+     var count_price = 0
895
+     var count_one_price = 0
896
+     var all_count_price = 0
897
+     var count_two_price = 0
898
+     if(val!=null && val.length >0){
899
+       for(let i=0;i<val.length;i++){
900
+        count_price += val[i].count * val[i].price
901
+       }
902
+     }
903
+     if(val2!=null && val2.length > 0){
904
+      for(let i=0;i<val2.length;i++){
905
+        count_one_price +=val2[i].count  * val[i].price
906
+      }
907
+     }
908
+     if(val3!=null && val3.length > 0){
909
+      for(let i=0;i<val3.length;i++){
910
+        count_two_price +=val3[i].count  * val[i].price
911
+      }
912
+     }
913
+     console.log("本期减少",count_price)
914
+     console.log("盘亏",count_one_price)
915
+     console.log("退库",all_count_price)
916
+     all_count_price = count_price +count_one_price - count_two_price
917
+     console.log("数据我哦我我",all_count_price)
918
+     if(all_count_price >0){
919
+       return all_count_price
920
+     }else{
921
+      return 0
922
+     }
923
+   },
822 924
 
823 925
    },
824 926
     created(){

+ 7 - 50
src/xt_pages/user/courseOfDisease_new.vue Просмотреть файл

@@ -165,53 +165,7 @@
165 165
         width="70%"
166 166
         top="0"
167 167
         >
168
-        <div>
169
-          <div style="display:flex;position: absolute;top: 20px;left: 20%;">
170
-            <div>
171
-              取值时间:
172
-              <el-select v-model="quzhi_date" @change="datachange" placeholder="请选择" style="width: 120px;">
173
-                <el-option
174
-                  v-for="item in quzhi_options"
175
-                  :key="item.value"
176
-                  :label="item.label"
177
-                  :value="item.value">
178
-                </el-option>
179
-              </el-select>
180
-            </div>
181
-            <div style="margin:0 10px">
182
-              <el-date-picker
183
-               @change="changStartDate"
184
-                v-model="start_date"
185
-                type="date"
186
-                value-format="yyyy-MM-dd"
187
-                placeholder="选择日期"
188
-                style="width: 150px;">
189
-              </el-date-picker>
190
-              <span>-</span>
191
-              <el-date-picker
192
-               @change="changEndDate"
193
-                v-model="end_date"
194
-                type="date"
195
-                value-format="yyyy-MM-dd"
196
-                placeholder="选择日期"
197
-                style="width: 150px;">
198
-              </el-date-picker>
199
-            </div>
200
-            <div>
201
-              <el-button type="primary" size="small" @click="autotext_click">
202
-                生成
203
-              </el-button>
204
-              <el-button type="primary" size="small" @click="auto_dialog=false">
205
-                取消
206
-              </el-button>
207
-            </div>
208
-          </div>
209
-          <div v-show="AuToShow">
210
-            <text_content @new_content="newcontent" :patient="patient" :prescriptionList="prescriptionList" :berforList="berforList" 
211
-            :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList" 
212
-            :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num"></text_content>
213
-          </div>
214
-        </div>
168
+     
215 169
 
216 170
       </el-dialog>
217 171
 
@@ -313,12 +267,12 @@
313 267
         patient:{},
314 268
         AuToShow:false,
315 269
 
316
-        num:22222222
270
+        num:22222222,
317 271
       //   name:"",
318 272
       //  gander:"",
319 273
       //  age:0,
320 274
       //  dialysis_no:"",
321
-      //  patient_new:{},
275
+       patient_new:{},
322 276
       //  prescriptionList:[],
323 277
       //  berforList:[],
324 278
       //  monitorList:[],
@@ -577,9 +531,10 @@
577 531
         //     }
578 532
         //   }
579 533
         // })
534
+         this.getAutoPatientContent()
580 535
          this.AuToShow = true
581 536
 
582
-      //  this.getAutoPatientContent()
537
+      
583 538
       },
584 539
       // 本周
585 540
       getFirstDayOfWeek(date){
@@ -758,6 +713,8 @@
758 713
           if(response.data.state == 1){
759 714
           
760 715
             var prescription =  response.data.data.prescription
716
+
717
+            this.patient_new = response.data.data.patient
761 718
             var hd_total =0
762 719
             var hdArr =[]
763 720
             var hdf_total =0

+ 3 - 0
src/xt_pages/user/text_content.vue Просмотреть файл

@@ -178,6 +178,9 @@ export default{
178 178
     },
179 179
     num:{
180 180
       type:Number
181
+    },
182
+    patient_new:{
183
+      type:Object
181 184
     }
182 185
    },
183 186
   data(){