Browse Source

hah阿凡达

28169 4 months ago
parent
commit
e4795b2a03

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

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

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

+ 8 - 0
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

3023
             } else if (schedual.schedule_type == 3) {
3023
             } else if (schedual.schedule_type == 3) {
3024
               this.start_time = year + '-' + month + '-' + day + ' ' + '15:00'
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
            }else if(this.$store.getters.xt_user.org.id == 10353){
3034
            }else if(this.$store.getters.xt_user.org.id == 10353){
3027
               if (schedual.schedule_type == 1) {
3035
               if (schedual.schedule_type == 1) {
3028
               this.start_time = year + '-' + month + '-' + day + ' ' + '7:00'
3036
               this.start_time = year + '-' + month + '-' + day + ' ' + '7:00'

+ 2 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

2889
         this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
2889
         this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
2890
         this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume: "";
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
           this.form.venous_pressure = resp.monitor.venous_pressure;
2893
           this.form.venous_pressure = resp.monitor.venous_pressure;
2894
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10469 || this.org_id == 10471 ){
2894
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340 || this.org_id == 10469 || this.org_id == 10471 ){
2895
           this.form.venous_pressure = 80
2895
           this.form.venous_pressure = 80
2913
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type
2913
         this.form.arterial_pressure_type = resp.monitor.arterial_pressure_type
2914
           ? resp.monitor.arterial_pressure_type
2914
           ? resp.monitor.arterial_pressure_type
2915
           : 1;
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
           this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
2917
           this.form.transmembrane_pressure = resp.monitor.transmembrane_pressure;
2918
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340){
2918
         }else if(this.org_id == 9671 || this.org_id == 9675 || this.org_id == 10340){
2919
           this.form.transmembrane_pressure = 60
2919
           this.form.transmembrane_pressure = 60

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

1853
                           <span v-if="org_id == 10683">置换液速度</span>
1853
                           <span v-if="org_id == 10683">置换液速度</span>
1854
                           <span v-if="org_id!=10683">置换量</span>
1854
                           <span v-if="org_id!=10683">置换量</span>
1855
                           <br />
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
                             <span v-if="org_id!=0&&org_id!=10683">(ml)</span>
1857
                             <span v-if="org_id!=0&&org_id!=10683">(ml)</span>
1858
                             <span v-if="org_id==10683">(ml/h)</span>
1858
                             <span v-if="org_id==10683">(ml/h)</span>
1859
                           </span>
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
                         </td>
1861
                         </td>
1862
                         <td width="50" v-if="org_id == 3877 || org_id == 10449">滤前压(mmHg)</td>
1862
                         <td width="50" v-if="org_id == 3877 || org_id == 10449">滤前压(mmHg)</td>
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>
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 View File

404
               list[i].drugAddOne= 0
404
               list[i].drugAddOne= 0
405
               list[i].drugOutOne =0
405
               list[i].drugOutOne =0
406
               list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
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
               list[i].drugInMoney = list[i].last_price
409
               list[i].drugInMoney = list[i].last_price
409
               list[i].drugSaleMoney = (list[i].drugIn * list[i].drugInMoney).toFixed(2)
410
               list[i].drugSaleMoney = (list[i].drugIn * list[i].drugInMoney).toFixed(2)
410
 
411
 
411
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
               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)
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
               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)
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
     var total = 0
1073
     var total = 0
1064
     var totalone = 0
1074
     var totalone = 0
1065
     var totaltwo = 0
1075
     var totaltwo = 0
1066
-    var max_str = "";
1067
-    var min_str = "";
1068
     if(arr!=null && arr.length > 0){
1076
     if(arr!=null && arr.length > 0){
1069
       for(let i=0;i<arr.length;i++){
1077
       for(let i=0;i<arr.length;i++){
1070
         totalone += arr[i].count
1078
         totalone += arr[i].count
1081
     return total
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
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1111
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1085
     var total = 0
1112
     var total = 0
1086
     var totalone =0
1113
     var totalone =0

+ 124 - 12
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue View File

216
 
216
 
217
   },
217
   },
218
   methods:{
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
     changeStorehouseName(){
314
     changeStorehouseName(){
220
 
315
 
221
     },
316
     },
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
              if(list[i].new_drug_in_flow_info!=null && list[i].new_drug_in_flow_info.length>0){
494
              if(list[i].new_drug_in_flow_info!=null && list[i].new_drug_in_flow_info.length>0){
447
               list[i].drugAddOne= 0
542
               list[i].drugAddOne= 0
448
               list[i].drugOutOne =0
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
                  list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
546
                  list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
452
               }else{
547
               }else{
453
                 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)
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
 
551
 
457
            
552
            
458
               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) 
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
               }else{
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
                 list[i].drugSaleMoney = "/"
566
                 list[i].drugSaleMoney = "/"
464
               }
567
               }
465
              
568
              
467
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
                  list[i].drugAddPrice = list[i].last_price
574
                  list[i].drugAddPrice = list[i].last_price
472
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
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
                 list[i].drugAddPrice = "/"
580
                 list[i].drugAddPrice = "/"
475
                 list[i].drugAddSalePrice = "/"
581
                 list[i].drugAddSalePrice = "/"
476
               }
582
               }
