Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
62dc71bbba

+ 7 - 9
src/api/his/his.js View File

@@ -533,10 +533,6 @@ export function GetLabelInfo(params) {
533 533
   })
534 534
 }
535 535
 
536
-
537
-
538
-
539
-
540 536
 export function createFaPiao(params) {
541 537
   return request({
542 538
     url: '/api/fapiao/create',
@@ -577,7 +573,6 @@ export function GetFaPiao(params) {
577 573
   })
578 574
 }
579 575
 
580
-
581 576
 export function postFaPiaoIsUse(params) {
582 577
   return request({
583 578
     url: '/api/fapiao/is_use',
@@ -586,8 +581,6 @@ export function postFaPiaoIsUse(params) {
586 581
   })
587 582
 }
588 583
 
589
-
590
-
591 584
 export function deleteNCDSRecord(params) {
592 585
   return request({
593 586
     url: '/api/psn/ncds/delete',
@@ -596,7 +589,6 @@ export function deleteNCDSRecord(params) {
596 589
   })
597 590
 }
598 591
 
599
-
600 592
 export function getBaiLinRecord(params) {
601 593
   return request({
602 594
     url: '/api/bailin/export',
@@ -605,5 +597,11 @@ export function getBaiLinRecord(params) {
605 597
   })
606 598
 }
607 599
 
608
-
600
+export function getHisDoctorAdviceInfo(id, params) {
601
+  return request({
602
+    url: '/api/his/gethistdoctoradviceinfo?id=' + id,
603
+    method: 'get',
604
+    params: params
605
+  })
606
+}
609 607
 

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

@@ -706,12 +706,17 @@
706 706
               <el-input v-model="form.replacement_rate"></el-input>
707 707
             </el-form-item>
708 708
           </el-col>
709
-          <el-col :span="8" v-if=" isShow('置换量') &&  ((template_id != 6 || org_id == 9919 || org_id == 10191) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29)">
709
+           <el-col :span="8" v-if=" isShow('置换量') &&  (template_id == 43)">
710
+            <el-form-item label="置换量(ml/h):">
711
+              <el-input v-model="form.displacement_quantity"></el-input>
712
+            </el-form-item>
713
+          </el-col>
714
+          <el-col :span="8" v-if=" isShow('置换量') &&  ((template_id != 6 || org_id == 9919 || org_id == 10191) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id!=43)">
710 715
             <el-form-item label="置换量(L):">
711 716
               <el-input v-model="form.displacement_quantity"></el-input>
712 717
             </el-form-item>
713 718
           </el-col>
714
-          <el-col :span="8" v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id!=10191) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29)">
719
+          <el-col :span="8" v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id!=10191 && template_id!=43) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29)">
715 720
             <el-form-item label="置换量(ml):">
716 721
               <el-input v-model="form.displacement_quantity"></el-input>
717 722
             </el-form-item>

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

@@ -315,7 +315,7 @@
315 315
                       <div class="under_line" style="width: 150px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 22">
316 316
                         血浆胆红素吸附+HDF
317 317
                       </div>
318
-                      <div class="under_line" style="width: 150px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 23">
318
+                      <div class="under_line" style="bwidth: 150px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 23">
319 319
                         血浆胆红素吸附
320 320
                       </div>
321 321
                       <div class="under_line" style="width:100px;text-align: center;font-weight:600;" v-if="prescription.mode_id == 29">

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

@@ -210,7 +210,7 @@
210 210
 
211 211
 <script>
212 212
   import { getDictionaryDataConfig } from '@/utils/data'
213
-  import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
213
+  import { delHisAddition, delHisAdvice, delHisProject, getInitData,getHisDoctorAdviceInfo } from '@/api/his/his'
214 214
 
215 215
   export default {
216 216
     props: {
@@ -225,7 +225,9 @@
225 225
             advices: [],
226 226
             project: [],
227 227
             drugways: [],
228
-            efs: []
228
+            efs: [],
229
+            drugList:[],
230
+            adviceList:{}
229 231
           }
230 232
         }
231 233
       }
@@ -316,6 +318,7 @@
316 318
           } else {
317 319
             this.drugways = response.data.data.drugways
318 320
             this.efs = response.data.data.efs
321
+            this.drugList = response.data.data.drugs
319 322
           }
320 323
         })
321 324
 
@@ -492,6 +495,56 @@
492 495
         }
493 496
       },
494 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
+        //        }
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
+        
547
+
495 548
         if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
496 549
           if (parseInt(scope.row.prescribing_number) > scope.row.drug.total) {
497 550
             this.$message.error(scope.row.drug_name + '库存不足')
@@ -550,7 +603,8 @@
550 603
           num = 1
551 604
         }
552 605
         return num
553
-      }
606
+      },
607
+     
554 608
     }, mounted() {
555 609
       this.getInitData()
556 610