Browse Source

提交代码

陈少旭 1 year ago
parent
commit
83f9a30d20
1 changed files with 35 additions and 34 deletions
  1. 35 34
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue

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

@@ -3650,18 +3650,19 @@ export default {
3650 3650
           }
3651 3651
         }
3652 3652
       }
3653
-      if ((limit_remark.length > 0 && this.org_id == 10217)) {
3653
+      if ((limit_remark.length > 0 && (this.org_id == 10217 || this.org_id == 0))) {
3654
+        var that = this
3654 3655
         this.$confirm(limit_remark, '限制用药提醒', {
3655 3656
           confirmButtonText: '确 定',
3656 3657
           cancelButtonText: '取 消',
3657 3658
           type: 'warning'
3658 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 3666
               if (temp3.length > 0) {
3666 3667
                 for (let b = 0; b < temp3.length; b++) {
3667 3668
                   let obj = {
@@ -3684,21 +3685,21 @@ export default {
3684 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 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 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 3703
                   // 如果 maxIndexAdvice 为空或当前对象的序号大于最大序号对象的序号,则更新最大序号对象
3703 3704
                   if (maxIndexAdvice == null) {
3704 3705
                     maxIndexAdvice = currentAdvice
@@ -3718,7 +3719,7 @@ export default {
3718 3719
                     temp[b].retail_price = temp[b].min_price
3719 3720
                   }
3720 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 3724
                     temp_index = maxIndexAdvice.groupno
3724 3725
                   } else {
@@ -3748,20 +3749,20 @@ export default {
3748 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 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
 
@@ -3806,31 +3807,31 @@ export default {
3806 3807
                     obj.single_dose = 1
3807 3808
                   }
3808 3809
                   // 针对灵山圣康
3809
-                  if (this.org_id == 0 || this.org_id == 10375) {
3810
-                    if (this.prescriptions[i] != null) {
3811
-                      if (this.prescriptions[i].project.length >= 5) {
3812
-                        this.$message.error('添加条数已经大于5条,添加失败!')
3810
+                  if (that.org_id == 0 || that.org_id == 10375) {
3811
+                    if (that.prescriptions[i] != null) {
3812
+                      if (that.prescriptions[i].project.length >= 5) {
3813
+                        that.$message.error('添加条数已经大于5条,添加失败!')
3813 3814
                         return false
3814 3815
                       }
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 3835
         }).catch(() => {
3835 3836
 
3836 3837
         })