Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 years ago
parent
commit
1195d9a5c5

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderFortyThree.vue View File

@@ -976,7 +976,7 @@ export default {
976 976
         // console.log('透后体重', this.afterdialysis)
977 977
         this.lastafterdialysis = response.data.data.assessmentAfterDislysis
978 978
         this.operators = response.data.data.operators
979
-        console.log('operators', this.operators)
979
+        // console.log('operators', this.operators)
980 980
         this.dialysisOrder =
981 981
           response.data.data.dialysisOrder === null
982 982
             ? null

+ 55 - 55
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

@@ -495,65 +495,65 @@
495 495
         }
496 496
       },
497 497
       changePrescribingNumber(scope) {
498
-        //  var max_number = 0 
499
-        //  if(scope.row.prescribing_number_unit == scope.row.drug.max_unit){
500
-        //     max_number = parseInt(scope.row.prescribing_number) * scope.row.drug.min_number 
501
-        //  }
502
-        //  if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
503
-        //    max_number = parseInt(scope.row.prescribing_number)
504
-        //  }
505
-        //  console.log("修改的数量",max_number)
506
-        //  //查询该药品库存
507
-        //  if(this.drugList.length > 0){
508
-        //     var stock_number = 0
509
-        //     for(let i=0;i<this.drugList.length;i++){
510
-        //       if(scope.row.id == this.drugList[i].id){
511
-        //          for(let j=0;j<this.drugList[i].stock_in.length;j++){
512
-        //             stock_number += this.drugList[i].stock_in[j].stock_max_number * this.drugList[i].min_number + this.drugList[i].stock_in[j].stock_min_number
513
-        //          }
514
-        //       }
515
-        //     }
516
-        //     console.log("库存数量",stock_number)
517
-        //  }
518
-        // if(scope.row.advice_id > 0){
519
-        //   //获取该药品上一次出库的的数量
520
-        //   getHisDoctorAdviceInfo(scope.row.advice_id).then(response=>{
521
-        //     if(response.data.state == 1){
522
-        //        var out_count  = 0
523
-        //        var adviceList = response.data.data.advice
524
-        //        if(adviceList.prescribing_number_unit == adviceList.drug.max_number){
525
-        //            out_count = adviceList.prescribing_number * adviceList.drug.min_number
526
-        //        }
527
-        //        if(adviceList.prescribing_number_unit == adviceList.drug.min_unit){
528
-        //           out_count = adviceList.prescribing_number
529
-        //        }
498
+         var max_number = 0 
499
+         if(scope.row.prescribing_number_unit == scope.row.drug.max_unit){
500
+            max_number = parseInt(scope.row.prescribing_number) * scope.row.drug.min_number 
501
+         }
502
+         if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
503
+           max_number = parseInt(scope.row.prescribing_number)
504
+         }
505
+         console.log("修改的数量",max_number)
506
+         //查询该药品库存
507
+         if(this.drugList.length > 0){
508
+            var stock_number = 0
509
+            for(let i=0;i<this.drugList.length;i++){
510
+              if(scope.row.id == this.drugList[i].id){
511
+                 for(let j=0;j<this.drugList[i].stock_in.length;j++){
512
+                    stock_number += this.drugList[i].stock_in[j].stock_max_number * this.drugList[i].min_number + this.drugList[i].stock_in[j].stock_min_number
513
+                 }
514
+              }
515
+            }
516
+            console.log("库存数量",stock_number)
517
+         }
518
+        if(scope.row.advice_id > 0){
519
+          //获取该药品上一次出库的的数量
520
+          getHisDoctorAdviceInfo(scope.row.advice_id).then(response=>{
521
+            if(response.data.state == 1){
522
+               var out_count  = 0
523
+               var adviceList = response.data.data.advice
524
+               if(adviceList.prescribing_number_unit == adviceList.drug.max_number){
525
+                   out_count = adviceList.prescribing_number * adviceList.drug.min_number
526
+               }
527
+               if(adviceList.prescribing_number_unit == adviceList.drug.min_unit){
528
+                  out_count = adviceList.prescribing_number
529
+               }
530 530
                
531
-        //        //如果更改的数量大于修改之前的数量
532
-        //        if(max_number > out_count){
533
-        //          if((max_number - out_count)>stock_number){
534
-        //            this.$message.error(scope.row.drug_name + '库存不足')
535
-        //          }
536
-        //        }
537
-        //     }
538
-        //   })
539
-        // }
540
-
541
-        // if(scope.row.advice_id == 0){
542
-        //    if(max_number > stock_number){
543
-        //     this.$message.error(scope.row.drug_name + '库存不足')
544
-        //    }
545
-        // }
546
-        
531
+               //如果更改的数量大于修改之前的数量
532
+               if(max_number > out_count){
533
+                 if((max_number - out_count)>stock_number){
534
+                   this.$message.error(scope.row.drug_name + '库存不足')
535
+                 }
536
+               }
537
+            }
538
+          })
539
+        }
547 540
 