479
               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)
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
               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)
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
                 list[i].drugOutPrice = list[i].retail_price
589
                 list[i].drugOutPrice = list[i].retail_price
484
                 list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
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
                 list[i].drugOutPrice = "/"
595
                 list[i].drugOutPrice = "/"
487
                 list[i].drugOutSalePrice = "/"
596
                 list[i].drugOutSalePrice = "/"
488
               }
597
               }
496
             }
605
             }
497
              
606
              
498
             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)
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
                 list[i].overDrugPrice = list[i].retail_price
609
                 list[i].overDrugPrice = list[i].retail_price
501
                 list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
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
              list[i].overDrugPrice = "/"
615
              list[i].overDrugPrice = "/"
504
              list[i].oveDrugSaleMoney = "/"
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
               if(list!=null && list.length>0){
622
               if(list!=null && list.length>0){
511
                 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}
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
                 for(let i=0;i<list.length;i++){
624
                 for(let i=0;i<list.length;i++){

+ 129 - 23
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue View File

349
                 list[i].drugAddOne= 0
349
                 list[i].drugAddOne= 0
350
                 list[i].drugOutOne =0
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
                    list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
353
                    list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit) 
354
                 }else{
354
                 }else{
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)
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
               
357
               
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) 
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
                 list[i].drugInMoney = list[i].last_price
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
                   list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
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
                 }else{
371
                 }else{
367
                   list[i].drugSaleMoney = "/"
372
                   list[i].drugSaleMoney = "/"
368
                 }
373
                 }
370
                 list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
                 list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
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
                  list[i].drugAddPrice = list[i].last_price
380
                  list[i].drugAddPrice = list[i].last_price
378
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
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
                 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)
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
                 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)
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
                   list[i].drugOutPrice = list[i].retail_price
396
                   list[i].drugOutPrice = list[i].retail_price
392
                   list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
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
                   list[i].drugOutPrice = "/"
402
                   list[i].drugOutPrice = "/"
395
                   list[i].drugOutSalePrice = "/"
403
                   list[i].drugOutSalePrice = "/"
396
                 }
404
                 }
401
                 }else{
409
                 }else{
402
                   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)
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
                 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)
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
                   list[i].overDrugPrice = list[i].retail_price
415
                   list[i].overDrugPrice = list[i].retail_price
409
                   list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
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
                   list[i].overDrugPrice = "/"
421
                   list[i].overDrugPrice = "/"
