瀏覽代碼

提交代码

陈少旭 1 年之前
父節點
當前提交
8c7078a9b7

+ 62 - 51
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

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

+ 3 - 8
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

162
                            v-on:month="changeMonth"
162
                            v-on:month="changeMonth"
163
                            v-on:day="changeDay"
163
                            v-on:day="changeDay"
164
                            :zuobiao_drug="zuobiao_drug"
164
                            :zuobiao_drug="zuobiao_drug"
165
-                           :zuobiao_project="zuobiao_project"
165
+
166
                            :month_prescriptions="month_prescriptions"
166
                            :month_prescriptions="month_prescriptions"
167
                            :org_id="org_id"
167
                            :org_id="org_id"
168
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
168
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
612
       anticoagulants_confit:null,
612
       anticoagulants_confit:null,
613
       patient_diagnoses:[],
613
       patient_diagnoses:[],
614
       zuobiao_drug:[],
614
       zuobiao_drug:[],
615
-      zuobiao_project:[],
615
+      // zuobiao_project:[],
616
     }
616
     }
617
   },
617
   },
618
 
618
 
1520
 
1520
 
1521
                   } else {
1521
                   } else {
1522
                     that.zuobiao_drug  = response.data.data.drug
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
                     //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
1524
                     //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
1525
                       for (let i = 0; i < that.zuobiao_drug.length; i++) {
1525
                       for (let i = 0; i < that.zuobiao_drug.length; i++) {
1526
                         for (let b = 0; b < that.drugs.length; b++) {
1526
                         for (let b = 0; b < that.drugs.length; b++) {
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
               })