548
-        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
549
-          if (parseInt(scope.row.prescribing_number) > scope.row.drug.total) {
541
+        if(scope.row.advice_id == 0){
542
+           if(max_number > stock_number){
550 543
             this.$message.error(scope.row.drug_name + '库存不足')
551
-          }
552
-        } else {
553
-          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
554
-            this.$message.error(scope.row.drug_name + '库存不足')
555
-          }
544
+           }
556 545
         }
546
+        
547
+
548
+        // if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
549
+        //   if (parseInt(scope.row.prescribing_number) > scope.row.drug.total) {
550
+        //     this.$message.error(scope.row.drug_name + '库存不足')
551
+        //   }
552
+        // } else {
553
+        //   if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
554
+        //     this.$message.error(scope.row.drug_name + '库存不足')
555
+        //   }
556
+        // }
557 557
       },
558 558
       getProjectSingleDose(scope) {
559 559
         this.prescription.project[scope.$index].total = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.number_days ? scope.row.number_days : 1)

+ 5 - 5
src/xt_pages/stock/drugs/query.vue View File

@@ -839,11 +839,11 @@ import { min } from 'moment'
839 839
            out_count += (info[j].stock_max_number + info[j].stock_min_number)
840 840
         }
841 841
        
842
-        for(let z=0;z<cancel_info.length;z++){
843
-           cancel_count += cancel_info[z].count
844
-        }
845
-        over_count = total - out_count + cancel_count
846
-    
842
+        // for(let z=0;z<cancel_info.length;z++){
843
+        //    cancel_count += cancel_info[z].count
844
+        // }
845
+       // over_count = total - out_count + cancel_count
846
+         over_count = total - out_count 
847 847
         if(parseInt(over_count/min_number)!=0){
848 848
             str = parseInt(over_count/min_number)+ max_unit
849 849
          }

+ 4 - 1
src/xt_pages/stock/stockQuery.vue View File

@@ -109,8 +109,11 @@
109 109
        <el-table-column label="出库数量" align="center" v-if="showOne">
110 110
          <template slot-scope="scope">
111 111
           <span v-if="org_id == 9671 || org_id == 10138 || org_id == 10028 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10243 || org_id == 10088 || org_id== 10245 || org_id == 9779 || org_id == 10106 || org_id == 9504 || org_id ==  10215 || org_id ==  10088 || org_id == 10191 || org_id == 9919 || org_id == 10265 || org_id == 10164">
112
-            <span>
112
+            <!-- <span>
113 113
               {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info) + getCancelSotckInfo(scope.row.cancel_stock_info) }}
114
+            </span> -->
115
+             <span>
116
+              {{getWareInfo(scope.row.xt_warehouse_info) - getOverFlushInfo(scope.row.xt_warehouse_info)}}
114 117
             </span>
115 118
           </span>
116 119
           <span v-else>{{getAutoCount(scope.row.id) + getOutCount(scope.row.id)}} </span>