412
                   list[i].oveDrugSaleMoney = "/"
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
               if(list!=null && list.length>0){
426
               if(list!=null && list.length>0){
417
                 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}
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
                 for(let i=0;i<list.length;i++){
428
                 for(let i=0;i<list.length;i++){
1475
          return 0
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
     created(){
1586
     created(){
1481
       this.org_id =  this.$store.getters.xt_user.org_id
1587
       this.org_id =  this.$store.getters.xt_user.org_id

+ 114 - 10
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

281
                   list[i].stockIn = list[i].GoodStartFlowInfo.over_count
281
                   list[i].stockIn = list[i].GoodStartFlowInfo.over_count
282
                 }else{
282
                 }else{
283
                   list[i].stockIn = this.getAllStockIn(list[i].StWarehousingInfoTwo) + this.getAllStockInFlow(list[i].WareStartInStockFlow) - this.getAllOutStockIn(list[i].WarehouseOutInfoTenty) - this.getAllStockOutFlow(list[i].WareStartOutStockFlow)
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
                   if(list[i].stockIn <0){
285
                   if(list[i].stockIn <0){
286
                     list[i].stockIn =0
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
                   list[i].stock_in_price = list[i].buy_price
293
                   list[i].stock_in_price = list[i].buy_price
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){
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
                }else{
299
                }else{
296
                 list[i].stock_in_price = "/"
300
                 list[i].stock_in_price = "/"
297
                 list[i].stockMoney = "/"
301
                 list[i].stockMoney = "/"
301
               
305
               
302
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
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
                list[i].addStockMoney = list[i].buy_price 
309
                list[i].addStockMoney = list[i].buy_price 
306
                 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)
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
                list[i].addStockMoney = "/"
315
                list[i].addStockMoney = "/"
309
                list[i].saleStockMoney = "/"
316
                list[i].saleStockMoney = "/"
310
               }
317
               }
311
              
318
              
312
 
319
 
313
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
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
                 list[i].stockOutprice = list[i].packing_price
322
                 list[i].stockOutprice = list[i].packing_price
316
                 list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
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
               }else{
327
               }else{
318
                 list[i].stockOutprice = "/"
328
                 list[i].stockOutprice = "/"
319
                 list[i].saleOutMoney = "/"
329
                 list[i].saleOutMoney = "/"
320
               }
330
               }
331
+
332
+
321
              
333
              
322
               if(this.org_id == 10265){
334
               if(this.org_id == 10265){
323
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
335
                 list[i].overStock = list[i].GoodEndFlowInfo.over_count
333
                
345
                
334
               }
346
               }
335
             
347
             
336
-              if(this.org_id == 0 || this.org_id ==10697){
348
+              if(this.org_id ==10697){
337
                 list[i].overPrice = list[i].packing_price
349
                 list[i].overPrice = list[i].packing_price
338
                 list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
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
               }else{
355
               }else{
340
                 list[i].overPrice = "/"
356
                 list[i].overPrice = "/"
341
                 list[i].overMoney = "/"
357
                 list[i].overMoney = "/"
351
               if(list.length!=null){
367
               if(list.length!=null){
352
                 for(let i=0;i<list.length;i++){
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
                   obj.stockMoney += parseFloat(list[i].stockMoney) 
370
                   obj.stockMoney += parseFloat(list[i].stockMoney) 
356
-                  //  obj.stockOutprice += (this.tableList[i].stockOutprice).toFixed(2)
371
+                 
357
                   obj.saleStockMoney += parseFloat(list[i].saleStockMoney)
372
                   obj.saleStockMoney += parseFloat(list[i].saleStockMoney)
358
 
373
 
359
                   obj.saleOutMoney += parseFloat(list[i].saleOutMoney)
374
                   obj.saleOutMoney += parseFloat(list[i].saleOutMoney)
360
-                  //  obj.overPrice += (this.tableList[i].overPrice).toFixed(2)
375
+                 
361
                   obj.overMoney += parseFloat(list[i].overMoney)
376
                   obj.overMoney += parseFloat(list[i].overMoney)
362
 
377
 
363
                 }
378
                 }
721
       return 0
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
   getAddStockMony(val,val2){
761
   getAddStockMony(val,val2){
725
     var total_price =0 
762
     var total_price =0 
726
     var total_price_one = 0
763
     var total_price_one = 0
901
       return 0
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
    stockOutprice(val,val2,val3){
970
    stockOutprice(val,val2,val3){
905
      var total_price = 0
971
      var total_price = 0
906
      var total_price_one = 0
972
      var total_price_one = 0
1207
       }
1273
       }
1208
       return count
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
     getAllOutStockIn(val){
1287
     getAllOutStockIn(val){
1211
        var count = 0 
1288
        var count = 0 
1212
        if(val!=null && val.length>0){
1289
        if(val!=null && val.length>0){
1216
        }
1293
        }
1217
        return count
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
     getAllStockInFlow(val){
1305
     getAllStockInFlow(val){
1220
       var count = 0
1306
       var count = 0
1221
       if(val!=null && val.length>0){
1307
       if(val!=null && val.length>0){
1225
       }
1311
       }
1226
       return count
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
     getAllStockOutFlow(val){
1323
     getAllStockOutFlow(val){
1229
       var count = 0
1324
       var count = 0
1230
       if(val!=null && val.length>0){
1325
       if(val!=null && val.length>0){
1234
       }
1329
       }
1235
       return count
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
     getAllQuery(){
1341
     getAllQuery(){
1238
 
1342
 
1239
      this.getlist()
1343
      this.getlist()

+ 106 - 4
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue View File

187
                     if(this.org_id == 0 || this.org_id ==10697){
187
                     if(this.org_id == 0 || this.org_id ==10697){
188
                       list[i].stock_in_price = list[i].buy_price
188
                       list[i].stock_in_price = list[i].buy_price
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{
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
                       list[i].stock_in_price = "/"
194
                       list[i].stock_in_price = "/"
192
                       list[i].stockMoney = "/"
195
                       list[i].stockMoney = "/"
193
                     }
196
                     }
198
                     if(this.org_id == 0 || this.org_id ==10697){
201
                     if(this.org_id == 0 || this.org_id ==10697){
199
                         list[i].addStockMoney = list[i].buy_price 
202
                         list[i].addStockMoney = list[i].buy_price 
200
                         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)
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
                         list[i].addStockMoney = "/"
208
                         list[i].addStockMoney = "/"
203
                         list[i].saleStockMoney = "/"
209
                         list[i].saleStockMoney = "/"
204
                       }
210
                       }
210
                     if(this.org_id == 0 || this.org_id == 10697){
216
                     if(this.org_id == 0 || this.org_id == 10697){
211
                       list[i].stockOutprice = list[i].packing_price
217
                       list[i].stockOutprice = list[i].packing_price
212
                       list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
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
                     }else{
222
                     }else{
214
                       list[i].stockOutprice = "/"
223
                       list[i].stockOutprice = "/"
215
                       list[i].saleOutMoney = "/"
224
                       list[i].saleOutMoney = "/"
224
                     if(this.org_id == 0 || this.org_id ==10697){
233
                     if(this.org_id == 0 || this.org_id ==10697){
225
                       list[i].overPrice = list[i].packing_price
234
                       list[i].overPrice = list[i].packing_price
226
                       list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
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
                      }else{
239
                      }else{
228
                         list[i].overPrice = "/"
240
                         list[i].overPrice = "/"
229
                         list[i].overMoney = "/"
241
                         list[i].overMoney = "/"
359
       return "0.00"
371
       return "0.00"
360
      }
372
      }
361
    },
373
    },
362
-     saleOutprice(val,val2,val3){
374
+    saleOutprice(val,val2,val3){
363
      var total_price = 0
375
      var total_price = 0
364
      var total_price_one = 0
376
      var total_price_one = 0
365
      var all_price = 0
377
      var all_price = 0
792
       }
804
       }
793
       return count
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
     getAllOutStockIn(val){
817
     getAllOutStockIn(val){
796
        var count = 0 
818
        var count = 0 
797
        if(val!=null && val.length>0){
819
        if(val!=null && val.length>0){
801
        }
823
        }
802
        return count
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
     getAllStockInFlow(val){
835
     getAllStockInFlow(val){
805
       var count = 0
836
       var count = 0
806
       if(val!=null && val.length>0){
837
       if(val!=null && val.length>0){
818
         }
849
         }
819
       }
850
       }
820
       return count
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
     created(){
926
     created(){

+ 7 - 50
src/xt_pages/user/courseOfDisease_new.vue View File

165
         width="70%"
165
         width="70%"
166
         top="0"
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
       </el-dialog>
170
       </el-dialog>
217
 
171
 
313
         patient:{},
267
         patient:{},
314
         AuToShow:false,
268
         AuToShow:false,
315
 
269
 
316
-        num:22222222
270
+        num:22222222,
317
       //   name:"",
271
       //   name:"",
318
       //  gander:"",
272
       //  gander:"",
319
       //  age:0,
273
       //  age:0,
320
       //  dialysis_no:"",
274
       //  dialysis_no:"",
321
-      //  patient_new:{},
275
+       patient_new:{},
322
       //  prescriptionList:[],
276
       //  prescriptionList:[],
323
       //  berforList:[],
277
       //  berforList:[],
324
       //  monitorList:[],
278
       //  monitorList:[],
577
         //     }
531
         //     }
578
         //   }
532
         //   }
579
         // })
533
         // })
534
+         this.getAutoPatientContent()
580
          this.AuToShow = true
535
          this.AuToShow = true
581
 
536
 
582
-      //  this.getAutoPatientContent()
537
+      
583
       },
538
       },
584
       // 本周
539
       // 本周
585
       getFirstDayOfWeek(date){
540
       getFirstDayOfWeek(date){
758
           if(response.data.state == 1){
713
           if(response.data.state == 1){
759
           
714
           
760
             var prescription =  response.data.data.prescription
715
             var prescription =  response.data.data.prescription
716
+
717
+            this.patient_new = response.data.data.patient
761
             var hd_total =0
718
             var hd_total =0
762
             var hdArr =[]
719
             var hdArr =[]
763
             var hdf_total =0
720
             var hdf_total =0

+ 3 - 0
src/xt_pages/user/text_content.vue View File

178
     },
178
     },
179
     num:{
179
     num:{
180
       type:Number
180
       type:Number
181
+    },
182
+    patient_new:{
183
+      type:Object
181
     }
184
     }
182
    },
185
    },
183
   data(){
186
   data(){