陈少旭 9 kuukautta sitten
vanhempi
commit
92f995d5a0

+ 55 - 53
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Näytä tiedosto

@@ -2654,49 +2654,47 @@ export default {
2654 2654
           if (index == 1) {
2655 2655
             // console.log(this.prescriptions)
2656 2656
 
2657
-            if (this.org_id == 10206 || this.org_id == 0) {
2658
-              console.log(this.prescriptions)
2659
-
2660
-              //药品
2661
-              for (let i = 0; i < this.prescriptions.length; i++) {
2662
-                for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
2663
-                  // if(this.prescriptions[i].advices[b].advice_id == 0) {
2664
-                  // this.judgmentsDrugStock(this.prescriptions[i].advices[b].drug.bby01, this.prescriptions[i].advices[b].drug.bbx01,this.prescriptions[i].advices[b].drug_name,this.prescriptions[i].advices[b].prescribing_number,isLoading)
2665
-                  for (let c = 0; c < this.zuobiao_drug.length; c++) {
2666
-                    if (this.zuobiao_drug[c].bby01 == this.prescriptions[i].advices[b].drug.bby01) {
2667
-                      if (this.zuobiao_drug[c].sysl < parseInt(this.prescriptions[i].advices[b].prescribing_number)) {
2668
-                        isLoading = false
2669
-                        this.$message.error(this.prescriptions[i].advices[b].drug_name + '库存不足,无法保存')
2670
-                        return
2671
-                      }
2672
-                    }
2673
-                  }
2674
-                  // }
2675
-                }
2676
-              }
2677
-              //耗材
2678
-              for (let i = 0; i < this.prescriptions.length; i++) {
2679
-
2680
-                for (let b = 0; b < this.prescriptions[i].project.length; b++) {
2681
-                  if (this.prescriptions[i].project[b].type == 3) {
2682
-                    // if(this.prescriptions[i].project[b].id == 0) {
2683
-                    // 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)
2684
-                    for (let c = 0; c < this.zuobiao_project.length; c++) {
2685
-                      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) {
2686
-                        if (this.zuobiao_project[c].lsqty < parseInt(this.prescriptions[i].project[b].total)) {
2687
-                          isLoading = false
2688
-                          this.$message.error(this.prescriptions[i].project[b].good_info.good_name + '库存不足,无法保存')
2689
-                          return
2690
-                        }
2691
-                      }
2692
-                    }
2693
-
2694
-                    //
2695
-                    // }
2696
-                  }
2697
-                }
2698
-              }
2699
-            }
2657
+            // if (this.org_id == 10206 || this.org_id == 0) {
2658
+            //   console.log(this.prescriptions)
2659
+            //
2660
+            //   //药品
2661
+            //   for (let i = 0; i < this.prescriptions.length; i++) {
2662
+            //     for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
2663
+            //       // if(this.prescriptions[i].advices[b].advice_id == 0) {
2664
+            //       // this.judgmentsDrugStock(this.prescriptions[i].advices[b].drug.bby01, this.prescriptions[i].advices[b].drug.bbx01,this.prescriptions[i].advices[b].drug_name,this.prescriptions[i].advices[b].prescribing_number,isLoading)
2665
+            //       for (let c = 0; c < this.zuobiao_drug.length; c++) {
2666
+            //         if (this.zuobiao_drug[c].bby01 == this.prescriptions[i].advices[b].drug.bby01) {
2667
+            //           if (this.zuobiao_drug[c].sysl < parseInt(this.prescriptions[i].advices[b].prescribing_number)) {
2668
+            //             isLoading = false
2669
+            //             this.$message.error(this.prescriptions[i].advices[b].drug_name + '库存不足,无法保存')
2670
+            //             return
2671
+            //           }
2672
+            //         }
2673
+            //       }
2674
+            //       // }
2675
+            //     }
2676
+            //   }
2677
+            //   //耗材
2678
+            //   for (let i = 0; i < this.prescriptions.length; i++) {
2679
+            //
2680
+            //     for (let b = 0; b < this.prescriptions[i].project.length; b++) {
2681
+            //       if (this.prescriptions[i].project[b].type == 3) {
2682
+            //         // if(this.prescriptions[i].project[b].id == 0) {
2683
+            //         // 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)
2684
+            //         for (let c = 0; c < this.zuobiao_project.length; c++) {
2685
+            //           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) {
2686
+            //             if (this.zuobiao_project[c].lsqty < parseInt(this.prescriptions[i].project[b].total)) {
2687
+            //               isLoading = false
2688
+            //               this.$message.error(this.prescriptions[i].project[b].good_info.good_name + '库存不足,无法保存')
2689
+            //               return
2690
+            //             }
2691
+            //           }
2692
+            //         }
2693
+            //
2694
+            //       }
2695
+            //     }
2696
+            //   }
2697
+            // }
2700 2698
 
2701 2699
             if (this.org_id != 10206 && this.org_id != 0) {
2702 2700
               for (let i = 0; i < this.prescriptions.length; i++) {
@@ -2922,21 +2920,25 @@ export default {
2922 2920
                         }
2923 2921
                       }
2924 2922
                     }
2925
-
2926
-                    if (newArr.length > 0 && this.org_id != 10206 && this.org_id != 0) {
2927
-                      for (let i = 0; i < newArr.length; i++) {
2928
-                        if (newArr[i].is_user != 1) {
2929
-                          if (newArr[i].out_count > newArr[i].sum_count) {
2930
-                            this.$message.error(newArr[i].str + '库存不足,保存失败!')
2931
-                            isLoading = false
2932
-                            this.$emit('editKeepLoad', false)
2933
-                            return
2923
+                    if(this.org_id != 10206) {
2924
+                      if (newArr.length > 0 && this.org_id != 10206 && this.org_id != 0) {
2925
+                        for (let i = 0; i < newArr.length; i++) {
2926
+                          if (newArr[i].is_user != 1) {
2927
+                            if (newArr[i].out_count > newArr[i].sum_count) {
2928
+                              this.$message.error(newArr[i].str + '库存不足,保存失败!')
2929
+                              isLoading = false
2930
+                              this.$emit('editKeepLoad', false)
2931
+                              return
2932
+                            }
2934 2933
                           }
2935
-                        }
2936 2934
 
2935
+                        }
2937 2936
                       }
2938 2937
                     }
2939 2938
 
2939
+
2940
+
2941
+
2940 2942
                   }
2941 2943
                 }
2942 2944