Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 1 month ago
parent
commit
0de28fa385

+ 36 - 35
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

754
               that.zuobiao_project = response.data.data.project
754
               that.zuobiao_project = response.data.data.project
755
               for (let i = 0; i < that.zuobiao_project.length; i++) {
755
               for (let i = 0; i < that.zuobiao_project.length; i++) {
756
                 for (let b = 0; b < that.tabProject.length; b++) {
756
                 for (let b = 0; b < that.tabProject.length; b++) {
757
-                  if (that.zuobiao_project[i].bbx01 == that.tabProject[b].bbx01 && that.zuobiao_project[i].bby06 == that.tabProject[b].single_dose) {
757
+                  if (that.zuobiao_project[i].bbx01 == that.tabProject[b].bbx01 && that.zuobiao_project[i].bby01 == that.tabProject[b].bby01) {
758
                     console.log(that.zuobiao_project[i].lsqty)
758
                     console.log(that.zuobiao_project[i].lsqty)
759
                     console.log(that.tabProject[b].zuobiao_stock_num)
759
                     console.log(that.tabProject[b].zuobiao_stock_num)
760
                     that.tabProject[b].zuobiao_stock_num = that.zuobiao_project[i].lsqty
760
                     that.tabProject[b].zuobiao_stock_num = that.zuobiao_project[i].lsqty
2627
                     // if(this.prescriptions[i].project[b].id == 0) {
2627
                     // if(this.prescriptions[i].project[b].id == 0) {
2628
                     // this.judgmentsGoodStock(this.prescriptions[i].project[b].good_info.bby01, this.prescriptions[i].project[b].good_info.bbx01,this.prescriptions[i].project[b].good_info.good_name,this.prescriptions[i].project[b].good_info.specification_name,this.prescriptions[i].project[b].total,isLoading)
2628
                     // this.judgmentsGoodStock(this.prescriptions[i].project[b].good_info.bby01, this.prescriptions[i].project[b].good_info.bbx01,this.prescriptions[i].project[b].good_info.good_name,this.prescriptions[i].project[b].good_info.specification_name,this.prescriptions[i].project[b].total,isLoading)
2629
                     for (let c = 0; c < this.zuobiao_project.length; c++) {
2629
                     for (let c = 0; c < this.zuobiao_project.length; c++) {
2630
-                      if (this.zuobiao_project[c].bbx01 == this.prescriptions[i].project[b].good_info.bbx01 && this.zuobiao_project[c].bby06 == this.prescriptions[i].project[b].good_info.specification_name) {
2630
+                      if (this.zuobiao_project[c].bbx01 == this.prescriptions[i].project[b].good_info.bbx01 && this.zuobiao_project[c].bby01 == this.prescriptions[i].project[b].good_info.bby01) {
2631
                         if (this.zuobiao_project[c].lsqty < parseInt(this.prescriptions[i].project[b].total)) {
2631
                         if (this.zuobiao_project[c].lsqty < parseInt(this.prescriptions[i].project[b].total)) {
2632
                           isLoading = false
2632
                           isLoading = false
2633
                           this.$message.error(this.prescriptions[i].project[b].good_info.good_name + '库存不足,无法保存')
2633
                           this.$message.error(this.prescriptions[i].project[b].good_info.good_name + '库存不足,无法保存')
3651
         }
3651
         }
3652
       }
3652
       }
3653
       if ((limit_remark.length > 0 && this.org_id == 10217)) {
3653
       if ((limit_remark.length > 0 && this.org_id == 10217)) {
3654
+        var that = this
3654
         this.$confirm(limit_remark, '限制用药提醒', {
3655
         this.$confirm(limit_remark, '限制用药提醒', {
3655
           confirmButtonText: '确 定',
3656
           confirmButtonText: '确 定',
3656
           cancelButtonText: '取 消',
3657
           cancelButtonText: '取 消',
3657
           type: 'warning'
3658
           type: 'warning'
3658
         }).then(() => {
3659
         }).then(() => {
3659
-          for (let i = 0; i < this.prescriptions.length; i++) {
3660
-            if (this.prescriptions[i].name == this.editableTabsValue) {
3661
-              var temp = this.deepClone(this.curDrugs)
3662
-              var temp2 = this.deepClone(this.teamList)
3660
+          for (let i = 0; i < that.prescriptions.length; i++) {
3661
+            if (that.prescriptions[i].name == that.editableTabsValue) {
3662
+              var temp = that.deepClone(that.curDrugs)
3663
+              var temp2 = that.deepClone(that.teamList)
3663
 
3664
 
3664
-              var temp3 = this.deepClone(templateDrugs)
3665
+              var temp3 = that.deepClone(templateDrugs)
3665
               if (temp3.length > 0) {
3666
               if (temp3.length > 0) {
3666
                 for (let b = 0; b < temp3.length; b++) {
3667
                 for (let b = 0; b < temp3.length; b++) {
3667
                   let obj = {
3668
                   let obj = {
3684
                     obj.prescribing_number = 1
3685
                     obj.prescribing_number = 1
3685
                   }
3686
                   }
3686
 
3687
 
3687
-                  this.prescriptions[i].advices.push(obj)
3688
+                  that.prescriptions[i].advices.push(obj)
3688
                 }
3689
                 }
3689
-                this.curStatus = 1
3690
+                that.curStatus = 1
3690
               }
3691
               }
3691
 
3692
 
3692
               let index = 0
3693
               let index = 0
3693
 
3694
 
3694
-              if (this.curPrescriptions.advices.length > 0) {
3695
-                index = this.curPrescriptions.advices.length
3695
+              if (that.curPrescriptions.advices.length > 0) {
3696
+                index = that.curPrescriptions.advices.length
3696
               }
3697
               }
3697
               let maxIndexAdvice =null
3698
               let maxIndexAdvice =null
3698
-              if (this.curPrescriptions.advices.length > 0) {
3699
-                for (let i = 0; i < this.curPrescriptions.advices.length; i++) {
3699
+              if (that.curPrescriptions.advices.length > 0) {
3700
+                for (let i = 0; i < that.curPrescriptions.advices.length; i++) {
3700
                   // 获取当前对象
3701
                   // 获取当前对象
3701
-                  let currentAdvice = this.curPrescriptions.advices[i]
3702
+                  let currentAdvice = that.curPrescriptions.advices[i]
3702
                   // 如果 maxIndexAdvice 为空或当前对象的序号大于最大序号对象的序号,则更新最大序号对象
3703
                   // 如果 maxIndexAdvice 为空或当前对象的序号大于最大序号对象的序号,则更新最大序号对象
3703
                   if (maxIndexAdvice == null) {
3704
                   if (maxIndexAdvice == null) {
3704
                     maxIndexAdvice = currentAdvice
3705
                     maxIndexAdvice = currentAdvice
3718
                     temp[b].retail_price = temp[b].min_price
3719
                     temp[b].retail_price = temp[b].min_price
3719
                   }
3720
                   }
3720
                   let temp_index = 0
3721
                   let temp_index = 0
3721
-                  if (this.org_id == 0 || this.org_id == 10206) {
3722
+                  if (that.org_id == 0 || that.org_id == 10206) {
3722
 
3723
 
3723
                     temp_index = maxIndexAdvice.groupno
3724
                     temp_index = maxIndexAdvice.groupno
3724
                   } else {
3725
                   } else {
3748
                     obj.prescribing_number = 1
3749
                     obj.prescribing_number = 1
3749
                   }
3750
                   }
3750
                   // 针对灵山圣康
3751
                   // 针对灵山圣康
3751
-                  if (this.org_id == 0 || this.org_id == 10375) {
3752
-                    if (this.prescriptions[i] != null) {
3753
-                      console.log('禅古this.prescriptions[i].advices.length', this.prescriptions[i].advices.length)
3754
-                      if (this.prescriptions[i].advices.length >= 5) {
3752
+                  if (that.org_id == 0 || that.org_id == 10375) {
3753
+                    if (that.prescriptions[i] != null) {
3754
+                      console.log('禅古this.prescriptions[i].advices.length', that.prescriptions[i].advices.length)
3755
+                      if (that.prescriptions[i].advices.length >= 5) {
3755
 
3756
 
3756
-                        this.$message.error('添加条数已经大于5条,添加失败!')
3757
+                        that.$message.error('添加条数已经大于5条,添加失败!')
3757
                         return false
3758
                         return false
3758
                       }
3759
                       }
3759
 
3760
 
3760
                     }
3761
                     }
3761
                   }
3762
                   }
3762
-                  this.prescriptions[i].advices.push(obj)
3763
+                  that.prescriptions[i].advices.push(obj)
3763
                 }
3764
                 }
3764
-                this.curStatus = 1
3765
+                that.curStatus = 1
3765
 
3766
 
3766
               }
3767
               }
3767
 
3768
 
3815
 
3816
 
3816
                   //   }
3817
                   //   }
3817
                   // }
3818
                   // }
3818
-                  this.prescriptions[i].project.push(obj)
3819
+                  that.prescriptions[i].project.push(obj)
3819
                 }
3820
                 }
3820
-                this.curStatus = 2
3821
+                that.curStatus = 2
3821
               }
3822
               }
3822
 
3823
 
3823
-              this.curPrescriptions = this.prescriptions[i]
3824
+              that.curPrescriptions = that.prescriptions[i]
3824
 
3825
 
3825
-              this.$refs.multipleTable.clearSelection()
3826
-              this.$refs.tables.clearSelection()
3827
-              this.clearSelection()
3826
+              that.$refs.multipleTable.clearSelection()
3827
+              that.$refs.tables.clearSelection()
3828
+              that.clearSelection()
3828
 
3829
 
3829
             }
3830
             }
3830
           }
3831
           }
3831
-          this.curDrugs = []
3832
-          this.preDrugs = []
3833
-          this.teamList = []
3832
+          that.curDrugs = []
3833
+          that.preDrugs = []
3834
+          that.teamList = []
3834
         }).catch(() => {
3835
         }).catch(() => {
3835
 
3836
 
3836
         })
3837
         })
3932
                 }
3933
                 }
3933
                 // 针对灵山圣康
3934
                 // 针对灵山圣康
3934
                 if (this.org_id == 0 || this.org_id == 10375) {
3935
                 if (this.org_id == 0 || this.org_id == 10375) {
3935
-             
3936
+
3936
                   if (this.prescriptions[i] != null) {
3937
                   if (this.prescriptions[i] != null) {
3937
                     console.log('禅古this.prescriptions[i].advices.length', this.prescriptions[i].advices.length)
3938
                     console.log('禅古this.prescriptions[i].advices.length', this.prescriptions[i].advices.length)
3938
                     if (this.prescriptions[i].advices.length >= 5) {
3939
                     if (this.prescriptions[i].advices.length >= 5) {
3991
                 }
3992
                 }
3992
                 // 针对灵山圣康
3993
                 // 针对灵山圣康
3993
                 // if (this.org_id == 0 || this.org_id == 10375) {
3994
                 // if (this.org_id == 0 || this.org_id == 10375) {
3994
-                  
3995
+
3995
                 //   if (this.prescriptions[i] != null) {
3996
                 //   if (this.prescriptions[i] != null) {
3996
-                    
3997
+
3997
                 //     if (this.prescriptions[i].project.length >= 5) {
3998
                 //     if (this.prescriptions[i].project.length >= 5) {
3998
                 //       this.$message.error('添加条数已经大于5条,添加失败!')
3999
                 //       this.$message.error('添加条数已经大于5条,添加失败!')
3999
                 //       return false
4000
                 //       return false
4172
             console.log('-=======')
4173
             console.log('-=======')
4173
             for (let i = 0; i < this.zuobiao_project.length; i++) {
4174
             for (let i = 0; i < this.zuobiao_project.length; i++) {
4174
               for (let b = 0; b < this.tabProject.length; b++) {
4175
               for (let b = 0; b < this.tabProject.length; b++) {
4175
-                if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01 && this.zuobiao_project[i].bby06 == this.tabProject[b].single_dose) {
4176
+                if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01 && this.zuobiao_project[i].bby01 == this.tabProject[b].bby01) {
4176
                   console.log(this.zuobiao_project[i].lsqty)
4177
                   console.log(this.zuobiao_project[i].lsqty)
4177
                   console.log(this.tabProject[b].zuobiao_stock_num)
4178
                   console.log(this.tabProject[b].zuobiao_stock_num)
4178
                   this.tabProject[b].zuobiao_stock_num = this.zuobiao_project[i].lsqty
4179
                   this.tabProject[b].zuobiao_stock_num = this.zuobiao_project[i].lsqty

+ 8 - 4
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

614
           }
614
           }
615
 
615
 
616
           console.log("数据wwwwwwwwwwwww",this.prescriptions[i].project)
616
           console.log("数据wwwwwwwwwwwww",this.prescriptions[i].project)
617
-          
617
+
618
           for (let b = 0; b < this.prescriptions[i].project.length; b++) {
618
           for (let b = 0; b < this.prescriptions[i].project.length; b++) {
619
             this.prescriptions[i].project[b].single_dose = this.prescriptions[i].project[b].single_dose.toString()
619
             this.prescriptions[i].project[b].single_dose = this.prescriptions[i].project[b].single_dose.toString()
620
             this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
620
             this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
631
           'prescriptions': this.prescriptions
631
           'prescriptions': this.prescriptions
632
         }
632
         }
633
         console.log("paramoowowowowoowowowowowowowow",data)
633
         console.log("paramoowowowowoowowowowowowowow",data)
634
-       
634
+
635
         createdTemplate(params, data).then(response => {
635
         createdTemplate(params, data).then(response => {
636
           if (response.data.state == 1) {
636
           if (response.data.state == 1) {
637
             this.$message.success('保存成功')
637
             this.$message.success('保存成功')
1789
           }
1789
           }
1790
         }
1790
         }
1791
         this.teamList = selection
1791
         this.teamList = selection
1792
-      }, 
1792
+      },
1793
       getPrescriptionTemplateInfo() {
1793
       getPrescriptionTemplateInfo() {
1794
         let params = {
1794
         let params = {
1795
           id: this.$route.query.id
1795
           id: this.$route.query.id
2081
                 first_letter:project[i].first_letter,
2081
                 first_letter:project[i].first_letter,
2082
                 number: "",
2082
                 number: "",
2083
                 bbx01:project[i].bbx01,
2083
                 bbx01:project[i].bbx01,
2084
+                bby01:project[i].bby01,
2085
+
2084
 
2086
 
2085
               }
2087
               }
2086
 
2088
 
2107
                 first_letter:good_info[i].first_letter,
2109
                 first_letter:good_info[i].first_letter,
2108
                 number: good_info[i].good_number,
2110
                 number: good_info[i].good_number,
2109
                 bbx01:good_info[i].bbx01,
2111
                 bbx01:good_info[i].bbx01,
2112
+                bby01:good_info[i].bby01,
2113
+
2110
 
2114
 
2111
               }
2115
               }
2112
               this.tabProject.push(obj)
2116
               this.tabProject.push(obj)
2121
               console.log("-=======")
2125
               console.log("-=======")
2122
               for (let i = 0; i < this.zuobiao_project.length; i++) {
2126
               for (let i = 0; i < this.zuobiao_project.length; i++) {
2123
                 for (let b = 0; b < this.tabProject.length; b++) {
2127
                 for (let b = 0; b < this.tabProject.length; b++) {
2124
-                  if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01 && this.zuobiao_project[i].bby06 == this.tabProject[b].single_dose){
2128
+                  if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01 && this.zuobiao_project[i].bby01 == this.tabProject[b].bby01){
2125
                     this.tabProject[b]["zuobiao_stock_num"] = this.zuobiao_project[i].lsqty
2129
                     this.tabProject[b]["zuobiao_stock_num"] = this.zuobiao_project[i].lsqty
2126
                     this.tabProject[b].price = this.zuobiao_project[i].price
2130
                     this.tabProject[b].price = this.zuobiao_project[i].price
2127
 
2131