陈少旭 1 gadu atpakaļ
vecāks
revīzija
8c7078a9b7

+ 62 - 51
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Parādīt failu

@@ -433,7 +433,7 @@
433 433
                                             <span v-else> {{ scope.row.total }}</span> -->
434 434
                                             <span v-if="org_id != 10206 && scope.row.type == 3 && scope.row.good_info.sum_count > 0">{{scope.row.good_info.sum_count}}</span>
435 435
 <!--                                            //针对坐标系统的库存数据-->
436
-                                            <span v-if="org_id == 10206 && scope.row.type == 3">{{scope.row.good_info.zuobiao_stock_num}}</span>
436
+                                            <span v-if="org_id == 10206 && scope.row.type == 3">{{scope.row.zuobiao_stock_num}}</span>
437 437
 
438 438
                                           </template>
439 439
                                       </el-table-column>
@@ -531,13 +531,13 @@ import { uParseTime } from '@/utils/tools'
531 531
 import NextOrLastPrescription from './nextOrLastPrescription'
532 532
 import CallPrescription from './callPrescription'
533 533
 import DayPrescriptionTable from '../../outpatientCharges/components/dayPrescriptionTable'
534
+import axios from 'axios'
534 535
 
535 536
 const moment = require('moment')
536 537
 
537 538
 export default {
538 539
   props: {
539 540
     zuobiao_drug:Array,
540
-    zuobiao_project:Array,
541 541
     drugs:Array,
542 542
     allDrugs:Array,
543 543
     advices_template:Array,
@@ -574,7 +574,9 @@ export default {
574 574
     additionalCharges
575 575
   },
576 576
   data() {
577
+
577 578
     return {
579
+      zuobiao_project:[],
578 580
       start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
579 581
       end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
580 582
       register10206: [
@@ -1622,9 +1624,6 @@ export default {
1622 1624
       this.$refs.additionalCharges.hide()
1623 1625
 
1624 1626
     }, searchProjectAction() {
1625
-      console.log('~~~~',this.search_project_keyword)
1626
-      console.log('5555',this.tabProject)
1627
-      console.log('6666',this.allProject)
1628 1627
       // console.log('4444',this.tabProject[1].first_letter.indexOf(this.search_project_keyword) != -1)
1629 1628
       if (this.search_project_keyword.length == 0) {
1630 1629
         this.tabProject = this.allProject
@@ -1632,7 +1631,6 @@ export default {
1632 1631
         let arr = []
1633 1632
         for (let i = 0; i < this.allProject.length; i++) {
1634 1633
 
1635
-            // console.log('4444',this.tabProject[i].first_letter.indexOf(this.search_project_keyword) != -1)
1636 1634
 
1637 1635
             if (this.allProject[i].project_name.indexOf(this.search_project_keyword) != -1) {
1638 1636
               arr = arr.concat(this.allProject[i])
@@ -1640,7 +1638,6 @@ export default {
1640 1638
 
1641 1639
         }
1642 1640
         this.tabProject = arr
1643
-        console.log('kkkk',this.tabProject);
1644 1641
       }
1645 1642
 
1646 1643
     }, searchProjectTeamAction() {
@@ -1889,7 +1886,6 @@ export default {
1889 1886
     },
1890 1887
 
1891 1888
     tabclickEvent(val) {
1892
-      console.log("li3333333333333li")
1893 1889
       for (let i = 0; i < this.prescriptions.length; i++) {
1894 1890
         if (this.prescriptions[i].name == val.name) {
1895 1891
           this.prescription_id = this.prescriptions[i].id
@@ -1957,7 +1953,6 @@ export default {
1957 1953
 
1958 1954
     },
1959 1955
     setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,sick,diagnoses,patient_diagnose) {
1960
-      console.log("诊断23333333333333",this.diagnose)
1961 1956
       this.sick = sick
1962 1957
       this.diagnoses = diagnoses
1963 1958
       this.department = department
@@ -2073,7 +2068,6 @@ export default {
2073 2068
 
2074 2069
 
2075 2070
       this.diagnose = []
2076
-      console.log("处方----------------------------------------------",info.id)
2077 2071
       if (info.id == 0) {
2078 2072
         if (last_info.diagnosis.length == 0) {
2079 2073
           this.diagnose = []
@@ -2125,8 +2119,6 @@ export default {
2125 2119
 
2126 2120
       }
2127 2121
 
2128
-      // console.log("info233333333333333333333",info.id)
2129
-      // console.log("LAST_INFO2323232323WO",last_info.patient_diagnosis)
2130 2122
       this.patient_diagnose = []
2131 2123
       if(info.id == 0){
2132 2124
         if (last_info.patient_diagnosis.length == 0) {
@@ -2155,7 +2147,6 @@ export default {
2155 2147
           }
2156 2148
 
2157 2149
         }
2158
-        console.log("hhahahahah",this.patient_diagnose)
2159 2150
       }
2160 2151
 
2161 2152
       this.state1 = info.sick_type
@@ -2287,7 +2278,6 @@ export default {
2287 2278
     },
2288 2279
 
2289 2280
     moreState(tab, event) {
2290
-      console.log("li222222222")
2291 2281
       if (tab == 'more') {
2292 2282
         return false
2293 2283
       }
@@ -2395,7 +2385,6 @@ export default {
2395 2385
           //   }
2396 2386
           // }
2397 2387
           if (index == 1) {
2398
-            console.log(this.prescriptions)
2399 2388
 
2400 2389
             if (this.org_id != 10206 && this.org_id != 0) {
2401 2390
               for (let i = 0; i < this.prescriptions.length; i++) {
@@ -2475,7 +2464,6 @@ export default {
2475 2464
                   this.$emit('editKeepLoad', false)
2476 2465
                   return
2477 2466
                 }
2478
-                console.log("2o23o23o23o2o23",this.prescriptions[i].advices[b])
2479 2467
                 if(this.prescriptions[i].advices[b].day == NaN){
2480 2468
                   this.$message.error(`处方${i+1}的${this.prescriptions[i].advices[b].drug_name}天数未填写`)
2481 2469
                   this.$emit('editKeepLoad', false)
@@ -2549,8 +2537,6 @@ export default {
2549 2537
               'prescriptions': this.prescriptions
2550 2538
             }
2551 2539
             isLoading = true
2552
-            console.log('this.prescriptionsthis.prescriptions', this.prescriptions)
2553
-            console.log('this.prescriptionsthis.prescriptions', params)
2554 2540
             let num = 0
2555 2541
             // this.prescriptions.map(item => {
2556 2542
             //   if (item.advices.length > 0) {
@@ -2569,7 +2555,6 @@ export default {
2569 2555
               var arr_one = []
2570 2556
               var arr_Two = []
2571 2557
 
2572
-              console.log("ooo233323233232323232",this.prescriptions)
2573 2558
 
2574 2559
              //药品
2575 2560
               for(let i=0;i<this.prescriptions.length;i++){
@@ -2577,7 +2562,6 @@ export default {
2577 2562
                   for(let j=0;j<this.prescriptions[i].advices.length;j++){
2578 2563
                      arr.push(this.prescriptions[i].advices[j])
2579 2564
                   }
2580
-                  console.log("arr99999999999999",arr)
2581 2565
                   if(arr.length > 0){
2582 2566
                     let objInfo = {};
2583 2567
                     arr.forEach((item, index) => {
@@ -2604,7 +2588,6 @@ export default {
2604 2588
                         }
2605 2589
                       }
2606 2590
                     }
2607
-                    console.log("河滨232332newArr",newArr)
2608 2591
                     if(newArr.length >0){
2609 2592
                       for(let i=0;i<newArr.length;i++){
2610 2593
                         for(let j=0;j<newArr[i].child.length;j++){
@@ -2620,7 +2603,6 @@ export default {
2620 2603
                            }
2621 2604
                         }
2622 2605
                       }
2623
-                       console.log("wodeshju",newArr)
2624 2606
                        for(let i=0;i<newArr.length;i++){
2625 2607
                         for(let j=0;j<newArr[i].child.length;j++){
2626 2608
                            newArr[i].out_count +=  newArr[i].child[j].prescribing_number_total
@@ -2644,7 +2626,6 @@ export default {
2644 2626
 
2645 2627
 
2646 2628
 
2647
-                    console.log("newArr",newArr )
2648 2629
                   }
2649 2630
                 }
2650 2631
 
@@ -2659,7 +2640,6 @@ export default {
2659 2640
                        arr_Two.push(this.prescriptions[i].advices[j])
2660 2641
                      }
2661 2642
                    }
2662
-                   console.log("编辑处方",arr_one)
2663 2643
                    if(arr_one.length > 0){
2664 2644
 
2665 2645
                     let objInfo = {};
@@ -2678,7 +2658,6 @@ export default {
2678 2658
                       }
2679 2659
                     });
2680 2660
                     let newArr = Object.values(objInfo);
2681
-                    console.log("newArr",newArr)
2682 2661
 
2683 2662
                     for(let i=0;i<arr_one.length;i++){
2684 2663
                       for(let j=0;j<newArr.length;j++){
@@ -2698,7 +2677,6 @@ export default {
2698 2677
                         }
2699 2678
                       }
2700 2679
                     }
2701
-                    console.log("new233223322323",newArr)
2702 2680
                     if(newArr.length > 0 &&  this.org_id != 10206 && this.org_id != 0){
2703 2681
                       for(let i=0;i<newArr.length;i++){
2704 2682
                         if(newArr[i].is_user!=1){
@@ -2823,7 +2801,6 @@ export default {
2823 2801
 
2824 2802
                   }
2825 2803
              }
2826
-             console.log("params23332232323232323------",data)
2827 2804
               createHisPrescription(data, params).then(response => {
2828 2805
                 if (response.data.state == 1) {
2829 2806
                   this.$emit('change', this.patientInfo.id)
@@ -2933,7 +2910,6 @@ export default {
2933 2910
     },
2934 2911
     addTab(targetName) {
2935 2912
 
2936
-      console.log("this.prescriptionsaaaaaa",this.prescriptions)
2937 2913
       for(let i = 0; i < this.prescriptions.length; i++){
2938 2914
         if (this.prescriptions[i].is_medicine_status) {
2939 2915
           this.$message.error('处方中包含已发药处方,无法新增')
@@ -3024,7 +3000,6 @@ export default {
3024 3000
 
3025 3001
     },
3026 3002
     removeTab(targetName) {
3027
-      console.log("1111111111111111")
3028 3003
       if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 || this.curPrescriptions.is_medicine_status) {
3029 3004
         this.$message.error('该处方已经结算或者记账或者已发药,无法删除')
3030 3005
         return
@@ -3035,7 +3010,6 @@ export default {
3035 3010
         type: 'warning'
3036 3011
       }).then(() => {
3037 3012
         let id = 0
3038
-        console.log("this.prescriptions???",this.prescriptions)
3039 3013
         for (let i = 0; i < this.prescriptions.length; i++) {
3040 3014
           if (this.prescriptions[i].name == targetName) {
3041 3015
             id = this.prescriptions[i].id
@@ -3070,12 +3044,9 @@ export default {
3070 3044
               }
3071 3045
             }
3072 3046
           }
3073
-          console.log("oo233ooooosdada",this.prescriptions)
3074 3047
           if (this.prescriptions.length == 0) {
3075
-            console.log("this.curPrescrip的tions前",this.curPrescriptions)
3076 3048
             this.curPrescriptions = []
3077 3049
             this.curStatus = 0
3078
-            console.log("this.curPrescrip的tions后",this.curPrescriptions)
3079 3050
           }
3080 3051
           this.$parent.getInitDataOne(this.prescriptions)
3081 3052
         } else {
@@ -3087,8 +3058,6 @@ export default {
3087 3058
               this.$message.success('删除成功!')
3088 3059
               let tabs = this.prescriptions
3089 3060
               let activeName = this.editableTabsValue
3090
-              console.log("targetName",targetName)
3091
-              console.log("activeName",activeName)
3092 3061
               if (activeName === targetName) {
3093 3062
                 tabs.forEach((tab, index) => {
3094 3063
                   if (tab.name === targetName) {
@@ -3122,7 +3091,6 @@ export default {
3122 3091
 
3123 3092
               this.$parent.getInitData()
3124 3093
               this.$parent.getInitDataOne(this.prescriptions)
3125
-              console.log("删除后的数据是",this.prescriptions)
3126 3094
             } else {
3127 3095
               this.$message.error(response.data.msg)
3128 3096
             }
@@ -3210,7 +3178,6 @@ export default {
3210 3178
       this.$refs.additionalCharges.show()
3211 3179
     },
3212 3180
     selectDrugs(selection, row) {
3213
-      console.log("row233232233232",row)
3214 3181
       // if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id == 3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id == 10245 || this.org_id == 9919 || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 || this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217 || this.org_id ==10210 || this.org_id ==10318 || this.org_id ==10340){
3215 3182
       //     if (row.count <= 0) {
3216 3183
       //       if (selection) {
@@ -3402,7 +3369,6 @@ export default {
3402 3369
           var temp2 = this.deepClone(this.teamList)
3403 3370
 
3404 3371
           var temp3 = this.deepClone(templateDrugs)
3405
-         console.log("我的23323232232323232323哈哈哈哈哈哈",temp)
3406 3372
           if (temp3.length > 0) {
3407 3373
             for (let b = 0; b < temp3.length; b++) {
3408 3374
               let obj = {
@@ -3514,7 +3480,6 @@ export default {
3514 3480
               if (obj.type == 3) {
3515 3481
                 obj.single_dose = 1
3516 3482
               }
3517
-              console.log('项目obj', temp2)
3518 3483
               this.prescriptions[i].project.push(obj)
3519 3484
             }
3520 3485
             this.curStatus = 2
@@ -3535,7 +3500,6 @@ export default {
3535 3500
       this.teamList = row
3536 3501
     },
3537 3502
     selectChange(selection, row) {
3538
-      console.log('row', selection)
3539 3503
       // if(this.org_id == 10138 || this.org_id == 9671 || this.org_id == 9675 || this.org_id == 4 || this.org_id ==3877 || this.org_id == 10028 || this.org_id == 10243 || this.org_id == 10188 || this.org_id ==10245 || this.org_id == 9919  || this.org_id == 10106 || this.org_id == 9504 || this.org_id ==10215 ||  this.org_id == 10188 || this.org_id == 10265 || this.org_id == 10164 || this.org_id == 9956 || this.org_id == 10188 || this.org_id == 10191 || this.org_id == 10278 || this.org_id == 10217 || this.org_id ==10210 || this.org_id ==10318 || this.org_id ==10340){
3540 3504
       //    if (row.stock_count <= 0) {
3541 3505
       //     if (row.type == 3) {
@@ -3609,7 +3573,6 @@ export default {
3609 3573
       getHisProject().then(response => {
3610 3574
         if (response.data.state == 1) {
3611 3575
           var project = response.data.data.project
3612
-          console.log("项目列表",project)
3613 3576
           for (let i = 0; i < project.length; i++) {
3614 3577
             let obj = {
3615 3578
               id: project[i].id,
@@ -3633,7 +3596,6 @@ export default {
3633 3596
               zuobiao_stock_num:0,
3634 3597
 
3635 3598
             }
3636
-            // console.log('hhhhh',obj);
3637 3599
             this.tabProject.push(obj)
3638 3600
           }
3639 3601
 
@@ -3648,6 +3610,7 @@ export default {
3648 3610
               }
3649 3611
             }
3650 3612
 
3613
+
3651 3614
             let obj = {
3652 3615
               id: good_info[i].id,
3653 3616
               project_name: good_info[i].good_name,
@@ -3672,8 +3635,10 @@ export default {
3672 3635
             }
3673 3636
             this.tabProject.push(obj)
3674 3637
           }
3638
+
3639
+
3675 3640
           //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
3676
-          if(this.org_id == 10206 ) {
3641
+          if(this.org_id == 10206) {
3677 3642
             for (let i = 0; i < this.zuobiao_project.length; i++) {
3678 3643
               for (let b = 0; b < this.tabProject.length; b++) {
3679 3644
                 if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01){
@@ -3682,10 +3647,7 @@ export default {
3682 3647
               }
3683 3648
             }
3684 3649
           }
3685
-          console.log("=========")
3686
-          console.log(this.zuobiao_project)
3687
-          console.log( this.tabProject)
3688
-          console.log("=========")
3650
+
3689 3651
           this.allProject = this.tabProject
3690 3652
           // console.log('cccc',this.allProject);
3691 3653
         }
@@ -3831,12 +3793,10 @@ export default {
3831 3793
       if (this.dayorMonth == 'day') {
3832 3794
         this.$emit('day')
3833 3795
       } else if (this.dayorMonth == 'month') {
3834
-        console.log('~~~~~~')
3835 3796
         let form = {
3836 3797
           id: this.patientInfo.id,
3837 3798
           his_patient_id: this.hisPatientInfo.id
3838 3799
         }
3839
-        console.log(form)
3840 3800
         this.$emit('month', form)
3841 3801
       }
3842 3802
     },
@@ -3850,12 +3810,45 @@ export default {
3850 3810
     },
3851 3811
     clearSelection() {
3852 3812
       this.$refs.tabProjectTeam.clearSelection()
3853
-    }
3813
+    },getstock(){
3814
+      if(this.org_id == 10206){
3815
+        var that = this
3816
+        axios.get("http://127.0.0.1:9532" + '/nmg/coordinate/querystock', {
3817
+
3818
+        })
3819
+          .then(function(response) {
3820
+            if (response.data.state == 0) {
3821
+              that.$message.error(response.data.msg)
3822
+              that.loadingtwo = false
3823
+              return false
3824
+            } else {
3825
+              if (response.data.data.failed_code == -10) {
3826
+                that.$confirm(response.data.data.msg, '医保错误信息', {
3827
+                  confirmButtonText: '确 定',
3828
+                  type: 'warning'
3829
+                }).then(() => {
3830
+
3831
+                }).catch(() => {
3832
+                })
3833
+
3834
+              } else {
3835
+                that.zuobiao_project  = response.data.data.project
3836
+              }
3837
+            }
3838
+          })
3839
+          .catch(function(error) {
3840
+          })
3841
+      }
3842
+
3843
+
3844
+    },
3854 3845
   }, mounted() {
3855 3846
     this.request_record_date = this.record_date
3856 3847
     // this.getInitData()
3848
+    this.getstock()
3857 3849
     //获取所有项目
3858 3850
     this.getlist()
3851
+
3859 3852
     //获取所以项目组套
3860 3853
     this.getAllProjectTeam()
3861 3854
 
@@ -3866,7 +3859,25 @@ export default {
3866 3859
 
3867 3860
   },
3868 3861
   watch: {
3869
-
3862
+    // tabProject:{//深度监听,可监听到对象、数组的变化
3863
+    //   handler(val, oldVal) {
3864
+    //     if(this.org_id == 10206 ) {
3865
+    //       console.log("~~~~~~~")
3866
+    //       console.log(this.zuobiao_project)
3867
+    //       console.log(this.tabProject)
3868
+    //       for (let i = 0; i < this.zuobiao_project.length; i++) {
3869
+    //         for (let b = 0; b < this.tabProject.length; b++) {
3870
+    //           if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01){
3871
+    //             this.tabProject[b].zuobiao_stock_num = this.zuobiao_project[i].lsqty
3872
+    //           }
3873
+    //         }
3874
+    //       }
3875
+    //       console.log(this.tabProject)
3876
+    //
3877
+    //     }
3878
+    //   },
3879
+    //   deep: true
3880
+    // },
3870 3881
     fullHeight(val) {
3871 3882
       if (!this.timer) {
3872 3883
         this.fullHeight = val

+ 3 - 8
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Parādīt failu

@@ -162,7 +162,7 @@
162 162
                            v-on:month="changeMonth"
163 163
                            v-on:day="changeDay"
164 164
                            :zuobiao_drug="zuobiao_drug"
165
-                           :zuobiao_project="zuobiao_project"
165
+
166 166
                            :month_prescriptions="month_prescriptions"
167 167
                            :org_id="org_id"
168 168
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
@@ -612,7 +612,7 @@ export default {
612 612
       anticoagulants_confit:null,
613 613
       patient_diagnoses:[],
614 614
       zuobiao_drug:[],
615
-      zuobiao_project:[],
615
+      // zuobiao_project:[],
616 616
     }
617 617
   },
618 618
 
@@ -1520,7 +1520,7 @@ export default {
1520 1520
 
1521 1521
                   } else {
1522 1522
                     that.zuobiao_drug  = response.data.data.drug
1523
-                    that.zuobiao_project  = response.data.data.project
1523
+                    // that.zuobiao_project  = response.data.data.project
1524 1524
                     //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
1525 1525
                       for (let i = 0; i < that.zuobiao_drug.length; i++) {
1526 1526
                         for (let b = 0; b < that.drugs.length; b++) {
@@ -1530,11 +1530,6 @@ export default {
1530 1530
                         }
1531 1531
                       }
1532 1532
 
1533
-                    console.log("------~~00000-------")
1534
-                    console.log(that.drugs)
1535
-                    console.log(that.zuobiao_drug)
1536
-                    console.log(that.zuobiao_project)
1537
-                    console.log("------~~00000-------")
1538 1533
                   }
1539 1534
                 }
1540 1535
               })